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,270 @@
|
|
|
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
|
+
# AdditionalIndividual Model.
|
|
8
|
+
class AdditionalIndividual < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# A unique identifier for an 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
|
+
# @return [String]
|
|
19
|
+
attr_accessor :given_name
|
|
20
|
+
|
|
21
|
+
# The consumer's family name.
|
|
22
|
+
# @return [String]
|
|
23
|
+
attr_accessor :family_name
|
|
24
|
+
|
|
25
|
+
# A suffix for the consumer's name, if applicable (e.g., Jr., Sr., III).
|
|
26
|
+
# @return [String]
|
|
27
|
+
attr_accessor :suffix
|
|
28
|
+
|
|
29
|
+
# The consumer's national identification number. For US consumer, this can
|
|
30
|
+
# be a nine-digit Social Security Number (SSN) or Individual Tax
|
|
31
|
+
# Identification Number (ITIN). Partial SSNs (last four digits) are also
|
|
32
|
+
# accepted. Hyphens are optional.
|
|
33
|
+
# @return [String]
|
|
34
|
+
attr_accessor :national_id
|
|
35
|
+
|
|
36
|
+
# The consumer's date of birth in the format YYYY-MM-DD, compliant with RFC
|
|
37
|
+
# 3339.
|
|
38
|
+
# @return [Date]
|
|
39
|
+
attr_accessor :date_of_birth
|
|
40
|
+
|
|
41
|
+
# The consumer's email address.
|
|
42
|
+
# @return [String]
|
|
43
|
+
attr_accessor :email
|
|
44
|
+
|
|
45
|
+
# The consumer's alternate email address.
|
|
46
|
+
# @return [String]
|
|
47
|
+
attr_accessor :alternate_email
|
|
48
|
+
|
|
49
|
+
# The consumer’s phone number. The API accepts E.164 format (e.g.,
|
|
50
|
+
# `+12025550147`) but tolerates hyphens and spaces for user convenience.
|
|
51
|
+
# Example formats:
|
|
52
|
+
# - United States: `+13475550100`
|
|
53
|
+
# - United Kingdom: `+447911123456`
|
|
54
|
+
# - Brazil: `+5511987654321`
|
|
55
|
+
# - India: `+919876543210`
|
|
56
|
+
# - Australia: `+61412345678`
|
|
57
|
+
# @return [String]
|
|
58
|
+
attr_accessor :phone_number
|
|
59
|
+
|
|
60
|
+
# The consumer’s alternate phone number. The API accepts E.164 format (e.g.,
|
|
61
|
+
# `+12025550147`) but tolerates hyphens and spaces for user convenience.
|
|
62
|
+
# @return [String]
|
|
63
|
+
attr_accessor :alternate_phone_number
|
|
64
|
+
|
|
65
|
+
# The consumer's gender.
|
|
66
|
+
# @return [Gender]
|
|
67
|
+
attr_accessor :gender
|
|
68
|
+
|
|
69
|
+
# The consumer's gender.
|
|
70
|
+
# @return [Address]
|
|
71
|
+
attr_accessor :address
|
|
72
|
+
|
|
73
|
+
# Defines the schema of an bank account.
|
|
74
|
+
# @return [Account]
|
|
75
|
+
attr_accessor :account
|
|
76
|
+
|
|
77
|
+
# Defines the schema of an bank account.
|
|
78
|
+
# @return [Docv]
|
|
79
|
+
attr_accessor :docv
|
|
80
|
+
|
|
81
|
+
# Use this field to pass additional data required by specific Socure
|
|
82
|
+
# products. Additional fields are typically optional and should only be used
|
|
83
|
+
# if explicitly stated in the product documentation.
|
|
84
|
+
# @return [AdditionalContext]
|
|
85
|
+
attr_accessor :additional_context
|
|
86
|
+
|
|
87
|
+
# Token required to extract Device Intelligence (DI) signals.
|
|
88
|
+
# @return [String]
|
|
89
|
+
attr_accessor :di_session_token
|
|
90
|
+
|
|
91
|
+
# Send any additional, customer-specific data for this consumer in this
|
|
92
|
+
# field. See [Custom
|
|
93
|
+
# Fields](https://help.socure.com/riskos/docs/custom-fields) for more
|
|
94
|
+
# information.
|
|
95
|
+
# @return [Object]
|
|
96
|
+
attr_accessor :custom
|
|
97
|
+
|
|
98
|
+
# A mapping from model property names to API property names.
|
|
99
|
+
def self.names
|
|
100
|
+
@_hash = {} if @_hash.nil?
|
|
101
|
+
@_hash['id'] = 'id'
|
|
102
|
+
@_hash['given_name'] = 'given_name'
|
|
103
|
+
@_hash['family_name'] = 'family_name'
|
|
104
|
+
@_hash['suffix'] = 'suffix'
|
|
105
|
+
@_hash['national_id'] = 'national_id'
|
|
106
|
+
@_hash['date_of_birth'] = 'date_of_birth'
|
|
107
|
+
@_hash['email'] = 'email'
|
|
108
|
+
@_hash['alternate_email'] = 'alternate_email'
|
|
109
|
+
@_hash['phone_number'] = 'phone_number'
|
|
110
|
+
@_hash['alternate_phone_number'] = 'alternate_phone_number'
|
|
111
|
+
@_hash['gender'] = 'gender'
|
|
112
|
+
@_hash['address'] = 'address'
|
|
113
|
+
@_hash['account'] = 'account'
|
|
114
|
+
@_hash['docv'] = 'docv'
|
|
115
|
+
@_hash['additional_context'] = 'additional_context'
|
|
116
|
+
@_hash['di_session_token'] = 'di_session_token'
|
|
117
|
+
@_hash['custom'] = 'custom'
|
|
118
|
+
@_hash
|
|
119
|
+
end
|
|
120
|
+
|
|
121
|
+
# An array for optional fields
|
|
122
|
+
def self.optionals
|
|
123
|
+
%w[
|
|
124
|
+
id
|
|
125
|
+
given_name
|
|
126
|
+
family_name
|
|
127
|
+
suffix
|
|
128
|
+
national_id
|
|
129
|
+
date_of_birth
|
|
130
|
+
email
|
|
131
|
+
alternate_email
|
|
132
|
+
phone_number
|
|
133
|
+
alternate_phone_number
|
|
134
|
+
gender
|
|
135
|
+
address
|
|
136
|
+
account
|
|
137
|
+
docv
|
|
138
|
+
additional_context
|
|
139
|
+
di_session_token
|
|
140
|
+
custom
|
|
141
|
+
]
|
|
142
|
+
end
|
|
143
|
+
|
|
144
|
+
# An array for nullable fields
|
|
145
|
+
def self.nullables
|
|
146
|
+
[]
|
|
147
|
+
end
|
|
148
|
+
|
|
149
|
+
def initialize(id: SKIP, given_name: SKIP, family_name: SKIP, suffix: SKIP,
|
|
150
|
+
national_id: SKIP, date_of_birth: SKIP, email: SKIP,
|
|
151
|
+
alternate_email: SKIP, phone_number: SKIP,
|
|
152
|
+
alternate_phone_number: SKIP, gender: SKIP, address: SKIP,
|
|
153
|
+
account: SKIP, docv: SKIP, additional_context: SKIP,
|
|
154
|
+
di_session_token: SKIP, custom: SKIP,
|
|
155
|
+
additional_properties: nil)
|
|
156
|
+
# Add additional model properties to the instance
|
|
157
|
+
additional_properties = {} if additional_properties.nil?
|
|
158
|
+
|
|
159
|
+
@id = id unless id == SKIP
|
|
160
|
+
@given_name = given_name unless given_name == SKIP
|
|
161
|
+
@family_name = family_name unless family_name == SKIP
|
|
162
|
+
@suffix = suffix unless suffix == SKIP
|
|
163
|
+
@national_id = national_id unless national_id == SKIP
|
|
164
|
+
@date_of_birth = date_of_birth unless date_of_birth == SKIP
|
|
165
|
+
@email = email unless email == SKIP
|
|
166
|
+
@alternate_email = alternate_email unless alternate_email == SKIP
|
|
167
|
+
@phone_number = phone_number unless phone_number == SKIP
|
|
168
|
+
@alternate_phone_number = alternate_phone_number unless alternate_phone_number == SKIP
|
|
169
|
+
@gender = gender unless gender == SKIP
|
|
170
|
+
@address = address unless address == SKIP
|
|
171
|
+
@account = account unless account == SKIP
|
|
172
|
+
@docv = docv unless docv == SKIP
|
|
173
|
+
@additional_context = additional_context unless additional_context == SKIP
|
|
174
|
+
@di_session_token = di_session_token unless di_session_token == SKIP
|
|
175
|
+
@custom = custom unless custom == SKIP
|
|
176
|
+
@additional_properties = additional_properties
|
|
177
|
+
end
|
|
178
|
+
|
|
179
|
+
# Creates an instance of the object from a hash.
|
|
180
|
+
def self.from_hash(hash)
|
|
181
|
+
return nil unless hash
|
|
182
|
+
|
|
183
|
+
# Extract variables from the hash.
|
|
184
|
+
id = hash.key?('id') ? hash['id'] : SKIP
|
|
185
|
+
given_name = hash.key?('given_name') ? hash['given_name'] : SKIP
|
|
186
|
+
family_name = hash.key?('family_name') ? hash['family_name'] : SKIP
|
|
187
|
+
suffix = hash.key?('suffix') ? hash['suffix'] : SKIP
|
|
188
|
+
national_id = hash.key?('national_id') ? hash['national_id'] : SKIP
|
|
189
|
+
date_of_birth = hash.key?('date_of_birth') ? hash['date_of_birth'] : SKIP
|
|
190
|
+
email = hash.key?('email') ? hash['email'] : SKIP
|
|
191
|
+
alternate_email =
|
|
192
|
+
hash.key?('alternate_email') ? hash['alternate_email'] : SKIP
|
|
193
|
+
phone_number = hash.key?('phone_number') ? hash['phone_number'] : SKIP
|
|
194
|
+
alternate_phone_number =
|
|
195
|
+
hash.key?('alternate_phone_number') ? hash['alternate_phone_number'] : SKIP
|
|
196
|
+
gender = hash.key?('gender') ? hash['gender'] : SKIP
|
|
197
|
+
address = Address.from_hash(hash['address']) if hash['address']
|
|
198
|
+
account = Account.from_hash(hash['account']) if hash['account']
|
|
199
|
+
docv = Docv.from_hash(hash['docv']) if hash['docv']
|
|
200
|
+
additional_context = AdditionalContext.from_hash(hash['additional_context']) if
|
|
201
|
+
hash['additional_context']
|
|
202
|
+
di_session_token =
|
|
203
|
+
hash.key?('di_session_token') ? hash['di_session_token'] : SKIP
|
|
204
|
+
custom = hash.key?('custom') ? hash['custom'] : SKIP
|
|
205
|
+
|
|
206
|
+
# Create a new hash for additional properties, removing known properties.
|
|
207
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
208
|
+
|
|
209
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
210
|
+
new_hash, proc { |value| value }
|
|
211
|
+
)
|
|
212
|
+
|
|
213
|
+
# Create object from extracted values.
|
|
214
|
+
AdditionalIndividual.new(id: id,
|
|
215
|
+
given_name: given_name,
|
|
216
|
+
family_name: family_name,
|
|
217
|
+
suffix: suffix,
|
|
218
|
+
national_id: national_id,
|
|
219
|
+
date_of_birth: date_of_birth,
|
|
220
|
+
email: email,
|
|
221
|
+
alternate_email: alternate_email,
|
|
222
|
+
phone_number: phone_number,
|
|
223
|
+
alternate_phone_number: alternate_phone_number,
|
|
224
|
+
gender: gender,
|
|
225
|
+
address: address,
|
|
226
|
+
account: account,
|
|
227
|
+
docv: docv,
|
|
228
|
+
additional_context: additional_context,
|
|
229
|
+
di_session_token: di_session_token,
|
|
230
|
+
custom: custom,
|
|
231
|
+
additional_properties: additional_properties)
|
|
232
|
+
end
|
|
233
|
+
|
|
234
|
+
# Validates an instance of the object from a given value.
|
|
235
|
+
# @param [AdditionalIndividual | Hash] The value against the validation is performed.
|
|
236
|
+
def self.validate(value)
|
|
237
|
+
return true if value.instance_of? self
|
|
238
|
+
|
|
239
|
+
return false unless value.instance_of? Hash
|
|
240
|
+
|
|
241
|
+
true
|
|
242
|
+
end
|
|
243
|
+
|
|
244
|
+
# Provides a human-readable string representation of the object.
|
|
245
|
+
def to_s
|
|
246
|
+
class_name = self.class.name.split('::').last
|
|
247
|
+
"<#{class_name} id: #{@id}, given_name: #{@given_name}, family_name: #{@family_name},"\
|
|
248
|
+
" suffix: #{@suffix}, national_id: #{@national_id}, date_of_birth: #{@date_of_birth}, email:"\
|
|
249
|
+
" #{@email}, alternate_email: #{@alternate_email}, phone_number: #{@phone_number},"\
|
|
250
|
+
" alternate_phone_number: #{@alternate_phone_number}, gender: #{@gender}, address:"\
|
|
251
|
+
" #{@address}, account: #{@account}, docv: #{@docv}, additional_context:"\
|
|
252
|
+
" #{@additional_context}, di_session_token: #{@di_session_token}, custom: #{@custom},"\
|
|
253
|
+
" additional_properties: #{@additional_properties}>"
|
|
254
|
+
end
|
|
255
|
+
|
|
256
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
257
|
+
def inspect
|
|
258
|
+
class_name = self.class.name.split('::').last
|
|
259
|
+
"<#{class_name} id: #{@id.inspect}, given_name: #{@given_name.inspect}, family_name:"\
|
|
260
|
+
" #{@family_name.inspect}, suffix: #{@suffix.inspect}, national_id: #{@national_id.inspect},"\
|
|
261
|
+
" date_of_birth: #{@date_of_birth.inspect}, email: #{@email.inspect}, alternate_email:"\
|
|
262
|
+
" #{@alternate_email.inspect}, phone_number: #{@phone_number.inspect},"\
|
|
263
|
+
" alternate_phone_number: #{@alternate_phone_number.inspect}, gender: #{@gender.inspect},"\
|
|
264
|
+
" address: #{@address.inspect}, account: #{@account.inspect}, docv: #{@docv.inspect},"\
|
|
265
|
+
" additional_context: #{@additional_context.inspect}, di_session_token:"\
|
|
266
|
+
" #{@di_session_token.inspect}, custom: #{@custom.inspect}, additional_properties:"\
|
|
267
|
+
" #{@additional_properties}>"
|
|
268
|
+
end
|
|
269
|
+
end
|
|
270
|
+
end
|
|
@@ -0,0 +1,159 @@
|
|
|
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
|
+
# Address Model.
|
|
8
|
+
class Address < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# Street number or house name and street name
|
|
13
|
+
# @return [String]
|
|
14
|
+
attr_accessor :line_1
|
|
15
|
+
|
|
16
|
+
# Additional street address, like landmarks
|
|
17
|
+
# @return [String]
|
|
18
|
+
attr_accessor :line_2
|
|
19
|
+
|
|
20
|
+
# City, town or village
|
|
21
|
+
# @return [String]
|
|
22
|
+
attr_accessor :locality
|
|
23
|
+
|
|
24
|
+
# Minor administrative division like the city area or district
|
|
25
|
+
# @return [String]
|
|
26
|
+
attr_accessor :minor_admin_division
|
|
27
|
+
|
|
28
|
+
# Major administrative division like the state, province, or oblast
|
|
29
|
+
# @return [String]
|
|
30
|
+
attr_accessor :major_admin_division
|
|
31
|
+
|
|
32
|
+
# Country in ISO 3166-1 alpha-2 format. Ex: 'US', 'CA'
|
|
33
|
+
# @return [String]
|
|
34
|
+
attr_accessor :country
|
|
35
|
+
|
|
36
|
+
# The postal or ZIP code
|
|
37
|
+
# @return [String]
|
|
38
|
+
attr_accessor :postal_code
|
|
39
|
+
|
|
40
|
+
# The type of the address like Home, Office
|
|
41
|
+
# @return [String]
|
|
42
|
+
attr_accessor :type
|
|
43
|
+
|
|
44
|
+
# A mapping from model property names to API property names.
|
|
45
|
+
def self.names
|
|
46
|
+
@_hash = {} if @_hash.nil?
|
|
47
|
+
@_hash['line_1'] = 'line_1'
|
|
48
|
+
@_hash['line_2'] = 'line_2'
|
|
49
|
+
@_hash['locality'] = 'locality'
|
|
50
|
+
@_hash['minor_admin_division'] = 'minor_admin_division'
|
|
51
|
+
@_hash['major_admin_division'] = 'major_admin_division'
|
|
52
|
+
@_hash['country'] = 'country'
|
|
53
|
+
@_hash['postal_code'] = 'postal_code'
|
|
54
|
+
@_hash['type'] = 'type'
|
|
55
|
+
@_hash
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
# An array for optional fields
|
|
59
|
+
def self.optionals
|
|
60
|
+
%w[
|
|
61
|
+
line_1
|
|
62
|
+
line_2
|
|
63
|
+
locality
|
|
64
|
+
minor_admin_division
|
|
65
|
+
major_admin_division
|
|
66
|
+
country
|
|
67
|
+
postal_code
|
|
68
|
+
type
|
|
69
|
+
]
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
# An array for nullable fields
|
|
73
|
+
def self.nullables
|
|
74
|
+
[]
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
def initialize(line_1: SKIP, line_2: SKIP, locality: SKIP,
|
|
78
|
+
minor_admin_division: SKIP, major_admin_division: SKIP,
|
|
79
|
+
country: SKIP, postal_code: SKIP, type: SKIP,
|
|
80
|
+
additional_properties: nil)
|
|
81
|
+
# Add additional model properties to the instance
|
|
82
|
+
additional_properties = {} if additional_properties.nil?
|
|
83
|
+
|
|
84
|
+
@line_1 = line_1 unless line_1 == SKIP
|
|
85
|
+
@line_2 = line_2 unless line_2 == SKIP
|
|
86
|
+
@locality = locality unless locality == SKIP
|
|
87
|
+
@minor_admin_division = minor_admin_division unless minor_admin_division == SKIP
|
|
88
|
+
@major_admin_division = major_admin_division unless major_admin_division == SKIP
|
|
89
|
+
@country = country unless country == SKIP
|
|
90
|
+
@postal_code = postal_code unless postal_code == SKIP
|
|
91
|
+
@type = type unless type == SKIP
|
|
92
|
+
@additional_properties = additional_properties
|
|
93
|
+
end
|
|
94
|
+
|
|
95
|
+
# Creates an instance of the object from a hash.
|
|
96
|
+
def self.from_hash(hash)
|
|
97
|
+
return nil unless hash
|
|
98
|
+
|
|
99
|
+
# Extract variables from the hash.
|
|
100
|
+
line_1 = hash.key?('line_1') ? hash['line_1'] : SKIP
|
|
101
|
+
line_2 = hash.key?('line_2') ? hash['line_2'] : SKIP
|
|
102
|
+
locality = hash.key?('locality') ? hash['locality'] : SKIP
|
|
103
|
+
minor_admin_division =
|
|
104
|
+
hash.key?('minor_admin_division') ? hash['minor_admin_division'] : SKIP
|
|
105
|
+
major_admin_division =
|
|
106
|
+
hash.key?('major_admin_division') ? hash['major_admin_division'] : SKIP
|
|
107
|
+
country = hash.key?('country') ? hash['country'] : SKIP
|
|
108
|
+
postal_code = hash.key?('postal_code') ? hash['postal_code'] : SKIP
|
|
109
|
+
type = hash.key?('type') ? hash['type'] : SKIP
|
|
110
|
+
|
|
111
|
+
# Create a new hash for additional properties, removing known properties.
|
|
112
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
113
|
+
|
|
114
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
115
|
+
new_hash, proc { |value| value }
|
|
116
|
+
)
|
|
117
|
+
|
|
118
|
+
# Create object from extracted values.
|
|
119
|
+
Address.new(line_1: line_1,
|
|
120
|
+
line_2: line_2,
|
|
121
|
+
locality: locality,
|
|
122
|
+
minor_admin_division: minor_admin_division,
|
|
123
|
+
major_admin_division: major_admin_division,
|
|
124
|
+
country: country,
|
|
125
|
+
postal_code: postal_code,
|
|
126
|
+
type: type,
|
|
127
|
+
additional_properties: additional_properties)
|
|
128
|
+
end
|
|
129
|
+
|
|
130
|
+
# Validates an instance of the object from a given value.
|
|
131
|
+
# @param [Address | Hash] The value against the validation is performed.
|
|
132
|
+
def self.validate(value)
|
|
133
|
+
return true if value.instance_of? self
|
|
134
|
+
|
|
135
|
+
return false unless value.instance_of? Hash
|
|
136
|
+
|
|
137
|
+
true
|
|
138
|
+
end
|
|
139
|
+
|
|
140
|
+
# Provides a human-readable string representation of the object.
|
|
141
|
+
def to_s
|
|
142
|
+
class_name = self.class.name.split('::').last
|
|
143
|
+
"<#{class_name} line_1: #{@line_1}, line_2: #{@line_2}, locality: #{@locality},"\
|
|
144
|
+
" minor_admin_division: #{@minor_admin_division}, major_admin_division:"\
|
|
145
|
+
" #{@major_admin_division}, country: #{@country}, postal_code: #{@postal_code}, type:"\
|
|
146
|
+
" #{@type}, additional_properties: #{@additional_properties}>"
|
|
147
|
+
end
|
|
148
|
+
|
|
149
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
150
|
+
def inspect
|
|
151
|
+
class_name = self.class.name.split('::').last
|
|
152
|
+
"<#{class_name} line_1: #{@line_1.inspect}, line_2: #{@line_2.inspect}, locality:"\
|
|
153
|
+
" #{@locality.inspect}, minor_admin_division: #{@minor_admin_division.inspect},"\
|
|
154
|
+
" major_admin_division: #{@major_admin_division.inspect}, country: #{@country.inspect},"\
|
|
155
|
+
" postal_code: #{@postal_code.inspect}, type: #{@type.inspect}, additional_properties:"\
|
|
156
|
+
" #{@additional_properties}>"
|
|
157
|
+
end
|
|
158
|
+
end
|
|
159
|
+
end
|
|
@@ -0,0 +1,144 @@
|
|
|
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
|
+
# Mailing address for the individual.
|
|
8
|
+
class Address1 < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# Primary street address line.
|
|
13
|
+
# @return [String]
|
|
14
|
+
attr_accessor :line_1
|
|
15
|
+
|
|
16
|
+
# City, town, or locality.
|
|
17
|
+
# @return [String]
|
|
18
|
+
attr_accessor :locality
|
|
19
|
+
|
|
20
|
+
# State or province code.
|
|
21
|
+
# @return [String]
|
|
22
|
+
attr_accessor :major_admin_division
|
|
23
|
+
|
|
24
|
+
# Country code in ISO 3166-1 alpha-2 format.
|
|
25
|
+
# @return [String]
|
|
26
|
+
attr_accessor :country
|
|
27
|
+
|
|
28
|
+
# Postal or ZIP code.
|
|
29
|
+
# @return [String]
|
|
30
|
+
attr_accessor :postal_code
|
|
31
|
+
|
|
32
|
+
# A mapping from model property names to API property names.
|
|
33
|
+
def self.names
|
|
34
|
+
@_hash = {} if @_hash.nil?
|
|
35
|
+
@_hash['line_1'] = 'line_1'
|
|
36
|
+
@_hash['locality'] = 'locality'
|
|
37
|
+
@_hash['major_admin_division'] = 'major_admin_division'
|
|
38
|
+
@_hash['country'] = 'country'
|
|
39
|
+
@_hash['postal_code'] = 'postal_code'
|
|
40
|
+
@_hash
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
# An array for optional fields
|
|
44
|
+
def self.optionals
|
|
45
|
+
[]
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
# An array for nullable fields
|
|
49
|
+
def self.nullables
|
|
50
|
+
[]
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
def initialize(line_1:, locality:, major_admin_division:, country:,
|
|
54
|
+
postal_code:, additional_properties: nil)
|
|
55
|
+
# Add additional model properties to the instance
|
|
56
|
+
additional_properties = {} if additional_properties.nil?
|
|
57
|
+
|
|
58
|
+
@line_1 = line_1
|
|
59
|
+
@locality = locality
|
|
60
|
+
@major_admin_division = major_admin_division
|
|
61
|
+
@country = country
|
|
62
|
+
@postal_code = postal_code
|
|
63
|
+
@additional_properties = additional_properties
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
# Creates an instance of the object from a hash.
|
|
67
|
+
def self.from_hash(hash)
|
|
68
|
+
return nil unless hash
|
|
69
|
+
|
|
70
|
+
# Extract variables from the hash.
|
|
71
|
+
line_1 = hash.key?('line_1') ? hash['line_1'] : nil
|
|
72
|
+
locality = hash.key?('locality') ? hash['locality'] : nil
|
|
73
|
+
major_admin_division =
|
|
74
|
+
hash.key?('major_admin_division') ? hash['major_admin_division'] : nil
|
|
75
|
+
country = hash.key?('country') ? hash['country'] : nil
|
|
76
|
+
postal_code = hash.key?('postal_code') ? hash['postal_code'] : nil
|
|
77
|
+
|
|
78
|
+
# Create a new hash for additional properties, removing known properties.
|
|
79
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
80
|
+
|
|
81
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
82
|
+
new_hash, proc { |value| value }
|
|
83
|
+
)
|
|
84
|
+
|
|
85
|
+
# Create object from extracted values.
|
|
86
|
+
Address1.new(line_1: line_1,
|
|
87
|
+
locality: locality,
|
|
88
|
+
major_admin_division: major_admin_division,
|
|
89
|
+
country: country,
|
|
90
|
+
postal_code: postal_code,
|
|
91
|
+
additional_properties: additional_properties)
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
# Validates an instance of the object from a given value.
|
|
95
|
+
# @param [Address1 | Hash] The value against the validation is performed.
|
|
96
|
+
def self.validate(value)
|
|
97
|
+
if value.instance_of? self
|
|
98
|
+
return (
|
|
99
|
+
APIHelper.valid_type?(value.line_1,
|
|
100
|
+
->(val) { val.instance_of? String }) and
|
|
101
|
+
APIHelper.valid_type?(value.locality,
|
|
102
|
+
->(val) { val.instance_of? String }) and
|
|
103
|
+
APIHelper.valid_type?(value.major_admin_division,
|
|
104
|
+
->(val) { val.instance_of? String }) and
|
|
105
|
+
APIHelper.valid_type?(value.country,
|
|
106
|
+
->(val) { val.instance_of? String }) and
|
|
107
|
+
APIHelper.valid_type?(value.postal_code,
|
|
108
|
+
->(val) { val.instance_of? String })
|
|
109
|
+
)
|
|
110
|
+
end
|
|
111
|
+
|
|
112
|
+
return false unless value.instance_of? Hash
|
|
113
|
+
|
|
114
|
+
(
|
|
115
|
+
APIHelper.valid_type?(value['line_1'],
|
|
116
|
+
->(val) { val.instance_of? String }) and
|
|
117
|
+
APIHelper.valid_type?(value['locality'],
|
|
118
|
+
->(val) { val.instance_of? String }) and
|
|
119
|
+
APIHelper.valid_type?(value['major_admin_division'],
|
|
120
|
+
->(val) { val.instance_of? String }) and
|
|
121
|
+
APIHelper.valid_type?(value['country'],
|
|
122
|
+
->(val) { val.instance_of? String }) and
|
|
123
|
+
APIHelper.valid_type?(value['postal_code'],
|
|
124
|
+
->(val) { val.instance_of? String })
|
|
125
|
+
)
|
|
126
|
+
end
|
|
127
|
+
|
|
128
|
+
# Provides a human-readable string representation of the object.
|
|
129
|
+
def to_s
|
|
130
|
+
class_name = self.class.name.split('::').last
|
|
131
|
+
"<#{class_name} line_1: #{@line_1}, locality: #{@locality}, major_admin_division:"\
|
|
132
|
+
" #{@major_admin_division}, country: #{@country}, postal_code: #{@postal_code},"\
|
|
133
|
+
" additional_properties: #{@additional_properties}>"
|
|
134
|
+
end
|
|
135
|
+
|
|
136
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
137
|
+
def inspect
|
|
138
|
+
class_name = self.class.name.split('::').last
|
|
139
|
+
"<#{class_name} line_1: #{@line_1.inspect}, locality: #{@locality.inspect},"\
|
|
140
|
+
" major_admin_division: #{@major_admin_division.inspect}, country: #{@country.inspect},"\
|
|
141
|
+
" postal_code: #{@postal_code.inspect}, additional_properties: #{@additional_properties}>"
|
|
142
|
+
end
|
|
143
|
+
end
|
|
144
|
+
end
|