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.
Files changed (122) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE +28 -0
  3. data/README.md +166 -0
  4. data/bin/console +15 -0
  5. data/lib/socure_risk_os_api/api_helper.rb +10 -0
  6. data/lib/socure_risk_os_api/apis/base_api.rb +67 -0
  7. data/lib/socure_risk_os_api/apis/evaluation_api.rb +318 -0
  8. data/lib/socure_risk_os_api/apis/feedback_api.rb +102 -0
  9. data/lib/socure_risk_os_api/apis/reason_codes_api.rb +61 -0
  10. data/lib/socure_risk_os_api/client.rb +85 -0
  11. data/lib/socure_risk_os_api/configuration.rb +179 -0
  12. data/lib/socure_risk_os_api/exceptions/api_exception.rb +21 -0
  13. data/lib/socure_risk_os_api/exceptions/error_exception.rb +80 -0
  14. data/lib/socure_risk_os_api/http/api_response.rb +19 -0
  15. data/lib/socure_risk_os_api/http/auth/oauth_2.rb +53 -0
  16. data/lib/socure_risk_os_api/http/http_call_back.rb +10 -0
  17. data/lib/socure_risk_os_api/http/http_method_enum.rb +10 -0
  18. data/lib/socure_risk_os_api/http/http_request.rb +10 -0
  19. data/lib/socure_risk_os_api/http/http_response.rb +10 -0
  20. data/lib/socure_risk_os_api/http/proxy_settings.rb +22 -0
  21. data/lib/socure_risk_os_api/logging/configuration/api_logging_configuration.rb +186 -0
  22. data/lib/socure_risk_os_api/logging/sdk_logger.rb +17 -0
  23. data/lib/socure_risk_os_api/models/account.rb +206 -0
  24. data/lib/socure_risk_os_api/models/account1.rb +203 -0
  25. data/lib/socure_risk_os_api/models/account_inquiry.rb +36 -0
  26. data/lib/socure_risk_os_api/models/account_snapshot.rb +106 -0
  27. data/lib/socure_risk_os_api/models/account_view.rb +116 -0
  28. data/lib/socure_risk_os_api/models/actions.rb +88 -0
  29. data/lib/socure_risk_os_api/models/additional_context.rb +235 -0
  30. data/lib/socure_risk_os_api/models/additional_individual.rb +270 -0
  31. data/lib/socure_risk_os_api/models/address.rb +159 -0
  32. data/lib/socure_risk_os_api/models/address1.rb +144 -0
  33. data/lib/socure_risk_os_api/models/advanced_prefill.rb +168 -0
  34. data/lib/socure_risk_os_api/models/age_assurance.rb +163 -0
  35. data/lib/socure_risk_os_api/models/amount.rb +95 -0
  36. data/lib/socure_risk_os_api/models/api_evaluation_monitoring_request.rb +96 -0
  37. data/lib/socure_risk_os_api/models/api_evaluation_monitoring_response.rb +84 -0
  38. data/lib/socure_risk_os_api/models/api_feedback_request.rb +153 -0
  39. data/lib/socure_risk_os_api/models/api_reason_codes_response.rb +85 -0
  40. data/lib/socure_risk_os_api/models/attachment.rb +95 -0
  41. data/lib/socure_risk_os_api/models/bank_account_verification.rb +167 -0
  42. data/lib/socure_risk_os_api/models/base_model.rb +110 -0
  43. data/lib/socure_risk_os_api/models/business.rb +224 -0
  44. data/lib/socure_risk_os_api/models/business_onboarding.rb +167 -0
  45. data/lib/socure_risk_os_api/models/channel.rb +45 -0
  46. data/lib/socure_risk_os_api/models/channel1.rb +44 -0
  47. data/lib/socure_risk_os_api/models/code.rb +68 -0
  48. data/lib/socure_risk_os_api/models/consumer_onboarding.rb +167 -0
  49. data/lib/socure_risk_os_api/models/consumer_onboarding_patch.rb +178 -0
  50. data/lib/socure_risk_os_api/models/crypto_address.rb +105 -0
  51. data/lib/socure_risk_os_api/models/data.rb +106 -0
  52. data/lib/socure_risk_os_api/models/data1.rb +166 -0
  53. data/lib/socure_risk_os_api/models/data10.rb +166 -0
  54. data/lib/socure_risk_os_api/models/data2.rb +145 -0
  55. data/lib/socure_risk_os_api/models/data3.rb +160 -0
  56. data/lib/socure_risk_os_api/models/data4.rb +157 -0
  57. data/lib/socure_risk_os_api/models/data5.rb +154 -0
  58. data/lib/socure_risk_os_api/models/data6.rb +174 -0
  59. data/lib/socure_risk_os_api/models/data7.rb +205 -0
  60. data/lib/socure_risk_os_api/models/data8.rb +115 -0
  61. data/lib/socure_risk_os_api/models/data9.rb +130 -0
  62. data/lib/socure_risk_os_api/models/data_enrichment.rb +182 -0
  63. data/lib/socure_risk_os_api/models/decision.rb +47 -0
  64. data/lib/socure_risk_os_api/models/decision1.rb +48 -0
  65. data/lib/socure_risk_os_api/models/destination.rb +136 -0
  66. data/lib/socure_risk_os_api/models/device.rb +339 -0
  67. data/lib/socure_risk_os_api/models/disclosure_purpose.rb +29 -0
  68. data/lib/socure_risk_os_api/models/document_verification_config.rb +195 -0
  69. data/lib/socure_risk_os_api/models/docv.rb +98 -0
  70. data/lib/socure_risk_os_api/models/environment_name.rb +37 -0
  71. data/lib/socure_risk_os_api/models/eval_response_with_out_socure_data.rb +413 -0
  72. data/lib/socure_risk_os_api/models/eval_source.rb +38 -0
  73. data/lib/socure_risk_os_api/models/event_category.rb +45 -0
  74. data/lib/socure_risk_os_api/models/event_category1.rb +45 -0
  75. data/lib/socure_risk_os_api/models/event_category2.rb +57 -0
  76. data/lib/socure_risk_os_api/models/event_details.rb +96 -0
  77. data/lib/socure_risk_os_api/models/formation.rb +138 -0
  78. data/lib/socure_risk_os_api/models/fraud_feedback_import_response.rb +73 -0
  79. data/lib/socure_risk_os_api/models/fraud_feedback_response.rb +73 -0
  80. data/lib/socure_risk_os_api/models/fraud_label.rb +37 -0
  81. data/lib/socure_risk_os_api/models/gender.rb +40 -0
  82. data/lib/socure_risk_os_api/models/generic_passthrough.rb +169 -0
  83. data/lib/socure_risk_os_api/models/individual.rb +281 -0
  84. data/lib/socure_risk_os_api/models/individual1.rb +292 -0
  85. data/lib/socure_risk_os_api/models/individual3.rb +206 -0
  86. data/lib/socure_risk_os_api/models/individual4.rb +182 -0
  87. data/lib/socure_risk_os_api/models/individual5.rb +297 -0
  88. data/lib/socure_risk_os_api/models/individual6.rb +148 -0
  89. data/lib/socure_risk_os_api/models/input.rb +86 -0
  90. data/lib/socure_risk_os_api/models/inquiry.rb +36 -0
  91. data/lib/socure_risk_os_api/models/invalid_arg.rb +85 -0
  92. data/lib/socure_risk_os_api/models/language.rb +247 -0
  93. data/lib/socure_risk_os_api/models/login_and_authentication.rb +167 -0
  94. data/lib/socure_risk_os_api/models/method.rb +37 -0
  95. data/lib/socure_risk_os_api/models/monitoring_status.rb +37 -0
  96. data/lib/socure_risk_os_api/models/operation.rb +38 -0
  97. data/lib/socure_risk_os_api/models/otp.rb +95 -0
  98. data/lib/socure_risk_os_api/models/otp1.rb +98 -0
  99. data/lib/socure_risk_os_api/models/payment_screening.rb +167 -0
  100. data/lib/socure_risk_os_api/models/payment_screening_business.rb +155 -0
  101. data/lib/socure_risk_os_api/models/payment_screening_individual.rb +254 -0
  102. data/lib/socure_risk_os_api/models/payment_screening_instrument.rb +105 -0
  103. data/lib/socure_risk_os_api/models/product.rb +76 -0
  104. data/lib/socure_risk_os_api/models/reason_code.rb +149 -0
  105. data/lib/socure_risk_os_api/models/redirect.rb +118 -0
  106. data/lib/socure_risk_os_api/models/response.rb +77 -0
  107. data/lib/socure_risk_os_api/models/source.rb +146 -0
  108. data/lib/socure_risk_os_api/models/status.rb +40 -0
  109. data/lib/socure_risk_os_api/models/status1.rb +40 -0
  110. data/lib/socure_risk_os_api/models/transaction_details.rb +97 -0
  111. data/lib/socure_risk_os_api/models/trust_and_safety.rb +167 -0
  112. data/lib/socure_risk_os_api/models/type.rb +36 -0
  113. data/lib/socure_risk_os_api/models/type1.rb +36 -0
  114. data/lib/socure_risk_os_api/models/type2.rb +36 -0
  115. data/lib/socure_risk_os_api/models/update_decision.rb +156 -0
  116. data/lib/socure_risk_os_api/models/update_status.rb +169 -0
  117. data/lib/socure_risk_os_api/models/workforce_verification.rb +167 -0
  118. data/lib/socure_risk_os_api/utilities/date_time_helper.rb +11 -0
  119. data/lib/socure_risk_os_api/utilities/file_wrapper.rb +28 -0
  120. data/lib/socure_risk_os_api/utilities/union_type_lookup.rb +69 -0
  121. data/lib/socure_risk_os_api.rb +143 -0
  122. metadata +205 -0
