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,206 @@
|
|
|
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
|
+
# Minimal identity and device inputs used to verify the requester and gate
|
|
8
|
+
# identity-data disclosure. Only `phone_number` and `di_session_token` are
|
|
9
|
+
# required; additional attributes improve Prefill match accuracy.
|
|
10
|
+
class Individual3 < BaseModel
|
|
11
|
+
SKIP = Object.new
|
|
12
|
+
private_constant :SKIP
|
|
13
|
+
|
|
14
|
+
# Token from the Digital Intelligence SDK that links the device session.
|
|
15
|
+
# Generate it client-side before submitting the evaluation. Required to
|
|
16
|
+
# produce device risk signals for the data disclosure gate.
|
|
17
|
+
# @return [String]
|
|
18
|
+
attr_accessor :di_session_token
|
|
19
|
+
|
|
20
|
+
# The consumer's phone number. The API expects the standard E.164 format
|
|
21
|
+
# (e.g., +12025550147) but tolerates hyphens and spaces for user
|
|
22
|
+
# convenience.
|
|
23
|
+
# **Examples:**
|
|
24
|
+
# - United States: `+13475550100`
|
|
25
|
+
# - United Kingdom: `+447911123456`
|
|
26
|
+
# - Brazil: `+5511987654321`
|
|
27
|
+
# - India: `+919876543210`
|
|
28
|
+
# - Australia: `+61412345678`
|
|
29
|
+
# @return [String]
|
|
30
|
+
attr_accessor :phone_number
|
|
31
|
+
|
|
32
|
+
# The consumer's date of birth in the format YYYY-MM-DD, compliant with RFC
|
|
33
|
+
# 3339. Recommended to improve Prefill match accuracy.
|
|
34
|
+
# @return [Date]
|
|
35
|
+
attr_accessor :date_of_birth
|
|
36
|
+
|
|
37
|
+
# The consumer's national identification number. For US consumers, this can
|
|
38
|
+
# be a nine-digit Social Security Number (SSN) or Individual Tax
|
|
39
|
+
# Identification Number (ITIN). Partial SSNs (last four digits) are also
|
|
40
|
+
# accepted. Hyphens are optional. Recommended to improve Prefill match
|
|
41
|
+
# accuracy.
|
|
42
|
+
# @return [String]
|
|
43
|
+
attr_accessor :national_id
|
|
44
|
+
|
|
45
|
+
# The consumer's given name. Recommended to improve Prefill match accuracy.
|
|
46
|
+
# @return [String]
|
|
47
|
+
attr_accessor :given_name
|
|
48
|
+
|
|
49
|
+
# The consumer's family name. Recommended to improve Prefill match accuracy.
|
|
50
|
+
# @return [String]
|
|
51
|
+
attr_accessor :family_name
|
|
52
|
+
|
|
53
|
+
# The consumer's email address. May improve deny list screening.
|
|
54
|
+
# @return [String]
|
|
55
|
+
attr_accessor :email
|
|
56
|
+
|
|
57
|
+
# A customer-defined identifier for the consumer that maps to `userId` in
|
|
58
|
+
# enrichments or internal systems.
|
|
59
|
+
# @return [String]
|
|
60
|
+
attr_accessor :id
|
|
61
|
+
|
|
62
|
+
# A customer-defined identifier for the consumer that maps to `userId` in
|
|
63
|
+
# enrichments or internal systems.
|
|
64
|
+
# @return [Address]
|
|
65
|
+
attr_accessor :address
|
|
66
|
+
|
|
67
|
+
# Contains the OTP data for the transaction.
|
|
68
|
+
# @return [Otp]
|
|
69
|
+
attr_accessor :otp
|
|
70
|
+
|
|
71
|
+
# A mapping from model property names to API property names.
|
|
72
|
+
def self.names
|
|
73
|
+
@_hash = {} if @_hash.nil?
|
|
74
|
+
@_hash['di_session_token'] = 'di_session_token'
|
|
75
|
+
@_hash['phone_number'] = 'phone_number'
|
|
76
|
+
@_hash['date_of_birth'] = 'date_of_birth'
|
|
77
|
+
@_hash['national_id'] = 'national_id'
|
|
78
|
+
@_hash['given_name'] = 'given_name'
|
|
79
|
+
@_hash['family_name'] = 'family_name'
|
|
80
|
+
@_hash['email'] = 'email'
|
|
81
|
+
@_hash['id'] = 'id'
|
|
82
|
+
@_hash['address'] = 'address'
|
|
83
|
+
@_hash['otp'] = 'otp'
|
|
84
|
+
@_hash
|
|
85
|
+
end
|
|
86
|
+
|
|
87
|
+
# An array for optional fields
|
|
88
|
+
def self.optionals
|
|
89
|
+
%w[
|
|
90
|
+
date_of_birth
|
|
91
|
+
national_id
|
|
92
|
+
given_name
|
|
93
|
+
family_name
|
|
94
|
+
email
|
|
95
|
+
id
|
|
96
|
+
address
|
|
97
|
+
otp
|
|
98
|
+
]
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
# An array for nullable fields
|
|
102
|
+
def self.nullables
|
|
103
|
+
[]
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
def initialize(di_session_token:, phone_number:, date_of_birth: SKIP,
|
|
107
|
+
national_id: SKIP, given_name: SKIP, family_name: SKIP,
|
|
108
|
+
email: SKIP, id: SKIP, address: SKIP, otp: SKIP,
|
|
109
|
+
additional_properties: nil)
|
|
110
|
+
# Add additional model properties to the instance
|
|
111
|
+
additional_properties = {} if additional_properties.nil?
|
|
112
|
+
|
|
113
|
+
@di_session_token = di_session_token
|
|
114
|
+
@phone_number = phone_number
|
|
115
|
+
@date_of_birth = date_of_birth unless date_of_birth == SKIP
|
|
116
|
+
@national_id = national_id unless national_id == SKIP
|
|
117
|
+
@given_name = given_name unless given_name == SKIP
|
|
118
|
+
@family_name = family_name unless family_name == SKIP
|
|
119
|
+
@email = email unless email == SKIP
|
|
120
|
+
@id = id unless id == SKIP
|
|
121
|
+
@address = address unless address == SKIP
|
|
122
|
+
@otp = otp unless otp == SKIP
|
|
123
|
+
@additional_properties = additional_properties
|
|
124
|
+
end
|
|
125
|
+
|
|
126
|
+
# Creates an instance of the object from a hash.
|
|
127
|
+
def self.from_hash(hash)
|
|
128
|
+
return nil unless hash
|
|
129
|
+
|
|
130
|
+
# Extract variables from the hash.
|
|
131
|
+
di_session_token =
|
|
132
|
+
hash.key?('di_session_token') ? hash['di_session_token'] : nil
|
|
133
|
+
phone_number = hash.key?('phone_number') ? hash['phone_number'] : nil
|
|
134
|
+
date_of_birth = hash.key?('date_of_birth') ? hash['date_of_birth'] : SKIP
|
|
135
|
+
national_id = hash.key?('national_id') ? hash['national_id'] : SKIP
|
|
136
|
+
given_name = hash.key?('given_name') ? hash['given_name'] : SKIP
|
|
137
|
+
family_name = hash.key?('family_name') ? hash['family_name'] : SKIP
|
|
138
|
+
email = hash.key?('email') ? hash['email'] : SKIP
|
|
139
|
+
id = hash.key?('id') ? hash['id'] : SKIP
|
|
140
|
+
address = Address.from_hash(hash['address']) if hash['address']
|
|
141
|
+
otp = Otp.from_hash(hash['otp']) if hash['otp']
|
|
142
|
+
|
|
143
|
+
# Create a new hash for additional properties, removing known properties.
|
|
144
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
145
|
+
|
|
146
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
147
|
+
new_hash, proc { |value| value }
|
|
148
|
+
)
|
|
149
|
+
|
|
150
|
+
# Create object from extracted values.
|
|
151
|
+
Individual3.new(di_session_token: di_session_token,
|
|
152
|
+
phone_number: phone_number,
|
|
153
|
+
date_of_birth: date_of_birth,
|
|
154
|
+
national_id: national_id,
|
|
155
|
+
given_name: given_name,
|
|
156
|
+
family_name: family_name,
|
|
157
|
+
email: email,
|
|
158
|
+
id: id,
|
|
159
|
+
address: address,
|
|
160
|
+
otp: otp,
|
|
161
|
+
additional_properties: additional_properties)
|
|
162
|
+
end
|
|
163
|
+
|
|
164
|
+
# Validates an instance of the object from a given value.
|
|
165
|
+
# @param [Individual3 | Hash] The value against the validation is performed.
|
|
166
|
+
def self.validate(value)
|
|
167
|
+
if value.instance_of? self
|
|
168
|
+
return (
|
|
169
|
+
APIHelper.valid_type?(value.di_session_token,
|
|
170
|
+
->(val) { val.instance_of? String }) and
|
|
171
|
+
APIHelper.valid_type?(value.phone_number,
|
|
172
|
+
->(val) { val.instance_of? String })
|
|
173
|
+
)
|
|
174
|
+
end
|
|
175
|
+
|
|
176
|
+
return false unless value.instance_of? Hash
|
|
177
|
+
|
|
178
|
+
(
|
|
179
|
+
APIHelper.valid_type?(value['di_session_token'],
|
|
180
|
+
->(val) { val.instance_of? String }) and
|
|
181
|
+
APIHelper.valid_type?(value['phone_number'],
|
|
182
|
+
->(val) { val.instance_of? String })
|
|
183
|
+
)
|
|
184
|
+
end
|
|
185
|
+
|
|
186
|
+
# Provides a human-readable string representation of the object.
|
|
187
|
+
def to_s
|
|
188
|
+
class_name = self.class.name.split('::').last
|
|
189
|
+
"<#{class_name} di_session_token: #{@di_session_token}, phone_number: #{@phone_number},"\
|
|
190
|
+
" date_of_birth: #{@date_of_birth}, national_id: #{@national_id}, given_name:"\
|
|
191
|
+
" #{@given_name}, family_name: #{@family_name}, email: #{@email}, id: #{@id}, address:"\
|
|
192
|
+
" #{@address}, otp: #{@otp}, additional_properties: #{@additional_properties}>"
|
|
193
|
+
end
|
|
194
|
+
|
|
195
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
196
|
+
def inspect
|
|
197
|
+
class_name = self.class.name.split('::').last
|
|
198
|
+
"<#{class_name} di_session_token: #{@di_session_token.inspect}, phone_number:"\
|
|
199
|
+
" #{@phone_number.inspect}, date_of_birth: #{@date_of_birth.inspect}, national_id:"\
|
|
200
|
+
" #{@national_id.inspect}, given_name: #{@given_name.inspect}, family_name:"\
|
|
201
|
+
" #{@family_name.inspect}, email: #{@email.inspect}, id: #{@id.inspect}, address:"\
|
|
202
|
+
" #{@address.inspect}, otp: #{@otp.inspect}, additional_properties:"\
|
|
203
|
+
" #{@additional_properties}>"
|
|
204
|
+
end
|
|
205
|
+
end
|
|
206
|
+
end
|
|
@@ -0,0 +1,182 @@
|
|
|
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
|
+
# Information about the individual being verified.
|
|
8
|
+
class Individual4 < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# Unique identifier for the individual.
|
|
13
|
+
# @return [UUID | String]
|
|
14
|
+
attr_accessor :id
|
|
15
|
+
|
|
16
|
+
# The consumer's given name.
|
|
17
|
+
# **Requirements:**
|
|
18
|
+
# - Must be UTF-8 encoded
|
|
19
|
+
# - Supports single-byte Latin characters only
|
|
20
|
+
# - The following special characters are not supported:
|
|
21
|
+
# ^ ± ! @ £ $ % & * _ + ¡ € # ¢ § ¶ • ª º « < > ? \ / : ; | =
|
|
22
|
+
# @return [String]
|
|
23
|
+
attr_accessor :given_name
|
|
24
|
+
|
|
25
|
+
# The consumer's family name.
|
|
26
|
+
# **Requirements:**
|
|
27
|
+
# - Must be UTF-8 encoded
|
|
28
|
+
# - Supports single-byte Latin characters only
|
|
29
|
+
# - The following special characters are not supported:
|
|
30
|
+
# ^ ± ! @ £ $ % & * _ + ¡ € # ¢ § ¶ • ª º « < > ? \ / : ; | =
|
|
31
|
+
# @return [String]
|
|
32
|
+
attr_accessor :family_name
|
|
33
|
+
|
|
34
|
+
# Email address of the individual.
|
|
35
|
+
# @return [String]
|
|
36
|
+
attr_accessor :email
|
|
37
|
+
|
|
38
|
+
# Phone number for the individual. Not strictly E.164 to allow dashes and
|
|
39
|
+
# country codes.
|
|
40
|
+
# @return [String]
|
|
41
|
+
attr_accessor :phone_number
|
|
42
|
+
|
|
43
|
+
# Mailing address for the individual.
|
|
44
|
+
# @return [Address1]
|
|
45
|
+
attr_accessor :address
|
|
46
|
+
|
|
47
|
+
# Token required to extract Device Intelligence (DI) signals.
|
|
48
|
+
# @return [String]
|
|
49
|
+
attr_accessor :di_session_token
|
|
50
|
+
|
|
51
|
+
# A mapping from model property names to API property names.
|
|
52
|
+
def self.names
|
|
53
|
+
@_hash = {} if @_hash.nil?
|
|
54
|
+
@_hash['id'] = 'id'
|
|
55
|
+
@_hash['given_name'] = 'given_name'
|
|
56
|
+
@_hash['family_name'] = 'family_name'
|
|
57
|
+
@_hash['email'] = 'email'
|
|
58
|
+
@_hash['phone_number'] = 'phone_number'
|
|
59
|
+
@_hash['address'] = 'address'
|
|
60
|
+
@_hash['di_session_token'] = 'di_session_token'
|
|
61
|
+
@_hash
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
# An array for optional fields
|
|
65
|
+
def self.optionals
|
|
66
|
+
[]
|
|
67
|
+
end
|
|
68
|
+
|
|
69
|
+
# An array for nullable fields
|
|
70
|
+
def self.nullables
|
|
71
|
+
[]
|
|
72
|
+
end
|
|
73
|
+
|
|
74
|
+
def initialize(id:, given_name:, family_name:, email:, phone_number:,
|
|
75
|
+
address:, di_session_token:, additional_properties: nil)
|
|
76
|
+
# Add additional model properties to the instance
|
|
77
|
+
additional_properties = {} if additional_properties.nil?
|
|
78
|
+
|
|
79
|
+
@id = id
|
|
80
|
+
@given_name = given_name
|
|
81
|
+
@family_name = family_name
|
|
82
|
+
@email = email
|
|
83
|
+
@phone_number = phone_number
|
|
84
|
+
@address = address
|
|
85
|
+
@di_session_token = di_session_token
|
|
86
|
+
@additional_properties = additional_properties
|
|
87
|
+
end
|
|
88
|
+
|
|
89
|
+
# Creates an instance of the object from a hash.
|
|
90
|
+
def self.from_hash(hash)
|
|
91
|
+
return nil unless hash
|
|
92
|
+
|
|
93
|
+
# Extract variables from the hash.
|
|
94
|
+
id = hash.key?('id') ? hash['id'] : nil
|
|
95
|
+
given_name = hash.key?('given_name') ? hash['given_name'] : nil
|
|
96
|
+
family_name = hash.key?('family_name') ? hash['family_name'] : nil
|
|
97
|
+
email = hash.key?('email') ? hash['email'] : nil
|
|
98
|
+
phone_number = hash.key?('phone_number') ? hash['phone_number'] : nil
|
|
99
|
+
address = Address1.from_hash(hash['address']) if hash['address']
|
|
100
|
+
di_session_token =
|
|
101
|
+
hash.key?('di_session_token') ? hash['di_session_token'] : nil
|
|
102
|
+
|
|
103
|
+
# Create a new hash for additional properties, removing known properties.
|
|
104
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
105
|
+
|
|
106
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
107
|
+
new_hash, proc { |value| value }
|
|
108
|
+
)
|
|
109
|
+
|
|
110
|
+
# Create object from extracted values.
|
|
111
|
+
Individual4.new(id: id,
|
|
112
|
+
given_name: given_name,
|
|
113
|
+
family_name: family_name,
|
|
114
|
+
email: email,
|
|
115
|
+
phone_number: phone_number,
|
|
116
|
+
address: address,
|
|
117
|
+
di_session_token: di_session_token,
|
|
118
|
+
additional_properties: additional_properties)
|
|
119
|
+
end
|
|
120
|
+
|
|
121
|
+
# Validates an instance of the object from a given value.
|
|
122
|
+
# @param [Individual4 | Hash] The value against the validation is performed.
|
|
123
|
+
def self.validate(value)
|
|
124
|
+
if value.instance_of? self
|
|
125
|
+
return (
|
|
126
|
+
APIHelper.valid_type?(value.id,
|
|
127
|
+
->(val) { val.instance_of? String }) and
|
|
128
|
+
APIHelper.valid_type?(value.given_name,
|
|
129
|
+
->(val) { val.instance_of? String }) and
|
|
130
|
+
APIHelper.valid_type?(value.family_name,
|
|
131
|
+
->(val) { val.instance_of? String }) and
|
|
132
|
+
APIHelper.valid_type?(value.email,
|
|
133
|
+
->(val) { val.instance_of? String }) and
|
|
134
|
+
APIHelper.valid_type?(value.phone_number,
|
|
135
|
+
->(val) { val.instance_of? String }) and
|
|
136
|
+
APIHelper.valid_type?(value.address,
|
|
137
|
+
->(val) { Address1.validate(val) },
|
|
138
|
+
is_model_hash: true) and
|
|
139
|
+
APIHelper.valid_type?(value.di_session_token,
|
|
140
|
+
->(val) { val.instance_of? String })
|
|
141
|
+
)
|
|
142
|
+
end
|
|
143
|
+
|
|
144
|
+
return false unless value.instance_of? Hash
|
|
145
|
+
|
|
146
|
+
(
|
|
147
|
+
APIHelper.valid_type?(value['id'],
|
|
148
|
+
->(val) { val.instance_of? String }) and
|
|
149
|
+
APIHelper.valid_type?(value['given_name'],
|
|
150
|
+
->(val) { val.instance_of? String }) and
|
|
151
|
+
APIHelper.valid_type?(value['family_name'],
|
|
152
|
+
->(val) { val.instance_of? String }) and
|
|
153
|
+
APIHelper.valid_type?(value['email'],
|
|
154
|
+
->(val) { val.instance_of? String }) and
|
|
155
|
+
APIHelper.valid_type?(value['phone_number'],
|
|
156
|
+
->(val) { val.instance_of? String }) and
|
|
157
|
+
APIHelper.valid_type?(value['address'],
|
|
158
|
+
->(val) { Address1.validate(val) },
|
|
159
|
+
is_model_hash: true) and
|
|
160
|
+
APIHelper.valid_type?(value['di_session_token'],
|
|
161
|
+
->(val) { val.instance_of? String })
|
|
162
|
+
)
|
|
163
|
+
end
|
|
164
|
+
|
|
165
|
+
# Provides a human-readable string representation of the object.
|
|
166
|
+
def to_s
|
|
167
|
+
class_name = self.class.name.split('::').last
|
|
168
|
+
"<#{class_name} id: #{@id}, given_name: #{@given_name}, family_name: #{@family_name},"\
|
|
169
|
+
" email: #{@email}, phone_number: #{@phone_number}, address: #{@address}, di_session_token:"\
|
|
170
|
+
" #{@di_session_token}, additional_properties: #{@additional_properties}>"
|
|
171
|
+
end
|
|
172
|
+
|
|
173
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
174
|
+
def inspect
|
|
175
|
+
class_name = self.class.name.split('::').last
|
|
176
|
+
"<#{class_name} id: #{@id.inspect}, given_name: #{@given_name.inspect}, family_name:"\
|
|
177
|
+
" #{@family_name.inspect}, email: #{@email.inspect}, phone_number: #{@phone_number.inspect},"\
|
|
178
|
+
" address: #{@address.inspect}, di_session_token: #{@di_session_token.inspect},"\
|
|
179
|
+
" additional_properties: #{@additional_properties}>"
|
|
180
|
+
end
|
|
181
|
+
end
|
|
182
|
+
end
|
|
@@ -0,0 +1,297 @@
|
|
|
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 Individual5 < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# Optional flag that, if set to `true`, forces the evaluation to skip the
|
|
13
|
+
# current paused step and continue from the next step.
|
|
14
|
+
# @return [TrueClass | FalseClass]
|
|
15
|
+
attr_accessor :force_resume_evaluation
|
|
16
|
+
|
|
17
|
+
# A unique identifier for a consumer provided by the customer, used across
|
|
18
|
+
# various use cases.
|
|
19
|
+
# @return [String]
|
|
20
|
+
attr_accessor :id
|
|
21
|
+
|
|
22
|
+
# The consumer's given name.
|
|
23
|
+
# **Requirements:**
|
|
24
|
+
# - Must be UTF-8 encoded
|
|
25
|
+
# - Supports single-byte Latin characters only
|
|
26
|
+
# - The following special characters are not supported:
|
|
27
|
+
# ^ ± ! @ £ $ % & * _ + ¡ € # ¢ § ¶ • ª º « < > ? \ / : ; | =
|
|
28
|
+
# @return [String]
|
|
29
|
+
attr_accessor :given_name
|
|
30
|
+
|
|
31
|
+
# The consumer's family name.
|
|
32
|
+
# **Requirements:**
|
|
33
|
+
# - Must be UTF-8 encoded
|
|
34
|
+
# - Supports single-byte Latin characters only
|
|
35
|
+
# - The following special characters are not supported:
|
|
36
|
+
# ^ ± ! @ £ $ % & * _ + ¡ € # ¢ § ¶ • ª º « < > ? \ / : ; | =
|
|
37
|
+
# @return [String]
|
|
38
|
+
attr_accessor :family_name
|
|
39
|
+
|
|
40
|
+
# A suffix for the consumer's name, if applicable (e.g., Jr., Sr., III).
|
|
41
|
+
# @return [String]
|
|
42
|
+
attr_accessor :suffix
|
|
43
|
+
|
|
44
|
+
# The consumer's national identification number. For US consumers, this can
|
|
45
|
+
# be a nine-digit Social Security Number (SSN) or Individual Tax
|
|
46
|
+
# Identification Number (ITIN). Partial SSNs (last four digits) are also
|
|
47
|
+
# accepted. Hyphens are optional.
|
|
48
|
+
# @return [String]
|
|
49
|
+
attr_accessor :national_id
|
|
50
|
+
|
|
51
|
+
# The consumer's date of birth in the format YYYY-MM-DD, compliant with RFC
|
|
52
|
+
# 3339.
|
|
53
|
+
# @return [Date]
|
|
54
|
+
attr_accessor :date_of_birth
|
|
55
|
+
|
|
56
|
+
# The consumer's email address.
|
|
57
|
+
# @return [String]
|
|
58
|
+
attr_accessor :email
|
|
59
|
+
|
|
60
|
+
# The consumer's alternate email address.
|
|
61
|
+
# @return [String]
|
|
62
|
+
attr_accessor :alternate_email
|
|
63
|
+
|
|
64
|
+
# The consumer's phone number, including country code.
|
|
65
|
+
# @return [String]
|
|
66
|
+
attr_accessor :phone_number
|
|
67
|
+
|
|
68
|
+
# The consumer's alternate phone number, including country code.
|
|
69
|
+
# @return [String]
|
|
70
|
+
attr_accessor :alternate_phone_number
|
|
71
|
+
|
|
72
|
+
# The consumer's gender.
|
|
73
|
+
# @return [Gender]
|
|
74
|
+
attr_accessor :gender
|
|
75
|
+
|
|
76
|
+
# The consumer's gender.
|
|
77
|
+
# @return [Address]
|
|
78
|
+
attr_accessor :address
|
|
79
|
+
|
|
80
|
+
# Defines the schema of an bank account.
|
|
81
|
+
# @return [Account]
|
|
82
|
+
attr_accessor :account
|
|
83
|
+
|
|
84
|
+
# Defines the schema of an bank account.
|
|
85
|
+
# @return [Docv]
|
|
86
|
+
attr_accessor :docv
|
|
87
|
+
|
|
88
|
+
# Contains the OTP data for the transaction.
|
|
89
|
+
# > **Note:** In a `PATCH` request, the `OTP` object uses the following:
|
|
90
|
+
# - The `code` field to send the OTP code to RiskOS™ for verification.
|
|
91
|
+
# - The `resend` flag to re-trigger the send OTP block.
|
|
92
|
+
# @return [Otp1]
|
|
93
|
+
attr_accessor :otp
|
|
94
|
+
|
|
95
|
+
# Use this field to pass additional data required by specific Socure
|
|
96
|
+
# products. Additional fields are typically optional and should only be used
|
|
97
|
+
# if explicitly stated in the product documentation.
|
|
98
|
+
# @return [AdditionalContext]
|
|
99
|
+
attr_accessor :additional_context
|
|
100
|
+
|
|
101
|
+
# Token required to extract Device Intelligence (DI) signals.
|
|
102
|
+
# @return [String]
|
|
103
|
+
attr_accessor :di_session_token
|
|
104
|
+
|
|
105
|
+
# Send any additional, customer-specific data for this consumer in this
|
|
106
|
+
# field. See [Custom
|
|
107
|
+
# Fields](https://help.socure.com/riskos/docs/custom-fields) for more
|
|
108
|
+
# information.
|
|
109
|
+
# @return [Object]
|
|
110
|
+
attr_accessor :custom
|
|
111
|
+
|
|
112
|
+
# A mapping from model property names to API property names.
|
|
113
|
+
def self.names
|
|
114
|
+
@_hash = {} if @_hash.nil?
|
|
115
|
+
@_hash['force_resume_evaluation'] = 'force_resume_evaluation'
|
|
116
|
+
@_hash['id'] = 'id'
|
|
117
|
+
@_hash['given_name'] = 'given_name'
|
|
118
|
+
@_hash['family_name'] = 'family_name'
|
|
119
|
+
@_hash['suffix'] = 'suffix'
|
|
120
|
+
@_hash['national_id'] = 'national_id'
|
|
121
|
+
@_hash['date_of_birth'] = 'date_of_birth'
|
|
122
|
+
@_hash['email'] = 'email'
|
|
123
|
+
@_hash['alternate_email'] = 'alternate_email'
|
|
124
|
+
@_hash['phone_number'] = 'phone_number'
|
|
125
|
+
@_hash['alternate_phone_number'] = 'alternate_phone_number'
|
|
126
|
+
@_hash['gender'] = 'gender'
|
|
127
|
+
@_hash['address'] = 'address'
|
|
128
|
+
@_hash['account'] = 'account'
|
|
129
|
+
@_hash['docv'] = 'docv'
|
|
130
|
+
@_hash['otp'] = 'otp'
|
|
131
|
+
@_hash['additional_context'] = 'additional_context'
|
|
132
|
+
@_hash['di_session_token'] = 'di_session_token'
|
|
133
|
+
@_hash['custom'] = 'custom'
|
|
134
|
+
@_hash
|
|
135
|
+
end
|
|
136
|
+
|
|
137
|
+
# An array for optional fields
|
|
138
|
+
def self.optionals
|
|
139
|
+
%w[
|
|
140
|
+
force_resume_evaluation
|
|
141
|
+
id
|
|
142
|
+
given_name
|
|
143
|
+
family_name
|
|
144
|
+
suffix
|
|
145
|
+
national_id
|
|
146
|
+
date_of_birth
|
|
147
|
+
email
|
|
148
|
+
alternate_email
|
|
149
|
+
phone_number
|
|
150
|
+
alternate_phone_number
|
|
151
|
+
gender
|
|
152
|
+
address
|
|
153
|
+
account
|
|
154
|
+
docv
|
|
155
|
+
otp
|
|
156
|
+
additional_context
|
|
157
|
+
di_session_token
|
|
158
|
+
custom
|
|
159
|
+
]
|
|
160
|
+
end
|
|
161
|
+
|
|
162
|
+
# An array for nullable fields
|
|
163
|
+
def self.nullables
|
|
164
|
+
[]
|
|
165
|
+
end
|
|
166
|
+
|
|
167
|
+
def initialize(force_resume_evaluation: SKIP, id: SKIP, given_name: SKIP,
|
|
168
|
+
family_name: SKIP, suffix: SKIP, national_id: SKIP,
|
|
169
|
+
date_of_birth: SKIP, email: SKIP, alternate_email: SKIP,
|
|
170
|
+
phone_number: SKIP, alternate_phone_number: SKIP,
|
|
171
|
+
gender: SKIP, address: SKIP, account: SKIP, docv: SKIP,
|
|
172
|
+
otp: SKIP, additional_context: SKIP, di_session_token: SKIP,
|
|
173
|
+
custom: SKIP, additional_properties: nil)
|
|
174
|
+
# Add additional model properties to the instance
|
|
175
|
+
additional_properties = {} if additional_properties.nil?
|
|
176
|
+
|
|
177
|
+
@force_resume_evaluation = force_resume_evaluation unless force_resume_evaluation == SKIP
|
|
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
|
+
force_resume_evaluation =
|
|
205
|
+
hash.key?('force_resume_evaluation') ? hash['force_resume_evaluation'] : SKIP
|
|
206
|
+
id = hash.key?('id') ? hash['id'] : SKIP
|
|
207
|
+
given_name = hash.key?('given_name') ? hash['given_name'] : SKIP
|
|
208
|
+
family_name = hash.key?('family_name') ? hash['family_name'] : SKIP
|
|
209
|
+
suffix = hash.key?('suffix') ? hash['suffix'] : SKIP
|
|
210
|
+
national_id = hash.key?('national_id') ? hash['national_id'] : SKIP
|
|
211
|
+
date_of_birth = hash.key?('date_of_birth') ? hash['date_of_birth'] : SKIP
|
|
212
|
+
email = hash.key?('email') ? hash['email'] : SKIP
|
|
213
|
+
alternate_email =
|
|
214
|
+
hash.key?('alternate_email') ? hash['alternate_email'] : SKIP
|
|
215
|
+
phone_number = hash.key?('phone_number') ? hash['phone_number'] : SKIP
|
|
216
|
+
alternate_phone_number =
|
|
217
|
+
hash.key?('alternate_phone_number') ? hash['alternate_phone_number'] : SKIP
|
|
218
|
+
gender = hash.key?('gender') ? hash['gender'] : SKIP
|
|
219
|
+
address = Address.from_hash(hash['address']) if hash['address']
|
|
220
|
+
account = Account.from_hash(hash['account']) if hash['account']
|
|
221
|
+
docv = Docv.from_hash(hash['docv']) if hash['docv']
|
|
222
|
+
otp = Otp1.from_hash(hash['otp']) if hash['otp']
|
|
223
|
+
additional_context = AdditionalContext.from_hash(hash['additional_context']) if
|
|
224
|
+
hash['additional_context']
|
|
225
|
+
di_session_token =
|
|
226
|
+
hash.key?('di_session_token') ? hash['di_session_token'] : SKIP
|
|
227
|
+
custom = hash.key?('custom') ? hash['custom'] : SKIP
|
|
228
|
+
|
|
229
|
+
# Create a new hash for additional properties, removing known properties.
|
|
230
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
231
|
+
|
|
232
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
233
|
+
new_hash, proc { |value| value }
|
|
234
|
+
)
|
|
235
|
+
|
|
236
|
+
# Create object from extracted values.
|
|
237
|
+
Individual5.new(force_resume_evaluation: force_resume_evaluation,
|
|
238
|
+
id: id,
|
|
239
|
+
given_name: given_name,
|
|
240
|
+
family_name: family_name,
|
|
241
|
+
suffix: suffix,
|
|
242
|
+
national_id: national_id,
|
|
243
|
+
date_of_birth: date_of_birth,
|
|
244
|
+
email: email,
|
|
245
|
+
alternate_email: alternate_email,
|
|
246
|
+
phone_number: phone_number,
|
|
247
|
+
alternate_phone_number: alternate_phone_number,
|
|
248
|
+
gender: gender,
|
|
249
|
+
address: address,
|
|
250
|
+
account: account,
|
|
251
|
+
docv: docv,
|
|
252
|
+
otp: otp,
|
|
253
|
+
additional_context: additional_context,
|
|
254
|
+
di_session_token: di_session_token,
|
|
255
|
+
custom: custom,
|
|
256
|
+
additional_properties: additional_properties)
|
|
257
|
+
end
|
|
258
|
+
|
|
259
|
+
# Validates an instance of the object from a given value.
|
|
260
|
+
# @param [Individual5 | Hash] The value against the validation is performed.
|
|
261
|
+
def self.validate(value)
|
|
262
|
+
return true if value.instance_of? self
|
|
263
|
+
|
|
264
|
+
return false unless value.instance_of? Hash
|
|
265
|
+
|
|
266
|
+
true
|
|
267
|
+
end
|
|
268
|
+
|
|
269
|
+
# Provides a human-readable string representation of the object.
|
|
270
|
+
def to_s
|
|
271
|
+
class_name = self.class.name.split('::').last
|
|
272
|
+
"<#{class_name} force_resume_evaluation: #{@force_resume_evaluation}, id: #{@id},"\
|
|
273
|
+
" given_name: #{@given_name}, family_name: #{@family_name}, suffix: #{@suffix}, national_id:"\
|
|
274
|
+
" #{@national_id}, date_of_birth: #{@date_of_birth}, email: #{@email}, alternate_email:"\
|
|
275
|
+
" #{@alternate_email}, phone_number: #{@phone_number}, alternate_phone_number:"\
|
|
276
|
+
" #{@alternate_phone_number}, gender: #{@gender}, address: #{@address}, account:"\
|
|
277
|
+
" #{@account}, docv: #{@docv}, otp: #{@otp}, additional_context: #{@additional_context},"\
|
|
278
|
+
" di_session_token: #{@di_session_token}, custom: #{@custom}, additional_properties:"\
|
|
279
|
+
" #{@additional_properties}>"
|
|
280
|
+
end
|
|
281
|
+
|
|
282
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
283
|
+
def inspect
|
|
284
|
+
class_name = self.class.name.split('::').last
|
|
285
|
+
"<#{class_name} force_resume_evaluation: #{@force_resume_evaluation.inspect}, id:"\
|
|
286
|
+
" #{@id.inspect}, given_name: #{@given_name.inspect}, family_name: #{@family_name.inspect},"\
|
|
287
|
+
" suffix: #{@suffix.inspect}, national_id: #{@national_id.inspect}, date_of_birth:"\
|
|
288
|
+
" #{@date_of_birth.inspect}, email: #{@email.inspect}, alternate_email:"\
|
|
289
|
+
" #{@alternate_email.inspect}, phone_number: #{@phone_number.inspect},"\
|
|
290
|
+
" alternate_phone_number: #{@alternate_phone_number.inspect}, gender: #{@gender.inspect},"\
|
|
291
|
+
" address: #{@address.inspect}, account: #{@account.inspect}, docv: #{@docv.inspect}, otp:"\
|
|
292
|
+
" #{@otp.inspect}, additional_context: #{@additional_context.inspect}, di_session_token:"\
|
|
293
|
+
" #{@di_session_token.inspect}, custom: #{@custom.inspect}, additional_properties:"\
|
|
294
|
+
" #{@additional_properties}>"
|
|
295
|
+
end
|
|
296
|
+
end
|
|
297
|
+
end
|