Class: TreezorClient::BusinessApi
- Inherits:
-
Object
- Object
- TreezorClient::BusinessApi
- Defined in:
- lib/treezor_client/api/business_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#businessinformations_get(country, opts = {}) ⇒ InlineResponse2004
get business information The get business information endpoint returns all already known business information.
-
#businessinformations_get_with_http_info(country, opts = {}) ⇒ Array<(InlineResponse2004, Fixnum, Hash)>
get business information The get business information endpoint returns all already known business information.
-
#businesssearchs_get(country, opts = {}) ⇒ Array<Object>
search businesses The search endpoint returns some business information.
-
#businesssearchs_get_with_http_info(country, opts = {}) ⇒ Array<(Array<Object>, Fixnum, Hash)>
search businesses The search endpoint returns some business information.
-
#initialize(api_client = ApiClient.default) ⇒ BusinessApi
constructor
A new instance of BusinessApi.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ BusinessApi
Returns a new instance of BusinessApi.
19 20 21 |
# File 'lib/treezor_client/api/business_api.rb', line 19 def initialize(api_client = ApiClient.default) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
17 18 19 |
# File 'lib/treezor_client/api/business_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#businessinformations_get(country, opts = {}) ⇒ InlineResponse2004
get business information The get business information endpoint returns all already known business information. End user will have then to verify/correct it.
34 35 36 37 |
# File 'lib/treezor_client/api/business_api.rb', line 34 def businessinformations_get(country, opts = {}) data, _status_code, _headers = businessinformations_get_with_http_info(country, opts) data end |
#businessinformations_get_with_http_info(country, opts = {}) ⇒ Array<(InlineResponse2004, Fixnum, Hash)>
get business information The get business information endpoint returns all already known business information. End user will have then to verify/correct it.
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 86 87 88 89 90 91 92 93 |
# File 'lib/treezor_client/api/business_api.rb', line 51 def businessinformations_get_with_http_info(country, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: BusinessApi.businessinformations_get ...' end # verify the required parameter 'country' is set if @api_client.config.client_side_validation && country.nil? fail ArgumentError, "Missing the required parameter 'country' when calling BusinessApi.businessinformations_get" end # resource path local_var_path = '/businessinformations' # query parameters query_params = {} query_params[:'country'] = country query_params[:'accessSignature'] = opts[:'access_signature'] if !opts[:'access_signature'].nil? query_params[:'accessTag'] = opts[:'access_tag'] if !opts[:'access_tag'].nil? query_params[:'accessUserId'] = opts[:'access_user_id'] if !opts[:'access_user_id'].nil? query_params[:'accessUserIp'] = opts[:'access_user_ip'] if !opts[:'access_user_ip'].nil? query_params[:'externalId'] = opts[:'external_id'] if !opts[:'external_id'].nil? query_params[:'registrationNumber'] = opts[:'registration_number'] if !opts[:'registration_number'].nil? query_params[:'vatNumber'] = opts[:'vat_number'] if !opts[:'vat_number'].nil? # header parameters header_params = {} # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['api_key'] 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 => 'InlineResponse2004') if @api_client.config.debugging @api_client.config.logger.debug "API called: BusinessApi#businessinformations_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#businesssearchs_get(country, opts = {}) ⇒ Array<Object>
search businesses The search endpoint returns some business information.
112 113 114 115 |
# File 'lib/treezor_client/api/business_api.rb', line 112 def businesssearchs_get(country, opts = {}) data, _status_code, _headers = businesssearchs_get_with_http_info(country, opts) data end |
#businesssearchs_get_with_http_info(country, opts = {}) ⇒ Array<(Array<Object>, Fixnum, Hash)>
search businesses The search endpoint returns some business information.
135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 |
# File 'lib/treezor_client/api/business_api.rb', line 135 def businesssearchs_get_with_http_info(country, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: BusinessApi.businesssearchs_get ...' end # verify the required parameter 'country' is set if @api_client.config.client_side_validation && country.nil? fail ArgumentError, "Missing the required parameter 'country' when calling BusinessApi.businesssearchs_get" end # resource path local_var_path = '/businesssearchs' # query parameters query_params = {} query_params[:'country'] = country query_params[:'accessSignature'] = opts[:'access_signature'] if !opts[:'access_signature'].nil? query_params[:'accessTag'] = opts[:'access_tag'] if !opts[:'access_tag'].nil? query_params[:'accessUserId'] = opts[:'access_user_id'] if !opts[:'access_user_id'].nil? query_params[:'accessUserIp'] = opts[:'access_user_ip'] if !opts[:'access_user_ip'].nil? query_params[:'nameExact'] = opts[:'name_exact'] if !opts[:'name_exact'].nil? query_params[:'nameMatchBeginning'] = opts[:'name_match_beginning'] if !opts[:'name_match_beginning'].nil? query_params[:'nameClosestKeywords'] = opts[:'name_closest_keywords'] if !opts[:'name_closest_keywords'].nil? query_params[:'registrationNumber'] = opts[:'registration_number'] if !opts[:'registration_number'].nil? query_params[:'vatNumber'] = opts[:'vat_number'] if !opts[:'vat_number'].nil? query_params[:'phoneNumber'] = opts[:'phone_number'] if !opts[:'phone_number'].nil? query_params[:'addressStreet'] = opts[:'address_street'] if !opts[:'address_street'].nil? query_params[:'addressCity'] = opts[:'address_city'] if !opts[:'address_city'].nil? query_params[:'addressPostalCode'] = opts[:'address_postal_code'] if !opts[:'address_postal_code'].nil? # header parameters header_params = {} # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['api_key'] 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 => 'Array<Object>') if @api_client.config.debugging @api_client.config.logger.debug "API called: BusinessApi#businesssearchs_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |