Class: Trulioo::BusinessApi
- Inherits:
-
Object
- Object
- Trulioo::BusinessApi
- Defined in:
- lib/trulioo_sdk/api/business_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#get_business_search_result(mode, id, opts = {}) ⇒ BusinessSearchResponse
Get Business Search Result returns the a business search result.
-
#get_business_search_result_with_http_info(mode, id, opts = {}) ⇒ Array<(BusinessSearchResponse, Integer, Hash)>
Get Business Search Result returns the a business search result.
-
#initialize(api_client = ApiClient.default) ⇒ BusinessApi
constructor
A new instance of BusinessApi.
-
#search(mode, business_search_request, opts = {}) ⇒ BusinessSearchResponse
Search Calling this method will perform a business search.
-
#search_with_http_info(mode, business_search_request, opts = {}) ⇒ Array<(BusinessSearchResponse, Integer, Hash)>
Search Calling this method will perform a business search.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ BusinessApi
Returns a new instance of BusinessApi.
15 16 17 |
# File 'lib/trulioo_sdk/api/business_api.rb', line 15 def initialize(api_client = ApiClient.default) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
13 14 15 |
# File 'lib/trulioo_sdk/api/business_api.rb', line 13 def api_client @api_client end |
Instance Method Details
#get_business_search_result(mode, id, opts = {}) ⇒ BusinessSearchResponse
Get Business Search Result returns the a business search result.
24 25 26 27 |
# File 'lib/trulioo_sdk/api/business_api.rb', line 24 def get_business_search_result(mode, id, opts = {}) data, _status_code, _headers = get_business_search_result_with_http_info(mode, id, opts) data end |
#get_business_search_result_with_http_info(mode, id, opts = {}) ⇒ Array<(BusinessSearchResponse, Integer, Hash)>
Get Business Search Result returns the a business search result.
35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 |
# File 'lib/trulioo_sdk/api/business_api.rb', line 35 def get_business_search_result_with_http_info(mode, id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: BusinessApi.get_business_search_result ...' end # verify the required parameter 'mode' is set if @api_client.config.client_side_validation && mode.nil? fail ArgumentError, "Missing the required parameter 'mode' when calling BusinessApi.get_business_search_result" 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 BusinessApi.get_business_search_result" end # resource path local_var_path = '/{mode}/business/v1/search/transactionrecord/{id}'.sub('{' + 'mode' + '}', CGI.escape(mode.to_s).gsub('+', '%20')).sub('{' + 'id' + '}', CGI.escape(id.to_s).gsub('+', '%20')) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'BusinessSearchResponse' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKeyAuth'] = opts.merge( :operation => :"BusinessApi.get_business_search_result", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: BusinessApi#get_business_search_result\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#search(mode, business_search_request, opts = {}) ⇒ BusinessSearchResponse
Search Calling this method will perform a business search.
93 94 95 96 |
# File 'lib/trulioo_sdk/api/business_api.rb', line 93 def search(mode, business_search_request, opts = {}) data, _status_code, _headers = search_with_http_info(mode, business_search_request, opts) data end |
#search_with_http_info(mode, business_search_request, opts = {}) ⇒ Array<(BusinessSearchResponse, Integer, Hash)>
Search Calling this method will perform a business search.
104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 |
# File 'lib/trulioo_sdk/api/business_api.rb', line 104 def search_with_http_info(mode, business_search_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: BusinessApi.search ...' end # verify the required parameter 'mode' is set if @api_client.config.client_side_validation && mode.nil? fail ArgumentError, "Missing the required parameter 'mode' when calling BusinessApi.search" end # verify the required parameter 'business_search_request' is set if @api_client.config.client_side_validation && business_search_request.nil? fail ArgumentError, "Missing the required parameter 'business_search_request' when calling BusinessApi.search" end # resource path local_var_path = '/{mode}/business/v1/search'.sub('{' + 'mode' + '}', CGI.escape(mode.to_s).gsub('+', '%20')) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'text/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(business_search_request) # return_type return_type = opts[:debug_return_type] || 'BusinessSearchResponse' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKeyAuth'] = opts.merge( :operation => :"BusinessApi.search", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: BusinessApi#search\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |