=begin #Subskribe API #No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) OpenAPI spec version: 1.0.0 Generated by: https://github.com/swagger-api/swagger-codegen.git Swagger Codegen version: 2.4.41 =end require 'uri' module SubskribeDevClient class SettingsApi attr_accessor :api_client def initialize(api_client = ApiClient.default) @api_client = api_client end # Activate unit of measure # Activates the specified unit of measure making it available to be attached to charges # @param id # @param [Hash] opts the optional parameters # @return [nil] def activate_unit_of_measure(id, opts = {}) activate_unit_of_measure_with_http_info(id, opts) nil end # Activate unit of measure # Activates the specified unit of measure making it available to be attached to charges # @param id # @param [Hash] opts the optional parameters # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers def activate_unit_of_measure_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SettingsApi.activate_unit_of_measure ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling SettingsApi.activate_unit_of_measure" end # resource path local_var_path = '/unitsOfMeasure/{id}/activate'.sub('{' + 'id' + '}', id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['ApiKeyAuth'] 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: SettingsApi#activate_unit_of_measure\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Add tax rate # Add a new tax rate object # @param [Hash] opts the optional parameters # @option opts [TaxRateJson] :body # @return [TaxRateJson] def add_tax_rate(opts = {}) data, _status_code, _headers = add_tax_rate_with_http_info(opts) data end # Add tax rate # Add a new tax rate object # @param [Hash] opts the optional parameters # @option opts [TaxRateJson] :body # @return [Array<(TaxRateJson, Fixnum, Hash)>] TaxRateJson data, response status code and response headers def add_tax_rate_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SettingsApi.add_tax_rate ...' end # resource path local_var_path = '/taxrates' # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(opts[:'body']) auth_names = ['ApiKeyAuth'] 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 => 'TaxRateJson') if @api_client.config.debugging @api_client.config.logger.debug "API called: SettingsApi#add_tax_rate\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Add predefined terms section # Adds a predefined terms section. # @param [Hash] opts the optional parameters # @option opts [DocumentSection] :body # @return [DocumentSection] def add_term_section(opts = {}) data, _status_code, _headers = add_term_section_with_http_info(opts) data end # Add predefined terms section # Adds a predefined terms section. # @param [Hash] opts the optional parameters # @option opts [DocumentSection] :body # @return [Array<(DocumentSection, Fixnum, Hash)>] DocumentSection data, response status code and response headers def add_term_section_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SettingsApi.add_term_section ...' end # resource path local_var_path = '/termsections' # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(opts[:'body']) auth_names = ['ApiKeyAuth'] 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 => 'DocumentSection') if @api_client.config.debugging @api_client.config.logger.debug "API called: SettingsApi#add_term_section\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Add unit of measure # Add a new instance of unit of measure as specified by the input # @param [Hash] opts the optional parameters # @option opts [UnitOfMeasureJson] :body # @return [UnitOfMeasureJson] def add_unit_of_measure(opts = {}) data, _status_code, _headers = add_unit_of_measure_with_http_info(opts) data end # Add unit of measure # Add a new instance of unit of measure as specified by the input # @param [Hash] opts the optional parameters # @option opts [UnitOfMeasureJson] :body # @return [Array<(UnitOfMeasureJson, Fixnum, Hash)>] UnitOfMeasureJson data, response status code and response headers def add_unit_of_measure_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SettingsApi.add_unit_of_measure ...' end # resource path local_var_path = '/unitsOfMeasure' # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(opts[:'body']) auth_names = ['ApiKeyAuth'] 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 => 'UnitOfMeasureJson') if @api_client.config.debugging @api_client.config.logger.debug "API called: SettingsApi#add_unit_of_measure\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Delete tax rate # Deletes the tax rate object by Id. If successful the deleted tax rate object is returned # @param id # @param [Hash] opts the optional parameters # @return [TaxRateJson] def delete_tax_rate(id, opts = {}) data, _status_code, _headers = delete_tax_rate_with_http_info(id, opts) data end # Delete tax rate # Deletes the tax rate object by Id. If successful the deleted tax rate object is returned # @param id # @param [Hash] opts the optional parameters # @return [Array<(TaxRateJson, Fixnum, Hash)>] TaxRateJson data, response status code and response headers def delete_tax_rate_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SettingsApi.delete_tax_rate ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling SettingsApi.delete_tax_rate" end # resource path local_var_path = '/taxrates/{id}'.sub('{' + 'id' + '}', id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['ApiKeyAuth'] 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, :return_type => 'TaxRateJson') if @api_client.config.debugging @api_client.config.logger.debug "API called: SettingsApi#delete_tax_rate\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Delete predefined terms section # Deletes the predefined terms section specified. # @param id # @param [Hash] opts the optional parameters # @return [nil] def delete_term_section(id, opts = {}) delete_term_section_with_http_info(id, opts) nil end # Delete predefined terms section # Deletes the predefined terms section specified. # @param id # @param [Hash] opts the optional parameters # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers def delete_term_section_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SettingsApi.delete_term_section ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling SettingsApi.delete_term_section" end # resource path local_var_path = '/termsections/{id}'.sub('{' + 'id' + '}', id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['ApiKeyAuth'] 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: SettingsApi#delete_term_section\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Delete unit of measure # Delete the unit of measure by Id provided. Returns the deleted unit of measure object if successful. # @param id # @param [Hash] opts the optional parameters # @return [UnitOfMeasureJson] def delete_unit_of_measure(id, opts = {}) data, _status_code, _headers = delete_unit_of_measure_with_http_info(id, opts) data end # Delete unit of measure # Delete the unit of measure by Id provided. Returns the deleted unit of measure object if successful. # @param id # @param [Hash] opts the optional parameters # @return [Array<(UnitOfMeasureJson, Fixnum, Hash)>] UnitOfMeasureJson data, response status code and response headers def delete_unit_of_measure_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SettingsApi.delete_unit_of_measure ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling SettingsApi.delete_unit_of_measure" end # resource path local_var_path = '/unitsOfMeasure/{id}'.sub('{' + 'id' + '}', id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['ApiKeyAuth'] 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, :return_type => 'UnitOfMeasureJson') if @api_client.config.debugging @api_client.config.logger.debug "API called: SettingsApi#delete_unit_of_measure\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Deprecate unit of measure # Deprecates the specified unit of measure making it unavailable to be attached to charges going forward # @param id # @param [Hash] opts the optional parameters # @return [nil] def deprecate_unit_of_measure(id, opts = {}) deprecate_unit_of_measure_with_http_info(id, opts) nil end # Deprecate unit of measure # Deprecates the specified unit of measure making it unavailable to be attached to charges going forward # @param id # @param [Hash] opts the optional parameters # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers def deprecate_unit_of_measure_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SettingsApi.deprecate_unit_of_measure ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling SettingsApi.deprecate_unit_of_measure" end # resource path local_var_path = '/unitsOfMeasure/{id}/deprecate'.sub('{' + 'id' + '}', id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['ApiKeyAuth'] 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: SettingsApi#deprecate_unit_of_measure\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Get payment term settings # # @param [Hash] opts the optional parameters # @return [nil] def get_payment_term_settings(opts = {}) get_payment_term_settings_with_http_info(opts) nil end # Get payment term settings # # @param [Hash] opts the optional parameters # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers def get_payment_term_settings_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SettingsApi.get_payment_term_settings ...' end # resource path local_var_path = '/settings/paymentTerms' # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['ApiKeyAuth'] 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) if @api_client.config.debugging @api_client.config.logger.debug "API called: SettingsApi#get_payment_term_settings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Get supported currencies # Get supported currencies for your tenant # @param [Hash] opts the optional parameters # @return [nil] def get_supported_currencies(opts = {}) get_supported_currencies_with_http_info(opts) nil end # Get supported currencies # Get supported currencies for your tenant # @param [Hash] opts the optional parameters # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers def get_supported_currencies_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SettingsApi.get_supported_currencies ...' end # resource path local_var_path = '/settings/supportedCurrencies' # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['ApiKeyAuth'] 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) if @api_client.config.debugging @api_client.config.logger.debug "API called: SettingsApi#get_supported_currencies\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Get tax rate by Id # Retrieves the tax rate object by Id # @param id # @param [Hash] opts the optional parameters # @return [TaxRatePaginationResponseJson] def get_tax_rate(id, opts = {}) data, _status_code, _headers = get_tax_rate_with_http_info(id, opts) data end # Get tax rate by Id # Retrieves the tax rate object by Id # @param id # @param [Hash] opts the optional parameters # @return [Array<(TaxRatePaginationResponseJson, Fixnum, Hash)>] TaxRatePaginationResponseJson data, response status code and response headers def get_tax_rate_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SettingsApi.get_tax_rate ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling SettingsApi.get_tax_rate" end # resource path local_var_path = '/taxrates/{id}'.sub('{' + 'id' + '}', id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['ApiKeyAuth'] 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 => 'TaxRatePaginationResponseJson') if @api_client.config.debugging @api_client.config.logger.debug "API called: SettingsApi#get_tax_rate\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Get tax rates # Get all available tax rates. The result is paginated. To retrieve all results pass the cursor returned from a call to the next call until all results are returned. # @param [Hash] opts the optional parameters # @option opts [String] :cursor # @option opts [Integer] :limit # @return [TaxRatePaginationResponseJson] def get_tax_rates(opts = {}) data, _status_code, _headers = get_tax_rates_with_http_info(opts) data end # Get tax rates # Get all available tax rates. The result is paginated. To retrieve all results pass the cursor returned from a call to the next call until all results are returned. # @param [Hash] opts the optional parameters # @option opts [String] :cursor # @option opts [Integer] :limit # @return [Array<(TaxRatePaginationResponseJson, Fixnum, Hash)>] TaxRatePaginationResponseJson data, response status code and response headers def get_tax_rates_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SettingsApi.get_tax_rates ...' end # resource path local_var_path = '/taxrates' # query parameters query_params = {} query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil? query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['ApiKeyAuth'] 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 => 'TaxRatePaginationResponseJson') if @api_client.config.debugging @api_client.config.logger.debug "API called: SettingsApi#get_tax_rates\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Get tenant details # Get the details of the current tenant # @param [Hash] opts the optional parameters # @return [TenantJson] def get_tenant(opts = {}) data, _status_code, _headers = get_tenant_with_http_info(opts) data end # Get tenant details # Get the details of the current tenant # @param [Hash] opts the optional parameters # @return [Array<(TenantJson, Fixnum, Hash)>] TenantJson data, response status code and response headers def get_tenant_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SettingsApi.get_tenant ...' end # resource path local_var_path = '/tenants' # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['ApiKeyAuth'] 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 => 'TenantJson') if @api_client.config.debugging @api_client.config.logger.debug "API called: SettingsApi#get_tenant\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Get tenant logo # Get the current logo stored # @param [Hash] opts the optional parameters # @return [nil] def get_tenant_logo(opts = {}) get_tenant_logo_with_http_info(opts) nil end # Get tenant logo # Get the current logo stored # @param [Hash] opts the optional parameters # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers def get_tenant_logo_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SettingsApi.get_tenant_logo ...' end # resource path local_var_path = '/tenants/logo' # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['image/png', 'application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['ApiKeyAuth'] 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) if @api_client.config.debugging @api_client.config.logger.debug "API called: SettingsApi#get_tenant_logo\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Get tenant settings # Returns all tenant settings for your tenant. # @param [Hash] opts the optional parameters # @return [TenantSettingJson] def get_tenant_setting(opts = {}) data, _status_code, _headers = get_tenant_setting_with_http_info(opts) data end # Get tenant settings # Returns all tenant settings for your tenant. # @param [Hash] opts the optional parameters # @return [Array<(TenantSettingJson, Fixnum, Hash)>] TenantSettingJson data, response status code and response headers def get_tenant_setting_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SettingsApi.get_tenant_setting ...' end # resource path local_var_path = '/settings' # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['ApiKeyAuth'] 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 => 'TenantSettingJson') if @api_client.config.debugging @api_client.config.logger.debug "API called: SettingsApi#get_tenant_setting\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Get predefined terms section detail # Returns predefined terms section detail. # @param id # @param [Hash] opts the optional parameters # @return [DocumentSection] def get_term_section(id, opts = {}) data, _status_code, _headers = get_term_section_with_http_info(id, opts) data end # Get predefined terms section detail # Returns predefined terms section detail. # @param id # @param [Hash] opts the optional parameters # @return [Array<(DocumentSection, Fixnum, Hash)>] DocumentSection data, response status code and response headers def get_term_section_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SettingsApi.get_term_section ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling SettingsApi.get_term_section" end # resource path local_var_path = '/termsections/{id}'.sub('{' + 'id' + '}', id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['ApiKeyAuth'] 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 => 'DocumentSection') if @api_client.config.debugging @api_client.config.logger.debug "API called: SettingsApi#get_term_section\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Get predefined terms sections # Returns predefined terms sections. # @param [Hash] opts the optional parameters # @return [DocumentSection] def get_term_sections(opts = {}) data, _status_code, _headers = get_term_sections_with_http_info(opts) data end # Get predefined terms sections # Returns predefined terms sections. # @param [Hash] opts the optional parameters # @return [Array<(DocumentSection, Fixnum, Hash)>] DocumentSection data, response status code and response headers def get_term_sections_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SettingsApi.get_term_sections ...' end # resource path local_var_path = '/termsections' # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['ApiKeyAuth'] 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 => 'DocumentSection') if @api_client.config.debugging @api_client.config.logger.debug "API called: SettingsApi#get_term_sections\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Get units of measure # Returns a paginated list of units of measure # @param [Hash] opts the optional parameters # @option opts [String] :cursor # @option opts [Integer] :limit # @return [UnitOfMeasurePaginationResponseJson] def get_units_of_measure(opts = {}) data, _status_code, _headers = get_units_of_measure_with_http_info(opts) data end # Get units of measure # Returns a paginated list of units of measure # @param [Hash] opts the optional parameters # @option opts [String] :cursor # @option opts [Integer] :limit # @return [Array<(UnitOfMeasurePaginationResponseJson, Fixnum, Hash)>] UnitOfMeasurePaginationResponseJson data, response status code and response headers def get_units_of_measure_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SettingsApi.get_units_of_measure ...' end # resource path local_var_path = '/unitsOfMeasure' # query parameters query_params = {} query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil? query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['ApiKeyAuth'] 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 => 'UnitOfMeasurePaginationResponseJson') if @api_client.config.debugging @api_client.config.logger.debug "API called: SettingsApi#get_units_of_measure\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Update payment term settings # # @param body json representation of the payment term settings # @param [Hash] opts the optional parameters # @return [nil] def update_payment_term_settings(body, opts = {}) update_payment_term_settings_with_http_info(body, opts) nil end # Update payment term settings # # @param body json representation of the payment term settings # @param [Hash] opts the optional parameters # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers def update_payment_term_settings_with_http_info(body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SettingsApi.update_payment_term_settings ...' end # verify the required parameter 'body' is set if @api_client.config.client_side_validation && body.nil? fail ArgumentError, "Missing the required parameter 'body' when calling SettingsApi.update_payment_term_settings" end # resource path local_var_path = '/settings/paymentTerms' # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(body) auth_names = ['ApiKeyAuth'] 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) if @api_client.config.debugging @api_client.config.logger.debug "API called: SettingsApi#update_payment_term_settings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Update supported currencies # Update supported currencies for your tenant # @param [Hash] opts the optional parameters # @option opts [Array] :body # @return [nil] def update_supported_currencies(opts = {}) update_supported_currencies_with_http_info(opts) nil end # Update supported currencies # Update supported currencies for your tenant # @param [Hash] opts the optional parameters # @option opts [Array] :body # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers def update_supported_currencies_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SettingsApi.update_supported_currencies ...' end # resource path local_var_path = '/settings/supportedCurrencies' # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(opts[:'body']) auth_names = ['ApiKeyAuth'] 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) if @api_client.config.debugging @api_client.config.logger.debug "API called: SettingsApi#update_supported_currencies\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Update tax rate # Updates the specific tax rate object # @param id # @param [Hash] opts the optional parameters # @option opts [TaxRateJson] :body # @return [nil] def update_tax_rate(id, opts = {}) update_tax_rate_with_http_info(id, opts) nil end # Update tax rate # Updates the specific tax rate object # @param id # @param [Hash] opts the optional parameters # @option opts [TaxRateJson] :body # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers def update_tax_rate_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SettingsApi.update_tax_rate ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling SettingsApi.update_tax_rate" end # resource path local_var_path = '/taxrates/{id}'.sub('{' + 'id' + '}', id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(opts[:'body']) auth_names = ['ApiKeyAuth'] 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) if @api_client.config.debugging @api_client.config.logger.debug "API called: SettingsApi#update_tax_rate\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Update tenant details # Updates the details of the current tenant based on the input # @param [Hash] opts the optional parameters # @option opts [TenantJson] :body # @return [nil] def update_tenant(opts = {}) update_tenant_with_http_info(opts) nil end # Update tenant details # Updates the details of the current tenant based on the input # @param [Hash] opts the optional parameters # @option opts [TenantJson] :body # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers def update_tenant_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SettingsApi.update_tenant ...' end # resource path local_var_path = '/tenants' # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(opts[:'body']) auth_names = ['ApiKeyAuth'] 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) if @api_client.config.debugging @api_client.config.logger.debug "API called: SettingsApi#update_tenant\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Update tenant settings # Updates settings for your tenant. # @param body json representation of the settings # @param [Hash] opts the optional parameters # @return [nil] def update_tenant_setting(body, opts = {}) update_tenant_setting_with_http_info(body, opts) nil end # Update tenant settings # Updates settings for your tenant. # @param body json representation of the settings # @param [Hash] opts the optional parameters # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers def update_tenant_setting_with_http_info(body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SettingsApi.update_tenant_setting ...' end # verify the required parameter 'body' is set if @api_client.config.client_side_validation && body.nil? fail ArgumentError, "Missing the required parameter 'body' when calling SettingsApi.update_tenant_setting" end # resource path local_var_path = '/settings' # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(body) auth_names = ['ApiKeyAuth'] 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) if @api_client.config.debugging @api_client.config.logger.debug "API called: SettingsApi#update_tenant_setting\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Update predefined terms section # Updates the predefined terms section specified. # @param id # @param [Hash] opts the optional parameters # @option opts [DocumentSection] :body # @return [DocumentSection] def update_term_section(id, opts = {}) data, _status_code, _headers = update_term_section_with_http_info(id, opts) data end # Update predefined terms section # Updates the predefined terms section specified. # @param id # @param [Hash] opts the optional parameters # @option opts [DocumentSection] :body # @return [Array<(DocumentSection, Fixnum, Hash)>] DocumentSection data, response status code and response headers def update_term_section_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SettingsApi.update_term_section ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling SettingsApi.update_term_section" end # resource path local_var_path = '/termsections/{id}'.sub('{' + 'id' + '}', id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(opts[:'body']) auth_names = ['ApiKeyAuth'] 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 => 'DocumentSection') if @api_client.config.debugging @api_client.config.logger.debug "API called: SettingsApi#update_term_section\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Update unit of measure # Update the unit of measure by Id provided. # @param id # @param [Hash] opts the optional parameters # @option opts [UnitOfMeasureJson] :body # @return [UnitOfMeasureJson] def update_unit_of_measure(id, opts = {}) data, _status_code, _headers = update_unit_of_measure_with_http_info(id, opts) data end # Update unit of measure # Update the unit of measure by Id provided. # @param id # @param [Hash] opts the optional parameters # @option opts [UnitOfMeasureJson] :body # @return [Array<(UnitOfMeasureJson, Fixnum, Hash)>] UnitOfMeasureJson data, response status code and response headers def update_unit_of_measure_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SettingsApi.update_unit_of_measure ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling SettingsApi.update_unit_of_measure" end # resource path local_var_path = '/unitsOfMeasure/{id}'.sub('{' + 'id' + '}', id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(opts[:'body']) auth_names = ['ApiKeyAuth'] 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 => 'UnitOfMeasureJson') if @api_client.config.debugging @api_client.config.logger.debug "API called: SettingsApi#update_unit_of_measure\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Update tenant logo # Updates the logo used in external facing communication such as order forms and invoices # @param [Hash] opts the optional parameters # @option opts [File] :file # @return [TenantJson] def upload_tenant_logo(opts = {}) data, _status_code, _headers = upload_tenant_logo_with_http_info(opts) data end # Update tenant logo # Updates the logo used in external facing communication such as order forms and invoices # @param [Hash] opts the optional parameters # @option opts [File] :file # @return [Array<(TenantJson, Fixnum, Hash)>] TenantJson data, response status code and response headers def upload_tenant_logo_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: SettingsApi.upload_tenant_logo ...' end # resource path local_var_path = '/tenants/logo' # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data']) # form parameters form_params = {} form_params['file'] = opts[:'file'] if !opts[:'file'].nil? # http body (model) post_body = nil auth_names = ['ApiKeyAuth'] 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 => 'TenantJson') if @api_client.config.debugging @api_client.config.logger.debug "API called: SettingsApi#upload_tenant_logo\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end end end