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,413 @@
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
+ # The standard Socure RiskOS™ evaluation response.
9
+ class EvalResponseWithOutSocureData < BaseModel
10
+ SKIP = Object.new
11
+ private_constant :SKIP
12
+
13
+ # The client-defined request identifier, echoed back in the response.
14
+ # @return [String]
15
+ attr_accessor :id
16
+
17
+ # Optional, opaque JSON object echoed back unchanged on the response and at
18
+ # the top level of webhook callbacks — use it to route and correlate
19
+ # requests. Must be a JSON object of up to 200 characters total (the entire
20
+ # serialized JSON); larger payloads return `413
21
+ # CUSTOMER_METADATA_TOO_LARGE`. Omit it or send `null` to skip. Don't
22
+ # include PII or secrets. See [Customer
23
+ # Metadata](https://help.socure.com/riskos/docs/customer-metadata).
24
+ # @return [Object]
25
+ attr_accessor :customer_metadata
26
+
27
+ # A unique identifier generated by RiskOS™ for this evaluation. Required for
28
+ # all `GET` and `PATCH` operations.
29
+ # @return [UUID | String]
30
+ attr_accessor :eval_id
31
+
32
+ # Your environment-specific workflow executed for this evaluation.
33
+ # @return [String]
34
+ attr_accessor :workflow
35
+
36
+ # Unique identifier of the workflow definition that was executed. This value
37
+ # corresponds to the workflow version configured in RiskOS™.
38
+ # @return [UUID | String]
39
+ attr_accessor :workflow_id
40
+
41
+ # The current lifecycle state of the evaluation — for example,
42
+ # `evaluation_in_process`, `evaluation_completed`, or `evaluation_paused`.
43
+ # @return [String]
44
+ attr_accessor :eval_status
45
+
46
+ # The final outcome of the evaluation. Possible decision values are:
47
+ # * `ACCEPT`: The evaluation is approved; proceed with
48
+ # fulfillment/onboarding and the happy‑path experience.
49
+ # * `REVIEW`: Additional assessment is required; route to manual review
50
+ # and/or configured step‑up checks per workflow logic.
51
+ # * `REJECT`: The evaluation has failed the required checks and the entity
52
+ # is rejected.
53
+ # > **Note:** `ACCEPT`, `REVIEW`, and `REJECT` are the default decision
54
+ # values. Your integration can be customized to use different default
55
+ # decision values based on specific workflow needs.
56
+ # @return [Decision]
57
+ attr_accessor :decision
58
+
59
+ # RFC 3339 timestamp marking when the decision was finalized (UTC).
60
+ # @return [DateTime]
61
+ attr_accessor :decision_at
62
+
63
+ # If configured for a workflow, provides an aggregate sum of the scores
64
+ # assigned to each matched step. Use it for risk banding, additional
65
+ # routing, or analytics alongside the primary `decision` value. The value is
66
+ # determined entirely by your workflow configuration: because you can assign
67
+ # positive or negative scores to individual steps, the aggregate is
68
+ # unbounded and can be negative. Whether a higher value indicates more or
69
+ # less risk depends on how you configure those step scores.
70
+ # @return [Integer]
71
+ attr_accessor :score
72
+
73
+ # Case-level status of the evaluation.
74
+ # @return [Status]
75
+ attr_accessor :status
76
+
77
+ # Provides additional detail about the evaluation status (for example,
78
+ # `Pending Verification` or `In Review`).
79
+ # @return [String]
80
+ attr_accessor :sub_status
81
+
82
+ # Version of the executed workflow.
83
+ # @return [String]
84
+ attr_accessor :workflow_version
85
+
86
+ # Indicates where the evaluation was initiated from. <br /> <br /> Possible
87
+ # values include:
88
+ # * `API`: Request submitted via the Evaluation API.
89
+ # * `Dashboard`: Case created or evaluated through the RiskOS™ Dashboard.
90
+ # @return [EvalSource]
91
+ attr_accessor :eval_source
92
+
93
+ # RFC 3339 timestamp for when RiskOS™ started processing the evaluation.
94
+ # Useful for latency and performance monitoring.
95
+ # @return [DateTime]
96
+ attr_accessor :eval_start_time
97
+
98
+ # RFC 3339 timestamp for when RiskOS™ finished processing the evaluation.
99
+ # Can be paired with `eval_start_time` to compute total processing time.
100
+ # @return [DateTime]
101
+ attr_accessor :eval_end_time
102
+
103
+ # Array of labels applied during the workflow to highlight routing choices,
104
+ # notable signals, or rule outcomes. Useful for reporting, segmentation, or
105
+ # UI highlighting in the RiskOS™ Dashboard.
106
+ # @return [Array[String]]
107
+ attr_accessor :tags
108
+
109
+ # Subset of `tags` contributed only by the workflow's terminal decision or
110
+ # manual review step. Use this field when you need the tags that directly
111
+ # explain the final `decision`, without the broader routing and signal tags
112
+ # captured in `tags`.
113
+ # @return [Array[String]]
114
+ attr_accessor :decision_tags
115
+
116
+ # Freeform text field for analyst or system comments about the evaluation.
117
+ # Often used to capture manual review rationale or investigation context.
118
+ # @return [String]
119
+ attr_accessor :notes
120
+
121
+ # Lists any manual review queues the evaluation was sent to. Empty when the
122
+ # case is fully auto-resolved without human review.
123
+ # @return [Array[String]]
124
+ attr_accessor :review_queues
125
+
126
+ # A collection of external enrichment results generated during the workflow
127
+ # (e.g., device risk checks, KYC verifications, fraud models).
128
+ # @return [Array[DataEnrichment]]
129
+ attr_accessor :data_enrichments
130
+
131
+ # Aggregated data computed across historical evaluations for this entity.
132
+ # Returned when the extended evaluation response is enabled for your
133
+ # account.
134
+ # @return [Object]
135
+ attr_accessor :aggregations
136
+
137
+ # Identifier linking related evaluations that belong to the same group (for
138
+ # example, multiple evaluations triggered as part of a single workflow with
139
+ # grouped enrichments).
140
+ # @return [String]
141
+ attr_accessor :group_id
142
+
143
+ # The original input data submitted with the evaluation request. Only
144
+ # returned when the `include_input` query parameter is set to `true`.
145
+ # @return [Input]
146
+ attr_accessor :input
147
+
148
+ # Redirect URI for the hosted experience. Returned when the evaluation is
149
+ # initiated through the Hosted UX flow.
150
+ # @return [String]
151
+ attr_accessor :redirect_uri
152
+
153
+ # Derived and aggregated results produced by RiskOS™ for quick access.
154
+ # Disabled by default; enable through Socure support if required.
155
+ # @return [Object]
156
+ attr_accessor :computed
157
+
158
+ # Indicates which environment the evaluation ran in. Typically `Sandbox` for
159
+ # testing or `Production` for live traffic.
160
+ # @return [EnvironmentName]
161
+ attr_accessor :environment_name
162
+
163
+ # A mapping from model property names to API property names.
164
+ def self.names
165
+ @_hash = {} if @_hash.nil?
166
+ @_hash['id'] = 'id'
167
+ @_hash['customer_metadata'] = 'customer_metadata'
168
+ @_hash['eval_id'] = 'eval_id'
169
+ @_hash['workflow'] = 'workflow'
170
+ @_hash['workflow_id'] = 'workflow_id'
171
+ @_hash['eval_status'] = 'eval_status'
172
+ @_hash['decision'] = 'decision'
173
+ @_hash['decision_at'] = 'decision_at'
174
+ @_hash['score'] = 'score'
175
+ @_hash['status'] = 'status'
176
+ @_hash['sub_status'] = 'sub_status'
177
+ @_hash['workflow_version'] = 'workflow_version'
178
+ @_hash['eval_source'] = 'eval_source'
179
+ @_hash['eval_start_time'] = 'eval_start_time'
180
+ @_hash['eval_end_time'] = 'eval_end_time'
181
+ @_hash['tags'] = 'tags'
182
+ @_hash['decision_tags'] = 'decision_tags'
183
+ @_hash['notes'] = 'notes'
184
+ @_hash['review_queues'] = 'review_queues'
185
+ @_hash['data_enrichments'] = 'data_enrichments'
186
+ @_hash['aggregations'] = 'aggregations'
187
+ @_hash['group_id'] = 'group_id'
188
+ @_hash['input'] = 'input'
189
+ @_hash['redirect_uri'] = 'redirect_uri'
190
+ @_hash['computed'] = 'computed'
191
+ @_hash['environment_name'] = 'environment_name'
192
+ @_hash
193
+ end
194
+
195
+ # An array for optional fields
196
+ def self.optionals
197
+ %w[
198
+ id
199
+ customer_metadata
200
+ eval_id
201
+ workflow
202
+ workflow_id
203
+ eval_status
204
+ decision
205
+ decision_at
206
+ score
207
+ status
208
+ sub_status
209
+ workflow_version
210
+ eval_source
211
+ eval_start_time
212
+ eval_end_time
213
+ tags
214
+ decision_tags
215
+ notes
216
+ review_queues
217
+ data_enrichments
218
+ aggregations
219
+ group_id
220
+ input
221
+ redirect_uri
222
+ computed
223
+ environment_name
224
+ ]
225
+ end
226
+
227
+ # An array for nullable fields
228
+ def self.nullables
229
+ %w[
230
+ customer_metadata
231
+ ]
232
+ end
233
+
234
+ def initialize(id: SKIP, customer_metadata: SKIP, eval_id: SKIP,
235
+ workflow: SKIP, workflow_id: SKIP, eval_status: SKIP,
236
+ decision: SKIP, decision_at: SKIP, score: SKIP, status: SKIP,
237
+ sub_status: SKIP, workflow_version: SKIP, eval_source: SKIP,
238
+ eval_start_time: SKIP, eval_end_time: SKIP, tags: SKIP,
239
+ decision_tags: SKIP, notes: SKIP, review_queues: SKIP,
240
+ data_enrichments: SKIP, aggregations: SKIP, group_id: SKIP,
241
+ input: SKIP, redirect_uri: SKIP, computed: SKIP,
242
+ environment_name: SKIP, additional_properties: nil)
243
+ # Add additional model properties to the instance
244
+ additional_properties = {} if additional_properties.nil?
245
+
246
+ @id = id unless id == SKIP
247
+ @customer_metadata = customer_metadata unless customer_metadata == SKIP
248
+ @eval_id = eval_id unless eval_id == SKIP
249
+ @workflow = workflow unless workflow == SKIP
250
+ @workflow_id = workflow_id unless workflow_id == SKIP
251
+ @eval_status = eval_status unless eval_status == SKIP
252
+ @decision = decision unless decision == SKIP
253
+ @decision_at = decision_at unless decision_at == SKIP
254
+ @score = score unless score == SKIP
255
+ @status = status unless status == SKIP
256
+ @sub_status = sub_status unless sub_status == SKIP
257
+ @workflow_version = workflow_version unless workflow_version == SKIP
258
+ @eval_source = eval_source unless eval_source == SKIP
259
+ @eval_start_time = eval_start_time unless eval_start_time == SKIP
260
+ @eval_end_time = eval_end_time unless eval_end_time == SKIP
261
+ @tags = tags unless tags == SKIP
262
+ @decision_tags = decision_tags unless decision_tags == SKIP
263
+ @notes = notes unless notes == SKIP
264
+ @review_queues = review_queues unless review_queues == SKIP
265
+ @data_enrichments = data_enrichments unless data_enrichments == SKIP
266
+ @aggregations = aggregations unless aggregations == SKIP
267
+ @group_id = group_id unless group_id == SKIP
268
+ @input = input unless input == SKIP
269
+ @redirect_uri = redirect_uri unless redirect_uri == SKIP
270
+ @computed = computed unless computed == SKIP
271
+ @environment_name = environment_name unless environment_name == SKIP
272
+ @additional_properties = additional_properties
273
+ end
274
+
275
+ # Creates an instance of the object from a hash.
276
+ def self.from_hash(hash)
277
+ return nil unless hash
278
+
279
+ # Extract variables from the hash.
280
+ id = hash.key?('id') ? hash['id'] : SKIP
281
+ customer_metadata =
282
+ hash.key?('customer_metadata') ? hash['customer_metadata'] : SKIP
283
+ eval_id = hash.key?('eval_id') ? hash['eval_id'] : SKIP
284
+ workflow = hash.key?('workflow') ? hash['workflow'] : SKIP
285
+ workflow_id = hash.key?('workflow_id') ? hash['workflow_id'] : SKIP
286
+ eval_status = hash.key?('eval_status') ? hash['eval_status'] : SKIP
287
+ decision = hash.key?('decision') ? hash['decision'] : SKIP
288
+ decision_at = if hash.key?('decision_at')
289
+ (DateTimeHelper.from_rfc3339(hash['decision_at']) if hash['decision_at'])
290
+ else
291
+ SKIP
292
+ end
293
+ score = hash.key?('score') ? hash['score'] : SKIP
294
+ status = hash.key?('status') ? hash['status'] : SKIP
295
+ sub_status = hash.key?('sub_status') ? hash['sub_status'] : SKIP
296
+ workflow_version =
297
+ hash.key?('workflow_version') ? hash['workflow_version'] : SKIP
298
+ eval_source = hash.key?('eval_source') ? hash['eval_source'] : SKIP
299
+ eval_start_time = if hash.key?('eval_start_time')
300
+ (DateTimeHelper.from_rfc3339(hash['eval_start_time']) if hash['eval_start_time'])
301
+ else
302
+ SKIP
303
+ end
304
+ eval_end_time = if hash.key?('eval_end_time')
305
+ (DateTimeHelper.from_rfc3339(hash['eval_end_time']) if hash['eval_end_time'])
306
+ else
307
+ SKIP
308
+ end
309
+ tags = hash.key?('tags') ? hash['tags'] : SKIP
310
+ decision_tags = hash.key?('decision_tags') ? hash['decision_tags'] : SKIP
311
+ notes = hash.key?('notes') ? hash['notes'] : SKIP
312
+ review_queues = hash.key?('review_queues') ? hash['review_queues'] : SKIP
313
+ # Parameter is an array, so we need to iterate through it
314
+ data_enrichments = nil
315
+ unless hash['data_enrichments'].nil?
316
+ data_enrichments = []
317
+ hash['data_enrichments'].each do |structure|
318
+ data_enrichments << (DataEnrichment.from_hash(structure) if structure)
319
+ end
320
+ end
321
+
322
+ data_enrichments = SKIP unless hash.key?('data_enrichments')
323
+ aggregations = hash.key?('aggregations') ? hash['aggregations'] : SKIP
324
+ group_id = hash.key?('group_id') ? hash['group_id'] : SKIP
325
+ input = Input.from_hash(hash['input']) if hash['input']
326
+ redirect_uri = hash.key?('redirect_uri') ? hash['redirect_uri'] : SKIP
327
+ computed = hash.key?('computed') ? hash['computed'] : SKIP
328
+ environment_name =
329
+ hash.key?('environment_name') ? hash['environment_name'] : SKIP
330
+
331
+ # Create a new hash for additional properties, removing known properties.
332
+ new_hash = hash.reject { |k, _| names.value?(k) }
333
+
334
+ additional_properties = APIHelper.get_additional_properties(
335
+ new_hash, proc { |value| value }
336
+ )
337
+
338
+ # Create object from extracted values.
339
+ EvalResponseWithOutSocureData.new(id: id,
340
+ customer_metadata: customer_metadata,
341
+ eval_id: eval_id,
342
+ workflow: workflow,
343
+ workflow_id: workflow_id,
344
+ eval_status: eval_status,
345
+ decision: decision,
346
+ decision_at: decision_at,
347
+ score: score,
348
+ status: status,
349
+ sub_status: sub_status,
350
+ workflow_version: workflow_version,
351
+ eval_source: eval_source,
352
+ eval_start_time: eval_start_time,
353
+ eval_end_time: eval_end_time,
354
+ tags: tags,
355
+ decision_tags: decision_tags,
356
+ notes: notes,
357
+ review_queues: review_queues,
358
+ data_enrichments: data_enrichments,
359
+ aggregations: aggregations,
360
+ group_id: group_id,
361
+ input: input,
362
+ redirect_uri: redirect_uri,
363
+ computed: computed,
364
+ environment_name: environment_name,
365
+ additional_properties: additional_properties)
366
+ end
367
+
368
+ def to_custom_decision_at
369
+ DateTimeHelper.to_rfc3339(decision_at)
370
+ end
371
+
372
+ def to_custom_eval_start_time
373
+ DateTimeHelper.to_rfc3339(eval_start_time)
374
+ end
375
+
376
+ def to_custom_eval_end_time
377
+ DateTimeHelper.to_rfc3339(eval_end_time)
378
+ end
379
+
380
+ # Provides a human-readable string representation of the object.
381
+ def to_s
382
+ class_name = self.class.name.split('::').last
383
+ "<#{class_name} id: #{@id}, customer_metadata: #{@customer_metadata}, eval_id: #{@eval_id},"\
384
+ " workflow: #{@workflow}, workflow_id: #{@workflow_id}, eval_status: #{@eval_status},"\
385
+ " decision: #{@decision}, decision_at: #{@decision_at}, score: #{@score}, status:"\
386
+ " #{@status}, sub_status: #{@sub_status}, workflow_version: #{@workflow_version},"\
387
+ " eval_source: #{@eval_source}, eval_start_time: #{@eval_start_time}, eval_end_time:"\
388
+ " #{@eval_end_time}, tags: #{@tags}, decision_tags: #{@decision_tags}, notes: #{@notes},"\
389
+ " review_queues: #{@review_queues}, data_enrichments: #{@data_enrichments}, aggregations:"\
390
+ " #{@aggregations}, group_id: #{@group_id}, input: #{@input}, redirect_uri:"\
391
+ " #{@redirect_uri}, computed: #{@computed}, environment_name: #{@environment_name},"\
392
+ " additional_properties: #{@additional_properties}>"
393
+ end
394
+
395
+ # Provides a debugging-friendly string with detailed object information.
396
+ def inspect
397
+ class_name = self.class.name.split('::').last
398
+ "<#{class_name} id: #{@id.inspect}, customer_metadata: #{@customer_metadata.inspect},"\
399
+ " eval_id: #{@eval_id.inspect}, workflow: #{@workflow.inspect}, workflow_id:"\
400
+ " #{@workflow_id.inspect}, eval_status: #{@eval_status.inspect}, decision:"\
401
+ " #{@decision.inspect}, decision_at: #{@decision_at.inspect}, score: #{@score.inspect},"\
402
+ " status: #{@status.inspect}, sub_status: #{@sub_status.inspect}, workflow_version:"\
403
+ " #{@workflow_version.inspect}, eval_source: #{@eval_source.inspect}, eval_start_time:"\
404
+ " #{@eval_start_time.inspect}, eval_end_time: #{@eval_end_time.inspect}, tags:"\
405
+ " #{@tags.inspect}, decision_tags: #{@decision_tags.inspect}, notes: #{@notes.inspect},"\
406
+ " review_queues: #{@review_queues.inspect}, data_enrichments: #{@data_enrichments.inspect},"\
407
+ " aggregations: #{@aggregations.inspect}, group_id: #{@group_id.inspect}, input:"\
408
+ " #{@input.inspect}, redirect_uri: #{@redirect_uri.inspect}, computed: #{@computed.inspect},"\
409
+ " environment_name: #{@environment_name.inspect}, additional_properties:"\
410
+ " #{@additional_properties}>"
411
+ end
412
+ end
413
+ end
@@ -0,0 +1,38 @@
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 where the evaluation was initiated from. <br /> <br /> Possible
8
+ # values include: * `API`: Request submitted via the Evaluation API. *
9
+ # `Dashboard`: Case created or evaluated through the RiskOS™ Dashboard.
10
+ class EvalSource
11
+ EVAL_SOURCE = [
12
+ # TODO: Write general description for API
13
+ API = 'API'.freeze,
14
+
15
+ # TODO: Write general description for DASHBOARD
16
+ DASHBOARD = 'Dashboard'.freeze
17
+ ].freeze
18
+
19
+ def self.validate(value)
20
+ return false if value.nil?
21
+
22
+ EVAL_SOURCE.include?(value)
23
+ end
24
+
25
+ def self.from_value(value, default_value = API)
26
+ return default_value if value.nil?
27
+
28
+ str = value.to_s.strip
29
+
30
+ case str.downcase
31
+ when 'api' then API
32
+ when 'dashboard' then DASHBOARD
33
+ else
34
+ default_value
35
+ end
36
+ end
37
+ end
38
+ end
@@ -0,0 +1,45 @@
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 the category of the event occurring on a user profile or account
8
+ # within the context of Trust and Safety verification processes.
9
+ class EventCategory
10
+ EVENT_CATEGORY = [
11
+ # TODO: Write general description for VERIFICATION
12
+ VERIFICATION = 'verification'.freeze,
13
+
14
+ # TODO: Write general description for AUTHENTICATION
15
+ AUTHENTICATION = 'authentication'.freeze,
16
+
17
+ # TODO: Write general description for ACTION
18
+ ACTION = 'action'.freeze,
19
+
20
+ # TODO: Write general description for UPDATE
21
+ UPDATE = 'update'.freeze
22
+ ].freeze
23
+
24
+ def self.validate(value)
25
+ return false if value.nil?
26
+
27
+ EVENT_CATEGORY.include?(value)
28
+ end
29
+
30
+ def self.from_value(value, default_value = VERIFICATION)
31
+ return default_value if value.nil?
32
+
33
+ str = value.to_s.strip
34
+
35
+ case str.downcase
36
+ when 'verification' then VERIFICATION
37
+ when 'authentication' then AUTHENTICATION
38
+ when 'action' then ACTION
39
+ when 'update' then UPDATE
40
+ else
41
+ default_value
42
+ end
43
+ end
44
+ end
45
+ end
@@ -0,0 +1,45 @@
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 the category of the event occurring on a user profile or account
8
+ # within the context of Bank Account Verification processes.
9
+ class EventCategory1
10
+ EVENT_CATEGORY1 = [
11
+ # TODO: Write general description for VERIFICATION
12
+ VERIFICATION = 'verification'.freeze,
13
+
14
+ # TODO: Write general description for AUTHENTICATION
15
+ AUTHENTICATION = 'authentication'.freeze,
16
+
17
+ # TODO: Write general description for ACTION
18
+ ACTION = 'action'.freeze,
19
+
20
+ # TODO: Write general description for UPDATE
21
+ UPDATE = 'update'.freeze
22
+ ].freeze
23
+
24
+ def self.validate(value)
25
+ return false if value.nil?
26
+
27
+ EVENT_CATEGORY1.include?(value)
28
+ end
29
+
30
+ def self.from_value(value, default_value = VERIFICATION)
31
+ return default_value if value.nil?
32
+
33
+ str = value.to_s.strip
34
+
35
+ case str.downcase
36
+ when 'verification' then VERIFICATION
37
+ when 'authentication' then AUTHENTICATION
38
+ when 'action' then ACTION
39
+ when 'update' then UPDATE
40
+ else
41
+ default_value
42
+ end
43
+ end
44
+ end
45
+ end
@@ -0,0 +1,57 @@
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
+ # Specifies the high-level category of the event occurring within a consumer
8
+ # profile or account. Use this field to indicate the general type of user
9
+ # interaction for risk evaluation purposes. <br /> <br /> Use the following
10
+ # guidance when selecting a value: - `authenticate`: Use for
11
+ # authentication-related events where a user is proving identity or access,
12
+ # such as login, logout, or session re-authentication. - `information`: Use
13
+ # for events where a user requests or views information without modifying
14
+ # account data, such as requesting a bank statement, viewing account
15
+ # balances, or retrieving transaction history. - `update`: Use for events
16
+ # where a user updates or modifies account or profile data, such as changing
17
+ # a password, updating an address, or modifying contact information. -
18
+ # `action`: Use for all other user-initiated actions where a risk evaluation
19
+ # is useful but the event does not fit into authentication, information, or
20
+ # update categories.
21
+ class EventCategory2
22
+ EVENT_CATEGORY2 = [
23
+ # TODO: Write general description for AUTHENTICATE
24
+ AUTHENTICATE = 'authenticate'.freeze,
25
+
26
+ # TODO: Write general description for ACTION
27
+ ACTION = 'action'.freeze,
28
+
29
+ # TODO: Write general description for INFORMATION
30
+ INFORMATION = 'information'.freeze,
31
+
32
+ # TODO: Write general description for UPDATE
33
+ UPDATE = 'update'.freeze
34
+ ].freeze
35
+
36
+ def self.validate(value)
37
+ return false if value.nil?
38
+
39
+ EVENT_CATEGORY2.include?(value)
40
+ end
41
+
42
+ def self.from_value(value, default_value = AUTHENTICATE)
43
+ return default_value if value.nil?
44
+
45
+ str = value.to_s.strip
46
+
47
+ case str.downcase
48
+ when 'authenticate' then AUTHENTICATE
49
+ when 'action' then ACTION
50
+ when 'information' then INFORMATION
51
+ when 'update' then UPDATE
52
+ else
53
+ default_value
54
+ end
55
+ end
56
+ end
57
+ end