Module: Peddler::Reports::VendorRealTimeInventory

Defined in:
lib/peddler/reports/vendor_real_time_inventory.rb,
lib/peddler/reports/vendor_real_time_inventory/report.rb,
lib/peddler/reports/vendor_real_time_inventory/report_data.rb,
lib/peddler/reports/vendor_real_time_inventory/report_specification.rb

Overview

This report shares inventory data at an ASIN level, aggregated to an hourly granularity. Requests can span multiple date range periods, including the current day.

Constant Summary collapse

Report =

This report shares inventory data at an ASIN level, aggregated to an hourly granularity. Requests can span multiple date range periods, including the current day.

Structure.new do
  # @return [Array<ReportData>] List of ASIN and inventory count combinations.
  attribute(:report_data, [ReportData], from: "reportData")

  # @return [Hash] Summarizes the original report request.
  attribute(:report_specification, ReportSpecification, from: "reportSpecification")
end
ReportData =

Contains details about ASIN and inventory count combinations for the specified time range.

Structure.new do
  # @return [String] The Amazon Standard Identification Number (ASIN).
  attribute(:asin, String)

  # @return [Time] The end of a date-time range in UTC representing the end of the hour for this object.
  attribute(:end_time, Time, from: "endTime")

  # @return [Integer] The number of units available to be sold on the website, based on units in Amazon
  # fulfillment centers that are in sellable condition less units in customer shopping carts or otherwise bound
  # for other orders (e.g. known subscribe-and-save orders).
  attribute(:highly_available_inventory, Integer, from: "highlyAvailableInventory")

  # @return [Time] The start of a date-time range in UTC representing the beginning of the hour for this object.
  attribute(:start_time, Time, from: "startTime")
end
ReportSpecification =

Summarizes the original report request.

Structure.new do
  # @return [Time] The end of a date-time range in UTC used to determine hours to report on. Output will include
  # all full hours that fall within the range. End time should not be more than 24 hours from the start time.
  attribute(:data_end_time, Time, from: "dataEndTime")

  # @return [Time] The start of a date-time range in UTC used to determine hours to report on. Output will include
  # all full hours that fall within the range. Start time can be up to 168 hours before the time of the request.
  attribute(:data_start_time, Time, from: "dataStartTime")

  # @return [Array<String>] Marketplace IDs as specified in the report request.
  attribute(:marketplace_ids, [String], from: "marketplaceIds")

  # @return [String] The report type.
  attribute(:report_type, String, from: "reportType")
end

Class Method Summary collapse

Class Method Details

.parse(hash) ⇒ Object



13
14
15
# File 'lib/peddler/reports/vendor_real_time_inventory.rb', line 13

def parse(hash)
  Report.parse(hash)
end