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 = {}) ⇒ InlineResponse20026
delete a user Change user’s status to CANCELED.
-
#delete_user_with_http_info(id, origin, opts = {}) ⇒ Array<(InlineResponse20026, Fixnum, Hash)>
delete a user Change user's status to CANCELED.
-
#get_user(id, opts = {}) ⇒ InlineResponse20026
get an user Get user’s information for given user’s id.
-
#get_user_with_http_info(id, opts = {}) ⇒ Array<(InlineResponse20026, Fixnum, Hash)>
get an user Get user's information for given user's id.
-
#get_users(opts = {}) ⇒ InlineResponse20026
search users Get users from the system.
-
#get_users_with_http_info(opts = {}) ⇒ Array<(InlineResponse20026, 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 = {}) ⇒ InlineResponse20026
update a user Update user’s information.
-
#put_user_with_http_info(id, opts = {}) ⇒ Array<(InlineResponse20026, Fixnum, Hash)>
update a user Update user's information.
-
#put_users(specified_us_person, email, opts = {}) ⇒ InlineResponse20026
create user Create a new user in the system.
-
#put_users_with_http_info(specified_us_person, email, opts = {}) ⇒ Array<(InlineResponse20026, Fixnum, Hash)>
create user Create a new user in the system.
-
#users_id_kycreview_put(id, opts = {}) ⇒ InlineResponse20026
review user information Perform a KYC review for given user.
-
#users_id_kycreview_put_with_http_info(id, opts = {}) ⇒ Array<(InlineResponse20026, 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 = {}) ⇒ InlineResponse20026
delete a user Change user’s status to CANCELED.
32 33 34 35 |
# File 'lib/treezor_client/api/user_api.rb', line 32 def delete_user(id, origin, opts = {}) data, _status_code, _headers = delete_user_with_http_info(id, origin, opts) data end |
#delete_user_with_http_info(id, origin, opts = {}) ⇒ Array<(InlineResponse20026, Fixnum, Hash)>
delete a user Change user's status to CANCELED.
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 86 87 88 89 90 91 92 93 94 |
# File 'lib/treezor_client/api/user_api.rb', line 47 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 => 'InlineResponse20026') 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 = {}) ⇒ InlineResponse20026
get an user Get user’s information for given user’s id.
104 105 106 107 |
# File 'lib/treezor_client/api/user_api.rb', line 104 def get_user(id, opts = {}) data, _status_code, _headers = get_user_with_http_info(id, opts) data end |
#get_user_with_http_info(id, opts = {}) ⇒ Array<(InlineResponse20026, Fixnum, Hash)>
get an user Get user's information for given user's id.
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 157 158 159 160 |
# File 'lib/treezor_client/api/user_api.rb', line 118 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 => 'InlineResponse20026') 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 = {}) ⇒ InlineResponse20026
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) data end |
#get_users_with_http_info(opts = {}) ⇒ Array<(InlineResponse20026, Fixnum, Hash)>
search users Get users from the system.
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 272 273 274 275 276 277 |
# File 'lib/treezor_client/api/user_api.rb', line 220 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[:'specifiedUSPerson'] = opts[:'specified_us_person'] if !opts[:'specified_us_person'].nil? query_params[:'controllingPersonType'] = opts[:'controlling_person_type'] if !opts[:'controlling_person_type'].nil? query_params[:'employeeType'] = opts[:'employee_type'] if !opts[:'employee_type'].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 => 'InlineResponse20026') 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 = {}) ⇒ InlineResponse20026
update a user Update user’s information.
327 328 329 330 |
# File 'lib/treezor_client/api/user_api.rb', line 327 def put_user(id, opts = {}) data, _status_code, _headers = put_user_with_http_info(id, opts) data end |
#put_user_with_http_info(id, opts = {}) ⇒ Array<(InlineResponse20026, Fixnum, Hash)>
update a user Update user's information.
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 468 469 470 471 472 473 474 475 476 477 478 479 480 481 |
# File 'lib/treezor_client/api/user_api.rb', line 381 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[:'specifiedUSPerson'] = opts[:'specified_us_person'] if !opts[:'specified_us_person'].nil? query_params[:'controllingPersonType'] = opts[:'controlling_person_type'] if !opts[:'controlling_person_type'].nil? query_params[:'employeeType'] = opts[:'employee_type'] if !opts[:'employee_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[:'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 => 'InlineResponse20026') 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(specified_us_person, email, opts = {}) ⇒ InlineResponse20026
create user Create a new user in the system.
534 535 536 537 |
# File 'lib/treezor_client/api/user_api.rb', line 534 def put_users(specified_us_person, email, opts = {}) data, _status_code, _headers = put_users_with_http_info(specified_us_person, email, opts) data end |
#put_users_with_http_info(specified_us_person, email, opts = {}) ⇒ Array<(InlineResponse20026, Fixnum, Hash)>
create user Create a new user in the system.
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 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 |
# File 'lib/treezor_client/api/user_api.rb', line 591 def put_users_with_http_info(specified_us_person, email, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: UserApi.put_users ...' end # verify the required parameter 'specified_us_person' is set if @api_client.config.client_side_validation && specified_us_person.nil? fail ArgumentError, "Missing the required parameter 'specified_us_person' when calling 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[:'specifiedUSPerson'] = specified_us_person 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[:'controllingPersonType'] = opts[:'controlling_person_type'] if !opts[:'controlling_person_type'].nil? query_params[:'employeeType'] = opts[:'employee_type'] if !opts[:'employee_type'].nil? query_params[:'entityType'] = opts[:'entity_type'] if !opts[:'entity_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 => 'InlineResponse20026') 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 = {}) ⇒ InlineResponse20026
review user information Perform a KYC review for given user.
710 711 712 713 |
# File 'lib/treezor_client/api/user_api.rb', line 710 def users_id_kycreview_put(id, opts = {}) data, _status_code, _headers = users_id_kycreview_put_with_http_info(id, opts) data end |
#users_id_kycreview_put_with_http_info(id, opts = {}) ⇒ Array<(InlineResponse20026, Fixnum, Hash)>
review user information Perform a KYC review for given user.
725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 |
# File 'lib/treezor_client/api/user_api.rb', line 725 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 => 'InlineResponse20026') 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 |