@@ -0,0 +1,339 @@
1
+ # socure_risk_os_api
2
+ #
3
+ # This file was automatically generated by APIMATIC
4
+ # v3.0 ( https://www.apimatic.io ).
5
+
6
+ require 'date'
7
+ module SocureRiskOsApi
8
+ # Use this field to provide external device data, e.g. originating from a
9
+ # third party data intelligence provider.
10
+ class Device < BaseModel
11
+ SKIP = Object.new
12
+ private_constant :SKIP
13
+
14
+ # Unique customer side identifier for device.
15
+ # @return [String]
16
+ attr_accessor :id
17
+
18
+ # Unique customer side identifier for device session.
19
+ # @return [String]
20
+ attr_accessor :session
21
+
22
+ # Unique customer side identifier for device fingerprint. This could be same
23
+ # as the `id`.
24
+ # @return [String]
25
+ attr_accessor :fingerprint
26
+
27
+ # Name of the fingerprint provider used to generate the fingerprint and/or
28
+ # id.
29
+ # @return [String]
30
+ attr_accessor :fingerprint_provider
31
+
32
+ # Name of the fingerprint provider used to generate the fingerprint and/or
33
+ # id.
34
+ # @return [String]
35
+ attr_accessor :user_agent
36
+
37
+ # Name of the fingerprint provider used to generate the fingerprint and/or
38
+ # id.
39
+ # @return [String]
40
+ attr_accessor :device_type
41
+
42
+ # Name of the fingerprint provider used to generate the fingerprint and/or
43
+ # id.
44
+ # @return [TrueClass | FalseClass]
45
+ attr_accessor :is_known
46
+
47
+ # RFC 3339 date-time string
48
+ # @return [DateTime]
49
+ attr_accessor :first_seen_time
50
+
51
+ # RFC 3339 date-time string
52
+ # @return [DateTime]
53
+ attr_accessor :last_seen_time
54
+
55
+ # RFC 3339 date-time string
56
+ # @return [TrueClass | FalseClass]
57
+ attr_accessor :timezone_mismatch
58
+
59
+ # RFC 3339 date-time string
60
+ # @return [String]
61
+ attr_accessor :ip_address
62
+
63
+ # RFC 3339 date-time string
64
+ # @return [TrueClass | FalseClass]
65
+ attr_accessor :is_ip_bad_proxy
66
+
67
+ # RFC 3339 date-time string
68
+ # @return [TrueClass | FalseClass]
69
+ attr_accessor :is_ip_proxy
70
+
71
+ # A numeric score indicating the risk level associated with the IP address.
72
+ # Higher values indicate greater risk. This score is derived from the IP
73
+ # enrichment provider. Use alongside `is_ip_proxy` and `is_ip_bad_proxy` for
74
+ # a comprehensive IP risk assessment.
75
+ # @return [Float]
76
+ attr_accessor :ip_risk_score
77
+
78
+ # A numeric score indicating the risk level associated with the IP address.
79
+ # Higher values indicate greater risk. This score is derived from the IP
80
+ # enrichment provider. Use alongside `is_ip_proxy` and `is_ip_bad_proxy` for
81
+ # a comprehensive IP risk assessment.
82
+ # @return [String]
83
+ attr_accessor :ip_isp
84
+
85
+ # A numeric score indicating the risk level associated with the IP address.
86
+ # Higher values indicate greater risk. This score is derived from the IP
87
+ # enrichment provider. Use alongside `is_ip_proxy` and `is_ip_bad_proxy` for
88
+ # a comprehensive IP risk assessment.
89
+ # @return [String]
90
+ attr_accessor :ip_country_code
91
+
92
+ # A numeric score indicating the risk level associated with the IP address.
93
+ # Higher values indicate greater risk. This score is derived from the IP
94
+ # enrichment provider. Use alongside `is_ip_proxy` and `is_ip_bad_proxy` for
95
+ # a comprehensive IP risk assessment.
96
+ # @return [String]
97
+ attr_accessor :ip_city
98
+
99
+ # A numeric score indicating the risk level associated with the IP address.
100
+ # Higher values indicate greater risk. This score is derived from the IP
101
+ # enrichment provider. Use alongside `is_ip_proxy` and `is_ip_bad_proxy` for
102
+ # a comprehensive IP risk assessment.
103
+ # @return [String]
104
+ attr_accessor :ip_region
105
+
106
+ # A numeric score indicating the risk level associated with the IP address.
107
+ # Higher values indicate greater risk. This score is derived from the IP
108
+ # enrichment provider. Use alongside `is_ip_proxy` and `is_ip_bad_proxy` for
109
+ # a comprehensive IP risk assessment.
110
+ # @return [TrueClass | FalseClass]
111
+ attr_accessor :is_ip_tor
112
+
113
+ # A numeric score indicating the risk level associated with the IP address.
114
+ # Higher values indicate greater risk. This score is derived from the IP
115
+ # enrichment provider. Use alongside `is_ip_proxy` and `is_ip_bad_proxy` for
116
+ # a comprehensive IP risk assessment.
117
+ # @return [TrueClass | FalseClass]
118
+ attr_accessor :is_emulator
119
+
120
+ # Send any additional, customer-specific data in this field. See [Custom
121
+ # Fields](https://help.socure.com/riskos/docs/custom-fields) for more
122
+ # information.
123
+ # @return [Hash[String, Object]]
124
+ attr_accessor :custom
125
+
126
+ # A mapping from model property names to API property names.
127
+ def self.names
128
+ @_hash = {} if @_hash.nil?
129
+ @_hash['id'] = 'id'
130
+ @_hash['session'] = 'session'
131
+ @_hash['fingerprint'] = 'fingerprint'
132
+ @_hash['fingerprint_provider'] = 'fingerprint_provider'
133
+ @_hash['user_agent'] = 'user_agent'
134
+ @_hash['device_type'] = 'device_type'
135
+ @_hash['is_known'] = 'is_known'
136
+ @_hash['first_seen_time'] = 'first_seen_time'
137
+ @_hash['last_seen_time'] = 'last_seen_time'
138
+ @_hash['timezone_mismatch'] = 'timezone_mismatch'
139
+ @_hash['ip_address'] = 'ip_address'
140
+ @_hash['is_ip_bad_proxy'] = 'is_ip_bad_proxy'
141
+ @_hash['is_ip_proxy'] = 'is_ip_proxy'
142
+ @_hash['ip_risk_score'] = 'ip_risk_score'
143
+ @_hash['ip_isp'] = 'ip_isp'
144
+ @_hash['ip_country_code'] = 'ip_country_code'
145
+ @_hash['ip_city'] = 'ip_city'
146
+ @_hash['ip_region'] = 'ip_region'
147
+ @_hash['is_ip_tor'] = 'is_ip_tor'
148
+ @_hash['is_emulator'] = 'is_emulator'
149
+ @_hash['custom'] = 'custom'
150
+ @_hash
151
+ end
152
+
153
+ # An array for optional fields
154
+ def self.optionals
155
+ %w[
156
+ id
157
+ session
158
+ fingerprint
159
+ fingerprint_provider
160
+ user_agent
161
+ device_type
162
+ is_known
163
+ first_seen_time
164
+ last_seen_time
165
+ timezone_mismatch
166
+ ip_address
167
+ is_ip_bad_proxy
168
+ is_ip_proxy
169
+ ip_risk_score
170
+ ip_isp
171
+ ip_country_code
172
+ ip_city
173
+ ip_region
174
+ is_ip_tor
175
+ is_emulator
176
+ custom
177
+ ]
178
+ end
179
+
180
+ # An array for nullable fields
181
+ def self.nullables
182
+ []
183
+ end
184
+
185
+ def initialize(id: SKIP, session: SKIP, fingerprint: SKIP,
186
+ fingerprint_provider: SKIP, user_agent: SKIP,
187
+ device_type: SKIP, is_known: SKIP, first_seen_time: SKIP,
188
+ last_seen_time: SKIP, timezone_mismatch: SKIP,
189
+ ip_address: SKIP, is_ip_bad_proxy: SKIP, is_ip_proxy: SKIP,
190
+ ip_risk_score: SKIP, ip_isp: SKIP, ip_country_code: SKIP,
191
+ ip_city: SKIP, ip_region: SKIP, is_ip_tor: SKIP,
192
+ is_emulator: SKIP, custom: SKIP, additional_properties: nil)
193
+ # Add additional model properties to the instance
194
+ additional_properties = {} if additional_properties.nil?
195
+
196
+ @id = id unless id == SKIP
197
+ @session = session unless session == SKIP
198
+ @fingerprint = fingerprint unless fingerprint == SKIP
199
+ @fingerprint_provider = fingerprint_provider unless fingerprint_provider == SKIP
200
+ @user_agent = user_agent unless user_agent == SKIP
201
+ @device_type = device_type unless device_type == SKIP
202
+ @is_known = is_known unless is_known == SKIP
203
+ @first_seen_time = first_seen_time unless first_seen_time == SKIP
204
+ @last_seen_time = last_seen_time unless last_seen_time == SKIP
205
+ @timezone_mismatch = timezone_mismatch unless timezone_mismatch == SKIP
206
+ @ip_address = ip_address unless ip_address == SKIP
207
+ @is_ip_bad_proxy = is_ip_bad_proxy unless is_ip_bad_proxy == SKIP
208
+ @is_ip_proxy = is_ip_proxy unless is_ip_proxy == SKIP
209
+ @ip_risk_score = ip_risk_score unless ip_risk_score == SKIP
210
+ @ip_isp = ip_isp unless ip_isp == SKIP
211
+ @ip_country_code = ip_country_code unless ip_country_code == SKIP
212
+ @ip_city = ip_city unless ip_city == SKIP
213
+ @ip_region = ip_region unless ip_region == SKIP
214
+ @is_ip_tor = is_ip_tor unless is_ip_tor == SKIP
215
+ @is_emulator = is_emulator unless is_emulator == SKIP
216
+ @custom = custom unless custom == SKIP
217
+ @additional_properties = additional_properties
218
+ end
219
+
220
+ # Creates an instance of the object from a hash.
221
+ def self.from_hash(hash)
222
+ return nil unless hash
223
+
224
+ # Extract variables from the hash.
225
+ id = hash.key?('id') ? hash['id'] : SKIP
226
+ session = hash.key?('session') ? hash['session'] : SKIP
227
+ fingerprint = hash.key?('fingerprint') ? hash['fingerprint'] : SKIP
228
+ fingerprint_provider =
229
+ hash.key?('fingerprint_provider') ? hash['fingerprint_provider'] : SKIP
230
+ user_agent = hash.key?('user_agent') ? hash['user_agent'] : SKIP
231
+ device_type = hash.key?('device_type') ? hash['device_type'] : SKIP
232
+ is_known = hash.key?('is_known') ? hash['is_known'] : SKIP
233
+ first_seen_time = if hash.key?('first_seen_time')
234
+ (DateTimeHelper.from_rfc3339(hash['first_seen_time']) if hash['first_seen_time'])
235
+ else
236
+ SKIP
237
+ end
238
+ last_seen_time = if hash.key?('last_seen_time')
239
+ (DateTimeHelper.from_rfc3339(hash['last_seen_time']) if hash['last_seen_time'])
240
+ else
241
+ SKIP
242
+ end
243
+ timezone_mismatch =
244
+ hash.key?('timezone_mismatch') ? hash['timezone_mismatch'] : SKIP
245
+ ip_address = hash.key?('ip_address') ? hash['ip_address'] : SKIP
246
+ is_ip_bad_proxy =
247
+ hash.key?('is_ip_bad_proxy') ? hash['is_ip_bad_proxy'] : SKIP
248
+ is_ip_proxy = hash.key?('is_ip_proxy') ? hash['is_ip_proxy'] : SKIP
249
+ ip_risk_score = hash.key?('ip_risk_score') ? hash['ip_risk_score'] : SKIP
250
+ ip_isp = hash.key?('ip_isp') ? hash['ip_isp'] : SKIP
251
+ ip_country_code =
252
+ hash.key?('ip_country_code') ? hash['ip_country_code'] : SKIP
253
+ ip_city = hash.key?('ip_city') ? hash['ip_city'] : SKIP
254
+ ip_region = hash.key?('ip_region') ? hash['ip_region'] : SKIP
255
+ is_ip_tor = hash.key?('is_ip_tor') ? hash['is_ip_tor'] : SKIP
256
+ is_emulator = hash.key?('is_emulator') ? hash['is_emulator'] : SKIP
257
+ custom = hash.key?('custom') ? hash['custom'] : SKIP
258
+
259
+ # Create a new hash for additional properties, removing known properties.
260
+ new_hash = hash.reject { |k, _| names.value?(k) }
261
+
262
+ additional_properties = APIHelper.get_additional_properties(
263
+ new_hash, proc { |value| value }
264
+ )
265
+
266
+ # Create object from extracted values.
267
+ Device.new(id: id,
268
+ session: session,
269
+ fingerprint: fingerprint,
270
+ fingerprint_provider: fingerprint_provider,
271
+ user_agent: user_agent,
272
+ device_type: device_type,
273
+ is_known: is_known,
274
+ first_seen_time: first_seen_time,
275
+ last_seen_time: last_seen_time,
276
+ timezone_mismatch: timezone_mismatch,
277
+ ip_address: ip_address,
278
+ is_ip_bad_proxy: is_ip_bad_proxy,
279
+ is_ip_proxy: is_ip_proxy,
280
+ ip_risk_score: ip_risk_score,
281
+ ip_isp: ip_isp,
282
+ ip_country_code: ip_country_code,
283
+ ip_city: ip_city,
284
+ ip_region: ip_region,
285
+ is_ip_tor: is_ip_tor,
286
+ is_emulator: is_emulator,
287
+ custom: custom,
288
+ additional_properties: additional_properties)
289
+ end
290
+
291
+ def to_custom_first_seen_time
292
+ DateTimeHelper.to_rfc3339(first_seen_time)
293
+ end
294
+
295
+ def to_custom_last_seen_time
296
+ DateTimeHelper.to_rfc3339(last_seen_time)
297
+ end
298
+
299
+ # Validates an instance of the object from a given value.
300
+ # @param [Device | Hash] The value against the validation is performed.
301
+ def self.validate(value)
302
+ return true if value.instance_of? self
303
+
304
+ return false unless value.instance_of? Hash
305
+
306
+ true
307
+ end
308
+
309
+ # Provides a human-readable string representation of the object.
310
+ def to_s
311
+ class_name = self.class.name.split('::').last
312
+ "<#{class_name} id: #{@id}, session: #{@session}, fingerprint: #{@fingerprint},"\
313
+ " fingerprint_provider: #{@fingerprint_provider}, user_agent: #{@user_agent}, device_type:"\
314
+ " #{@device_type}, is_known: #{@is_known}, first_seen_time: #{@first_seen_time},"\
315
+ " last_seen_time: #{@last_seen_time}, timezone_mismatch: #{@timezone_mismatch}, ip_address:"\
316
+ " #{@ip_address}, is_ip_bad_proxy: #{@is_ip_bad_proxy}, is_ip_proxy: #{@is_ip_proxy},"\
317
+ " ip_risk_score: #{@ip_risk_score}, ip_isp: #{@ip_isp}, ip_country_code:"\
318
+ " #{@ip_country_code}, ip_city: #{@ip_city}, ip_region: #{@ip_region}, is_ip_tor:"\
319
+ " #{@is_ip_tor}, is_emulator: #{@is_emulator}, custom: #{@custom}, additional_properties:"\
320
+ " #{@additional_properties}>"
321
+ end
322
+
323
+ # Provides a debugging-friendly string with detailed object information.
324
+ def inspect
325
+ class_name = self.class.name.split('::').last
326
+ "<#{class_name} id: #{@id.inspect}, session: #{@session.inspect}, fingerprint:"\
327
+ " #{@fingerprint.inspect}, fingerprint_provider: #{@fingerprint_provider.inspect},"\
328
+ " user_agent: #{@user_agent.inspect}, device_type: #{@device_type.inspect}, is_known:"\
329
+ " #{@is_known.inspect}, first_seen_time: #{@first_seen_time.inspect}, last_seen_time:"\
330
+ " #{@last_seen_time.inspect}, timezone_mismatch: #{@timezone_mismatch.inspect}, ip_address:"\
331
+ " #{@ip_address.inspect}, is_ip_bad_proxy: #{@is_ip_bad_proxy.inspect}, is_ip_proxy:"\
332
+ " #{@is_ip_proxy.inspect}, ip_risk_score: #{@ip_risk_score.inspect}, ip_isp:"\
333
+ " #{@ip_isp.inspect}, ip_country_code: #{@ip_country_code.inspect}, ip_city:"\
334
+ " #{@ip_city.inspect}, ip_region: #{@ip_region.inspect}, is_ip_tor: #{@is_ip_tor.inspect},"\
335
+ " is_emulator: #{@is_emulator.inspect}, custom: #{@custom.inspect}, additional_properties:"\
336
+ " #{@additional_properties}>"
337
+ end
338
+ end
339
+ end
@@ -0,0 +1,29 @@
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
+ # This field must be set to `GLBA_502(e)` to support acceptable use of the
8
+ # product. Data contributed to Sigma First-Party Fraud is Non-Public
9
+ # Information (NPI) that may only be further disclosed pursuant to the GLBA
10
+ # fraud exception.
11
+ class DisclosurePurpose
12
+ DISCLOSURE_PURPOSE = [
13
+ # TODO: Write general description for ENUM_GLBA_502E
14
+ ENUM_GLBA_502E = 'GLBA_502(e)'.freeze
15
+ ].freeze
16
+
17
+ def self.validate(value)
18
+ return false if value.nil?
19
+
20
+ DISCLOSURE_PURPOSE.include?(value)
21
+ end
22
+
23
+ def self.from_value(value, default_value = ENUM_GLBA_502E)
24
+ return default_value if value.nil?
25
+
26
+ default_value
27
+ end
28
+ end
29
+ end
@@ -0,0 +1,195 @@
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
+ # The configurations for the document request transaction.
8
+ class DocumentVerificationConfig < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # Set to `true` (boolean) to enable the SMS text message containing the
13
+ # document request URL. This field is set to `false` by default.
14
+ # > **Note:** SMS behavior varies by region:
15
+ # > - **US & Canada**: Messages are sent from our approved short code
16
+ # `33436`.
17
+ # > - **All other countries**: Messages are sent from our long code
18
+ # `+15103301986`.
19
+ # @return [TrueClass | FalseClass]
20
+ attr_accessor :send_message
21
+
22
+ # Specifies the language package for the Capture App. Below are the possible
23
+ # values.
24
+ # - Automatic (device default): `auto`
25
+ # - Arabic: `ar`
26
+ # - Arabic (Saudi Arabia): `ar-sa`
27
+ # - Armenian: `hy`
28
+ # - Bengali: `bn`
29
+ # - Chinese (Hong Kong): `zh-hk`
30
+ # - Chinese (Simplified): `zh-cn`
31
+ # - Chinese (Traditional): `zh-tw`
32
+ # - Czech: `cs-cz`
33
+ # - Danish: `da-dk`
34
+ # - Dutch: `nl-nl`
35
+ # - English: `en`
36
+ # - English (Australian): `en-au`
37
+ # - English (Canadian): `en-ca`
38
+ # - English (United Kingdom): `en-gb`
39
+ # - English (United States): `en-us`
40
+ # - Finnish: `fi-fi`
41
+ # - French: `fr`
42
+ # - French (Canada): `fr-ca`
43
+ # - German: `de-de`
44
+ # - Haitian Creole: `ht`
45
+ # - Hebrew: `he-il`
46
+ # - Hindi: `hi-in`
47
+ # - Hungarian: `hu-hu`
48
+ # - Indonesian: `id-id`
49
+ # - Italian: `it`
50
+ # - Italian (Switzerland): `it-ch`
51
+ # - Japanese: `ja-jp`
52
+ # - Korean: `ko`
53
+ # - Malay: `ms-my`
54
+ # - Norwegian: `no-no`
55
+ # - Polish: `pl-pl`
56
+ # - Portuguese (Brazil): `pt-br`
57
+ # - Portuguese (Portugal): `pt-pt`
58
+ # - Romanian (Moldova): `ro-mo`
59
+ # - Romanian (Romania): `ro-ro`
60
+ # - Russian: `ru`
61
+ # - Slovak: `sk-sk`
62
+ # - Spanish: `es`
63
+ # - Spanish (Argentina): `es-ar`
64
+ # - Spanish (International): `es-001`
65
+ # - Spanish (Mexico): `es-mx`
66
+ # - Spanish (Spain): `es-es`
67
+ # - Spanish (US): `es-us`
68
+ # - Swedish: `sv-se`
69
+ # - Tagalog: `tl`
70
+ # - Thai: `th-th`
71
+ # - Turkish: `tr-tr`
72
+ # - Urdu: `ur`
73
+ # - Vietnamese: `vi`
74
+ # Set `language` to `auto` to use the consumer's device default language. If
75
+ # the device's default language isn't supported, the Capture App defaults to
76
+ # English (`en`).
77
+ # @return [Language]
78
+ attr_accessor :language
79
+
80
+ # The name of the flow (created in RiskOS™) to use with this transaction.
81
+ # > **Note**: If the value is incorrect or not provided, the transaction
82
+ # uses the flow marked as **Default** in RiskOS™.
83
+ # @return [String]
84
+ attr_accessor :use_case_key
85
+
86
+ # Optional URL settings that redirect the consumer after the document
87
+ # capture and upload process is cancelled or completed on the Capture App.
88
+ # @return [Redirect]
89
+ attr_accessor :redirect
90
+
91
+ # Enables a simplified Capture App flow and allows you to select a default
92
+ # document type for the transaction using one of the values below.
93
+ # - `license`: Driver's license
94
+ # - `passport`: Passport
95
+ # > **Note**: Passing `documentType` with the value `license` or `passport`
96
+ # implements a simplified Capture App flow that skips the Selected ID Type
97
+ # Screen and starts the flow on the Document Capture Screen.
98
+ # @return [String]
99
+ attr_accessor :document_type
100
+
101
+ # A mapping from model property names to API property names.
102
+ def self.names
103
+ @_hash = {} if @_hash.nil?
104
+ @_hash['send_message'] = 'send_message'
105
+ @_hash['language'] = 'language'
106
+ @_hash['use_case_key'] = 'use_case_key'
107
+ @_hash['redirect'] = 'redirect'
108
+ @_hash['document_type'] = 'document_type'
109
+ @_hash
110
+ end
111
+
112
+ # An array for optional fields
113
+ def self.optionals
114
+ %w[
115
+ send_message
116
+ language
117
+ use_case_key
118
+ redirect
119
+ document_type
120
+ ]
121
+ end
122
+
123
+ # An array for nullable fields
124
+ def self.nullables
125
+ []
126
+ end
127
+
128
+ def initialize(send_message: SKIP, language: Language::ENUS,
129
+ use_case_key: SKIP, redirect: SKIP, document_type: SKIP,
130
+ additional_properties: nil)
131
+ # Add additional model properties to the instance
132
+ additional_properties = {} if additional_properties.nil?
133
+
134
+ @send_message = send_message unless send_message == SKIP
135
+ @language = language unless language == SKIP
136
+ @use_case_key = use_case_key unless use_case_key == SKIP
137
+ @redirect = redirect unless redirect == SKIP
138
+ @document_type = document_type unless document_type == SKIP
139
+ @additional_properties = additional_properties
140
+ end
141
+
142
+ # Creates an instance of the object from a hash.
143
+ def self.from_hash(hash)
144
+ return nil unless hash
145
+
146
+ # Extract variables from the hash.
147
+ send_message = hash.key?('send_message') ? hash['send_message'] : SKIP
148
+ language = hash['language'] ||= Language::ENUS
149
+ use_case_key = hash.key?('use_case_key') ? hash['use_case_key'] : SKIP
150
+ redirect = Redirect.from_hash(hash['redirect']) if hash['redirect']
151
+ document_type = hash.key?('document_type') ? hash['document_type'] : SKIP
152
+
153
+ # Create a new hash for additional properties, removing known properties.
154
+ new_hash = hash.reject { |k, _| names.value?(k) }
155
+
156
+ additional_properties = APIHelper.get_additional_properties(
157
+ new_hash, proc { |value| value }
158
+ )
159
+
160
+ # Create object from extracted values.
161
+ DocumentVerificationConfig.new(send_message: send_message,
162
+ language: language,
163
+ use_case_key: use_case_key,
164
+ redirect: redirect,
165
+ document_type: document_type,
166
+ additional_properties: additional_properties)
167
+ end
168
+
169
+ # Validates an instance of the object from a given value.
170
+ # @param [DocumentVerificationConfig | Hash] The value against the validation is performed.
171
+ def self.validate(value)
172
+ return true if value.instance_of? self
173
+
174
+ return false unless value.instance_of? Hash
175
+
176
+ true
177
+ end
178
+
179
+ # Provides a human-readable string representation of the object.
180
+ def to_s
181
+ class_name = self.class.name.split('::').last
182
+ "<#{class_name} send_message: #{@send_message}, language: #{@language}, use_case_key:"\
183
+ " #{@use_case_key}, redirect: #{@redirect}, document_type: #{@document_type},"\
184
+ " additional_properties: #{@additional_properties}>"
185
+ end
186
+
187
+ # Provides a debugging-friendly string with detailed object information.
188
+ def inspect
189
+ class_name = self.class.name.split('::').last
190
+ "<#{class_name} send_message: #{@send_message.inspect}, language: #{@language.inspect},"\
191
+ " use_case_key: #{@use_case_key.inspect}, redirect: #{@redirect.inspect}, document_type:"\
192
+ " #{@document_type.inspect}, additional_properties: #{@additional_properties}>"
193
+ end
194
+ end
195
+ end
@@ -0,0 +1,98 @@
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
+ # Docv Model.
8
+ class Docv < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # The transaction token from the Document Request API response (v5). Use
13
+ # this if integrated with Socure's DocV solution.
14
+ # @return [String]
15
+ attr_accessor :transaction_token
16
+
17
+ # The configurations for the document request transaction.
18
+ # @return [DocumentVerificationConfig]
19
+ attr_accessor :config
20
+
21
+ # A mapping from model property names to API property names.
22
+ def self.names
23
+ @_hash = {} if @_hash.nil?
24
+ @_hash['transaction_token'] = 'transaction_token'
25
+ @_hash['config'] = 'config'
26
+ @_hash
27
+ end
28
+
29
+ # An array for optional fields
30
+ def self.optionals
31
+ %w[
32
+ transaction_token
33
+ config
34
+ ]
35
+ end
36
+
37
+ # An array for nullable fields
38
+ def self.nullables
39
+ []
40
+ end
41
+
42
+ def initialize(transaction_token: SKIP, config: SKIP,
43
+ additional_properties: nil)
44
+ # Add additional model properties to the instance
45
+ additional_properties = {} if additional_properties.nil?
46
+
47
+ @transaction_token = transaction_token unless transaction_token == SKIP
48
+ @config = config unless config == SKIP
49
+ @additional_properties = additional_properties
50
+ end
51
+
52
+ # Creates an instance of the object from a hash.
53
+ def self.from_hash(hash)
54
+ return nil unless hash
55
+
56
+ # Extract variables from the hash.
57
+ transaction_token =
58
+ hash.key?('transaction_token') ? hash['transaction_token'] : SKIP
59
+ config = DocumentVerificationConfig.from_hash(hash['config']) if hash['config']
60
+
61
+ # Create a new hash for additional properties, removing known properties.
62
+ new_hash = hash.reject { |k, _| names.value?(k) }
63
+
64
+ additional_properties = APIHelper.get_additional_properties(
65
+ new_hash, proc { |value| value }
66
+ )
67
+
68
+ # Create object from extracted values.
69
+ Docv.new(transaction_token: transaction_token,
70
+ config: config,
71
+ additional_properties: additional_properties)
72
+ end
73
+
74
+ # Validates an instance of the object from a given value.
75
+ # @param [Docv | Hash] The value against the validation is performed.
76
+ def self.validate(value)
77
+ return true if value.instance_of? self
78
+
79
+ return false unless value.instance_of? Hash
80
+
81
+ true
82
+ end
83
+
84
+ # Provides a human-readable string representation of the object.
85
+ def to_s
86
+ class_name = self.class.name.split('::').last
87
+ "<#{class_name} transaction_token: #{@transaction_token}, config: #{@config},"\
88
+ " additional_properties: #{@additional_properties}>"
89
+ end
90
+
91
+ # Provides a debugging-friendly string with detailed object information.
92
+ def inspect
93
+ class_name = self.class.name.split('::').last
94
+ "<#{class_name} transaction_token: #{@transaction_token.inspect}, config:"\
95
+ " #{@config.inspect}, additional_properties: #{@additional_properties}>"
96
+ end
97
+ end
98
+ end
@@ -0,0 +1,37 @@
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
+ # Indicates which environment the evaluation ran in. Typically `Sandbox` for
8
+ # testing or `Production` for live traffic.
9
+ class EnvironmentName
10
+ ENVIRONMENT_NAME = [
11
+ # TODO: Write general description for SANDBOX
12
+ SANDBOX = 'Sandbox'.freeze,
13
+
14
+ # TODO: Write general description for PRODUCTION
15
+ PRODUCTION = 'Production'.freeze
16
+ ].freeze
17
+
18
+ def self.validate(value)
19
+ return false if value.nil?
20
+
21
+ ENVIRONMENT_NAME.include?(value)
22
+ end
23
+
24
+ def self.from_value(value, default_value = SANDBOX)
25
+ return default_value if value.nil?
26
+
27
+ str = value.to_s.strip
28
+
29
+ case str.downcase
30
+ when 'sandbox' then SANDBOX
31
+ when 'production' then PRODUCTION
32
+ else
33
+ default_value
34
+ end
35
+ end
36
+ end
37
+ end