=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 DefaultApi attr_accessor :api_client def initialize(api_client = ApiClient.default) @api_client = api_client end # Apply a payment on a specific invoice # Apply a payment per the specified parameters. # @param body add and apply payment parameters in json # @param [Hash] opts the optional parameters # @return [nil] def add_and_apply_payment(body, opts = {}) add_and_apply_payment_with_http_info(body, opts) nil end # Apply a payment on a specific invoice # Apply a payment per the specified parameters. # @param body add and apply payment parameters in json # @param [Hash] opts the optional parameters # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers def add_and_apply_payment_with_http_info(body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.add_and_apply_payment ...' 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 DefaultApi.add_and_apply_payment" end # resource path local_var_path = '/settlements/addAndApplyPayment' # 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(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) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#add_and_apply_payment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # @param id # @param [Hash] opts the optional parameters # @return [nil] def get_order_document(id, opts = {}) get_order_document_with_http_info(id, opts) nil end # @param id # @param [Hash] opts the optional parameters # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers def get_order_document_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.get_order_document ...' 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 DefaultApi.get_order_document" end # resource path local_var_path = '/documentLinks/{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(['text/html', '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: DefaultApi#get_order_document\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Validate an address with Anrok # # @param [Hash] opts the optional parameters # @option opts [AccountAddress] :body Address input as a JSON # @return [AccountAddress] def validate_address(opts = {}) data, _status_code, _headers = validate_address_with_http_info(opts) data end # Validate an address with Anrok # # @param [Hash] opts the optional parameters # @option opts [AccountAddress] :body Address input as a JSON # @return [Array<(AccountAddress, Fixnum, Hash)>] AccountAddress data, response status code and response headers def validate_address_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.validate_address ...' end # resource path local_var_path = '/anrok/validate' # 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 => 'AccountAddress') if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#validate_address\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Validate an address with TaxJar # Returns a suggested addresses if found # @param [Hash] opts the optional parameters # @option opts [AccountAddress] :body Address input as a JSON # @return [AccountAddress] def validate_address1(opts = {}) data, _status_code, _headers = validate_address1_with_http_info(opts) data end # Validate an address with TaxJar # Returns a suggested addresses if found # @param [Hash] opts the optional parameters # @option opts [AccountAddress] :body Address input as a JSON # @return [Array<(AccountAddress, Fixnum, Hash)>] AccountAddress data, response status code and response headers def validate_address1_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.validate_address1 ...' end # resource path local_var_path = '/taxjar/validate' # 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 => 'AccountAddress') if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#validate_address1\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end end end