Module: Peddler::Notifications::FBAInventoryAvailabilityChange

Defined in:
lib/peddler/notifications/fba_inventory_availability_change.rb,
lib/peddler/notifications/fba_inventory_availability_change/payload.rb,
lib/peddler/notifications/fba_inventory_availability_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] Amazon Standard Identification Number of the affected inventory item.
  attribute(:asin, String, from: "ASIN")

  # @return [String] The Fulfillment Network SKU of the affected inventory item.
  attribute(:fn_sku, String, from: "FNSKU")

  # @return [Array<Object>] List of Fulfillment Inventory Details for each marketplace.
  attribute(:fulfillment_inventory_by_marketplace, Array, from: "FulfillmentInventoryByMarketplace")

  # @return [String] Seller SKU of the affected inventory item.
  attribute(:sku, String, from: "SKU")

  # @return [String] Selling partner identifier, such as a merchant account, for the affected inventory item.
  attribute(:seller_id, String, from: "SellerId")
end
Notification =

The root schema comprises the entire JSON document.

Structure.new do
  # @return [Payload] The details of this notification.
  attribute(:payload, Payload, from: "Payload")

  # @return [Time] Timestamp of the event. Formatted as ISO 8601 date-time.
  attribute?(:event_time, Time, from: "EventTime")

  # @return [String] The type of this notification
  attribute?(:notification_type, String, from: "NotificationType")

  # @return [String] The version of this notification.
  attribute?(:notification_version, String, from: "NotificationVersion")

  # @return [String] The version of the payload.
  attribute?(:payload_version, String, from: "PayloadVersion")
end

Class Method Summary collapse

Class Method Details

.parse(hash) ⇒ Object



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

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