class OrderCloud::SpecApi
Attributes
Public Class Methods
# File lib/order_cloud/api/spec_api.rb, line 30 def initialize(api_client = ApiClient.default) @api_client = api_client end
Public Instance Methods
@param spec @param [Hash] opts the optional parameters @return [Spec]
# File lib/order_cloud/api/spec_api.rb, line 39 def create(spec, opts = {}) data, _status_code, _headers = create_with_http_info(spec, opts) return data end
@param spec_id ID of the spec. @param option @param [Hash] opts the optional parameters @return [SpecOption]
# File lib/order_cloud/api/spec_api.rb, line 97 def create_option(spec_id, option, opts = {}) data, _status_code, _headers = create_option_with_http_info(spec_id, option, opts) return data end
@param spec_id ID of the spec. @param option @param [Hash] opts the optional parameters @return [Array<(SpecOption
, Fixnum, Hash)>] SpecOption
data, response status code and response headers
# File lib/order_cloud/api/spec_api.rb, line 108 def create_option_with_http_info(spec_id, option, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SpecApi.create_option ..." end # verify the required parameter 'spec_id' is set fail ArgumentError, "Missing the required parameter 'spec_id' when calling SpecApi.create_option" if spec_id.nil? # verify the required parameter 'option' is set fail ArgumentError, "Missing the required parameter 'option' when calling SpecApi.create_option" if option.nil? # resource path local_var_path = "/specs/{specID}/options".sub('{format}','json').sub('{' + 'specID' + '}', spec_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json', 'text/plain; charset=utf-8'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(option) auth_names = ['oauth2'] 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 => 'SpecOption') if @api_client.config.debugging @api_client.config.logger.debug "API called: SpecApi#create_option\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
@param spec @param [Hash] opts the optional parameters @return [Array<(Spec
, Fixnum, Hash)>] Spec
data, response status code and response headers
# File lib/order_cloud/api/spec_api.rb, line 49 def create_with_http_info(spec, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SpecApi.create ..." end # verify the required parameter 'spec' is set fail ArgumentError, "Missing the required parameter 'spec' when calling SpecApi.create" if spec.nil? # resource path local_var_path = "/specs".sub('{format}','json') # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json', 'text/plain; charset=utf-8'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(spec) auth_names = ['oauth2'] 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 => 'Spec') if @api_client.config.debugging @api_client.config.logger.debug "API called: SpecApi#create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
@param spec_id ID of the spec. @param [Hash] opts the optional parameters @return [nil]
# File lib/order_cloud/api/spec_api.rb, line 157 def delete(spec_id, opts = {}) delete_with_http_info(spec_id, opts) return nil end
@param spec_id ID of the spec. @param option_id ID of the option. @param [Hash] opts the optional parameters @return [nil]
# File lib/order_cloud/api/spec_api.rb, line 214 def delete_option(spec_id, option_id, opts = {}) delete_option_with_http_info(spec_id, option_id, opts) return nil end
@param spec_id ID of the spec. @param option_id ID of the option. @param [Hash] opts the optional parameters @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
# File lib/order_cloud/api/spec_api.rb, line 225 def delete_option_with_http_info(spec_id, option_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SpecApi.delete_option ..." end # verify the required parameter 'spec_id' is set fail ArgumentError, "Missing the required parameter 'spec_id' when calling SpecApi.delete_option" if spec_id.nil? # verify the required parameter 'option_id' is set fail ArgumentError, "Missing the required parameter 'option_id' when calling SpecApi.delete_option" if option_id.nil? # resource path local_var_path = "/specs/{specID}/options/{optionID}".sub('{format}','json').sub('{' + 'specID' + '}', spec_id.to_s).sub('{' + 'optionID' + '}', option_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json', 'text/plain; charset=utf-8'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['oauth2'] data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names) if @api_client.config.debugging @api_client.config.logger.debug "API called: SpecApi#delete_option\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
@param spec_id ID of the spec. @param product_id ID of the product. @param [Hash] opts the optional parameters @return [nil]
# File lib/order_cloud/api/spec_api.rb, line 274 def delete_product_assignment(spec_id, product_id, opts = {}) delete_product_assignment_with_http_info(spec_id, product_id, opts) return nil end
@param spec_id ID of the spec. @param product_id ID of the product. @param [Hash] opts the optional parameters @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
# File lib/order_cloud/api/spec_api.rb, line 285 def delete_product_assignment_with_http_info(spec_id, product_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SpecApi.delete_product_assignment ..." end # verify the required parameter 'spec_id' is set fail ArgumentError, "Missing the required parameter 'spec_id' when calling SpecApi.delete_product_assignment" if spec_id.nil? # verify the required parameter 'product_id' is set fail ArgumentError, "Missing the required parameter 'product_id' when calling SpecApi.delete_product_assignment" if product_id.nil? # resource path local_var_path = "/specs/{specID}/productassignments/{productID}".sub('{format}','json').sub('{' + 'specID' + '}', spec_id.to_s).sub('{' + 'productID' + '}', product_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json', 'text/plain; charset=utf-8'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['oauth2'] data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names) if @api_client.config.debugging @api_client.config.logger.debug "API called: SpecApi#delete_product_assignment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
@param spec_id ID of the spec. @param [Hash] opts the optional parameters @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
# File lib/order_cloud/api/spec_api.rb, line 167 def delete_with_http_info(spec_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SpecApi.delete ..." end # verify the required parameter 'spec_id' is set fail ArgumentError, "Missing the required parameter 'spec_id' when calling SpecApi.delete" if spec_id.nil? # resource path local_var_path = "/specs/{specID}".sub('{format}','json').sub('{' + 'specID' + '}', spec_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json', 'text/plain; charset=utf-8'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['oauth2'] data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names) if @api_client.config.debugging @api_client.config.logger.debug "API called: SpecApi#delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
@param spec_id ID of the spec. @param [Hash] opts the optional parameters @return [Spec]
# File lib/order_cloud/api/spec_api.rb, line 333 def get(spec_id, opts = {}) data, _status_code, _headers = get_with_http_info(spec_id, opts) return data end
@param spec_id ID of the spec. @param option_id ID of the option. @param [Hash] opts the optional parameters @return [SpecOption]
# File lib/order_cloud/api/spec_api.rb, line 391 def get_option(spec_id, option_id, opts = {}) data, _status_code, _headers = get_option_with_http_info(spec_id, option_id, opts) return data end
@param spec_id ID of the spec. @param option_id ID of the option. @param [Hash] opts the optional parameters @return [Array<(SpecOption
, Fixnum, Hash)>] SpecOption
data, response status code and response headers
# File lib/order_cloud/api/spec_api.rb, line 402 def get_option_with_http_info(spec_id, option_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SpecApi.get_option ..." end # verify the required parameter 'spec_id' is set fail ArgumentError, "Missing the required parameter 'spec_id' when calling SpecApi.get_option" if spec_id.nil? # verify the required parameter 'option_id' is set fail ArgumentError, "Missing the required parameter 'option_id' when calling SpecApi.get_option" if option_id.nil? # resource path local_var_path = "/specs/{specID}/options/{optionID}".sub('{format}','json').sub('{' + 'specID' + '}', spec_id.to_s).sub('{' + 'optionID' + '}', option_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json', 'text/plain; charset=utf-8'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['oauth2'] 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 => 'SpecOption') if @api_client.config.debugging @api_client.config.logger.debug "API called: SpecApi#get_option\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
@param spec_id ID of the spec. @param [Hash] opts the optional parameters @return [Array<(Spec
, Fixnum, Hash)>] Spec
data, response status code and response headers
# File lib/order_cloud/api/spec_api.rb, line 343 def get_with_http_info(spec_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SpecApi.get ..." end # verify the required parameter 'spec_id' is set fail ArgumentError, "Missing the required parameter 'spec_id' when calling SpecApi.get" if spec_id.nil? # resource path local_var_path = "/specs/{specID}".sub('{format}','json').sub('{' + 'specID' + '}', spec_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json', 'text/plain; charset=utf-8'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['oauth2'] 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 => 'Spec') if @api_client.config.debugging @api_client.config.logger.debug "API called: SpecApi#get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
@param [Hash] opts the optional parameters @option opts [String] :search Search of the spec. @option opts [Array<String>] :search_on Search on of the spec. @option opts [Array<String>] :sort_by Sort by of the spec. @option opts [Integer] :page Page of the spec. @option opts [Integer] :page_size Page size of the spec. @option opts [Hash<String, String>] :filters Filters of the spec. @return [ListSpec]
# File lib/order_cloud/api/spec_api.rb, line 456 def list(opts = {}) data, _status_code, _headers = list_with_http_info(opts) return data end
@param spec_id ID of the spec. @param [Hash] opts the optional parameters @option opts [String] :search Search of the spec. @option opts [Array<String>] :search_on Search on of the spec. @option opts [Array<String>] :sort_by Sort by of the spec. @option opts [Integer] :page Page of the spec. @option opts [Integer] :page_size Page size of the spec. @option opts [Hash<String, String>] :filters Filters of the spec. @return [ListSpecOption]
# File lib/order_cloud/api/spec_api.rb, line 528 def list_options(spec_id, opts = {}) data, _status_code, _headers = list_options_with_http_info(spec_id, opts) return data end
@param spec_id ID of the spec. @param [Hash] opts the optional parameters @option opts [String] :search Search of the spec. @option opts [Array<String>] :search_on Search on of the spec. @option opts [Array<String>] :sort_by Sort by of the spec. @option opts [Integer] :page Page of the spec. @option opts [Integer] :page_size Page size of the spec. @option opts [Hash<String, String>] :filters Filters of the spec. @return [Array<(ListSpecOption
, Fixnum, Hash)>] ListSpecOption
data, response status code and response headers
# File lib/order_cloud/api/spec_api.rb, line 544 def list_options_with_http_info(spec_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SpecApi.list_options ..." end # verify the required parameter 'spec_id' is set fail ArgumentError, "Missing the required parameter 'spec_id' when calling SpecApi.list_options" if spec_id.nil? # resource path local_var_path = "/specs/{specID}/options".sub('{format}','json').sub('{' + 'specID' + '}', spec_id.to_s) # query parameters query_params = {} query_params[:'search'] = opts[:'search'] if !opts[:'search'].nil? query_params[:'searchOn'] = @api_client.build_collection_param(opts[:'search_on'], :csv) if !opts[:'search_on'].nil? query_params[:'sortBy'] = @api_client.build_collection_param(opts[:'sort_by'], :csv) if !opts[:'sort_by'].nil? query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil? query_params[:'pageSize'] = opts[:'page_size'] if !opts[:'page_size'].nil? query_params[:'filters'] = opts[:'filters'] if !opts[:'filters'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json', 'text/plain; charset=utf-8'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['oauth2'] 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 => 'ListSpecOption') if @api_client.config.debugging @api_client.config.logger.debug "API called: SpecApi#list_options\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
@param [Hash] opts the optional parameters @option opts [String] :search Search of the spec. @option opts [Array<String>] :search_on Search on of the spec. @option opts [Array<String>] :sort_by Sort by of the spec. @option opts [Integer] :page Page of the spec. @option opts [Integer] :page_size Page size of the spec. @option opts [Hash<String, String>] :filters Filters of the spec. @return [ListSpecProductAssignment]
# File lib/order_cloud/api/spec_api.rb, line 602 def list_product_assignments(opts = {}) data, _status_code, _headers = list_product_assignments_with_http_info(opts) return data end
@param [Hash] opts the optional parameters @option opts [String] :search Search of the spec. @option opts [Array<String>] :search_on Search on of the spec. @option opts [Array<String>] :sort_by Sort by of the spec. @option opts [Integer] :page Page of the spec. @option opts [Integer] :page_size Page size of the spec. @option opts [Hash<String, String>] :filters Filters of the spec. @return [Array<(ListSpecProductAssignment
, Fixnum, Hash)>] ListSpecProductAssignment
data, response status code and response headers
# File lib/order_cloud/api/spec_api.rb, line 617 def list_product_assignments_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SpecApi.list_product_assignments ..." end # resource path local_var_path = "/specs/productassignments".sub('{format}','json') # query parameters query_params = {} query_params[:'search'] = opts[:'search'] if !opts[:'search'].nil? query_params[:'searchOn'] = @api_client.build_collection_param(opts[:'search_on'], :csv) if !opts[:'search_on'].nil? query_params[:'sortBy'] = @api_client.build_collection_param(opts[:'sort_by'], :csv) if !opts[:'sort_by'].nil? query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil? query_params[:'pageSize'] = opts[:'page_size'] if !opts[:'page_size'].nil? query_params[:'filters'] = opts[:'filters'] if !opts[:'filters'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json', 'text/plain; charset=utf-8'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['oauth2'] 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 => 'ListSpecProductAssignment') if @api_client.config.debugging @api_client.config.logger.debug "API called: SpecApi#list_product_assignments\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
@param [Hash] opts the optional parameters @option opts [String] :search Search of the spec. @option opts [Array<String>] :search_on Search on of the spec. @option opts [Array<String>] :sort_by Sort by of the spec. @option opts [Integer] :page Page of the spec. @option opts [Integer] :page_size Page size of the spec. @option opts [Hash<String, String>] :filters Filters of the spec. @return [Array<(ListSpec
, Fixnum, Hash)>] ListSpec
data, response status code and response headers
# File lib/order_cloud/api/spec_api.rb, line 471 def list_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SpecApi.list ..." end # resource path local_var_path = "/specs".sub('{format}','json') # query parameters query_params = {} query_params[:'search'] = opts[:'search'] if !opts[:'search'].nil? query_params[:'searchOn'] = @api_client.build_collection_param(opts[:'search_on'], :csv) if !opts[:'search_on'].nil? query_params[:'sortBy'] = @api_client.build_collection_param(opts[:'sort_by'], :csv) if !opts[:'sort_by'].nil? query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil? query_params[:'pageSize'] = opts[:'page_size'] if !opts[:'page_size'].nil? query_params[:'filters'] = opts[:'filters'] if !opts[:'filters'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json', 'text/plain; charset=utf-8'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['oauth2'] 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 => 'ListSpec') if @api_client.config.debugging @api_client.config.logger.debug "API called: SpecApi#list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
@param spec_id ID of the spec. @param spec @param [Hash] opts the optional parameters @return [Spec]
# File lib/order_cloud/api/spec_api.rb, line 669 def patch(spec_id, spec, opts = {}) data, _status_code, _headers = patch_with_http_info(spec_id, spec, opts) return data end
@param spec_id ID of the spec. @param option_id ID of the option. @param option @param [Hash] opts the optional parameters @return [SpecOption]
# File lib/order_cloud/api/spec_api.rb, line 731 def patch_option(spec_id, option_id, option, opts = {}) data, _status_code, _headers = patch_option_with_http_info(spec_id, option_id, option, opts) return data end
@param spec_id ID of the spec. @param option_id ID of the option. @param option @param [Hash] opts the optional parameters @return [Array<(SpecOption
, Fixnum, Hash)>] SpecOption
data, response status code and response headers
# File lib/order_cloud/api/spec_api.rb, line 743 def patch_option_with_http_info(spec_id, option_id, option, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SpecApi.patch_option ..." end # verify the required parameter 'spec_id' is set fail ArgumentError, "Missing the required parameter 'spec_id' when calling SpecApi.patch_option" if spec_id.nil? # verify the required parameter 'option_id' is set fail ArgumentError, "Missing the required parameter 'option_id' when calling SpecApi.patch_option" if option_id.nil? # verify the required parameter 'option' is set fail ArgumentError, "Missing the required parameter 'option' when calling SpecApi.patch_option" if option.nil? # resource path local_var_path = "/specs/{specID}/options/{optionID}".sub('{format}','json').sub('{' + 'specID' + '}', spec_id.to_s).sub('{' + 'optionID' + '}', option_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json', 'text/plain; charset=utf-8'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(option) auth_names = ['oauth2'] data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'SpecOption') if @api_client.config.debugging @api_client.config.logger.debug "API called: SpecApi#patch_option\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
@param spec_id ID of the spec. @param spec @param [Hash] opts the optional parameters @return [Array<(Spec
, Fixnum, Hash)>] Spec
data, response status code and response headers
# File lib/order_cloud/api/spec_api.rb, line 680 def patch_with_http_info(spec_id, spec, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SpecApi.patch ..." end # verify the required parameter 'spec_id' is set fail ArgumentError, "Missing the required parameter 'spec_id' when calling SpecApi.patch" if spec_id.nil? # verify the required parameter 'spec' is set fail ArgumentError, "Missing the required parameter 'spec' when calling SpecApi.patch" if spec.nil? # resource path local_var_path = "/specs/{specID}".sub('{format}','json').sub('{' + 'specID' + '}', spec_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json', 'text/plain; charset=utf-8'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(spec) auth_names = ['oauth2'] data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'Spec') if @api_client.config.debugging @api_client.config.logger.debug "API called: SpecApi#patch\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
@param product_assignment @param [Hash] opts the optional parameters @return [nil]
# File lib/order_cloud/api/spec_api.rb, line 794 def save_product_assignment(product_assignment, opts = {}) save_product_assignment_with_http_info(product_assignment, opts) return nil end
@param product_assignment @param [Hash] opts the optional parameters @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
# File lib/order_cloud/api/spec_api.rb, line 804 def save_product_assignment_with_http_info(product_assignment, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SpecApi.save_product_assignment ..." end # verify the required parameter 'product_assignment' is set fail ArgumentError, "Missing the required parameter 'product_assignment' when calling SpecApi.save_product_assignment" if product_assignment.nil? # resource path local_var_path = "/specs/productassignments".sub('{format}','json') # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json', 'text/plain; charset=utf-8'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(product_assignment) auth_names = ['oauth2'] 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) if @api_client.config.debugging @api_client.config.logger.debug "API called: SpecApi#save_product_assignment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
@param spec_id ID of the spec. @param spec @param [Hash] opts the optional parameters @return [Spec]
# File lib/order_cloud/api/spec_api.rb, line 851 def update(spec_id, spec, opts = {}) data, _status_code, _headers = update_with_http_info(spec_id, spec, opts) return data end
@param spec_id ID of the spec. @param option_id ID of the option. @param option @param [Hash] opts the optional parameters @return [SpecOption]
# File lib/order_cloud/api/spec_api.rb, line 913 def update_option(spec_id, option_id, option, opts = {}) data, _status_code, _headers = update_option_with_http_info(spec_id, option_id, option, opts) return data end
@param spec_id ID of the spec. @param option_id ID of the option. @param option @param [Hash] opts the optional parameters @return [Array<(SpecOption
, Fixnum, Hash)>] SpecOption
data, response status code and response headers
# File lib/order_cloud/api/spec_api.rb, line 925 def update_option_with_http_info(spec_id, option_id, option, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SpecApi.update_option ..." end # verify the required parameter 'spec_id' is set fail ArgumentError, "Missing the required parameter 'spec_id' when calling SpecApi.update_option" if spec_id.nil? # verify the required parameter 'option_id' is set fail ArgumentError, "Missing the required parameter 'option_id' when calling SpecApi.update_option" if option_id.nil? # verify the required parameter 'option' is set fail ArgumentError, "Missing the required parameter 'option' when calling SpecApi.update_option" if option.nil? # resource path local_var_path = "/specs/{specID}/options/{optionID}".sub('{format}','json').sub('{' + 'specID' + '}', spec_id.to_s).sub('{' + 'optionID' + '}', option_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json', 'text/plain; charset=utf-8'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(option) auth_names = ['oauth2'] 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 => 'SpecOption') if @api_client.config.debugging @api_client.config.logger.debug "API called: SpecApi#update_option\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
@param spec_id ID of the spec. @param spec @param [Hash] opts the optional parameters @return [Array<(Spec
, Fixnum, Hash)>] Spec
data, response status code and response headers
# File lib/order_cloud/api/spec_api.rb, line 862 def update_with_http_info(spec_id, spec, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: SpecApi.update ..." end # verify the required parameter 'spec_id' is set fail ArgumentError, "Missing the required parameter 'spec_id' when calling SpecApi.update" if spec_id.nil? # verify the required parameter 'spec' is set fail ArgumentError, "Missing the required parameter 'spec' when calling SpecApi.update" if spec.nil? # resource path local_var_path = "/specs/{specID}".sub('{format}','json').sub('{' + 'specID' + '}', spec_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json', 'text/plain; charset=utf-8'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(spec) auth_names = ['oauth2'] 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 => 'Spec') if @api_client.config.debugging @api_client.config.logger.debug "API called: SpecApi#update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end