Class: Peddler::APIs::Replenishment20221107

Inherits:
Peddler::API show all
Defined in:
lib/peddler/apis/replenishment_2022_11_07.rb,
lib/peddler/apis/replenishment_2022_11_07/error.rb,
lib/peddler/apis/replenishment_2022_11_07/promotion.rb,
lib/peddler/apis/replenishment_2022_11_07/error_list.rb,
lib/peddler/apis/replenishment_2022_11_07/preference.rb,
lib/peddler/apis/replenishment_2022_11_07/program_types.rb,
lib/peddler/apis/replenishment_2022_11_07/time_interval.rb,
lib/peddler/apis/replenishment_2022_11_07/discount_funding.rb,
lib/peddler/apis/replenishment_2022_11_07/list_offers_request.rb,
lib/peddler/apis/replenishment_2022_11_07/pagination_response.rb,
lib/peddler/apis/replenishment_2022_11_07/list_offers_response.rb,
lib/peddler/apis/replenishment_2022_11_07/list_offers_request_sort.rb,
lib/peddler/apis/replenishment_2022_11_07/list_offer_metrics_request.rb,
lib/peddler/apis/replenishment_2022_11_07/list_offers_response_offer.rb,
lib/peddler/apis/replenishment_2022_11_07/list_offer_metrics_response.rb,
lib/peddler/apis/replenishment_2022_11_07/list_offers_request_filters.rb,
lib/peddler/apis/replenishment_2022_11_07/offer_program_configuration.rb,
lib/peddler/apis/replenishment_2022_11_07/list_offers_request_pagination.rb,
lib/peddler/apis/replenishment_2022_11_07/list_offer_metrics_request_sort.rb,
lib/peddler/apis/replenishment_2022_11_07/list_offer_metrics_response_offer.rb,
lib/peddler/apis/replenishment_2022_11_07/list_offer_metrics_request_filters.rb,
lib/peddler/apis/replenishment_2022_11_07/get_selling_partner_metrics_request.rb,
lib/peddler/apis/replenishment_2022_11_07/get_selling_partner_metrics_response.rb,
lib/peddler/apis/replenishment_2022_11_07/list_offer_metrics_request_pagination.rb,
lib/peddler/apis/replenishment_2022_11_07/offer_program_configuration_promotions.rb,
lib/peddler/apis/replenishment_2022_11_07/offer_program_configuration_preferences.rb,
lib/peddler/apis/replenishment_2022_11_07/get_selling_partner_metrics_response_metric.rb,
lib/peddler/apis/replenishment_2022_11_07/offer_program_configuration_promotions_discount_funding.rb

Overview

Selling Partner API for Replenishment

The Selling Partner API for Replenishment (Replenishment API) provides programmatic access to replenishment program metrics and offers. These programs provide recurring delivery of any replenishable item at a frequency chosen by the customer.

The Replenishment API is available worldwide wherever Amazon Subscribe & Save is available or is supported. The API is available to vendors and FBA selling partners.

Defined Under Namespace

Classes: ProgramTypes

Constant Summary collapse

Error =

Error response returned when the request is unsuccessful.

Structure.new do
  # @return [String] An error code that identifies the type of error that occurred.
  attribute(:code, String)

  # @return [String] A message that describes the error condition.
  attribute(:message, String)

  # @return [String] Additional details that can help the caller understand or fix the issue.
  attribute?(:details, String)
end
Promotion =

Offer promotions to include in the result filter criteria.

Structure.new do
  # @return [DiscountFunding] A base discount set by Amazon on the offer.
  attribute?(:amazon_funded_base_discount, DiscountFunding, from: "amazonFundedBaseDiscount")

  # @return [DiscountFunding] A tiered discount set by Amazon on the offer.
  attribute?(:amazon_funded_tiered_discount, DiscountFunding, from: "amazonFundedTieredDiscount")

  # @return [DiscountFunding] A base discount set by the selling partner on the offer.
  attribute?(:selling_partner_funded_base_discount, DiscountFunding, from: "sellingPartnerFundedBaseDiscount")

  # @return [DiscountFunding] A tiered discount set by the selling partner on the offer.
  attribute?(:selling_partner_funded_tiered_discount, DiscountFunding, from: "sellingPartnerFundedTieredDiscount")
