Class: AmzSpApi::VendorOrdersApiModel::VendorOrdersApi

Inherits:
Object
  • Object
show all
Defined in:
lib/vendor-orders-api-model/api/vendor_orders_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ VendorOrdersApi

Returns a new instance of VendorOrdersApi.



16
17
18
# File 'lib/vendor-orders-api-model/api/vendor_orders_api.rb', line 16

def initialize(api_client = ApiClient.default)
  @api_client = api_client
end

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



14
15
16
# File 'lib/vendor-orders-api-model/api/vendor_orders_api.rb', line 14

def api_client
  @api_client
end

Instance Method Details

#get_purchase_order(purchase_order_number, opts = {}) ⇒ GetPurchaseOrderResponse

Returns a purchase order based on the purchaseOrderNumber value that you specify. **Usage Plans:** | Plan type | Rate (requests per second) | Burst | | —- | —- | —- | |Default| 10 | 10 | |Selling partner specific| Variable | Variable | The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation. Rate limits for some selling partners will vary from the default rate and burst shown in the table above. For more information, see "Usage Plans and Rate Limits" in the Selling Partner API documentation.

Parameters:

  • purchase_order_number

    The purchase order identifier for the order that you want. Formatting Notes: 8-character alpha-numeric code.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



23
24
25
26
# File 'lib/vendor-orders-api-model/api/vendor_orders_api.rb', line 23

def get_purchase_order(purchase_order_number, opts = {})
  data, _status_code, _headers = get_purchase_order_with_http_info(purchase_order_number, opts)
  data
end

#get_purchase_order_with_http_info(purchase_order_number, opts = {}) ⇒ Array<(GetPurchaseOrderResponse, Integer, Hash)>

Returns a purchase order based on the purchaseOrderNumber value that you specify. **Usage Plans:** | Plan type | Rate (requests per second) | Burst | | —- | —- | —- | |Default| 10 | 10 | |Selling partner specific| Variable | Variable | The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation. Rate limits for some selling partners will vary from the default rate and burst shown in the table above. For more information, see &quot;Usage Plans and Rate Limits&quot; in the Selling Partner API documentation.

Parameters:

  • purchase_order_number

    The purchase order identifier for the order that you want. Formatting Notes: 8-character alpha-numeric code.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(GetPurchaseOrderResponse, Integer, Hash)>)

    GetPurchaseOrderResponse data, response status code and response headers



32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
# File 'lib/vendor-orders-api-model/api/vendor_orders_api.rb', line 32

def get_purchase_order_with_http_info(purchase_order_number, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: VendorOrdersApi.get_purchase_order ...'
  end
  # verify the required parameter 'purchase_order_number' is set
  if @api_client.config.client_side_validation && purchase_order_number.nil?
    fail ArgumentError, "Missing the required parameter 'purchase_order_number' when calling VendorOrdersApi.get_purchase_order"
  end
  # resource path
  local_var_path = '/vendor/orders/v1/purchaseOrders/{purchaseOrderNumber}'.sub('{' + 'purchaseOrderNumber' + '}', purchase_order_number.to_s)

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] 

  return_type = opts[:return_type] || 'GetPurchaseOrderResponse' 

  auth_names = opts[:auth_names] || []
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type)

  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: VendorOrdersApi#get_purchase_order\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_purchase_orders(opts = {}) ⇒ GetPurchaseOrdersResponse

