Module: Peddler::Feeds::ListingsFeedProcessingReportSchema

Defined in:
lib/peddler/feeds/listings_feed_processing_report_schema.rb,
lib/peddler/feeds/listings_feed_processing_report_schema/feed.rb,
lib/peddler/feeds/listings_feed_processing_report_schema/issue.rb,
lib/peddler/feeds/listings_feed_processing_report_schema/header.rb,
lib/peddler/feeds/listings_feed_processing_report_schema/report.rb,
lib/peddler/feeds/listings_feed_processing_report_schema/summary.rb,
lib/peddler/feeds/listings_feed_processing_report_schema/item_summary.rb

Overview

Selling Partner JSON Listings Feed Processing Report (v2)

Constant Summary collapse

Feed =

Selling Partner JSON Listings Feed Processing Report (v2)

Structure.new do
  # @return [Header] Header information about the feed submission.
  attribute(:header, Header)

  # @return [Array<Issue>] Issues containing message processing information for the Selling Partner.
  attribute(:issues, [Issue])

  # @return [Summary] Aggregate counts of errors, warnings, and statuses related to the acceptance of feed
  # messages. When requested, Item Summary includes aggregate counts of items, errors, and warnings related to the
  # listing items created or updated by this feed submission.
  attribute(:summary, Summary)

  # @return [Array<Object>] A set of listings items and their specific data sets that originates from the feed
  # request’s "includedData" header parameter.
  attribute?(:items, Array)
end
Issue =

Issue containing message processing information corresponding to an individual listings data submission.

Structure.new do
  # @return [String] Localized Error Message Associated with the issue encountered.
  attribute(:message, String)

  # @return [String] The severity of the issue.
  attribute(:severity, String)

  # @return [String] Name of the attribute associated with the issue, if applicable.
  attribute?(:attribute_name, String, from: "attributeName")

  # @return [String] An Optional error code that maps to documentation.
  attribute?(:code, String)

  # @return [Integer] Identifier for the message that is unique within this feed submission. Correlated to
  # Identifiers provided in the submitted feed. Not provided if the error is not related to a message (e.g. feed
  # formatting issue).
  attribute?(:message_id, Integer, from: "messageId")
end
Header =

Header information about the feed submission.

Structure.new do
  # @return [String] The identifier for the feed. This identifier is unique only in combination with a seller ID.
  attribute(:feed_id, String, from: "feedId")

  # @return [String] Identifier for the Selling Partner, such as the Merchant Account or Vendor Code.
  attribute(:seller_id, String, from: "sellerId")

  # @return [String] Version of the JSON Selling Partner Listings Feeds specification used for the feed
  # submission.
  attribute(:version, String)

  # @return [Report] The report information for the feed submission.
  attribute?(:report, Report)
end
Report =

The report information for the feed submission.

Structure.new do
  # @return [String] The version of the Selling Partner Listings Items API to use to retrieve the listing items.
  attribute(:api_version, String, from: "apiVersion")

  # @return [Array<String>] When "includedData" elements are in the feed submission, the processing report that
  # generates for the feed submission includes the listings items output from the Selling Partner Listings Items
  # API with the "includedData" elements from the request. The report includes issues that prevent the acceptance
  # of messages regardless of the "includedData" elements in the feed request.
  attribute(:included_data, [String], from: "includedData")
end
Summary =

Aggregate counts of errors, warnings, and statuses related to the acceptance of feed messages. When requested, Item Summary includes aggregate counts of items, errors, and warnings related to the listing items created or updated by this feed submission.

Structure.new do
  # @return [Integer] Number of errors encountered processing the feed.
  attribute(:errors, Integer)

  # @return [Integer] Number of messages that were accepted, the associated updates are being applied.
  attribute(:messages_accepted, Integer, from: "messagesAccepted")

  # @return [Integer] Number of messages that were invalid, the associated updates will not be applied.
  attribute(:messages_invalid, Integer, from: "messagesInvalid")

  # @return [Integer] Number of messages processed.
  attribute(:messages_processed, Integer, from: "messagesProcessed")

  # @return [Integer] Number of warnings encountered processing the feed.
  attribute(:warnings, Integer)

  # @return [ItemSummary] Aggregate counts of items, errors, and warnings related to the listing items created or
  # updated by this feed submission and included in the Items section of this report.
  attribute?(:item_summary, ItemSummary, from: "itemSummary")
end
ItemSummary =

Aggregate counts of items, errors, and warnings related to the listing items created or updated by this feed submission and included in the Items section of this report.

Structure.new do
  # @return [Integer] Number of errors across all listing items created or updated by this feed submission.
  attribute(:errors, Integer)

  # @return [Integer] Number of listing items created or updated by this feed submission and included in the Items
  # section of this report.
  attribute(:items, Integer)

  # @return [Integer] Number of warnings across all listing items created or updated by this feed submission.
  attribute(:warnings, Integer)
end

Class Method Summary collapse

Class Method Details

.parse(hash) ⇒ Object



12
13
14
# File 'lib/peddler/feeds/listings_feed_processing_report_schema.rb', line 12

def parse(hash)
  Feed.parse(hash)
end