sc-apimatic-sdk 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/LICENSE +28 -0
- data/README.md +166 -0
- data/bin/console +15 -0
- data/lib/socure_risk_os_api/api_helper.rb +10 -0
- data/lib/socure_risk_os_api/apis/base_api.rb +67 -0
- data/lib/socure_risk_os_api/apis/evaluation_api.rb +318 -0
- data/lib/socure_risk_os_api/apis/feedback_api.rb +102 -0
- data/lib/socure_risk_os_api/apis/reason_codes_api.rb +61 -0
- data/lib/socure_risk_os_api/client.rb +85 -0
- data/lib/socure_risk_os_api/configuration.rb +179 -0
- data/lib/socure_risk_os_api/exceptions/api_exception.rb +21 -0
- data/lib/socure_risk_os_api/exceptions/error_exception.rb +80 -0
- data/lib/socure_risk_os_api/http/api_response.rb +19 -0
- data/lib/socure_risk_os_api/http/auth/oauth_2.rb +53 -0
- data/lib/socure_risk_os_api/http/http_call_back.rb +10 -0
- data/lib/socure_risk_os_api/http/http_method_enum.rb +10 -0
- data/lib/socure_risk_os_api/http/http_request.rb +10 -0
- data/lib/socure_risk_os_api/http/http_response.rb +10 -0
- data/lib/socure_risk_os_api/http/proxy_settings.rb +22 -0
- data/lib/socure_risk_os_api/logging/configuration/api_logging_configuration.rb +186 -0
- data/lib/socure_risk_os_api/logging/sdk_logger.rb +17 -0
- data/lib/socure_risk_os_api/models/account.rb +206 -0
- data/lib/socure_risk_os_api/models/account1.rb +203 -0
- data/lib/socure_risk_os_api/models/account_inquiry.rb +36 -0
- data/lib/socure_risk_os_api/models/account_snapshot.rb +106 -0
- data/lib/socure_risk_os_api/models/account_view.rb +116 -0
- data/lib/socure_risk_os_api/models/actions.rb +88 -0
- data/lib/socure_risk_os_api/models/additional_context.rb +235 -0
- data/lib/socure_risk_os_api/models/additional_individual.rb +270 -0
- data/lib/socure_risk_os_api/models/address.rb +159 -0
- data/lib/socure_risk_os_api/models/address1.rb +144 -0
- data/lib/socure_risk_os_api/models/advanced_prefill.rb +168 -0
- data/lib/socure_risk_os_api/models/age_assurance.rb +163 -0
- data/lib/socure_risk_os_api/models/amount.rb +95 -0
- data/lib/socure_risk_os_api/models/api_evaluation_monitoring_request.rb +96 -0
- data/lib/socure_risk_os_api/models/api_evaluation_monitoring_response.rb +84 -0
- data/lib/socure_risk_os_api/models/api_feedback_request.rb +153 -0
- data/lib/socure_risk_os_api/models/api_reason_codes_response.rb +85 -0
- data/lib/socure_risk_os_api/models/attachment.rb +95 -0
- data/lib/socure_risk_os_api/models/bank_account_verification.rb +167 -0
- data/lib/socure_risk_os_api/models/base_model.rb +110 -0
- data/lib/socure_risk_os_api/models/business.rb +224 -0
- data/lib/socure_risk_os_api/models/business_onboarding.rb +167 -0
- data/lib/socure_risk_os_api/models/channel.rb +45 -0
- data/lib/socure_risk_os_api/models/channel1.rb +44 -0
- data/lib/socure_risk_os_api/models/code.rb +68 -0
- data/lib/socure_risk_os_api/models/consumer_onboarding.rb +167 -0
- data/lib/socure_risk_os_api/models/consumer_onboarding_patch.rb +178 -0
- data/lib/socure_risk_os_api/models/crypto_address.rb +105 -0
- data/lib/socure_risk_os_api/models/data.rb +106 -0
- data/lib/socure_risk_os_api/models/data1.rb +166 -0
- data/lib/socure_risk_os_api/models/data10.rb +166 -0
- data/lib/socure_risk_os_api/models/data2.rb +145 -0
- data/lib/socure_risk_os_api/models/data3.rb +160 -0
- data/lib/socure_risk_os_api/models/data4.rb +157 -0
- data/lib/socure_risk_os_api/models/data5.rb +154 -0
- data/lib/socure_risk_os_api/models/data6.rb +174 -0
- data/lib/socure_risk_os_api/models/data7.rb +205 -0
- data/lib/socure_risk_os_api/models/data8.rb +115 -0
- data/lib/socure_risk_os_api/models/data9.rb +130 -0
- data/lib/socure_risk_os_api/models/data_enrichment.rb +182 -0
- data/lib/socure_risk_os_api/models/decision.rb +47 -0
- data/lib/socure_risk_os_api/models/decision1.rb +48 -0
- data/lib/socure_risk_os_api/models/destination.rb +136 -0
- data/lib/socure_risk_os_api/models/device.rb +339 -0
- data/lib/socure_risk_os_api/models/disclosure_purpose.rb +29 -0
- data/lib/socure_risk_os_api/models/document_verification_config.rb +195 -0
- data/lib/socure_risk_os_api/models/docv.rb +98 -0
- data/lib/socure_risk_os_api/models/environment_name.rb +37 -0
- data/lib/socure_risk_os_api/models/eval_response_with_out_socure_data.rb +413 -0
- data/lib/socure_risk_os_api/models/eval_source.rb +38 -0
- data/lib/socure_risk_os_api/models/event_category.rb +45 -0
- data/lib/socure_risk_os_api/models/event_category1.rb +45 -0
- data/lib/socure_risk_os_api/models/event_category2.rb +57 -0
- data/lib/socure_risk_os_api/models/event_details.rb +96 -0
- data/lib/socure_risk_os_api/models/formation.rb +138 -0
- data/lib/socure_risk_os_api/models/fraud_feedback_import_response.rb +73 -0
- data/lib/socure_risk_os_api/models/fraud_feedback_response.rb +73 -0
- data/lib/socure_risk_os_api/models/fraud_label.rb +37 -0
- data/lib/socure_risk_os_api/models/gender.rb +40 -0
- data/lib/socure_risk_os_api/models/generic_passthrough.rb +169 -0
- data/lib/socure_risk_os_api/models/individual.rb +281 -0
- data/lib/socure_risk_os_api/models/individual1.rb +292 -0
- data/lib/socure_risk_os_api/models/individual3.rb +206 -0
- data/lib/socure_risk_os_api/models/individual4.rb +182 -0
- data/lib/socure_risk_os_api/models/individual5.rb +297 -0
- data/lib/socure_risk_os_api/models/individual6.rb +148 -0
- data/lib/socure_risk_os_api/models/input.rb +86 -0
- data/lib/socure_risk_os_api/models/inquiry.rb +36 -0
- data/lib/socure_risk_os_api/models/invalid_arg.rb +85 -0
- data/lib/socure_risk_os_api/models/language.rb +247 -0
- data/lib/socure_risk_os_api/models/login_and_authentication.rb +167 -0
- data/lib/socure_risk_os_api/models/method.rb +37 -0
- data/lib/socure_risk_os_api/models/monitoring_status.rb +37 -0
- data/lib/socure_risk_os_api/models/operation.rb +38 -0
- data/lib/socure_risk_os_api/models/otp.rb +95 -0
- data/lib/socure_risk_os_api/models/otp1.rb +98 -0
- data/lib/socure_risk_os_api/models/payment_screening.rb +167 -0
- data/lib/socure_risk_os_api/models/payment_screening_business.rb +155 -0
- data/lib/socure_risk_os_api/models/payment_screening_individual.rb +254 -0
- data/lib/socure_risk_os_api/models/payment_screening_instrument.rb +105 -0
- data/lib/socure_risk_os_api/models/product.rb +76 -0
- data/lib/socure_risk_os_api/models/reason_code.rb +149 -0
- data/lib/socure_risk_os_api/models/redirect.rb +118 -0
- data/lib/socure_risk_os_api/models/response.rb +77 -0
- data/lib/socure_risk_os_api/models/source.rb +146 -0
- data/lib/socure_risk_os_api/models/status.rb +40 -0
- data/lib/socure_risk_os_api/models/status1.rb +40 -0
- data/lib/socure_risk_os_api/models/transaction_details.rb +97 -0
- data/lib/socure_risk_os_api/models/trust_and_safety.rb +167 -0
- data/lib/socure_risk_os_api/models/type.rb +36 -0
- data/lib/socure_risk_os_api/models/type1.rb +36 -0
- data/lib/socure_risk_os_api/models/type2.rb +36 -0
- data/lib/socure_risk_os_api/models/update_decision.rb +156 -0
- data/lib/socure_risk_os_api/models/update_status.rb +169 -0
- data/lib/socure_risk_os_api/models/workforce_verification.rb +167 -0
- data/lib/socure_risk_os_api/utilities/date_time_helper.rb +11 -0
- data/lib/socure_risk_os_api/utilities/file_wrapper.rb +28 -0
- data/lib/socure_risk_os_api/utilities/union_type_lookup.rb +69 -0
- data/lib/socure_risk_os_api.rb +143 -0
- metadata +205 -0
|
@@ -0,0 +1,281 @@
|
|
|
1
|
+
# socure_risk_os_api
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC
|
|
4
|
+
# v3.0 ( https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module SocureRiskOsApi
|
|
7
|
+
# Represents core information about the primary individual consumer.
|
|
8
|
+
class Individual < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# Maps to the `userId` in enrichments or a customer’s internal identifier.
|
|
13
|
+
# Can be enabled as a searchable field in RiskOS™ Dashboard.
|
|
14
|
+
# @return [String]
|
|
15
|
+
attr_accessor :id
|
|
16
|
+
|
|
17
|
+
# The consumer's given name.
|
|
18
|
+
# **Requirements:**
|
|
19
|
+
# - Must be UTF-8 encoded
|
|
20
|
+
# - Supports single-byte Latin characters only
|
|
21
|
+
# - The following special characters are not supported:
|
|
22
|
+
# ^ ± ! @ £ $ % & * _ + ¡ € # ¢ § ¶ • ª º « < > ? \ / : ; | =
|
|
23
|
+
# @return [String]
|
|
24
|
+
attr_accessor :given_name
|
|
25
|
+
|
|
26
|
+
# The consumer's family name.
|
|
27
|
+
# **Requirements:**
|
|
28
|
+
# - Must be UTF-8 encoded
|
|
29
|
+
# - Supports single-byte Latin characters only
|
|
30
|
+
# - The following special characters are not supported:
|
|
31
|
+
# ^ ± ! @ £ $ % & * _ + ¡ € # ¢ § ¶ • ª º « < > ? \ / : ; | =
|
|
32
|
+
# @return [String]
|
|
33
|
+
attr_accessor :family_name
|
|
34
|
+
|
|
35
|
+
# A suffix for the consumer's name, if applicable (e.g., Jr., Sr., III).
|
|
36
|
+
# @return [String]
|
|
37
|
+
attr_accessor :suffix
|
|
38
|
+
|
|
39
|
+
# The consumer's national identification number. For US consumers, this can
|
|
40
|
+
# be a nine-digit Social Security Number (SSN) or Individual Tax
|
|
41
|
+
# Identification Number (ITIN). Partial SSNs (last four digits) are also
|
|
42
|
+
# accepted. Hyphens are optional.
|
|
43
|
+
# @return [String]
|
|
44
|
+
attr_accessor :national_id
|
|
45
|
+
|
|
46
|
+
# The consumer's date of birth in the format YYYY-MM-DD, compliant with RFC
|
|
47
|
+
# 3339.
|
|
48
|
+
# @return [Date]
|
|
49
|
+
attr_accessor :date_of_birth
|
|
50
|
+
|
|
51
|
+
# The consumer's email address.
|
|
52
|
+
# @return [String]
|
|
53
|
+
attr_accessor :email
|
|
54
|
+
|
|
55
|
+
# The consumer's alternate email address.
|
|
56
|
+
# @return [String]
|
|
57
|
+
attr_accessor :alternate_email
|
|
58
|
+
|
|
59
|
+
# The consumer’s phone number. The API expects the standard E.164 format
|
|
60
|
+
# (e.g., +12025550147) but tolerates hyphens and spaces for user
|
|
61
|
+
# convenience.
|
|
62
|
+
# **Examples:**
|
|
63
|
+
# - United States: `+13475550100`
|
|
64
|
+
# - United Kingdom: `+447911123456`
|
|
65
|
+
# - Brazil: `+5511987654321`
|
|
66
|
+
# - India: `+919876543210`
|
|
67
|
+
# - Australia: `+61412345678`
|
|
68
|
+
# @return [String]
|
|
69
|
+
attr_accessor :phone_number
|
|
70
|
+
|
|
71
|
+
# The consumer’s alternate phone number. The API accepts E.164 format (e.g.,
|
|
72
|
+
# `+12025550147`) but tolerates hyphens and spaces for user convenience.
|
|
73
|
+
# @return [String]
|
|
74
|
+
attr_accessor :alternate_phone_number
|
|
75
|
+
|
|
76
|
+
# The consumer's gender.
|
|
77
|
+
# @return [Gender]
|
|
78
|
+
attr_accessor :gender
|
|
79
|
+
|
|
80
|
+
# The consumer's gender.
|
|
81
|
+
# @return [Address]
|
|
82
|
+
attr_accessor :address
|
|
83
|
+
|
|
84
|
+
# Defines the schema of an bank account.
|
|
85
|
+
# @return [Account]
|
|
86
|
+
attr_accessor :account
|
|
87
|
+
|
|
88
|
+
# Defines the schema of an bank account.
|
|
89
|
+
# @return [Docv]
|
|
90
|
+
attr_accessor :docv
|
|
91
|
+
|
|
92
|
+
# Use this field to pass additional data required by specific Socure
|
|
93
|
+
# products. Additional fields are typically optional and should only be used
|
|
94
|
+
# if explicitly stated in the product documentation.
|
|
95
|
+
# @return [AdditionalContext]
|
|
96
|
+
attr_accessor :additional_context
|
|
97
|
+
|
|
98
|
+
# Token required to extract Device Intelligence (DI) signals.
|
|
99
|
+
# @return [String]
|
|
100
|
+
attr_accessor :di_session_token
|
|
101
|
+
|
|
102
|
+
# Send any additional, customer-specific data for this consumer in this
|
|
103
|
+
# field. See [Custom
|
|
104
|
+
# Fields](https://help.socure.com/riskos/docs/custom-fields) for more
|
|
105
|
+
# information.
|
|
106
|
+
# @return [Object]
|
|
107
|
+
attr_accessor :custom
|
|
108
|
+
|
|
109
|
+
# A mapping from model property names to API property names.
|
|
110
|
+
def self.names
|
|
111
|
+
@_hash = {} if @_hash.nil?
|
|
112
|
+
@_hash['id'] = 'id'
|
|
113
|
+
@_hash['given_name'] = 'given_name'
|
|
114
|
+
@_hash['family_name'] = 'family_name'
|
|
115
|
+
@_hash['suffix'] = 'suffix'
|
|
116
|
+
@_hash['national_id'] = 'national_id'
|
|
117
|
+
@_hash['date_of_birth'] = 'date_of_birth'
|
|
118
|
+
@_hash['email'] = 'email'
|
|
119
|
+
@_hash['alternate_email'] = 'alternate_email'
|
|
120
|
+
@_hash['phone_number'] = 'phone_number'
|
|
121
|
+
@_hash['alternate_phone_number'] = 'alternate_phone_number'
|
|
122
|
+
@_hash['gender'] = 'gender'
|
|
123
|
+
@_hash['address'] = 'address'
|
|
124
|
+
@_hash['account'] = 'account'
|
|
125
|
+
@_hash['docv'] = 'docv'
|
|
126
|
+
@_hash['additional_context'] = 'additional_context'
|
|
127
|
+
@_hash['di_session_token'] = 'di_session_token'
|
|
128
|
+
@_hash['custom'] = 'custom'
|
|
129
|
+
@_hash
|
|
130
|
+
end
|
|
131
|
+
|
|
132
|
+
# An array for optional fields
|
|
133
|
+
def self.optionals
|
|
134
|
+
%w[
|
|
135
|
+
id
|
|
136
|
+
given_name
|
|
137
|
+
family_name
|
|
138
|
+
suffix
|
|
139
|
+
national_id
|
|
140
|
+
date_of_birth
|
|
141
|
+
email
|
|
142
|
+
alternate_email
|
|
143
|
+
phone_number
|
|
144
|
+
alternate_phone_number
|
|
145
|
+
gender
|
|
146
|
+
address
|
|
147
|
+
account
|
|
148
|
+
docv
|
|
149
|
+
additional_context
|
|
150
|
+
di_session_token
|
|
151
|
+
custom
|
|
152
|
+
]
|
|
153
|
+
end
|
|
154
|
+
|
|
155
|
+
# An array for nullable fields
|
|
156
|
+
def self.nullables
|
|
157
|
+
[]
|
|
158
|
+
end
|
|
159
|
+
|
|
160
|
+
def initialize(id: SKIP, given_name: SKIP, family_name: SKIP, suffix: SKIP,
|
|
161
|
+
national_id: SKIP, date_of_birth: SKIP, email: SKIP,
|
|
162
|
+
alternate_email: SKIP, phone_number: SKIP,
|
|
163
|
+
alternate_phone_number: SKIP, gender: SKIP, address: SKIP,
|
|
164
|
+
account: SKIP, docv: SKIP, additional_context: SKIP,
|
|
165
|
+
di_session_token: SKIP, custom: SKIP,
|
|
166
|
+
additional_properties: nil)
|
|
167
|
+
# Add additional model properties to the instance
|
|
168
|
+
additional_properties = {} if additional_properties.nil?
|
|
169
|
+
|
|
170
|
+
@id = id unless id == SKIP
|
|
171
|
+
@given_name = given_name unless given_name == SKIP
|
|
172
|
+
@family_name = family_name unless family_name == SKIP
|
|
173
|
+
@suffix = suffix unless suffix == SKIP
|
|
174
|
+
@national_id = national_id unless national_id == SKIP
|
|
175
|
+
@date_of_birth = date_of_birth unless date_of_birth == SKIP
|
|
176
|
+
@email = email unless email == SKIP
|
|
177
|
+
@alternate_email = alternate_email unless alternate_email == SKIP
|
|
178
|
+
@phone_number = phone_number unless phone_number == SKIP
|
|
179
|
+
@alternate_phone_number = alternate_phone_number unless alternate_phone_number == SKIP
|
|
180
|
+
@gender = gender unless gender == SKIP
|
|
181
|
+
@address = address unless address == SKIP
|
|
182
|
+
@account = account unless account == SKIP
|
|
183
|
+
@docv = docv unless docv == SKIP
|
|
184
|
+
@additional_context = additional_context unless additional_context == SKIP
|
|
185
|
+
@di_session_token = di_session_token unless di_session_token == SKIP
|
|
186
|
+
@custom = custom unless custom == SKIP
|
|
187
|
+
@additional_properties = additional_properties
|
|
188
|
+
end
|
|
189
|
+
|
|
190
|
+
# Creates an instance of the object from a hash.
|
|
191
|
+
def self.from_hash(hash)
|
|
192
|
+
return nil unless hash
|
|
193
|
+
|
|
194
|
+
# Extract variables from the hash.
|
|
195
|
+
id = hash.key?('id') ? hash['id'] : SKIP
|
|
196
|
+
given_name = hash.key?('given_name') ? hash['given_name'] : SKIP
|
|
197
|
+
family_name = hash.key?('family_name') ? hash['family_name'] : SKIP
|
|
198
|
+
suffix = hash.key?('suffix') ? hash['suffix'] : SKIP
|
|
199
|
+
national_id = hash.key?('national_id') ? hash['national_id'] : SKIP
|
|
200
|
+
date_of_birth = hash.key?('date_of_birth') ? hash['date_of_birth'] : SKIP
|
|
201
|
+
email = hash.key?('email') ? hash['email'] : SKIP
|
|
202
|
+
alternate_email =
|
|
203
|
+
hash.key?('alternate_email') ? hash['alternate_email'] : SKIP
|
|
204
|
+
phone_number = hash.key?('phone_number') ? hash['phone_number'] : SKIP
|
|
205
|
+
alternate_phone_number =
|
|
206
|
+
hash.key?('alternate_phone_number') ? hash['alternate_phone_number'] : SKIP
|
|
207
|
+
gender = hash.key?('gender') ? hash['gender'] : SKIP
|
|
208
|
+
address = Address.from_hash(hash['address']) if hash['address']
|
|
209
|
+
account = Account.from_hash(hash['account']) if hash['account']
|
|
210
|
+
docv = Docv.from_hash(hash['docv']) if hash['docv']
|
|
211
|
+
additional_context = AdditionalContext.from_hash(hash['additional_context']) if
|
|
212
|
+
hash['additional_context']
|
|
213
|
+
di_session_token =
|
|
214
|
+
hash.key?('di_session_token') ? hash['di_session_token'] : SKIP
|
|
215
|
+
custom = hash.key?('custom') ? hash['custom'] : SKIP
|
|
216
|
+
|
|
217
|
+
# Create a new hash for additional properties, removing known properties.
|
|
218
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
219
|
+
|
|
220
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
221
|
+
new_hash, proc { |value| value }
|
|
222
|
+
)
|
|
223
|
+
|
|
224
|
+
# Create object from extracted values.
|
|
225
|
+
Individual.new(id: id,
|
|
226
|
+
given_name: given_name,
|
|
227
|
+
family_name: family_name,
|
|
228
|
+
suffix: suffix,
|
|
229
|
+
national_id: national_id,
|
|
230
|
+
date_of_birth: date_of_birth,
|
|
231
|
+
email: email,
|
|
232
|
+
alternate_email: alternate_email,
|
|
233
|
+
phone_number: phone_number,
|
|
234
|
+
alternate_phone_number: alternate_phone_number,
|
|
235
|
+
gender: gender,
|
|
236
|
+
address: address,
|
|
237
|
+
account: account,
|
|
238
|
+
docv: docv,
|
|
239
|
+
additional_context: additional_context,
|
|
240
|
+
di_session_token: di_session_token,
|
|
241
|
+
custom: custom,
|
|
242
|
+
additional_properties: additional_properties)
|
|
243
|
+
end
|
|
244
|
+
|
|
245
|
+
# Validates an instance of the object from a given value.
|
|
246
|
+
# @param [Individual | Hash] The value against the validation is performed.
|
|
247
|
+
def self.validate(value)
|
|
248
|
+
return true if value.instance_of? self
|
|
249
|
+
|
|
250
|
+
return false unless value.instance_of? Hash
|
|
251
|
+
|
|
252
|
+
true
|
|
253
|
+
end
|
|
254
|
+
|
|
255
|
+
# Provides a human-readable string representation of the object.
|
|
256
|
+
def to_s
|
|
257
|
+
class_name = self.class.name.split('::').last
|
|
258
|
+
"<#{class_name} id: #{@id}, given_name: #{@given_name}, family_name: #{@family_name},"\
|
|
259
|
+
" suffix: #{@suffix}, national_id: #{@national_id}, date_of_birth: #{@date_of_birth}, email:"\
|
|
260
|
+
" #{@email}, alternate_email: #{@alternate_email}, phone_number: #{@phone_number},"\
|
|
261
|
+
" alternate_phone_number: #{@alternate_phone_number}, gender: #{@gender}, address:"\
|
|
262
|
+
" #{@address}, account: #{@account}, docv: #{@docv}, additional_context:"\
|
|
263
|
+
" #{@additional_context}, di_session_token: #{@di_session_token}, custom: #{@custom},"\
|
|
264
|
+
" additional_properties: #{@additional_properties}>"
|
|
265
|
+
end
|
|
266
|
+
|
|
267
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
268
|
+
def inspect
|
|
269
|
+
class_name = self.class.name.split('::').last
|
|
270
|
+
"<#{class_name} id: #{@id.inspect}, given_name: #{@given_name.inspect}, family_name:"\
|
|
271
|
+
" #{@family_name.inspect}, suffix: #{@suffix.inspect}, national_id: #{@national_id.inspect},"\
|
|
272
|
+
" date_of_birth: #{@date_of_birth.inspect}, email: #{@email.inspect}, alternate_email:"\
|
|
273
|
+
" #{@alternate_email.inspect}, phone_number: #{@phone_number.inspect},"\
|
|
274
|
+
" alternate_phone_number: #{@alternate_phone_number.inspect}, gender: #{@gender.inspect},"\
|
|
275
|
+
" address: #{@address.inspect}, account: #{@account.inspect}, docv: #{@docv.inspect},"\
|
|
276
|
+
" additional_context: #{@additional_context.inspect}, di_session_token:"\
|
|
277
|
+
" #{@di_session_token.inspect}, custom: #{@custom.inspect}, additional_properties:"\
|
|
278
|
+
" #{@additional_properties}>"
|
|
279
|
+
end
|
|
280
|
+
end
|
|
281
|
+
end
|
|
@@ -0,0 +1,292 @@
|
|
|
1
|
+
# socure_risk_os_api
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC
|
|
4
|
+
# v3.0 ( https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module SocureRiskOsApi
|
|
7
|
+
# Represents core information about the primary consumer.
|
|
8
|
+
class Individual1 < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# A unique identifier for a consumer provided by the customer, used across
|
|
13
|
+
# various use cases.
|
|
14
|
+
# @return [String]
|
|
15
|
+
attr_accessor :id
|
|
16
|
+
|
|
17
|
+
# The consumer's given name.
|
|
18
|
+
# **Requirements:**
|
|
19
|
+
# - Must be UTF-8 encoded
|
|
20
|
+
# - Supports single-byte Latin characters only
|
|
21
|
+
# - The following special characters are not supported:
|
|
22
|
+
# ^ ± ! @ £ $ % & * _ + ¡ € # ¢ § ¶ • ª º « < > ? \ / : ; | =
|
|
23
|
+
# @return [String]
|
|
24
|
+
attr_accessor :given_name
|
|
25
|
+
|
|
26
|
+
# The consumer's family name.
|
|
27
|
+
# **Requirements:**
|
|
28
|
+
# - Must be UTF-8 encoded
|
|
29
|
+
# - Supports single-byte Latin characters only
|
|
30
|
+
# - The following special characters are not supported:
|
|
31
|
+
# ^ ± ! @ £ $ % & * _ + ¡ € # ¢ § ¶ • ª º « < > ? \ / : ; | =
|
|
32
|
+
# @return [String]
|
|
33
|
+
attr_accessor :family_name
|
|
34
|
+
|
|
35
|
+
# A suffix for the consumer's name, if applicable (e.g., Jr., Sr., III).
|
|
36
|
+
# @return [String]
|
|
37
|
+
attr_accessor :suffix
|
|
38
|
+
|
|
39
|
+
# The consumer's national identification number. For US consumer's, this can
|
|
40
|
+
# be a nine-digit Social Security Number (SSN) or Individual Tax
|
|
41
|
+
# Identification Number (ITIN). Partial SSNs (last four digits) are also
|
|
42
|
+
# accepted. Hyphens are optional.
|
|
43
|
+
# @return [String]
|
|
44
|
+
attr_accessor :national_id
|
|
45
|
+
|
|
46
|
+
# The consumer's date of birth in the format YYYY-MM-DD, compliant with RFC
|
|
47
|
+
# 3339.
|
|
48
|
+
# @return [Date]
|
|
49
|
+
attr_accessor :date_of_birth
|
|
50
|
+
|
|
51
|
+
# The consumer's email address.
|
|
52
|
+
# @return [String]
|
|
53
|
+
attr_accessor :email
|
|
54
|
+
|
|
55
|
+
# The consumer's alternate email address.
|
|
56
|
+
# @return [String]
|
|
57
|
+
attr_accessor :alternate_email
|
|
58
|
+
|
|
59
|
+
# The consumer’s phone number. The API expects the standard E.164 format
|
|
60
|
+
# (e.g., +12025550147) but tolerates hyphens and spaces for user
|
|
61
|
+
# convenience.
|
|
62
|
+
# **Examples:**
|
|
63
|
+
# - United States: `+13475550100`
|
|
64
|
+
# - United Kingdom: `+447911123456`
|
|
65
|
+
# - Brazil: `+5511987654321`
|
|
66
|
+
# - India: `+919876543210`
|
|
67
|
+
# - Australia: `+61412345678`
|
|
68
|
+
# @return [String]
|
|
69
|
+
attr_accessor :phone_number
|
|
70
|
+
|
|
71
|
+
# The consumer’s phone number in E.164 format, which includes the country
|
|
72
|
+
# code (e.g., `+` followed by international dialing code and number). The
|
|
73
|
+
# API expects the standard E.164 format but tolerates hyphens and spaces for
|
|
74
|
+
# user convenience.
|
|
75
|
+
# @return [String]
|
|
76
|
+
attr_accessor :alternate_phone_number
|
|
77
|
+
|
|
78
|
+
# The consumer's gender.
|
|
79
|
+
# @return [Gender]
|
|
80
|
+
attr_accessor :gender
|
|
81
|
+
|
|
82
|
+
# The consumer's gender.
|
|
83
|
+
# @return [Address]
|
|
84
|
+
attr_accessor :address
|
|
85
|
+
|
|
86
|
+
# Defines the schema of an bank account.
|
|
87
|
+
# @return [Account]
|
|
88
|
+
attr_accessor :account
|
|
89
|
+
|
|
90
|
+
# Defines the schema of an bank account.
|
|
91
|
+
# @return [Docv]
|
|
92
|
+
attr_accessor :docv
|
|
93
|
+
|
|
94
|
+
# Contains the OTP data for the transaction.
|
|
95
|
+
# @return [Otp]
|
|
96
|
+
attr_accessor :otp
|
|
97
|
+
|
|
98
|
+
# Use this field to pass additional data required by specific Socure
|
|
99
|
+
# products. Additional fields are typically optional and should only be used
|
|
100
|
+
# if explicitly stated in the product documentation.
|
|
101
|
+
# @return [AdditionalContext]
|
|
102
|
+
attr_accessor :additional_context
|
|
103
|
+
|
|
104
|
+
# Token required to extract Device Intelligence (DI) signals.
|
|
105
|
+
# @return [String]
|
|
106
|
+
attr_accessor :di_session_token
|
|
107
|
+
|
|
108
|
+
# Send any additional, customer-specific data for this consumer in this
|
|
109
|
+
# field. See [Custom
|
|
110
|
+
# Fields](https://help.socure.com/riskos/docs/custom-fields) for more
|
|
111
|
+
# information.
|
|
112
|
+
# @return [Object]
|
|
113
|
+
attr_accessor :custom
|
|
114
|
+
|
|
115
|
+
# A mapping from model property names to API property names.
|
|
116
|
+
def self.names
|
|
117
|
+
@_hash = {} if @_hash.nil?
|
|
118
|
+
@_hash['id'] = 'id'
|
|
119
|
+
@_hash['given_name'] = 'given_name'
|
|
120
|
+
@_hash['family_name'] = 'family_name'
|
|
121
|
+
@_hash['suffix'] = 'suffix'
|
|
122
|
+
@_hash['national_id'] = 'national_id'
|
|
123
|
+
@_hash['date_of_birth'] = 'date_of_birth'
|
|
124
|
+
@_hash['email'] = 'email'
|
|
125
|
+
@_hash['alternate_email'] = 'alternate_email'
|
|
126
|
+
@_hash['phone_number'] = 'phone_number'
|
|
127
|
+
@_hash['alternate_phone_number'] = 'alternate_phone_number'
|
|
128
|
+
@_hash['gender'] = 'gender'
|
|
129
|
+
@_hash['address'] = 'address'
|
|
130
|
+
@_hash['account'] = 'account'
|
|
131
|
+
@_hash['docv'] = 'docv'
|
|
132
|
+
@_hash['otp'] = 'otp'
|
|
133
|
+
@_hash['additional_context'] = 'additional_context'
|
|
134
|
+
@_hash['di_session_token'] = 'di_session_token'
|
|
135
|
+
@_hash['custom'] = 'custom'
|
|
136
|
+
@_hash
|
|
137
|
+
end
|
|
138
|
+
|
|
139
|
+
# An array for optional fields
|
|
140
|
+
def self.optionals
|
|
141
|
+
%w[
|
|
142
|
+
id
|
|
143
|
+
given_name
|
|
144
|
+
family_name
|
|
145
|
+
suffix
|
|
146
|
+
national_id
|
|
147
|
+
date_of_birth
|
|
148
|
+
email
|
|
149
|
+
alternate_email
|
|
150
|
+
phone_number
|
|
151
|
+
alternate_phone_number
|
|
152
|
+
gender
|
|
153
|
+
address
|
|
154
|
+
account
|
|
155
|
+
docv
|
|
156
|
+
otp
|
|
157
|
+
additional_context
|
|
158
|
+
di_session_token
|
|
159
|
+
custom
|
|
160
|
+
]
|
|
161
|
+
end
|
|
162
|
+
|
|
163
|
+
# An array for nullable fields
|
|
164
|
+
def self.nullables
|
|
165
|
+
[]
|
|
166
|
+
end
|
|
167
|
+
|
|
168
|
+
def initialize(id: SKIP, given_name: SKIP, family_name: SKIP, suffix: SKIP,
|
|
169
|
+
national_id: SKIP, date_of_birth: SKIP, email: SKIP,
|
|
170
|
+
alternate_email: SKIP, phone_number: SKIP,
|
|
171
|
+
alternate_phone_number: SKIP, gender: SKIP, address: SKIP,
|
|
172
|
+
account: SKIP, docv: SKIP, otp: SKIP,
|
|
173
|
+
additional_context: SKIP, di_session_token: SKIP,
|
|
174
|
+
custom: SKIP, additional_properties: nil)
|
|
175
|
+
# Add additional model properties to the instance
|
|
176
|
+
additional_properties = {} if additional_properties.nil?
|
|
177
|
+
|
|
178
|
+
@id = id unless id == SKIP
|
|
179
|
+
@given_name = given_name unless given_name == SKIP
|
|
180
|
+
@family_name = family_name unless family_name == SKIP
|
|
181
|
+
@suffix = suffix unless suffix == SKIP
|
|
182
|
+
@national_id = national_id unless national_id == SKIP
|
|
183
|
+
@date_of_birth = date_of_birth unless date_of_birth == SKIP
|
|
184
|
+
@email = email unless email == SKIP
|
|
185
|
+
@alternate_email = alternate_email unless alternate_email == SKIP
|
|
186
|
+
@phone_number = phone_number unless phone_number == SKIP
|
|
187
|
+
@alternate_phone_number = alternate_phone_number unless alternate_phone_number == SKIP
|
|
188
|
+
@gender = gender unless gender == SKIP
|
|
189
|
+
@address = address unless address == SKIP
|
|
190
|
+
@account = account unless account == SKIP
|
|
191
|
+
@docv = docv unless docv == SKIP
|
|
192
|
+
@otp = otp unless otp == SKIP
|
|
193
|
+
@additional_context = additional_context unless additional_context == SKIP
|
|
194
|
+
@di_session_token = di_session_token unless di_session_token == SKIP
|
|
195
|
+
@custom = custom unless custom == SKIP
|
|
196
|
+
@additional_properties = additional_properties
|
|
197
|
+
end
|
|
198
|
+
|
|
199
|
+
# Creates an instance of the object from a hash.
|
|
200
|
+
def self.from_hash(hash)
|
|
201
|
+
return nil unless hash
|
|
202
|
+
|
|
203
|
+
# Extract variables from the hash.
|
|
204
|
+
id = hash.key?('id') ? hash['id'] : SKIP
|
|
205
|
+
given_name = hash.key?('given_name') ? hash['given_name'] : SKIP
|
|
206
|
+
family_name = hash.key?('family_name') ? hash['family_name'] : SKIP
|
|
207
|
+
suffix = hash.key?('suffix') ? hash['suffix'] : SKIP
|
|
208
|
+
national_id = hash.key?('national_id') ? hash['national_id'] : SKIP
|
|
209
|
+
date_of_birth = hash.key?('date_of_birth') ? hash['date_of_birth'] : SKIP
|
|
210
|
+
email = hash.key?('email') ? hash['email'] : SKIP
|
|
211
|
+
alternate_email =
|
|
212
|
+
hash.key?('alternate_email') ? hash['alternate_email'] : SKIP
|
|
213
|
+
phone_number = hash.key?('phone_number') ? hash['phone_number'] : SKIP
|
|
214
|
+
alternate_phone_number =
|
|
215
|
+
hash.key?('alternate_phone_number') ? hash['alternate_phone_number'] : SKIP
|
|
216
|
+
gender = hash.key?('gender') ? hash['gender'] : SKIP
|
|
217
|
+
address = Address.from_hash(hash['address']) if hash['address']
|
|
218
|
+
account = Account.from_hash(hash['account']) if hash['account']
|
|
219
|
+
docv = Docv.from_hash(hash['docv']) if hash['docv']
|
|
220
|
+
otp = Otp.from_hash(hash['otp']) if hash['otp']
|
|
221
|
+
additional_context = AdditionalContext.from_hash(hash['additional_context']) if
|
|
222
|
+
hash['additional_context']
|
|
223
|
+
di_session_token =
|
|
224
|
+
hash.key?('di_session_token') ? hash['di_session_token'] : SKIP
|
|
225
|
+
custom = hash.key?('custom') ? hash['custom'] : SKIP
|
|
226
|
+
|
|
227
|
+
# Create a new hash for additional properties, removing known properties.
|
|
228
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
229
|
+
|
|
230
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
231
|
+
new_hash, proc { |value| value }
|
|
232
|
+
)
|
|
233
|
+
|
|
234
|
+
# Create object from extracted values.
|
|
235
|
+
Individual1.new(id: id,
|
|
236
|
+
given_name: given_name,
|
|
237
|
+
family_name: family_name,
|
|
238
|
+
suffix: suffix,
|
|
239
|
+
national_id: national_id,
|
|
240
|
+
date_of_birth: date_of_birth,
|
|
241
|
+
email: email,
|
|
242
|
+
alternate_email: alternate_email,
|
|
243
|
+
phone_number: phone_number,
|
|
244
|
+
alternate_phone_number: alternate_phone_number,
|
|
245
|
+
gender: gender,
|
|
246
|
+
address: address,
|
|
247
|
+
account: account,
|
|
248
|
+
docv: docv,
|
|
249
|
+
otp: otp,
|
|
250
|
+
additional_context: additional_context,
|
|
251
|
+
di_session_token: di_session_token,
|
|
252
|
+
custom: custom,
|
|
253
|
+
additional_properties: additional_properties)
|
|
254
|
+
end
|
|
255
|
+
|
|
256
|
+
# Validates an instance of the object from a given value.
|
|
257
|
+
# @param [Individual1 | Hash] The value against the validation is performed.
|
|
258
|
+
def self.validate(value)
|
|
259
|
+
return true if value.instance_of? self
|
|
260
|
+
|
|
261
|
+
return false unless value.instance_of? Hash
|
|
262
|
+
|
|
263
|
+
true
|
|
264
|
+
end
|
|
265
|
+
|
|
266
|
+
# Provides a human-readable string representation of the object.
|
|
267
|
+
def to_s
|
|
268
|
+
class_name = self.class.name.split('::').last
|
|
269
|
+
"<#{class_name} id: #{@id}, given_name: #{@given_name}, family_name: #{@family_name},"\
|
|
270
|
+
" suffix: #{@suffix}, national_id: #{@national_id}, date_of_birth: #{@date_of_birth}, email:"\
|
|
271
|
+
" #{@email}, alternate_email: #{@alternate_email}, phone_number: #{@phone_number},"\
|
|
272
|
+
" alternate_phone_number: #{@alternate_phone_number}, gender: #{@gender}, address:"\
|
|
273
|
+
" #{@address}, account: #{@account}, docv: #{@docv}, otp: #{@otp}, additional_context:"\
|
|
274
|
+
" #{@additional_context}, di_session_token: #{@di_session_token}, custom: #{@custom},"\
|
|
275
|
+
" additional_properties: #{@additional_properties}>"
|
|
276
|
+
end
|
|
277
|
+
|
|
278
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
279
|
+
def inspect
|
|
280
|
+
class_name = self.class.name.split('::').last
|
|
281
|
+
"<#{class_name} id: #{@id.inspect}, given_name: #{@given_name.inspect}, family_name:"\
|
|
282
|
+
" #{@family_name.inspect}, suffix: #{@suffix.inspect}, national_id: #{@national_id.inspect},"\
|
|
283
|
+
" date_of_birth: #{@date_of_birth.inspect}, email: #{@email.inspect}, alternate_email:"\
|
|
284
|
+
" #{@alternate_email.inspect}, phone_number: #{@phone_number.inspect},"\
|
|
285
|
+
" alternate_phone_number: #{@alternate_phone_number.inspect}, gender: #{@gender.inspect},"\
|
|
286
|
+
" address: #{@address.inspect}, account: #{@account.inspect}, docv: #{@docv.inspect}, otp:"\
|
|
287
|
+
" #{@otp.inspect}, additional_context: #{@additional_context.inspect}, di_session_token:"\
|
|
288
|
+
" #{@di_session_token.inspect}, custom: #{@custom.inspect}, additional_properties:"\
|
|
289
|
+
" #{@additional_properties}>"
|
|
290
|
+
end
|
|
291
|
+
end
|
|
292
|
+
end
|