Returns a list of purchase orders created or changed during the time frame that you specify. You define the time frame using the createdAfter, createdBefore, changedAfter and changedBefore parameters. The date range to search must not be more than 7 days. You can choose to get only the purchase order numbers by setting includeDetails to false. You can then use the getPurchaseOrder operation to receive details for a specific purchase order. **Usage Plans:** | Plan type | Rate (requests per second) | Burst | | —- | —- | —- | |Default| 10 | 10 | |Selling partner specific| Variable | Variable | The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation. Rate limits for some selling partners will vary from the default rate and burst shown in the table above. For more information, see "Usage Plans and Rate Limits" in the Selling Partner API documentation.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :limit (Integer)

    The limit to the number of records returned. Default value is 100 records.

  • :created_after (DateTime)

    Purchase orders that became available after this time will be included in the result. Must be in ISO-8601 date/time format.

  • :created_before (DateTime)

    Purchase orders that became available before this time will be included in the result. Must be in ISO-8601 date/time format.

  • :sort_order (String)

    Sort in ascending or descending order by purchase order creation date.

  • :next_token (String)

    Used for pagination when there is more purchase orders than the specified result size limit. The token value is returned in the previous API call

  • :include_details (String)

    When true, returns purchase orders with complete details. Otherwise, only purchase order numbers are returned. Default value is true.

  • :changed_after (DateTime)

    Purchase orders that changed after this timestamp will be included in the result. Must be in ISO-8601 date/time format.

  • :changed_before (DateTime)

    Purchase orders that changed before this timestamp will be included in the result. Must be in ISO-8601 date/time format.

  • :po_item_state (String)

    Current state of the purchase order item. If this value is Cancelled, this API will return purchase orders which have one or more items cancelled by Amazon with updated item quantity as zero.

  • :is_po_changed (String)

    When true, returns purchase orders which were modified after the order was placed. Vendors are required to pull the changed purchase order and fulfill the updated purchase order and not the original one. Default value is false.

  • :purchase_order_state (String)

    Filters purchase orders based on the purchase order state.

  • :ordering_vendor_code (String)

    Filters purchase orders based on the specified ordering vendor code. This value should be same as &#x27;sellingParty.partyId&#x27; in the purchase order. If not included in the filter, all purchase orders for all of the vendor codes that exist in the vendor group used to authorize the API client application are returned.

Returns:



88
89
90
91
# File 'lib/vendor-orders-api-model/api/vendor_orders_api.rb', line 88

def get_purchase_orders(opts = {})
  data, _status_code, _headers = get_purchase_orders_with_http_info(opts)
  data
end

#get_purchase_orders_status(opts = {}) ⇒ GetPurchaseOrdersStatusResponse

Returns purchase order statuses based on the filters that you specify. Date range to search must not be more 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. **Usage Plans:** | Plan type | Rate (requests per second) | Burst | | —- | —- | —- | |Default| 10 | 10 | |Selling partner specific| Variable | Variable | The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation. Rate limits for some selling partners will vary from the default rate and burst shown in the table above. For more information, see "Usage Plans and Rate Limits" in the Selling Partner API documentation.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :limit (Integer)

    The limit to the number of records returned. Default value is 100 records.

  • :sort_order (String)

    Sort in ascending or descending order by purchase order creation date.

  • :next_token (String)

    Used for pagination when there are more purchase orders than the specified result size limit.

  • :created_after (DateTime)

    Purchase orders that became available after this timestamp will be included in the result. Must be in ISO-8601 date/time format.

  • :created_before (DateTime)

    Purchase orders that became available before this timestamp will be included in the result. Must be in ISO-8601 date/time format.

  • :updated_after (DateTime)

    Purchase orders for which the last purchase order update happened after this timestamp will be included in the result. Must be in ISO-8601 date/time format.

  • :updated_before (DateTime)

    Purchase orders for which the last purchase order update happened before this timestamp will be included in the result. Must be in ISO-8601 date/time format.

  • :purchase_order_number (String)

    Provides purchase order status for the specified purchase order number.

  • :purchase_order_status (String)

    Filters purchase orders based on the specified purchase order status. If not included in filter, this will return purchase orders for all statuses.

  • :item_confirmation_status (String)

    Filters purchase orders based on their item confirmation status. If the item confirmation status is not included in the filter, purchase orders for all confirmation statuses are included.

  • :item_receive_status (String)

    Filters purchase orders based on the purchase order&#x27;s item receive status. If the item receive status is not included in the filter, purchase orders for all receive statuses are included.

  • :ordering_vendor_code (String)

    Filters purchase orders based on the specified ordering vendor code. This value should be same as &#x27;sellingParty.partyId&#x27; in the purchase order. If not included in filter, all purchase orders for all the vendor codes that exist in the vendor group used to authorize API client application are returned.

  • :ship_to_party_id (String)

    Filters purchase orders for a specific buyer&#x27;s Fulfillment Center/warehouse by providing ship to location id here. This value should be same as &#x27;shipToParty.partyId&#x27; in the purchase order. If not included in filter, this will return purchase orders for all the buyer&#x27;s warehouses used for vendor group purchase orders.

Returns:



182
183
184
185
# File 'lib/vendor-orders-api-model/api/vendor_orders_api.rb', line 182

def get_purchase_orders_status(opts = {})
  data, _status_code, _headers = get_purchase_orders_status_with_http_info(opts)
  data
end

