Module: Peddler::Reports::VendorRealTimeSales

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

Overview

This report shares sales data at an ASIN level, aggregated to an hourly granularity. Requests can span multiple date range periods. For example, if the customer specified dataStartTime and dataEndTime span three hours, the report would contain data for each complete hour within the time span.

Constant Summary collapse

Report =

This report shares sales data at an ASIN level, aggregated to an hourly granularity. Requests can span multiple date range periods. For example, if the customer specified dataStartTime and dataEndTime span three hours, the report would contain data for each complete hour within the time span.

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

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

Contains details about hour and ASIN 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 [Float] Ordered Product Sales in the specified hour as of the time the report is generated.
  # Adjustments are made for cancellations.
  attribute(:ordered_revenue, Float, from: "orderedRevenue")

  # @return [Integer] Number of units ordered by Amazon customers. This number can be negative if there are more
  # cancellations than orders.
  attribute(:ordered_units, Integer, from: "orderedUnits")

  # @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
ReportOptions =

Report options specifying parameters such as currencyCode.

Structure.new do
  # @return [String] Currency code of the amount. In ISO 4217 format.
  attribute(:currency_code, String, from: "currencyCode")
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.
  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.
  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 [ReportOptions] Report options specifying parameters such as currencyCode.
  attribute(:report_options, ReportOptions, from: "reportOptions")

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

Class Method Summary collapse

Class Method Details

.parse(hash) ⇒ Object



14
15
16
# File 'lib/peddler/reports/vendor_real_time_sales.rb', line 14

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