Module: Peddler::Reports::EndUserData
- Defined in:
- lib/peddler/reports/end_user_data.rb,
lib/peddler/reports/end_user_data/report.rb,
lib/peddler/reports/end_user_data/asin_metrics.rb,
lib/peddler/reports/end_user_data/end_user_data.rb,
lib/peddler/reports/end_user_data/report_options.rb,
lib/peddler/reports/end_user_data/report_specification.rb
Overview
Provides end user (customer) data to IE, ES, FR, BE, NL, DE, IT, SE, and PL selling partners. The data contains customer personal data that includes contact information, page view (glance view), and order data for customers that elect to share this data with specific sellers. The customer data is accessible across various reporting periods (DAY, WEEK, and MONTH). Developers can choose start and end dates and the reporting period for data retrieval and aggregation. If the customer does not elect to share their data, the report does not generate data.
Constant Summary collapse
- Report =
Provides end user (customer) data to IE, ES, FR, BE, NL, DE, IT, SE, and PL selling partners. The data contains customer personal data that includes contact information, page view (glance view), and order data for customers that elect to share this data with specific sellers. The customer data is accessible across various reporting periods (DAY, WEEK, and MONTH). Developers can choose start and end dates and the reporting period for data retrieval and aggregation. If the customer does not elect to share their data, the report does not generate data.
Structure.new do # @return [Array<EndUserData>] A list of consented end users (buyers) and their data. attribute(:end_user_data, [EndUserData], from: "endUserData") # @return [Hash] Summarizes the report request. attribute(:report_specification, ReportSpecification, from: "reportSpecification") end
- ASINMetrics =
Page view and GMS metrics of the end user.
Structure.new do # @return [String] ASIN for which the metrics are provided. Only ASINs with an active offer from the Seller are # included. attribute(:asin, String) # @return [Date] End date of the aggregation window. attribute(:end_date, Date, from: "endDate") # @return [String] Marketplace for which the metrics are provided. attribute(:marketplace_id, String, from: "marketplaceId") # @return [Date] Start date of the aggregation window. attribute(:start_date, Date, from: "startDate") # @return [String] The ISO 4217 currency code in which GMS is calculated. attribute?(:currency_code, String, from: "currencyCode") # @return [Float] End user's GMS for the ASIN. GMS = (Product Price * Quantity) + Shipping + Giftwrap - Returns # - Promotional Discounts. attribute?(:gms, Float) # @return [Integer] End user's page views (count) for the ASIN. attribute?(:page_views, Integer, from: "pageViews") end
- EndUserData =
Contains end user contact information, page view and GMS metrics.
Structure.new do # @return [Array<AsinMetrics>] A list of Asin Page View and GMS metrics of an end user. attribute(:asin_metrics, [ASINMetrics], from: "asinMetrics") # @return [String] Full Name of the end user. attribute(:full_name, String, from: "fullName") # @return [Hash] Mailing address of the end user. attribute(:mailing_address, Hash, from: "mailingAddress") # @return [String] Primary email of the end user. attribute(:primary_email, String, from: "primaryEmail") end
- ReportOptions =
Used to specify the report period.
Structure.new do # @return [String] The granularity of the data in the report. Valid values are: DAY, WEEK, and MONTH. If no # granularity is specified, reportPeriod defaults to MONTH. attribute?(:report_period, String, from: "reportPeriod") end
- ReportSpecification =
Summarizes the report request.
Structure.new do # @return [Date] Determines the end date of the report - the time component is ignored. If the provided end date # occurs mid-week or mid-month, the preceding Saturday for weekly reporting periods or the last day of the # previous month for monthly reporting periods will be used instead. Additionally if the end date differs from # the start date by more than 365 days, it will be adjusted to the closest end date with a maximum 365 day # difference based on the selected reporting period. attribute(:data_end_time, Date, from: "dataEndTime") # @return [Date] Determines the start date of the report - the time component is ignored. If the provided start # date occurs mid-week or mid-month, the following Sunday for weekly reporting periods or the first day of the # next month for monthly reporting periods will be used instead. attribute(:data_start_time, Date, from: "dataStartTime") # @return [Array<String>] Any of the EU(8) marketplaces. DE, FR, IT, ES, NL, PL, SE and BE attribute(:marketplace_ids, [String], from: "marketplaceIds") # @return [String] The report type. attribute(:report_type, String, from: "reportType") # @return [ReportOptions] Used to specify the report period. attribute?(:report_options, ReportOptions, from: "reportOptions") end
Class Method Summary collapse
Class Method Details
.parse(hash) ⇒ Object
16 17 18 |
# File 'lib/peddler/reports/end_user_data.rb', line 16 def parse(hash) Report.parse(hash) end |