end
ErrorList =

A list of error responses returned when a request is unsuccessful.

Structure.new do
  # @return [Array<Error>] A list of error responses returned when a request is unsuccessful.
  attribute(:errors, [Error])
end
Preference =

Offer preferences that you can include in the result filter criteria.

Structure.new do
  # @return [Array<AutoEnrollmentPreference>] Filters the results to only include offers with the auto-enrollment
  # preference specified.
  attribute?(:auto_enrollment, Array, from: "autoEnrollment")
end
TimeInterval =

A date-time interval in ISO 8601 format which is used to compute metrics. Only the date is required, but you must pass the complete date and time value. For example, November 11, 2022 should be passed as "2022-11-07T00:00:00Z". Note that only data for the trailing 2 years is supported.

Note: The listOfferMetrics operation only supports a time interval which covers a single unit of the aggregation frequency. For example, for a MONTH aggregation frequency, the duration of the interval between the startDate and endDate can not be more than 1 month.

Structure.new do
  # @return [Time] When this object is used as a request parameter, the specified `endDate` is adjusted based on
  # the aggregation frequency.
  #
  # * For `WEEK` the metric is computed up to the last day of the week (Sunday, based on ISO 8601) that contains
  # the `endDate`.
  # * For `MONTH`, the metric is computed up to the last day that contains the `endDate`.
  # * For `QUARTER` the metric is computed up to the last day of the quarter that contains the `endDate`.
  # * For `YEAR` the metric is computed up to the last day of the year that contains the `endDate`.
  # Note: The end date may be adjusted to a lower value based on the data available in our system.
  attribute(:end_date, Time, from: "endDate")

  # @return [Time] When this object is used as a request parameter, the specified `startDate` is adjusted based on
  # the aggregation frequency.
  #
  # * For `WEEK` the metric is computed from the first day of the week (Sunday, based on ISO 8601) that contains
  # the `startDate`.
  # * For `MONTH` the metric is computed from the first day of the month that contains the `startDate`.
  # * For `QUARTER` the metric is computed from the first day of the quarter that contains the `startDate`.
  # * For `YEAR` the metric is computed from the first day of the year that contains the `startDate`.
  attribute(:start_date, Time, from: "startDate")
end
DiscountFunding =

The discount funding on the offer.

Structure.new do
  # @return [Array<Number>] Filters the results to only include offers with the percentage specified.
  attribute?(:percentage, [Float])
end
ListOffersRequest =

The request body for the listOffers operation.

Structure.new do
  # @return [ListOffersRequestFilters] Use these parameters to filter results. Any result must match all provided
  # parameters. For any parameter that is an array, the result must match at least one element in the provided
  # array.
  attribute(:filters, ListOffersRequestFilters)

  # @return [ListOffersRequestPagination] Use these parameters to paginate through the response.
  attribute(:pagination, ListOffersRequestPagination)

  # @return [ListOffersRequestSort] Use these parameters to sort the response.
  attribute?(:sort, ListOffersRequestSort)
end
PaginationResponse =

Use these parameters to paginate through the response.

Structure.new do
  # @return [Integer] Total number of results matching the given filter criteria.
  attribute?(:total_results, Integer, from: "totalResults")
end
ListOffersResponse =

The response schema for the listOffers operation.

Structure.new do
  # @return [Array<ListOffersResponseOffer>] A list of offers.
  attribute?(:offers, [ListOffersResponseOffer])

  # @return [PaginationResponse] Use these parameters to paginate through the response.
  attribute?(:pagination, PaginationResponse)
end
ListOffersRequestSort =

Use these parameters to sort the response.

Structure.new do
  # @return [String] The attribute to use to sort the results.
  attribute(:key, String)

  # @return [String] The sort order.
  attribute(:order, String)
end
ListOfferMetricsRequest =

The request body for the listOfferMetrics operation.

Structure.new do
  # @return [ListOfferMetricsRequestFilters] Use these parameters to filter results. Any result must match all
  # provided parameters. For any parameter that is an array, the result must match at least one element in the
  # provided array.
  attribute(:filters, ListOfferMetricsRequestFilters)

  # @return [ListOfferMetricsRequestPagination] Use these parameters to paginate through the response.
  attribute(:pagination, ListOfferMetricsRequestPagination)

  # @return [ListOfferMetricsRequestSort] Use these parameters to sort the response.
  attribute?(:sort, ListOfferMetricsRequestSort)
