Class: Edi::Amazon::JsonListingGenerator::Attributes::RecommendedBrowseNodes
- Inherits:
-
BaseAttribute
- Object
- BaseAttribute
- Edi::Amazon::JsonListingGenerator::Attributes::RecommendedBrowseNodes
- Defined in:
- app/services/edi/amazon/json_listing_generator/attributes/recommended_browse_nodes.rb
Overview
Emits the single recommended browse node for an Amazon listing.
A variation family recommends its VariantGroup's node; a standalone catalog
item recommends its own. Exactly ONE node is submitted per listing:
recommending several lets Amazon pick the wrong category — e.g. a
floor-heating cable kit that also carried a "Pipe Heat Cables" node gets
filed there instead of "Floor Heating". Marketplace-scoped so a node from a
sibling marketplace never leaks into this listing.
Constant Summary
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
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 ⇒ Object
13 14 15 16 17 18 |
# File 'app/services/edi/amazon/json_listing_generator/attributes/recommended_browse_nodes.rb', line 13 def build node_id = recommended_node_id return if node_id.blank? [{ value: node_id, marketplace_id: }] end |