Class: UltracartClient::AutoOrderApi
- Inherits:
-
Object
- Object
- UltracartClient::AutoOrderApi
- Defined in:
- lib/ultracart_api/api/auto_order_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Class Method Summary collapse
Instance Method Summary collapse
-
#get_auto_order(auto_order_oid, opts = {}) ⇒ AutoOrderResponse
Retrieve an auto order by oid Retrieves a single auto order using the specified auto order oid.
-
#get_auto_order_by_code(auto_order_code, opts = {}) ⇒ AutoOrderResponse
Retrieve an auto order by code Retrieves a single auto order using the specified reference (original) order id.
-
#get_auto_order_by_code_with_http_info(auto_order_code, opts = {}) ⇒ Array<(AutoOrderResponse, Fixnum, Hash)>
Retrieve an auto order by code Retrieves a single auto order using the specified reference (original) order id.
-
#get_auto_order_by_reference_order_id(reference_order_id, opts = {}) ⇒ AutoOrderResponse
Retrieve an auto order by order id Retrieves a single auto order using the specified reference (original) order id.
-
#get_auto_order_by_reference_order_id_with_http_info(reference_order_id, opts = {}) ⇒ Array<(AutoOrderResponse, Fixnum, Hash)>
Retrieve an auto order by order id Retrieves a single auto order using the specified reference (original) order id.
-
#get_auto_order_with_http_info(auto_order_oid, opts = {}) ⇒ Array<(AutoOrderResponse, Fixnum, Hash)>
Retrieve an auto order by oid Retrieves a single auto order using the specified auto order oid.
-
#get_auto_orders(opts = {}) ⇒ AutoOrdersResponse
Retrieve auto orders Retrieves auto orders from the account.
-
#get_auto_orders_batch(auto_order_batch, opts = {}) ⇒ AutoOrdersResponse
Retrieve auto order batch Retrieves a group of auto orders from the account based on an array of auto order oids.
-
#get_auto_orders_batch_with_http_info(auto_order_batch, opts = {}) ⇒ Array<(AutoOrdersResponse, Fixnum, Hash)>
Retrieve auto order batch Retrieves a group of auto orders from the account based on an array of auto order oids.
-
#get_auto_orders_by_query(auto_order_query, opts = {}) ⇒ AutoOrdersResponse
Retrieve auto orders by query Retrieves a group of auto orders from the account based on a query object.
-
#get_auto_orders_by_query_with_http_info(auto_order_query, opts = {}) ⇒ Array<(AutoOrdersResponse, Fixnum, Hash)>
Retrieve auto orders by query Retrieves a group of auto orders from the account based on a query object.
-
#get_auto_orders_with_http_info(opts = {}) ⇒ Array<(AutoOrdersResponse, Fixnum, Hash)>
Retrieve auto orders Retrieves auto orders from the account.
-
#initialize(api_client = ApiClient.default) ⇒ AutoOrderApi
constructor
A new instance of AutoOrderApi.
-
#update_auto_order(auto_order, auto_order_oid, opts = {}) ⇒ AutoOrderResponse
Update an auto order Update an auto order on the UltraCart account.
-
#update_auto_order_with_http_info(auto_order, auto_order_oid, opts = {}) ⇒ Array<(AutoOrderResponse, Fixnum, Hash)>
Update an auto order Update an auto order on the UltraCart account.
-
#update_auto_orders_batch(auto_orders_request, opts = {}) ⇒ AutoOrdersResponse
Update multiple auto orders Update multiple auto orders on the UltraCart account.
-
#update_auto_orders_batch_with_http_info(auto_orders_request, opts = {}) ⇒ Array<(AutoOrdersResponse, Fixnum, Hash)>
Update multiple auto orders Update multiple auto orders on the UltraCart account.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ AutoOrderApi
Returns a new instance of AutoOrderApi.
19 20 21 |
# File 'lib/ultracart_api/api/auto_order_api.rb', line 19 def initialize(api_client = ApiClient.default) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
17 18 19 |
# File 'lib/ultracart_api/api/auto_order_api.rb', line 17 def api_client @api_client end |
Class Method Details
.new_using_api_key(simple_key, verify_ssl = true, debugging = false) ⇒ Object
23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/ultracart_api/api/auto_order_api.rb', line 23 def self.new_using_api_key(simple_key, verify_ssl = true, debugging = false) api_config = Configuration.new api_config.api_key_prefix['x-ultracart-simple-key'] = simple_key api_config.api_version = '2017-03-01' api_config.verify_ssl = verify_ssl api_client = ApiClient.new(api_config) api_client.config.debugging = debugging UltracartClient::AutoOrderApi.new(api_client) end |
Instance Method Details
#get_auto_order(auto_order_oid, opts = {}) ⇒ AutoOrderResponse
Retrieve an auto order by oid Retrieves a single auto order using the specified auto order oid.
41 42 43 44 |
# File 'lib/ultracart_api/api/auto_order_api.rb', line 41 def get_auto_order(auto_order_oid, opts = {}) data, _status_code, _headers = get_auto_order_with_http_info(auto_order_oid, opts) data end |
#get_auto_order_by_code(auto_order_code, opts = {}) ⇒ AutoOrderResponse
Retrieve an auto order by code Retrieves a single auto order using the specified reference (original) order id.
99 100 101 102 |
# File 'lib/ultracart_api/api/auto_order_api.rb', line 99 def get_auto_order_by_code(auto_order_code, opts = {}) data, _status_code, _headers = get_auto_order_by_code_with_http_info(auto_order_code, opts) data end |
#get_auto_order_by_code_with_http_info(auto_order_code, opts = {}) ⇒ Array<(AutoOrderResponse, Fixnum, Hash)>
Retrieve an auto order by code Retrieves a single auto order using the specified reference (original) order id.
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 |
# File 'lib/ultracart_api/api/auto_order_api.rb', line 110 def get_auto_order_by_code_with_http_info(auto_order_code, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AutoOrderApi.get_auto_order_by_code ...' end # verify the required parameter 'auto_order_code' is set if @api_client.config.client_side_validation && auto_order_code.nil? fail ArgumentError, "Missing the required parameter 'auto_order_code' when calling AutoOrderApi.get_auto_order_by_code" end # resource path local_var_path = '/auto_order/auto_orders/code/{auto_order_code}'.sub('{' + 'auto_order_code' + '}', auto_order_code.to_s) # query parameters query_params = {} query_params[:'_expand'] = opts[:'_expand'] if !opts[:'_expand'].nil? # header parameters header_params = {} header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version() # 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 = {} # http body (model) post_body = nil auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey'] 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 => 'AutoOrderResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: AutoOrderApi#get_auto_order_by_code\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_auto_order_by_reference_order_id(reference_order_id, opts = {}) ⇒ AutoOrderResponse
Retrieve an auto order by order id Retrieves a single auto order using the specified reference (original) order id.
157 158 159 160 |
# File 'lib/ultracart_api/api/auto_order_api.rb', line 157 def get_auto_order_by_reference_order_id(reference_order_id, opts = {}) data, _status_code, _headers = get_auto_order_by_reference_order_id_with_http_info(reference_order_id, opts) data end |
#get_auto_order_by_reference_order_id_with_http_info(reference_order_id, opts = {}) ⇒ Array<(AutoOrderResponse, Fixnum, Hash)>
Retrieve an auto order by order id Retrieves a single auto order using the specified reference (original) order id.
168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 |
# File 'lib/ultracart_api/api/auto_order_api.rb', line 168 def get_auto_order_by_reference_order_id_with_http_info(reference_order_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AutoOrderApi.get_auto_order_by_reference_order_id ...' end # verify the required parameter 'reference_order_id' is set if @api_client.config.client_side_validation && reference_order_id.nil? fail ArgumentError, "Missing the required parameter 'reference_order_id' when calling AutoOrderApi.get_auto_order_by_reference_order_id" end # resource path local_var_path = '/auto_order/auto_orders/reference_order_id/{reference_order_id}'.sub('{' + 'reference_order_id' + '}', reference_order_id.to_s) # query parameters query_params = {} query_params[:'_expand'] = opts[:'_expand'] if !opts[:'_expand'].nil? # header parameters header_params = {} header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version() # 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 = {} # http body (model) post_body = nil auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey'] 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 => 'AutoOrderResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: AutoOrderApi#get_auto_order_by_reference_order_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_auto_order_with_http_info(auto_order_oid, opts = {}) ⇒ Array<(AutoOrderResponse, Fixnum, Hash)>
Retrieve an auto order by oid Retrieves a single auto order using the specified auto order oid.
52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 |
# File 'lib/ultracart_api/api/auto_order_api.rb', line 52 def get_auto_order_with_http_info(auto_order_oid, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AutoOrderApi.get_auto_order ...' end # verify the required parameter 'auto_order_oid' is set if @api_client.config.client_side_validation && auto_order_oid.nil? fail ArgumentError, "Missing the required parameter 'auto_order_oid' when calling AutoOrderApi.get_auto_order" end # resource path local_var_path = '/auto_order/auto_orders/{auto_order_oid}'.sub('{' + 'auto_order_oid' + '}', auto_order_oid.to_s) # query parameters query_params = {} query_params[:'_expand'] = opts[:'_expand'] if !opts[:'_expand'].nil? # header parameters header_params = {} header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version() # 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 = {} # http body (model) post_body = nil auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey'] 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 => 'AutoOrderResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: AutoOrderApi#get_auto_order\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_auto_orders(opts = {}) ⇒ AutoOrdersResponse
Retrieve auto orders Retrieves auto orders from the account. If no parameters are specified, all auto orders will be returned. You will need to make multiple API calls in order to retrieve the entire result set since this API performs result set pagination.
236 237 238 239 |
# File 'lib/ultracart_api/api/auto_order_api.rb', line 236 def get_auto_orders(opts = {}) data, _status_code, _headers = get_auto_orders_with_http_info(opts) data end |
#get_auto_orders_batch(auto_order_batch, opts = {}) ⇒ AutoOrdersResponse
Retrieve auto order batch Retrieves a group of auto orders from the account based on an array of auto order oids. If more than 200 auto order ids are specified, the API call will fail with a bad request error.
333 334 335 336 |
# File 'lib/ultracart_api/api/auto_order_api.rb', line 333 def get_auto_orders_batch(auto_order_batch, opts = {}) data, _status_code, _headers = get_auto_orders_batch_with_http_info(auto_order_batch, opts) data end |
#get_auto_orders_batch_with_http_info(auto_order_batch, opts = {}) ⇒ Array<(AutoOrdersResponse, Fixnum, Hash)>
Retrieve auto order batch Retrieves a group of auto orders from the account based on an array of auto order oids. If more than 200 auto order ids are specified, the API call will fail with a bad request error.
344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 |
# File 'lib/ultracart_api/api/auto_order_api.rb', line 344 def get_auto_orders_batch_with_http_info(auto_order_batch, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AutoOrderApi.get_auto_orders_batch ...' end # verify the required parameter 'auto_order_batch' is set if @api_client.config.client_side_validation && auto_order_batch.nil? fail ArgumentError, "Missing the required parameter 'auto_order_batch' when calling AutoOrderApi.get_auto_orders_batch" end # resource path local_var_path = '/auto_order/auto_orders/batch' # query parameters query_params = {} query_params[:'_expand'] = opts[:'_expand'] if !opts[:'_expand'].nil? # header parameters header_params = {} header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version() # 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 = {} # http body (model) post_body = @api_client.object_to_http_body(auto_order_batch) auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey'] 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 => 'AutoOrdersResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: AutoOrderApi#get_auto_orders_batch\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_auto_orders_by_query(auto_order_query, opts = {}) ⇒ AutoOrdersResponse
Retrieve auto orders by query Retrieves a group of auto orders from the account based on a query object. You will need to make multiple API calls in order to retrieve the entire result set since this API performs result set pagination.
394 395 396 397 |
# File 'lib/ultracart_api/api/auto_order_api.rb', line 394 def get_auto_orders_by_query(auto_order_query, opts = {}) data, _status_code, _headers = get_auto_orders_by_query_with_http_info(auto_order_query, opts) data end |
#get_auto_orders_by_query_with_http_info(auto_order_query, opts = {}) ⇒ Array<(AutoOrdersResponse, Fixnum, Hash)>
Retrieve auto orders by query Retrieves a group of auto orders from the account based on a query object. You will need to make multiple API calls in order to retrieve the entire result set since this API performs result set pagination.
408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 |
# File 'lib/ultracart_api/api/auto_order_api.rb', line 408 def get_auto_orders_by_query_with_http_info(auto_order_query, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AutoOrderApi.get_auto_orders_by_query ...' end # verify the required parameter 'auto_order_query' is set if @api_client.config.client_side_validation && auto_order_query.nil? fail ArgumentError, "Missing the required parameter 'auto_order_query' when calling AutoOrderApi.get_auto_orders_by_query" end # resource path local_var_path = '/auto_order/auto_orders/query' # query parameters query_params = {} query_params[:'_limit'] = opts[:'_limit'] if !opts[:'_limit'].nil? query_params[:'_offset'] = opts[:'_offset'] if !opts[:'_offset'].nil? query_params[:'_sort'] = opts[:'_sort'] if !opts[:'_sort'].nil? query_params[:'_expand'] = opts[:'_expand'] if !opts[:'_expand'].nil? # header parameters header_params = {} header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version() # 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 = {} # http body (model) post_body = @api_client.object_to_http_body(auto_order_query) auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey'] 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 => 'AutoOrdersResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: AutoOrderApi#get_auto_orders_by_query\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_auto_orders_with_http_info(opts = {}) ⇒ Array<(AutoOrdersResponse, Fixnum, Hash)>
Retrieve auto orders Retrieves auto orders from the account. If no parameters are specified, all auto orders will be returned. You will need to make multiple API calls in order to retrieve the entire result set since this API performs result set pagination.
268 269 270 271 272 273 274 275 276 277 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 321 322 323 324 325 326 |
# File 'lib/ultracart_api/api/auto_order_api.rb', line 268 def get_auto_orders_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AutoOrderApi.get_auto_orders ...' end # resource path local_var_path = '/auto_order/auto_orders' # query parameters query_params = {} query_params[:'auto_order_code'] = opts[:'auto_order_code'] if !opts[:'auto_order_code'].nil? query_params[:'original_order_id'] = opts[:'original_order_id'] if !opts[:'original_order_id'].nil? query_params[:'first_name'] = opts[:'first_name'] if !opts[:'first_name'].nil? query_params[:'last_name'] = opts[:'last_name'] if !opts[:'last_name'].nil? query_params[:'company'] = opts[:'company'] if !opts[:'company'].nil? query_params[:'city'] = opts[:'city'] if !opts[:'city'].nil? query_params[:'state'] = opts[:'state'] if !opts[:'state'].nil? query_params[:'postal_code'] = opts[:'postal_code'] if !opts[:'postal_code'].nil? query_params[:'country_code'] = opts[:'country_code'] if !opts[:'country_code'].nil? query_params[:'phone'] = opts[:'phone'] if !opts[:'phone'].nil? query_params[:'email'] = opts[:'email'] if !opts[:'email'].nil? query_params[:'original_order_date_begin'] = opts[:'original_order_date_begin'] if !opts[:'original_order_date_begin'].nil? query_params[:'original_order_date_end'] = opts[:'original_order_date_end'] if !opts[:'original_order_date_end'].nil? query_params[:'next_shipment_date_begin'] = opts[:'next_shipment_date_begin'] if !opts[:'next_shipment_date_begin'].nil? query_params[:'next_shipment_date_end'] = opts[:'next_shipment_date_end'] if !opts[:'next_shipment_date_end'].nil? query_params[:'card_type'] = opts[:'card_type'] if !opts[:'card_type'].nil? query_params[:'item_id'] = opts[:'item_id'] if !opts[:'item_id'].nil? query_params[:'status'] = opts[:'status'] if !opts[:'status'].nil? query_params[:'_limit'] = opts[:'_limit'] if !opts[:'_limit'].nil? query_params[:'_offset'] = opts[:'_offset'] if !opts[:'_offset'].nil? query_params[:'_since'] = opts[:'_since'] if !opts[:'_since'].nil? query_params[:'_sort'] = opts[:'_sort'] if !opts[:'_sort'].nil? query_params[:'_expand'] = opts[:'_expand'] if !opts[:'_expand'].nil? # header parameters header_params = {} header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version() # 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 = {} # http body (model) post_body = nil auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey'] 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 => 'AutoOrdersResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: AutoOrderApi#get_auto_orders\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#update_auto_order(auto_order, auto_order_oid, opts = {}) ⇒ AutoOrderResponse
Update an auto order Update an auto order on the UltraCart account.
459 460 461 462 |
# File 'lib/ultracart_api/api/auto_order_api.rb', line 459 def update_auto_order(auto_order, auto_order_oid, opts = {}) data, _status_code, _headers = update_auto_order_with_http_info(auto_order, auto_order_oid, opts) data end |
#update_auto_order_with_http_info(auto_order, auto_order_oid, opts = {}) ⇒ Array<(AutoOrderResponse, Fixnum, Hash)>
Update an auto order Update an auto order on the UltraCart account.
471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 |
# File 'lib/ultracart_api/api/auto_order_api.rb', line 471 def update_auto_order_with_http_info(auto_order, auto_order_oid, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AutoOrderApi.update_auto_order ...' end # verify the required parameter 'auto_order' is set if @api_client.config.client_side_validation && auto_order.nil? fail ArgumentError, "Missing the required parameter 'auto_order' when calling AutoOrderApi.update_auto_order" end # verify the required parameter 'auto_order_oid' is set if @api_client.config.client_side_validation && auto_order_oid.nil? fail ArgumentError, "Missing the required parameter 'auto_order_oid' when calling AutoOrderApi.update_auto_order" end # resource path local_var_path = '/auto_order/auto_orders/{auto_order_oid}'.sub('{' + 'auto_order_oid' + '}', auto_order_oid.to_s) # query parameters query_params = {} query_params[:'_expand'] = opts[:'_expand'] if !opts[:'_expand'].nil? # header parameters header_params = {} header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version() # 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; charset=UTF-8']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(auto_order) auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey'] data, status_code, headers = @api_client.call_api(:PUT, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'AutoOrderResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: AutoOrderApi#update_auto_order\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#update_auto_orders_batch(auto_orders_request, opts = {}) ⇒ AutoOrdersResponse
Update multiple auto orders Update multiple auto orders on the UltraCart account.
524 525 526 527 |
# File 'lib/ultracart_api/api/auto_order_api.rb', line 524 def update_auto_orders_batch(auto_orders_request, opts = {}) data, _status_code, _headers = update_auto_orders_batch_with_http_info(auto_orders_request, opts) data end |
#update_auto_orders_batch_with_http_info(auto_orders_request, opts = {}) ⇒ Array<(AutoOrdersResponse, Fixnum, Hash)>
Update multiple auto orders Update multiple auto orders on the UltraCart account.
537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 |
# File 'lib/ultracart_api/api/auto_order_api.rb', line 537 def update_auto_orders_batch_with_http_info(auto_orders_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AutoOrderApi.update_auto_orders_batch ...' end # verify the required parameter 'auto_orders_request' is set if @api_client.config.client_side_validation && auto_orders_request.nil? fail ArgumentError, "Missing the required parameter 'auto_orders_request' when calling AutoOrderApi.update_auto_orders_batch" end # resource path local_var_path = '/auto_order/auto_orders/batch' # query parameters query_params = {} query_params[:'_expand'] = opts[:'_expand'] if !opts[:'_expand'].nil? query_params[:'_placeholders'] = opts[:'_placeholders'] if !opts[:'_placeholders'].nil? query_params[:'_async'] = opts[:'_async'] if !opts[:'_async'].nil? # header parameters header_params = {} header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version() # 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; charset=UTF-8']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(auto_orders_request) auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey'] data, status_code, headers = @api_client.call_api(:PUT, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'AutoOrdersResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: AutoOrderApi#update_auto_orders_batch\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |