diff --git a/CHANGELOG.md b/CHANGELOG.md index 95942fdc..c26aa856 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ This project adheres to [Semantic Versioning](http://semver.org/). - Allow custom parser - Marketplace.id and Marketplace.ids shorthands +- Add new operations to Fulfillment Inbound v2024-03-20 ## [3.0.0] - 2024-10-04 diff --git a/lib/peddler/api/fulfillment_inbound_2024_03_20.rb b/lib/peddler/api/fulfillment_inbound_2024_03_20.rb index 6d1265f6..67cd2dac 100644 --- a/lib/peddler/api/fulfillment_inbound_2024_03_20.rb +++ b/lib/peddler/api/fulfillment_inbound_2024_03_20.rb @@ -698,9 +698,9 @@ def confirm_transportation_options(inbound_plan_id, body, rate_limit: 2.0) # List the inbound compliance details for MSKUs in a given marketplace. # # @note This operation can make a static sandbox call. - # @param mskus [Array] List of merchant SKUs - a merchant-supplied identifier for a specific SKU. - # @param marketplace_id [String] The Marketplace ID. Refer to [Marketplace - # IDs](https://developer-docs.amazon.com/sp-api/docs/marketplace-ids) for a list of possible values. + # @param mskus [Array] A list of merchant SKUs, a merchant-supplied identifier of a specific SKU. + # @param marketplace_id [String] The Marketplace ID. For a list of possible values, refer to [Marketplace + # IDs](https://developer-docs.amazon.com/sp-api/docs/marketplace-ids). # @param rate_limit [Float] Requests per second # @return [Hash] The API response def list_item_compliance_details(mskus, marketplace_id, rate_limit: 2.0) @@ -713,12 +713,12 @@ def list_item_compliance_details(mskus, marketplace_id, rate_limit: 2.0) meter(rate_limit).get(path, params:) end - # Update compliance details for list of MSKUs. The details provided here are only used for the IN marketplace - # compliance validation. + # Update compliance details for a list of MSKUs. The details provided here are only used for the India (IN - + # A21TJRUUN4KGV) marketplace compliance validation. # # @note This operation can make a static sandbox call. - # @param marketplace_id [String] The Marketplace ID. Refer to [Marketplace - # IDs](https://developer-docs.amazon.com/sp-api/docs/marketplace-ids) for a list of possible values. + # @param marketplace_id [String] The Marketplace ID. For a list of possible values, refer to [Marketplace + # IDs](https://developer-docs.amazon.com/sp-api/docs/marketplace-ids). # @param body [Hash] The body of the request to `updateItemComplianceDetails`. # @param rate_limit [Float] Requests per second # @return [Hash] The API response @@ -731,7 +731,7 @@ def update_item_compliance_details(marketplace_id, body, rate_limit: 2.0) meter(rate_limit).put(path, body:, params:) end - # For a given marketplace - creates labels for a list of mskus. + # For a given marketplace - creates labels for a list of MSKUs. # # @note This operation can make a static sandbox call. # @param body [Hash] The body of the request to `createMarketplaceItemLabels`. @@ -743,6 +743,36 @@ def create_marketplace_item_labels(body, rate_limit: 2.0) meter(rate_limit).post(path, body:) end + # Get preparation details for a list of MSKUs in a specified marketplace. + # + # @note This operation can make a static sandbox call. + # @param marketplace_id [String] The marketplace ID. For a list of possible values, refer to [Marketplace + # IDs](https://developer-docs.amazon.com/sp-api/docs/marketplace-ids). + # @param mskus [Array] A list of merchant SKUs, a merchant-supplied identifier of a specific SKU. + # @param rate_limit [Float] Requests per second + # @return [Hash] The API response + def list_prep_details(marketplace_id, mskus, rate_limit: 2.0) + path = "/inbound/fba/2024-03-20/items/prepDetails" + params = { + "marketplaceId" => marketplace_id, + "mskus" => mskus, + }.compact + + meter(rate_limit).get(path, params:) + end + + # Set the preparation details for a list of MSKUs in a specified marketplace. + # + # @note This operation can make a static sandbox call. + # @param body [Hash] The body of the request to `setPrepDetails`. + # @param rate_limit [Float] Requests per second + # @return [Hash] The API response + def set_prep_details(body, rate_limit: 2.0) + path = "/inbound/fba/2024-03-20/items/prepDetails" + + meter(rate_limit).post(path, body:) + end + # Gets the status of the processing of an asynchronous API call. # # @note This operation can make a static sandbox call. diff --git a/lib/peddler/api/fulfillment_inbound_v0.rb b/lib/peddler/api/fulfillment_inbound_v0.rb index 0dcfdef9..d7a9d2e3 100644 --- a/lib/peddler/api/fulfillment_inbound_v0.rb +++ b/lib/peddler/api/fulfillment_inbound_v0.rb @@ -223,8 +223,15 @@ def confirm_transport(shipment_id, rate_limit: 2.0) # @param label_type [String] The type of labels requested. # @param number_of_packages [Integer] The number of packages in the shipment. # @param package_labels_to_print [Array] A list of identifiers that specify packages for which you want - # package labels printed. Must match CartonId values previously passed using the FBA Inbound Shipment Carton - # Information Feed. If not, the operation returns the IncorrectPackageIdentifier error code. + # package labels printed. If you provide box content information with the [FBA Inbound Shipment Carton + # Information + # Feed](https://developer-docs.amazon.com/sp-api/docs/fulfillment-by-amazon-feed-type-values#fba-inbound-shipment-carton-information-feed), + # then `PackageLabelsToPrint` must match the `CartonId` values you provide through that feed. If you provide box + # content information with the Fulfillment Inbound API v2024-03-20, then `PackageLabelsToPrint` must match the + # `boxID` values from the + # [`listShipmentBoxes`](https://developer-docs.amazon.com/sp-api/docs/fulfillment-inbound-api-v2024-03-20-reference#listshipmentboxes) + # response. If these values do not match as required, the operation returns the `IncorrectPackageIdentifier` + # error code. # @param number_of_pallets [Integer] The number of pallets in the shipment. This returns four identical labels for # each pallet. # @param page_size [Integer] The page size for paginating through the total packages' labels. This is a required