Class: Peddler::API::Replenishment20221107

Inherits:
Peddler::API show all
Defined in:
lib/peddler/api/replenishment_2022_11_07.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.

Instance Attribute Summary

Attributes inherited from Peddler::API

#access_token, #endpoint

Instance Method Summary collapse

Methods inherited from Peddler::API

#cannot_sandbox!, #endpoint_uri, #http, #initialize, #meter, #must_sandbox!, #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) ⇒ Hash

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:

  • (Hash)

    The API response



26
27
28
29
30
# File 'lib/peddler/api/replenishment_2022_11_07.rb', line 26

def get_selling_partner_metrics(body: nil, rate_limit: 1.0)
  path = "/replenishment/2022-11-07/sellingPartners/metrics/search"

  meter(rate_limit).post(path, body:)
end

#list_offer_metrics(body: nil, rate_limit: 1.0) ⇒ Hash

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:

  • (Hash)

    The API response



38
39
40
41
42
# File 'lib/peddler/api/replenishment_2022_11_07.rb', line 38

def list_offer_metrics(body: nil, rate_limit: 1.0)
  path = "/replenishment/2022-11-07/offers/metrics/search"

  meter(rate_limit).post(path, body:)
end

#list_offers(body: nil, rate_limit: 1.0) ⇒ Hash

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:

  • (Hash)

    The API response



50
51
52
53
54
# File 'lib/peddler/api/replenishment_2022_11_07.rb', line 50

def list_offers(body: nil, rate_limit: 1.0)
  path = "/replenishment/2022-11-07/offers/search"

  meter(rate_limit).post(path, body:)
end