Class: Edi::Amazon::JsonListingGenerator::Attributes::ComplianceMedia
- Inherits:
-
BaseAttribute
- Object
- BaseAttribute
- Edi::Amazon::JsonListingGenerator::Attributes::ComplianceMedia
- Defined in:
- app/services/edi/amazon/json_listing_generator/attributes/compliance_media.rb
Overview
Amazon's GPSR compliance document (compliance_media).
Amazon's own uploader stores a presigned URL as source_location. Those
expire, and once one does Amazon's fetcher gets access-denied on its own
bucket and suppresses the attribute — error 100907, whose message
("Your access permissions need to be updated. Check browser settings and try
again.") reads like a browser problem on the seller's side and is not. In
August 2026 that had 33 EU products flagged off links minted in December
2024. Publishing our own durable URL is what keeps it fixed.
Constant Summary collapse
- CONTENT_TYPE =
GPSR asks for safety information, and it is what Amazon's own uploader
classified these documents as. It also participates in the entry's
identity, so changing it would leave the previous entry in place rather
than replace it. The enum also offersinstallation_manualand
application_guide; don't switch without clearing the old entry too. 'safety_information'
Constants inherited from BaseAttribute
BaseAttribute::RUBY_UNIT_TO_AMAZON_UNIT
Instance Attribute Summary
Attributes inherited from BaseAttribute
#amazon_schema, #attribute_name, #catalog_item, #enum_mapper, #fba, #item, #language_tag, #marketplace, #marketplace_country_iso, #marketplace_id, #value_attribute_name, #variation
Instance Method Summary collapse
-
#build ⇒ Array<Hash>?
Nil when no manual covers this marketplace.
Methods inherited from BaseAttribute
#fetch_unit, #fetch_value, #initialize, #map_unit, #value
Constructor Details
This class inherits a constructor from Edi::Amazon::JsonListingGenerator::Attributes::BaseAttribute
Instance Method Details
#build ⇒ Array<Hash>?
Returns nil when no manual covers this marketplace.
28 29 30 31 32 33 34 35 36 37 |
# File 'app/services/edi/amazon/json_listing_generator/attributes/compliance_media.rb', line 28 def build publication = installation_manual return if publication.nil? url = source_location_for(publication) return if url.blank? [{ content_type: CONTENT_TYPE, content_language: language_tag, source_location: url, marketplace_id: marketplace_id }] end |