end
ListOffersResponseOffer =

An object which contains details about an offer.

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

  # @return [String] The offer eligibility status.
  attribute?(:eligibility, String)

  # @return [String] The marketplace identifier. The supported marketplaces for both sellers and vendors are US,
  # CA, ES, UK, FR, IT, IN, DE and JP. The supported marketplaces for vendors only are BR, AU, MX, AE and NL.
  # Refer to [Marketplace IDs](https://developer-docs.amazon.com/sp-api/docs/marketplace-ids) to find the
  # identifier for the marketplace.
  attribute?(:marketplace_id, String, from: "marketplaceId")

  # @return [OfferProgramConfiguration]
  attribute?(:offer_program_configuration, OfferProgramConfiguration, from: "offerProgramConfiguration")

  # @return [String] The replenishment program for the offer.
  attribute?(:program_type, String, from: "programType")

  # @return [String] The SKU. This property is only supported for sellers and not for vendors.
  attribute?(:sku, String)

  # @return [Array<String>] A list of vendor codes associated with the offer.
  attribute?(:vendor_codes, [String], from: "vendorCodes")
end
ListOfferMetricsResponse =

The response schema for the listOfferMetrics operation.

Structure.new do
  # @return [Array<ListOfferMetricsResponseOffer>] A list of offers and associated metrics.
  attribute?(:offers, [ListOfferMetricsResponseOffer])

  # @return [PaginationResponse] Use these parameters to paginate through the response.
  attribute?(:pagination, PaginationResponse)
end
ListOffersRequestFilters =

Use these parameters to filter results. Any result must match all of the provided parameters. For any parameter that is an array, the result must match at least one element in the provided array.

Structure.new do
  # @return [String] The marketplace identifier. The supported marketplaces for both sellers and vendors are US,
  # CA, ES, UK, FR, IT, IN, DE and JP. The supported marketplaces for vendors only are BR, AU, MX, AE and NL.
  # Refer to [Marketplace IDs](https://developer-docs.amazon.com/sp-api/docs/marketplace-ids) to find the
  # identifier for the marketplace.
  attribute(:marketplace_id, String, from: "marketplaceId")

  # @return [Array<ProgramType>]
  attribute(:program_types, Array, from: "programTypes")

  # @return [Array<String>] A list of Amazon Standard Identification Numbers (ASINs).
  attribute?(:asins, [String])

  # @return [Array<EligibilityStatus>] A list of eligibilities associated with an offer.
  attribute?(:eligibilities, Array)

  # @return [Preference] Offer preferences to include in the result filter criteria.
  attribute?(:preferences, Preference)

  # @return [Promotion] Offer promotions to include in the result filter criteria.
  attribute?(:promotions, Promotion)

  # @return [Array<String>] A list of SKUs to filter. This filter is only supported for sellers and not for
  # vendors.
  attribute?(:skus, [String])
end
OfferProgramConfiguration =

The offer program configuration contains a set of program properties for an offer.

Structure.new do
  # @return [String] Determines whether the offer was automatically or manually enrolled in the program. This
  # property is only supported for sellers and not vendors.
  attribute?(:enrollment_method, String, from: "enrollmentMethod")

  # @return [OfferProgramConfigurationPreferences] An object which contains the preferences applied to the offer.
  attribute?(:preferences, OfferProgramConfigurationPreferences)

  # @return [OfferProgramConfigurationPromotions] An object which contains the promotions applied to the offer.
  attribute?(:promotions, OfferProgramConfigurationPromotions)
end
ListOffersRequestPagination =

Use these parameters to paginate through the response.

Structure.new do
  # @return [Integer] The maximum number of results to return in the response.
  attribute(:limit, Integer)

  # @return [Integer] The offset from which to retrieve the number of results specified by the `limit` value. The
  # first result is at offset 0.
  attribute(:offset, Integer)
end
ListOfferMetricsRequestSort =

Use these parameters to sort the response.

Structure.new do
  # @return [String]
  attribute(:key, String)

  # @return [String] The sort order.
  attribute(:order, String)
