Module: Peddler::Feeds::ListingsFeedMessageSchema
- Defined in:
- lib/peddler/feeds/listings_feed_message_schema.rb,
lib/peddler/feeds/listings_feed_message_schema/feed.rb,
lib/peddler/feeds/listings_feed_message_schema/patch.rb
Overview
Selling Partner Listings Message (v2)
Constant Summary collapse
- Feed =
Selling Partner Listings Message (v2)
Structure.new do # @return [Integer] Identifier for the message that is unique within this feed submission. Response messages are # correlated to this identifier. attribute(:message_id, Integer, from: "messageId") # @return [String] Type of operation to perform for the listings data submission in this message. "UPDATE" # indicates the full set of item attributes are provided and any existing attributes data will be replaced with # the provided attributes. "PARTIAL_UPDATE" indicates only the provided item attributes will be updated with the # provided attribute data. "PATCH" indicates the provided JSON Patch operations will be used to update the # applicable attributes. "DELETE" indicates the listings item will be deleted. attribute(:operation_type, String, from: "operationType") # @return [String] Selling Partner SKU (stock keeping unit) identifier for the listing. SKU uniquely identifies # a listing for a Selling Partner. attribute(:sku, String) # @return [Hash] Attributes data for the listings data submission. attribute?(:attributes, Hash) # @return [Array<Patch>] Attributes data in the form of JSON Patch operations to update or delete. attribute?(:patches, [Patch]) # @return [String] Amazon product type of the listings data submission in this message. attribute?(:product_type, String, from: "productType") # @return [String] Name of the requirements type for the listings data submission in this message. "LISTING" # indicates requirements inclusive of product facts and sales terms. "LISTING_PRODUCT_ONLY" indicates # requirements inclusive of product facts only. "LISTING_OFFER_ONLY" indicates requirements inclusive of sales # terms only. attribute?(:requirements, String) end
- Patch =
Individual JSON Patch operation.
Structure.new do # @return [String] Type of JSON Patch operation. Supported JSON Patch operations include add, replace, merge, # and delete. See https://tools.ietf.org/html/rfc6902. attribute(:op, String) # @return [String] JSON Pointer path of the attribute to patch. See https://tools.ietf.org/html/rfc6902. attribute(:path, String) # @return [Array<Object>] JSON value to add, replace, or delete. attribute?(:value, Array) end
Class Method Summary collapse
Class Method Details
.parse(hash) ⇒ Object
12 13 14 |
# File 'lib/peddler/feeds/listings_feed_message_schema.rb', line 12 def parse(hash) Feed.parse(hash) end |