#get_purchase_orders_status_with_http_info(opts = {}) ⇒ Array<(GetPurchaseOrdersStatusResponse, Integer, Hash)>

Returns purchase order statuses based on the filters that you specify. Date range to search must not be more 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. **Usage Plans:** | Plan type | Rate (requests per second) | Burst | | —- | —- | —- | |Default| 10 | 10 | |Selling partner specific| Variable | Variable | The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation. Rate limits for some selling partners will vary from the default rate and burst shown in the table above. For more information, see &quot;Usage Plans and Rate Limits&quot; in the Selling Partner API documentation.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :limit (Integer)

    The limit to the number of records returned. Default value is 100 records.

  • :sort_order (String)

    Sort in ascending or descending order by purchase order creation date.

  • :next_token (String)

    Used for pagination when there are more purchase orders than the specified result size limit.

  • :created_after (DateTime)

    Purchase orders that became available after this timestamp will be included in the result. Must be in ISO-8601 date/time format.

  • :created_before (DateTime)

    Purchase orders that became available before this timestamp will be included in the result. Must be in ISO-8601 date/time format.

  • :updated_after (DateTime)

    Purchase orders for which the last purchase order update happened after this timestamp will be included in the result. Must be in ISO-8601 date/time format.

  • :updated_before (DateTime)

    Purchase orders for which the last purchase order update happened before this timestamp will be included in the result. Must be in ISO-8601 date/time format.

  • :purchase_order_number (String)

    Provides purchase order status for the specified purchase order number.

  • :purchase_order_status (String)

    Filters purchase orders based on the specified purchase order status. If not included in filter, this will return purchase orders for all statuses.

  • :item_confirmation_status (String)

    Filters purchase orders based on their item confirmation status. If the item confirmation status is not included in the filter, purchase orders for all confirmation statuses are included.

  • :item_receive_status (String)

    Filters purchase orders based on the purchase order&#x27;s item receive status. If the item receive status is not included in the filter, purchase orders for all receive statuses are included.

  • :ordering_vendor_code (String)

    Filters purchase orders based on the specified ordering vendor code. This value should be same as &#x27;sellingParty.partyId&#x27; in the purchase order. If not included in filter, all purchase orders for all the vendor codes that exist in the vendor group used to authorize API client application are returned.

  • :ship_to_party_id (String)

    Filters purchase orders for a specific buyer&#x27;s Fulfillment Center/warehouse by providing ship to location id here. This value should be same as &#x27;shipToParty.partyId&#x27; in the purchase order. If not included in filter, this will return purchase orders for all the buyer&#x27;s warehouses used for vendor group purchase orders.

Returns:



203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
# File 'lib/vendor-orders-api-model/api/vendor_orders_api.rb', line 203

def get_purchase_orders_status_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: VendorOrdersApi.get_purchase_orders_status ...'
  end
  if @api_client.config.client_side_validation && opts[:'sort_order'] && !['ASC', 'DESC'].include?(opts[:'sort_order'])
    fail ArgumentError, 'invalid value for "sort_order", must be one of ASC, DESC'
  end
  if @api_client.config.client_side_validation && opts[:'purchase_order_status'] && !['OPEN', 'CLOSED'].include?(opts[:'purchase_order_status'])
    fail ArgumentError, 'invalid value for "purchase_order_status", must be one of OPEN, CLOSED'
  end
  if @api_client.config.client_side_validation && opts[:'item_confirmation_status'] && !['ACCEPTED', 'PARTIALLY_ACCEPTED', 'REJECTED', 'UNCONFIRMED'].include?(opts[:'item_confirmation_status'])
    fail ArgumentError, 'invalid value for "item_confirmation_status", must be one of ACCEPTED, PARTIALLY_ACCEPTED, REJECTED, UNCONFIRMED'
  end
  if @api_client.config.client_side_validation && opts[:'item_receive_status'] && !['NOT_RECEIVED', 'PARTIALLY_RECEIVED', 'RECEIVED'].include?(opts[:'item_receive_status'])
    fail ArgumentError, 'invalid value for "item_receive_status", must be one of NOT_RECEIVED, PARTIALLY_RECEIVED, RECEIVED'
  end
  # resource path
  local_var_path = '/vendor/orders/v1/purchaseOrdersStatus'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
  query_params[:'sortOrder'] = opts[:'sort_order'] if !opts[:'sort_order'].nil?
  query_params[:'nextToken'] = opts[:'next_token'] if !opts[:'next_token'].nil?
  query_params[:'createdAfter'] = opts[:'created_after'] if !opts[:'created_after'].nil?
  query_params[:'createdBefore'] = opts[:'created_before'] if !opts[:'created_before'].nil?
  query_params[:'updatedAfter'] = opts[:'updated_after'] if !opts[:'updated_after'].nil?
  query_params[:'updatedBefore'] = opts[:'updated_before'] if !opts[:'updated_before'].nil?
  query_params[:'purchaseOrderNumber'] = opts[:'purchase_order_number'] if !opts[:'purchase_order_number'].nil?
  query_params[:'purchaseOrderStatus'] = opts[:'purchase_order_status'] if !opts[:'purchase_order_status'].nil?
  query_params[:'itemConfirmationStatus'] = opts[:'item_confirmation_status'] if !opts[:'item_confirmation_status'].nil?
  query_params[:'itemReceiveStatus'] = opts[:'item_receive_status'] if !opts[:'item_receive_status'].nil?
  query_params[:'orderingVendorCode'] = opts[:'ordering_vendor_code'] if !opts[:'ordering_vendor_code'].nil?
  query_params[:'shipToPartyId'] = opts[:'ship_to_party_id'] if !opts[:'ship_to_party_id'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] 

  return_type = opts[:return_type] || 'GetPurchaseOrdersStatusResponse' 

  auth_names = opts[:auth_names] || []
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type)

  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: VendorOrdersApi#get_purchase_orders_status\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_purchase_orders_with_http_info(opts = {}) ⇒ Array<(GetPurchaseOrdersResponse, Integer, Hash)>

Returns a list of purchase orders created or changed during the time frame that you specify. You define the time frame using the createdAfter, createdBefore, changedAfter and changedBefore parameters. The date range to search must not be more than 7 days. You can choose to get only the purchase order numbers by setting includeDetails to false. You can then use the getPurchaseOrder operation to receive details for a specific purchase order. **Usage Plans:** | Plan type | Rate (requests per second) | Burst | | —- | —- | —- | |Default| 10 | 10 | |Selling partner specific| Variable | Variable | The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation. Rate limits for some selling partners will vary from the default rate and burst shown in the table above. For more information, see &quot;Usage Plans and Rate Limits&quot; in the Selling Partner API documentation.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :limit (Integer)

    The limit to the number of records returned. Default value is 100 records.

  • :created_after (DateTime)

    Purchase orders that became available after this time will be included in the result. Must be in ISO-8601 date/time format.

  • :created_before (DateTime)

    Purchase orders that became available before this time will be included in the result. Must be in ISO-8601 date/time format.

  • :sort_order (String)

    Sort in ascending or descending order by purchase order creation date.

  • :next_token (String)

    Used for pagination when there is more purchase orders than the specified result size limit. The token value is returned in the previous API call

  • :include_details (String)

    When true, returns purchase orders with complete details. Otherwise, only purchase order numbers are returned. Default value is true.

  • :changed_after (DateTime)

    Purchase orders that changed after this timestamp will be included in the result. Must be in ISO-8601 date/time format.

  • :changed_before (DateTime)

    Purchase orders that changed before this timestamp will be included in the result. Must be in ISO-8601 date/time format.

  • :po_item_state (String)

    Current state of the purchase order item. If this value is Cancelled, this API will return purchase orders which have one or more items cancelled by Amazon with updated item quantity as zero.

  • :is_po_changed (String)

    When true, returns purchase orders which were modified after the order was placed. Vendors are required to pull the changed purchase order and fulfill the updated purchase order and not the original one. Default value is false.

  • :purchase_order_state (String)

    Filters purchase orders based on the purchase order state.

  • :ordering_vendor_code (String)

    Filters purchase orders based on the specified ordering vendor code. This value should be same as &#x27;sellingParty.partyId&#x27; in the purchase order. If not included in the filter, all purchase orders for all of the vendor codes that exist in the vendor group used to authorize the API client application are returned.

Returns:

  • (Array<(GetPurchaseOrdersResponse, Integer, Hash)>)

    GetPurchaseOrdersResponse data, response status code and response headers



108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
# File 'lib/vendor-orders-api-model/api/vendor_orders_api.rb', line 108