end
ListOfferMetricsResponseOffer =

An object which contains offer metrics.

Structure.new do
  # @return [Float] The number of active subscriptions present at the end of the period. Applicable to PERFORMANCE
  # timePeriodType.
  attribute?(:active_subscriptions, Float, from: "activeSubscriptions")

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

  # @return [Float] The percentage of revenue from ASINs with coupons out of total revenue from all ASINs.
  # Applicable to PERFORMANCE timePeriodType.
  attribute?(:coupons_revenue_penetration, Float, from: "couponsRevenuePenetration")

  # @return [String] The currency code in ISO 4217 format.
  attribute?(:currency_code, String, from: "currencyCode")

  # @return [Float] The revenue that would have been generated had there not been out of stock. Applicable to
  # PERFORMANCE timePeriodType.
  attribute?(:lost_revenue_due_to_oos, Float, from: "lostRevenueDueToOOS")

  # @return [Float] The forecasted shipped subscription units for the next 30 days. Applicable to FORECAST
  # timePeriodType.
  attribute?(:next30_day_shipped_subscription_units, Float, from: "next30DayShippedSubscriptionUnits")

  # @return [Float] The forecasted total subscription revenue for the next 30 days. Applicable to FORECAST
  # timePeriodType.
  attribute?(:next30_day_total_subscriptions_revenue, Float, from: "next30DayTotalSubscriptionsRevenue")

  # @return [Float] The forecasted shipped subscription units for the next 60 days. Applicable to FORECAST
  # timePeriodType.
  attribute?(:next60_day_shipped_subscription_units, Float, from: "next60DayShippedSubscriptionUnits")

  # @return [Float] The forecasted total subscription revenue for the next 60 days. Applicable to FORECAST
  # timePeriodType.
  attribute?(:next60_day_total_subscriptions_revenue, Float, from: "next60DayTotalSubscriptionsRevenue")

  # @return [Float] The forecasted shipped subscription units for the next 90 days. Applicable to FORECAST
  # timePeriodType.
  attribute?(:next90_day_shipped_subscription_units, Float, from: "next90DayShippedSubscriptionUnits")

  # @return [Float] The forecasted total subscription revenue for the next 90 days. Applicable to FORECAST
  # timePeriodType.
  attribute?(:next90_day_total_subscriptions_revenue, Float, from: "next90DayTotalSubscriptionsRevenue")

  # @return [Float] The percentage of items that were not shipped out of the total shipped units over a period of
  # time due to being out of stock. Applicable to PERFORMANCE timePeriodType.
  attribute?(:not_delivered_due_to_oos, Float, from: "notDeliveredDueToOOS")

  # @return [Float] The percentage of total program revenue out of total product revenue. Applicable to
  # PERFORMANCE timePeriodType.
  attribute?(:revenue_penetration, Float, from: "revenuePenetration")

  # @return [Float] The percentage of new subscriptions acquired through coupons. Applicable to PERFORMANCE
  # timePeriodType.
  attribute?(:share_of_coupon_subscriptions, Float, from: "shareOfCouponSubscriptions")

  # @return [Float] The number of units shipped to the subscribers over a period of time. Applicable to
  # PERFORMANCE timePeriodType.
  attribute?(:shipped_subscription_units, Float, from: "shippedSubscriptionUnits")

  # @return [TimeInterval] A time interval used to compute metrics.
  attribute?(:time_interval, TimeInterval, from: "timeInterval")

  # @return [Float] The revenue generated from subscriptions over a period of time. Applicable to PERFORMANCE
  # timePeriodType.
  attribute?(:total_subscriptions_revenue, Float, from: "totalSubscriptionsRevenue")
end
ListOfferMetricsRequestFilters =

Use these parameters to filter results. Any result must match all provided parameters. For any parameter that is an array, the result must match at least one element in the provided array.

