sp_api_clients 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/CHANGELOG.md +161 -0
- data/LICENSE +21 -0
- data/README.md +284 -0
- data/lib/amazon_sp_clients/adapter_loader.rb +28 -0
- data/lib/amazon_sp_clients/api_client.rb +309 -0
- data/lib/amazon_sp_clients/api_error.rb +37 -0
- data/lib/amazon_sp_clients/api_response.rb +54 -0
- data/lib/amazon_sp_clients/configuration.rb +144 -0
- data/lib/amazon_sp_clients/marketplaces.rb +63 -0
- data/lib/amazon_sp_clients/middlewares/raise_error.rb +166 -0
- data/lib/amazon_sp_clients/session.rb +124 -0
- data/lib/amazon_sp_clients/sp_fba_inventory.rb +8 -0
- data/lib/amazon_sp_clients/sp_feeds_2021.rb +8 -0
- data/lib/amazon_sp_clients/sp_fulfillment_outbound_2020.rb +8 -0
- data/lib/amazon_sp_clients/sp_listings_items_2021.rb +8 -0
- data/lib/amazon_sp_clients/sp_orders_v0.rb +8 -0
- data/lib/amazon_sp_clients/sp_reports_2021.rb +8 -0
- data/lib/amazon_sp_clients/sp_tokens_2021.rb +8 -0
- data/lib/amazon_sp_clients/sp_vdf_inventory_v1.rb +8 -0
- data/lib/amazon_sp_clients/sp_vdf_orders_v1.rb +8 -0
- data/lib/amazon_sp_clients/sp_vdf_shipping_v1.rb +8 -0
- data/lib/amazon_sp_clients/sp_vendor_invoices.rb +8 -0
- data/lib/amazon_sp_clients/sp_vendor_orders.rb +8 -0
- data/lib/amazon_sp_clients/sp_vendor_transaction_status.rb +8 -0
- data/lib/amazon_sp_clients/sp_vendors_shipments.rb +8 -0
- data/lib/amazon_sp_clients/token_exchange_auth.rb +82 -0
- data/lib/amazon_sp_clients/uploader.rb +77 -0
- data/lib/amazon_sp_clients/v2/api.rb +43 -0
- data/lib/amazon_sp_clients/v2/apis/fba_inventory.rb +80 -0
- data/lib/amazon_sp_clients/v2/apis/feeds_2021.rb +86 -0
- data/lib/amazon_sp_clients/v2/apis/fulfillment_outbound_2020.rb +184 -0
- data/lib/amazon_sp_clients/v2/apis/listings_items_2021.rb +144 -0
- data/lib/amazon_sp_clients/v2/apis/orders_v0.rb +165 -0
- data/lib/amazon_sp_clients/v2/apis/reports_2021.rb +117 -0
- data/lib/amazon_sp_clients/v2/apis/tokens_2021.rb +25 -0
- data/lib/amazon_sp_clients/v2/apis/vdf_inventory_v1.rb +26 -0
- data/lib/amazon_sp_clients/v2/apis/vdf_orders_v1.rb +61 -0
- data/lib/amazon_sp_clients/v2/apis/vdf_shipping_v1.rb +139 -0
- data/lib/amazon_sp_clients/v2/apis/vendor_invoices.rb +25 -0
- data/lib/amazon_sp_clients/v2/apis/vendor_orders.rb +106 -0
- data/lib/amazon_sp_clients/v2/apis/vendor_transaction_status.rb +25 -0
- data/lib/amazon_sp_clients/v2/apis/vendors_shipments.rb +120 -0
- data/lib/amazon_sp_clients/v2/apis.rb +82 -0
- data/lib/amazon_sp_clients/v2/client.rb +198 -0
- data/lib/amazon_sp_clients/v2/config.rb +85 -0
- data/lib/amazon_sp_clients/v2/credentials.rb +91 -0
- data/lib/amazon_sp_clients/v2/documents.rb +115 -0
- data/lib/amazon_sp_clients/v2/error_mapper.rb +235 -0
- data/lib/amazon_sp_clients/v2/errors.rb +117 -0
- data/lib/amazon_sp_clients/v2/lwa.rb +100 -0
- data/lib/amazon_sp_clients/v2/rdt.rb +104 -0
- data/lib/amazon_sp_clients/v2/token.rb +39 -0
- data/lib/amazon_sp_clients/v2.rb +33 -0
- data/lib/amazon_sp_clients/version.rb +3 -0
- data/lib/amazon_sp_clients.rb +69 -0
- data/lib/sp_api_clients.rb +6 -0
- data/sp_api_clients.gemspec +53 -0
- data/vendor/fba_inventory/lib/sp_fba_inventory/api/fba_inventory_api.rb +289 -0
- data/vendor/fba_inventory/lib/sp_fba_inventory.rb +12 -0
- data/vendor/feeds_2021/lib/sp_feeds_2021/api/feeds_api.rb +367 -0
- data/vendor/feeds_2021/lib/sp_feeds_2021.rb +12 -0
- data/vendor/fulfillment_outbound_2020/lib/sp_fulfillment_outbound_2020/api/fba_outbound_api.rb +845 -0
- data/vendor/fulfillment_outbound_2020/lib/sp_fulfillment_outbound_2020.rb +12 -0
- data/vendor/listings_items_2021/lib/sp_listings_items_2021/api/listings_api.rb +480 -0
- data/vendor/listings_items_2021/lib/sp_listings_items_2021.rb +12 -0
- data/vendor/orders_v0/lib/sp_orders_v0/api/orders_v0_api.rb +593 -0
- data/vendor/orders_v0/lib/sp_orders_v0/api/shipment_api.rb +83 -0
- data/vendor/orders_v0/lib/sp_orders_v0.rb +13 -0
- data/vendor/reports_2021/lib/sp_reports_2021/api/reports_api.rb +530 -0
- data/vendor/reports_2021/lib/sp_reports_2021.rb +12 -0
- data/vendor/tokens_2021/lib/sp_tokens_2021/api/tokens_api.rb +77 -0
- data/vendor/tokens_2021/lib/sp_tokens_2021.rb +12 -0
- data/vendor/vdf_inventory_v1/lib/sp_vdf_inventory_v1/api/update_inventory_api.rb +83 -0
- data/vendor/vdf_inventory_v1/lib/sp_vdf_inventory_v1.rb +12 -0
- data/vendor/vdf_orders_v1/lib/sp_vdf_orders_v1/api/vendor_orders_api.rb +217 -0
- data/vendor/vdf_orders_v1/lib/sp_vdf_orders_v1.rb +12 -0
- data/vendor/vdf_shipping_v1/lib/sp_vdf_shipping_v1/api/customer_invoices_api.rb +152 -0
- data/vendor/vdf_shipping_v1/lib/sp_vdf_shipping_v1/api/vendor_shipping_api.rb +264 -0
- data/vendor/vdf_shipping_v1/lib/sp_vdf_shipping_v1/api/vendor_shipping_labels_api.rb +208 -0
- data/vendor/vdf_shipping_v1/lib/sp_vdf_shipping_v1.rb +14 -0
- data/vendor/vendor_invoices/lib/sp_vendor_invoices/api/vendor_payments_api.rb +77 -0
- data/vendor/vendor_invoices/lib/sp_vendor_invoices.rb +12 -0
- data/vendor/vendor_orders/lib/sp_vendor_orders/api/vendor_orders_api.rb +323 -0
- data/vendor/vendor_orders/lib/sp_vendor_orders.rb +12 -0
- data/vendor/vendor_transaction_status/lib/sp_vendor_transaction_status/api/vendor_transaction_api.rb +75 -0
- data/vendor/vendor_transaction_status/lib/sp_vendor_transaction_status.rb +12 -0
- data/vendor/vendors_shipments/lib/sp_vendors_shipments/api/vendor_shipping_api.rb +337 -0
- data/vendor/vendors_shipments/lib/sp_vendors_shipments.rb +12 -0
- metadata +321 -0
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Selling Partner APIs for Fulfillment Outbound
|
|
3
|
+
|
|
4
|
+
#The Selling Partner API for Fulfillment Outbound lets you create applications that help a seller fulfill Multi-Channel Fulfillment orders using their inventory in Amazon's fulfillment network. You can get information on both potential and existing fulfillment orders.
|
|
5
|
+
|
|
6
|
+
OpenAPI spec version: 2020-07-01
|
|
7
|
+
|
|
8
|
+
Generated by: lib/generator (bundle exec rake generate)
|
|
9
|
+
=end
|
|
10
|
+
|
|
11
|
+
# APIs
|
|
12
|
+
require_relative './sp_fulfillment_outbound_2020/api/fba_outbound_api'
|
|
@@ -0,0 +1,480 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Selling Partner API for Listings Items
|
|
3
|
+
|
|
4
|
+
#The Selling Partner API for Listings Items (Listings Items API) provides programmatic access to selling partner listings on Amazon. Use this API in collaboration with the Selling Partner API for Product Type Definitions, which you use to retrieve the information about Amazon product types needed to use the Listings Items API. For more information, see the [Listings Items API Use Case Guide](https://developer-docs.amazon.com/sp-api/docs/listings-items-api-v2021-08-01-use-case-guide).
|
|
5
|
+
|
|
6
|
+
OpenAPI spec version: 2021-08-01
|
|
7
|
+
|
|
8
|
+
Generated by: lib/generator (bundle exec rake generate)
|
|
9
|
+
=end
|
|
10
|
+
|
|
11
|
+
module AmazonSpClients
|
|
12
|
+
module SpListingsItems2021
|
|
13
|
+
class ListingsApi
|
|
14
|
+
attr_accessor :api_client
|
|
15
|
+
|
|
16
|
+
def initialize(session)
|
|
17
|
+
@api_client = AmazonSpClients::ApiClient.new(session)
|
|
18
|
+
end
|
|
19
|
+
# Delete a listings item for a selling partner. **Note:** The parameters associated with this operation may contain special characters that must be encoded to 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). **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 5 | 10 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this 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](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
|
|
20
|
+
# @param seller_id A selling partner identifier, such as a merchant account or vendor code.
|
|
21
|
+
# @param sku A selling partner provided identifier for an Amazon listing.
|
|
22
|
+
# @param marketplace_ids A comma-delimited list of Amazon marketplace identifiers for the request.
|
|
23
|
+
# @param [Hash] opts the optional parameters
|
|
24
|
+
# @option opts [String] :issue_locale A locale for localization of issues. When not provided, the default language code of the first marketplace is used. Examples: `en_US`, `fr_CA`, `fr_FR`. Localized messages default to `en_US` when a localization is not available in the specified locale.
|
|
25
|
+
# @return [ListingsItemSubmissionResponse]
|
|
26
|
+
def delete_listings_item(seller_id, sku, marketplace_ids, opts = {})
|
|
27
|
+
data = delete_listings_item_with_http_info(seller_id, sku, marketplace_ids, opts)
|
|
28
|
+
return data
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
# Delete a listings item for a selling partner. **Note:** The parameters associated with this operation may contain special characters that must be encoded to 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). **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 5 | 10 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this 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](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
|
|
32
|
+
# @param seller_id A selling partner identifier, such as a merchant account or vendor code.
|
|
33
|
+
# @param sku A selling partner provided identifier for an Amazon listing.
|
|
34
|
+
# @param marketplace_ids A comma-delimited list of Amazon marketplace identifiers for the request.
|
|
35
|
+
# @param [Hash] opts the optional parameters
|
|
36
|
+
# @option opts [String] :issue_locale A locale for localization of issues. When not provided, the default language code of the first marketplace is used. Examples: `en_US`, `fr_CA`, `fr_FR`. Localized messages default to `en_US` when a localization is not available in the specified locale.
|
|
37
|
+
# @return [Array<(ListingsItemSubmissionResponse)>] ListingsItemSubmissionResponse data, response status code and response headers
|
|
38
|
+
def delete_listings_item_with_http_info(seller_id, sku, marketplace_ids, opts = {})
|
|
39
|
+
if @api_client.config.debugging
|
|
40
|
+
@api_client.config.logger.debug 'Calling API: ListingsApi.delete_listings_item ...'
|
|
41
|
+
end
|
|
42
|
+
# verify the required parameter 'seller_id' is set
|
|
43
|
+
if @api_client.config.client_side_validation && seller_id.nil?
|
|
44
|
+
fail ArgumentError, "Missing the required parameter 'seller_id' when calling ListingsApi.delete_listings_item"
|
|
45
|
+
end
|
|
46
|
+
# verify the required parameter 'sku' is set
|
|
47
|
+
if @api_client.config.client_side_validation && sku.nil?
|
|
48
|
+
fail ArgumentError, "Missing the required parameter 'sku' when calling ListingsApi.delete_listings_item"
|
|
49
|
+
end
|
|
50
|
+
# verify the required parameter 'marketplace_ids' is set
|
|
51
|
+
if @api_client.config.client_side_validation && marketplace_ids.nil?
|
|
52
|
+
fail ArgumentError, "Missing the required parameter 'marketplace_ids' when calling ListingsApi.delete_listings_item"
|
|
53
|
+
end
|
|
54
|
+
# resource path
|
|
55
|
+
local_var_path = '/listings/2021-08-01/items/{sellerId}/{sku}'.sub('{' + 'sellerId' + '}', seller_id.to_s).sub('{' + 'sku' + '}', sku.to_s)
|
|
56
|
+
|
|
57
|
+
# query parameters
|
|
58
|
+
query_params = opts[:query_params] || {}
|
|
59
|
+
query_params[:'marketplaceIds'] = @api_client.build_collection_param(marketplace_ids, :csv)
|
|
60
|
+
query_params[:'issueLocale'] = opts[:'issue_locale'] if !opts[:'issue_locale'].nil?
|
|
61
|
+
|
|
62
|
+
# header parameters
|
|
63
|
+
header_params = opts[:header_params] || {}
|
|
64
|
+
# HTTP header 'Accept' (if needed)
|
|
65
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
66
|
+
|
|
67
|
+
# form parameters
|
|
68
|
+
form_params = opts[:form_params] || {}
|
|
69
|
+
|
|
70
|
+
# http body (model)
|
|
71
|
+
post_body = opts[:body]
|
|
72
|
+
|
|
73
|
+
return_type = opts[:return_type] || 'AmazonSpClients::ApiResponse'
|
|
74
|
+
|
|
75
|
+
auth_names = opts[:auth_names] || []
|
|
76
|
+
data = @api_client.call_api(:DELETE, local_var_path,
|
|
77
|
+
:header_params => header_params,
|
|
78
|
+
:query_params => query_params,
|
|
79
|
+
:form_params => form_params,
|
|
80
|
+
:body => post_body,
|
|
81
|
+
:auth_names => auth_names,
|
|
82
|
+
:return_type => return_type)
|
|
83
|
+
|
|
84
|
+
if @api_client.config.debugging
|
|
85
|
+
@api_client.config.logger.debug "API called: ListingsApi#delete_listings_item\nData: #{data.inspect}"
|
|
86
|
+
end
|
|
87
|
+
return data
|
|
88
|
+
end
|
|
89
|
+
# Returns details about a listings item for a selling partner. **Note:** The parameters associated with this operation may contain special characters that must be encoded to 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). **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 5 | 10 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this 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](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
|
|
90
|
+
# @param seller_id A selling partner identifier, such as a merchant account or vendor code.
|
|
91
|
+
# @param sku A selling partner provided identifier for an Amazon listing.
|
|
92
|
+
# @param marketplace_ids A comma-delimited list of Amazon marketplace identifiers for the request.
|
|
93
|
+
# @param [Hash] opts the optional parameters
|
|
94
|
+
# @option opts [String] :issue_locale A locale for localization of issues. When not provided, the default language code of the first marketplace is used. Examples: `en_US`, `fr_CA`, `fr_FR`. Localized messages default to `en_US` when a localization is not available in the specified locale.
|
|
95
|
+
# @option opts [Array<String>] :included_data A comma-delimited list of data sets to include in the response. Default: `summaries`.
|
|
96
|
+
# @return [Item]
|
|
97
|
+
def get_listings_item(seller_id, sku, marketplace_ids, opts = {})
|
|
98
|
+
data = get_listings_item_with_http_info(seller_id, sku, marketplace_ids, opts)
|
|
99
|
+
return data
|
|
100
|
+
end
|
|
101
|
+
|
|
102
|
+
# Returns details about a listings item for a selling partner. **Note:** The parameters associated with this operation may contain special characters that must be encoded to 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). **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 5 | 10 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this 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](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
|
|
103
|
+
# @param seller_id A selling partner identifier, such as a merchant account or vendor code.
|
|
104
|
+
# @param sku A selling partner provided identifier for an Amazon listing.
|
|
105
|
+
# @param marketplace_ids A comma-delimited list of Amazon marketplace identifiers for the request.
|
|
106
|
+
# @param [Hash] opts the optional parameters
|
|
107
|
+
# @option opts [String] :issue_locale A locale for localization of issues. When not provided, the default language code of the first marketplace is used. Examples: `en_US`, `fr_CA`, `fr_FR`. Localized messages default to `en_US` when a localization is not available in the specified locale.
|
|
108
|
+
# @option opts [Array<String>] :included_data A comma-delimited list of data sets to include in the response. Default: `summaries`.
|
|
109
|
+
# @return [Array<(Item)>] Item data, response status code and response headers
|
|
110
|
+
def get_listings_item_with_http_info(seller_id, sku, marketplace_ids, opts = {})
|
|
111
|
+
if @api_client.config.debugging
|
|
112
|
+
@api_client.config.logger.debug 'Calling API: ListingsApi.get_listings_item ...'
|
|
113
|
+
end
|
|
114
|
+
# verify the required parameter 'seller_id' is set
|
|
115
|
+
if @api_client.config.client_side_validation && seller_id.nil?
|
|
116
|
+
fail ArgumentError, "Missing the required parameter 'seller_id' when calling ListingsApi.get_listings_item"
|
|
117
|
+
end
|
|
118
|
+
# verify the required parameter 'sku' is set
|
|
119
|
+
if @api_client.config.client_side_validation && sku.nil?
|
|
120
|
+
fail ArgumentError, "Missing the required parameter 'sku' when calling ListingsApi.get_listings_item"
|
|
121
|
+
end
|
|
122
|
+
# verify the required parameter 'marketplace_ids' is set
|
|
123
|
+
if @api_client.config.client_side_validation && marketplace_ids.nil?
|
|
124
|
+
fail ArgumentError, "Missing the required parameter 'marketplace_ids' when calling ListingsApi.get_listings_item"
|
|
125
|
+
end
|
|
126
|
+
if @api_client.config.client_side_validation && opts[:'included_data'] && !opts[:'included_data'].all? { |item| ['summaries', 'attributes', 'issues', 'offers', 'fulfillmentAvailability', 'procurement', 'relationships', 'productTypes'].include?(item) }
|
|
127
|
+
fail ArgumentError, 'invalid value for "included_data", must include one of summaries, attributes, issues, offers, fulfillmentAvailability, procurement, relationships, productTypes'
|
|
128
|
+
end
|
|
129
|
+
# resource path
|
|
130
|
+
local_var_path = '/listings/2021-08-01/items/{sellerId}/{sku}'.sub('{' + 'sellerId' + '}', seller_id.to_s).sub('{' + 'sku' + '}', sku.to_s)
|
|
131
|
+
|
|
132
|
+
# query parameters
|
|
133
|
+
query_params = opts[:query_params] || {}
|
|
134
|
+
query_params[:'marketplaceIds'] = @api_client.build_collection_param(marketplace_ids, :csv)
|
|
135
|
+
query_params[:'issueLocale'] = opts[:'issue_locale'] if !opts[:'issue_locale'].nil?
|
|
136
|
+
query_params[:'includedData'] = @api_client.build_collection_param(opts[:'included_data'], :csv) if !opts[:'included_data'].nil?
|
|
137
|
+
|
|
138
|
+
# header parameters
|
|
139
|
+
header_params = opts[:header_params] || {}
|
|
140
|
+
# HTTP header 'Accept' (if needed)
|
|
141
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
142
|
+
|
|
143
|
+
# form parameters
|
|
144
|
+
form_params = opts[:form_params] || {}
|
|
145
|
+
|
|
146
|
+
# http body (model)
|
|
147
|
+
post_body = opts[:body]
|
|
148
|
+
|
|
149
|
+
return_type = opts[:return_type] || 'AmazonSpClients::ApiResponse'
|
|
150
|
+
|
|
151
|
+
auth_names = opts[:auth_names] || []
|
|
152
|
+
data = @api_client.call_api(:GET, local_var_path,
|
|
153
|
+
:header_params => header_params,
|
|
154
|
+
:query_params => query_params,
|
|
155
|
+
:form_params => form_params,
|
|
156
|
+
:body => post_body,
|
|
157
|
+
:auth_names => auth_names,
|
|
158
|
+
:return_type => return_type)
|
|
159
|
+
|
|
160
|
+
if @api_client.config.debugging
|
|
161
|
+
@api_client.config.logger.debug "API called: ListingsApi#get_listings_item\nData: #{data.inspect}"
|
|
162
|
+
end
|
|
163
|
+
return data
|
|
164
|
+
end
|
|
165
|
+
# Partially update (patch) a listings item for a selling partner. Only top-level listings item attributes can be patched. Patching nested attributes is not supported. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 5 | 5 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The preceding table indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput can receive higher rate and burst values then those shown here. For more information, refer to [Usage Plans and Rate Limits](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api) in the Selling Partner API documentation.
|
|
166
|
+
# @param body The request body schema for the `patchListingsItem` operation.
|
|
167
|
+
# @param marketplace_ids A comma-delimited list of Amazon marketplace identifiers for the request.
|
|
168
|
+
# @param seller_id A selling partner identifier, such as a merchant account or vendor code.
|
|
169
|
+
# @param sku A selling partner provided identifier for an Amazon listing.
|
|
170
|
+
# @param [Hash] opts the optional parameters
|
|
171
|
+
# @option opts [Array<String>] :included_data A comma-delimited list of data sets to include in the response. Default: `issues`.
|
|
172
|
+
# @option opts [String] :mode The mode of operation for the request.
|
|
173
|
+
# @option opts [String] :issue_locale A locale for localization of issues. When not provided, the default language code of the first marketplace is used. Examples: `en_US`, `fr_CA`, `fr_FR`. Localized messages default to `en_US` when a localization is not available in the specified locale.
|
|
174
|
+
# @return [ListingsItemSubmissionResponse]
|
|
175
|
+
def patch_listings_item(body, marketplace_ids, seller_id, sku, opts = {})
|
|
176
|
+
data = patch_listings_item_with_http_info(body, marketplace_ids, seller_id, sku, opts)
|
|
177
|
+
return data
|
|
178
|
+
end
|
|
179
|
+
|
|
180
|
+
# Partially update (patch) a listings item for a selling partner. Only top-level listings item attributes can be patched. Patching nested attributes is not supported. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 5 | 5 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The preceding table indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput can receive higher rate and burst values then those shown here. For more information, refer to [Usage Plans and Rate Limits](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api) in the Selling Partner API documentation.
|
|
181
|
+
# @param body The request body schema for the `patchListingsItem` operation.
|
|
182
|
+
# @param marketplace_ids A comma-delimited list of Amazon marketplace identifiers for the request.
|
|
183
|
+
# @param seller_id A selling partner identifier, such as a merchant account or vendor code.
|
|
184
|
+
# @param sku A selling partner provided identifier for an Amazon listing.
|
|
185
|
+
# @param [Hash] opts the optional parameters
|
|
186
|
+
# @option opts [Array<String>] :included_data A comma-delimited list of data sets to include in the response. Default: `issues`.
|
|
187
|
+
# @option opts [String] :mode The mode of operation for the request.
|
|
188
|
+
# @option opts [String] :issue_locale A locale for localization of issues. When not provided, the default language code of the first marketplace is used. Examples: `en_US`, `fr_CA`, `fr_FR`. Localized messages default to `en_US` when a localization is not available in the specified locale.
|
|
189
|
+
# @return [Array<(ListingsItemSubmissionResponse)>] ListingsItemSubmissionResponse data, response status code and response headers
|
|
190
|
+
def patch_listings_item_with_http_info(body, marketplace_ids, seller_id, sku, opts = {})
|
|
191
|
+
if @api_client.config.debugging
|
|
192
|
+
@api_client.config.logger.debug 'Calling API: ListingsApi.patch_listings_item ...'
|
|
193
|
+
end
|
|
194
|
+
# verify the required parameter 'body' is set
|
|
195
|
+
if @api_client.config.client_side_validation && body.nil?
|
|
196
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling ListingsApi.patch_listings_item"
|
|
197
|
+
end
|
|
198
|
+
# verify the required parameter 'marketplace_ids' is set
|
|
199
|
+
if @api_client.config.client_side_validation && marketplace_ids.nil?
|
|
200
|
+
fail ArgumentError, "Missing the required parameter 'marketplace_ids' when calling ListingsApi.patch_listings_item"
|
|
201
|
+
end
|
|
202
|
+
# verify the required parameter 'seller_id' is set
|
|
203
|
+
if @api_client.config.client_side_validation && seller_id.nil?
|
|
204
|
+
fail ArgumentError, "Missing the required parameter 'seller_id' when calling ListingsApi.patch_listings_item"
|
|
205
|
+
end
|
|
206
|
+
# verify the required parameter 'sku' is set
|
|
207
|
+
if @api_client.config.client_side_validation && sku.nil?
|
|
208
|
+
fail ArgumentError, "Missing the required parameter 'sku' when calling ListingsApi.patch_listings_item"
|
|
209
|
+
end
|
|
210
|
+
if @api_client.config.client_side_validation && opts[:'included_data'] && !opts[:'included_data'].all? { |item| ['identifiers', 'issues'].include?(item) }
|
|
211
|
+
fail ArgumentError, 'invalid value for "included_data", must include one of identifiers, issues'
|
|
212
|
+
end
|
|
213
|
+
if @api_client.config.client_side_validation && opts[:'mode'] && !['VALIDATION_PREVIEW'].include?(opts[:'mode'])
|
|
214
|
+
fail ArgumentError, 'invalid value for "mode", must be one of VALIDATION_PREVIEW'
|
|
215
|
+
end
|
|
216
|
+
# resource path
|
|
217
|
+
local_var_path = '/listings/2021-08-01/items/{sellerId}/{sku}'.sub('{' + 'sellerId' + '}', seller_id.to_s).sub('{' + 'sku' + '}', sku.to_s)
|
|
218
|
+
|
|
219
|
+
# query parameters
|
|
220
|
+
query_params = opts[:query_params] || {}
|
|
221
|
+
query_params[:'marketplaceIds'] = @api_client.build_collection_param(marketplace_ids, :csv)
|
|
222
|
+
query_params[:'includedData'] = @api_client.build_collection_param(opts[:'included_data'], :csv) if !opts[:'included_data'].nil?
|
|
223
|
+
query_params[:'mode'] = opts[:'mode'] if !opts[:'mode'].nil?
|
|
224
|
+
query_params[:'issueLocale'] = opts[:'issue_locale'] if !opts[:'issue_locale'].nil?
|
|
225
|
+
|
|
226
|
+
# header parameters
|
|
227
|
+
header_params = opts[:header_params] || {}
|
|
228
|
+
# HTTP header 'Accept' (if needed)
|
|
229
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
230
|
+
# HTTP header 'Content-Type'
|
|
231
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
232
|
+
|
|
233
|
+
# form parameters
|
|
234
|
+
form_params = opts[:form_params] || {}
|
|
235
|
+
|
|
236
|
+
# http body (model)
|
|
237
|
+
post_body = opts[:body] || @api_client.object_to_http_body(body)
|
|
238
|
+
|
|
239
|
+
return_type = opts[:return_type] || 'AmazonSpClients::ApiResponse'
|
|
240
|
+
|
|
241
|
+
auth_names = opts[:auth_names] || []
|
|
242
|
+
data = @api_client.call_api(:PATCH, local_var_path,
|
|
243
|
+
:header_params => header_params,
|
|
244
|
+
:query_params => query_params,
|
|
245
|
+
:form_params => form_params,
|
|
246
|
+
:body => post_body,
|
|
247
|
+
:auth_names => auth_names,
|
|
248
|
+
:return_type => return_type)
|
|
249
|
+
|
|
250
|
+
if @api_client.config.debugging
|
|
251
|
+
@api_client.config.logger.debug "API called: ListingsApi#patch_listings_item\nData: #{data.inspect}"
|
|
252
|
+
end
|
|
253
|
+
return data
|
|
254
|
+
end
|
|
255
|
+
# Creates or fully updates an existing listings item for a selling partner. **Note:** This operation has a throttling rate of one request per second when `mode` is `VALIDATION_PREVIEW`. **Note:** The parameters associated with this operation may contain special characters that must be encoded to 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). **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 5 | 10 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this 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](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
|
|
256
|
+
# @param body The request body schema for the `putListingsItem` operation.
|
|
257
|
+
# @param marketplace_ids A comma-delimited list of Amazon marketplace identifiers for the request.
|
|
258
|
+
# @param seller_id A selling partner identifier, such as a merchant account or vendor code.
|
|
259
|
+
# @param sku A selling partner provided identifier for an Amazon listing.
|
|
260
|
+
# @param [Hash] opts the optional parameters
|
|
261
|
+
# @option opts [Array<String>] :included_data A comma-delimited list of data sets to include in the response. Default: `issues`.
|
|
262
|
+
# @option opts [String] :mode The mode of operation for the request.
|
|
263
|
+
# @option opts [String] :issue_locale A locale for localization of issues. When not provided, the default language code of the first marketplace is used. Examples: `en_US`, `fr_CA`, `fr_FR`. Localized messages default to `en_US` when a localization is not available in the specified locale.
|
|
264
|
+
# @return [ListingsItemSubmissionResponse]
|
|
265
|
+
def put_listings_item(body, marketplace_ids, seller_id, sku, opts = {})
|
|
266
|
+
data = put_listings_item_with_http_info(body, marketplace_ids, seller_id, sku, opts)
|
|
267
|
+
return data
|
|
268
|
+
end
|
|
269
|
+
|
|
270
|
+
# Creates or fully updates an existing listings item for a selling partner. **Note:** This operation has a throttling rate of one request per second when `mode` is `VALIDATION_PREVIEW`. **Note:** The parameters associated with this operation may contain special characters that must be encoded to 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). **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 5 | 10 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this 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](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
|
|
271
|
+
# @param body The request body schema for the `putListingsItem` operation.
|
|
272
|
+
# @param marketplace_ids A comma-delimited list of Amazon marketplace identifiers for the request.
|
|
273
|
+
# @param seller_id A selling partner identifier, such as a merchant account or vendor code.
|
|
274
|
+
# @param sku A selling partner provided identifier for an Amazon listing.
|
|
275
|
+
# @param [Hash] opts the optional parameters
|
|
276
|
+
# @option opts [Array<String>] :included_data A comma-delimited list of data sets to include in the response. Default: `issues`.
|
|
277
|
+
# @option opts [String] :mode The mode of operation for the request.
|
|
278
|
+
# @option opts [String] :issue_locale A locale for localization of issues. When not provided, the default language code of the first marketplace is used. Examples: `en_US`, `fr_CA`, `fr_FR`. Localized messages default to `en_US` when a localization is not available in the specified locale.
|
|
279
|
+
# @return [Array<(ListingsItemSubmissionResponse)>] ListingsItemSubmissionResponse data, response status code and response headers
|
|
280
|
+
def put_listings_item_with_http_info(body, marketplace_ids, seller_id, sku, opts = {})
|
|
281
|
+
if @api_client.config.debugging
|
|
282
|
+
@api_client.config.logger.debug 'Calling API: ListingsApi.put_listings_item ...'
|
|
283
|
+
end
|
|
284
|
+
# verify the required parameter 'body' is set
|
|
285
|
+
if @api_client.config.client_side_validation && body.nil?
|
|
286
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling ListingsApi.put_listings_item"
|
|
287
|
+
end
|
|
288
|
+
# verify the required parameter 'marketplace_ids' is set
|
|
289
|
+
if @api_client.config.client_side_validation && marketplace_ids.nil?
|
|
290
|
+
fail ArgumentError, "Missing the required parameter 'marketplace_ids' when calling ListingsApi.put_listings_item"
|
|
291
|
+
end
|
|
292
|
+
# verify the required parameter 'seller_id' is set
|
|
293
|
+
if @api_client.config.client_side_validation && seller_id.nil?
|
|
294
|
+
fail ArgumentError, "Missing the required parameter 'seller_id' when calling ListingsApi.put_listings_item"
|
|
295
|
+
end
|
|
296
|
+
# verify the required parameter 'sku' is set
|
|
297
|
+
if @api_client.config.client_side_validation && sku.nil?
|
|
298
|
+
fail ArgumentError, "Missing the required parameter 'sku' when calling ListingsApi.put_listings_item"
|
|
299
|
+
end
|
|
300
|
+
if @api_client.config.client_side_validation && opts[:'included_data'] && !opts[:'included_data'].all? { |item| ['identifiers', 'issues'].include?(item) }
|
|
301
|
+
fail ArgumentError, 'invalid value for "included_data", must include one of identifiers, issues'
|
|
302
|
+
end
|
|
303
|
+
if @api_client.config.client_side_validation && opts[:'mode'] && !['VALIDATION_PREVIEW'].include?(opts[:'mode'])
|
|
304
|
+
fail ArgumentError, 'invalid value for "mode", must be one of VALIDATION_PREVIEW'
|
|
305
|
+
end
|
|
306
|
+
# resource path
|
|
307
|
+
local_var_path = '/listings/2021-08-01/items/{sellerId}/{sku}'.sub('{' + 'sellerId' + '}', seller_id.to_s).sub('{' + 'sku' + '}', sku.to_s)
|
|
308
|
+
|
|
309
|
+
# query parameters
|
|
310
|
+
query_params = opts[:query_params] || {}
|
|
311
|
+
query_params[:'marketplaceIds'] = @api_client.build_collection_param(marketplace_ids, :csv)
|
|
312
|
+
query_params[:'includedData'] = @api_client.build_collection_param(opts[:'included_data'], :csv) if !opts[:'included_data'].nil?
|
|
313
|
+
query_params[:'mode'] = opts[:'mode'] if !opts[:'mode'].nil?
|
|
314
|
+
query_params[:'issueLocale'] = opts[:'issue_locale'] if !opts[:'issue_locale'].nil?
|
|
315
|
+
|
|
316
|
+
# header parameters
|
|
317
|
+
header_params = opts[:header_params] || {}
|
|
318
|
+
# HTTP header 'Accept' (if needed)
|
|
319
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
320
|
+
# HTTP header 'Content-Type'
|
|
321
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
322
|
+
|
|
323
|
+
# form parameters
|
|
324
|
+
form_params = opts[:form_params] || {}
|
|
325
|
+
|
|
326
|
+
# http body (model)
|
|
327
|
+
post_body = opts[:body] || @api_client.object_to_http_body(body)
|
|
328
|
+
|
|
329
|
+
return_type = opts[:return_type] || 'AmazonSpClients::ApiResponse'
|
|
330
|
+
|
|
331
|
+
auth_names = opts[:auth_names] || []
|
|
332
|
+
data = @api_client.call_api(:PUT, local_var_path,
|
|
333
|
+
:header_params => header_params,
|
|
334
|
+
:query_params => query_params,
|
|
335
|
+
:form_params => form_params,
|
|
336
|
+
:body => post_body,
|
|
337
|
+
:auth_names => auth_names,
|
|
338
|
+
:return_type => return_type)
|
|
339
|
+
|
|
340
|
+
if @api_client.config.debugging
|
|
341
|
+
@api_client.config.logger.debug "API called: ListingsApi#put_listings_item\nData: #{data.inspect}"
|
|
342
|
+
end
|
|
343
|
+
return data
|
|
344
|
+
end
|
|
345
|
+
# Search for and return a list of selling partner listings items and their respective details. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 5 | 5 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that are applied to the requested operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput might have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
|
|
346
|
+
# @param seller_id A selling partner identifier, such as a merchant account or vendor code.
|
|
347
|
+
# @param marketplace_ids A comma-delimited list of Amazon marketplace identifiers for the request.
|
|
348
|
+
# @param [Hash] opts the optional parameters
|
|
349
|
+
# @option opts [String] :issue_locale A locale that is used to localize issues. When not provided, the default language code of the first marketplace is used. Examples: \"en_US\", \"fr_CA\", \"fr_FR\". When a localization is not available in the specified locale, localized messages default to \"en_US\".
|
|
350
|
+
# @option opts [Array<String>] :included_data A comma-delimited list of datasets that you want to include in the response. Default: `summaries`.
|
|
351
|
+
# @option opts [Array<String>] :identifiers A comma-delimited list of product identifiers that you can use to search for listings items. **Note**: 1. This is required when you specify `identifiersType`. 2. You cannot use 'identifiers' if you specify `variationParentSku` or `packageHierarchySku`.
|
|
352
|
+
# @option opts [String] :identifiers_type A type of product identifiers that you can use to search for listings items. **Note**: This is required when `identifiers` is provided.
|
|
353
|
+
# @option opts [String] :variation_parent_sku Filters results to include listing items that are variation children of the specified SKU. **Note**: You cannot use `variationParentSku` if you include `identifiers` or `packageHierarchySku` in your request.
|
|
354
|
+
# @option opts [String] :package_hierarchy_sku Filter results to include listing items that contain or are contained by the specified SKU. **Note**: You cannot use `packageHierarchySku` if you include `identifiers` or `variationParentSku` in your request.
|
|
355
|
+
# @option opts [DateTime] :created_after A date-time that is used to filter listing items. The response includes listings items that were created at or after this time. Values are in [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) date-time format.
|
|
356
|
+
# @option opts [DateTime] :created_before A date-time that is used to filter listing items. The response includes listings items that were created at or before this time. Values are in [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) date-time format.
|
|
357
|
+
# @option opts [DateTime] :last_updated_after A date-time that is used to filter listing items. The response includes listings items that were last updated at or after this time. Values are in [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) date-time format.
|
|
358
|
+
# @option opts [DateTime] :last_updated_before A date-time that is used to filter listing items. The response includes listings items that were last updated at or before this time. Values are in [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) date-time format.
|
|
359
|
+
# @option opts [Array<String>] :with_issue_severity Filter results to include only listing items that have issues that match one or more of the specified severity levels.
|
|
360
|
+
# @option opts [Array<String>] :with_status Filter results to include only listing items that have the specified status.
|
|
361
|
+
# @option opts [Array<String>] :without_status Filter results to include only listing items that don't contain the specified statuses.
|
|
362
|
+
# @option opts [String] :sort_by An attribute by which to sort the returned listing items. (default to lastUpdatedDate)
|
|
363
|
+
# @option opts [String] :sort_order The order in which to sort the result items. (default to DESC)
|
|
364
|
+
# @option opts [Integer] :page_size The number of results that you want to include on each page. (default to 10)
|
|
365
|
+
# @option opts [String] :page_token A token that you can use to fetch a specific page when there are multiple pages of results.
|
|
366
|
+
# @return [ItemSearchResults]
|
|
367
|
+
def search_listings_items(seller_id, marketplace_ids, opts = {})
|
|
368
|
+
data = search_listings_items_with_http_info(seller_id, marketplace_ids, opts)
|
|
369
|
+
return data
|
|
370
|
+
end
|
|
371
|
+
|
|
372
|
+
# Search for and return a list of selling partner listings items and their respective details. **Usage Plan:** | Rate (requests per second) | Burst | | ---- | ---- | | 5 | 5 | The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that are applied to the requested operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput might have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).
|
|
373
|
+
# @param seller_id A selling partner identifier, such as a merchant account or vendor code.
|
|
374
|
+
# @param marketplace_ids A comma-delimited list of Amazon marketplace identifiers for the request.
|
|
375
|
+
# @param [Hash] opts the optional parameters
|
|
376
|
+
# @option opts [String] :issue_locale A locale that is used to localize issues. When not provided, the default language code of the first marketplace is used. Examples: \"en_US\", \"fr_CA\", \"fr_FR\". When a localization is not available in the specified locale, localized messages default to \"en_US\".
|
|
377
|
+
# @option opts [Array<String>] :included_data A comma-delimited list of datasets that you want to include in the response. Default: `summaries`.
|
|
378
|
+
# @option opts [Array<String>] :identifiers A comma-delimited list of product identifiers that you can use to search for listings items. **Note**: 1. This is required when you specify `identifiersType`. 2. You cannot use 'identifiers' if you specify `variationParentSku` or `packageHierarchySku`.
|
|
379
|
+
# @option opts [String] :identifiers_type A type of product identifiers that you can use to search for listings items. **Note**: This is required when `identifiers` is provided.
|
|
380
|
+
# @option opts [String] :variation_parent_sku Filters results to include listing items that are variation children of the specified SKU. **Note**: You cannot use `variationParentSku` if you include `identifiers` or `packageHierarchySku` in your request.
|
|
381
|
+
# @option opts [String] :package_hierarchy_sku Filter results to include listing items that contain or are contained by the specified SKU. **Note**: You cannot use `packageHierarchySku` if you include `identifiers` or `variationParentSku` in your request.
|
|
382
|
+
# @option opts [DateTime] :created_after A date-time that is used to filter listing items. The response includes listings items that were created at or after this time. Values are in [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) date-time format.
|
|
383
|
+
# @option opts [DateTime] :created_before A date-time that is used to filter listing items. The response includes listings items that were created at or before this time. Values are in [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) date-time format.
|
|
384
|
+
# @option opts [DateTime] :last_updated_after A date-time that is used to filter listing items. The response includes listings items that were last updated at or after this time. Values are in [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) date-time format.
|
|
385
|
+
# @option opts [DateTime] :last_updated_before A date-time that is used to filter listing items. The response includes listings items that were last updated at or before this time. Values are in [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) date-time format.
|
|
386
|
+
# @option opts [Array<String>] :with_issue_severity Filter results to include only listing items that have issues that match one or more of the specified severity levels.
|
|
387
|
+
# @option opts [Array<String>] :with_status Filter results to include only listing items that have the specified status.
|
|
388
|
+
# @option opts [Array<String>] :without_status Filter results to include only listing items that don't contain the specified statuses.
|
|
389
|
+
# @option opts [String] :sort_by An attribute by which to sort the returned listing items.
|
|
390
|
+
# @option opts [String] :sort_order The order in which to sort the result items.
|
|
391
|
+
# @option opts [Integer] :page_size The number of results that you want to include on each page.
|
|
392
|
+
# @option opts [String] :page_token A token that you can use to fetch a specific page when there are multiple pages of results.
|
|
393
|
+
# @return [Array<(ItemSearchResults)>] ItemSearchResults data, response status code and response headers
|
|
394
|
+
def search_listings_items_with_http_info(seller_id, marketplace_ids, opts = {})
|
|
395
|
+
if @api_client.config.debugging
|
|
396
|
+
@api_client.config.logger.debug 'Calling API: ListingsApi.search_listings_items ...'
|
|
397
|
+
end
|
|
398
|
+
# verify the required parameter 'seller_id' is set
|
|
399
|
+
if @api_client.config.client_side_validation && seller_id.nil?
|
|
400
|
+
fail ArgumentError, "Missing the required parameter 'seller_id' when calling ListingsApi.search_listings_items"
|
|
401
|
+
end
|
|
402
|
+
# verify the required parameter 'marketplace_ids' is set
|
|
403
|
+
if @api_client.config.client_side_validation && marketplace_ids.nil?
|
|
404
|
+
fail ArgumentError, "Missing the required parameter 'marketplace_ids' when calling ListingsApi.search_listings_items"
|
|
405
|
+
end
|
|
406
|
+
if @api_client.config.client_side_validation && opts[:'included_data'] && !opts[:'included_data'].all? { |item| ['summaries', 'attributes', 'issues', 'offers', 'fulfillmentAvailability', 'procurement', 'relationships', 'productTypes'].include?(item) }
|
|
407
|
+
fail ArgumentError, 'invalid value for "included_data", must include one of summaries, attributes, issues, offers, fulfillmentAvailability, procurement, relationships, productTypes'
|
|
408
|
+
end
|
|
409
|
+
if @api_client.config.client_side_validation && opts[:'identifiers_type'] && !['ASIN', 'EAN', 'FNSKU', 'GTIN', 'ISBN', 'JAN', 'MINSAN', 'SKU', 'UPC'].include?(opts[:'identifiers_type'])
|
|
410
|
+
fail ArgumentError, 'invalid value for "identifiers_type", must be one of ASIN, EAN, FNSKU, GTIN, ISBN, JAN, MINSAN, SKU, UPC'
|
|
411
|
+
end
|
|
412
|
+
if @api_client.config.client_side_validation && opts[:'with_issue_severity'] && !opts[:'with_issue_severity'].all? { |item| ['WARNING', 'ERROR'].include?(item) }
|
|
413
|
+
fail ArgumentError, 'invalid value for "with_issue_severity", must include one of WARNING, ERROR'
|
|
414
|
+
end
|
|
415
|
+
if @api_client.config.client_side_validation && opts[:'with_status'] && !opts[:'with_status'].all? { |item| ['BUYABLE', 'DISCOVERABLE'].include?(item) }
|
|
416
|
+
fail ArgumentError, 'invalid value for "with_status", must include one of BUYABLE, DISCOVERABLE'
|
|
417
|
+
end
|
|
418
|
+
if @api_client.config.client_side_validation && opts[:'without_status'] && !opts[:'without_status'].all? { |item| ['BUYABLE', 'DISCOVERABLE'].include?(item) }
|
|
419
|
+
fail ArgumentError, 'invalid value for "without_status", must include one of BUYABLE, DISCOVERABLE'
|
|
420
|
+
end
|
|
421
|
+
if @api_client.config.client_side_validation && opts[:'sort_by'] && !['sku', 'createdDate', 'lastUpdatedDate'].include?(opts[:'sort_by'])
|
|
422
|
+
fail ArgumentError, 'invalid value for "sort_by", must be one of sku, createdDate, lastUpdatedDate'
|
|
423
|
+
end
|
|
424
|
+
if @api_client.config.client_side_validation && opts[:'sort_order'] && !['ASC', 'DESC'].include?(opts[:'sort_order'])
|
|
425
|
+
fail ArgumentError, 'invalid value for "sort_order", must be one of ASC, DESC'
|
|
426
|
+
end
|
|
427
|
+
# resource path
|
|
428
|
+
local_var_path = '/listings/2021-08-01/items/{sellerId}'.sub('{' + 'sellerId' + '}', seller_id.to_s)
|
|
429
|
+
|
|
430
|
+
# query parameters
|
|
431
|
+
query_params = opts[:query_params] || {}
|
|
432
|
+
query_params[:'marketplaceIds'] = @api_client.build_collection_param(marketplace_ids, :csv)
|
|
433
|
+
query_params[:'issueLocale'] = opts[:'issue_locale'] if !opts[:'issue_locale'].nil?
|
|
434
|
+
query_params[:'includedData'] = @api_client.build_collection_param(opts[:'included_data'], :csv) if !opts[:'included_data'].nil?
|
|
435
|
+
query_params[:'identifiers'] = @api_client.build_collection_param(opts[:'identifiers'], :csv) if !opts[:'identifiers'].nil?
|
|
436
|
+
query_params[:'identifiersType'] = opts[:'identifiers_type'] if !opts[:'identifiers_type'].nil?
|
|
437
|
+
query_params[:'variationParentSku'] = opts[:'variation_parent_sku'] if !opts[:'variation_parent_sku'].nil?
|
|
438
|
+
query_params[:'packageHierarchySku'] = opts[:'package_hierarchy_sku'] if !opts[:'package_hierarchy_sku'].nil?
|
|
439
|
+
query_params[:'createdAfter'] = opts[:'created_after'] if !opts[:'created_after'].nil?
|
|
440
|
+
query_params[:'createdBefore'] = opts[:'created_before'] if !opts[:'created_before'].nil?
|
|
441
|
+
query_params[:'lastUpdatedAfter'] = opts[:'last_updated_after'] if !opts[:'last_updated_after'].nil?
|
|
442
|
+
query_params[:'lastUpdatedBefore'] = opts[:'last_updated_before'] if !opts[:'last_updated_before'].nil?
|
|
443
|
+
query_params[:'withIssueSeverity'] = @api_client.build_collection_param(opts[:'with_issue_severity'], :csv) if !opts[:'with_issue_severity'].nil?
|
|
444
|
+
query_params[:'withStatus'] = @api_client.build_collection_param(opts[:'with_status'], :csv) if !opts[:'with_status'].nil?
|
|
445
|
+
query_params[:'withoutStatus'] = @api_client.build_collection_param(opts[:'without_status'], :csv) if !opts[:'without_status'].nil?
|
|
446
|
+
query_params[:'sortBy'] = opts[:'sort_by'] if !opts[:'sort_by'].nil?
|
|
447
|
+
query_params[:'sortOrder'] = opts[:'sort_order'] if !opts[:'sort_order'].nil?
|
|
448
|
+
query_params[:'pageSize'] = opts[:'page_size'] if !opts[:'page_size'].nil?
|
|
449
|
+
query_params[:'pageToken'] = opts[:'page_token'] if !opts[:'page_token'].nil?
|
|
450
|
+
|
|
451
|
+
# header parameters
|
|
452
|
+
header_params = opts[:header_params] || {}
|
|
453
|
+
# HTTP header 'Accept' (if needed)
|
|
454
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
455
|
+
|
|
456
|
+
# form parameters
|
|
457
|
+
form_params = opts[:form_params] || {}
|
|
458
|
+
|
|
459
|
+
# http body (model)
|
|
460
|
+
post_body = opts[:body]
|
|
461
|
+
|
|
462
|
+
return_type = opts[:return_type] || 'AmazonSpClients::ApiResponse'
|
|
463
|
+
|
|
464
|
+
auth_names = opts[:auth_names] || []
|
|
465
|
+
data = @api_client.call_api(:GET, local_var_path,
|
|
466
|
+
:header_params => header_params,
|
|
467
|
+
:query_params => query_params,
|
|
468
|
+
:form_params => form_params,
|
|
469
|
+
:body => post_body,
|
|
470
|
+
:auth_names => auth_names,
|
|
471
|
+
:return_type => return_type)
|
|
472
|
+
|
|
473
|
+
if @api_client.config.debugging
|
|
474
|
+
@api_client.config.logger.debug "API called: ListingsApi#search_listings_items\nData: #{data.inspect}"
|
|
475
|
+
end
|
|
476
|
+
return data
|
|
477
|
+
end
|
|
478
|
+
end
|
|
479
|
+
end
|
|
480
|
+
end
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Selling Partner API for Listings Items
|
|
3
|
+
|
|
4
|
+
#The Selling Partner API for Listings Items (Listings Items API) provides programmatic access to selling partner listings on Amazon. Use this API in collaboration with the Selling Partner API for Product Type Definitions, which you use to retrieve the information about Amazon product types needed to use the Listings Items API. For more information, see the [Listings Items API Use Case Guide](https://developer-docs.amazon.com/sp-api/docs/listings-items-api-v2021-08-01-use-case-guide).
|
|
5
|
+
|
|
6
|
+
OpenAPI spec version: 2021-08-01
|
|
7
|
+
|
|
8
|
+
Generated by: lib/generator (bundle exec rake generate)
|
|
9
|
+
=end
|
|
10
|
+
|
|
11
|
+
# APIs
|
|
12
|
+
require_relative './sp_listings_items_2021/api/listings_api'
|