Module: Peddler::Reports::MarketplaceASINPageViewMetrics

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

Overview

Provides information on the ASIN page view (glance view) metrics for the DE, FR, IT, ES, NL, PL, SE, BE (EU-8) and UK marketplaces, with data available up to the last seven days. A page view is a customer view of the product's detail page for a given ASIN. Developers have the option to specify a start and end date to retrieve data within that range. If no dates are specified, the report will provide the data for the latest available day. For marketplaces and product categories where the seller does not have a meaningful presence (40 units sold), the report will not return any data.

Constant Summary collapse

Report =

Provides information on the ASIN page view (glance view) metrics for the DE, FR, IT, ES, NL, PL, SE, BE (EU-8) and UK marketplaces, with data available up to the last seven days. A page view is a customer view of the product's detail page for a given ASIN. Developers have the option to specify a start and end date to retrieve data within that range. If no dates are specified, the report will provide the data for the latest available day. For marketplaces and product categories where the seller does not have a meaningful presence (40 units sold), the report will not return any data.

Structure.new do
  # @return [Array<MarketplaceAsinPageViewMetrics>] A list of ASIN page view metrics.
  attribute(:marketplace_asin_page_view_metrics, [MarketplaceASINPageViewMetrics], from: "marketplaceAsinPageViewMetrics")

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

Specifies the product type.

Structure.new do
  # @return [String] The Amazon product type of the ASINs for which the report is being requested. All ASINs with
  # the productType will be included. The value for the product type can be found by following instructions on
  # Seller Central's Help page. - https://developer-docs.amazon.com/sp-api/docs/seller-central-urls
  attribute(:product_type, String, from: "productType")
end
ReportSpecification =

Summarizes the report request.

Structure.new do
  # @return [Array<String>] Any of the EU(8) or UK marketplaces. DE, FR, IT, ES, NL, PL, SE, BE and UK
  attribute(:marketplace_ids, [String], from: "marketplaceIds")

  # @return [ReportOptions] Specifies the product type.
  attribute(:report_options, ReportOptions, from: "reportOptions")

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

  # @return [Date] Determines the end date of the report - the time component is ignored. If the end date of the
  # report is not within the seven days from start date, the report will be cancelled. If the end date of the
  # report is not provided, it will default to the end date of the most recently available daily date.
  attribute?(:data_end_time, Date, from: "dataEndTime")

  # @return [Date] Determines the start date of the report - the time component is ignored. If the start date of
  # the report is more than seven days ago, the report will be cancelled. If the start date of the report is not
  # provided, it will default to the start date of the most recently available daily data.
  attribute?(:data_start_time, Date, from: "dataStartTime")
end
MarketplaceASINPageViewMetrics =

Contains aggregate ASIN page view metrics.

Structure.new do
  # @return [String] ASIN for which the page view metrics are provided.
  attribute(:asin, String)

  # @return [Time] End time of the aggregation window in UTC.
  attribute(:end_time, Time, from: "endTime")

  # @return [String] Marketplace for which the page view metrics are provided.
  attribute(:marketplace_id, String, from: "marketplaceId")

  # @return [Integer] Total page views (count).
  attribute(:page_views, Integer, from: "pageViews")

  # @return [Time] Start time of the aggregation window in UTC.
  attribute(:start_time, Time, from: "startTime")
end

Class Method Summary collapse

Class Method Details

.parse(hash) ⇒ Object



17
18
19
# File 'lib/peddler/reports/marketplace_asin_page_view_metrics.rb', line 17

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