Structure.new do
  # @return [String] The marketplace identifier. The supported marketplaces for both sellers and vendors are US,
  # CA, ES, UK, FR, IT, IN, DE and JP. The supported marketplaces for vendors only are BR, AU, MX, AE and NL.
  # Refer to [Marketplace IDs](https://developer-docs.amazon.com/sp-api/docs/marketplace-ids) to find the
  # identifier for the marketplace.
  attribute(:marketplace_id, String, from: "marketplaceId")

  # @return [Array<ProgramType>]
  attribute(:program_types, Array, from: "programTypes")

  # @return [TimeInterval] A time interval used to compute metrics.
  attribute(:time_interval, TimeInterval, from: "timeInterval")

  # @return [String]
  attribute(:time_period_type, String, from: "timePeriodType")

  # @return [String]
  attribute?(:aggregation_frequency, String, from: "aggregationFrequency")

  # @return [Array<String>] A list of Amazon Standard Identification Numbers (ASINs).
  attribute?(:asins, [String])
end
GetSellingPartnerMetricsRequest =

The request body for the getSellingPartnerMetrics operation.

Structure.new do
  # @return [String] The marketplace identifier. The supported marketplaces for both sellers and vendors are US,
  # CA, ES, UK, FR, IT, IN, DE and JP. The supported marketplaces for vendors only are BR, AU, MX, AE and NL.
  # Refer to [Marketplace IDs](https://developer-docs.amazon.com/sp-api/docs/marketplace-ids) to find the
  # identifier for the marketplace.
  attribute(:marketplace_id, String, from: "marketplaceId")

  # @return [Array<ProgramType>] The list of replenishment program types for which to return metrics.
  attribute(:program_types, Array, from: "programTypes")

  # @return [TimeInterval] A time interval used to compute metrics.
  attribute(:time_interval, TimeInterval, from: "timeInterval")

  # @return [String]
  attribute(:time_period_type, String, from: "timePeriodType")

  # @return [String]
  attribute?(:aggregation_frequency, String, from: "aggregationFrequency")

  # @return [Array<Metric>] The list of metrics requested. If no metric value is provided, data for all of the
  # metrics will be returned.
  attribute?(:metrics, Array)
end
GetSellingPartnerMetricsResponse =

The response schema for the getSellingPartnerMetrics operation.

Structure.new do
  # @return [Array<GetSellingPartnerMetricsResponseMetric>] A list of metrics data for the selling partner.
  attribute?(:metrics, [GetSellingPartnerMetricsResponseMetric])
end
ListOfferMetricsRequestPagination =

Use these parameters to paginate through the response.

Structure.new do
  # @return [Integer] The maximum number of results to return in the response.
  attribute(:limit, Integer)

  # @return [Integer] The offset from which to retrieve the number of results specified by the `limit` value. The
  # first result is at offset 0.
  attribute(:offset, Integer)
end
OfferProgramConfigurationPromotions =

An object which represents all promotions applied to an offer.

Structure.new do
  # @return [OfferProgramConfigurationPromotionsDiscountFunding] A base discount set by Amazon on the offer.
  attribute?(:amazon_funded_base_discount, OfferProgramConfigurationPromotionsDiscountFunding, from: "amazonFundedBaseDiscount")

  # @return [OfferProgramConfigurationPromotionsDiscountFunding] A tiered discount set by Amazon on the offer.
  attribute?(:amazon_funded_tiered_discount, OfferProgramConfigurationPromotionsDiscountFunding, from: "amazonFundedTieredDiscount")

  # @return [OfferProgramConfigurationPromotionsDiscountFunding] A base discount set by the selling partner on the
  # offer.
  attribute?(:selling_partner_funded_base_discount, OfferProgramConfigurationPromotionsDiscountFunding, from: "sellingPartnerFundedBaseDiscount")

  # @return [OfferProgramConfigurationPromotionsDiscountFunding] A tiered discount set by the selling partner on
  # the offer.
  attribute?(:selling_partner_funded_tiered_discount, OfferProgramConfigurationPromotionsDiscountFunding, from: "sellingPartnerFundedTieredDiscount")
end
OfferProgramConfigurationPreferences =

An object which contains the preferences applied to the offer.

Structure.new do
  # @return [String] The auto-enrollment preference indicates whether the offer is opted-in to or opted-out of
  # Amazon's auto-enrollment feature.
  attribute?(:auto_enrollment, String, from: "autoEnrollment")
end
GetSellingPartnerMetricsResponseMetric =

An object which contains metric data for a selling partner.

