Class: Peddler::APIs::DeliveryByAmazon20220701
- Inherits:
-
Peddler::API
- Object
- Peddler::API
- Peddler::APIs::DeliveryByAmazon20220701
- Defined in:
- lib/peddler/apis/delivery_by_amazon_2022_07_01.rb,
lib/peddler/apis/delivery_by_amazon_2022_07_01/error.rb,
lib/peddler/apis/delivery_by_amazon_2022_07_01/error_list.rb,
lib/peddler/apis/delivery_by_amazon_2022_07_01/invoice_status.rb,
lib/peddler/apis/delivery_by_amazon_2022_07_01/submit_invoice_request.rb,
lib/peddler/apis/delivery_by_amazon_2022_07_01/submit_invoice_response.rb,
lib/peddler/apis/delivery_by_amazon_2022_07_01/get_invoice_status_response.rb,
sig/peddler/apis/delivery_by_amazon_2022_07_01.rbs
Overview
Selling Partner API for Delivery Shipment Invoicing
The Selling Partner API for Delivery Shipment Invoicing helps you programmatically retrieve shipment invoice information in the Brazil Amazon store for a selling partner’s orders.
Defined Under Namespace
Classes: Error, ErrorList, GetInvoiceStatusResponse, InvoiceStatus, SubmitInvoiceRequest, SubmitInvoiceResponse
Constant Summary
Constants inherited from Peddler::API
Peddler::API::TRANSIENT_STATUSES
Instance Attribute Summary
Attributes inherited from Peddler::API
#access_token, #base_url, #endpoint, #retries
Instance Method Summary collapse
-
#get_invoice_status(marketplace_id, invoice_type, program_type, order_id: nil, shipment_id: nil, invoice_id: nil, rate_limit: 1.133) ⇒ Peddler::Response
Returns the invoice status for the order or shipment you specify.
-
#submit_invoice(body, order_id: nil, shipment_id: nil, rate_limit: 1.133) ⇒ Peddler::Response
Submits a shipment invoice for a given order or shipment.
Methods inherited from Peddler::API
#cannot_sandbox!, #delete, #endpoint_uri, #get, #host_header, #http, #initialize, #must_sandbox!, #parse_base_url, #patch, #percent_encode, #post, #put, #request, #sandbox, #sandbox?, #stringify_array, #timestamp, #user_agent
Constructor Details
This class inherits a constructor from Peddler::API
Instance Method Details
#get_invoice_status(marketplace_id, invoice_type, program_type, order_id: nil, shipment_id: nil, invoice_id: nil, rate_limit: 1.133) ⇒ Peddler::Response
This operation can make a static sandbox call.
Returns the invoice status for the order or shipment you specify. You must specify either an orderId,
shipmentId, or invoiceId as a query parameter. If multiple parameters are supplied, orderId takes
precedence over shipmentId, which takes precedence over invoiceId.
48 49 50 51 52 53 54 55 56 57 58 59 60 61 |
# File 'lib/peddler/apis/delivery_by_amazon_2022_07_01.rb', line 48 def get_invoice_status(marketplace_id, invoice_type, program_type, order_id: nil, shipment_id: nil, invoice_id: nil, rate_limit: 1.133) path = "/delivery/2022-07-01/invoice/status" params = { "orderId" => order_id, "shipmentId" => shipment_id, "invoiceId" => invoice_id, "marketplaceId" => marketplace_id, "invoiceType" => invoice_type, "programType" => program_type, }.compact parser = -> { GetInvoiceStatusResponse } get(path, params:, rate_limit:, parser:) end |
#submit_invoice(body, order_id: nil, shipment_id: nil, rate_limit: 1.133) ⇒ Peddler::Response
This operation can make a static sandbox call.
Submits a shipment invoice for a given order or shipment. You must specify either an orderId or shipmentId
as query parameter. If both parameters are supplied, orderId takes precedence over shipmentId.
23 24 25 26 27 28 29 30 31 |
# File 'lib/peddler/apis/delivery_by_amazon_2022_07_01.rb', line 23 def submit_invoice(body, order_id: nil, shipment_id: nil, rate_limit: 1.133) path = "/delivery/2022-07-01/invoice" params = { "orderId" => order_id, "shipmentId" => shipment_id, }.compact parser = -> { SubmitInvoiceResponse } post(path, body:, params:, rate_limit:, parser:) end |