diff --git a/bin/generate-code b/bin/generate-code index 8b539c2c..8c19ef9a 100755 --- a/bin/generate-code +++ b/bin/generate-code @@ -99,6 +99,8 @@ module Generator code = operation["responses"].keys.find { |code| code.start_with?("2") } static_sandbox = operation["responses"][code]&.delete("x-amzn-api-sandbox")&.fetch("static") + rate_limit = extract_rate_limit(operation["description"]) + operation_parameters = (shared_parameters + (operation["parameters"] || [])).uniq { |p| p["name"] } parameters = operation_parameters.select { |p| p["name"] } parameters << { @@ -106,10 +108,10 @@ module Generator "type" => "Float", "required" => false, "description" => "Requests per second", - "default" => (rate_limit = extract_rate_limit(operation)), + "default" => rate_limit, } - operation.merge( + "description" => clean_description(operation["description"]), "path" => path, "method" => method.upcase, "rate_limit" => rate_limit, @@ -225,20 +227,15 @@ module Generator lines.join("\n").strip end - def generate_method_docs(description, parameters) - cleaned_description = clean_description(description) - formatted_description = format_text(cleaned_description, 6) + def generate_method_docs(operation) + formatted_description = format_text(operation["description"], 6) - if parameters.empty? - formatted_description - else - param_docs = generate_parameter_docs(parameters) - "#{formatted_description}\n#\n#{param_docs}" - end + param_docs = generate_parameter_docs(operation) + "#{formatted_description}\n#\n#{param_docs}" end - def generate_parameter_docs(parameters) - parameters.map do |param| + def generate_parameter_docs(operation) + output = operation["parameters"].map do |param| param_type = param["type"] ? param["type"].capitalize : "Object" param_type = "Hash" if param["schema"] if param_type == "Array" @@ -250,11 +247,21 @@ module Generator param_description = convert_links_to_markdown(param_description) end format_text("@param [#{param_type}] #{snakecase(param["name"])} #{param_description}", 6) - end.join("\n") + end + + if operation["sandbox_only"] + output.unshift(format_text("@note This operation is sandbox-only.", 6)) + end + if operation["static_sandbox"] + output.unshift(format_text("@note This operation can make a static sandbox call.", 6)) + elsif operation["dynamic_sandbox"] + output.unshift(format_text("@note This operation can make a dynamic sandbox call.", 6)) + end + + output.join("\n") end - def extract_rate_limit(operation) - description = operation["description"] + def extract_rate_limit(description) return unless description # Match rate limit from tables with or without "Plan type" column diff --git a/bin/templates/api.rb.erb b/bin/templates/api.rb.erb index f072b7d0..b1262c86 100644 --- a/bin/templates/api.rb.erb +++ b/bin/templates/api.rb.erb @@ -7,10 +7,10 @@ class API <%= format_text(model["info"]["description"], 4) %> class <%= api_data[:class_name] %> < API <% operations.each do |operation| %> - <%= generate_method_docs(operation["description"], operation["parameters"]) %> + <%= generate_method_docs(operation) %> # @return [Hash] The API response def <%= snakecase(operation["operationId"]) %><%= generate_parameters(operation["parameters"], snakecase(operation["operationId"]), 6) %> - <% unless operation["dynamic_sandbox"] -%> + <% if !operation["static_sandbox"] && !operation["dynamic_sandbox"] -%> cannot_sandbox! <% end %> path = "<%= operation["path"] %>" diff --git a/lib/peddler/api/amazon_warehousing_and_distribution_2024_05_09.rb b/lib/peddler/api/amazon_warehousing_and_distribution_2024_05_09.rb index 0889fa26..85658576 100644 --- a/lib/peddler/api/amazon_warehousing_and_distribution_2024_05_09.rb +++ b/lib/peddler/api/amazon_warehousing_and_distribution_2024_05_09.rb @@ -11,14 +11,13 @@ class API class AmazonWarehousingAndDistribution20240509 < API # Retrieves an AWD inbound shipment. # + # @note This operation can make a static sandbox call. # @param [String] shipment_id ID for the shipment. A shipment contains the cases being inbounded. # @param [String] sku_quantities If equal to `SHOW`, the response includes the shipment SKU quantity details. # Defaults to `HIDE`, in which case the response does not contain SKU quantities # @param [Float] rate_limit Requests per second # @return [Hash] The API response def get_inbound_shipment(shipment_id, sku_quantities: nil, rate_limit: 2.0) - cannot_sandbox! - path = "/awd/2024-05-09/inboundShipments/#{shipment_id}" params = { "skuQuantities" => sku_quantities, @@ -30,6 +29,7 @@ def get_inbound_shipment(shipment_id, sku_quantities: nil, rate_limit: 2.0) # Retrieves a summary of all the inbound AWD shipments associated with a merchant, with the ability to apply # optional filters. # + # @note This operation can make a static sandbox call. # @param [String] sort_by Field to sort results by. By default, the response will be sorted by UPDATED_AT. # @param [String] sort_order Sort the response in ASCENDING or DESCENDING order. By default, the response will be # sorted in DESCENDING order. @@ -44,7 +44,6 @@ def get_inbound_shipment(shipment_id, sku_quantities: nil, rate_limit: 2.0) # @return [Hash] The API response def list_inbound_shipments(sort_by: nil, sort_order: nil, shipment_status: nil, updated_after: nil, updated_before: nil, max_results: 25, next_token: nil, rate_limit: 1.0) - cannot_sandbox! path = "/awd/2024-05-09/inboundShipments" params = { @@ -62,6 +61,7 @@ def list_inbound_shipments(sort_by: nil, sort_order: nil, shipment_status: nil, # Lists AWD inventory associated with a merchant with the ability to apply optional filters. # + # @note This operation can make a static sandbox call. # @param [String] sku Filter by seller or merchant SKU for the item. # @param [String] sort_order Sort the response in `ASCENDING` or `DESCENDING` order. # @param [String] details Set to `SHOW` to return summaries with additional inventory details. Defaults to `HIDE,` @@ -71,8 +71,6 @@ def list_inbound_shipments(sort_by: nil, sort_order: nil, shipment_status: nil, # @param [Float] rate_limit Requests per second # @return [Hash] The API response def list_inventory(sku: nil, sort_order: nil, details: nil, next_token: nil, max_results: 25, rate_limit: 2.0) - cannot_sandbox! - path = "/awd/2024-05-09/inventory" params = { "sku" => sku, diff --git a/lib/peddler/api/catalog_items_2020_12_01.rb b/lib/peddler/api/catalog_items_2020_12_01.rb index 34d03e40..0394c59b 100644 --- a/lib/peddler/api/catalog_items_2020_12_01.rb +++ b/lib/peddler/api/catalog_items_2020_12_01.rb @@ -12,6 +12,7 @@ class API class CatalogItems20201201 < API # Search for and return a list of Amazon catalog items and associated information. # + # @note This operation can make a static sandbox call. # @param [Array] keywords A comma-delimited list of words or item identifiers to search the Amazon catalog # for. # @param [Array] marketplace_ids A comma-delimited list of Amazon marketplace identifiers for the request. @@ -30,7 +31,6 @@ class CatalogItems20201201 < API # @return [Hash] The API response def search_catalog_items(keywords, marketplace_ids, included_data: "summaries", brand_names: nil, classification_ids: nil, page_size: 10, page_token: nil, keywords_locale: nil, locale: nil, rate_limit: 2.0) - cannot_sandbox! path = "/catalog/2020-12-01/items" params = { @@ -50,6 +50,7 @@ def search_catalog_items(keywords, marketplace_ids, included_data: "summaries", # Retrieves details for an item in the Amazon catalog. # + # @note This operation can make a static sandbox call. # @param [String] asin The Amazon Standard Identification Number (ASIN) of the item. # @param [Array] marketplace_ids A comma-delimited list of Amazon marketplace identifiers. Data sets in # the response contain data only for the specified marketplaces. @@ -60,8 +61,6 @@ def search_catalog_items(keywords, marketplace_ids, included_data: "summaries", # @param [Float] rate_limit Requests per second # @return [Hash] The API response def get_catalog_item(asin, marketplace_ids, included_data: "summaries", locale: nil, rate_limit: 2.0) - cannot_sandbox! - path = "/catalog/2020-12-01/items/#{asin}" params = { "marketplaceIds" => marketplace_ids, diff --git a/lib/peddler/api/catalog_items_2022_04_01.rb b/lib/peddler/api/catalog_items_2022_04_01.rb index b3b91b00..24774af6 100644 --- a/lib/peddler/api/catalog_items_2022_04_01.rb +++ b/lib/peddler/api/catalog_items_2022_04_01.rb @@ -13,6 +13,7 @@ class CatalogItems20220401 < API # Search for and return a list of Amazon catalog items and associated information either by identifier or by # keywords. # + # @note This operation can make a static sandbox call. # @param [Array] identifiers A comma-delimited list of product identifiers to search the Amazon catalog # for. **Note:** Cannot be used with `keywords`. # @param [String] identifiers_type Type of product identifiers to search the Amazon catalog for. **Note:** @@ -41,7 +42,6 @@ def search_catalog_items( seller_id: nil, keywords: nil, brand_names: nil, classification_ids: nil, page_size: 10, page_token: nil, keywords_locale: nil, rate_limit: 2.0 ) - cannot_sandbox! path = "/catalog/2022-04-01/items" params = { @@ -64,6 +64,7 @@ def search_catalog_items( # Retrieves details for an item in the Amazon catalog. # + # @note This operation can make a static sandbox call. # @param [String] asin The Amazon Standard Identification Number (ASIN) of the item. # @param [Array] marketplace_ids A comma-delimited list of Amazon marketplace identifiers. Data sets in # the response contain data only for the specified marketplaces. @@ -74,8 +75,6 @@ def search_catalog_items( # @param [Float] rate_limit Requests per second # @return [Hash] The API response def get_catalog_item(asin, marketplace_ids, included_data: ["summaries"], locale: nil, rate_limit: 2.0) - cannot_sandbox! - path = "/catalog/2022-04-01/items/#{asin}" params = { "marketplaceIds" => marketplace_ids, diff --git a/lib/peddler/api/catalog_items_v0.rb b/lib/peddler/api/catalog_items_v0.rb index 1ddbe3e5..d6feebc8 100644 --- a/lib/peddler/api/catalog_items_v0.rb +++ b/lib/peddler/api/catalog_items_v0.rb @@ -16,6 +16,7 @@ class CatalogItemsV0 < API # to avoid service disruption. _Note:_ The [`listCatalogCategories`](#get-catalogv0categories) operation is not # being deprecated and you can continue to make calls to it. # + # @note This operation can make a static sandbox call. # @param [String] marketplace_id A marketplace identifier. Specifies the marketplace for which items are returned. # @param [String] query Keyword(s) to use to search for items in the catalog. Example: 'harry potter books'. # @param [String] query_context_id An identifier for the context within which the given search will be performed. @@ -35,7 +36,6 @@ class CatalogItemsV0 < API # @return [Hash] The API response def list_catalog_items(marketplace_id, query: nil, query_context_id: nil, seller_sku: nil, upc: nil, ean: nil, isbn: nil, jan: nil, rate_limit: nil) - cannot_sandbox! path = "/catalog/v0/items" params = { @@ -59,13 +59,12 @@ def list_catalog_items(marketplace_id, query: nil, query_context_id: nil, seller # [`listCatalogCategories`](#get-catalogv0categories) operation is not being deprecated and you can continue to # make calls to it. # + # @note This operation can make a static sandbox call. # @param [String] marketplace_id A marketplace identifier. Specifies the marketplace for the item. # @param [String] asin The Amazon Standard Identification Number (ASIN) of the item. # @param [Float] rate_limit Requests per second # @return [Hash] The API response def get_catalog_item(marketplace_id, asin, rate_limit: nil) - cannot_sandbox! - path = "/catalog/v0/items/#{asin}" params = { "MarketplaceId" => marketplace_id, @@ -76,6 +75,7 @@ def get_catalog_item(marketplace_id, asin, rate_limit: nil) # Returns the parent categories to which an item belongs, based on the specified ASIN or SellerSKU. # + # @note This operation can make a static sandbox call. # @param [String] marketplace_id A marketplace identifier. Specifies the marketplace for the item. # @param [String] asin The Amazon Standard Identification Number (ASIN) of the item. # @param [String] seller_sku Used to identify items in the given marketplace. SellerSKU is qualified by the @@ -83,8 +83,6 @@ def get_catalog_item(marketplace_id, asin, rate_limit: nil) # @param [Float] rate_limit Requests per second # @return [Hash] The API response def list_catalog_categories(marketplace_id, asin: nil, seller_sku: nil, rate_limit: 1.0) - cannot_sandbox! - path = "/catalog/v0/categories" params = { "MarketplaceId" => marketplace_id, diff --git a/lib/peddler/api/data_kiosk_2023_11_15.rb b/lib/peddler/api/data_kiosk_2023_11_15.rb index 06f98209..ac1a909a 100644 --- a/lib/peddler/api/data_kiosk_2023_11_15.rb +++ b/lib/peddler/api/data_kiosk_2023_11_15.rb @@ -12,6 +12,7 @@ class DataKiosk20231115 < API # Returns details for the Data Kiosk queries that match the specified filters. See the `createQuery` operation for # details about query retention. # + # @note This operation can make a static sandbox call. # @param [Array] processing_statuses A list of processing statuses used to filter queries. # @param [Integer] page_size The maximum number of queries to return in a single call. # @param [String] created_since The earliest query creation date and time for queries to include in the response, @@ -27,7 +28,6 @@ class DataKiosk20231115 < API # @return [Hash] The API response def get_queries(processing_statuses: nil, page_size: 10, created_since: nil, created_until: nil, pagination_token: nil, rate_limit: 0.0222) - cannot_sandbox! path = "/dataKiosk/2023-11-15/queries" params = { @@ -47,12 +47,11 @@ def get_queries(processing_statuses: nil, page_size: 10, created_since: nil, cre # a query contains multiple fields with different retentions, the shortest (minimum) retention is applied. The # retention of a query's resulting documents always matches the retention of the query. # + # @note This operation can make a static sandbox call. # @param [Hash] body The body of the request. # @param [Float] rate_limit Requests per second # @return [Hash] The API response def create_query(body, rate_limit: 0.0167) - cannot_sandbox! - path = "/dataKiosk/2023-11-15/queries" meter(rate_limit).post(path, body:) @@ -63,13 +62,12 @@ def create_query(body, rate_limit: 0.0167) # `CANCELLED` will no-op. Cancelled queries are returned in subsequent calls to the `getQuery` and `getQueries` # operations. # + # @note This operation can make a static sandbox call. # @param [String] query_id The identifier for the query. This identifier is unique only in combination with a # selling partner account ID. # @param [Float] rate_limit Requests per second # @return [Hash] The API response def cancel_query(query_id, rate_limit: 0.0222) - cannot_sandbox! - path = "/dataKiosk/2023-11-15/queries/#{query_id}" meter(rate_limit).delete(path) @@ -78,12 +76,11 @@ def cancel_query(query_id, rate_limit: 0.0222) # Returns query details for the query specified by the `queryId` parameter. See the `createQuery` operation for # details about query retention. # + # @note This operation can make a static sandbox call. # @param [String] query_id The query identifier. # @param [Float] rate_limit Requests per second # @return [Hash] The API response def get_query(query_id, rate_limit: 2.0) - cannot_sandbox! - path = "/dataKiosk/2023-11-15/queries/#{query_id}" meter(rate_limit).get(path) @@ -92,12 +89,11 @@ def get_query(query_id, rate_limit: 2.0) # Returns the information required for retrieving a Data Kiosk document's contents. See the `createQuery` # operation for details about document retention. # + # @note This operation can make a static sandbox call. # @param [String] document_id The identifier for the Data Kiosk document. # @param [Float] rate_limit Requests per second # @return [Hash] The API response def get_document(document_id, rate_limit: 0.0167) - cannot_sandbox! - path = "/dataKiosk/2023-11-15/documents/#{document_id}" meter(rate_limit).get(path) diff --git a/lib/peddler/api/easy_ship_2022_03_23.rb b/lib/peddler/api/easy_ship_2022_03_23.rb index b0efe199..ee61a2f4 100644 --- a/lib/peddler/api/easy_ship_2022_03_23.rb +++ b/lib/peddler/api/easy_ship_2022_03_23.rb @@ -19,12 +19,11 @@ class EasyShip20220323 < API # slots that have either pickup or drop-off handover methods - see **Supported Handover Methods** in the # [Marketplace Support Table](doc:easyship-api-v2022-03-23-use-case-guide#marketplace-support-table). # + # @note This operation can make a static sandbox call. # @param [Hash] list_handover_slots_request The request schema for the `listHandoverSlots` operation. # @param [Float] rate_limit Requests per second # @return [Hash] The API response def list_handover_slots(list_handover_slots_request: nil, rate_limit: 1.0) - cannot_sandbox! - path = "/easyShip/2022-03-23/timeSlot" body = list_handover_slots_request @@ -34,14 +33,13 @@ def list_handover_slots(list_handover_slots_request: nil, rate_limit: 1.0) # Returns information about a package, including dimensions, weight, time slot information for handover, invoice # and item information, and status. # + # @note This operation can make a static sandbox call. # @param [String] amazon_order_id An Amazon-defined order identifier. Identifies the order that the seller wants # to deliver using Amazon Easy Ship. # @param [String] marketplace_id An identifier for the marketplace in which the seller is selling. # @param [Float] rate_limit Requests per second # @return [Hash] The API response def get_scheduled_package(amazon_order_id, marketplace_id, rate_limit: 1.0) - cannot_sandbox! - path = "/easyShip/2022-03-23/package" params = { "amazonOrderId" => amazon_order_id, @@ -62,12 +60,11 @@ def get_scheduled_package(amazon_order_id, marketplace_id, rate_limit: 1.0) # Table](doc:easyship-api-v2022-03-23-use-case-guide#marketplace-support-table) to see which documents are # supported in each marketplace. # + # @note This operation can make a static sandbox call. # @param [Hash] create_scheduled_package_request The request schema for the `createScheduledPackage` operation. # @param [Float] rate_limit Requests per second # @return [Hash] The API response def create_scheduled_package(create_scheduled_package_request, rate_limit: 1.0) - cannot_sandbox! - path = "/easyShip/2022-03-23/package" body = create_scheduled_package_request @@ -80,12 +77,11 @@ def create_scheduled_package(create_scheduled_package_request, rate_limit: 1.0) # Table](doc:easyship-api-v2022-03-23-use-case-guide#marketplace-support-table) to see which marketplaces this # operation is supported in. # + # @note This operation can make a static sandbox call. # @param [Hash] update_scheduled_packages_request The request schema for the `updateScheduledPackages` operation. # @param [Float] rate_limit Requests per second # @return [Hash] The API response def update_scheduled_packages(update_scheduled_packages_request: nil, rate_limit: 1.0) - cannot_sandbox! - path = "/easyShip/2022-03-23/package" body = update_scheduled_packages_request @@ -106,13 +102,12 @@ def update_scheduled_packages(update_scheduled_packages_request: nil, rate_limit # we couldn't process. Each entry is composed of an error message describing the reason of the failure, so that # sellers can take action. The table below displays the supported request and burst maximum rates: # + # @note This operation can make a static sandbox call. # @param [Hash] create_scheduled_packages_request The request schema for the `createScheduledPackageBulk` # operation. # @param [Float] rate_limit Requests per second # @return [Hash] The API response def create_scheduled_package_bulk(create_scheduled_packages_request, rate_limit: 1.0) - cannot_sandbox! - path = "/easyShip/2022-03-23/packages/bulk" body = create_scheduled_packages_request diff --git a/lib/peddler/api/fba_inbound_eligibility_v1.rb b/lib/peddler/api/fba_inbound_eligibility_v1.rb index ee80711c..e29c8025 100644 --- a/lib/peddler/api/fba_inbound_eligibility_v1.rb +++ b/lib/peddler/api/fba_inbound_eligibility_v1.rb @@ -16,6 +16,7 @@ class FBAInboundEligibilityV1 < API # preview that you want (INBOUND or COMMINGLING). For INBOUND previews, you can specify the marketplace in which # you want to determine the item's eligibility. # + # @note This operation can make a static sandbox call. # @param [Array] marketplace_ids The identifier for the marketplace in which you want to determine # eligibility. Required only when program=INBOUND. # @param [String] asin The ASIN of the item for which you want an eligibility preview. @@ -23,8 +24,6 @@ class FBAInboundEligibilityV1 < API # @param [Float] rate_limit Requests per second # @return [Hash] The API response def get_item_eligibility_preview(asin, program, marketplace_ids: nil, rate_limit: 1.0) - cannot_sandbox! - path = "/fba/inbound/v1/eligibility/itemPreview" params = { "marketplaceIds" => marketplace_ids, diff --git a/lib/peddler/api/fba_inventory_v1.rb b/lib/peddler/api/fba_inventory_v1.rb index 53b9ef27..ebca585a 100644 --- a/lib/peddler/api/fba_inventory_v1.rb +++ b/lib/peddler/api/fba_inventory_v1.rb @@ -25,6 +25,7 @@ class FBAInventoryV1 < API # operation. Selling partners whose business demands require higher throughput may see higher rate and burst # values than those shown here. For more information, see Usage Plans and Rate Limits in the Selling Partner API. # + # @note This operation can make a dynamic sandbox call. # @param [Boolean] details true to return inventory summaries with additional summarized inventory details and # quantities. Otherwise, returns inventory summaries only (default value). # @param [String] granularity_type The granularity type for the inventory aggregation level. @@ -64,6 +65,8 @@ def get_inventory_summaries(granularity_type, granularity_id, marketplace_ids, d # sandbox-only operation and must be directed to a sandbox endpoint. Refer to [Selling Partner API # sandbox](https://developer-docs.amazon.com/sp-api/docs/the-selling-partner-api-sandbox) for more information. # + # @note This operation can make a dynamic sandbox call. + # @note This operation is sandbox-only. # @param [Hash] create_inventory_item_request_body CreateInventoryItem Request Body Parameter. # @param [Float] rate_limit Requests per second # @return [Hash] The API response @@ -78,6 +81,8 @@ def create_inventory_item(create_inventory_item_request_body, rate_limit: nil) # sandbox-only operation and must be directed to a sandbox endpoint. Refer to [Selling Partner API # sandbox](https://developer-docs.amazon.com/sp-api/docs/the-selling-partner-api-sandbox) for more information. # + # @note This operation can make a dynamic sandbox call. + # @note This operation is sandbox-only. # @param [String] seller_sku A single seller SKU used for querying the specified seller SKU inventory summaries. # @param [String] marketplace_id The marketplace ID for the marketplace for which the sellerSku is to be deleted. # @param [Float] rate_limit Requests per second @@ -96,6 +101,8 @@ def delete_inventory_item(seller_sku, marketplace_id, rate_limit: nil) # Partner API sandbox](https://developer-docs.amazon.com/sp-api/docs/the-selling-partner-api-sandbox) for more # information. # + # @note This operation can make a dynamic sandbox call. + # @note This operation is sandbox-only. # @param [String] x_amzn_idempotency_token A unique token/requestId provided with each call to ensure idempotency. # @param [Hash] add_inventory_request_body List of items to add to Sandbox inventory. # @param [Float] rate_limit Requests per second diff --git a/lib/peddler/api/feeds_2021_06_30.rb b/lib/peddler/api/feeds_2021_06_30.rb index fbe4c199..5320340e 100644 --- a/lib/peddler/api/feeds_2021_06_30.rb +++ b/lib/peddler/api/feeds_2021_06_30.rb @@ -10,6 +10,7 @@ class API class Feeds20210630 < API # Returns feed details for the feeds that match the filters that you specify. # + # @note This operation can make a static sandbox call. # @param [Array] feed_types A list of feed types used to filter feeds. When feedTypes is provided, the # other filter parameters (processingStatuses, marketplaceIds, createdSince, createdUntil) and pageSize may also # be provided. Either feedTypes or nextToken is required. @@ -29,7 +30,6 @@ class Feeds20210630 < API # @return [Hash] The API response def get_feeds(feed_types: nil, marketplace_ids: nil, page_size: 10, processing_statuses: nil, created_since: nil, created_until: nil, next_token: nil, rate_limit: 0.0222) - cannot_sandbox! path = "/feeds/2021-06-30/feeds" params = { @@ -47,12 +47,11 @@ def get_feeds(feed_types: nil, marketplace_ids: nil, page_size: 10, processing_s # Creates a feed. Upload the contents of the feed document before calling this operation. # + # @note This operation can make a static sandbox call. # @param [Hash] body Information required to create the feed. # @param [Float] rate_limit Requests per second # @return [Hash] The API response def create_feed(body, rate_limit: 0.0083) - cannot_sandbox! - path = "/feeds/2021-06-30/feeds" meter(rate_limit).post(path, body:) @@ -63,13 +62,12 @@ def create_feed(body, rate_limit: 0.0083) # [`getFeed`](https://developer-docs.amazon.com/sp-api/docs/feeds-api-v2021-06-30-reference#getfeed) and # [`getFeeds`](https://developer-docs.amazon.com/sp-api/docs/feeds-api-v2021-06-30-reference#getfeeds) operations. # + # @note This operation can make a static sandbox call. # @param [String] feed_id The identifier for the feed. This identifier is unique only in combination with a seller # ID. # @param [Float] rate_limit Requests per second # @return [Hash] The API response def cancel_feed(feed_id, rate_limit: 2.0) - cannot_sandbox! - path = "/feeds/2021-06-30/feeds/#{feed_id}" meter(rate_limit).delete(path) @@ -77,13 +75,12 @@ def cancel_feed(feed_id, rate_limit: 2.0) # Returns feed details (including the `resultDocumentId`, if available) for the feed that you specify. # + # @note This operation can make a static sandbox call. # @param [String] feed_id The identifier for the feed. This identifier is unique only in combination with a seller # ID. # @param [Float] rate_limit Requests per second # @return [Hash] The API response def get_feed(feed_id, rate_limit: 2.0) - cannot_sandbox! - path = "/feeds/2021-06-30/feeds/#{feed_id}" meter(rate_limit).get(path) @@ -94,12 +91,11 @@ def get_feed(feed_id, rate_limit: 2.0) # to the [`createFeed`](https://developer-docs.amazon.com/sp-api/docs/feeds-api-v2021-06-30-reference#createfeed) # operation. # + # @note This operation can make a static sandbox call. # @param [Hash] body Specifies the content type for the createFeedDocument operation. # @param [Float] rate_limit Requests per second # @return [Hash] The API response def create_feed_document(body, rate_limit: 0.5) - cannot_sandbox! - path = "/feeds/2021-06-30/documents" meter(rate_limit).post(path, body:) @@ -107,12 +103,11 @@ def create_feed_document(body, rate_limit: 0.5) # Returns the information required for retrieving a feed document's contents. # + # @note This operation can make a static sandbox call. # @param [String] feed_document_id The identifier of the feed document. # @param [Float] rate_limit Requests per second # @return [Hash] The API response def get_feed_document(feed_document_id, rate_limit: 0.0222) - cannot_sandbox! - path = "/feeds/2021-06-30/documents/#{feed_document_id}" meter(rate_limit).get(path) diff --git a/lib/peddler/api/finances_v0.rb b/lib/peddler/api/finances_v0.rb index 5787cdc8..ce5b4bc0 100644 --- a/lib/peddler/api/finances_v0.rb +++ b/lib/peddler/api/finances_v0.rb @@ -13,6 +13,7 @@ class FinancesV0 < API # Returns financial event groups for a given date range. It may take up to 48 hours for orders to appear in your # financial events. # + # @note This operation can make a static sandbox call. # @param [Integer] max_results_per_page The maximum number of results to return per page. If the response exceeds # the maximum number of transactions or 10 MB, the API responds with 'InvalidInput'. # @param [String] financial_event_group_started_before A date used for selecting financial event groups that @@ -29,7 +30,6 @@ class FinancesV0 < API # @return [Hash] The API response def list_financial_event_groups(max_results_per_page: 100, financial_event_group_started_before: nil, financial_event_group_started_after: nil, next_token: nil, rate_limit: 0.5) - cannot_sandbox! path = "/finances/v0/financialEventGroups" params = { @@ -47,6 +47,7 @@ def list_financial_event_groups(max_results_per_page: 100, financial_event_group # @note This operation will only retrieve group's data for the past two years. If a request is submitted for data # spanning more than two years, an empty response is returned. # + # @note This operation can make a static sandbox call. # @param [Integer] max_results_per_page The maximum number of results to return per page. If the response exceeds # the maximum number of transactions or 10 MB, the API responds with 'InvalidInput'. # @param [String] posted_after A date used for selecting financial events posted after (or at) a specified time. @@ -64,7 +65,6 @@ def list_financial_event_groups(max_results_per_page: 100, financial_event_group # @return [Hash] The API response def list_financial_events_by_group_id(event_group_id, max_results_per_page: 100, posted_after: nil, posted_before: nil, next_token: nil, rate_limit: 0.5) - cannot_sandbox! path = "/finances/v0/financialEventGroups/#{event_group_id}/financialEvents" params = { @@ -80,6 +80,7 @@ def list_financial_events_by_group_id(event_group_id, max_results_per_page: 100, # Returns all financial events for the specified order. It may take up to 48 hours for orders to appear in your # financial events. # + # @note This operation can make a static sandbox call. # @param [String] order_id An Amazon-defined order identifier, in 3-7-7 format. # @param [Integer] max_results_per_page The maximum number of results to return per page. If the response exceeds # the maximum number of transactions or 10 MB, the API responds with 'InvalidInput'. @@ -87,8 +88,6 @@ def list_financial_events_by_group_id(event_group_id, max_results_per_page: 100, # @param [Float] rate_limit Requests per second # @return [Hash] The API response def list_financial_events_by_order_id(order_id, max_results_per_page: 100, next_token: nil, rate_limit: 0.5) - cannot_sandbox! - path = "/finances/v0/orders/#{order_id}/financialEvents" params = { "MaxResultsPerPage" => max_results_per_page, @@ -102,6 +101,7 @@ def list_financial_events_by_order_id(order_id, max_results_per_page: 100, next_ # financial events. # @note in `ListFinancialEvents`, deferred events don't show up in responses until in they are released. # + # @note This operation can make a static sandbox call. # @param [Integer] max_results_per_page The maximum number of results to return per page. If the response exceeds # the maximum number of transactions or 10 MB, the API responds with 'InvalidInput'. # @param [String] posted_after A date used for selecting financial events posted after (or at) a specified time. @@ -117,7 +117,6 @@ def list_financial_events_by_order_id(order_id, max_results_per_page: 100, next_ # @return [Hash] The API response def list_financial_events(max_results_per_page: 100, posted_after: nil, posted_before: nil, next_token: nil, rate_limit: 0.5) - cannot_sandbox! path = "/finances/v0/financialEvents" params = { diff --git a/lib/peddler/api/fulfillment_inbound_2024_03_20.rb b/lib/peddler/api/fulfillment_inbound_2024_03_20.rb index d561b8e5..9e611121 100644 --- a/lib/peddler/api/fulfillment_inbound_2024_03_20.rb +++ b/lib/peddler/api/fulfillment_inbound_2024_03_20.rb @@ -12,6 +12,7 @@ class API class FulfillmentInbound20240320 < API # Provides a list of inbound plans with minimal information. # + # @note This operation can make a static sandbox call. # @param [Integer] page_size The number of inbound plans to return in the response matching the given query. # @param [String] pagination_token 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 @@ -23,7 +24,6 @@ class FulfillmentInbound20240320 < API # @return [Hash] The API response def list_inbound_plans(page_size: 10, pagination_token: nil, status: nil, sort_by: nil, sort_order: nil, rate_limit: 2.0) - cannot_sandbox! path = "/inbound/fba/2024-03-20/inboundPlans" params = { @@ -40,12 +40,11 @@ def list_inbound_plans(page_size: 10, pagination_token: nil, status: nil, sort_b # Creates an inbound plan. An inbound plan contains all the necessary information to send shipments into Amazon's # fufillment network. # + # @note This operation can make a static sandbox call. # @param [Hash] body The body of the request to `createInboundPlan`. # @param [Float] rate_limit Requests per second # @return [Hash] The API response def create_inbound_plan(body, rate_limit: 2.0) - cannot_sandbox! - path = "/inbound/fba/2024-03-20/inboundPlans" meter(rate_limit).post(path, body:) @@ -53,12 +52,11 @@ def create_inbound_plan(body, rate_limit: 2.0) # Fetches the top level information about an inbound plan. # + # @note This operation can make a static sandbox call. # @param [String] inbound_plan_id Identifier of an inbound plan. # @param [Float] rate_limit Requests per second # @return [Hash] The API response def get_inbound_plan(inbound_plan_id, rate_limit: 2.0) - cannot_sandbox! - path = "/inbound/fba/2024-03-20/inboundPlans/#{inbound_plan_id}" meter(rate_limit).get(path) @@ -66,6 +64,7 @@ def get_inbound_plan(inbound_plan_id, rate_limit: 2.0) # Provides a paginated list of box packages in an inbound plan. # + # @note This operation can make a static sandbox call. # @param [String] inbound_plan_id Identifier of an inbound plan. # @param [Integer] page_size The number of boxes to return in the response matching the given query. # @param [String] pagination_token A token to fetch a certain page when there are multiple pages worth of results. @@ -74,8 +73,6 @@ def get_inbound_plan(inbound_plan_id, rate_limit: 2.0) # @param [Float] rate_limit Requests per second # @return [Hash] The API response def list_inbound_plan_boxes(inbound_plan_id, page_size: 10, pagination_token: nil, rate_limit: 2.0) - cannot_sandbox! - path = "/inbound/fba/2024-03-20/inboundPlans/#{inbound_plan_id}/boxes" params = { "pageSize" => page_size, @@ -89,12 +86,11 @@ def list_inbound_plan_boxes(inbound_plan_id, page_size: 10, pagination_token: ni # for Amazon Partnered Carriers is 24 hours for Small Parcel Delivery (SPD) and one hour for Less-Than-Truckload # (LTL) carrier shipments. # + # @note This operation can make a static sandbox call. # @param [String] inbound_plan_id Identifier of an inbound plan. # @param [Float] rate_limit Requests per second # @return [Hash] The API response def cancel_inbound_plan(inbound_plan_id, rate_limit: 2.0) - cannot_sandbox! - path = "/inbound/fba/2024-03-20/inboundPlans/#{inbound_plan_id}/cancellation" meter(rate_limit).put(path) @@ -102,6 +98,7 @@ def cancel_inbound_plan(inbound_plan_id, rate_limit: 2.0) # Provides a paginated list of item packages in an inbound plan. # + # @note This operation can make a static sandbox call. # @param [String] inbound_plan_id Identifier of an inbound plan. # @param [Integer] page_size The number of items to return in the response matching the given query. # @param [String] pagination_token A token to fetch a certain page when there are multiple pages worth of results. @@ -110,8 +107,6 @@ def cancel_inbound_plan(inbound_plan_id, rate_limit: 2.0) # @param [Float] rate_limit Requests per second # @return [Hash] The API response def list_inbound_plan_items(inbound_plan_id, page_size: 10, pagination_token: nil, rate_limit: 2.0) - cannot_sandbox! - path = "/inbound/fba/2024-03-20/inboundPlans/#{inbound_plan_id}/items" params = { "pageSize" => page_size, @@ -123,13 +118,12 @@ def list_inbound_plan_items(inbound_plan_id, page_size: 10, pagination_token: ni # Updates the name of an existing inbound plan. # + # @note This operation can make a static sandbox call. # @param [String] inbound_plan_id Identifier of an inbound plan. # @param [Hash] body The body of the request to `updateInboundPlanName`. # @param [Float] rate_limit Requests per second # @return [Hash] The API response def update_inbound_plan_name(inbound_plan_id, body, rate_limit: 2.0) - cannot_sandbox! - path = "/inbound/fba/2024-03-20/inboundPlans/#{inbound_plan_id}/name" meter(rate_limit).put(path, body:) @@ -139,6 +133,7 @@ def update_inbound_plan_name(inbound_plan_id, body, rate_limit: 2.0) # `setPackingInformation` operation. This API is used for workflows where boxes are packed before Amazon # determines shipment splits. # + # @note This operation can make a static sandbox call. # @param [String] inbound_plan_id Identifier of an inbound plan. # @param [String] packing_group_id Identifier of a packing group. # @param [Integer] page_size The number of packing group boxes to return in the response matching the given query. @@ -149,7 +144,6 @@ def update_inbound_plan_name(inbound_plan_id, body, rate_limit: 2.0) # @return [Hash] The API response def list_packing_group_boxes(inbound_plan_id, packing_group_id, page_size: 10, pagination_token: nil, rate_limit: 2.0) - cannot_sandbox! path = "/inbound/fba/2024-03-20/inboundPlans/#{inbound_plan_id}/packingGroups/#{packing_group_id}/boxes" params = { @@ -163,6 +157,7 @@ def list_packing_group_boxes(inbound_plan_id, packing_group_id, page_size: 10, p # Retrieves a page of items in a given packing group. Packing options must first be generated by the corresponding # operation before packing group items can be listed. # + # @note This operation can make a static sandbox call. # @param [String] inbound_plan_id Identifier of an inbound plan. # @param [String] packing_group_id Identifier of a packing group. # @param [Integer] page_size The number of packing group items to return in the response matching the given query. @@ -173,7 +168,6 @@ def list_packing_group_boxes(inbound_plan_id, packing_group_id, page_size: 10, p # @return [Hash] The API response def list_packing_group_items(inbound_plan_id, packing_group_id, page_size: 10, pagination_token: nil, rate_limit: 2.0) - cannot_sandbox! path = "/inbound/fba/2024-03-20/inboundPlans/#{inbound_plan_id}/packingGroups/#{packing_group_id}/items" params = { @@ -187,13 +181,12 @@ def list_packing_group_items(inbound_plan_id, packing_group_id, page_size: 10, p # Sets packing information for an inbound plan. This should be called after an inbound plan is created to populate # the box level information required for planning and transportation estimates. # + # @note This operation can make a static sandbox call. # @param [String] inbound_plan_id Identifier of an inbound plan. # @param [Hash] body The body of the request to `setPackingInformation`. # @param [Float] rate_limit Requests per second # @return [Hash] The API response def set_packing_information(inbound_plan_id, body, rate_limit: 2.0) - cannot_sandbox! - path = "/inbound/fba/2024-03-20/inboundPlans/#{inbound_plan_id}/packingInformation" meter(rate_limit).post(path, body:) @@ -202,6 +195,7 @@ def set_packing_information(inbound_plan_id, body, rate_limit: 2.0) # Retrieves a list of all packing options for an inbound plan. Packing options must first be generated by the # corresponding operation before becoming available. # + # @note This operation can make a static sandbox call. # @param [String] inbound_plan_id Identifier of an inbound plan. # @param [Integer] page_size The number of packing options to return in the response matching the given query. # @param [String] pagination_token A token to fetch a certain page when there are multiple pages worth of results. @@ -210,8 +204,6 @@ def set_packing_information(inbound_plan_id, body, rate_limit: 2.0) # @param [Float] rate_limit Requests per second # @return [Hash] The API response def list_packing_options(inbound_plan_id, page_size: 10, pagination_token: nil, rate_limit: 2.0) - cannot_sandbox! - path = "/inbound/fba/2024-03-20/inboundPlans/#{inbound_plan_id}/packingOptions" params = { "pageSize" => page_size, @@ -223,12 +215,11 @@ def list_packing_options(inbound_plan_id, page_size: 10, pagination_token: nil, # Generates available packing options for the inbound plan. # + # @note This operation can make a static sandbox call. # @param [String] inbound_plan_id Identifier of an inbound plan. # @param [Float] rate_limit Requests per second # @return [Hash] The API response def generate_packing_options(inbound_plan_id, rate_limit: 2.0) - cannot_sandbox! - path = "/inbound/fba/2024-03-20/inboundPlans/#{inbound_plan_id}/packingOptions" meter(rate_limit).post(path) @@ -236,13 +227,12 @@ def generate_packing_options(inbound_plan_id, rate_limit: 2.0) # Confirms the packing option for an inbound plan. # + # @note This operation can make a static sandbox call. # @param [String] inbound_plan_id Identifier of an inbound plan. # @param [String] packing_option_id Identifier of a packing option. # @param [Float] rate_limit Requests per second # @return [Hash] The API response def confirm_packing_option(inbound_plan_id, packing_option_id, rate_limit: 2.0) - cannot_sandbox! - path = "/inbound/fba/2024-03-20/inboundPlans/#{inbound_plan_id}/packingOptions/#{packing_option_id}/confirmation" meter(rate_limit).post(path) @@ -251,6 +241,7 @@ def confirm_packing_option(inbound_plan_id, packing_option_id, rate_limit: 2.0) # Provides a paginated list of pallet packages in an inbound plan. An inbound plan will have pallets when the # related details are provided after generating Less-Than-Truckload (LTL) carrier shipments. # + # @note This operation can make a static sandbox call. # @param [String] inbound_plan_id Identifier of an inbound plan. # @param [Integer] page_size The number of pallets to return in the response matching the given query. # @param [String] pagination_token A token to fetch a certain page when there are multiple pages worth of results. @@ -259,8 +250,6 @@ def confirm_packing_option(inbound_plan_id, packing_option_id, rate_limit: 2.0) # @param [Float] rate_limit Requests per second # @return [Hash] The API response def list_inbound_plan_pallets(inbound_plan_id, page_size: 10, pagination_token: nil, rate_limit: 2.0) - cannot_sandbox! - path = "/inbound/fba/2024-03-20/inboundPlans/#{inbound_plan_id}/pallets" params = { "pageSize" => page_size, @@ -273,6 +262,7 @@ def list_inbound_plan_pallets(inbound_plan_id, page_size: 10, pagination_token: # Provides a list of all placement options for an inbound plan. Placement options must first be generated by the # corresponding operation before becoming available. # + # @note This operation can make a static sandbox call. # @param [String] inbound_plan_id Identifier of an inbound plan. # @param [Integer] page_size The number of placement options to return in the response matching the given query. # @param [String] pagination_token A token to fetch a certain page when there are multiple pages worth of results. @@ -281,8 +271,6 @@ def list_inbound_plan_pallets(inbound_plan_id, page_size: 10, pagination_token: # @param [Float] rate_limit Requests per second # @return [Hash] The API response def list_placement_options(inbound_plan_id, page_size: 10, pagination_token: nil, rate_limit: 2.0) - cannot_sandbox! - path = "/inbound/fba/2024-03-20/inboundPlans/#{inbound_plan_id}/placementOptions" params = { "pageSize" => page_size, @@ -294,13 +282,12 @@ def list_placement_options(inbound_plan_id, page_size: 10, pagination_token: nil # Generates placement options for the inbound plan. # + # @note This operation can make a static sandbox call. # @param [String] inbound_plan_id Identifier of an inbound plan. # @param [Hash] body The body of the request to `generatePlacementOptions`. # @param [Float] rate_limit Requests per second # @return [Hash] The API response def generate_placement_options(inbound_plan_id, body, rate_limit: 2.0) - cannot_sandbox! - path = "/inbound/fba/2024-03-20/inboundPlans/#{inbound_plan_id}/placementOptions" meter(rate_limit).post(path, body:) @@ -308,14 +295,13 @@ def generate_placement_options(inbound_plan_id, body, rate_limit: 2.0) # Confirms the placement option for an inbound plan. Once confirmed, it cannot be changed for the Inbound Plan. # + # @note This operation can make a static sandbox call. # @param [String] inbound_plan_id Identifier of an inbound plan. # @param [String] placement_option_id The identifier of a placement option. A placement option represents the # shipment splits and destinations of SKUs. # @param [Float] rate_limit Requests per second # @return [Hash] The API response def confirm_placement_option(inbound_plan_id, placement_option_id, rate_limit: 2.0) - cannot_sandbox! - path = "/inbound/fba/2024-03-20/inboundPlans/#{inbound_plan_id}/placementOptions/#{placement_option_id}/confirmation" meter(rate_limit).post(path) @@ -324,13 +310,12 @@ def confirm_placement_option(inbound_plan_id, placement_option_id, rate_limit: 2 # Provides the full details for a specific shipment within an inbound plan. The `transportationOptionId` inside # `acceptedTransportationSelection` can be used to retrieve the transportation details for the shipment. # + # @note This operation can make a static sandbox call. # @param [String] inbound_plan_id Identifier of an inbound plan. # @param [String] shipment_id Identifier of a shipment. A shipment contains the boxes and units being inbounded. # @param [Float] rate_limit Requests per second # @return [Hash] The API response def get_shipment(inbound_plan_id, shipment_id, rate_limit: 2.0) - cannot_sandbox! - path = "/inbound/fba/2024-03-20/inboundPlans/#{inbound_plan_id}/shipments/#{shipment_id}" meter(rate_limit).get(path) @@ -338,6 +323,7 @@ def get_shipment(inbound_plan_id, shipment_id, rate_limit: 2.0) # Provides a paginated list of box packages in a shipment. # + # @note This operation can make a static sandbox call. # @param [String] inbound_plan_id Identifier of an inbound plan. # @param [String] shipment_id Identifier of a shipment. A shipment contains the boxes and units being inbounded. # @param [Integer] page_size The number of boxes to return in the response matching the given query. @@ -347,8 +333,6 @@ def get_shipment(inbound_plan_id, shipment_id, rate_limit: 2.0) # @param [Float] rate_limit Requests per second # @return [Hash] The API response def list_shipment_boxes(inbound_plan_id, shipment_id, page_size: 10, pagination_token: nil, rate_limit: 2.0) - cannot_sandbox! - path = "/inbound/fba/2024-03-20/inboundPlans/#{inbound_plan_id}/shipments/#{shipment_id}/boxes" params = { "pageSize" => page_size, @@ -362,6 +346,7 @@ def list_shipment_boxes(inbound_plan_id, shipment_id, page_size: 10, pagination_ # preview is a summary of the requested shipment content changes along with the transportation cost implications # of the change that can only be confirmed prior to the expiry date specified. # + # @note This operation can make a static sandbox call. # @param [String] inbound_plan_id Identifier of an inbound plan. # @param [String] shipment_id Identifier of a shipment. A shipment contains the boxes and units being inbounded. # @param [Integer] page_size The number of content update previews to return. @@ -372,7 +357,6 @@ def list_shipment_boxes(inbound_plan_id, shipment_id, page_size: 10, pagination_ # @return [Hash] The API response def list_shipment_content_update_previews(inbound_plan_id, shipment_id, page_size: 10, pagination_token: nil, rate_limit: 2.0) - cannot_sandbox! path = "/inbound/fba/2024-03-20/inboundPlans/#{inbound_plan_id}/shipments/#{shipment_id}/contentUpdatePreviews" params = { @@ -387,14 +371,13 @@ def list_shipment_content_update_previews(inbound_plan_id, shipment_id, page_siz # confirmed carrier. The shipment content update preview will be viewable with the updated costs and contents # prior to confirmation. # + # @note This operation can make a static sandbox call. # @param [String] inbound_plan_id Identifier of an inbound plan. # @param [String] shipment_id Identifier of a shipment. A shipment contains the boxes and units being inbounded. # @param [Hash] body The body of the request to `generateShipmentContentUpdatePreviews`. # @param [Float] rate_limit Requests per second # @return [Hash] The API response def generate_shipment_content_update_previews(inbound_plan_id, shipment_id, body, rate_limit: 2.0) - cannot_sandbox! - path = "/inbound/fba/2024-03-20/inboundPlans/#{inbound_plan_id}/shipments/#{shipment_id}/contentUpdatePreviews" meter(rate_limit).post(path, body:) @@ -404,6 +387,7 @@ def generate_shipment_content_update_previews(inbound_plan_id, shipment_id, body # along with the transportation cost implications of the change that can only be confirmed prior to the expiry # date specified. # + # @note This operation can make a static sandbox call. # @param [String] inbound_plan_id Identifier of an inbound plan. # @param [String] shipment_id Identifier of a shipment. A shipment contains the boxes and units being inbounded. # @param [String] content_update_preview_id Identifier of a content update preview. @@ -411,7 +395,6 @@ def generate_shipment_content_update_previews(inbound_plan_id, shipment_id, body # @return [Hash] The API response def get_shipment_content_update_preview(inbound_plan_id, shipment_id, content_update_preview_id, rate_limit: 2.0) - cannot_sandbox! path = "/inbound/fba/2024-03-20/inboundPlans/#{inbound_plan_id}/shipments/#{shipment_id}/contentUpdatePreviews/#{content_update_preview_id}" @@ -420,6 +403,7 @@ def get_shipment_content_update_preview(inbound_plan_id, shipment_id, content_up # Confirm a shipment content update preview and accept the changes in transportation cost. # + # @note This operation can make a static sandbox call. # @param [String] inbound_plan_id Identifier of an inbound plan. # @param [String] shipment_id Identifier of a shipment. A shipment contains the boxes and units being inbounded. # @param [String] content_update_preview_id Identifier of a content update preview. @@ -427,7 +411,6 @@ def get_shipment_content_update_preview(inbound_plan_id, shipment_id, content_up # @return [Hash] The API response def confirm_shipment_content_update_preview(inbound_plan_id, shipment_id, content_update_preview_id, rate_limit: 2.0) - cannot_sandbox! path = "/inbound/fba/2024-03-20/inboundPlans/#{inbound_plan_id}/shipments/#{shipment_id}/contentUpdatePreviews/#{content_update_preview_id}/confirmation" @@ -436,13 +419,12 @@ def confirm_shipment_content_update_preview(inbound_plan_id, shipment_id, conten # Provide delivery challan document for PCP transportation in IN marketplace. # + # @note This operation can make a static sandbox call. # @param [String] inbound_plan_id Identifier of an inbound plan. # @param [String] shipment_id Identifier of a shipment. A shipment contains the boxes and units being inbounded. # @param [Float] rate_limit Requests per second # @return [Hash] The API response def get_delivery_challan_document(inbound_plan_id, shipment_id, rate_limit: 2.0) - cannot_sandbox! - path = "/inbound/fba/2024-03-20/inboundPlans/#{inbound_plan_id}/shipments/#{shipment_id}/deliveryChallanDocument" meter(rate_limit).get(path) @@ -451,6 +433,7 @@ def get_delivery_challan_document(inbound_plan_id, shipment_id, rate_limit: 2.0) # Retrieves all delivery window options for a shipment. Delivery window options must first be generated by the # `generateDeliveryWindowOptions` operation before becoming available. # + # @note This operation can make a static sandbox call. # @param [String] inbound_plan_id Identifier of an inbound plan. # @param [String] shipment_id The shipment to get delivery window options for. # @param [Integer] page_size The number of delivery window options to return in the response matching the given @@ -462,7 +445,6 @@ def get_delivery_challan_document(inbound_plan_id, shipment_id, rate_limit: 2.0) # @return [Hash] The API response def list_delivery_window_options(inbound_plan_id, shipment_id, page_size: 10, pagination_token: nil, rate_limit: 2.0) - cannot_sandbox! path = "/inbound/fba/2024-03-20/inboundPlans/#{inbound_plan_id}/shipments/#{shipment_id}/deliveryWindowOptions" params = { @@ -475,13 +457,12 @@ def list_delivery_window_options(inbound_plan_id, shipment_id, page_size: 10, pa # Generates available delivery window options for a given shipment. # + # @note This operation can make a static sandbox call. # @param [String] inbound_plan_id Identifier of an inbound plan. # @param [String] shipment_id The shipment to generate delivery window options for. # @param [Float] rate_limit Requests per second # @return [Hash] The API response def generate_delivery_window_options(inbound_plan_id, shipment_id, rate_limit: 2.0) - cannot_sandbox! - path = "/inbound/fba/2024-03-20/inboundPlans/#{inbound_plan_id}/shipments/#{shipment_id}/deliveryWindowOptions" meter(rate_limit).post(path) @@ -494,14 +475,13 @@ def generate_delivery_window_options(inbound_plan_id, shipment_id, rate_limit: 2 # `CONFIRMED_DELIVERY_WINDOW` require a delivery window to be confirmed prior to transportation option # confirmation. # + # @note This operation can make a static sandbox call. # @param [String] inbound_plan_id Identifier of an inbound plan. # @param [String] shipment_id The shipment to confirm the delivery window option for. # @param [String] delivery_window_option_id The id of the delivery window option to be confirmed. # @param [Float] rate_limit Requests per second # @return [Hash] The API response def confirm_delivery_window_options(inbound_plan_id, shipment_id, delivery_window_option_id, rate_limit: 2.0) - cannot_sandbox! - path = "/inbound/fba/2024-03-20/inboundPlans/#{inbound_plan_id}/shipments/#{shipment_id}/deliveryWindowOptions/#{delivery_window_option_id}/confirmation" meter(rate_limit).post(path) @@ -509,6 +489,7 @@ def confirm_delivery_window_options(inbound_plan_id, shipment_id, delivery_windo # Provides a paginated list of item packages in a shipment. # + # @note This operation can make a static sandbox call. # @param [String] inbound_plan_id Identifier of an inbound plan. # @param [String] shipment_id Identifier of a shipment. A shipment contains the boxes and units being inbounded. # @param [Integer] page_size The number of items to return in the response matching the given query. @@ -518,8 +499,6 @@ def confirm_delivery_window_options(inbound_plan_id, shipment_id, delivery_windo # @param [Float] rate_limit Requests per second # @return [Hash] The API response def list_shipment_items(inbound_plan_id, shipment_id, page_size: 10, pagination_token: nil, rate_limit: 2.0) - cannot_sandbox! - path = "/inbound/fba/2024-03-20/inboundPlans/#{inbound_plan_id}/shipments/#{shipment_id}/items" params = { "pageSize" => page_size, @@ -531,14 +510,13 @@ def list_shipment_items(inbound_plan_id, shipment_id, page_size: 10, pagination_ # Updates the name of an existing shipment. # + # @note This operation can make a static sandbox call. # @param [String] inbound_plan_id Identifier of an inbound plan. # @param [String] shipment_id Identifier of a shipment. A shipment contains the boxes and units being inbounded. # @param [Hash] body The body of the request to `updateShipmentName`. # @param [Float] rate_limit Requests per second # @return [Hash] The API response def update_shipment_name(inbound_plan_id, shipment_id, body, rate_limit: 2.0) - cannot_sandbox! - path = "/inbound/fba/2024-03-20/inboundPlans/#{inbound_plan_id}/shipments/#{shipment_id}/name" meter(rate_limit).put(path, body:) @@ -547,6 +525,7 @@ def update_shipment_name(inbound_plan_id, shipment_id, body, rate_limit: 2.0) # Provides a paginated list of pallet packages in a shipment. A palletized shipment will have pallets when the # related details are provided after generating Less-Than-Truckload (LTL) carrier shipments. # + # @note This operation can make a static sandbox call. # @param [String] inbound_plan_id Identifier of an inbound plan. # @param [String] shipment_id Identifier of a shipment. A shipment contains the boxes and units being inbounded. # @param [Integer] page_size The number of pallets to return in the response matching the given query. @@ -556,8 +535,6 @@ def update_shipment_name(inbound_plan_id, shipment_id, body, rate_limit: 2.0) # @param [Float] rate_limit Requests per second # @return [Hash] The API response def list_shipment_pallets(inbound_plan_id, shipment_id, page_size: 10, pagination_token: nil, rate_limit: 2.0) - cannot_sandbox! - path = "/inbound/fba/2024-03-20/inboundPlans/#{inbound_plan_id}/shipments/#{shipment_id}/pallets" params = { "pageSize" => page_size, @@ -569,14 +546,13 @@ def list_shipment_pallets(inbound_plan_id, shipment_id, page_size: 10, paginatio # Cancels a self-ship appointment slot against a shipment. # + # @note This operation can make a static sandbox call. # @param [String] inbound_plan_id Identifier of an inbound plan. # @param [String] shipment_id Identifier of a shipment. A shipment contains the boxes and units being inbounded. # @param [Hash] body The body of the request to `cancelSelfShipAppointment`. # @param [Float] rate_limit Requests per second # @return [Hash] The API response def cancel_self_ship_appointment(inbound_plan_id, shipment_id, body, rate_limit: 2.0) - cannot_sandbox! - path = "/inbound/fba/2024-03-20/inboundPlans/#{inbound_plan_id}/shipments/#{shipment_id}/selfShipAppointmentCancellation" meter(rate_limit).put(path, body:) @@ -584,6 +560,7 @@ def cancel_self_ship_appointment(inbound_plan_id, shipment_id, body, rate_limit: # Retrieves a list of available self-ship appointment slots used to drop off a shipment at a warehouse. # + # @note This operation can make a static sandbox call. # @param [String] inbound_plan_id Identifier of an inbound plan. # @param [String] shipment_id Identifier of a shipment. A shipment contains the boxes and units being inbounded. # @param [Integer] page_size The number of self ship appointment slots to return in the response matching the @@ -595,7 +572,6 @@ def cancel_self_ship_appointment(inbound_plan_id, shipment_id, body, rate_limit: # @return [Hash] The API response def get_self_ship_appointment_slots(inbound_plan_id, shipment_id, page_size: 10, pagination_token: nil, rate_limit: 2.0) - cannot_sandbox! path = "/inbound/fba/2024-03-20/inboundPlans/#{inbound_plan_id}/shipments/#{shipment_id}/selfShipAppointmentSlots" params = { @@ -608,14 +584,13 @@ def get_self_ship_appointment_slots(inbound_plan_id, shipment_id, page_size: 10, # Initiates the process of generating the appointment slots list. # + # @note This operation can make a static sandbox call. # @param [String] inbound_plan_id Identifier of an inbound plan. # @param [String] shipment_id Identifier of a shipment. A shipment contains the boxes and units being inbounded. # @param [Hash] body The body of the request to `generateSelfShipAppointmentSlots`. # @param [Float] rate_limit Requests per second # @return [Hash] The API response def generate_self_ship_appointment_slots(inbound_plan_id, shipment_id, body, rate_limit: 2.0) - cannot_sandbox! - path = "/inbound/fba/2024-03-20/inboundPlans/#{inbound_plan_id}/shipments/#{shipment_id}/selfShipAppointmentSlots" meter(rate_limit).post(path, body:) @@ -623,6 +598,7 @@ def generate_self_ship_appointment_slots(inbound_plan_id, shipment_id, body, rat # Confirms or reschedules a self-ship appointment slot against a shipment. # + # @note This operation can make a static sandbox call. # @param [String] inbound_plan_id Identifier of an inbound plan. # @param [String] shipment_id Identifier of a shipment. A shipment contains the boxes and units being inbounded. # @param [String] slot_id An identifier to a self-ship appointment slot. @@ -630,8 +606,6 @@ def generate_self_ship_appointment_slots(inbound_plan_id, shipment_id, body, rat # @param [Float] rate_limit Requests per second # @return [Hash] The API response def schedule_self_ship_appointment(inbound_plan_id, shipment_id, slot_id, body, rate_limit: 2.0) - cannot_sandbox! - path = "/inbound/fba/2024-03-20/inboundPlans/#{inbound_plan_id}/shipments/#{shipment_id}/selfShipAppointmentSlots/#{slot_id}/schedule" meter(rate_limit).post(path, body:) @@ -642,14 +616,13 @@ def schedule_self_ship_appointment(inbound_plan_id, shipment_id, slot_id, body, # options will be invalidated and will need to be regenerated to capture the potential difference in # transportation options and quotes due to the new source address. # + # @note This operation can make a static sandbox call. # @param [String] inbound_plan_id Identifier of an inbound plan. # @param [String] shipment_id Identifier of a shipment. A shipment contains the boxes and units being inbounded. # @param [Hash] body The body of the request to `updateShipmentSourceAddress`. # @param [Float] rate_limit Requests per second # @return [Hash] The API response def update_shipment_source_address(inbound_plan_id, shipment_id, body, rate_limit: 2.0) - cannot_sandbox! - path = "/inbound/fba/2024-03-20/inboundPlans/#{inbound_plan_id}/shipments/#{shipment_id}/sourceAddress" meter(rate_limit).put(path, body:) @@ -657,14 +630,13 @@ def update_shipment_source_address(inbound_plan_id, shipment_id, body, rate_limi # Updates a shipment's tracking details. # + # @note This operation can make a static sandbox call. # @param [String] inbound_plan_id Identifier of an inbound plan. # @param [String] shipment_id Identifier of a shipment. A shipment contains the boxes and units being inbounded. # @param [Hash] body The body of the request to `updateShipmentTrackingDetails`. # @param [Float] rate_limit Requests per second # @return [Hash] The API response def update_shipment_tracking_details(inbound_plan_id, shipment_id, body, rate_limit: 2.0) - cannot_sandbox! - path = "/inbound/fba/2024-03-20/inboundPlans/#{inbound_plan_id}/shipments/#{shipment_id}/trackingDetails" meter(rate_limit).put(path, body:) @@ -673,6 +645,7 @@ def update_shipment_tracking_details(inbound_plan_id, shipment_id, body, rate_li # Retrieves all transportation options for a shipment. Transportation options must first be generated by the # `generateTransportationOptions` operation before becoming available. # + # @note This operation can make a static sandbox call. # @param [String] inbound_plan_id Identifier of an inbound plan. # @param [Integer] page_size The number of transportation options to return in the response matching the given # query. @@ -687,7 +660,6 @@ def update_shipment_tracking_details(inbound_plan_id, shipment_id, body, rate_li # @return [Hash] The API response def list_transportation_options(inbound_plan_id, page_size: 10, pagination_token: nil, placement_option_id: nil, shipment_id: nil, rate_limit: 2.0) - cannot_sandbox! path = "/inbound/fba/2024-03-20/inboundPlans/#{inbound_plan_id}/transportationOptions" params = { @@ -702,13 +674,12 @@ def list_transportation_options(inbound_plan_id, page_size: 10, pagination_token # Generates available transportation options for a given placement option. # + # @note This operation can make a static sandbox call. # @param [String] inbound_plan_id Identifier of an inbound plan. # @param [Hash] body The body of the request to `generateTransportationOptions`. # @param [Float] rate_limit Requests per second # @return [Hash] The API response def generate_transportation_options(inbound_plan_id, body, rate_limit: 2.0) - cannot_sandbox! - path = "/inbound/fba/2024-03-20/inboundPlans/#{inbound_plan_id}/transportationOptions" meter(rate_limit).post(path, body:) @@ -717,13 +688,12 @@ def generate_transportation_options(inbound_plan_id, body, rate_limit: 2.0) # Confirms all the transportation options for an inbound plan. A placement option must be confirmed prior to use # of this API. Once confirmed, new transportation options can not be generated or confirmed for the Inbound Plan. # + # @note This operation can make a static sandbox call. # @param [String] inbound_plan_id Identifier of an inbound plan. # @param [Hash] body The body of the request to `confirmTransportationOptions`. # @param [Float] rate_limit Requests per second # @return [Hash] The API response def confirm_transportation_options(inbound_plan_id, body, rate_limit: 2.0) - cannot_sandbox! - path = "/inbound/fba/2024-03-20/inboundPlans/#{inbound_plan_id}/transportationOptions/confirmation" meter(rate_limit).post(path, body:) @@ -731,14 +701,13 @@ 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 [Array] mskus List of merchant SKUs - a merchant-supplied identifier for a specific SKU. # @param [String] marketplace_id The Marketplace ID. Refer to [Marketplace # IDs](https://developer-docs.amazon.com/sp-api/docs/marketplace-ids) for a list of possible values. # @param [Float] rate_limit Requests per second # @return [Hash] The API response def list_item_compliance_details(mskus, marketplace_id, rate_limit: 2.0) - cannot_sandbox! - path = "/inbound/fba/2024-03-20/items/compliance" params = { "mskus" => mskus, @@ -751,14 +720,13 @@ def list_item_compliance_details(mskus, marketplace_id, rate_limit: 2.0) # Update compliance details for list of MSKUs. The details provided here are only used for the IN marketplace # compliance validation. # + # @note This operation can make a static sandbox call. # @param [String] marketplace_id The Marketplace ID. Refer to [Marketplace # IDs](https://developer-docs.amazon.com/sp-api/docs/marketplace-ids) for a list of possible values. # @param [Hash] body The body of the request to `updateItemComplianceDetails`. # @param [Float] rate_limit Requests per second # @return [Hash] The API response def update_item_compliance_details(marketplace_id, body, rate_limit: 2.0) - cannot_sandbox! - path = "/inbound/fba/2024-03-20/items/compliance" params = { "marketplaceId" => marketplace_id, @@ -769,12 +737,11 @@ def update_item_compliance_details(marketplace_id, body, rate_limit: 2.0) # For a given marketplace - creates labels for a list of mskus. # + # @note This operation can make a static sandbox call. # @param [Hash] body The body of the request to `createMarketplaceItemLabels`. # @param [Float] rate_limit Requests per second # @return [Hash] The API response def create_marketplace_item_labels(body, rate_limit: 2.0) - cannot_sandbox! - path = "/inbound/fba/2024-03-20/items/labels" meter(rate_limit).post(path, body:) @@ -782,12 +749,11 @@ def create_marketplace_item_labels(body, rate_limit: 2.0) # Gets the status of the processing of an asynchronous API call. # + # @note This operation can make a static sandbox call. # @param [String] operation_id Identifier of an asynchronous operation. # @param [Float] rate_limit Requests per second # @return [Hash] The API response def get_inbound_operation_status(operation_id, rate_limit: 2.0) - cannot_sandbox! - path = "/inbound/fba/2024-03-20/operations/#{operation_id}" meter(rate_limit).get(path) diff --git a/lib/peddler/api/fulfillment_inbound_v0.rb b/lib/peddler/api/fulfillment_inbound_v0.rb index 24ce8838..52b55b87 100644 --- a/lib/peddler/api/fulfillment_inbound_v0.rb +++ b/lib/peddler/api/fulfillment_inbound_v0.rb @@ -16,12 +16,11 @@ class FulfillmentInboundV0 < API # destination if the two shipment plans require different processing—for example, items that require labels must # be shipped separately from stickerless, commingled inventory. # + # @note This operation can make a static sandbox call. # @param [Hash] body The request schema for the CreateInboundShipmentPlanRequest operation. # @param [Float] rate_limit Requests per second # @return [Hash] The API response def create_inbound_shipment_plan(body, rate_limit: 2.0) - cannot_sandbox! - path = "/fba/inbound/v0/plans" meter(rate_limit).post(path, body:) @@ -30,14 +29,13 @@ def create_inbound_shipment_plan(body, rate_limit: 2.0) # Returns a new inbound shipment based on the specified shipmentId that was returned by the # createInboundShipmentPlan operation. # + # @note This operation can make a static sandbox call. # @param [Hash] body The request schema for the InboundShipmentRequest operation. # @param [String] shipment_id A shipment identifier originally returned by the createInboundShipmentPlan # operation. # @param [Float] rate_limit Requests per second # @return [Hash] The API response def create_inbound_shipment(body, shipment_id, rate_limit: 2.0) - cannot_sandbox! - path = "/fba/inbound/v0/shipments/#{shipment_id}" meter(rate_limit).post(path, body:) @@ -46,14 +44,13 @@ def create_inbound_shipment(body, shipment_id, rate_limit: 2.0) # Updates or removes items from the inbound shipment identified by the specified shipment identifier. Adding new # items is not supported. # + # @note This operation can make a static sandbox call. # @param [Hash] body The request schema for the InboundShipmentRequest operation. # @param [String] shipment_id A shipment identifier originally returned by the createInboundShipmentPlan # operation. # @param [Float] rate_limit Requests per second # @return [Hash] The API response def update_inbound_shipment(body, shipment_id, rate_limit: 2.0) - cannot_sandbox! - path = "/fba/inbound/v0/shipments/#{shipment_id}" meter(rate_limit).put(path, body:) @@ -61,14 +58,13 @@ def update_inbound_shipment(body, shipment_id, rate_limit: 2.0) # Returns pre-order information, including dates, that a seller needs before confirming a shipment for pre-order. # + # @note This operation can make a static sandbox call. # @param [String] shipment_id A shipment identifier originally returned by the createInboundShipmentPlan # operation. # @param [String] marketplace_id A marketplace identifier. Specifies the marketplace the shipment is tied to. # @param [Float] rate_limit Requests per second # @return [Hash] The API response def get_preorder_info(shipment_id, marketplace_id, rate_limit: 2.0) - cannot_sandbox! - path = "/fba/inbound/v0/shipments/#{shipment_id}/preorder" params = { "MarketplaceId" => marketplace_id, @@ -80,6 +76,7 @@ def get_preorder_info(shipment_id, marketplace_id, rate_limit: 2.0) # Returns information needed to confirm a shipment for pre-order. Call this operation after calling the # getPreorderInfo operation to get the NeedByDate value and other pre-order information about the shipment. # + # @note This operation can make a static sandbox call. # @param [String] shipment_id A shipment identifier originally returned by the createInboundShipmentPlan # operation. # @param [String] need_by_date Date that the shipment must arrive at the Amazon fulfillment center to avoid @@ -89,8 +86,6 @@ def get_preorder_info(shipment_id, marketplace_id, rate_limit: 2.0) # @param [Float] rate_limit Requests per second # @return [Hash] The API response def confirm_preorder(shipment_id, need_by_date, marketplace_id, rate_limit: 2.0) - cannot_sandbox! - path = "/fba/inbound/v0/shipments/#{shipment_id}/preorder/confirm" params = { "NeedByDate" => need_by_date, @@ -103,6 +98,7 @@ def confirm_preorder(shipment_id, need_by_date, marketplace_id, rate_limit: 2.0) # Returns labeling requirements and item preparation instructions to help prepare items for shipment to Amazon's # fulfillment network. # + # @note This operation can make a static sandbox call. # @param [String] ship_to_country_code The country code of the country to which the items will be shipped. Note # that labeling requirements and item preparation instructions can vary by country. # @param [Array] seller_sku_list A list of SellerSKU values. Used to identify items for which you want @@ -120,8 +116,6 @@ def confirm_preorder(shipment_id, need_by_date, marketplace_id, rate_limit: 2.0) # @param [Float] rate_limit Requests per second # @return [Hash] The API response def get_prep_instructions(ship_to_country_code, seller_sku_list: nil, asin_list: nil, rate_limit: 2.0) - cannot_sandbox! - path = "/fba/inbound/v0/prepInstructions" params = { "ShipToCountryCode" => ship_to_country_code, @@ -134,13 +128,12 @@ def get_prep_instructions(ship_to_country_code, seller_sku_list: nil, asin_list: # Returns current transportation information about an inbound shipment. # + # @note This operation can make a static sandbox call. # @param [String] shipment_id A shipment identifier originally returned by the createInboundShipmentPlan # operation. # @param [Float] rate_limit Requests per second # @return [Hash] The API response def get_transport_details(shipment_id, rate_limit: 2.0) - cannot_sandbox! - path = "/fba/inbound/v0/shipments/#{shipment_id}/transport" meter(rate_limit).get(path) @@ -148,14 +141,13 @@ def get_transport_details(shipment_id, rate_limit: 2.0) # Sends transportation information to Amazon about an inbound shipment. # + # @note This operation can make a static sandbox call. # @param [String] shipment_id A shipment identifier originally returned by the createInboundShipmentPlan # operation. # @param [Hash] body The request schema for the PutTransportDetailsRequest operation. # @param [Float] rate_limit Requests per second # @return [Hash] The API response def put_transport_details(shipment_id, body, rate_limit: 2.0) - cannot_sandbox! - path = "/fba/inbound/v0/shipments/#{shipment_id}/transport" meter(rate_limit).put(path, body:) @@ -168,13 +160,12 @@ def put_transport_details(shipment_id, body, rate_limit: 2.0) # shipment transportation request. After the void deadline passes, your account will be charged for the shipping # cost. # + # @note This operation can make a static sandbox call. # @param [String] shipment_id A shipment identifier originally returned by the createInboundShipmentPlan # operation. # @param [Float] rate_limit Requests per second # @return [Hash] The API response def void_transport(shipment_id, rate_limit: 2.0) - cannot_sandbox! - path = "/fba/inbound/v0/shipments/#{shipment_id}/transport/void" meter(rate_limit).post(path) @@ -184,13 +175,12 @@ def void_transport(shipment_id, rate_limit: 2.0) # Prior to calling the estimateTransport operation, you must call the putTransportDetails operation to provide # Amazon with the transportation information for the inbound shipment. # + # @note This operation can make a static sandbox call. # @param [String] shipment_id A shipment identifier originally returned by the createInboundShipmentPlan # operation. # @param [Float] rate_limit Requests per second # @return [Hash] The API response def estimate_transport(shipment_id, rate_limit: 2.0) - cannot_sandbox! - path = "/fba/inbound/v0/shipments/#{shipment_id}/transport/estimate" meter(rate_limit).post(path) @@ -206,13 +196,12 @@ def estimate_transport(shipment_id, rate_limit: 2.0) # Truckload/Full Truckload (LTL/FTL) shipment, the seller has one hour after confirming a transportation request # to void it. After the grace period has expired the seller's account will be charged for the shipping cost. # + # @note This operation can make a static sandbox call. # @param [String] shipment_id A shipment identifier originally returned by the createInboundShipmentPlan # operation. # @param [Float] rate_limit Requests per second # @return [Hash] The API response def confirm_transport(shipment_id, rate_limit: 2.0) - cannot_sandbox! - path = "/fba/inbound/v0/shipments/#{shipment_id}/transport/confirm" meter(rate_limit).post(path) @@ -220,6 +209,7 @@ def confirm_transport(shipment_id, rate_limit: 2.0) # Returns package/pallet labels for faster and more accurate shipment processing at the Amazon fulfillment center. # + # @note This operation can make a static sandbox call. # @param [String] shipment_id A shipment identifier originally returned by the createInboundShipmentPlan # operation. # @param [String] page_type The page type to use to print the labels. Submitting a PageType value that is not @@ -239,7 +229,6 @@ def confirm_transport(shipment_id, rate_limit: 2.0) # @return [Hash] The API response def get_labels(shipment_id, page_type, label_type, number_of_packages: nil, package_labels_to_print: nil, number_of_pallets: nil, page_size: nil, page_start_index: nil, rate_limit: 2.0) - cannot_sandbox! path = "/fba/inbound/v0/shipments/#{shipment_id}/labels" params = { @@ -259,13 +248,12 @@ def get_labels(shipment_id, page_type, label_type, number_of_packages: nil, pack # operation returns PDF document data for printing a bill of lading for an Amazon-partnered Less Than # Truckload/Full Truckload (LTL/FTL) inbound shipment. # + # @note This operation can make a static sandbox call. # @param [String] shipment_id A shipment identifier originally returned by the createInboundShipmentPlan # operation. # @param [Float] rate_limit Requests per second # @return [Hash] The API response def get_bill_of_lading(shipment_id, rate_limit: 2.0) - cannot_sandbox! - path = "/fba/inbound/v0/shipments/#{shipment_id}/billOfLading" meter(rate_limit).get(path) @@ -273,6 +261,7 @@ def get_bill_of_lading(shipment_id, rate_limit: 2.0) # Returns a list of inbound shipments based on criteria that you specify. # + # @note This operation can make a static sandbox call. # @param [Array] shipment_status_list A list of ShipmentStatus values. Used to select shipments with a # current status that matches the status values that you specify. # @param [Array] shipment_id_list A list of shipment IDs used to select the shipments that you want. If @@ -293,7 +282,6 @@ def get_bill_of_lading(shipment_id, rate_limit: 2.0) # @return [Hash] The API response def get_shipments(query_type, marketplace_id, shipment_status_list: nil, shipment_id_list: nil, last_updated_after: nil, last_updated_before: nil, next_token: nil, rate_limit: 2.0) - cannot_sandbox! path = "/fba/inbound/v0/shipments" params = { @@ -311,14 +299,13 @@ def get_shipments(query_type, marketplace_id, shipment_status_list: nil, shipmen # Returns a list of items in a specified inbound shipment. # + # @note This operation can make a static sandbox call. # @param [String] shipment_id A shipment identifier used for selecting items in a specific inbound shipment. # @param [String] marketplace_id A marketplace identifier. Specifies the marketplace where the product would be # stored. # @param [Float] rate_limit Requests per second # @return [Hash] The API response def get_shipment_items_by_shipment_id(shipment_id, marketplace_id, rate_limit: 2.0) - cannot_sandbox! - path = "/fba/inbound/v0/shipments/#{shipment_id}/items" params = { "MarketplaceId" => marketplace_id, @@ -330,6 +317,7 @@ def get_shipment_items_by_shipment_id(shipment_id, marketplace_id, rate_limit: 2 # Returns a list of items in a specified inbound shipment, or a list of items that were updated within a specified # time frame. # + # @note This operation can make a static sandbox call. # @param [String] last_updated_after A date used for selecting inbound shipment items that were last updated after # (or at) a specified time. The selection includes updates made by Amazon and by the seller. # @param [String] last_updated_before A date used for selecting inbound shipment items that were last updated @@ -344,7 +332,6 @@ def get_shipment_items_by_shipment_id(shipment_id, marketplace_id, rate_limit: 2 # @return [Hash] The API response def get_shipment_items(query_type, marketplace_id, last_updated_after: nil, last_updated_before: nil, next_token: nil, rate_limit: 2.0) - cannot_sandbox! path = "/fba/inbound/v0/shipmentItems" params = { diff --git a/lib/peddler/api/fulfillment_outbound_2020_07_01.rb b/lib/peddler/api/fulfillment_outbound_2020_07_01.rb index 355361dc..a32e4297 100644 --- a/lib/peddler/api/fulfillment_outbound_2020_07_01.rb +++ b/lib/peddler/api/fulfillment_outbound_2020_07_01.rb @@ -12,6 +12,7 @@ class API class FulfillmentOutbound20200701 < API # Returns a list of fulfillment order previews based on shipping criteria that you specify. # + # @note This operation can make a dynamic sandbox call. # @param [Hash] body GetFulfillmentPreviewRequest parameter # @param [Float] rate_limit Requests per second # @return [Hash] The API response @@ -24,6 +25,7 @@ def get_fulfillment_preview(body, rate_limit: 2.0) # Returns delivery options that include an estimated delivery date and offer expiration, based on criteria that # you specify. # + # @note This operation can make a dynamic sandbox call. # @param [Hash] body GetDeliveryOffersRequest parameter # @param [Float] rate_limit Requests per second # @return [Hash] The API response @@ -36,6 +38,7 @@ def delivery_offers(body, rate_limit: 5.0) # Returns a list of fulfillment orders fulfilled after (or at) a specified date-time, or indicated by the next # token parameter. # + # @note This operation can make a dynamic sandbox call. # @param [String] query_start_date A date used to select fulfillment orders that were last updated after (or at) a # specified time. An update is defined as any change in fulfillment order status, including the creation of a # new fulfillment order. @@ -55,6 +58,7 @@ def list_all_fulfillment_orders(query_start_date: nil, next_token: nil, rate_lim # Requests that Amazon ship items from the seller's inventory in Amazon's fulfillment network to a destination # address. # + # @note This operation can make a dynamic sandbox call. # @param [Hash] body CreateFulfillmentOrderRequest parameter # @param [Float] rate_limit Requests per second # @return [Hash] The API response @@ -67,6 +71,7 @@ def create_fulfillment_order(body, rate_limit: 2.0) # Returns delivery tracking information for a package in an outbound shipment for a Multi-Channel Fulfillment # order. # + # @note This operation can make a dynamic sandbox call. # @param [Integer] package_number The unencrypted package identifier returned by the `getFulfillmentOrder` # operation. # @param [Float] rate_limit Requests per second @@ -84,6 +89,7 @@ def get_package_tracking_details(package_number, rate_limit: 2.0) # may contain special characters that require URL encoding. To avoid errors with SKUs when encoding URLs, refer to # [URL Encoding](https://developer-docs.amazon.com/sp-api/docs/url-encoding). # + # @note This operation can make a dynamic sandbox call. # @param [String] seller_sku The seller SKU for which return reason codes are required. # @param [String] marketplace_id The marketplace for which the seller wants return reason codes. # @param [String] seller_fulfillment_order_id The identifier assigned to the item by the seller when the @@ -109,6 +115,7 @@ def list_return_reason_codes(seller_sku, marketplace_id: nil, seller_fulfillment # Creates a fulfillment return. # + # @note This operation can make a dynamic sandbox call. # @param [Hash] body CreateFulfillmentReturnRequest parameter # @param [String] seller_fulfillment_order_id An identifier assigned by the seller to the fulfillment order at the # time it was created. The seller uses their own records to find the correct `SellerFulfillmentOrderId` value @@ -123,6 +130,7 @@ def create_fulfillment_return(body, seller_fulfillment_order_id, rate_limit: 2.0 # Returns the fulfillment order indicated by the specified order identifier. # + # @note This operation can make a dynamic sandbox call. # @param [String] seller_fulfillment_order_id The identifier assigned to the item by the seller when the # fulfillment order was created. # @param [Float] rate_limit Requests per second @@ -135,6 +143,7 @@ def get_fulfillment_order(seller_fulfillment_order_id, rate_limit: 2.0) # Updates and/or requests shipment for a fulfillment order with an order hold on it. # + # @note This operation can make a dynamic sandbox call. # @param [Hash] body UpdateFulfillmentOrderRequest parameter # @param [String] seller_fulfillment_order_id The identifier assigned to the item by the seller when the # fulfillment order was created. @@ -149,6 +158,7 @@ def update_fulfillment_order(body, seller_fulfillment_order_id, rate_limit: 2.0) # Requests that Amazon stop attempting to fulfill the fulfillment order indicated by the specified order # identifier. # + # @note This operation can make a dynamic sandbox call. # @param [String] seller_fulfillment_order_id The identifier assigned to the item by the seller when the # fulfillment order was created. # @param [Float] rate_limit Requests per second @@ -165,6 +175,8 @@ def cancel_fulfillment_order(seller_fulfillment_order_id, rate_limit: 2.0) # Partner API sandbox](https://developer-docs.amazon.com/sp-api/docs/the-selling-partner-api-sandbox) for more # information. # + # @note This operation can make a dynamic sandbox call. + # @note This operation is sandbox-only. # @param [String] seller_fulfillment_order_id The identifier assigned to the item by the seller when the # fulfillment order was created. # @param [Hash] body The identifier assigned to the item by the seller when the fulfillment order was created. @@ -179,6 +191,7 @@ def submit_fulfillment_order_status_update(seller_fulfillment_order_id, body, ra # Returns a list of features available for Multi-Channel Fulfillment orders in the marketplace you specify, and # whether the seller for which you made the call is enrolled for each feature. # + # @note This operation can make a dynamic sandbox call. # @param [String] marketplace_id The marketplace for which to return the list of features. # @param [Float] rate_limit Requests per second # @return [Hash] The API response @@ -193,6 +206,7 @@ def get_features(marketplace_id, rate_limit: 2.0) # Returns a list of inventory items that are eligible for the fulfillment feature you specify. # + # @note This operation can make a dynamic sandbox call. # @param [String] marketplace_id The marketplace for which to return a list of the inventory that is eligible for # the specified feature. # @param [String] feature_name The name of the feature for which to return a list of eligible inventory. @@ -219,6 +233,7 @@ def get_feature_inventory(marketplace_id, feature_name, next_token: nil, query_s # parameters for this operation may contain special characters that require URL encoding. To avoid errors with # SKUs when encoding URLs, refer to [URL Encoding](https://developer-docs.amazon.com/sp-api/docs/url-encoding). # + # @note This operation can make a dynamic sandbox call. # @param [String] marketplace_id The marketplace for which to return the count. # @param [String] feature_name The name of the feature. # @param [String] seller_sku Used to identify an item in the given marketplace. `SellerSKU` is qualified by the diff --git a/lib/peddler/api/listings_items_2020_09_01.rb b/lib/peddler/api/listings_items_2020_09_01.rb index d2e4c4ec..66dfaf82 100644 --- a/lib/peddler/api/listings_items_2020_09_01.rb +++ b/lib/peddler/api/listings_items_2020_09_01.rb @@ -16,6 +16,7 @@ class ListingsItems20200901 < API # successfully call the API. To avoid errors with SKUs when encoding URLs, refer to [URL # Encoding](https://developer-docs.amazon.com/sp-api/docs/url-encoding). # + # @note This operation can make a static sandbox call. # @param [String] seller_id A selling partner identifier, such as a merchant account or vendor code. # @param [String] sku A selling partner provided identifier for an Amazon listing. # @param [Array] marketplace_ids A comma-delimited list of Amazon marketplace identifiers for the request. @@ -25,8 +26,6 @@ class ListingsItems20200901 < API # @param [Float] rate_limit Requests per second # @return [Hash] The API response def delete_listings_item(seller_id, sku, marketplace_ids, issue_locale: nil, rate_limit: 5.0) - cannot_sandbox! - path = "/listings/2020-09-01/items/#{seller_id}/#{sku}" params = { "marketplaceIds" => marketplace_ids, @@ -42,6 +41,7 @@ def delete_listings_item(seller_id, sku, marketplace_ids, issue_locale: nil, rat # successfully call the API. To avoid errors with SKUs when encoding URLs, refer to [URL # Encoding](https://developer-docs.amazon.com/sp-api/docs/url-encoding). # + # @note This operation can make a static sandbox call. # @param [String] seller_id A selling partner identifier, such as a merchant account or vendor code. # @param [String] sku A selling partner provided identifier for an Amazon listing. # @param [Array] marketplace_ids A comma-delimited list of Amazon marketplace identifiers for the request. @@ -52,8 +52,6 @@ def delete_listings_item(seller_id, sku, marketplace_ids, issue_locale: nil, rat # @param [Float] rate_limit Requests per second # @return [Hash] The API response def patch_listings_item(seller_id, sku, marketplace_ids, body, issue_locale: nil, rate_limit: 5.0) - cannot_sandbox! - path = "/listings/2020-09-01/items/#{seller_id}/#{sku}" params = { "marketplaceIds" => marketplace_ids, @@ -68,6 +66,7 @@ def patch_listings_item(seller_id, sku, marketplace_ids, body, issue_locale: nil # successfully call the API. To avoid errors with SKUs when encoding URLs, refer to [URL # Encoding](https://developer-docs.amazon.com/sp-api/docs/url-encoding). # + # @note This operation can make a static sandbox call. # @param [String] seller_id A selling partner identifier, such as a merchant account or vendor code. # @param [String] sku A selling partner provided identifier for an Amazon listing. # @param [Array] marketplace_ids A comma-delimited list of Amazon marketplace identifiers for the request. @@ -78,8 +77,6 @@ def patch_listings_item(seller_id, sku, marketplace_ids, body, issue_locale: nil # @param [Float] rate_limit Requests per second # @return [Hash] The API response def put_listings_item(seller_id, sku, marketplace_ids, body, issue_locale: nil, rate_limit: 5.0) - cannot_sandbox! - path = "/listings/2020-09-01/items/#{seller_id}/#{sku}" params = { "marketplaceIds" => marketplace_ids, diff --git a/lib/peddler/api/listings_items_2021_08_01.rb b/lib/peddler/api/listings_items_2021_08_01.rb index f0750ce3..5cac4ed7 100644 --- a/lib/peddler/api/listings_items_2021_08_01.rb +++ b/lib/peddler/api/listings_items_2021_08_01.rb @@ -17,6 +17,7 @@ class ListingsItems20210801 < API # successfully call the API. To avoid errors with SKUs when encoding URLs, refer to [URL # Encoding](https://developer-docs.amazon.com/sp-api/docs/url-encoding). # + # @note This operation can make a static sandbox call. # @param [String] seller_id A selling partner identifier, such as a merchant account or vendor code. # @param [String] sku A selling partner provided identifier for an Amazon listing. # @param [Array] marketplace_ids A comma-delimited list of Amazon marketplace identifiers for the request. @@ -26,8 +27,6 @@ class ListingsItems20210801 < API # @param [Float] rate_limit Requests per second # @return [Hash] The API response def delete_listings_item(seller_id, sku, marketplace_ids, issue_locale: nil, rate_limit: 5.0) - cannot_sandbox! - path = "/listings/2021-08-01/items/#{seller_id}/#{sku}" params = { "marketplaceIds" => marketplace_ids, @@ -42,6 +41,7 @@ def delete_listings_item(seller_id, sku, marketplace_ids, issue_locale: nil, rat # successfully call the API. To avoid errors with SKUs when encoding URLs, refer to [URL # Encoding](https://developer-docs.amazon.com/sp-api/docs/url-encoding). # + # @note This operation can make a static sandbox call. # @param [String] seller_id A selling partner identifier, such as a merchant account or vendor code. # @param [String] sku A selling partner provided identifier for an Amazon listing. # @param [Array] marketplace_ids A comma-delimited list of Amazon marketplace identifiers for the request. @@ -54,7 +54,6 @@ def delete_listings_item(seller_id, sku, marketplace_ids, issue_locale: nil, rat # @return [Hash] The API response def get_listings_item(seller_id, sku, marketplace_ids, issue_locale: nil, included_data: ["summaries"], rate_limit: 5.0) - cannot_sandbox! path = "/listings/2021-08-01/items/#{seller_id}/#{sku}" params = { @@ -73,6 +72,7 @@ def get_listings_item(seller_id, sku, marketplace_ids, issue_locale: nil, includ # successfully call the API. To avoid errors with SKUs when encoding URLs, refer to [URL # Encoding](https://developer-docs.amazon.com/sp-api/docs/url-encoding). # + # @note This operation can make a static sandbox call. # @param [String] seller_id A selling partner identifier, such as a merchant account or vendor code. # @param [String] sku A selling partner provided identifier for an Amazon listing. # @param [Array] marketplace_ids A comma-delimited list of Amazon marketplace identifiers for the request. @@ -87,7 +87,6 @@ def get_listings_item(seller_id, sku, marketplace_ids, issue_locale: nil, includ # @return [Hash] The API response def patch_listings_item(seller_id, sku, marketplace_ids, body, included_data: ["issues"], mode: nil, issue_locale: nil, rate_limit: 5.0) - cannot_sandbox! path = "/listings/2021-08-01/items/#{seller_id}/#{sku}" params = { @@ -106,6 +105,7 @@ def patch_listings_item(seller_id, sku, marketplace_ids, body, included_data: [" # successfully call the API. To avoid errors with SKUs when encoding URLs, refer to [URL # Encoding](https://developer-docs.amazon.com/sp-api/docs/url-encoding). # + # @note This operation can make a static sandbox call. # @param [String] seller_id A selling partner identifier, such as a merchant account or vendor code. # @param [String] sku A selling partner provided identifier for an Amazon listing. # @param [Array] marketplace_ids A comma-delimited list of Amazon marketplace identifiers for the request. @@ -120,7 +120,6 @@ def patch_listings_item(seller_id, sku, marketplace_ids, body, included_data: [" # @return [Hash] The API response def put_listings_item(seller_id, sku, marketplace_ids, body, included_data: ["issues"], mode: nil, issue_locale: nil, rate_limit: 5.0) - cannot_sandbox! path = "/listings/2021-08-01/items/#{seller_id}/#{sku}" params = { @@ -135,6 +134,7 @@ def put_listings_item(seller_id, sku, marketplace_ids, body, included_data: ["is # Search for and return list of listings items and respective details for a selling partner. # + # @note This operation can make a static sandbox call. # @param [String] seller_id A selling partner identifier, such as a merchant account or vendor code. # @param [Array] marketplace_ids A comma-delimited list of Amazon marketplace identifiers for the request. # @param [Array] identifiers A comma-delimited list of product identifiers to search for listings items @@ -152,7 +152,6 @@ def put_listings_item(seller_id, sku, marketplace_ids, body, included_data: ["is # @return [Hash] The API response def search_listings_items(seller_id, marketplace_ids, identifiers: nil, identifiers_type: nil, page_size: 10, page_token: nil, included_data: ["summaries"], issue_locale: nil, rate_limit: 5.0) - cannot_sandbox! path = "/listings/2021-08-01/items/#{seller_id}" params = { diff --git a/lib/peddler/api/listings_restrictions_2021_08_01.rb b/lib/peddler/api/listings_restrictions_2021_08_01.rb index e7b71fe6..97cf1cb6 100644 --- a/lib/peddler/api/listings_restrictions_2021_08_01.rb +++ b/lib/peddler/api/listings_restrictions_2021_08_01.rb @@ -12,6 +12,7 @@ class API class ListingsRestrictions20210801 < API # Returns listing restrictions for an item in the Amazon Catalog. # + # @note This operation can make a static sandbox call. # @param [String] asin The Amazon Standard Identification Number (ASIN) of the item. # @param [String] condition_type The condition used to filter restrictions. # @param [String] seller_id A selling partner identifier, such as a merchant account. @@ -23,7 +24,6 @@ class ListingsRestrictions20210801 < API # @return [Hash] The API response def get_listings_restrictions(asin, seller_id, marketplace_ids, condition_type: nil, reason_locale: nil, rate_limit: 5.0) - cannot_sandbox! path = "/listings/2021-08-01/restrictions" params = { diff --git a/lib/peddler/api/merchant_fulfillment_v0.rb b/lib/peddler/api/merchant_fulfillment_v0.rb index 9a60e953..b3f0896f 100644 --- a/lib/peddler/api/merchant_fulfillment_v0.rb +++ b/lib/peddler/api/merchant_fulfillment_v0.rb @@ -11,12 +11,11 @@ class API class MerchantFulfillmentV0 < API # Returns a list of shipping service offers that satisfy the specified shipment request details. # + # @note This operation can make a static sandbox call. # @param [Hash] body Request schema for GetEligibleShipmentServices operation. # @param [Float] rate_limit Requests per second # @return [Hash] The API response def get_eligible_shipment_services(body, rate_limit: 5.0) - cannot_sandbox! - path = "/mfn/v0/eligibleShippingServices" meter(rate_limit).post(path, body:) @@ -24,12 +23,11 @@ def get_eligible_shipment_services(body, rate_limit: 5.0) # Returns the shipment information for an existing shipment. # + # @note This operation can make a static sandbox call. # @param [String] shipment_id The Amazon-defined shipment identifier for the shipment. # @param [Float] rate_limit Requests per second # @return [Hash] The API response def get_shipment(shipment_id, rate_limit: 1.0) - cannot_sandbox! - path = "/mfn/v0/shipments/#{shipment_id}" meter(rate_limit).get(path) @@ -37,12 +35,11 @@ def get_shipment(shipment_id, rate_limit: 1.0) # Cancel the shipment indicated by the specified shipment identifier. # + # @note This operation can make a static sandbox call. # @param [String] shipment_id The Amazon-defined shipment identifier for the shipment to cancel. # @param [Float] rate_limit Requests per second # @return [Hash] The API response def cancel_shipment(shipment_id, rate_limit: 1.0) - cannot_sandbox! - path = "/mfn/v0/shipments/#{shipment_id}" meter(rate_limit).delete(path) @@ -50,12 +47,11 @@ def cancel_shipment(shipment_id, rate_limit: 1.0) # Create a shipment with the information provided. # + # @note This operation can make a static sandbox call. # @param [Hash] body Request schema for CreateShipment operation. # @param [Float] rate_limit Requests per second # @return [Hash] The API response def create_shipment(body, rate_limit: 1.0) - cannot_sandbox! - path = "/mfn/v0/shipments" meter(rate_limit).post(path, body:) @@ -64,12 +60,11 @@ def create_shipment(body, rate_limit: 1.0) # Gets a list of additional seller inputs required for a ship method. This is generally used for international # shipping. # + # @note This operation can make a static sandbox call. # @param [Hash] body Request schema for GetAdditionalSellerInputs operation. # @param [Float] rate_limit Requests per second # @return [Hash] The API response def get_additional_seller_inputs(body, rate_limit: 1.0) - cannot_sandbox! - path = "/mfn/v0/additionalSellerInputs" meter(rate_limit).post(path, body:) diff --git a/lib/peddler/api/messaging_v1.rb b/lib/peddler/api/messaging_v1.rb index dfa2a25c..dcf19537 100644 --- a/lib/peddler/api/messaging_v1.rb +++ b/lib/peddler/api/messaging_v1.rb @@ -15,6 +15,7 @@ class MessagingV1 < API # by an actions object, which contains a path and query parameter(s). You can use the path and parameter(s) to # call an operation that sends a message. # + # @note This operation can make a static sandbox call. # @param [String] amazon_order_id An Amazon order identifier. This specifies the order for which you want a list # of available message types. # @param [Array] marketplace_ids A marketplace identifier. This specifies the marketplace in which the @@ -22,8 +23,6 @@ class MessagingV1 < API # @param [Float] rate_limit Requests per second # @return [Hash] The API response def get_messaging_actions_for_order(amazon_order_id, marketplace_ids, rate_limit: 1.0) - cannot_sandbox! - path = "/messaging/v1/orders/#{amazon_order_id}" params = { "marketplaceIds" => marketplace_ids, @@ -35,6 +34,7 @@ def get_messaging_actions_for_order(amazon_order_id, marketplace_ids, rate_limit # Sends a message asking a buyer to provide or verify customization details such as name spelling, images, # initials, etc. # + # @note This operation can make a static sandbox call. # @param [String] amazon_order_id An Amazon order identifier. This specifies the order for which a message is # sent. # @param [Array] marketplace_ids A marketplace identifier. This specifies the marketplace in which the @@ -43,8 +43,6 @@ def get_messaging_actions_for_order(amazon_order_id, marketplace_ids, rate_limit # @param [Float] rate_limit Requests per second # @return [Hash] The API response def confirm_customization_details(amazon_order_id, marketplace_ids, body, rate_limit: 1.0) - cannot_sandbox! - path = "/messaging/v1/orders/#{amazon_order_id}/messages/confirmCustomizationDetails" params = { "marketplaceIds" => marketplace_ids, @@ -55,6 +53,7 @@ def confirm_customization_details(amazon_order_id, marketplace_ids, body, rate_l # Sends a message to a buyer to arrange a delivery or to confirm contact information for making a delivery. # + # @note This operation can make a static sandbox call. # @param [String] amazon_order_id An Amazon order identifier. This specifies the order for which a message is # sent. # @param [Array] marketplace_ids A marketplace identifier. This specifies the marketplace in which the @@ -63,8 +62,6 @@ def confirm_customization_details(amazon_order_id, marketplace_ids, body, rate_l # @param [Float] rate_limit Requests per second # @return [Hash] The API response def create_confirm_delivery_details(amazon_order_id, marketplace_ids, body, rate_limit: 1.0) - cannot_sandbox! - path = "/messaging/v1/orders/#{amazon_order_id}/messages/confirmDeliveryDetails" params = { "marketplaceIds" => marketplace_ids, @@ -76,6 +73,7 @@ def create_confirm_delivery_details(amazon_order_id, marketplace_ids, body, rate # Sends a critical message that contains documents that a seller is legally obligated to provide to the buyer. # This message should only be used to deliver documents that are required by law. # + # @note This operation can make a static sandbox call. # @param [String] amazon_order_id An Amazon order identifier. This specifies the order for which a message is # sent. # @param [Array] marketplace_ids A marketplace identifier. This specifies the marketplace in which the @@ -84,8 +82,6 @@ def create_confirm_delivery_details(amazon_order_id, marketplace_ids, body, rate # @param [Float] rate_limit Requests per second # @return [Hash] The API response def create_legal_disclosure(amazon_order_id, marketplace_ids, body, rate_limit: 1.0) - cannot_sandbox! - path = "/messaging/v1/orders/#{amazon_order_id}/messages/legalDisclosure" params = { "marketplaceIds" => marketplace_ids, @@ -97,6 +93,7 @@ def create_legal_disclosure(amazon_order_id, marketplace_ids, body, rate_limit: # Sends a non-critical message that asks a buyer to remove their negative feedback. This message should only be # sent after the seller has resolved the buyer's problem. # + # @note This operation can make a static sandbox call. # @param [String] amazon_order_id An Amazon order identifier. This specifies the order for which a message is # sent. # @param [Array] marketplace_ids A marketplace identifier. This specifies the marketplace in which the @@ -104,8 +101,6 @@ def create_legal_disclosure(amazon_order_id, marketplace_ids, body, rate_limit: # @param [Float] rate_limit Requests per second # @return [Hash] The API response def create_negative_feedback_removal(amazon_order_id, marketplace_ids, rate_limit: 1.0) - cannot_sandbox! - path = "/messaging/v1/orders/#{amazon_order_id}/messages/negativeFeedbackRemoval" params = { "marketplaceIds" => marketplace_ids, @@ -116,6 +111,7 @@ def create_negative_feedback_removal(amazon_order_id, marketplace_ids, rate_limi # Sends a message to ask a buyer an order-related question prior to shipping their order. # + # @note This operation can make a static sandbox call. # @param [String] amazon_order_id An Amazon order identifier. This specifies the order for which a message is # sent. # @param [Array] marketplace_ids A marketplace identifier. This specifies the marketplace in which the @@ -124,8 +120,6 @@ def create_negative_feedback_removal(amazon_order_id, marketplace_ids, rate_limi # @param [Float] rate_limit Requests per second # @return [Hash] The API response def create_confirm_order_details(amazon_order_id, marketplace_ids, body, rate_limit: 1.0) - cannot_sandbox! - path = "/messaging/v1/orders/#{amazon_order_id}/messages/confirmOrderDetails" params = { "marketplaceIds" => marketplace_ids, @@ -137,6 +131,7 @@ def create_confirm_order_details(amazon_order_id, marketplace_ids, body, rate_li # Sends a message to contact a Home Service customer to arrange a service call or to gather information prior to a # service call. # + # @note This operation can make a static sandbox call. # @param [String] amazon_order_id An Amazon order identifier. This specifies the order for which a message is # sent. # @param [Array] marketplace_ids A marketplace identifier. This specifies the marketplace in which the @@ -145,8 +140,6 @@ def create_confirm_order_details(amazon_order_id, marketplace_ids, body, rate_li # @param [Float] rate_limit Requests per second # @return [Hash] The API response def create_confirm_service_details(amazon_order_id, marketplace_ids, body, rate_limit: 1.0) - cannot_sandbox! - path = "/messaging/v1/orders/#{amazon_order_id}/messages/confirmServiceDetails" params = { "marketplaceIds" => marketplace_ids, @@ -158,6 +151,7 @@ def create_confirm_service_details(amazon_order_id, marketplace_ids, body, rate_ # Sends a message to a buyer to provide details about an Amazon Motors order. This message can only be sent by # Amazon Motors sellers. # + # @note This operation can make a static sandbox call. # @param [String] amazon_order_id An Amazon order identifier. This specifies the order for which a message is # sent. # @param [Array] marketplace_ids A marketplace identifier. This specifies the marketplace in which the @@ -166,8 +160,6 @@ def create_confirm_service_details(amazon_order_id, marketplace_ids, body, rate_ # @param [Float] rate_limit Requests per second # @return [Hash] The API response def create_amazon_motors(amazon_order_id, marketplace_ids, body, rate_limit: 1.0) - cannot_sandbox! - path = "/messaging/v1/orders/#{amazon_order_id}/messages/amazonMotors" params = { "marketplaceIds" => marketplace_ids, @@ -178,6 +170,7 @@ def create_amazon_motors(amazon_order_id, marketplace_ids, body, rate_limit: 1.0 # Sends a message to a buyer to provide details about warranty information on a purchase in their order. # + # @note This operation can make a static sandbox call. # @param [String] amazon_order_id An Amazon order identifier. This specifies the order for which a message is # sent. # @param [Array] marketplace_ids A marketplace identifier. This specifies the marketplace in which the @@ -186,8 +179,6 @@ def create_amazon_motors(amazon_order_id, marketplace_ids, body, rate_limit: 1.0 # @param [Float] rate_limit Requests per second # @return [Hash] The API response def create_warranty(amazon_order_id, marketplace_ids, body, rate_limit: 1.0) - cannot_sandbox! - path = "/messaging/v1/orders/#{amazon_order_id}/messages/warranty" params = { "marketplaceIds" => marketplace_ids, @@ -198,6 +189,7 @@ def create_warranty(amazon_order_id, marketplace_ids, body, rate_limit: 1.0) # Returns a response containing attributes related to an order. This includes buyer preferences. # + # @note This operation can make a static sandbox call. # @param [String] amazon_order_id An Amazon order identifier. This specifies the order for which a message is # sent. # @param [Array] marketplace_ids A marketplace identifier. This specifies the marketplace in which the @@ -205,8 +197,6 @@ def create_warranty(amazon_order_id, marketplace_ids, body, rate_limit: 1.0) # @param [Float] rate_limit Requests per second # @return [Hash] The API response def get_attributes(amazon_order_id, marketplace_ids, rate_limit: 1.0) - cannot_sandbox! - path = "/messaging/v1/orders/#{amazon_order_id}/attributes" params = { "marketplaceIds" => marketplace_ids, @@ -217,6 +207,7 @@ def get_attributes(amazon_order_id, marketplace_ids, rate_limit: 1.0) # Sends a message to a buyer to share a digital access key needed to utilize digital content in their order. # + # @note This operation can make a static sandbox call. # @param [String] amazon_order_id An Amazon order identifier. This specifies the order for which a message is # sent. # @param [Array] marketplace_ids A marketplace identifier. This specifies the marketplace in which the @@ -225,8 +216,6 @@ def get_attributes(amazon_order_id, marketplace_ids, rate_limit: 1.0) # @param [Float] rate_limit Requests per second # @return [Hash] The API response def create_digital_access_key(amazon_order_id, marketplace_ids, body, rate_limit: 1.0) - cannot_sandbox! - path = "/messaging/v1/orders/#{amazon_order_id}/messages/digitalAccessKey" params = { "marketplaceIds" => marketplace_ids, @@ -238,6 +227,7 @@ def create_digital_access_key(amazon_order_id, marketplace_ids, body, rate_limit # Sends a critical message to a buyer that an unexpected problem was encountered affecting the completion of the # order. # + # @note This operation can make a static sandbox call. # @param [String] amazon_order_id An Amazon order identifier. This specifies the order for which a message is # sent. # @param [Array] marketplace_ids A marketplace identifier. This specifies the marketplace in which the @@ -246,8 +236,6 @@ def create_digital_access_key(amazon_order_id, marketplace_ids, body, rate_limit # @param [Float] rate_limit Requests per second # @return [Hash] The API response def create_unexpected_problem(amazon_order_id, marketplace_ids, body, rate_limit: 1.0) - cannot_sandbox! - path = "/messaging/v1/orders/#{amazon_order_id}/messages/unexpectedProblem" params = { "marketplaceIds" => marketplace_ids, @@ -258,6 +246,7 @@ def create_unexpected_problem(amazon_order_id, marketplace_ids, body, rate_limit # Sends a message providing the buyer an invoice # + # @note This operation can make a static sandbox call. # @param [String] amazon_order_id An Amazon order identifier. This specifies the order for which a message is # sent. # @param [Array] marketplace_ids A marketplace identifier. This specifies the marketplace in which the @@ -266,8 +255,6 @@ def create_unexpected_problem(amazon_order_id, marketplace_ids, body, rate_limit # @param [Float] rate_limit Requests per second # @return [Hash] The API response def send_invoice(amazon_order_id, marketplace_ids, body, rate_limit: nil) - cannot_sandbox! - path = "/messaging/v1/orders/#{amazon_order_id}/messages/invoice" params = { "marketplaceIds" => marketplace_ids, diff --git a/lib/peddler/api/notifications_v1.rb b/lib/peddler/api/notifications_v1.rb index a855b67d..c06c5c38 100644 --- a/lib/peddler/api/notifications_v1.rb +++ b/lib/peddler/api/notifications_v1.rb @@ -16,12 +16,11 @@ class NotificationsV1 < API # subscription's information. You can use this API to get subscription information when you do not have a # subscription identifier. # + # @note This operation can make a static sandbox call. # @param [String] payload_version The version of the payload object to be used in the notification. # @param [Float] rate_limit Requests per second # @return [Hash] The API response def get_subscription(payload_version: nil, rate_limit: 1.0) - cannot_sandbox! - path = "/notifications/v1/subscriptions/#{notification_type}" params = { "payloadVersion" => payload_version, @@ -35,12 +34,11 @@ def get_subscription(payload_version: nil, rate_limit: 1.0) # where the specified notification type supports multiple payload versions, you can utilize this API to subscribe # to a different payload version if you already have an existing subscription for a different payload version. # + # @note This operation can make a static sandbox call. # @param [Hash] body # @param [Float] rate_limit Requests per second # @return [Hash] The API response def create_subscription(body, rate_limit: 1.0) - cannot_sandbox! - path = "/notifications/v1/subscriptions/#{notification_type}" meter(rate_limit).post(path, body:) @@ -50,12 +48,11 @@ def create_subscription(body, rate_limit: 1.0) # operation is grantless. For more information, refer to [Grantless # operations](https://developer-docs.amazon.com/sp-api/docs/grantless-operations). # + # @note This operation can make a static sandbox call. # @param [String] subscription_id The identifier for the subscription that you want to get. # @param [Float] rate_limit Requests per second # @return [Hash] The API response def get_subscription_by_id(subscription_id, rate_limit: 1.0) - cannot_sandbox! - path = "/notifications/v1/subscriptions/#{notification_type}/#{subscription_id}" meter(rate_limit).get(path) @@ -67,12 +64,11 @@ def get_subscription_by_id(subscription_id, rate_limit: 1.0) # `deleteSubscriptionById` operation is grantless. For more information, refer to [Grantless # operations](https://developer-docs.amazon.com/sp-api/docs/grantless-operations). # + # @note This operation can make a static sandbox call. # @param [String] subscription_id The identifier for the subscription that you want to delete. # @param [Float] rate_limit Requests per second # @return [Hash] The API response def delete_subscription_by_id(subscription_id, rate_limit: 1.0) - cannot_sandbox! - path = "/notifications/v1/subscriptions/#{notification_type}/#{subscription_id}" meter(rate_limit).delete(path) @@ -81,11 +77,10 @@ def delete_subscription_by_id(subscription_id, rate_limit: 1.0) # Returns information about all destinations. The `getDestinations` operation is grantless. For more information, # refer to [Grantless operations](https://developer-docs.amazon.com/sp-api/docs/grantless-operations). # + # @note This operation can make a static sandbox call. # @param [Float] rate_limit Requests per second # @return [Hash] The API response def get_destinations(rate_limit: 1.0) - cannot_sandbox! - path = "/notifications/v1/destinations" meter(rate_limit).get(path) @@ -95,12 +90,11 @@ def get_destinations(rate_limit: 1.0) # more information, refer to [Grantless # operations](https://developer-docs.amazon.com/sp-api/docs/grantless-operations). # + # @note This operation can make a static sandbox call. # @param [Hash] body # @param [Float] rate_limit Requests per second # @return [Hash] The API response def create_destination(body, rate_limit: 1.0) - cannot_sandbox! - path = "/notifications/v1/destinations" meter(rate_limit).post(path, body:) @@ -110,12 +104,11 @@ def create_destination(body, rate_limit: 1.0) # more information, refer to [Grantless # operations](https://developer-docs.amazon.com/sp-api/docs/grantless-operations). # + # @note This operation can make a static sandbox call. # @param [String] destination_id The identifier generated when you created the destination. # @param [Float] rate_limit Requests per second # @return [Hash] The API response def get_destination(destination_id, rate_limit: 1.0) - cannot_sandbox! - path = "/notifications/v1/destinations/#{destination_id}" meter(rate_limit).get(path) @@ -124,12 +117,11 @@ def get_destination(destination_id, rate_limit: 1.0) # Deletes the destination that you specify. The `deleteDestination` operation is grantless. For more information, # refer to [Grantless operations](https://developer-docs.amazon.com/sp-api/docs/grantless-operations). # + # @note This operation can make a static sandbox call. # @param [String] destination_id The identifier for the destination that you want to delete. # @param [Float] rate_limit Requests per second # @return [Hash] The API response def delete_destination(destination_id, rate_limit: 1.0) - cannot_sandbox! - path = "/notifications/v1/destinations/#{destination_id}" meter(rate_limit).delete(path) diff --git a/lib/peddler/api/orders_v0.rb b/lib/peddler/api/orders_v0.rb index cfb639ba..f140ff77 100644 --- a/lib/peddler/api/orders_v0.rb +++ b/lib/peddler/api/orders_v0.rb @@ -16,6 +16,7 @@ class OrdersV0 < API # types of orders, you can apply filters to your request. `NextToken` doesn't affect any filters that you include # in your request; it only impacts the pagination for the filtered orders response. # + # @note This operation can make a static sandbox call. # @param [String] created_after Use this date to select orders created after (or at) a specified time. Only orders # placed after the specified time are returned. The date must be in [ISO # 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) format. **Note**: Either the `CreatedAfter` @@ -112,7 +113,6 @@ def get_orders( earliest_delivery_date_before: nil, earliest_delivery_date_after: nil, latest_delivery_date_before: nil, latest_delivery_date_after: nil, rate_limit: 0.0167 ) - cannot_sandbox! path = "/orders/v0/orders" params = { @@ -145,12 +145,11 @@ def get_orders( # Returns the order that you specify. # + # @note This operation can make a static sandbox call. # @param [String] order_id An Amazon-defined order identifier, in 3-7-7 format. # @param [Float] rate_limit Requests per second # @return [Hash] The API response def get_order(order_id, rate_limit: 0.5) - cannot_sandbox! - path = "/orders/v0/orders/#{order_id}" meter(rate_limit).get(path) @@ -158,12 +157,11 @@ def get_order(order_id, rate_limit: 0.5) # Returns buyer information for the order that you specify. # + # @note This operation can make a static sandbox call. # @param [String] order_id An `orderId` is an Amazon-defined order identifier, in 3-7-7 format. # @param [Float] rate_limit Requests per second # @return [Hash] The API response def get_order_buyer_info(order_id, rate_limit: 0.5) - cannot_sandbox! - path = "/orders/v0/orders/#{order_id}/buyerInfo" meter(rate_limit).get(path) @@ -171,12 +169,11 @@ def get_order_buyer_info(order_id, rate_limit: 0.5) # Returns the shipping address for the order that you specify. # + # @note This operation can make a static sandbox call. # @param [String] order_id An `orderId` is an Amazon-defined order identifier, in 3-7-7 format. # @param [Float] rate_limit Requests per second # @return [Hash] The API response def get_order_address(order_id, rate_limit: 0.5) - cannot_sandbox! - path = "/orders/v0/orders/#{order_id}/address" meter(rate_limit).get(path) @@ -184,12 +181,11 @@ def get_order_address(order_id, rate_limit: 0.5) # Returns the fulfillment instructions for the order that you specify. # + # @note This operation can make a static sandbox call. # @param [String] order_id An Amazon-defined order identifier, in 3-7-7 format. # @param [Float] rate_limit Requests per second # @return [Hash] The API response def get_order_fulfillment_instructions(order_id, rate_limit: 0.5) - cannot_sandbox! - path = "/orders/v0/orders/#{order_id}/fulfillmentInstructions" meter(rate_limit).get(path) @@ -203,13 +199,12 @@ def get_order_fulfillment_instructions(order_id, rate_limit: 0.5) # Shipped, or Shipped state, the getOrderItems operation returns information about pricing, taxes, shipping # charges, gift status and promotions for the order items in the order. # + # @note This operation can make a static sandbox call. # @param [String] order_id An Amazon-defined order identifier, in 3-7-7 format. # @param [String] next_token A string token returned in the response of your previous request. # @param [Float] rate_limit Requests per second # @return [Hash] The API response def get_order_items(order_id, next_token: nil, rate_limit: 0.5) - cannot_sandbox! - path = "/orders/v0/orders/#{order_id}/orderItems" params = { "NextToken" => next_token, @@ -220,13 +215,12 @@ def get_order_items(order_id, next_token: nil, rate_limit: 0.5) # Returns buyer information for the order items in the order that you specify. # + # @note This operation can make a static sandbox call. # @param [String] order_id An Amazon-defined order identifier, in 3-7-7 format. # @param [String] next_token A string token returned in the response of your previous request. # @param [Float] rate_limit Requests per second # @return [Hash] The API response def get_order_items_buyer_info(order_id, next_token: nil, rate_limit: 0.5) - cannot_sandbox! - path = "/orders/v0/orders/#{order_id}/orderItems/buyerInfo" params = { "NextToken" => next_token, @@ -237,13 +231,12 @@ def get_order_items_buyer_info(order_id, next_token: nil, rate_limit: 0.5) # Update the shipment status for an order that you specify. # + # @note This operation can make a static sandbox call. # @param [String] order_id An Amazon-defined order identifier, in 3-7-7 format. # @param [Hash] payload The request body for the `updateShipmentStatus` operation. # @param [Float] rate_limit Requests per second # @return [Hash] The API response def update_shipment_status(order_id, payload, rate_limit: 5.0) - cannot_sandbox! - path = "/orders/v0/orders/#{order_id}/shipment" body = payload @@ -252,12 +245,11 @@ def update_shipment_status(order_id, payload, rate_limit: 5.0) # Returns regulated information for the order that you specify. # + # @note This operation can make a static sandbox call. # @param [String] order_id An Amazon-defined order identifier, in 3-7-7 format. # @param [Float] rate_limit Requests per second # @return [Hash] The API response def get_order_regulated_info(order_id, rate_limit: 0.5) - cannot_sandbox! - path = "/orders/v0/orders/#{order_id}/regulatedInfo" meter(rate_limit).get(path) @@ -265,13 +257,12 @@ def get_order_regulated_info(order_id, rate_limit: 0.5) # Updates (approves or rejects) the verification status of an order containing regulated products. # + # @note This operation can make a static sandbox call. # @param [String] order_id An Amazon-defined order identifier, in 3-7-7 format. # @param [Hash] payload The request body for the `updateVerificationStatus` operation. # @param [Float] rate_limit Requests per second # @return [Hash] The API response def update_verification_status(order_id, payload, rate_limit: 0.5) - cannot_sandbox! - path = "/orders/v0/orders/#{order_id}/regulatedInfo" body = payload @@ -280,13 +271,12 @@ def update_verification_status(order_id, payload, rate_limit: 0.5) # Updates the shipment confirmation status for a specified order. # + # @note This operation can make a static sandbox call. # @param [String] order_id An Amazon-defined order identifier, in 3-7-7 format. # @param [Hash] payload Request body of `confirmShipment`. # @param [Float] rate_limit Requests per second # @return [Hash] The API response def confirm_shipment(order_id, payload, rate_limit: 2.0) - cannot_sandbox! - path = "/orders/v0/orders/#{order_id}/shipmentConfirmation" body = payload diff --git a/lib/peddler/api/product_fees_v0.rb b/lib/peddler/api/product_fees_v0.rb index 9b1bf0dc..c716237d 100644 --- a/lib/peddler/api/product_fees_v0.rb +++ b/lib/peddler/api/product_fees_v0.rb @@ -24,14 +24,13 @@ class ProductFeesV0 < API # @note When sellers use the `getMyFeesEstimateForSKU` operation with their `SellerSKU`, they get accurate fees # based on real item measurements, but only after they've sent their items to Amazon. # + # @note This operation can make a static sandbox call. # @param [Hash] body # @param [String] seller_sku Used to identify an item in the given marketplace. SellerSKU is qualified by the # seller's SellerId, which is included with every operation that you submit. # @param [Float] rate_limit Requests per second # @return [Hash] The API response def get_my_fees_estimate_for_sku(body, seller_sku, rate_limit: 1.0) - cannot_sandbox! - path = "/products/fees/v0/listings/#{seller_sku}/feesEstimate" meter(rate_limit).post(path, body:) @@ -49,13 +48,12 @@ def get_my_fees_estimate_for_sku(body, seller_sku, rate_limit: 1.0) # This is because these estimates use the item's catalog size, which might not always match the actual size of # the item sent to Amazon. # + # @note This operation can make a static sandbox call. # @param [Hash] body # @param [String] asin The Amazon Standard Identification Number (ASIN) of the item. # @param [Float] rate_limit Requests per second # @return [Hash] The API response def get_my_fees_estimate_for_asin(body, asin, rate_limit: 1.0) - cannot_sandbox! - path = "/products/fees/v0/items/#{asin}/feesEstimate" meter(rate_limit).post(path, body:) @@ -63,12 +61,11 @@ def get_my_fees_estimate_for_asin(body, asin, rate_limit: 1.0) # Returns the estimated fees for a list of products. # + # @note This operation can make a static sandbox call. # @param [Hash] body # @param [Float] rate_limit Requests per second # @return [Hash] The API response def get_my_fees_estimates(body, rate_limit: 0.5) - cannot_sandbox! - path = "/products/fees/v0/feesEstimate" meter(rate_limit).post(path, body:) diff --git a/lib/peddler/api/product_pricing_2022_05_01.rb b/lib/peddler/api/product_pricing_2022_05_01.rb index 94c7b1a6..29645ea6 100644 --- a/lib/peddler/api/product_pricing_2022_05_01.rb +++ b/lib/peddler/api/product_pricing_2022_05_01.rb @@ -17,13 +17,13 @@ class ProductPricing20220501 < API # change, and different offers may be featured based on other factors, including fulfillment capabilities to a # specific customer. The response to an unsuccessful request includes the available error text. # + # @note This operation can make a static sandbox call. # @param [Hash] get_featured_offer_expected_price_batch_request_body The batch of `getFeaturedOfferExpectedPrice` # requests. # @param [Float] rate_limit Requests per second # @return [Hash] The API response def get_featured_offer_expected_price_batch(get_featured_offer_expected_price_batch_request_body, rate_limit: 0.033) - cannot_sandbox! path = "/batches/products/pricing/2022-05-01/offer/featuredOfferExpectedPrice" body = get_featured_offer_expected_price_batch_request_body @@ -34,12 +34,11 @@ def get_featured_offer_expected_price_batch(get_featured_offer_expected_price_ba # Returns the competitive summary response including featured buying options for the ASIN and `marketplaceId` # combination. # + # @note This operation can make a static sandbox call. # @param [Hash] requests The batch of `getCompetitiveSummary` requests. # @param [Float] rate_limit Requests per second # @return [Hash] The API response def get_competitive_summary(requests, rate_limit: 0.033) - cannot_sandbox! - path = "/batches/products/pricing/2022-05-01/items/competitiveSummary" body = requests diff --git a/lib/peddler/api/product_pricing_v0.rb b/lib/peddler/api/product_pricing_v0.rb index b5b9513f..216c4eb4 100644 --- a/lib/peddler/api/product_pricing_v0.rb +++ b/lib/peddler/api/product_pricing_v0.rb @@ -14,6 +14,7 @@ class ProductPricingV0 < API # call the API. To avoid errors with SKUs when encoding URLs, refer to [URL # Encoding](https://developer-docs.amazon.com/sp-api/docs/url-encoding). # + # @note This operation can make a static sandbox call. # @param [String] marketplace_id A marketplace identifier. Specifies the marketplace for which prices are # returned. # @param [Array] asins A list of up to twenty Amazon Standard Identification Number (ASIN) values used to @@ -32,7 +33,6 @@ class ProductPricingV0 < API # @return [Hash] The API response def get_pricing(marketplace_id, item_type, asins: nil, skus: nil, item_condition: nil, offer_type: nil, rate_limit: 0.5) - cannot_sandbox! path = "/products/pricing/v0/price" params = { @@ -52,6 +52,7 @@ def get_pricing(marketplace_id, item_type, asins: nil, skus: nil, item_condition # call the API. To avoid errors with SKUs when encoding URLs, refer to [URL # Encoding](https://developer-docs.amazon.com/sp-api/docs/url-encoding). # + # @note This operation can make a static sandbox call. # @param [String] marketplace_id A marketplace identifier. Specifies the marketplace for which prices are # returned. # @param [Array] asins A list of up to twenty Amazon Standard Identification Number (ASIN) values used to @@ -68,7 +69,6 @@ def get_pricing(marketplace_id, item_type, asins: nil, skus: nil, item_condition # @return [Hash] The API response def get_competitive_pricing(marketplace_id, item_type, asins: nil, skus: nil, customer_type: nil, rate_limit: 0.5) - cannot_sandbox! path = "/products/pricing/v0/competitivePrice" params = { @@ -87,6 +87,7 @@ def get_competitive_pricing(marketplace_id, item_type, asins: nil, skus: nil, cu # call the API. To avoid errors with SKUs when encoding URLs, refer to [URL # Encoding](https://developer-docs.amazon.com/sp-api/docs/url-encoding). # + # @note This operation can make a static sandbox call. # @param [String] marketplace_id A marketplace identifier. Specifies the marketplace for which prices are # returned. # @param [String] item_condition Filters the offer listings based on item condition. Possible values: New, Used, @@ -97,8 +98,6 @@ def get_competitive_pricing(marketplace_id, item_type, asins: nil, skus: nil, cu # @param [Float] rate_limit Requests per second # @return [Hash] The API response def get_listing_offers(marketplace_id, item_condition, seller_sku, customer_type: nil, rate_limit: 1.0) - cannot_sandbox! - path = "/products/pricing/v0/listings/#{seller_sku}/offers" params = { "MarketplaceId" => marketplace_id, @@ -111,6 +110,7 @@ def get_listing_offers(marketplace_id, item_condition, seller_sku, customer_type # Returns the lowest priced offers for a single item based on ASIN. # + # @note This operation can make a static sandbox call. # @param [String] marketplace_id A marketplace identifier. Specifies the marketplace for which prices are # returned. # @param [String] item_condition Filters the offer listings to be considered based on item condition. Possible @@ -120,8 +120,6 @@ def get_listing_offers(marketplace_id, item_condition, seller_sku, customer_type # @param [Float] rate_limit Requests per second # @return [Hash] The API response def get_item_offers(marketplace_id, item_condition, asin, customer_type: nil, rate_limit: 0.5) - cannot_sandbox! - path = "/products/pricing/v0/items/#{asin}/offers" params = { "MarketplaceId" => marketplace_id, @@ -134,12 +132,11 @@ def get_item_offers(marketplace_id, item_condition, asin, customer_type: nil, ra # Returns the lowest priced offers for a batch of items based on ASIN. # + # @note This operation can make a static sandbox call. # @param [Hash] get_item_offers_batch_request_body # @param [Float] rate_limit Requests per second # @return [Hash] The API response def get_item_offers_batch(get_item_offers_batch_request_body, rate_limit: 0.1) - cannot_sandbox! - path = "/batches/products/pricing/v0/itemOffers" body = get_item_offers_batch_request_body @@ -148,12 +145,11 @@ def get_item_offers_batch(get_item_offers_batch_request_body, rate_limit: 0.1) # Returns the lowest priced offers for a batch of listings by SKU. # + # @note This operation can make a static sandbox call. # @param [Hash] get_listing_offers_batch_request_body # @param [Float] rate_limit Requests per second # @return [Hash] The API response def get_listing_offers_batch(get_listing_offers_batch_request_body, rate_limit: 0.5) - cannot_sandbox! - path = "/batches/products/pricing/v0/listingOffers" body = get_listing_offers_batch_request_body diff --git a/lib/peddler/api/product_type_definitions_2020_09_01.rb b/lib/peddler/api/product_type_definitions_2020_09_01.rb index f9dcd9c1..4d0e092d 100644 --- a/lib/peddler/api/product_type_definitions_2020_09_01.rb +++ b/lib/peddler/api/product_type_definitions_2020_09_01.rb @@ -14,6 +14,7 @@ class API class ProductTypeDefinitions20200901 < API # Search for and return a list of Amazon product types that have definitions available. # + # @note This operation can make a static sandbox call. # @param [Array] keywords A comma-delimited list of keywords to search product types. **Note:** Cannot be # used with `itemName`. # @param [Array] marketplace_ids A comma-delimited list of Amazon marketplace identifiers for the request. @@ -27,7 +28,6 @@ class ProductTypeDefinitions20200901 < API # @return [Hash] The API response def search_definitions_product_types(marketplace_ids, keywords: nil, item_name: nil, locale: nil, search_locale: nil, rate_limit: 5.0) - cannot_sandbox! path = "/definitions/2020-09-01/productTypes" params = { @@ -43,6 +43,7 @@ def search_definitions_product_types(marketplace_ids, keywords: nil, item_name: # Retrieve an Amazon product type definition. # + # @note This operation can make a static sandbox call. # @param [String] product_type The Amazon product type name. # @param [String] seller_id A selling partner identifier. When provided, seller-specific requirements and values # are populated within the product type definition schema, such as brand names associated with the selling @@ -62,7 +63,6 @@ def search_definitions_product_types(marketplace_ids, keywords: nil, item_name: # @return [Hash] The API response def get_definitions_product_type(product_type, marketplace_ids, seller_id: nil, product_type_version: "LATEST", requirements: "LISTING", requirements_enforced: "ENFORCED", locale: "DEFAULT", rate_limit: 5.0) - cannot_sandbox! path = "/definitions/2020-09-01/productTypes/#{product_type}" params = { diff --git a/lib/peddler/api/replenishment_2022_11_07.rb b/lib/peddler/api/replenishment_2022_11_07.rb index 679cc401..11805cc9 100644 --- a/lib/peddler/api/replenishment_2022_11_07.rb +++ b/lib/peddler/api/replenishment_2022_11_07.rb @@ -13,12 +13,11 @@ class API class Replenishment20221107 < API # Returns aggregated replenishment program metrics for a selling partner. # + # @note This operation can make a static sandbox call. # @param [Hash] body The request body for the `getSellingPartnerMetrics` operation. # @param [Float] rate_limit Requests per second # @return [Hash] The API response def get_selling_partner_metrics(body: nil, rate_limit: 1.0) - cannot_sandbox! - path = "/replenishment/2022-11-07/sellingPartners/metrics/search" meter(rate_limit).post(path, body:) @@ -26,12 +25,11 @@ def get_selling_partner_metrics(body: nil, rate_limit: 1.0) # Returns aggregated replenishment program metrics for a selling partner's offers. # + # @note This operation can make a static sandbox call. # @param [Hash] body The request body for the `listOfferMetrics` operation. # @param [Float] rate_limit Requests per second # @return [Hash] The API response def list_offer_metrics(body: nil, rate_limit: 1.0) - cannot_sandbox! - path = "/replenishment/2022-11-07/offers/metrics/search" meter(rate_limit).post(path, body:) @@ -39,12 +37,11 @@ def list_offer_metrics(body: nil, rate_limit: 1.0) # Returns the details of a selling partner's replenishment program offers. # + # @note This operation can make a static sandbox call. # @param [Hash] body The request body for the `listOffers` operation. # @param [Float] rate_limit Requests per second # @return [Hash] The API response def list_offers(body: nil, rate_limit: 1.0) - cannot_sandbox! - path = "/replenishment/2022-11-07/offers/search" meter(rate_limit).post(path, body:) diff --git a/lib/peddler/api/reports_2021_06_30.rb b/lib/peddler/api/reports_2021_06_30.rb index fcfb085a..14aaf4de 100644 --- a/lib/peddler/api/reports_2021_06_30.rb +++ b/lib/peddler/api/reports_2021_06_30.rb @@ -11,6 +11,7 @@ class API class Reports20210630 < API # Returns report details for the reports that match the filters that you specify. # + # @note This operation can make a static sandbox call. # @param [Array] report_types A list of report types used to filter reports. Refer to [Report Type # Values](https://developer-docs.amazon.com/sp-api/docs/report-type-values) for more information. When # reportTypes is provided, the other filter parameters (processingStatuses, marketplaceIds, createdSince, @@ -32,7 +33,6 @@ class Reports20210630 < API # @return [Hash] The API response def get_reports(report_types: nil, processing_statuses: nil, marketplace_ids: nil, page_size: 10, created_since: nil, created_until: nil, next_token: nil, rate_limit: 0.0222) - cannot_sandbox! path = "/reports/2021-06-30/reports" params = { @@ -50,12 +50,11 @@ def get_reports(report_types: nil, processing_statuses: nil, marketplace_ids: ni # Creates a report. # + # @note This operation can make a static sandbox call. # @param [Hash] body Information required to create the report. # @param [Float] rate_limit Requests per second # @return [Hash] The API response def create_report(body, rate_limit: 0.0167) - cannot_sandbox! - path = "/reports/2021-06-30/reports" meter(rate_limit).post(path, body:) @@ -64,13 +63,12 @@ def create_report(body, rate_limit: 0.0167) # Cancels the report that you specify. Only reports with `processingStatus=IN_QUEUE` can be cancelled. Cancelled # reports are returned in subsequent calls to the `getReport` and `getReports` operations. # + # @note This operation can make a static sandbox call. # @param [String] report_id The identifier for the report. This identifier is unique only in combination with a # seller ID. # @param [Float] rate_limit Requests per second # @return [Hash] The API response def cancel_report(report_id, rate_limit: 0.0222) - cannot_sandbox! - path = "/reports/2021-06-30/reports/#{report_id}" meter(rate_limit).delete(path) @@ -78,13 +76,12 @@ def cancel_report(report_id, rate_limit: 0.0222) # Returns report details (including the `reportDocumentId`, if available) for the report that you specify. # + # @note This operation can make a static sandbox call. # @param [String] report_id The identifier for the report. This identifier is unique only in combination with a # seller ID. # @param [Float] rate_limit Requests per second # @return [Hash] The API response def get_report(report_id, rate_limit: 2.0) - cannot_sandbox! - path = "/reports/2021-06-30/reports/#{report_id}" meter(rate_limit).get(path) @@ -92,13 +89,12 @@ def get_report(report_id, rate_limit: 2.0) # Returns report schedule details that match the filters that you specify. # + # @note This operation can make a static sandbox call. # @param [Array] report_types A list of report types used to filter report schedules. Refer to [Report # Type Values](https://developer-docs.amazon.com/sp-api/docs/report-type-values) for more information. # @param [Float] rate_limit Requests per second # @return [Hash] The API response def get_report_schedules(report_types, rate_limit: 0.0222) - cannot_sandbox! - path = "/reports/2021-06-30/schedules" params = { "reportTypes" => report_types, @@ -110,12 +106,11 @@ def get_report_schedules(report_types, rate_limit: 0.0222) # Creates a report schedule. If a report schedule with the same report type and marketplace IDs already exists, it # will be cancelled and replaced with this one. # + # @note This operation can make a static sandbox call. # @param [Hash] body Information required to create the report schedule. # @param [Float] rate_limit Requests per second # @return [Hash] The API response def create_report_schedule(body, rate_limit: 0.0222) - cannot_sandbox! - path = "/reports/2021-06-30/schedules" meter(rate_limit).post(path, body:) @@ -123,13 +118,12 @@ def create_report_schedule(body, rate_limit: 0.0222) # Cancels the report schedule that you specify. # + # @note This operation can make a static sandbox call. # @param [String] report_schedule_id The identifier for the report schedule. This identifier is unique only in # combination with a seller ID. # @param [Float] rate_limit Requests per second # @return [Hash] The API response def cancel_report_schedule(report_schedule_id, rate_limit: 0.0222) - cannot_sandbox! - path = "/reports/2021-06-30/schedules/#{report_schedule_id}" meter(rate_limit).delete(path) @@ -137,13 +131,12 @@ def cancel_report_schedule(report_schedule_id, rate_limit: 0.0222) # Returns report schedule details for the report schedule that you specify. # + # @note This operation can make a static sandbox call. # @param [String] report_schedule_id The identifier for the report schedule. This identifier is unique only in # combination with a seller ID. # @param [Float] rate_limit Requests per second # @return [Hash] The API response def get_report_schedule(report_schedule_id, rate_limit: 0.0222) - cannot_sandbox! - path = "/reports/2021-06-30/schedules/#{report_schedule_id}" meter(rate_limit).get(path) @@ -151,12 +144,11 @@ def get_report_schedule(report_schedule_id, rate_limit: 0.0222) # Returns the information required for retrieving a report document's contents. # + # @note This operation can make a static sandbox call. # @param [String] report_document_id The identifier for the report document. # @param [Float] rate_limit Requests per second # @return [Hash] The API response def get_report_document(report_document_id, rate_limit: 0.0167) - cannot_sandbox! - path = "/reports/2021-06-30/documents/#{report_document_id}" meter(rate_limit).get(path) diff --git a/lib/peddler/api/sales_v1.rb b/lib/peddler/api/sales_v1.rb index a07406d2..a0894e48 100644 --- a/lib/peddler/api/sales_v1.rb +++ b/lib/peddler/api/sales_v1.rb @@ -10,6 +10,7 @@ class API class SalesV1 < API # Returns aggregated order metrics for given interval, broken down by granularity, for given buyer type. # + # @note This operation can make a static sandbox call. # @param [Array] marketplace_ids A marketplace identifier. This specifies the marketplace in which the # order was placed. Only one marketplace can be specified. For example, ATVPDKIKX0DER indicates the US # marketplace. @@ -50,7 +51,6 @@ class SalesV1 < API # @return [Hash] The API response def get_order_metrics(marketplace_ids, interval, granularity, granularity_time_zone: nil, buyer_type: "All", fulfillment_network: nil, first_day_of_week: "Monday", asin: nil, sku: nil, rate_limit: 0.5) - cannot_sandbox! path = "/sales/v1/orderMetrics" params = { diff --git a/lib/peddler/api/sellers_v1.rb b/lib/peddler/api/sellers_v1.rb index 6ebf3e4b..71d190a7 100644 --- a/lib/peddler/api/sellers_v1.rb +++ b/lib/peddler/api/sellers_v1.rb @@ -15,11 +15,10 @@ class SellersV1 < API # Returns a list of marketplaces where the seller can list items and information about the seller's participation # in those marketplaces. # + # @note This operation can make a static sandbox call. # @param [Float] rate_limit Requests per second # @return [Hash] The API response def get_marketplace_participations(rate_limit: 0.016) - cannot_sandbox! - path = "/sellers/v1/marketplaceParticipations" meter(rate_limit).get(path) @@ -27,11 +26,10 @@ def get_marketplace_participations(rate_limit: 0.016) # Returns information about a seller account and its marketplaces. # + # @note This operation can make a static sandbox call. # @param [Float] rate_limit Requests per second # @return [Hash] The API response def get_account(rate_limit: 0.016) - cannot_sandbox! - path = "/sellers/v1/account" meter(rate_limit).get(path) diff --git a/lib/peddler/api/services_v1.rb b/lib/peddler/api/services_v1.rb index fe63f6bb..b04b8016 100644 --- a/lib/peddler/api/services_v1.rb +++ b/lib/peddler/api/services_v1.rb @@ -11,12 +11,11 @@ class API class ServicesV1 < API # Gets details of service job indicated by the provided `serviceJobID`. # + # @note This operation can make a static sandbox call. # @param [String] service_job_id A service job identifier. # @param [Float] rate_limit Requests per second # @return [Hash] The API response def get_service_job_by_service_job_id(service_job_id, rate_limit: 20.0) - cannot_sandbox! - path = "/service/v1/serviceJobs/#{service_job_id}" meter(rate_limit).get(path) @@ -24,14 +23,13 @@ def get_service_job_by_service_job_id(service_job_id, rate_limit: 20.0) # Cancels the service job indicated by the service job identifier specified. # + # @note This operation can make a static sandbox call. # @param [String] service_job_id An Amazon defined service job identifier. # @param [String] cancellation_reason_code A cancel reason code that specifies the reason for cancelling a service # job. # @param [Float] rate_limit Requests per second # @return [Hash] The API response def cancel_service_job_by_service_job_id(service_job_id, cancellation_reason_code, rate_limit: 5.0) - cannot_sandbox! - path = "/service/v1/serviceJobs/#{service_job_id}/cancellations" params = { "cancellationReasonCode" => cancellation_reason_code, @@ -42,12 +40,11 @@ def cancel_service_job_by_service_job_id(service_job_id, cancellation_reason_cod # Completes the service job indicated by the service job identifier specified. # + # @note This operation can make a static sandbox call. # @param [String] service_job_id An Amazon defined service job identifier. # @param [Float] rate_limit Requests per second # @return [Hash] The API response def complete_service_job_by_service_job_id(service_job_id, rate_limit: 5.0) - cannot_sandbox! - path = "/service/v1/serviceJobs/#{service_job_id}/completions" meter(rate_limit).put(path) @@ -55,6 +52,7 @@ def complete_service_job_by_service_job_id(service_job_id, rate_limit: 5.0) # Gets service job details for the specified filter query. # + # @note This operation can make a static sandbox call. # @param [Array] service_order_ids List of service order ids for the query you want to perform.Max values # supported 20. # @param [Array] service_job_status A list of one or more job status by which to filter the list of jobs. @@ -93,7 +91,6 @@ def get_service_jobs( last_updated_before: nil, schedule_start_date: nil, schedule_end_date: nil, asins: nil, required_skills: nil, store_ids: nil, rate_limit: 10.0 ) - cannot_sandbox! path = "/service/v1/serviceJobs" params = { @@ -120,13 +117,12 @@ def get_service_jobs( # Adds an appointment to the service job indicated by the service job identifier specified. # + # @note This operation can make a static sandbox call. # @param [String] service_job_id An Amazon defined service job identifier. # @param [Hash] body Add appointment operation input details. # @param [Float] rate_limit Requests per second # @return [Hash] The API response def add_appointment_for_service_job_by_service_job_id(service_job_id, body, rate_limit: 5.0) - cannot_sandbox! - path = "/service/v1/serviceJobs/#{service_job_id}/appointments" meter(rate_limit).post(path, body:) @@ -134,6 +130,7 @@ def add_appointment_for_service_job_by_service_job_id(service_job_id, body, rate # Reschedules an appointment for the service job indicated by the service job identifier specified. # + # @note This operation can make a static sandbox call. # @param [String] service_job_id An Amazon defined service job identifier. # @param [String] appointment_id An existing appointment identifier for the Service Job. # @param [Hash] body Reschedule appointment operation input details. @@ -141,7 +138,6 @@ def add_appointment_for_service_job_by_service_job_id(service_job_id, body, rate # @return [Hash] The API response def reschedule_appointment_for_service_job_by_service_job_id(service_job_id, appointment_id, body, rate_limit: 5.0) - cannot_sandbox! path = "/service/v1/serviceJobs/#{service_job_id}/appointments/#{appointment_id}" @@ -150,6 +146,7 @@ def reschedule_appointment_for_service_job_by_service_job_id(service_job_id, app # Assigns new resource(s) or overwrite/update the existing one(s) to a service job appointment. # + # @note This operation can make a static sandbox call. # @param [String] service_job_id An Amazon-defined service job identifier. Get this value by calling the # `getServiceJobs` operation of the Services API. # @param [String] appointment_id An Amazon-defined identifier of active service job appointment. @@ -157,8 +154,6 @@ def reschedule_appointment_for_service_job_by_service_job_id(service_job_id, app # @param [Float] rate_limit Requests per second # @return [Hash] The API response def assign_appointment_resources(service_job_id, appointment_id, body, rate_limit: 1.0) - cannot_sandbox! - path = "/service/v1/serviceJobs/#{service_job_id}/appointments/#{appointment_id}/resources" meter(rate_limit).put(path, body:) @@ -166,6 +161,7 @@ def assign_appointment_resources(service_job_id, appointment_id, body, rate_limi # Updates the appointment fulfillment data related to a given `jobID` and `appointmentID`. # + # @note This operation can make a static sandbox call. # @param [String] service_job_id An Amazon-defined service job identifier. Get this value by calling the # `getServiceJobs` operation of the Services API. # @param [String] appointment_id An Amazon-defined identifier of active service job appointment. @@ -173,8 +169,6 @@ def assign_appointment_resources(service_job_id, appointment_id, body, rate_limi # @param [Float] rate_limit Requests per second # @return [Hash] The API response def set_appointment_fulfillment_data(service_job_id, appointment_id, body, rate_limit: 5.0) - cannot_sandbox! - path = "/service/v1/serviceJobs/#{service_job_id}/appointments/#{appointment_id}/fulfillment" meter(rate_limit).put(path, body:) @@ -182,6 +176,7 @@ def set_appointment_fulfillment_data(service_job_id, appointment_id, body, rate_ # Provides capacity slots in a format similar to availability records. # + # @note This operation can make a static sandbox call. # @param [String] resource_id Resource Identifier. # @param [Hash] body Request body. # @param [Array] marketplace_ids An identifier for the marketplace in which the resource operates. @@ -189,8 +184,6 @@ def set_appointment_fulfillment_data(service_job_id, appointment_id, body, rate_ # @param [Float] rate_limit Requests per second # @return [Hash] The API response def get_range_slot_capacity(resource_id, body, marketplace_ids, next_page_token: nil, rate_limit: 5.0) - cannot_sandbox! - path = "/service/v1/serviceResources/#{resource_id}/capacity/range" params = { "marketplaceIds" => marketplace_ids, @@ -202,6 +195,7 @@ def get_range_slot_capacity(resource_id, body, marketplace_ids, next_page_token: # Provides capacity in fixed-size slots. # + # @note This operation can make a static sandbox call. # @param [String] resource_id Resource Identifier. # @param [Hash] body Request body. # @param [Array] marketplace_ids An identifier for the marketplace in which the resource operates. @@ -209,8 +203,6 @@ def get_range_slot_capacity(resource_id, body, marketplace_ids, next_page_token: # @param [Float] rate_limit Requests per second # @return [Hash] The API response def get_fixed_slot_capacity(resource_id, body, marketplace_ids, next_page_token: nil, rate_limit: 5.0) - cannot_sandbox! - path = "/service/v1/serviceResources/#{resource_id}/capacity/fixed" params = { "marketplaceIds" => marketplace_ids, @@ -222,14 +214,13 @@ def get_fixed_slot_capacity(resource_id, body, marketplace_ids, next_page_token: # Update the schedule of the given resource. # + # @note This operation can make a static sandbox call. # @param [String] resource_id Resource (store) Identifier # @param [Hash] body Schedule details # @param [Array] marketplace_ids An identifier for the marketplace in which the resource operates. # @param [Float] rate_limit Requests per second # @return [Hash] The API response def update_schedule(resource_id, body, marketplace_ids, rate_limit: 5.0) - cannot_sandbox! - path = "/service/v1/serviceResources/#{resource_id}/schedules" params = { "marketplaceIds" => marketplace_ids, @@ -240,13 +231,12 @@ def update_schedule(resource_id, body, marketplace_ids, rate_limit: 5.0) # Create a reservation. # + # @note This operation can make a static sandbox call. # @param [Hash] body Reservation details # @param [Array] marketplace_ids An identifier for the marketplace in which the resource operates. # @param [Float] rate_limit Requests per second # @return [Hash] The API response def create_reservation(body, marketplace_ids, rate_limit: 5.0) - cannot_sandbox! - path = "/service/v1/reservation" params = { "marketplaceIds" => marketplace_ids, @@ -257,14 +247,13 @@ def create_reservation(body, marketplace_ids, rate_limit: 5.0) # Update a reservation. # + # @note This operation can make a static sandbox call. # @param [String] reservation_id Reservation Identifier # @param [Hash] body Reservation details # @param [Array] marketplace_ids An identifier for the marketplace in which the resource operates. # @param [Float] rate_limit Requests per second # @return [Hash] The API response def update_reservation(reservation_id, body, marketplace_ids, rate_limit: 5.0) - cannot_sandbox! - path = "/service/v1/reservation/#{reservation_id}" params = { "marketplaceIds" => marketplace_ids, @@ -275,13 +264,12 @@ def update_reservation(reservation_id, body, marketplace_ids, rate_limit: 5.0) # Cancel a reservation. # + # @note This operation can make a static sandbox call. # @param [String] reservation_id Reservation Identifier # @param [Array] marketplace_ids An identifier for the marketplace in which the resource operates. # @param [Float] rate_limit Requests per second # @return [Hash] The API response def cancel_reservation(reservation_id, marketplace_ids, rate_limit: 5.0) - cannot_sandbox! - path = "/service/v1/reservation/#{reservation_id}" params = { "marketplaceIds" => marketplace_ids, @@ -292,6 +280,7 @@ def cancel_reservation(reservation_id, marketplace_ids, rate_limit: 5.0) # Gets appointment slots for the service associated with the service job id specified. # + # @note This operation can make a static sandbox call. # @param [String] service_job_id A service job identifier to retrive appointment slots for associated service. # @param [Array] marketplace_ids An identifier for the marketplace in which the resource operates. # @param [String] start_time A time from which the appointment slots will be retrieved. The specified time must be @@ -304,7 +293,6 @@ def cancel_reservation(reservation_id, marketplace_ids, rate_limit: 5.0) # @return [Hash] The API response def get_appointmment_slots_by_job_id(service_job_id, marketplace_ids, start_time: nil, end_time: nil, rate_limit: 5.0) - cannot_sandbox! path = "/service/v1/serviceJobs/#{service_job_id}/appointmentSlots" params = { @@ -318,6 +306,7 @@ def get_appointmment_slots_by_job_id(service_job_id, marketplace_ids, start_time # Gets appointment slots as per the service context specified. # + # @note This operation can make a static sandbox call. # @param [String] asin ASIN associated with the service. # @param [String] store_id Store identifier defining the region scope to retrive appointment slots. # @param [Array] marketplace_ids An identifier for the marketplace for which appointment slots are queried @@ -330,8 +319,6 @@ def get_appointmment_slots_by_job_id(service_job_id, marketplace_ids, start_time # @param [Float] rate_limit Requests per second # @return [Hash] The API response def get_appointment_slots(asin, store_id, marketplace_ids, start_time: nil, end_time: nil, rate_limit: 20.0) - cannot_sandbox! - path = "/service/v1/appointmentSlots" params = { "asin" => asin, @@ -346,12 +333,11 @@ def get_appointment_slots(asin, store_id, marketplace_ids, start_time: nil, end_ # Creates an upload destination. # + # @note This operation can make a static sandbox call. # @param [Hash] body Upload document operation input details. # @param [Float] rate_limit Requests per second # @return [Hash] The API response def create_service_document_upload_destination(body, rate_limit: 5.0) - cannot_sandbox! - path = "/service/v1/documents" meter(rate_limit).post(path, body:) diff --git a/lib/peddler/api/shipment_invoicing_v0.rb b/lib/peddler/api/shipment_invoicing_v0.rb index 7c6a0cdc..5a03b760 100644 --- a/lib/peddler/api/shipment_invoicing_v0.rb +++ b/lib/peddler/api/shipment_invoicing_v0.rb @@ -11,14 +11,13 @@ class API class ShipmentInvoicingV0 < API # Returns the shipment details required to issue an invoice for the specified shipment. # + # @note This operation can make a static sandbox call. # @param [String] shipment_id The identifier for the shipment. Get this value from the FBAOutboundShipmentStatus # notification. For information about subscribing to notifications, see the [Notifications API Use Case # Guide](doc:notifications-api-v1-use-case-guide). # @param [Float] rate_limit Requests per second # @return [Hash] The API response def get_shipment_details(shipment_id, rate_limit: 1.133) - cannot_sandbox! - path = "/fba/outbound/brazil/v0/shipments/#{shipment_id}" meter(rate_limit).get(path) @@ -26,13 +25,12 @@ def get_shipment_details(shipment_id, rate_limit: 1.133) # Submits a shipment invoice document for a given shipment. # + # @note This operation can make a static sandbox call. # @param [String] shipment_id The identifier for the shipment. # @param [Hash] body # @param [Float] rate_limit Requests per second # @return [Hash] The API response def submit_invoice(shipment_id, body, rate_limit: 1.133) - cannot_sandbox! - path = "/fba/outbound/brazil/v0/shipments/#{shipment_id}/invoice" meter(rate_limit).post(path, body:) @@ -40,12 +38,11 @@ def submit_invoice(shipment_id, body, rate_limit: 1.133) # Returns the invoice status for the shipment you specify. # + # @note This operation can make a static sandbox call. # @param [String] shipment_id The shipment identifier for the shipment. # @param [Float] rate_limit Requests per second # @return [Hash] The API response def get_invoice_status(shipment_id, rate_limit: 1.133) - cannot_sandbox! - path = "/fba/outbound/brazil/v0/shipments/#{shipment_id}/invoice/status" meter(rate_limit).get(path) diff --git a/lib/peddler/api/shipping_v1.rb b/lib/peddler/api/shipping_v1.rb index 0a895174..8c540f40 100644 --- a/lib/peddler/api/shipping_v1.rb +++ b/lib/peddler/api/shipping_v1.rb @@ -14,12 +14,11 @@ class API class ShippingV1 < API # Create a new shipment. # + # @note This operation can make a static sandbox call. # @param [Hash] body # @param [Float] rate_limit Requests per second # @return [Hash] The API response def create_shipment(body, rate_limit: 5.0) - cannot_sandbox! - path = "/shipping/v1/shipments" meter(rate_limit).post(path, body:) @@ -27,12 +26,11 @@ def create_shipment(body, rate_limit: 5.0) # Return the entire shipment object for the shipmentId. # + # @note This operation can make a static sandbox call. # @param [String] shipment_id # @param [Float] rate_limit Requests per second # @return [Hash] The API response def get_shipment(shipment_id, rate_limit: 5.0) - cannot_sandbox! - path = "/shipping/v1/shipments/#{shipment_id}" meter(rate_limit).get(path) @@ -40,12 +38,11 @@ def get_shipment(shipment_id, rate_limit: 5.0) # Cancel a shipment by the given shipmentId. # + # @note This operation can make a static sandbox call. # @param [String] shipment_id # @param [Float] rate_limit Requests per second # @return [Hash] The API response def cancel_shipment(shipment_id, rate_limit: 5.0) - cannot_sandbox! - path = "/shipping/v1/shipments/#{shipment_id}/cancel" meter(rate_limit).post(path) @@ -53,13 +50,12 @@ def cancel_shipment(shipment_id, rate_limit: 5.0) # Purchase shipping labels based on a given rate. # + # @note This operation can make a static sandbox call. # @param [String] shipment_id # @param [Hash] body # @param [Float] rate_limit Requests per second # @return [Hash] The API response def purchase_labels(shipment_id, body, rate_limit: 5.0) - cannot_sandbox! - path = "/shipping/v1/shipments/#{shipment_id}/purchaseLabels" meter(rate_limit).post(path, body:) @@ -67,14 +63,13 @@ def purchase_labels(shipment_id, body, rate_limit: 5.0) # Retrieve shipping label based on the shipment id and tracking id. # + # @note This operation can make a static sandbox call. # @param [String] shipment_id # @param [String] tracking_id # @param [Hash] body # @param [Float] rate_limit Requests per second # @return [Hash] The API response def retrieve_shipping_label(shipment_id, tracking_id, body, rate_limit: 5.0) - cannot_sandbox! - path = "/shipping/v1/shipments/#{shipment_id}/containers/#{tracking_id}/label" meter(rate_limit).post(path, body:) @@ -82,12 +77,11 @@ def retrieve_shipping_label(shipment_id, tracking_id, body, rate_limit: 5.0) # Purchase shipping labels. # + # @note This operation can make a static sandbox call. # @param [Hash] body # @param [Float] rate_limit Requests per second # @return [Hash] The API response def purchase_shipment(body, rate_limit: 5.0) - cannot_sandbox! - path = "/shipping/v1/purchaseShipment" meter(rate_limit).post(path, body:) @@ -95,12 +89,11 @@ def purchase_shipment(body, rate_limit: 5.0) # Get service rates. # + # @note This operation can make a static sandbox call. # @param [Hash] body # @param [Float] rate_limit Requests per second # @return [Hash] The API response def get_rates(body, rate_limit: 5.0) - cannot_sandbox! - path = "/shipping/v1/rates" meter(rate_limit).post(path, body:) @@ -108,11 +101,10 @@ def get_rates(body, rate_limit: 5.0) # Verify if the current account is valid. # + # @note This operation can make a static sandbox call. # @param [Float] rate_limit Requests per second # @return [Hash] The API response def get_account(rate_limit: 5.0) - cannot_sandbox! - path = "/shipping/v1/account" meter(rate_limit).get(path) @@ -120,12 +112,11 @@ def get_account(rate_limit: 5.0) # Return the tracking information of a shipment. # + # @note This operation can make a static sandbox call. # @param [String] tracking_id # @param [Float] rate_limit Requests per second # @return [Hash] The API response def get_tracking_information(tracking_id, rate_limit: 1.0) - cannot_sandbox! - path = "/shipping/v1/tracking/#{tracking_id}" meter(rate_limit).get(path) diff --git a/lib/peddler/api/shipping_v2.rb b/lib/peddler/api/shipping_v2.rb index 1e88d18c..9e57e4cb 100644 --- a/lib/peddler/api/shipping_v2.rb +++ b/lib/peddler/api/shipping_v2.rb @@ -12,6 +12,7 @@ class API class ShippingV2 < API # Returns the available shipping service offerings. # + # @note This operation can make a dynamic sandbox call. # @param [Hash] body # @param [String] x_amzn_shipping_business_id Amazon shipping business to assume for this request. The default is # AmazonShipping_UK. @@ -50,6 +51,7 @@ def direct_purchase_shipment(body, x_amzn_idempotency_key: nil, locale: nil, x_a # 10 minutes have expired, you will receive an error response with the error code equal to "TOKEN_EXPIRED". If you # receive this error response, you must get the rates for the shipment again. # + # @note This operation can make a dynamic sandbox call. # @param [Hash] body # @param [String] x_amzn_idempotency_key A unique value which the server uses to recognize subsequent retries of # the same request. @@ -65,6 +67,7 @@ def purchase_shipment(body, x_amzn_idempotency_key: nil, x_amzn_shipping_busines # Purchases a shipping service identifier and returns purchase-related details and documents. # + # @note This operation can make a dynamic sandbox call. # @param [Hash] body # @param [String] x_amzn_shipping_business_id Amazon shipping business to assume for this request. The default is # AmazonShipping_UK. @@ -78,6 +81,7 @@ def one_click_shipment(body, x_amzn_shipping_business_id: nil, rate_limit: 80.0) # Returns tracking information for a purchased shipment. # + # @note This operation can make a dynamic sandbox call. # @param [String] tracking_id A carrier-generated tracking identifier originally returned by the purchaseShipment # operation. # @param [String] carrier_id A carrier identifier originally returned by the getRates operation for the selected @@ -98,6 +102,7 @@ def get_tracking(tracking_id, carrier_id, x_amzn_shipping_business_id: nil, rate # Returns the shipping documents associated with a package in a shipment. # + # @note This operation can make a dynamic sandbox call. # @param [String] shipment_id The shipment identifier originally returned by the purchaseShipment operation. # @param [String] package_client_reference_id The package client reference identifier originally provided in the # request body parameter for the getRates operation. @@ -124,6 +129,7 @@ def get_shipment_documents(shipment_id, package_client_reference_id, format: nil # Cancels a purchased shipment. Returns an empty object if the shipment is successfully cancelled. # + # @note This operation can make a dynamic sandbox call. # @param [String] shipment_id The shipment identifier originally returned by the purchaseShipment operation. # @param [String] x_amzn_shipping_business_id Amazon shipping business to assume for this request. The default is # AmazonShipping_UK. @@ -139,6 +145,7 @@ def cancel_shipment(shipment_id, x_amzn_shipping_business_id: nil, rate_limit: 8 # the getAdditionalInputs operation when the response to a previous call to the getRates operation indicates that # additional inputs are required for the rate (shipping offering) that you want to purchase. # + # @note This operation can make a static sandbox call. # @param [String] request_token The request token returned in the response to the getRates operation. # @param [String] rate_id The rate identifier for the shipping offering (rate) returned in the response to the # getRates operation. @@ -147,8 +154,6 @@ def cancel_shipment(shipment_id, x_amzn_shipping_business_id: nil, rate_limit: 8 # @param [Float] rate_limit Requests per second # @return [Hash] The API response def get_additional_inputs(request_token, rate_id, x_amzn_shipping_business_id: nil, rate_limit: 80.0) - cannot_sandbox! - path = "/shipping/v2/shipments/additionalInputs/schema" params = { "requestToken" => request_token, @@ -285,6 +290,7 @@ def get_collection_form(collection_form_id, x_amzn_shipping_business_id: nil, ra # Returns a list of access points in proximity of input postal code. # + # @note This operation can make a dynamic sandbox call. # @param [Array] access_point_types # @param [String] country_code # @param [String] postal_code diff --git a/lib/peddler/api/solicitations_v1.rb b/lib/peddler/api/solicitations_v1.rb index 0fbf01a0..2c944817 100644 --- a/lib/peddler/api/solicitations_v1.rb +++ b/lib/peddler/api/solicitations_v1.rb @@ -18,6 +18,7 @@ class SolicitationsV1 < API # parameter(s) to call an operation that sends a solicitation. Currently only the # productReviewAndSellerFeedbackSolicitation solicitation type is available. # + # @note This operation can make a static sandbox call. # @param [String] amazon_order_id An Amazon order identifier. This specifies the order for which you want a list # of available solicitation types. # @param [Array] marketplace_ids A marketplace identifier. This specifies the marketplace in which the @@ -25,8 +26,6 @@ class SolicitationsV1 < API # @param [Float] rate_limit Requests per second # @return [Hash] The API response def get_solicitation_actions_for_order(amazon_order_id, marketplace_ids, rate_limit: 1.0) - cannot_sandbox! - path = "/solicitations/v1/orders/#{amazon_order_id}" params = { "marketplaceIds" => marketplace_ids, @@ -38,6 +37,7 @@ def get_solicitation_actions_for_order(amazon_order_id, marketplace_ids, rate_li # Sends a solicitation to a buyer asking for seller feedback and a product review for the specified order. Send # only one productReviewAndSellerFeedback or free form proactive message per order. # + # @note This operation can make a static sandbox call. # @param [String] amazon_order_id An Amazon order identifier. This specifies the order for which a solicitation is # sent. # @param [Array] marketplace_ids A marketplace identifier. This specifies the marketplace in which the @@ -45,8 +45,6 @@ def get_solicitation_actions_for_order(amazon_order_id, marketplace_ids, rate_li # @param [Float] rate_limit Requests per second # @return [Hash] The API response def create_product_review_and_seller_feedback_solicitation(amazon_order_id, marketplace_ids, rate_limit: 1.0) - cannot_sandbox! - path = "/solicitations/v1/orders/#{amazon_order_id}/solicitations/productReviewAndSellerFeedback" params = { "marketplaceIds" => marketplace_ids, diff --git a/lib/peddler/api/supply_sources_2020_07_01.rb b/lib/peddler/api/supply_sources_2020_07_01.rb index 28ecf8b6..4e397d4a 100644 --- a/lib/peddler/api/supply_sources_2020_07_01.rb +++ b/lib/peddler/api/supply_sources_2020_07_01.rb @@ -10,13 +10,12 @@ class API class SupplySources20200701 < API # The path to retrieve paginated supply sources. # + # @note This operation can make a static sandbox call. # @param [String] next_page_token The pagination token to retrieve a specific page of results. # @param [Number] page_size The number of supply sources to return per paginated request. # @param [Float] rate_limit Requests per second # @return [Hash] The API response def get_supply_sources(next_page_token: nil, page_size: 10, rate_limit: nil) - cannot_sandbox! - path = "/supplySources/2020-07-01/supplySources" params = { "nextPageToken" => next_page_token, @@ -28,12 +27,11 @@ def get_supply_sources(next_page_token: nil, page_size: 10, rate_limit: nil) # Create a new supply source. # + # @note This operation can make a static sandbox call. # @param [Hash] payload A request to create a supply source. # @param [Float] rate_limit Requests per second # @return [Hash] The API response def create_supply_source(payload, rate_limit: nil) - cannot_sandbox! - path = "/supplySources/2020-07-01/supplySources" body = payload @@ -42,12 +40,11 @@ def create_supply_source(payload, rate_limit: nil) # Retrieve a supply source. # + # @note This operation can make a static sandbox call. # @param [String] supply_source_id The unique identifier of a supply source. # @param [Float] rate_limit Requests per second # @return [Hash] The API response def get_supply_source(supply_source_id, rate_limit: nil) - cannot_sandbox! - path = "/supplySources/2020-07-01/supplySources/#{supply_source_id}" get(path) @@ -55,13 +52,12 @@ def get_supply_source(supply_source_id, rate_limit: nil) # Update the configuration and capabilities of a supply source. # + # @note This operation can make a static sandbox call. # @param [String] supply_source_id The unique identitier of a supply source. # @param [Hash] payload # @param [Float] rate_limit Requests per second # @return [Hash] The API response def update_supply_source(supply_source_id, payload: nil, rate_limit: nil) - cannot_sandbox! - path = "/supplySources/2020-07-01/supplySources/#{supply_source_id}" body = payload @@ -70,12 +66,11 @@ def update_supply_source(supply_source_id, payload: nil, rate_limit: nil) # Archive a supply source, making it inactive. Cannot be undone. # + # @note This operation can make a static sandbox call. # @param [String] supply_source_id The unique identifier of a supply source. # @param [Float] rate_limit Requests per second # @return [Hash] The API response def archive_supply_source(supply_source_id, rate_limit: nil) - cannot_sandbox! - path = "/supplySources/2020-07-01/supplySources/#{supply_source_id}" delete(path) @@ -83,13 +78,12 @@ def archive_supply_source(supply_source_id, rate_limit: nil) # Update the status of a supply source. # + # @note This operation can make a static sandbox call. # @param [String] supply_source_id The unique identifier of a supply source. # @param [Hash] payload # @param [Float] rate_limit Requests per second # @return [Hash] The API response def update_supply_source_status(supply_source_id, payload: nil, rate_limit: nil) - cannot_sandbox! - path = "/supplySources/2020-07-01/supplySources/#{supply_source_id}/status" body = payload diff --git a/lib/peddler/api/tokens_2021_03_01.rb b/lib/peddler/api/tokens_2021_03_01.rb index c92ac6fc..746b8165 100644 --- a/lib/peddler/api/tokens_2021_03_01.rb +++ b/lib/peddler/api/tokens_2021_03_01.rb @@ -18,12 +18,11 @@ class Tokens20210301 < API # Case Guide for a list of restricted operations. Use the RDT returned here as the access token in subsequent # calls to the corresponding restricted operations. # + # @note This operation can make a static sandbox call. # @param [Hash] body The restricted data token request details. # @param [Float] rate_limit Requests per second # @return [Hash] The API response def create_restricted_data_token(body, rate_limit: 1.0) - cannot_sandbox! - path = "/tokens/2021-03-01/restrictedDataToken" meter(rate_limit).post(path, body:) diff --git a/lib/peddler/api/vendor_direct_fulfillment_inventory_v1.rb b/lib/peddler/api/vendor_direct_fulfillment_inventory_v1.rb index f3bd6c14..42e08405 100644 --- a/lib/peddler/api/vendor_direct_fulfillment_inventory_v1.rb +++ b/lib/peddler/api/vendor_direct_fulfillment_inventory_v1.rb @@ -11,13 +11,12 @@ class API class VendorDirectFulfillmentInventoryV1 < API # Submits inventory updates for the specified warehouse for either a partial or full feed of inventory items. # + # @note This operation can make a static sandbox call. # @param [Hash] body The request body that contains the inventory update data to submit. # @param [String] warehouse_id Identifier for the warehouse for which to update inventory. # @param [Float] rate_limit Requests per second # @return [Hash] The API response def submit_inventory_update(body, warehouse_id, rate_limit: 10.0) - cannot_sandbox! - path = "/vendor/directFulfillment/inventory/v1/warehouses/#{warehouse_id}/items" meter(rate_limit).post(path, body:) diff --git a/lib/peddler/api/vendor_direct_fulfillment_orders_2021_12_28.rb b/lib/peddler/api/vendor_direct_fulfillment_orders_2021_12_28.rb index cca959df..e31b88de 100644 --- a/lib/peddler/api/vendor_direct_fulfillment_orders_2021_12_28.rb +++ b/lib/peddler/api/vendor_direct_fulfillment_orders_2021_12_28.rb @@ -15,6 +15,7 @@ class VendorDirectFulfillmentOrders20211228 < API # a list of purchase order numbers. You can then call the getOrder operation to return the details of a specific # order. # + # @note This operation can make a dynamic sandbox call. # @param [String] ship_from_party_id The vendor warehouse identifier for the fulfillment warehouse. If not # specified, the result will contain orders for all warehouses. # @param [String] status Returns only the purchase orders that match the specified status. If not specified, the @@ -51,6 +52,7 @@ def get_orders(created_after, created_before, ship_from_party_id: nil, status: n # Returns purchase order information for the purchaseOrderNumber that you specify. # + # @note This operation can make a dynamic sandbox call. # @param [String] purchase_order_number The order identifier for the purchase order that you want. Formatting # Notes: alpha-numeric code. # @param [Float] rate_limit Requests per second @@ -63,6 +65,7 @@ def get_order(purchase_order_number, rate_limit: 10.0) # Submits acknowledgements for one or more purchase orders. # + # @note This operation can make a dynamic sandbox call. # @param [Hash] body The request body containing the acknowledgement to an order # @param [Float] rate_limit Requests per second # @return [Hash] The API response diff --git a/lib/peddler/api/vendor_direct_fulfillment_orders_v1.rb b/lib/peddler/api/vendor_direct_fulfillment_orders_v1.rb index 5b6f4800..d5b48ced 100644 --- a/lib/peddler/api/vendor_direct_fulfillment_orders_v1.rb +++ b/lib/peddler/api/vendor_direct_fulfillment_orders_v1.rb @@ -15,6 +15,7 @@ class VendorDirectFulfillmentOrdersV1 < API # a list of purchase order numbers. You can then call the getOrder operation to return the details of a specific # order. # + # @note This operation can make a static sandbox call. # @param [String] ship_from_party_id The vendor warehouse identifier for the fulfillment warehouse. If not # specified, the result will contain orders for all warehouses. # @param [String] status Returns only the purchase orders that match the specified status. If not specified, the @@ -33,7 +34,6 @@ class VendorDirectFulfillmentOrdersV1 < API # @return [Hash] The API response def get_orders(created_after, created_before, ship_from_party_id: nil, status: nil, limit: nil, sort_order: nil, next_token: nil, include_details: "true", rate_limit: 10.0) - cannot_sandbox! path = "/vendor/directFulfillment/orders/v1/purchaseOrders" params = { @@ -52,13 +52,12 @@ def get_orders(created_after, created_before, ship_from_party_id: nil, status: n # Returns purchase order information for the purchaseOrderNumber that you specify. # + # @note This operation can make a static sandbox call. # @param [String] purchase_order_number The order identifier for the purchase order that you want. Formatting # Notes: alpha-numeric code. # @param [Float] rate_limit Requests per second # @return [Hash] The API response def get_order(purchase_order_number, rate_limit: 10.0) - cannot_sandbox! - path = "/vendor/directFulfillment/orders/v1/purchaseOrders/#{purchase_order_number}" meter(rate_limit).get(path) @@ -66,12 +65,11 @@ def get_order(purchase_order_number, rate_limit: 10.0) # Submits acknowledgements for one or more purchase orders. # + # @note This operation can make a static sandbox call. # @param [Hash] body The request body that contains the order acknowledgement. # @param [Float] rate_limit Requests per second # @return [Hash] The API response def submit_acknowledgement(body, rate_limit: 10.0) - cannot_sandbox! - path = "/vendor/directFulfillment/orders/v1/acknowledgements" meter(rate_limit).post(path, body:) diff --git a/lib/peddler/api/vendor_direct_fulfillment_payments_v1.rb b/lib/peddler/api/vendor_direct_fulfillment_payments_v1.rb index 54b193d3..7af2eb4c 100644 --- a/lib/peddler/api/vendor_direct_fulfillment_payments_v1.rb +++ b/lib/peddler/api/vendor_direct_fulfillment_payments_v1.rb @@ -11,12 +11,11 @@ class API class VendorDirectFulfillmentPaymentsV1 < API # Submits one or more invoices for a vendor's direct fulfillment orders. # + # @note This operation can make a static sandbox call. # @param [Hash] body The request body that contains one or more invoices for vendor orders. # @param [Float] rate_limit Requests per second # @return [Hash] The API response def submit_invoice(body, rate_limit: 10.0) - cannot_sandbox! - path = "/vendor/directFulfillment/payments/v1/invoices" meter(rate_limit).post(path, body:) diff --git a/lib/peddler/api/vendor_direct_fulfillment_sandbox_test_data_2021_10_28.rb b/lib/peddler/api/vendor_direct_fulfillment_sandbox_test_data_2021_10_28.rb index 45edd859..1be190d2 100644 --- a/lib/peddler/api/vendor_direct_fulfillment_sandbox_test_data_2021_10_28.rb +++ b/lib/peddler/api/vendor_direct_fulfillment_sandbox_test_data_2021_10_28.rb @@ -11,6 +11,7 @@ class API class VendorDirectFulfillmentSandboxTestData20211028 < API # Submits a request to generate test order data for Vendor Direct Fulfillment API entities. # + # @note This operation can make a dynamic sandbox call. # @param [Hash] body The request payload that contain parameters to generate test order data scenarios. # @param [Float] rate_limit Requests per second # @return [Hash] The API response @@ -23,6 +24,7 @@ def generate_order_scenarios(body, rate_limit: nil) # Retrieves the transaction status identified by the specified `transactionId`, and returns the requested test # order data if the transaction is successful. # + # @note This operation can make a dynamic sandbox call. # @param [String] transaction_id The transaction identifier returned in the response for the # `generateOrderScenarios` operation. # @param [Float] rate_limit Requests per second diff --git a/lib/peddler/api/vendor_direct_fulfillment_shipping_2021_12_28.rb b/lib/peddler/api/vendor_direct_fulfillment_shipping_2021_12_28.rb index bb75e92e..fe4cfb39 100644 --- a/lib/peddler/api/vendor_direct_fulfillment_shipping_2021_12_28.rb +++ b/lib/peddler/api/vendor_direct_fulfillment_shipping_2021_12_28.rb @@ -13,6 +13,7 @@ class VendorDirectFulfillmentShipping20211228 < API # using the createdAfter and createdBefore parameters. You must use both of these parameters. The date range to # search must not be more than 7 days. # + # @note This operation can make a dynamic sandbox call. # @param [String] ship_from_party_id The vendor warehouseId for order fulfillment. If not specified, the result # will contain orders for all warehouses. # @param [Integer] limit The limit to the number of records returned. @@ -43,6 +44,7 @@ def get_shipping_labels(created_after, created_before, ship_from_party_id: nil, # Creates a shipping label for a purchase order and returns a transactionId for reference. # + # @note This operation can make a dynamic sandbox call. # @param [Hash] body Request body that contains the shipping labels data. # @param [Float] rate_limit Requests per second # @return [Hash] The API response @@ -54,6 +56,7 @@ def submit_shipping_label_request(body, rate_limit: 10.0) # Returns a shipping label for the purchaseOrderNumber that you specify. # + # @note This operation can make a dynamic sandbox call. # @param [String] purchase_order_number The purchase order number for which you want to return the shipping label. # Should be the same `purchaseOrderNumber` as received in the order. # @param [Float] rate_limit Requests per second @@ -66,6 +69,7 @@ def get_shipping_label(purchase_order_number, rate_limit: 10.0) # Creates shipping labels for a purchase order and returns the labels. # + # @note This operation can make a dynamic sandbox call. # @param [String] purchase_order_number The purchase order number for which you want to return the shipping # labels. It should be the same purchaseOrderNumber as received in the order. # @param [Hash] body The request payload that contains parameters for creating shipping labels. @@ -79,6 +83,7 @@ def create_shipping_labels(purchase_order_number, body, rate_limit: 10.0) # Submits one or more shipment confirmations for vendor orders. # + # @note This operation can make a dynamic sandbox call. # @param [Hash] body Request body containing the shipment confirmations data. # @param [Float] rate_limit Requests per second # @return [Hash] The API response @@ -92,6 +97,7 @@ def submit_shipment_confirmations(body, rate_limit: 10.0) # status update for the package that a vendor has shipped. It will provide the Amazon customer visibility on their # order, when the package is outside of Amazon Network visibility. # + # @note This operation can make a dynamic sandbox call. # @param [Hash] body Request body that contains the shipment status update data. # @param [Float] rate_limit Requests per second # @return [Hash] The API response @@ -105,6 +111,7 @@ def submit_shipment_status_updates(body, rate_limit: 10.0) # using the createdAfter and createdBefore parameters. You must use both of these parameters. The date range to # search must be no more than 7 days. # + # @note This operation can make a dynamic sandbox call. # @param [String] ship_from_party_id The vendor warehouseId for order fulfillment. If not specified, the result # will contain orders for all warehouses. # @param [Integer] limit The limit to the number of records returned @@ -135,6 +142,7 @@ def get_customer_invoices(created_after, created_before, ship_from_party_id: nil # Returns a customer invoice based on the purchaseOrderNumber that you specify. # + # @note This operation can make a dynamic sandbox call. # @param [String] purchase_order_number Purchase order number of the shipment for which to return the invoice. # @param [Float] rate_limit Requests per second # @return [Hash] The API response @@ -147,6 +155,7 @@ def get_customer_invoice(purchase_order_number, rate_limit: 10.0) # Returns a list of packing slips for the purchase orders that match the criteria specified. Date range to search # must not be more than 7 days. # + # @note This operation can make a dynamic sandbox call. # @param [String] ship_from_party_id The vendor warehouseId for order fulfillment. If not specified the result # will contain orders for all warehouses. # @param [Integer] limit The limit to the number of records returned @@ -177,6 +186,7 @@ def get_packing_slips(created_after, created_before, ship_from_party_id: nil, li # Returns a packing slip based on the purchaseOrderNumber that you specify. # + # @note This operation can make a dynamic sandbox call. # @param [String] purchase_order_number The purchaseOrderNumber for the packing slip you want. # @param [Float] rate_limit Requests per second # @return [Hash] The API response diff --git a/lib/peddler/api/vendor_direct_fulfillment_shipping_v1.rb b/lib/peddler/api/vendor_direct_fulfillment_shipping_v1.rb index 98a319f1..a4324ba6 100644 --- a/lib/peddler/api/vendor_direct_fulfillment_shipping_v1.rb +++ b/lib/peddler/api/vendor_direct_fulfillment_shipping_v1.rb @@ -13,6 +13,7 @@ class VendorDirectFulfillmentShippingV1 < API # using the `createdAfter` and `createdBefore` parameters. You must use both of these parameters. The date range # to search must not be more than 7 days. # + # @note This operation can make a static sandbox call. # @param [String] ship_from_party_id The vendor `warehouseId` for order fulfillment. If not specified, the result # will contain orders for all warehouses. # @param [Integer] limit The limit to the number of records returned. @@ -27,7 +28,6 @@ class VendorDirectFulfillmentShippingV1 < API # @return [Hash] The API response def get_shipping_labels(created_after, created_before, ship_from_party_id: nil, limit: nil, sort_order: "ASC", next_token: nil, rate_limit: 10.0) - cannot_sandbox! path = "/vendor/directFulfillment/shipping/v1/shippingLabels" params = { @@ -44,12 +44,11 @@ def get_shipping_labels(created_after, created_before, ship_from_party_id: nil, # Creates a shipping label for a purchase order and returns a `transactionId` for reference. # + # @note This operation can make a static sandbox call. # @param [Hash] body Request body containing one or more shipping labels data. # @param [Float] rate_limit Requests per second # @return [Hash] The API response def submit_shipping_label_request(body, rate_limit: 10.0) - cannot_sandbox! - path = "/vendor/directFulfillment/shipping/v1/shippingLabels" meter(rate_limit).post(path, body:) @@ -57,13 +56,12 @@ def submit_shipping_label_request(body, rate_limit: 10.0) # Returns a shipping label for the `purchaseOrderNumber` that you specify. # + # @note This operation can make a static sandbox call. # @param [String] purchase_order_number The purchase order number for which you want to return the shipping label. # It should be the same `purchaseOrderNumber` as received in the order. # @param [Float] rate_limit Requests per second # @return [Hash] The API response def get_shipping_label(purchase_order_number, rate_limit: 10.0) - cannot_sandbox! - path = "/vendor/directFulfillment/shipping/v1/shippingLabels/#{purchase_order_number}" meter(rate_limit).get(path) @@ -71,12 +69,11 @@ def get_shipping_label(purchase_order_number, rate_limit: 10.0) # Submits one or more shipment confirmations for vendor orders. # + # @note This operation can make a static sandbox call. # @param [Hash] body Request body containing the shipment confirmations data. # @param [Float] rate_limit Requests per second # @return [Hash] The API response def submit_shipment_confirmations(body, rate_limit: 10.0) - cannot_sandbox! - path = "/vendor/directFulfillment/shipping/v1/shipmentConfirmations" meter(rate_limit).post(path, body:) @@ -86,12 +83,11 @@ def submit_shipment_confirmations(body, rate_limit: 10.0) # status update for the package that a vendor has shipped. It will provide the Amazon customer visibility on their # order, when the package is outside of Amazon Network visibility. # + # @note This operation can make a static sandbox call. # @param [Hash] body Request body containing the shipment status update data. # @param [Float] rate_limit Requests per second # @return [Hash] The API response def submit_shipment_status_updates(body, rate_limit: 10.0) - cannot_sandbox! - path = "/vendor/directFulfillment/shipping/v1/shipmentStatusUpdates" meter(rate_limit).post(path, body:) @@ -101,6 +97,7 @@ def submit_shipment_status_updates(body, rate_limit: 10.0) # using the `createdAfter` and `createdBefore` parameters. You must use both of these parameters. The date range # to search must be no more than 7 days. # + # @note This operation can make a static sandbox call. # @param [String] ship_from_party_id The vendor `warehouseId` for order fulfillment. If not specified, the result # will contain orders for all warehouses. # @param [Integer] limit The limit to the number of records returned @@ -115,7 +112,6 @@ def submit_shipment_status_updates(body, rate_limit: 10.0) # @return [Hash] The API response def get_customer_invoices(created_after, created_before, ship_from_party_id: nil, limit: nil, sort_order: nil, next_token: nil, rate_limit: 10.0) - cannot_sandbox! path = "/vendor/directFulfillment/shipping/v1/customerInvoices" params = { @@ -132,12 +128,11 @@ def get_customer_invoices(created_after, created_before, ship_from_party_id: nil # Returns a customer invoice based on the `purchaseOrderNumber` that you specify. # + # @note This operation can make a static sandbox call. # @param [String] purchase_order_number Purchase order number of the shipment for which to return the invoice. # @param [Float] rate_limit Requests per second # @return [Hash] The API response def get_customer_invoice(purchase_order_number, rate_limit: 10.0) - cannot_sandbox! - path = "/vendor/directFulfillment/shipping/v1/customerInvoices/#{purchase_order_number}" meter(rate_limit).get(path) @@ -146,6 +141,7 @@ def get_customer_invoice(purchase_order_number, rate_limit: 10.0) # Returns a list of packing slips for the purchase orders that match the criteria specified. Date range to search # must not be more than 7 days. # + # @note This operation can make a static sandbox call. # @param [String] ship_from_party_id The vendor `warehouseId` for order fulfillment. If not specified the result # will contain orders for all warehouses. # @param [Integer] limit The limit to the number of records returned @@ -160,7 +156,6 @@ def get_customer_invoice(purchase_order_number, rate_limit: 10.0) # @return [Hash] The API response def get_packing_slips(created_after, created_before, ship_from_party_id: nil, limit: nil, sort_order: "ASC", next_token: nil, rate_limit: 10.0) - cannot_sandbox! path = "/vendor/directFulfillment/shipping/v1/packingSlips" params = { @@ -177,12 +172,11 @@ def get_packing_slips(created_after, created_before, ship_from_party_id: nil, li # Returns a packing slip based on the `purchaseOrderNumber` that you specify. # + # @note This operation can make a static sandbox call. # @param [String] purchase_order_number The `purchaseOrderNumber` for the packing slip you want. # @param [Float] rate_limit Requests per second # @return [Hash] The API response def get_packing_slip(purchase_order_number, rate_limit: 10.0) - cannot_sandbox! - path = "/vendor/directFulfillment/shipping/v1/packingSlips/#{purchase_order_number}" meter(rate_limit).get(path) diff --git a/lib/peddler/api/vendor_direct_fulfillment_transactions_2021_12_28.rb b/lib/peddler/api/vendor_direct_fulfillment_transactions_2021_12_28.rb index 756097c0..cef506f2 100644 --- a/lib/peddler/api/vendor_direct_fulfillment_transactions_2021_12_28.rb +++ b/lib/peddler/api/vendor_direct_fulfillment_transactions_2021_12_28.rb @@ -11,6 +11,7 @@ class API class VendorDirectFulfillmentTransactions20211228 < API # Returns the status of the transaction indicated by the specified `transactionId`. # + # @note This operation can make a dynamic sandbox call. # @param [String] transaction_id Previously returned in the response to the POST request of a specific # transaction. # @param [Float] rate_limit Requests per second diff --git a/lib/peddler/api/vendor_direct_fulfillment_transactions_v1.rb b/lib/peddler/api/vendor_direct_fulfillment_transactions_v1.rb index 32174c4d..53d4914d 100644 --- a/lib/peddler/api/vendor_direct_fulfillment_transactions_v1.rb +++ b/lib/peddler/api/vendor_direct_fulfillment_transactions_v1.rb @@ -11,13 +11,12 @@ class API class VendorDirectFulfillmentTransactionsV1 < API # Returns the status of the transaction indicated by the specified `transactionId`. # + # @note This operation can make a static sandbox call. # @param [String] transaction_id Previously returned in the response to the POST request of a specific # transaction. # @param [Float] rate_limit Requests per second # @return [Hash] The API response def get_transaction_status(transaction_id, rate_limit: 10.0) - cannot_sandbox! - path = "/vendor/directFulfillment/transactions/v1/transactions/#{transaction_id}" meter(rate_limit).get(path) diff --git a/lib/peddler/api/vendor_invoices_v1.rb b/lib/peddler/api/vendor_invoices_v1.rb index 5fcb1c49..c06c8a52 100644 --- a/lib/peddler/api/vendor_invoices_v1.rb +++ b/lib/peddler/api/vendor_invoices_v1.rb @@ -10,12 +10,11 @@ class API class VendorInvoicesV1 < API # Submit new invoices to Amazon. # + # @note This operation can make a static sandbox call. # @param [Hash] body The request body containing the invoice data to submit. # @param [Float] rate_limit Requests per second # @return [Hash] The API response def submit_invoices(body, rate_limit: 10.0) - cannot_sandbox! - path = "/vendor/payments/v1/invoices" meter(rate_limit).post(path, body:) diff --git a/lib/peddler/api/vendor_orders_v1.rb b/lib/peddler/api/vendor_orders_v1.rb index 30173ae6..ea6d36cf 100644 --- a/lib/peddler/api/vendor_orders_v1.rb +++ b/lib/peddler/api/vendor_orders_v1.rb @@ -14,6 +14,7 @@ class VendorOrdersV1 < API # `includeDetails` to false. You can then use the `getPurchaseOrder` operation to receive details for a specific # purchase order. # + # @note This operation can make a static sandbox call. # @param [Integer] limit The limit to the number of records returned. Default value is 100 records. # @param [String] created_after Purchase orders that became available after this time will be included in the # result. Must be in ISO-8601 date/time format. @@ -46,7 +47,6 @@ def get_purchase_orders( changed_after: nil, changed_before: nil, po_item_state: nil, is_po_changed: nil, purchase_order_state: nil, ordering_vendor_code: nil, rate_limit: 10.0 ) - cannot_sandbox! path = "/vendor/orders/v1/purchaseOrders" params = { @@ -69,13 +69,12 @@ def get_purchase_orders( # Returns a purchase order based on the `purchaseOrderNumber` value that you specify. # + # @note This operation can make a static sandbox call. # @param [String] purchase_order_number The purchase order identifier for the order that you want. Formatting # Notes: 8-character alpha-numeric code. # @param [Float] rate_limit Requests per second # @return [Hash] The API response def get_purchase_order(purchase_order_number, rate_limit: 10.0) - cannot_sandbox! - path = "/vendor/orders/v1/purchaseOrders/#{purchase_order_number}" meter(rate_limit).get(path) @@ -83,12 +82,11 @@ def get_purchase_order(purchase_order_number, rate_limit: 10.0) # Submits acknowledgements for one or more purchase orders. # + # @note This operation can make a static sandbox call. # @param [Hash] body # @param [Float] rate_limit Requests per second # @return [Hash] The API response def submit_acknowledgement(body, rate_limit: 10.0) - cannot_sandbox! - path = "/vendor/orders/v1/acknowledgements" meter(rate_limit).post(path, body:) @@ -98,6 +96,7 @@ def submit_acknowledgement(body, rate_limit: 10.0) # than 7 days. You can return a list of purchase order statuses using the available filters, or a single purchase # order status by providing the purchase order number. # + # @note This operation can make a static sandbox call. # @param [Integer] limit The limit to the number of records returned. Default value is 100 records. # @param [String] sort_order Sort in ascending or descending order by purchase order creation date. # @param [String] next_token Used for pagination when there are more purchase orders than the specified result @@ -134,7 +133,6 @@ def get_purchase_orders_status( updated_before: nil, purchase_order_number: nil, purchase_order_status: nil, item_confirmation_status: nil, item_receive_status: nil, ordering_vendor_code: nil, ship_to_party_id: nil, rate_limit: 10.0 ) - cannot_sandbox! path = "/vendor/orders/v1/purchaseOrdersStatus" params = { diff --git a/lib/peddler/api/vendor_shipments_v1.rb b/lib/peddler/api/vendor_shipments_v1.rb index 69e28d1e..fddd5ce4 100644 --- a/lib/peddler/api/vendor_shipments_v1.rb +++ b/lib/peddler/api/vendor_shipments_v1.rb @@ -11,12 +11,11 @@ class API class VendorShipmentsV1 < API # Submits one or more shipment confirmations for vendor orders. # + # @note This operation can make a static sandbox call. # @param [Hash] body A request to submit shipment confirmation. # @param [Float] rate_limit Requests per second # @return [Hash] The API response def submit_shipment_confirmations(body, rate_limit: 10.0) - cannot_sandbox! - path = "/vendor/shipping/v1/shipmentConfirmations" meter(rate_limit).post(path, body:)