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
-
#consolidate_auto_orders(auto_order_oid, auto_order_consolidate, opts = {}) ⇒ AutoOrderResponse
Consolidates multiple auto orders Consolidates mutliple auto orders on the UltraCart account.
-
#consolidate_auto_orders_with_http_info(auto_order_oid, auto_order_consolidate, opts = {}) ⇒ Array<(AutoOrderResponse, Integer, Hash)>
Consolidates multiple auto orders Consolidates mutliple auto orders on the UltraCart account.
-
#establish_auto_order_by_reference_order_id(reference_order_id, opts = {}) ⇒ AutoOrderResponse
Establish an auto order by referencing a regular order id Establish an auto order by referencing a regular order id.
-
#establish_auto_order_by_reference_order_id_with_http_info(reference_order_id, opts = {}) ⇒ Array<(AutoOrderResponse, Integer, Hash)>
Establish an auto order by referencing a regular order id Establish an auto order by referencing a regular order id.
-
#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, Integer, 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, Integer, 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, Integer, 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, Integer, 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, Integer, 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, Integer, Hash)>
Retrieve auto orders Retrieves auto orders from the account.
-
#initialize(api_client = ApiClient.default) ⇒ AutoOrderApi
constructor
A new instance of AutoOrderApi.
-
#pause_auto_order(auto_order_oid, auto_order, opts = {}) ⇒ AutoOrderResponse
Pause auto order Completely pause an auto order.
-
#pause_auto_order_with_http_info(auto_order_oid, auto_order, opts = {}) ⇒ Array<(AutoOrderResponse, Integer, Hash)>
Pause auto order Completely pause an auto order.
-
#update_auto_order(auto_order_oid, auto_order, opts = {}) ⇒ AutoOrderResponse
Update an auto order Update an auto order on the UltraCart account.
-
#update_auto_order_with_http_info(auto_order_oid, auto_order, opts = {}) ⇒ Array<(AutoOrderResponse, Integer, 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, Integer, 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
#consolidate_auto_orders(auto_order_oid, auto_order_consolidate, opts = {}) ⇒ AutoOrderResponse
Consolidates multiple auto orders Consolidates mutliple auto orders on the UltraCart account.
42 43 44 45 |
# File 'lib/ultracart_api/api/auto_order_api.rb', line 42 def consolidate_auto_orders(auto_order_oid, auto_order_consolidate, opts = {}) data, _status_code, _headers = consolidate_auto_orders_with_http_info(auto_order_oid, auto_order_consolidate, opts) data end |
#consolidate_auto_orders_with_http_info(auto_order_oid, auto_order_consolidate, opts = {}) ⇒ Array<(AutoOrderResponse, Integer, Hash)>
Consolidates multiple auto orders Consolidates mutliple auto orders on the UltraCart account.
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 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 |
# File 'lib/ultracart_api/api/auto_order_api.rb', line 54 def consolidate_auto_orders_with_http_info(auto_order_oid, auto_order_consolidate, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AutoOrderApi.consolidate_auto_orders ...' 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.consolidate_auto_orders" end # verify the required parameter 'auto_order_consolidate' is set if @api_client.config.client_side_validation && auto_order_consolidate.nil? fail ArgumentError, "Missing the required parameter 'auto_order_consolidate' when calling AutoOrderApi.consolidate_auto_orders" end # resource path local_var_path = '/auto_order/auto_orders/{auto_order_oid}/consolidate'.sub('{' + 'auto_order_oid' + '}', CGI.escape(auto_order_oid.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'_expand'] = opts[:'_expand'] if !opts[:'_expand'].nil? # header parameters header_params = opts[: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' content_type = @api_client.select_header_content_type(['application/json; charset=UTF-8']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(auto_order_consolidate) # return_type return_type = opts[:debug_return_type] || 'AutoOrderResponse' # auth_names auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey'] = opts.merge( :operation => :"AutoOrderApi.consolidate_auto_orders", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:PUT, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: AutoOrderApi#consolidate_auto_orders\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#establish_auto_order_by_reference_order_id(reference_order_id, opts = {}) ⇒ AutoOrderResponse
Establish an auto order by referencing a regular order id Establish an auto order by referencing a regular order id. The result will be an auto order without any items. You should add the items and perform an update call. Orders must be less than 60 days old and use a credit card payment.
119 120 121 122 |
# File 'lib/ultracart_api/api/auto_order_api.rb', line 119 def establish_auto_order_by_reference_order_id(reference_order_id, opts = {}) data, _status_code, _headers = establish_auto_order_by_reference_order_id_with_http_info(reference_order_id, opts) data end |
#establish_auto_order_by_reference_order_id_with_http_info(reference_order_id, opts = {}) ⇒ Array<(AutoOrderResponse, Integer, Hash)>
Establish an auto order by referencing a regular order id Establish an auto order by referencing a regular order id. The result will be an auto order without any items. You should add the items and perform an update call. Orders must be less than 60 days old and use a credit card payment.
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 166 167 168 169 170 171 172 173 174 175 176 177 178 |
# File 'lib/ultracart_api/api/auto_order_api.rb', line 130 def establish_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.establish_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.establish_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' + '}', CGI.escape(reference_order_id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'_expand'] = opts[:'_expand'] if !opts[:'_expand'].nil? # header parameters header_params = opts[: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']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'AutoOrderResponse' # auth_names auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey'] = opts.merge( :operation => :"AutoOrderApi.establish_auto_order_by_reference_order_id", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: AutoOrderApi#establish_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(auto_order_oid, opts = {}) ⇒ AutoOrderResponse
Retrieve an auto order by oid Retrieves a single auto order using the specified auto order oid.
186 187 188 189 |
# File 'lib/ultracart_api/api/auto_order_api.rb', line 186 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.
253 254 255 256 |
# File 'lib/ultracart_api/api/auto_order_api.rb', line 253 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, Integer, Hash)>
Retrieve an auto order by code Retrieves a single auto order using the specified reference (original) order id.
264 265 266 267 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 |
# File 'lib/ultracart_api/api/auto_order_api.rb', line 264 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' + '}', CGI.escape(auto_order_code.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'_expand'] = opts[:'_expand'] if !opts[:'_expand'].nil? # header parameters header_params = opts[: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']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'AutoOrderResponse' # auth_names auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey'] = opts.merge( :operation => :"AutoOrderApi.get_auto_order_by_code", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) 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.
320 321 322 323 |
# File 'lib/ultracart_api/api/auto_order_api.rb', line 320 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, Integer, Hash)>
Retrieve an auto order by order id Retrieves a single auto order using the specified reference (original) order id.
331 332 333 334 335 336 337 338 339 340 341 342 343 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 |
# File 'lib/ultracart_api/api/auto_order_api.rb', line 331 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' + '}', CGI.escape(reference_order_id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'_expand'] = opts[:'_expand'] if !opts[:'_expand'].nil? # header parameters header_params = opts[: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']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'AutoOrderResponse' # auth_names auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey'] = opts.merge( :operation => :"AutoOrderApi.get_auto_order_by_reference_order_id", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) 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, Integer, Hash)>
Retrieve an auto order by oid Retrieves a single auto order using the specified auto order oid.
197 198 199 200 201 202 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 |
# File 'lib/ultracart_api/api/auto_order_api.rb', line 197 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' + '}', CGI.escape(auto_order_oid.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'_expand'] = opts[:'_expand'] if !opts[:'_expand'].nil? # header parameters header_params = opts[: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']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'AutoOrderResponse' # auth_names auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey'] = opts.merge( :operation => :"AutoOrderApi.get_auto_order", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) 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.
408 409 410 411 |
# File 'lib/ultracart_api/api/auto_order_api.rb', line 408 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.
514 515 516 517 |
# File 'lib/ultracart_api/api/auto_order_api.rb', line 514 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, Integer, 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.
525 526 527 528 529 530 531 532 533 534 535 536 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 |
# File 'lib/ultracart_api/api/auto_order_api.rb', line 525 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 = opts[:query_params] || {} query_params[:'_expand'] = opts[:'_expand'] if !opts[:'_expand'].nil? # header parameters header_params = opts[: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' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(auto_order_batch) # return_type return_type = opts[:debug_return_type] || 'AutoOrdersResponse' # auth_names auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey'] = opts.merge( :operation => :"AutoOrderApi.get_auto_orders_batch", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) 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.
589 590 591 592 |
# File 'lib/ultracart_api/api/auto_order_api.rb', line 589 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, Integer, 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.
603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 |
# File 'lib/ultracart_api/api/auto_order_api.rb', line 603 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 = opts[: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 = opts[: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' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(auto_order_query) # return_type return_type = opts[:debug_return_type] || 'AutoOrdersResponse' # auth_names auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey'] = opts.merge( :operation => :"AutoOrderApi.get_auto_orders_by_query", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) 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, Integer, 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.
440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 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 |
# File 'lib/ultracart_api/api/auto_order_api.rb', line 440 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 = opts[: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 = opts[: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']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'AutoOrdersResponse' # auth_names auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey'] = opts.merge( :operation => :"AutoOrderApi.get_auto_orders", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) 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 |
#pause_auto_order(auto_order_oid, auto_order, opts = {}) ⇒ AutoOrderResponse
Pause auto order Completely pause an auto order
668 669 670 671 |
# File 'lib/ultracart_api/api/auto_order_api.rb', line 668 def pause_auto_order(auto_order_oid, auto_order, opts = {}) data, _status_code, _headers = pause_auto_order_with_http_info(auto_order_oid, auto_order, opts) data end |
#pause_auto_order_with_http_info(auto_order_oid, auto_order, opts = {}) ⇒ Array<(AutoOrderResponse, Integer, Hash)>
Pause auto order Completely pause an auto order
680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 |
# File 'lib/ultracart_api/api/auto_order_api.rb', line 680 def pause_auto_order_with_http_info(auto_order_oid, auto_order, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AutoOrderApi.pause_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.pause_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.pause_auto_order" end # resource path local_var_path = '/auto_order/auto_orders/{auto_order_oid}/pause'.sub('{' + 'auto_order_oid' + '}', CGI.escape(auto_order_oid.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'_expand'] = opts[:'_expand'] if !opts[:'_expand'].nil? # header parameters header_params = opts[: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' content_type = @api_client.select_header_content_type(['application/json; charset=UTF-8']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(auto_order) # return_type return_type = opts[:debug_return_type] || 'AutoOrderResponse' # auth_names auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey'] = opts.merge( :operation => :"AutoOrderApi.pause_auto_order", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:PUT, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: AutoOrderApi#pause_auto_order\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#update_auto_order(auto_order_oid, auto_order, opts = {}) ⇒ AutoOrderResponse
Update an auto order Update an auto order on the UltraCart account.
747 748 749 750 |
# File 'lib/ultracart_api/api/auto_order_api.rb', line 747 def update_auto_order(auto_order_oid, auto_order, opts = {}) data, _status_code, _headers = update_auto_order_with_http_info(auto_order_oid, auto_order, opts) data end |
#update_auto_order_with_http_info(auto_order_oid, auto_order, opts = {}) ⇒ Array<(AutoOrderResponse, Integer, Hash)>
Update an auto order Update an auto order on the UltraCart account.
760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 |
# File 'lib/ultracart_api/api/auto_order_api.rb', line 760 def update_auto_order_with_http_info(auto_order_oid, auto_order, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: 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 # 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 # resource path local_var_path = '/auto_order/auto_orders/{auto_order_oid}'.sub('{' + 'auto_order_oid' + '}', CGI.escape(auto_order_oid.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'validate_original_order'] = opts[:'validate_original_order'] if !opts[:'validate_original_order'].nil? query_params[:'_expand'] = opts[:'_expand'] if !opts[:'_expand'].nil? # header parameters header_params = opts[: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' content_type = @api_client.select_header_content_type(['application/json; charset=UTF-8']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(auto_order) # return_type return_type = opts[:debug_return_type] || 'AutoOrderResponse' # auth_names auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey'] = opts.merge( :operation => :"AutoOrderApi.update_auto_order", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:PUT, local_var_path, ) 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.
828 829 830 831 |
# File 'lib/ultracart_api/api/auto_order_api.rb', line 828 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, Integer, Hash)>
Update multiple auto orders Update multiple auto orders on the UltraCart account.
841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 |
# File 'lib/ultracart_api/api/auto_order_api.rb', line 841 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 = opts[: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 = opts[: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' content_type = @api_client.select_header_content_type(['application/json; charset=UTF-8']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(auto_orders_request) # return_type return_type = opts[:debug_return_type] || 'AutoOrdersResponse' # auth_names auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey'] = opts.merge( :operation => :"AutoOrderApi.update_auto_orders_batch", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:PUT, local_var_path, ) 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 |