=begin #UltraCart Rest API V2 #UltraCart REST API Version 2 OpenAPI spec version: 2.0.0 Contact: support@ultracart.com Generated by: https://github.com/swagger-api/swagger-codegen.git Swagger Codegen version: 2.4.15-SNAPSHOT =end require 'cgi' module UltracartClient class AutoOrderApi attr_accessor :api_client def initialize(api_client = ApiClient.default) @api_client = api_client end 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 # Retrieve an auto order by oid # Retrieves a single auto order using the specified auto order oid. # @param auto_order_oid The auto order oid to retrieve. # @param [Hash] opts the optional parameters # @option opts [String] :_expand The object expansion to perform on the result. See documentation for examples # @return [AutoOrderResponse] def get_auto_order(auto_order_oid, opts = {}) data, _status_code, _headers = get_auto_order_with_http_info(auto_order_oid, opts) data end # Retrieve an auto order by oid # Retrieves a single auto order using the specified auto order oid. # @param auto_order_oid The auto order oid to retrieve. # @param [Hash] opts the optional parameters # @option opts [String] :_expand The object expansion to perform on the result. See documentation for examples # @return [Array<(AutoOrderResponse, Fixnum, Hash)>] AutoOrderResponse data, response status code and response headers 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 # Retrieve an auto order by code # Retrieves a single auto order using the specified reference (original) order id. # @param auto_order_code The auto order oid to retrieve. # @param [Hash] opts the optional parameters # @option opts [String] :_expand The object expansion to perform on the result. See documentation for examples # @return [AutoOrderResponse] 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 # Retrieve an auto order by code # Retrieves a single auto order using the specified reference (original) order id. # @param auto_order_code The auto order oid to retrieve. # @param [Hash] opts the optional parameters # @option opts [String] :_expand The object expansion to perform on the result. See documentation for examples # @return [Array<(AutoOrderResponse, Fixnum, Hash)>] AutoOrderResponse data, response status code and response headers 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 # Retrieve an auto order by order id # Retrieves a single auto order using the specified reference (original) order id. # @param reference_order_id The auto order oid to retrieve. # @param [Hash] opts the optional parameters # @option opts [String] :_expand The object expansion to perform on the result. See documentation for examples # @return [AutoOrderResponse] 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 # Retrieve an auto order by order id # Retrieves a single auto order using the specified reference (original) order id. # @param reference_order_id The auto order oid to retrieve. # @param [Hash] opts the optional parameters # @option opts [String] :_expand The object expansion to perform on the result. See documentation for examples # @return [Array<(AutoOrderResponse, Fixnum, Hash)>] AutoOrderResponse data, response status code and response headers 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 # 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. # @param [Hash] opts the optional parameters # @option opts [String] :auto_order_code Auto order code # @option opts [String] :original_order_id Original order id # @option opts [String] :first_name First name # @option opts [String] :last_name Last name # @option opts [String] :company Company # @option opts [String] :city City # @option opts [String] :state State # @option opts [String] :postal_code Postal code # @option opts [String] :country_code Country code (ISO-3166 two letter) # @option opts [String] :phone Phone # @option opts [String] :email Email # @option opts [String] :original_order_date_begin Original order date begin # @option opts [String] :original_order_date_end Original order date end # @option opts [String] :next_shipment_date_begin Next shipment date begin # @option opts [String] :next_shipment_date_end Next shipment date end # @option opts [String] :card_type Card type # @option opts [String] :item_id Item ID # @option opts [String] :status Status # @option opts [Integer] :_limit The maximum number of records to return on this one API call. (Max 200) (default to 100) # @option opts [Integer] :_offset Pagination of the record set. Offset is a zero based index. (default to 0) # @option opts [String] :_since Fetch auto orders that have been created/modified since this date/time. # @option opts [String] :_sort The sort order of the auto orders. See Sorting documentation for examples of using multiple values and sorting by ascending and descending. # @option opts [String] :_expand The object expansion to perform on the result. See documentation for examples # @return [AutoOrdersResponse] def get_auto_orders(opts = {}) data, _status_code, _headers = get_auto_orders_with_http_info(opts) data end # 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. # @param [Hash] opts the optional parameters # @option opts [String] :auto_order_code Auto order code # @option opts [String] :original_order_id Original order id # @option opts [String] :first_name First name # @option opts [String] :last_name Last name # @option opts [String] :company Company # @option opts [String] :city City # @option opts [String] :state State # @option opts [String] :postal_code Postal code # @option opts [String] :country_code Country code (ISO-3166 two letter) # @option opts [String] :phone Phone # @option opts [String] :email Email # @option opts [String] :original_order_date_begin Original order date begin # @option opts [String] :original_order_date_end Original order date end # @option opts [String] :next_shipment_date_begin Next shipment date begin # @option opts [String] :next_shipment_date_end Next shipment date end # @option opts [String] :card_type Card type # @option opts [String] :item_id Item ID # @option opts [String] :status Status # @option opts [Integer] :_limit The maximum number of records to return on this one API call. (Max 200) # @option opts [Integer] :_offset Pagination of the record set. Offset is a zero based index. # @option opts [String] :_since Fetch auto orders that have been created/modified since this date/time. # @option opts [String] :_sort The sort order of the auto orders. See Sorting documentation for examples of using multiple values and sorting by ascending and descending. # @option opts [String] :_expand The object expansion to perform on the result. See documentation for examples # @return [Array<(AutoOrdersResponse, Fixnum, Hash)>] AutoOrdersResponse data, response status code and response headers 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 # 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. # @param auto_order_batch Auto order batch # @param [Hash] opts the optional parameters # @option opts [String] :_expand The object expansion to perform on the result. # @return [AutoOrdersResponse] 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 # 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. # @param auto_order_batch Auto order batch # @param [Hash] opts the optional parameters # @option opts [String] :_expand The object expansion to perform on the result. # @return [Array<(AutoOrdersResponse, Fixnum, Hash)>] AutoOrdersResponse data, response status code and response headers 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 # 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. # @param auto_order_query Auto order query # @param [Hash] opts the optional parameters # @option opts [Integer] :_limit The maximum number of records to return on this one API call. (Maximum 200) (default to 100) # @option opts [Integer] :_offset Pagination of the record set. Offset is a zero based index. (default to 0) # @option opts [String] :_sort The sort order of the auto orders. See Sorting documentation for examples of using multiple values and sorting by ascending and descending. # @option opts [String] :_expand The object expansion to perform on the result. # @return [AutoOrdersResponse] 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 # 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. # @param auto_order_query Auto order query # @param [Hash] opts the optional parameters # @option opts [Integer] :_limit The maximum number of records to return on this one API call. (Maximum 200) # @option opts [Integer] :_offset Pagination of the record set. Offset is a zero based index. # @option opts [String] :_sort The sort order of the auto orders. See Sorting documentation for examples of using multiple values and sorting by ascending and descending. # @option opts [String] :_expand The object expansion to perform on the result. # @return [Array<(AutoOrdersResponse, Fixnum, Hash)>] AutoOrdersResponse data, response status code and response headers 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 # Update an auto order # Update an auto order on the UltraCart account. # @param auto_order Auto order to update # @param auto_order_oid The auto order oid to update. # @param [Hash] opts the optional parameters # @option opts [String] :_expand The object expansion to perform on the result. See documentation for examples # @return [AutoOrderResponse] 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 an auto order # Update an auto order on the UltraCart account. # @param auto_order Auto order to update # @param auto_order_oid The auto order oid to update. # @param [Hash] opts the optional parameters # @option opts [String] :_expand The object expansion to perform on the result. See documentation for examples # @return [Array<(AutoOrderResponse, Fixnum, Hash)>] AutoOrderResponse data, response status code and response headers 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 multiple auto orders # Update multiple auto orders on the UltraCart account. # @param auto_orders_request Auto orders to update (synchronous maximum 20 / asynchronous maximum 100) # @param [Hash] opts the optional parameters # @option opts [String] :_expand The object expansion to perform on the result. See documentation for examples # @option opts [BOOLEAN] :_placeholders Whether or not placeholder values should be returned in the result. Useful for UIs that consume this REST API. # @option opts [BOOLEAN] :_async True if the operation should be run async. No result returned # @return [AutoOrdersResponse] 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 multiple auto orders # Update multiple auto orders on the UltraCart account. # @param auto_orders_request Auto orders to update (synchronous maximum 20 / asynchronous maximum 100) # @param [Hash] opts the optional parameters # @option opts [String] :_expand The object expansion to perform on the result. See documentation for examples # @option opts [BOOLEAN] :_placeholders Whether or not placeholder values should be returned in the result. Useful for UIs that consume this REST API. # @option opts [BOOLEAN] :_async True if the operation should be run async. No result returned # @return [Array<(AutoOrdersResponse, Fixnum, Hash)>] AutoOrdersResponse data, response status code and response headers 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 end end