Class: Peddler::API::ShipmentInvoicingV0

Inherits:
Peddler::API show all
Defined in:
lib/peddler/api/shipment_invoicing_v0.rb

Overview

Selling Partner API for Shipment Invoicing

The Selling Partner API for Shipment Invoicing helps you programmatically retrieve shipment invoice information in the Brazil marketplace for a selling partner’s Fulfillment by Amazon (FBA) orders.

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_invoice_status(shipment_id, rate_limit: 1.133) ⇒ Hash

Note:

This operation can make a static sandbox call.

Returns the invoice status for the shipment you specify.

Parameters:

  • shipment_id (String)

    The shipment identifier for the shipment.

  • rate_limit (Float) (defaults to: 1.133)

    Requests per second

Returns:

  • (Hash)

    The API response



53
54
55
56
57
# File 'lib/peddler/api/shipment_invoicing_v0.rb', line 53

def get_invoice_status(shipment_id, rate_limit: 1.133)
  path = "/fba/outbound/brazil/v0/shipments/#{shipment_id}/invoice/status"

  meter(rate_limit).get(path)
end

#get_shipment_details(shipment_id, rate_limit: 1.133) ⇒ Hash

Note:

This operation can make a static sandbox call.

Returns the shipment details required to issue an invoice for the specified shipment.

Parameters:

  • shipment_id (String)

    The identifier for the shipment. Get this value from the FBAOutboundShipmentStatus notification. For information about subscribing to notifications, see the href="https://developer-docs.amazon.com/sp-api/docs/notifications-api-v1-use-case-guide">https://developer-docs.amazon.com/sp-api/docs/notifications-api-v1-use-case-guide Notifications API Use Case Guide.

  • rate_limit (Float) (defaults to: 1.133)

    Requests per second

Returns:

  • (Hash)

    The API response



28
29
30
31
32
# File 'lib/peddler/api/shipment_invoicing_v0.rb', line 28

def get_shipment_details(shipment_id, rate_limit: 1.133)
  path = "/fba/outbound/brazil/v0/shipments/#{shipment_id}"

  meter(rate_limit).get(path)
end

#submit_invoice(shipment_id, body, rate_limit: 1.133) ⇒ Hash

Note:

This operation can make a static sandbox call.

Submits a shipment invoice document for a given shipment.

Parameters:

  • shipment_id (String)

    The identifier for the shipment.

  • body (Hash)
  • rate_limit (Float) (defaults to: 1.133)

    Requests per second

Returns:

  • (Hash)

    The API response



41
42
43
44
45
# File 'lib/peddler/api/shipment_invoicing_v0.rb', line 41

def submit_invoice(shipment_id, body, rate_limit: 1.133)
  path = "/fba/outbound/brazil/v0/shipments/#{shipment_id}/invoice"

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