Skip to content

Commit

Permalink
Add new operations to Fulfillment Inbound v2024-03-20
Browse files Browse the repository at this point in the history
  • Loading branch information
hakanensari committed Oct 23, 2024
1 parent 2fd7ab5 commit 2a7e65c
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 10 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
46 changes: 38 additions & 8 deletions lib/peddler/api/fulfillment_inbound_2024_03_20.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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<String>] 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<String>] 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)
Expand All @@ -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
Expand All @@ -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`.
Expand All @@ -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<String>] 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.
Expand Down
11 changes: 9 additions & 2 deletions lib/peddler/api/fulfillment_inbound_v0.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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<String>] 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
Expand Down

0 comments on commit 2a7e65c

Please sign in to comment.