lib/peddler/apis/shipment_invoicing_v0.rb in peddler-4.0.1 vs lib/peddler/apis/shipment_invoicing_v0.rb in peddler-4.1.0
- old
+ new
@@ -21,39 +21,42 @@
# @param shipment_id [String] The identifier for the shipment. Get this value from the FBAOutboundShipmentStatus
# notification. For information about subscribing to notifications, see the
# {https://developer-docs.amazon.com/sp-api/docs/notifications-api-v1-use-case-guide Notifications API Use Case
# Guide}.
# @param rate_limit [Float] Requests per second
+ # @param tries [Integer] Total request attempts, including retries
# @return [Peddler::Response] The API response
- def get_shipment_details(shipment_id, rate_limit: 1.133)
+ def get_shipment_details(shipment_id, rate_limit: 1.133, tries: 2)
path = "/fba/outbound/brazil/v0/shipments/#{shipment_id}"
- meter(rate_limit).get(path)
+ meter(rate_limit, tries:).get(path)
end
# Submits a shipment invoice document for a given shipment.
#
# @note This operation can make a static sandbox call.
# @param shipment_id [String] The identifier for the shipment.
# @param body [Hash]
# @param rate_limit [Float] Requests per second
+ # @param tries [Integer] Total request attempts, including retries
# @return [Peddler::Response] The API response
- def submit_invoice(shipment_id, body, rate_limit: 1.133)
+ def submit_invoice(shipment_id, body, rate_limit: 1.133, tries: 2)
path = "/fba/outbound/brazil/v0/shipments/#{shipment_id}/invoice"
- meter(rate_limit).post(path, body:)
+ meter(rate_limit, tries:).post(path, body:)
end
# Returns the invoice status for the shipment you specify.
#
# @note This operation can make a static sandbox call.
# @param shipment_id [String] The shipment identifier for the shipment.
# @param rate_limit [Float] Requests per second
+ # @param tries [Integer] Total request attempts, including retries
# @return [Peddler::Response] The API response
- def get_invoice_status(shipment_id, rate_limit: 1.133)
+ def get_invoice_status(shipment_id, rate_limit: 1.133, tries: 2)
path = "/fba/outbound/brazil/v0/shipments/#{shipment_id}/invoice/status"
- meter(rate_limit).get(path)
+ meter(rate_limit, tries:).get(path)
end
end
end
end