Structure.new do
  # @return [Float] The number of active subscriptions present at the end of the period. Applicable to PERFORMANCE
  # timePeriodType.
  attribute?(:active_subscriptions, Float, from: "activeSubscriptions")

  # @return [Float] The percentage of revenue from ASINs with coupons out of total revenue from all ASINs.
  # Applicable to PERFORMANCE timePeriodType.
  attribute?(:coupons_revenue_penetration, Float, from: "couponsRevenuePenetration")

  # @return [String] The currency code in ISO 4217 format.
  attribute?(:currency_code, String, from: "currencyCode")

  # @return [Float] The revenue that would have been generated had there not been out of stock. Applicable to
  # PERFORMANCE timePeriodType.
  attribute?(:lost_revenue_due_to_oos, Float, from: "lostRevenueDueToOOS")

  # @return [Float] The average reorders per non-subscriber of the program over a period of past 12 months.
  # Applicable to PERFORMANCE timePeriodType.
  attribute?(:non_subscriber_average_reorders, Float, from: "nonSubscriberAverageReorders")

  # @return [Float] The average revenue per non-subscriber of the program over a period of past 12 months for
  # sellers and 6 months for vendors. Applicable to PERFORMANCE timePeriodType.
  attribute?(:non_subscriber_average_revenue, Float, from: "nonSubscriberAverageRevenue")

  # @return [Float] The percentage of items that were not shipped out of the total shipped units over a period of
  # time due to being out of stock. Applicable to PERFORMANCE timePeriodType.
  attribute?(:not_delivered_due_to_oos, Float, from: "notDeliveredDueToOOS")

  # @return [Float] The subscription revenue generated from active subscriptions with one delivery over the past
  # 12 months. Applicable to PERFORMANCE timePeriodType.
  attribute?(:revenue_from_active_subscriptions_with_single_delivery, Float, from: "revenueFromActiveSubscriptionsWithSingleDelivery")

  # @return [Float] The subscription revenue generated from subscriptions which are cancelled after one delivery
  # over the past 12 months. Applicable to PERFORMANCE timePeriodType.
  attribute?(:revenue_from_cancelled_subscriptions_after_single_delivery, Float, from: "revenueFromCancelledSubscriptionsAfterSingleDelivery")

  # @return [Float] The subscription revenue generated from subscriptions with over two deliveries over the past
  # 12 months. Applicable to PERFORMANCE timePeriodType.
  attribute?(:revenue_from_subscriptions_with_multiple_deliveries, Float, from: "revenueFromSubscriptionsWithMultipleDeliveries")

  # @return [Float] The percentage of subscription revenue generated by offers with 0% seller-funded discount over
  # the last 12 months. Applicable to PERFORMANCE timePeriodType.
  attribute?(:revenue_penetration_for0_percent_seller_funding, Float, from: "revenuePenetrationFor0PercentSellerFunding")

  # @return [Float] [Applicable only for Sellers] The percentage of subscription revenue generated by offers with
  # 10% seller-funded discount over the last 12 months. Applicable to PERFORMANCE timePeriodType.
  attribute?(:revenue_penetration_for10_percent_seller_funding, Float, from: "revenuePenetrationFor10PercentSellerFunding")

  # @return [Float] [Applicable only for Sellers] The percentage of subscription revenue generated by offers with
  # 5% seller-funded discount over the last 12 months. Applicable to PERFORMANCE timePeriodType.
  attribute?(:revenue_penetration_for5_percent_seller_funding, Float, from: "revenuePenetrationFor5PercentSellerFunding")

  # @return [Float] [Applicable only for vendors] The percentage of subscription revenue generated by offers with
  # 5% or above seller-funded discount over the last 12 months. Applicable to PERFORMANCE timePeriodType.
  attribute?(:revenue_penetration_for5_plus_percent_seller_funding, Float, from: "revenuePenetrationFor5PlusPercentSellerFunding")

  # @return [Float] The percentage of new subscriptions acquired through coupons. Applicable to PERFORMANCE
  # timePeriodType.
  attribute?(:share_of_coupon_subscriptions, Float, from: "shareOfCouponSubscriptions")

  # @return [Float] The number of units shipped to the subscribers over a period of time. Applicable for both the
  # PERFORMANCE and FORECAST timePeriodType.
  attribute?(:shipped_subscription_units, Float, from: "shippedSubscriptionUnits")

  # @return [Float] The average reorders per subscriber of the program over a period of 12 months. Applicable to
  # PERFORMANCE timePeriodType.
  attribute?(:subscriber_average_reorders, Float, from: "subscriberAverageReorders")

  # @return [Float] The average revenue per subscriber of the program over a period of past 12 months for sellers
  # and 6 months for vendors. Applicable to PERFORMANCE timePeriodType.
  attribute?(:subscriber_average_revenue, Float, from: "subscriberAverageRevenue")

  # @return [Float] The percentage of subscriptions retained after 30 days of subscription creation. Applicable to
  # PERFORMANCE timePeriodType.
  attribute?(:subscriber_retention_for30_days, Float, from: "subscriberRetentionFor30Days")

  # @return [Float] The percentage of subscriptions retained after 90 days of subscription creation. Applicable to
  # PERFORMANCE timePeriodType.
  attribute?(:subscriber_retention_for90_days, Float, from: "subscriberRetentionFor90Days")

  # @return [TimeInterval] A time interval used to compute metrics.
  attribute?(:time_interval, TimeInterval, from: "timeInterval")

  # @return [Float] The revenue generated from subscriptions over a period of time. Applicable for both the
  # PERFORMANCE and FORECAST timePeriodType.
  attribute?(:total_subscriptions_revenue, Float, from: "totalSubscriptionsRevenue")
