Module: Peddler::Notifications::BrandedItemContentChange

Defined in:
lib/peddler/notifications/branded_item_content_change.rb,
lib/peddler/notifications/branded_item_content_change/payload.rb,
lib/peddler/notifications/branded_item_content_change/notification.rb

Overview

The root schema

The root schema comprises the entire JSON document.

Constant Summary collapse

Payload =

Notification payload data

Structure.new do
  # @return [String]
  attribute(:asin, String, from: "Asin")

  # @return [Array<String>] The array of item attributes which changed. Possible values include bullet_point,
  # item_name, product_description, and image-related attributes shown in the examples. NOTE: the attributes that
  # contain the word 'image' all mean the same thing right now, which is that one or more images changed on the
  # product detail page. In a future release we may update them to mean that individual image attribute changed,
  # but for now if any image changes all the image attributes will be present in the notification. Attribute
  # names, descriptions, and requirements are available in the Product Type Definitions API.
  attribute(:attributes_changed, [String], from: "AttributesChanged")

  # @return [String]
  attribute(:brand_name, String, from: "BrandName")

  # @return [String]
  attribute(:marketplace_id, String, from: "MarketplaceId")
end
Notification =

The root schema comprises the entire JSON document.

Structure.new do
  # @return [String]
  attribute(:event_time, String, from: "EventTime")

  # @return [Hash]
  attribute(:notification_metadata, Hash, from: "NotificationMetadata")

  # @return [String]
  attribute(:notification_type, String, from: "NotificationType")

  # @return [String]
  attribute(:notification_version, String, from: "NotificationVersion")

  # @return [Payload]
  attribute(:payload, Payload, from: "Payload")

  # @return [String]
  attribute(:payload_version, String, from: "PayloadVersion")
end

Class Method Summary collapse

Class Method Details

.parse(hash) ⇒ Object



12
13
14
# File 'lib/peddler/notifications/branded_item_content_change.rb', line 12

def parse(hash)
  Notification.parse(hash)
end