Class: TreezorClient::UserApi
- Inherits:
-
Object
- Object
- TreezorClient::UserApi
- Defined in:
- lib/treezor_client/api/user_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#delete_user(id, origin, opts = {}) ⇒ InlineResponse20024
delete a user Change user’s status to CANCELED.
-
#delete_user_with_http_info(id, origin, opts = {}) ⇒ Array<(InlineResponse20024, Fixnum, Hash)>
delete a user Change user's status to CANCELED.
-
#get_user(id, opts = {}) ⇒ InlineResponse20024
get an user Get user’s information for given user’s id.
-
#get_user_with_http_info(id, opts = {}) ⇒ Array<(InlineResponse20024, Fixnum, Hash)>
get an user Get user's information for given user's id.
-
#get_users(opts = {}) ⇒ InlineResponse20024
search users Get users from the system.
-
#get_users_with_http_info(opts = {}) ⇒ Array<(InlineResponse20024, Fixnum, Hash)>
search users Get users from the system.
-
#initialize(api_client = ApiClient.default) ⇒ UserApi
constructor
A new instance of UserApi.
-
#put_user(id, opts = {}) ⇒ InlineResponse20024
update a user Update user’s information.
-
#put_user_with_http_info(id, opts = {}) ⇒ Array<(InlineResponse20024, Fixnum, Hash)>
update a user Update user's information.
-
#put_users(email, opts = {}) ⇒ InlineResponse20024
create user Create a new user in the system.
-
#put_users_with_http_info(email, opts = {}) ⇒ Array<(InlineResponse20024, Fixnum, Hash)>
create user Create a new user in the system.
-
#users_id_kycreview_put(id, opts = {}) ⇒ InlineResponse20024
review user information Perform a KYC review for given user.
-
#users_id_kycreview_put_with_http_info(id, opts = {}) ⇒ Array<(InlineResponse20024, Fixnum, Hash)>
review user information Perform a KYC review for given user.
Constructor Details
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
17 18 19 |
# File 'lib/treezor_client/api/user_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#delete_user(id, origin, opts = {}) ⇒ InlineResponse20024
delete a user Change user’s status to CANCELED.
33 34 35 36 |
# File 'lib/treezor_client/api/user_api.rb', line 33 def delete_user(id, origin, opts = {}) data, _status_code, _headers = delete_user_with_http_info(id, origin, opts) return data end |
#delete_user_with_http_info(id, origin, opts = {}) ⇒ Array<(InlineResponse20024, Fixnum, Hash)>
delete a user Change user's status to CANCELED.
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 86 87 88 89 90 91 92 93 94 95 |
# File 'lib/treezor_client/api/user_api.rb', line 48 def delete_user_with_http_info(id, origin, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: UserApi.delete_user ..." 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 UserApi.delete_user" end # verify the required parameter 'origin' is set if @api_client.config.client_side_validation && origin.nil? fail ArgumentError, "Missing the required parameter 'origin' when calling UserApi.delete_user" end # resource path local_var_path = "/users/{id}".sub('{' + 'id' + '}', id.to_s) # query parameters query_params = {} query_params[:'origin'] = origin 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? # 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 = nil auth_names = ['api_key'] 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 => 'InlineResponse20024') if @api_client.config.debugging @api_client.config.logger.debug "API called: UserApi#delete_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_user(id, opts = {}) ⇒ InlineResponse20024
get an user Get user’s information for given user’s id.
106 107 108 109 |
# File 'lib/treezor_client/api/user_api.rb', line 106 def get_user(id, opts = {}) data, _status_code, _headers = get_user_with_http_info(id, opts) return data end |
#get_user_with_http_info(id, opts = {}) ⇒ Array<(InlineResponse20024, Fixnum, Hash)>
get an user Get user's information for given user's id.
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 157 158 159 160 161 162 |
# File 'lib/treezor_client/api/user_api.rb', line 120 def get_user_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: UserApi.get_user ..." 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 UserApi.get_user" end # resource path local_var_path = "/users/{id}".sub('{' + 'id' + '}', id.to_s) # query parameters query_params = {} 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? # 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 = 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 => 'InlineResponse20024') if @api_client.config.debugging @api_client.config.logger.debug "API called: UserApi#get_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_users(opts = {}) ⇒ InlineResponse20024
search users Get users from the system.
188 189 190 191 |
# File 'lib/treezor_client/api/user_api.rb', line 188 def get_users(opts = {}) data, _status_code, _headers = get_users_with_http_info(opts) return data end |
#get_users_with_http_info(opts = {}) ⇒ Array<(InlineResponse20024, Fixnum, Hash)>
search users Get users from the system.
217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 |
# File 'lib/treezor_client/api/user_api.rb', line 217 def get_users_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: UserApi.get_users ..." end # resource path local_var_path = "/users" # query parameters query_params = {} 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[:'userId'] = opts[:'user_id'] if !opts[:'user_id'].nil? query_params[:'userTypeId'] = opts[:'user_type_id'] if !opts[:'user_type_id'].nil? query_params[:'userStatus'] = opts[:'user_status'] if !opts[:'user_status'].nil? query_params[:'userTag'] = opts[:'user_tag'] if !opts[:'user_tag'].nil? query_params[:'email'] = opts[:'email'] if !opts[:'email'].nil? query_params[:'name'] = opts[:'name'] if !opts[:'name'].nil? query_params[:'legalName'] = opts[:'legal_name'] if !opts[:'legal_name'].nil? query_params[:'parentUserId'] = opts[:'parent_user_id'] if !opts[:'parent_user_id'].nil? query_params[:'pageNumber'] = opts[:'page_number'] if !opts[:'page_number'].nil? query_params[:'pageCount'] = opts[:'page_count'] if !opts[:'page_count'].nil? query_params[:'sortBy'] = opts[:'sort_by'] if !opts[:'sort_by'].nil? query_params[:'sortOrder'] = opts[:'sort_order'] if !opts[:'sort_order'].nil? query_params[:'createdDateFrom'] = opts[:'created_date_from'] if !opts[:'created_date_from'].nil? query_params[:'createdDateTo'] = opts[:'created_date_to'] if !opts[:'created_date_to'].nil? query_params[:'updatedDateFrom'] = opts[:'updated_date_from'] if !opts[:'updated_date_from'].nil? query_params[:'updatedDateTo'] = opts[:'updated_date_to'] if !opts[:'updated_date_to'].nil? # 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 = 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 => 'InlineResponse20024') if @api_client.config.debugging @api_client.config.logger.debug "API called: UserApi#get_users\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#put_user(id, opts = {}) ⇒ InlineResponse20024
update a user Update user’s information.
319 320 321 322 |
# File 'lib/treezor_client/api/user_api.rb', line 319 def put_user(id, opts = {}) data, _status_code, _headers = put_user_with_http_info(id, opts) return data end |
#put_user_with_http_info(id, opts = {}) ⇒ Array<(InlineResponse20024, Fixnum, Hash)>
update a user Update user's information.
370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 |
# File 'lib/treezor_client/api/user_api.rb', line 370 def put_user_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: UserApi.put_user ..." 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 UserApi.put_user" end if @api_client.config.client_side_validation && opts[:'income_range'] && !['0-18', '19-23', '24-27', '28-35', '36-56', '57-*'].include?(opts[:'income_range']) fail ArgumentError, 'invalid value for "income_range", must be one of 0-18, 19-23, 24-27, 28-35, 36-56, 57-*' end if @api_client.config.client_side_validation && opts[:'legal_form'] && !['1000', '1100', '1200', '1300', '1400', '1500', '1600', '1700', '1800', '1900', '2110', '2120', '2210', '2220', '2310', '2320', '2385', '2400', '2700', '2900', '3110', '3120', '3205', '3210', '3220', '3290', '4110', '4120', '4130', '4140', '4150', '4160', '5191', '5192', '5193', '5194', '5195', '5196', '5202', '5203', '5306', '5307', '5308', '5309', '5385', '5410', '5415', '5422', '5426', '5430', '5431', '5432', '5442', '5443', '5451', '5453', '5454', '5455', '5458', '5459', '5460', '5485', '5498', '5499', '5505', '5510', '5515', '5520', '5522', '5525', '5530', '5531', '5532', '5542', '5543', '5546', '5547', '5548', '5551', '5552', '5553', '5554', '5555', '5558', '5559', '5560', '5585', '5599', '5605', '5610', '5615', '5620', '5622', '5625', '5630', '5631', '5632', '5642', '5643', '5646', '5647', '5648', '5651', '5652', '5653', '5654', '5655', '5658', '5659', '5660', '5685', '5699', '5710', '5720', '5785', '5800', '6100', '6210', '6220', '6316', '6317', '6318', '6411', '6521', '6532', '6533', '6534', '6535', '6536', '6537', '6538', '6539', '6540', '6541', '6542', '6543', '6544', '6551', '6554', '6558', '6560', '6561', '6562', '6563', '6564', '6565', '6566', '6567', '6568', '6569', '6571', '6572', '6573', '6574', '6575', '6576', '6577', '6578', '6585', '6588', '6589', '6595', '6596', '6597', '6598', '6599', '6901', '7111', '7112', '7113', '7120', '7150', '7160', '7171', '7172', '7179', '7190', '7210', '7220', '7225', '7229', '7230', '7312', '7313', '7314', '7321', '7322', '7323', '7331', '7340', '7341', '7342', '7343', '7344', '7345', '7346', '7347', '7348', '7349', '7351', '7352', '7353', '7354', '7355', '7356', '7361', '7362', '7363', '7364', '7365', '7366', '7371', '7372', '7373', '7378', '7379', '7381', '7382', '7383', '7384', '7385', '7389', '7410', '7430', '7450', '7470', '7490', '8110', '8120', '8130', '8140', '8150', '8160', '8170', '8190', '8210', '8250', '8290', '8310', '8311', '8410', '8420', '8450', '8470', '8490', '8510', '8520', '9110', '9150', '9210', '9220', '9221', '9222', '9223', '9224', '9230', '9240', '9260', '9300', '9900', '9970'].include?(opts[:'legal_form']) fail ArgumentError, 'invalid value for "legal_form", must be one of 1000, 1100, 1200, 1300, 1400, 1500, 1600, 1700, 1800, 1900, 2110, 2120, 2210, 2220, 2310, 2320, 2385, 2400, 2700, 2900, 3110, 3120, 3205, 3210, 3220, 3290, 4110, 4120, 4130, 4140, 4150, 4160, 5191, 5192, 5193, 5194, 5195, 5196, 5202, 5203, 5306, 5307, 5308, 5309, 5385, 5410, 5415, 5422, 5426, 5430, 5431, 5432, 5442, 5443, 5451, 5453, 5454, 5455, 5458, 5459, 5460, 5485, 5498, 5499, 5505, 5510, 5515, 5520, 5522, 5525, 5530, 5531, 5532, 5542, 5543, 5546, 5547, 5548, 5551, 5552, 5553, 5554, 5555, 5558, 5559, 5560, 5585, 5599, 5605, 5610, 5615, 5620, 5622, 5625, 5630, 5631, 5632, 5642, 5643, 5646, 5647, 5648, 5651, 5652, 5653, 5654, 5655, 5658, 5659, 5660, 5685, 5699, 5710, 5720, 5785, 5800, 6100, 6210, 6220, 6316, 6317, 6318, 6411, 6521, 6532, 6533, 6534, 6535, 6536, 6537, 6538, 6539, 6540, 6541, 6542, 6543, 6544, 6551, 6554, 6558, 6560, 6561, 6562, 6563, 6564, 6565, 6566, 6567, 6568, 6569, 6571, 6572, 6573, 6574, 6575, 6576, 6577, 6578, 6585, 6588, 6589, 6595, 6596, 6597, 6598, 6599, 6901, 7111, 7112, 7113, 7120, 7150, 7160, 7171, 7172, 7179, 7190, 7210, 7220, 7225, 7229, 7230, 7312, 7313, 7314, 7321, 7322, 7323, 7331, 7340, 7341, 7342, 7343, 7344, 7345, 7346, 7347, 7348, 7349, 7351, 7352, 7353, 7354, 7355, 7356, 7361, 7362, 7363, 7364, 7365, 7366, 7371, 7372, 7373, 7378, 7379, 7381, 7382, 7383, 7384, 7385, 7389, 7410, 7430, 7450, 7470, 7490, 8110, 8120, 8130, 8140, 8150, 8160, 8170, 8190, 8210, 8250, 8290, 8310, 8311, 8410, 8420, 8450, 8470, 8490, 8510, 8520, 9110, 9150, 9210, 9220, 9221, 9222, 9223, 9224, 9230, 9240, 9260, 9300, 9900, 9970' end if @api_client.config.client_side_validation && opts[:'legal_annual_turn_over'] && !['0-39', '40-99', '100-249', '250-999', '1000-2999', '3000-9999', '10000-99999', '100000-*'].include?(opts[:'legal_annual_turn_over']) fail ArgumentError, 'invalid value for "legal_annual_turn_over", must be one of 0-39, 40-99, 100-249, 250-999, 1000-2999, 3000-9999, 10000-99999, 100000-*' end if @api_client.config.client_side_validation && opts[:'legal_net_income_range'] && !['0-4', '5-9', '10-49', '50-149', '150-499', '500-*'].include?(opts[:'legal_net_income_range']) fail ArgumentError, 'invalid value for "legal_net_income_range", must be one of 0-4, 5-9, 10-49, 50-149, 150-499, 500-*' end if @api_client.config.client_side_validation && opts[:'legal_number_of_employee_range'] && !['0', '1-9', '10-99', '100-249', '250-*'].include?(opts[:'legal_number_of_employee_range']) fail ArgumentError, 'invalid value for "legal_number_of_employee_range", must be one of 0, 1-9, 10-99, 100-249, 250-*' end if @api_client.config.client_side_validation && opts[:'personal_assets'] && !['0-2', '3-22', '23-128', '129-319', '320-464', '465-'].include?(opts[:'personal_assets']) fail ArgumentError, 'invalid value for "personal_assets", must be one of 0-2, 3-22, 23-128, 129-319, 320-464, 465-' end # resource path local_var_path = "/users/{id}".sub('{' + 'id' + '}', id.to_s) # query parameters query_params = {} 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[:'userTag'] = opts[:'user_tag'] if !opts[:'user_tag'].nil? query_params[:'title'] = opts[:'title'] if !opts[:'title'].nil? query_params[:'firstname'] = opts[:'firstname'] if !opts[:'firstname'].nil? query_params[:'lastname'] = opts[:'lastname'] if !opts[:'lastname'].nil? query_params[:'middleNames'] = opts[:'middle_names'] if !opts[:'middle_names'].nil? query_params[:'birthday'] = opts[:'birthday'] if !opts[:'birthday'].nil? query_params[:'email'] = opts[:'email'] if !opts[:'email'].nil? query_params[:'address1'] = opts[:'address1'] if !opts[:'address1'].nil? query_params[:'address2'] = opts[:'address2'] if !opts[:'address2'].nil? query_params[:'postcode'] = opts[:'postcode'] if !opts[:'postcode'].nil? query_params[:'city'] = opts[:'city'] if !opts[:'city'].nil? query_params[:'state'] = opts[:'state'] if !opts[:'state'].nil? query_params[:'country'] = opts[:'country'] if !opts[:'country'].nil? query_params[:'phone'] = opts[:'phone'] if !opts[:'phone'].nil? query_params[:'mobile'] = opts[:'mobile'] if !opts[:'mobile'].nil? query_params[:'nationality'] = opts[:'nationality'] if !opts[:'nationality'].nil? query_params[:'nationalityOther'] = opts[:'nationality_other'] if !opts[:'nationality_other'].nil? query_params[:'placeOfBirth'] = opts[:'place_of_birth'] if !opts[:'place_of_birth'].nil? query_params[:'birthCountry'] = opts[:'birth_country'] if !opts[:'birth_country'].nil? query_params[:'occupation'] = opts[:'occupation'] if !opts[:'occupation'].nil? query_params[:'incomeRange'] = opts[:'income_range'] if !opts[:'income_range'].nil? query_params[:'legalName'] = opts[:'legal_name'] if !opts[:'legal_name'].nil? query_params[:'legalRegistrationNumber'] = opts[:'legal_registration_number'] if !opts[:'legal_registration_number'].nil? query_params[:'legalTvaNumber'] = opts[:'legal_tva_number'] if !opts[:'legal_tva_number'].nil? query_params[:'legalRegistrationDate'] = opts[:'legal_registration_date'] if !opts[:'legal_registration_date'].nil? query_params[:'legalForm'] = opts[:'legal_form'] if !opts[:'legal_form'].nil? query_params[:'legalShareCapital'] = opts[:'legal_share_capital'] if !opts[:'legal_share_capital'].nil? query_params[:'legalSector'] = opts[:'legal_sector'] if !opts[:'legal_sector'].nil? query_params[:'legalAnnualTurnOver'] = opts[:'legal_annual_turn_over'] if !opts[:'legal_annual_turn_over'].nil? query_params[:'legalNetIncomeRange'] = opts[:'legal_net_income_range'] if !opts[:'legal_net_income_range'].nil? query_params[:'legalNumberOfEmployeeRange'] = opts[:'legal_number_of_employee_range'] if !opts[:'legal_number_of_employee_range'].nil? query_params[:'effectiveBeneficiary'] = opts[:'effective_beneficiary'] if !opts[:'effective_beneficiary'].nil? query_params[:'language'] = opts[:'language'] if !opts[:'language'].nil? query_params[:'taxNumber'] = opts[:'tax_number'] if !opts[:'tax_number'].nil? query_params[:'taxResidence'] = opts[:'tax_residence'] if !opts[:'tax_residence'].nil? query_params[:'position'] = opts[:'position'] if !opts[:'position'].nil? query_params[:'personalAssets'] = opts[:'personal_assets'] if !opts[:'personal_assets'].nil? # 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 = nil auth_names = ['api_key'] 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 => 'InlineResponse20024') if @api_client.config.debugging @api_client.config.logger.debug "API called: UserApi#put_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#put_users(email, opts = {}) ⇒ InlineResponse20024
create user Create a new user in the system.
517 518 519 520 |
# File 'lib/treezor_client/api/user_api.rb', line 517 def put_users(email, opts = {}) data, _status_code, _headers = put_users_with_http_info(email, opts) return data end |
#put_users_with_http_info(email, opts = {}) ⇒ Array<(InlineResponse20024, Fixnum, Hash)>
create user Create a new user in the system.
570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 |
# File 'lib/treezor_client/api/user_api.rb', line 570 def put_users_with_http_info(email, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: UserApi.put_users ..." end # verify the required parameter 'email' is set if @api_client.config.client_side_validation && email.nil? fail ArgumentError, "Missing the required parameter 'email' when calling UserApi.put_users" end if @api_client.config.client_side_validation && opts[:'income_range'] && !['0-18', '19-23', '24-27', '28-35', '36-56', '57-*'].include?(opts[:'income_range']) fail ArgumentError, 'invalid value for "income_range", must be one of 0-18, 19-23, 24-27, 28-35, 36-56, 57-*' end if @api_client.config.client_side_validation && opts[:'legal_form'] && !['1000', '1100', '1200', '1300', '1400', '1500', '1600', '1700', '1800', '1900', '2110', '2120', '2210', '2220', '2310', '2320', '2385', '2400', '2700', '2900', '3110', '3120', '3205', '3210', '3220', '3290', '4110', '4120', '4130', '4140', '4150', '4160', '5191', '5192', '5193', '5194', '5195', '5196', '5202', '5203', '5306', '5307', '5308', '5309', '5385', '5410', '5415', '5422', '5426', '5430', '5431', '5432', '5442', '5443', '5451', '5453', '5454', '5455', '5458', '5459', '5460', '5485', '5498', '5499', '5505', '5510', '5515', '5520', '5522', '5525', '5530', '5531', '5532', '5542', '5543', '5546', '5547', '5548', '5551', '5552', '5553', '5554', '5555', '5558', '5559', '5560', '5585', '5599', '5605', '5610', '5615', '5620', '5622', '5625', '5630', '5631', '5632', '5642', '5643', '5646', '5647', '5648', '5651', '5652', '5653', '5654', '5655', '5658', '5659', '5660', '5685', '5699', '5710', '5720', '5785', '5800', '6100', '6210', '6220', '6316', '6317', '6318', '6411', '6521', '6532', '6533', '6534', '6535', '6536', '6537', '6538', '6539', '6540', '6541', '6542', '6543', '6544', '6551', '6554', '6558', '6560', '6561', '6562', '6563', '6564', '6565', '6566', '6567', '6568', '6569', '6571', '6572', '6573', '6574', '6575', '6576', '6577', '6578', '6585', '6588', '6589', '6595', '6596', '6597', '6598', '6599', '6901', '7111', '7112', '7113', '7120', '7150', '7160', '7171', '7172', '7179', '7190', '7210', '7220', '7225', '7229', '7230', '7312', '7313', '7314', '7321', '7322', '7323', '7331', '7340', '7341', '7342', '7343', '7344', '7345', '7346', '7347', '7348', '7349', '7351', '7352', '7353', '7354', '7355', '7356', '7361', '7362', '7363', '7364', '7365', '7366', '7371', '7372', '7373', '7378', '7379', '7381', '7382', '7383', '7384', '7385', '7389', '7410', '7430', '7450', '7470', '7490', '8110', '8120', '8130', '8140', '8150', '8160', '8170', '8190', '8210', '8250', '8290', '8310', '8311', '8410', '8420', '8450', '8470', '8490', '8510', '8520', '9110', '9150', '9210', '9220', '9221', '9222', '9223', '9224', '9230', '9240', '9260', '9300', '9900', '9970'].include?(opts[:'legal_form']) fail ArgumentError, 'invalid value for "legal_form", must be one of 1000, 1100, 1200, 1300, 1400, 1500, 1600, 1700, 1800, 1900, 2110, 2120, 2210, 2220, 2310, 2320, 2385, 2400, 2700, 2900, 3110, 3120, 3205, 3210, 3220, 3290, 4110, 4120, 4130, 4140, 4150, 4160, 5191, 5192, 5193, 5194, 5195, 5196, 5202, 5203, 5306, 5307, 5308, 5309, 5385, 5410, 5415, 5422, 5426, 5430, 5431, 5432, 5442, 5443, 5451, 5453, 5454, 5455, 5458, 5459, 5460, 5485, 5498, 5499, 5505, 5510, 5515, 5520, 5522, 5525, 5530, 5531, 5532, 5542, 5543, 5546, 5547, 5548, 5551, 5552, 5553, 5554, 5555, 5558, 5559, 5560, 5585, 5599, 5605, 5610, 5615, 5620, 5622, 5625, 5630, 5631, 5632, 5642, 5643, 5646, 5647, 5648, 5651, 5652, 5653, 5654, 5655, 5658, 5659, 5660, 5685, 5699, 5710, 5720, 5785, 5800, 6100, 6210, 6220, 6316, 6317, 6318, 6411, 6521, 6532, 6533, 6534, 6535, 6536, 6537, 6538, 6539, 6540, 6541, 6542, 6543, 6544, 6551, 6554, 6558, 6560, 6561, 6562, 6563, 6564, 6565, 6566, 6567, 6568, 6569, 6571, 6572, 6573, 6574, 6575, 6576, 6577, 6578, 6585, 6588, 6589, 6595, 6596, 6597, 6598, 6599, 6901, 7111, 7112, 7113, 7120, 7150, 7160, 7171, 7172, 7179, 7190, 7210, 7220, 7225, 7229, 7230, 7312, 7313, 7314, 7321, 7322, 7323, 7331, 7340, 7341, 7342, 7343, 7344, 7345, 7346, 7347, 7348, 7349, 7351, 7352, 7353, 7354, 7355, 7356, 7361, 7362, 7363, 7364, 7365, 7366, 7371, 7372, 7373, 7378, 7379, 7381, 7382, 7383, 7384, 7385, 7389, 7410, 7430, 7450, 7470, 7490, 8110, 8120, 8130, 8140, 8150, 8160, 8170, 8190, 8210, 8250, 8290, 8310, 8311, 8410, 8420, 8450, 8470, 8490, 8510, 8520, 9110, 9150, 9210, 9220, 9221, 9222, 9223, 9224, 9230, 9240, 9260, 9300, 9900, 9970' end if @api_client.config.client_side_validation && opts[:'legal_annual_turn_over'] && !['0-39', '40-99', '100-249', '250-999', '1000-2999', '3000-9999', '10000-99999', '100000-*'].include?(opts[:'legal_annual_turn_over']) fail ArgumentError, 'invalid value for "legal_annual_turn_over", must be one of 0-39, 40-99, 100-249, 250-999, 1000-2999, 3000-9999, 10000-99999, 100000-*' end if @api_client.config.client_side_validation && opts[:'legal_net_income_range'] && !['0-4', '5-9', '10-49', '50-149', '150-499', '500-*'].include?(opts[:'legal_net_income_range']) fail ArgumentError, 'invalid value for "legal_net_income_range", must be one of 0-4, 5-9, 10-49, 50-149, 150-499, 500-*' end if @api_client.config.client_side_validation && opts[:'legal_number_of_employee_range'] && !['0', '1-9', '10-99', '100-249', '250-*'].include?(opts[:'legal_number_of_employee_range']) fail ArgumentError, 'invalid value for "legal_number_of_employee_range", must be one of 0, 1-9, 10-99, 100-249, 250-*' end if @api_client.config.client_side_validation && opts[:'personal_assets'] && !['0-2', '3-22', '23-128', '129-319', '320-464', '465-'].include?(opts[:'personal_assets']) fail ArgumentError, 'invalid value for "personal_assets", must be one of 0-2, 3-22, 23-128, 129-319, 320-464, 465-' end # resource path local_var_path = "/users" # query parameters query_params = {} query_params[:'email'] = email 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[:'userTypeId'] = opts[:'user_type_id'] if !opts[:'user_type_id'].nil? query_params[:'userTag'] = opts[:'user_tag'] if !opts[:'user_tag'].nil? query_params[:'parentUserId'] = opts[:'parent_user_id'] if !opts[:'parent_user_id'].nil? query_params[:'parentType'] = opts[:'parent_type'] if !opts[:'parent_type'].nil? query_params[:'title'] = opts[:'title'] if !opts[:'title'].nil? query_params[:'firstname'] = opts[:'firstname'] if !opts[:'firstname'].nil? query_params[:'lastname'] = opts[:'lastname'] if !opts[:'lastname'].nil? query_params[:'middleNames'] = opts[:'middle_names'] if !opts[:'middle_names'].nil? query_params[:'birthday'] = opts[:'birthday'] if !opts[:'birthday'].nil? query_params[:'address1'] = opts[:'address1'] if !opts[:'address1'].nil? query_params[:'address2'] = opts[:'address2'] if !opts[:'address2'].nil? query_params[:'postcode'] = opts[:'postcode'] if !opts[:'postcode'].nil? query_params[:'city'] = opts[:'city'] if !opts[:'city'].nil? query_params[:'state'] = opts[:'state'] if !opts[:'state'].nil? query_params[:'country'] = opts[:'country'] if !opts[:'country'].nil? query_params[:'phone'] = opts[:'phone'] if !opts[:'phone'].nil? query_params[:'mobile'] = opts[:'mobile'] if !opts[:'mobile'].nil? query_params[:'nationality'] = opts[:'nationality'] if !opts[:'nationality'].nil? query_params[:'nationalityOther'] = opts[:'nationality_other'] if !opts[:'nationality_other'].nil? query_params[:'placeOfBirth'] = opts[:'place_of_birth'] if !opts[:'place_of_birth'].nil? query_params[:'birthCountry'] = opts[:'birth_country'] if !opts[:'birth_country'].nil? query_params[:'occupation'] = opts[:'occupation'] if !opts[:'occupation'].nil? query_params[:'incomeRange'] = opts[:'income_range'] if !opts[:'income_range'].nil? query_params[:'legalName'] = opts[:'legal_name'] if !opts[:'legal_name'].nil? query_params[:'legalRegistrationNumber'] = opts[:'legal_registration_number'] if !opts[:'legal_registration_number'].nil? query_params[:'legalTvaNumber'] = opts[:'legal_tva_number'] if !opts[:'legal_tva_number'].nil? query_params[:'legalRegistrationDate'] = opts[:'legal_registration_date'] if !opts[:'legal_registration_date'].nil? query_params[:'legalForm'] = opts[:'legal_form'] if !opts[:'legal_form'].nil? query_params[:'legalShareCapital'] = opts[:'legal_share_capital'] if !opts[:'legal_share_capital'].nil? query_params[:'legalSector'] = opts[:'legal_sector'] if !opts[:'legal_sector'].nil? query_params[:'legalAnnualTurnOver'] = opts[:'legal_annual_turn_over'] if !opts[:'legal_annual_turn_over'].nil? query_params[:'legalNetIncomeRange'] = opts[:'legal_net_income_range'] if !opts[:'legal_net_income_range'].nil? query_params[:'legalNumberOfEmployeeRange'] = opts[:'legal_number_of_employee_range'] if !opts[:'legal_number_of_employee_range'].nil? query_params[:'effectiveBeneficiary'] = opts[:'effective_beneficiary'] if !opts[:'effective_beneficiary'].nil? query_params[:'language'] = opts[:'language'] if !opts[:'language'].nil? query_params[:'taxNumber'] = opts[:'tax_number'] if !opts[:'tax_number'].nil? query_params[:'taxResidence'] = opts[:'tax_residence'] if !opts[:'tax_residence'].nil? query_params[:'position'] = opts[:'position'] if !opts[:'position'].nil? query_params[:'personalAssets'] = opts[:'personal_assets'] if !opts[:'personal_assets'].nil? # 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 = nil auth_names = ['api_key'] 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 => 'InlineResponse20024') if @api_client.config.debugging @api_client.config.logger.debug "API called: UserApi#put_users\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#users_id_kycreview_put(id, opts = {}) ⇒ InlineResponse20024
review user information Perform a KYC review for given user.
682 683 684 685 |
# File 'lib/treezor_client/api/user_api.rb', line 682 def users_id_kycreview_put(id, opts = {}) data, _status_code, _headers = users_id_kycreview_put_with_http_info(id, opts) return data end |
#users_id_kycreview_put_with_http_info(id, opts = {}) ⇒ Array<(InlineResponse20024, Fixnum, Hash)>
review user information Perform a KYC review for given user.
697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 |
# File 'lib/treezor_client/api/user_api.rb', line 697 def users_id_kycreview_put_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: UserApi.users_id_kycreview_put ..." 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 UserApi.users_id_kycreview_put" end # resource path local_var_path = "/users/{id}/Kycreview/".sub('{' + 'id' + '}', id.to_s) # query parameters query_params = {} query_params[:'accessToken'] = opts[:'access_token'] if !opts[:'access_token'].nil? 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? # 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(: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 => 'InlineResponse20024') if @api_client.config.debugging @api_client.config.logger.debug "API called: UserApi#users_id_kycreview_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |