Class: AmzSpApi::VendorOrdersApiModel::VendorOrdersApi
- Inherits:
-
Object
- Object
- AmzSpApi::VendorOrdersApiModel::VendorOrdersApi
- Defined in:
- lib/vendor-orders-api-model/api/vendor_orders_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#get_purchase_order(purchase_order_number, opts = {}) ⇒ GetPurchaseOrderResponse
Returns a purchase order based on the purchaseOrderNumber value that you specify.
-
#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.
-
#get_purchase_orders(opts = {}) ⇒ GetPurchaseOrdersResponse
Returns a list of purchase orders created or changed during the time frame that you specify.
-
#get_purchase_orders_status(opts = {}) ⇒ GetPurchaseOrdersStatusResponse
Returns purchase order statuses based on the filters that you specify.
-
#get_purchase_orders_status_with_http_info(opts = {}) ⇒ Array<(GetPurchaseOrdersStatusResponse, Integer, Hash)>
Returns purchase order statuses based on the filters that you specify.
-
#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.
-
#initialize(api_client = ApiClient.default) ⇒ VendorOrdersApi
constructor
A new instance of VendorOrdersApi.
-
#submit_acknowledgement(body, opts = {}) ⇒ SubmitAcknowledgementResponse
Submits acknowledgements for one or more purchase orders.
-
#submit_acknowledgement_with_http_info(body, opts = {}) ⇒ Array<(SubmitAcknowledgementResponse, Integer, Hash)>
Submits acknowledgements for one or more purchase orders.
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_client ⇒ Object
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.
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 "Usage Plans and Rate Limits" in the Selling Partner API documentation.
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.
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.
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 "Usage Plans and Rate Limits" in the Selling Partner API documentation.
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 "Usage Plans and Rate Limits" in the Selling Partner API documentation.
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.
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 "Usage Plans and Rate Limits" in the Selling Partner API documentation.
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 |