def get_purchase_orders_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: VendorOrdersApi.get_purchase_orders ...'
  end
  if @api_client.config.client_side_validation && opts[:'sort_order'] && !['ASC', 'DESC'].include?(opts[:'sort_order'])
    fail ArgumentError, 'invalid value for "sort_order", must be one of ASC, DESC'
  end
  if @api_client.config.client_side_validation && opts[:'po_item_state'] && !['Cancelled'].include?(opts[:'po_item_state'])
    fail ArgumentError, 'invalid value for "po_item_state", must be one of Cancelled'
  end
  if @api_client.config.client_side_validation && opts[:'purchase_order_state'] && !['New', 'Acknowledged', 'Closed'].include?(opts[:'purchase_order_state'])
    fail ArgumentError, 'invalid value for "purchase_order_state", must be one of New, Acknowledged, Closed'
  end
  # resource path
  local_var_path = '/vendor/orders/v1/purchaseOrders'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
  query_params[:'createdAfter'] = opts[:'created_after'] if !opts[:'created_after'].nil?
  query_params[:'createdBefore'] = opts[:'created_before'] if !opts[:'created_before'].nil?
  query_params[:'sortOrder'] = opts[:'sort_order'] if !opts[:'sort_order'].nil?
  query_params[:'nextToken'] = opts[:'next_token'] if !opts[:'next_token'].nil?
  query_params[:'includeDetails'] = opts[:'include_details'] if !opts[:'include_details'].nil?
  query_params[:'changedAfter'] = opts[:'changed_after'] if !opts[:'changed_after'].nil?
  query_params[:'changedBefore'] = opts[:'changed_before'] if !opts[:'changed_before'].nil?
  query_params[:'poItemState'] = opts[:'po_item_state'] if !opts[:'po_item_state'].nil?
  query_params[:'isPOChanged'] = opts[:'is_po_changed'] if !opts[:'is_po_changed'].nil?
  query_params[:'purchaseOrderState'] = opts[:'purchase_order_state'] if !opts[:'purchase_order_state'].nil?
  query_params[:'orderingVendorCode'] = opts[:'ordering_vendor_code'] if !opts[:'ordering_vendor_code'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'payload'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] 

  return_type = opts[:return_type] || 'GetPurchaseOrdersResponse' 

  auth_names = opts[:auth_names] || []
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type)

  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: VendorOrdersApi#get_purchase_orders\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#submit_acknowledgement(body, opts = {}) ⇒ SubmitAcknowledgementResponse

Submits acknowledgements for one or more purchase orders. **Usage Plans:** | Plan type | Rate (requests per second) | Burst | | —- | —- | —- | |Default| 10 | 10 | |Selling partner specific| Variable | Variable | The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation. Rate limits for some selling partners will vary from the default rate and burst shown in the table above. For more information, see "Usage Plans and Rate Limits" in the Selling Partner API documentation.

Parameters:

  • body
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



269
270
271
272
# File 'lib/vendor-orders-api-model/api/vendor_orders_api.rb', line 269

def submit_acknowledgement(body, opts = {})
  data, _status_code, _headers = submit_acknowledgement_with_http_info(body, opts)
  data
end

#submit_acknowledgement_with_http_info(body, opts = {}) ⇒ Array<(SubmitAcknowledgementResponse, Integer, Hash)>

Submits acknowledgements for one or more purchase orders. **Usage Plans:** | Plan type | Rate (requests per second) | Burst | | —- | —- | —- | |Default| 10 | 10 | |Selling partner specific| Variable | Variable | The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation. Rate limits for some selling partners will vary from the default rate and burst shown in the table above. For more information, see &quot;Usage Plans and Rate Limits&quot; in the Selling Partner API documentation.

Parameters:

  • body
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
# File 'lib/vendor-orders-api-model/api/vendor_orders_api.rb', line 278

def submit_acknowledgement_with_http_info(body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: VendorOrdersApi.submit_acknowledgement ...'
  end
  # verify the required parameter 'body' is set
  if @api_client.config.client_side_validation && body.nil?
    fail ArgumentError, "Missing the required parameter 'body' when calling VendorOrdersApi.submit_acknowledgement"
  end
  # resource path
  local_var_path = '/vendor/orders/v1/acknowledgements'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:body] || @api_client.object_to_http_body(body) 

  return_type = opts[:return_type] || 'SubmitAcknowledgementResponse' 

  auth_names = opts[:auth_names] || []
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type)

  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: VendorOrdersApi#submit_acknowledgement\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end