From 13c1956a15d2dc9f7476be2574fd5221f231a626 Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Sat, 26 Oct 2024 21:40:35 +0000 Subject: [PATCH 1/2] Bump version to 1.6.80 --- sp_api/__version__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sp_api/__version__.py b/sp_api/__version__.py index ee1586aa..8e775bfd 100644 --- a/sp_api/__version__.py +++ b/sp_api/__version__.py @@ -1 +1 @@ -__version__ = '1.6.79' +__version__ = '1.6.80' From 8140b80579dc651590cf00ca95134535ef2efe83 Mon Sep 17 00:00:00 2001 From: abrihter Date: Mon, 9 Dec 2024 20:57:21 +0100 Subject: [PATCH 2/2] list_shipment_boxes and update_shipment_tracking_details --- .../fulfillment_inbound.py | 61 +++++++++++++++++++ 1 file changed, 61 insertions(+) diff --git a/sp_api/api/fulfillment_inbound/fulfillment_inbound.py b/sp_api/api/fulfillment_inbound/fulfillment_inbound.py index bf9474ba..b36452b9 100644 --- a/sp_api/api/fulfillment_inbound/fulfillment_inbound.py +++ b/sp_api/api/fulfillment_inbound/fulfillment_inbound.py @@ -1570,3 +1570,64 @@ def set_prep_details(self, **kwargs) -> ApiResponse: return self._request(kwargs.pop('path'), data=kwargs) + @sp_endpoint('/inbound/fba//inboundPlans/{}/shipments/{}/boxes', method='GET') + def list_shipment_boxes(self, inboundPlanId, shipmentId, **kwargs) -> ApiResponse: + """ + list_shipment_boxes(self, **kwargs) -> ApiResponse: + + Provides a paginated list of box packages in a shipment. + +**Usage Plan:** + +| Rate (requests per second) | Burst | +| ---- | ---- | +| 2 | 30 | + +The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have higher rate and burst values than those shown here. For more information, refer to Usage Plans and Rate Limits in the Selling Partner API. + Args: + + pageSize:string | *OPTIONAL Identifier of a shipment. A shipment contains the boxes and units being inbounded. + paginationToken: | *OPTIONAL A token to fetch a certain page when there are multiple pages worth of results. The value of this token is fetched from the pagination returned in the API response. In the absence of the token value from the query parameter the API returns the first page of the result. + + Returns: + ApiResponse: + """ + + return self._request(fill_query_params(kwargs.pop('path'), inboundPlanId, shipmentId), params=kwargs) + + @sp_endpoint('/inbound/fba//inboundPlans/{}/shipments/{}/trackingDetails', method='PUT') + def update_shipment_tracking_details(self, inboundPlanId, shipmentId, **kwargs) -> ApiResponse: + """ + update_shipment_tracking_details(self, **kwargs) -> ApiResponse: + + Updates a shipment's tracking details. + +**Usage Plan:** + +| Rate (requests per second) | Burst | +| ---- | ---- | +| 2 | 2 | + +The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may have higher rate and burst values than those shown here. For more information, refer to Usage Plans and Rate Limits in the Selling Partner API. + Args: + + body: | * REQUIRED { + 'trackingDetails': [ + ltlTrackingDetail: [ + billOfLadingNumber: string, + freightBillNumber: string + ], + spdTrackingDetail: [ + spdTrackingItems:[ + boxId: string, + trackingId: string, + ] + ], + ], + } + + Returns: + ApiResponse: + """ + + return self._request(fill_query_params(kwargs.pop('path'), inboundPlanId, shipmentId), data=kwargs)