Module: Peddler::DataKiosk::Economics20240315
- Defined in:
- lib/peddler/data_kiosk/economics20240315.rb,
lib/peddler/data_kiosk/economics20240315/fee.rb,
lib/peddler/data_kiosk/economics20240315/sales.rb,
lib/peddler/data_kiosk/economics20240315/amount.rb,
lib/peddler/data_kiosk/economics20240315/economics.rb,
lib/peddler/data_kiosk/economics20240315/ad_summary.rb,
lib/peddler/data_kiosk/economics20240315/fee_summary.rb,
lib/peddler/data_kiosk/economics20240315/net_proceeds.rb,
lib/peddler/data_kiosk/economics20240315/fee_component.rb,
lib/peddler/data_kiosk/economics20240315/per_unit_cost.rb,
lib/peddler/data_kiosk/economics20240315/aggregated_detail.rb,
lib/peddler/data_kiosk/economics20240315/fba_per_unit_cost.rb,
lib/peddler/data_kiosk/economics20240315/mfn_per_unit_cost.rb,
lib/peddler/data_kiosk/economics20240315/economics_property.rb,
lib/peddler/data_kiosk/economics20240315/analytics_economics20240315.rb
Constant Summary collapse
- Fee =
A fee applied to a given product in the seller's account within a given date range. Fee information can be found here.
Structure.new do # @return [AggregatedDetail] Fee aggregated transaction detail. attribute?(:aggregated_detail, AggregatedDetail, null: false, from: "aggregatedDetail") # @return [Array<FeeComponent>] A breakdown of the fee into individual components. This field will be null for # fee types that cannot be divided into individual components. attribute?(:components, [FeeComponent]) # @return [String] The end date of the seller economics data for current fee. In most cases, this value is the # same as the request 'endDate'. However, when the request date range includes the Amazon fee change date, in # order to better show the impact of the Amazon fee changes before and after the fee change date, the response # will split the request date range and display the fee separately. This will cause the 'endDate' in 'Fee' to # be different than the request 'endDate'. # Example: If the request date range is [2024-07-01, 2024-07-30] and the Amazon fee change date is 2024-07-15, # then the request date range will be split into [2024-07-01, 2024-07-14], [2024-07-15, 2024-07-30]. attribute?(:end_date, String, from: "endDate") # @return [String] A unique identifier used to track this fee attribute?(:identifier, String, null: false) # @return [Array<EconomicsProperty>] The properties used to calculate the 'aggregatedDetail' value in 'Fee'. # Example: Product Size Tier, an important property that determines the amountPerUnit of FBA_FULFILLMENT_FEE. attribute?(:properties, [EconomicsProperty]) # @return [String] The start date of the seller economics data for current fee. In most cases, this value is the # same as the request 'startDate'. However, when the request date range includes the Amazon fee change date, # in order to better show the impact of the Amazon fee changes before and after the fee change date, the # response will split the request date range and display the fee separately. # This will cause the 'startDate' in 'Fee' to be different than the request 'startDate'. # Example: If the request date range is [2024-07-01, 2024-07-30] and the Amazon fee change date is 2024-07-15, # then the request date range will be split into [2024-07-01, 2024-07-14], [2024-07-15, 2024-07-30]. attribute?(:start_date, String, from: "startDate") end
- Sales =
The sales data for a given product in the seller's account within a given date range.
Structure.new do # @return [Amount] The average price of the units sold in the selected time period, calculated by dividing the # orderedProductSales by unitsOrdered for the selected time period. # This field will be null when unitsOrdered is 0. attribute?(:average_selling_price, Amount, from: "averageSellingPrice") # @return [Amount] The amount of net product sales, calculated by orderedProductSales - refundedProductSales. attribute?(:net_product_sales, Amount, null: false, from: "netProductSales") # @return [String] The number of net units sold for the selected time period, calculated by unitsOrdered - # unitsRefunded. attribute?(:net_units_sold, String, null: false, from: "netUnitsSold") # @return [Amount] The amount of ordered product sales, calculated by multiplying the price of products and the # number of units sold for the selected time period. attribute?(:ordered_product_sales, Amount, null: false, from: "orderedProductSales") # @return [Amount] The amount of refunded product sales for the selected time period, it's counted by refund # request time. attribute?(:refunded_product_sales, Amount, null: false, from: "refundedProductSales") # @return [String] The number of units ordered for the selected time period. Example: For an order containing 2 # copies of book A and 3 copies of book B, the number of orders is 1, the number of order items is 2 (book A # and book B), and the number of units is 5 (2 + 3). attribute?(:units_ordered, String, null: false, from: "unitsOrdered") # @return [String] The number of units refunded in the selected time period. attribute?(:units_refunded, String, null: false, from: "unitsRefunded") end
- Amount =
Monetary amount with the corresponding currency code.
Structure.new do # @return [Float] The amount. attribute?(:amount, Float, null: false) # @return [String] Currency code of the amount in ISO 4217 format. attribute?(:currency_code, String, null: false, from: "currencyCode") end
- Economics =
The seller economics data for a given product in the seller's account.
Structure.new do # @return [Array<AdSummary>] The advertising spend data for the product within the specified date range. attribute?(:ads, [AdSummary]) # @return [String] The Amazon Standard Identification Number of the child product. Child products are unique, # sellable products that are related in our catalog to a single, non-sellable parent product. Note: This field # is only present when product aggregation is CHILD_ASIN, FNSKU or MSKU. attribute?(:child_asin, String, from: "childAsin") # @return [PerUnitCost] The off Amazon cost provided by the seller for this product (per unit). The off Amazon # cost can be provided on [SKU Central](https://sellercentral.amazon.com/skucentral?mSku=xxx) and [Revenue # Calculator](https://sellercentral.amazon.com/revcal). attribute?(:cost, PerUnitCost) # @return [String] The end date of the seller economics data. Note that this date may be adjusted to the end of # DateGranularity. attribute?(:end_date, String, null: false, from: "endDate") # @return [Array<FeeSummary>] The fees applied to the product within the specified date range. attribute?(:fees, [FeeSummary], null: false) # @return [String] The Fulfillment Network Stock Keeping Unit (FNSKU) of the product. Note: This field is only # present when product aggregation is FNSKU or MSKU. This field may be null when product aggregation is MSKU # and the row is associated with more than one FNSKU. attribute?(:fnsku, String) # @return [String] The marketplace identifier of the seller economics data. attribute?(:marketplace_id, String, null: false, from: "marketplaceId") # @return [String] The Merchant Stock Keeping Unit (MSKU) of the product. Note: This field is only present when # product aggregation is FNSKU or MSKU. This field may be null when product aggregation is FNSKU and the row # is associated with more than one MSKU. attribute?(:msku, String) # @return [NetProceeds] The net proceeds for this product within the specified date range. The value remains # unchanged regardless of whether sales, fees, ads, or cost are selected in the query. attribute?(:net_proceeds, NetProceeds, null: false, from: "netProceeds") # @return [String] The Amazon Standard Identification Number of the parent product. A parent product appears in # our catalog as a non-buyable, generic identifier for a product that has buyable variations (child products). attribute?(:parent_asin, String, null: false, from: "parentAsin") # @return [Sales] The sales data for the product within the specified date range. attribute?(:sales, Sales, null: false) # @return [String] The start date of the seller economics data. Note that this date may be adjusted to the start # of DateGranularity. attribute?(:start_date, String, null: false, from: "startDate") end
- AdSummary =
The advertisements spend data summary for the seller's account aggregated by transaction event type: charge.
Structure.new do # @return [String] Advertisement type name, for example: "Sponsored Products charge". attribute?(:ad_type_name, String, null: false, from: "adTypeName") # @return [AggregatedDetail] Charge aggregated detail for an advertisement type. attribute?(:charge, AggregatedDetail) end
- FeeSummary =
The fees data summary for the seller's account aggregated by transaction event type: charge.
Structure.new do # @return [Fee] Charge summary for a fee type. attribute?(:charge, Fee) # @return [Array<Fee>] Charge summary for a fee type. attribute?(:charges, [Fee]) # @return [String] Fee type name, for example: "FBA fulfillment fees" attribute?(:fee_type_name, String, null: false, from: "feeTypeName") end
- NetProceeds =
The net proceeds for a given product in the seller's account for a given time range. These fields are calculated as sales.netProductSales - sum of fees.charge.totalAmount - sum of ads.charge.totalAmount - (cost of Merchant Fulfilled Network (MFN) products or cost of Fulfillment by Amazon (FBA) products) * sales.netUnitsSold.
Structure.new do # @return [Amount] Net proceeds per unit for a given product in the seller's account for a given time range. # This value is calculated by dividing total by sales.netUnitsSold. attribute?(:per_unit, Amount, from: "perUnit") # @return [Amount] "Total net proceeds for a given product in the seller's account for a given time range. attribute?(:total, Amount) end
- FeeComponent =
The fee component data applied to a given product in the seller's account within a given date range. It's breakdown of parent fee.
Structure.new do # @return [AggregatedDetail] Fee component aggregated detail. attribute?(:aggregated_detail, AggregatedDetail, null: false, from: "aggregatedDetail") # @return [String] Fee component name, for example: "Base fulfillment fee". attribute?(:name, String, null: false) # @return [Array<EconomicsProperty>] The properties used to calculate the 'aggregatedDetail' value in # 'FeeComponent'. Example: Product Size Tier, an important property that determines the amountPerUnit of # FBA_FULFILLMENT_FEE component. attribute?(:properties, [EconomicsProperty]) end
- PerUnitCost =
The item level per unit cost provided by seller. Fields in this type will be null if not provided by the seller.
Structure.new do # @return [Amount] Cost to manufacture or acquire the product. This value is provided by the seller and is # applicable to both Fulfillment by Amazon (FBA) and Merchant Fulfilled Network (MFN) products. attribute?(:cost_of_goods_sold, Amount, from: "costOfGoodsSold") # @return [FBAPerUnitCost] The item level per unit cost provided by the seller and applicable to Fulfillment by # Amazon (FBA) products. attribute?(:fba_cost, FBAPerUnitCost, from: "fbaCost") # @return [MfnPerUnitCost] The item level per unit cost provided by the seller and applicable to Merchant # Fulfilled Network (MFN) products. attribute?(:mfn_cost, MfnPerUnitCost, from: "mfnCost") # @return [Amount] Miscellaneous costs not related to this specific product, ex: overhead, etc. # This value is provided by the seller and applicable to both Fulfillment by Amazon (FBA) and Merchant Fulfilled # Network (MFN) products. attribute?(:miscellaneous_cost, Amount, from: "miscellaneousCost") end
- AggregatedDetail =
The aggregated transaction detail for the seller's account aggregated by transaction event type and transaction type, for example: charge and "fbaFulfillmentFee".
Structure.new do # @return [Amount] Amount calculated by rate card. attribute?(:amount, Amount, null: false) # @return [Amount] Final charge amount per unit after promotion and tax are considered. This value is calculated # by dividing totalAmount by quantity. This value will be null when quantity is null. attribute?(:amount_per_unit, Amount, from: "amountPerUnit") # @return [Amount] The per unit amount delta is calculated by subtracting the previous amountPerUnit from the # current amountPerUnit. This value is mainly used to indicate the change in amountPerUnit before and after an # Amazon fee change. # This value will be null if there are no Amazon fee change in the selected time range or if the previous # amountPerUnit is null. # Example: if the previous amountPerUnit is $5 and the current amountPerUnit is $7, the amountPerUnitDelta would # be $2. attribute?(:amount_per_unit_delta, Amount, from: "amountPerUnitDelta") # @return [Amount] The promotion amount associated with this transaction type. This value is deducted from # amount when computing totalAmount. attribute?(:promotion_amount, Amount, null: false, from: "promotionAmount") # @return [Float] Charged quantity for a given product in the seller's account. When the fee is not charged on a # per unit basis, this value may be null or may not be an integer. attribute?(:quantity, Float) # @return [Amount] The tax amount associated with this transaction type. This value is added to amount when # computing totalAmount. attribute?(:tax_amount, Amount, null: false, from: "taxAmount") # @return [Amount] Final charge amount after promotion and tax are considered. This value is calculated as # amount - promotionAmount + taxAmount. attribute?(:total_amount, Amount, null: false, from: "totalAmount") end
- FBAPerUnitCost =
The item level per unit cost provided by the seller and applicable to Fulfillment by Amazon (FBA) products. Fields in this type will be null if not provided by the seller.
Structure.new do # @return [Amount] Cost of shipping the Fulfillment by Amazon (FBA) item to an Amazon fulfillment center. This # value is provided by the seller and applicable to Fulfillment by Amazon (FBA) products. attribute?(:shipping_to_amazon_cost, Amount, from: "shippingToAmazonCost") end
- MfnPerUnitCost =
The item level per unit cost provided by the seller and applicable to Merchant Fulfilled Network (MFN) products. Fields in this type will be null if not provided by the seller.
Structure.new do # @return [Amount] Cost of fulfilling an order containing the product, including labor, packing material, # shipping to customer, customer service etc. This value is provided by the seller and applicable to Merchant # Fulfilled Network (MFN) products. attribute?(:fulfillment_cost, Amount, from: "fulfillmentCost") # @return [Amount] Cost to store a single unit of the product per month. This value is provided by the seller # and applicable to Merchant Fulfilled Network (MFN) products. attribute?(:storage_cost, Amount, from: "storageCost") end
- EconomicsProperty =
The properties used in economics calculation.
Structure.new do # @return [String] Property name attribute?(:property_name, String, null: false, from: "propertyName") # @return [String] Property value attribute?(:property_value, String, null: false, from: "propertyValue") end
- AnalyticsEconomics20240315 =
A root type for seller economics queries version 2024_03_15.
Structure.new do # @return [Array<Economics>] A query to retrieve seller economics data for the seller's account aggregated by # date and product identifier. The seller economics data consists of aggregated sales, fees, and cost for # selected period. The data sets are refreshed daily with the latest sales, fees, and cost data. The supported # fee types and advertisement charge types can be found # [here](https://sellercentral.amazon.com/gp/help/GZ8Y22NL2FSRY8M5). attribute?(:economics, [Economics]) # @return [Array<Economics>] A query to preview seller economics data for the seller's account aggregated by # date range specified by startDate and endDate. The seller preview economics data consists of aggregated # estimated sales, fees, and cost for selected period. The data sets are refreshed daily with the latest # estimated sales, fees, and cost data. The supported fee types and advertisement charge types can be found # [here](https://sellercentral.amazon.com/help/hub/reference/GQNVDV46U9JQ25HY). attribute?(:economics_preview, [Economics], from: "economicsPreview") end
Class Method Summary collapse
-
.schema ⇒ Hash
GraphQL schema introspection data.
Class Method Details
.schema ⇒ Hash
Returns GraphQL schema introspection data.
10 11 12 13 |
# File 'lib/peddler/data_kiosk/economics20240315.rb', line 10 def schema path = File.("economics20240315.json", __dir__.to_s) JSON.load_file(path) end |