end
OfferProgramConfigurationPromotionsDiscountFunding =

A promotional percentage discount applied to the offer.

Structure.new do
  # @return [Float] The percentage discount on the offer.
  attribute?(:percentage, Float)
end

Instance Attribute Summary

Attributes inherited from Peddler::API

#access_token, #endpoint, #retries

Instance Method Summary collapse

Methods inherited from Peddler::API

#endpoint_uri, #http, #initialize, #meter, #retriable, #sandbox, #sandbox?, #use, #via

Constructor Details

This class inherits a constructor from Peddler::API

Instance Method Details

#get_selling_partner_metrics(body: nil, rate_limit: 1.0) ⇒ Peddler::Response

Note:

This operation can make a static sandbox call.

Returns aggregated replenishment program metrics for a selling partner.

Parameters:

  • body (Hash) (defaults to: nil)

    The request body for the getSellingPartnerMetrics operation.

  • rate_limit (Float) (defaults to: 1.0)

    Requests per second

Returns:



24
25
26
27
28
# File 'lib/peddler/apis/replenishment_2022_11_07.rb', line 24

def get_selling_partner_metrics(body: nil, rate_limit: 1.0)
  path = "/replenishment/2022-11-07/sellingPartners/metrics/search"
  parser = -> { GetSellingPartnerMetricsResponse }
  meter(rate_limit).post(path, body:, parser:)
end

#list_offer_metrics(body: nil, rate_limit: 1.0) ⇒ Peddler::Response

Note:

This operation can make a static sandbox call.

Returns aggregated replenishment program metrics for a selling partner's offers.

Parameters:

  • body (Hash) (defaults to: nil)

    The request body for the listOfferMetrics operation.

  • rate_limit (Float) (defaults to: 1.0)

    Requests per second

Returns:



36
37
38
39
40
# File 'lib/peddler/apis/replenishment_2022_11_07.rb', line 36

def list_offer_metrics(body: nil, rate_limit: 1.0)
  path = "/replenishment/2022-11-07/offers/metrics/search"
  parser = -> { ListOfferMetricsResponse }
  meter(rate_limit).post(path, body:, parser:)
end

#list_offers(body: nil, rate_limit: 1.0) ⇒ Peddler::Response

Note:

This operation can make a static sandbox call.

Returns the details of a selling partner's replenishment program offers.

Parameters:

  • body (Hash) (defaults to: nil)

    The request body for the listOffers operation.

  • rate_limit (Float) (defaults to: 1.0)

    Requests per second

Returns:



48
49
50
51
52
# File 'lib/peddler/apis/replenishment_2022_11_07.rb', line 48

def list_offers(body: nil, rate_limit: 1.0)
  path = "/replenishment/2022-11-07/offers/search"
  parser = -> { ListOffersResponse }
  meter(rate_limit).post(path, body:, parser:)
end