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,167 @@
|
|
|
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
|
+
# ConsumerOnboarding Model.
|
|
9
|
+
class ConsumerOnboarding < BaseModel
|
|
10
|
+
SKIP = Object.new
|
|
11
|
+
private_constant :SKIP
|
|
12
|
+
|
|
13
|
+
# Your environment-specific workflow identifier. You can find this value in
|
|
14
|
+
# the RiskOS™ Dashboard > Developer Workbench > Integration Checklist. <br
|
|
15
|
+
# /><br /> **Note:** The workflow name must be unique within your RiskOS™
|
|
16
|
+
# environment. It is not scoped by use case and must identify a single
|
|
17
|
+
# active workflow for each Evaluation API request.
|
|
18
|
+
# @return [String]
|
|
19
|
+
attr_accessor :workflow
|
|
20
|
+
|
|
21
|
+
# Required, customer-defined unique identifier for the request. <br /><br />
|
|
22
|
+
# This value must be unique for each evaluation. Reusing an ID causes
|
|
23
|
+
# RiskOS™ to treat the request as a re-run and can impact processing
|
|
24
|
+
# behavior, results, and downstream workflows.
|
|
25
|
+
# @return [String]
|
|
26
|
+
attr_accessor :id
|
|
27
|
+
|
|
28
|
+
# The timestamp indicating when the evaluation was initiated, in ISO 8601 /
|
|
29
|
+
# RFC 3339 format.
|
|
30
|
+
# @return [DateTime]
|
|
31
|
+
attr_accessor :timestamp
|
|
32
|
+
|
|
33
|
+
# Optional, opaque JSON object echoed back unchanged on the response and at
|
|
34
|
+
# the top level of webhook callbacks — use it to route and correlate
|
|
35
|
+
# requests. Must be a JSON object of up to 200 characters total (the entire
|
|
36
|
+
# serialized JSON); larger payloads return `413
|
|
37
|
+
# CUSTOMER_METADATA_TOO_LARGE`. Omit it or send `null` to skip. Don't
|
|
38
|
+
# include PII or secrets. See [Customer
|
|
39
|
+
# Metadata](https://help.socure.com/riskos/docs/customer-metadata).
|
|
40
|
+
# @return [Object]
|
|
41
|
+
attr_accessor :customer_metadata
|
|
42
|
+
|
|
43
|
+
# The main payload for the Consumer Onboarding workflow.
|
|
44
|
+
# @return [Data1]
|
|
45
|
+
attr_accessor :data
|
|
46
|
+
|
|
47
|
+
# A mapping from model property names to API property names.
|
|
48
|
+
def self.names
|
|
49
|
+
@_hash = {} if @_hash.nil?
|
|
50
|
+
@_hash['workflow'] = 'workflow'
|
|
51
|
+
@_hash['id'] = 'id'
|
|
52
|
+
@_hash['timestamp'] = 'timestamp'
|
|
53
|
+
@_hash['customer_metadata'] = 'customer_metadata'
|
|
54
|
+
@_hash['data'] = 'data'
|
|
55
|
+
@_hash
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
# An array for optional fields
|
|
59
|
+
def self.optionals
|
|
60
|
+
%w[
|
|
61
|
+
customer_metadata
|
|
62
|
+
]
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
# An array for nullable fields
|
|
66
|
+
def self.nullables
|
|
67
|
+
%w[
|
|
68
|
+
customer_metadata
|
|
69
|
+
]
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
def initialize(workflow:, id:, timestamp:, data:, customer_metadata: SKIP,
|
|
73
|
+
additional_properties: nil)
|
|
74
|
+
# Add additional model properties to the instance
|
|
75
|
+
additional_properties = {} if additional_properties.nil?
|
|
76
|
+
|
|
77
|
+
@workflow = workflow
|
|
78
|
+
@id = id
|
|
79
|
+
@timestamp = timestamp
|
|
80
|
+
@customer_metadata = customer_metadata unless customer_metadata == SKIP
|
|
81
|
+
@data = data
|
|
82
|
+
@additional_properties = additional_properties
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
# Creates an instance of the object from a hash.
|
|
86
|
+
def self.from_hash(hash)
|
|
87
|
+
return nil unless hash
|
|
88
|
+
|
|
89
|
+
# Extract variables from the hash.
|
|
90
|
+
workflow = hash.key?('workflow') ? hash['workflow'] : nil
|
|
91
|
+
id = hash.key?('id') ? hash['id'] : nil
|
|
92
|
+
timestamp = if hash.key?('timestamp')
|
|
93
|
+
(DateTimeHelper.from_rfc3339(hash['timestamp']) if hash['timestamp'])
|
|
94
|
+
end
|
|
95
|
+
data = Data1.from_hash(hash['data']) if hash['data']
|
|
96
|
+
customer_metadata =
|
|
97
|
+
hash.key?('customer_metadata') ? hash['customer_metadata'] : SKIP
|
|
98
|
+
|
|
99
|
+
# Create a new hash for additional properties, removing known properties.
|
|
100
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
101
|
+
|
|
102
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
103
|
+
new_hash, proc { |value| value }
|
|
104
|
+
)
|
|
105
|
+
|
|
106
|
+
# Create object from extracted values.
|
|
107
|
+
ConsumerOnboarding.new(workflow: workflow,
|
|
108
|
+
id: id,
|
|
109
|
+
timestamp: timestamp,
|
|
110
|
+
data: data,
|
|
111
|
+
customer_metadata: customer_metadata,
|
|
112
|
+
additional_properties: additional_properties)
|
|
113
|
+
end
|
|
114
|
+
|
|
115
|
+
def to_custom_timestamp
|
|
116
|
+
DateTimeHelper.to_rfc3339(timestamp)
|
|
117
|
+
end
|
|
118
|
+
|
|
119
|
+
# Validates an instance of the object from a given value.
|
|
120
|
+
# @param [ConsumerOnboarding | Hash] The value against the validation is performed.
|
|
121
|
+
def self.validate(value)
|
|
122
|
+
if value.instance_of? self
|
|
123
|
+
return (
|
|
124
|
+
APIHelper.valid_type?(value.workflow,
|
|
125
|
+
->(val) { val.instance_of? String }) and
|
|
126
|
+
APIHelper.valid_type?(value.id,
|
|
127
|
+
->(val) { val.instance_of? String }) and
|
|
128
|
+
APIHelper.valid_type?(value.timestamp,
|
|
129
|
+
->(val) { val.instance_of? DateTime }) and
|
|
130
|
+
APIHelper.valid_type?(value.data,
|
|
131
|
+
->(val) { Data1.validate(val) },
|
|
132
|
+
is_model_hash: true)
|
|
133
|
+
)
|
|
134
|
+
end
|
|
135
|
+
|
|
136
|
+
return false unless value.instance_of? Hash
|
|
137
|
+
|
|
138
|
+
(
|
|
139
|
+
APIHelper.valid_type?(value['workflow'],
|
|
140
|
+
->(val) { val.instance_of? String }) and
|
|
141
|
+
APIHelper.valid_type?(value['id'],
|
|
142
|
+
->(val) { val.instance_of? String }) and
|
|
143
|
+
APIHelper.valid_type?(value['timestamp'],
|
|
144
|
+
->(val) { val.instance_of? String }) and
|
|
145
|
+
APIHelper.valid_type?(value['data'],
|
|
146
|
+
->(val) { Data1.validate(val) },
|
|
147
|
+
is_model_hash: true)
|
|
148
|
+
)
|
|
149
|
+
end
|
|
150
|
+
|
|
151
|
+
# Provides a human-readable string representation of the object.
|
|
152
|
+
def to_s
|
|
153
|
+
class_name = self.class.name.split('::').last
|
|
154
|
+
"<#{class_name} workflow: #{@workflow}, id: #{@id}, timestamp: #{@timestamp},"\
|
|
155
|
+
" customer_metadata: #{@customer_metadata}, data: #{@data}, additional_properties:"\
|
|
156
|
+
" #{@additional_properties}>"
|
|
157
|
+
end
|
|
158
|
+
|
|
159
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
160
|
+
def inspect
|
|
161
|
+
class_name = self.class.name.split('::').last
|
|
162
|
+
"<#{class_name} workflow: #{@workflow.inspect}, id: #{@id.inspect}, timestamp:"\
|
|
163
|
+
" #{@timestamp.inspect}, customer_metadata: #{@customer_metadata.inspect}, data:"\
|
|
164
|
+
" #{@data.inspect}, additional_properties: #{@additional_properties}>"
|
|
165
|
+
end
|
|
166
|
+
end
|
|
167
|
+
end
|
|
@@ -0,0 +1,178 @@
|
|
|
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
|
+
# ConsumerOnboardingPatch Model.
|
|
9
|
+
class ConsumerOnboardingPatch < BaseModel
|
|
10
|
+
SKIP = Object.new
|
|
11
|
+
private_constant :SKIP
|
|
12
|
+
|
|
13
|
+
# Your environment-specific workflow identifier. You can find this value in
|
|
14
|
+
# the RiskOS™ Dashboard > Developer Workbench > Integration Checklist. <br
|
|
15
|
+
# /><br /> **Note:** The workflow name must be unique within your RiskOS™
|
|
16
|
+
# environment. It is not scoped by use case and must identify a single
|
|
17
|
+
# active workflow for each Evaluation API request.
|
|
18
|
+
# @return [String]
|
|
19
|
+
attr_accessor :workflow
|
|
20
|
+
|
|
21
|
+
# Required, customer-defined unique identifier for the request. <br /><br />
|
|
22
|
+
# This value must be unique for each evaluation. Reusing an ID causes
|
|
23
|
+
# RiskOS™ to treat the request as a re-run and can impact processing
|
|
24
|
+
# behavior, results, and downstream workflows.
|
|
25
|
+
# @return [String]
|
|
26
|
+
attr_accessor :id
|
|
27
|
+
|
|
28
|
+
# The timestamp indicating when the evaluation was initiated, in ISO 8601 /
|
|
29
|
+
# RFC 3339 format.
|
|
30
|
+
# @return [DateTime]
|
|
31
|
+
attr_accessor :timestamp
|
|
32
|
+
|
|
33
|
+
# Optional, opaque JSON object echoed back unchanged on the response and at
|
|
34
|
+
# the top level of webhook callbacks — use it to route and correlate
|
|
35
|
+
# requests. Must be a JSON object of up to 200 characters total (the entire
|
|
36
|
+
# serialized JSON); larger payloads return `413
|
|
37
|
+
# CUSTOMER_METADATA_TOO_LARGE`. Omit it or send `null` to skip. Don't
|
|
38
|
+
# include PII or secrets. See [Customer
|
|
39
|
+
# Metadata](https://help.socure.com/riskos/docs/customer-metadata).
|
|
40
|
+
# @return [Object]
|
|
41
|
+
attr_accessor :customer_metadata
|
|
42
|
+
|
|
43
|
+
# A top-level container for instructions that modify the lifecycle of the
|
|
44
|
+
# current evaluation session.
|
|
45
|
+
# @return [Actions]
|
|
46
|
+
attr_accessor :actions
|
|
47
|
+
|
|
48
|
+
# The main payload for the Consumer Onboarding workflow.
|
|
49
|
+
# @return [Data10]
|
|
50
|
+
attr_accessor :data
|
|
51
|
+
|
|
52
|
+
# A mapping from model property names to API property names.
|
|
53
|
+
def self.names
|
|
54
|
+
@_hash = {} if @_hash.nil?
|
|
55
|
+
@_hash['workflow'] = 'workflow'
|
|
56
|
+
@_hash['id'] = 'id'
|
|
57
|
+
@_hash['timestamp'] = 'timestamp'
|
|
58
|
+
@_hash['customer_metadata'] = 'customer_metadata'
|
|
59
|
+
@_hash['actions'] = 'actions'
|
|
60
|
+
@_hash['data'] = 'data'
|
|
61
|
+
@_hash
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
# An array for optional fields
|
|
65
|
+
def self.optionals
|
|
66
|
+
%w[
|
|
67
|
+
customer_metadata
|
|
68
|
+
actions
|
|
69
|
+
]
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
# An array for nullable fields
|
|
73
|
+
def self.nullables
|
|
74
|
+
%w[
|
|
75
|
+
customer_metadata
|
|
76
|
+
]
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
def initialize(workflow:, id:, timestamp:, data:, customer_metadata: SKIP,
|
|
80
|
+
actions: SKIP, additional_properties: nil)
|
|
81
|
+
# Add additional model properties to the instance
|
|
82
|
+
additional_properties = {} if additional_properties.nil?
|
|
83
|
+
|
|
84
|
+
@workflow = workflow
|
|
85
|
+
@id = id
|
|
86
|
+
@timestamp = timestamp
|
|
87
|
+
@customer_metadata = customer_metadata unless customer_metadata == SKIP
|
|
88
|
+
@actions = actions unless actions == SKIP
|
|
89
|
+
@data = data
|
|
90
|
+
@additional_properties = additional_properties
|
|
91
|
+
end
|
|
92
|
+
|
|
93
|
+
# Creates an instance of the object from a hash.
|
|
94
|
+
def self.from_hash(hash)
|
|
95
|
+
return nil unless hash
|
|
96
|
+
|
|
97
|
+
# Extract variables from the hash.
|
|
98
|
+
workflow = hash.key?('workflow') ? hash['workflow'] : nil
|
|
99
|
+
id = hash.key?('id') ? hash['id'] : nil
|
|
100
|
+
timestamp = if hash.key?('timestamp')
|
|
101
|
+
(DateTimeHelper.from_rfc3339(hash['timestamp']) if hash['timestamp'])
|
|
102
|
+
end
|
|
103
|
+
data = Data10.from_hash(hash['data']) if hash['data']
|
|
104
|
+
customer_metadata =
|
|
105
|
+
hash.key?('customer_metadata') ? hash['customer_metadata'] : SKIP
|
|
106
|
+
actions = Actions.from_hash(hash['actions']) if hash['actions']
|
|
107
|
+
|
|
108
|
+
# Create a new hash for additional properties, removing known properties.
|
|
109
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
110
|
+
|
|
111
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
112
|
+
new_hash, proc { |value| value }
|
|
113
|
+
)
|
|
114
|
+
|
|
115
|
+
# Create object from extracted values.
|
|
116
|
+
ConsumerOnboardingPatch.new(workflow: workflow,
|
|
117
|
+
id: id,
|
|
118
|
+
timestamp: timestamp,
|
|
119
|
+
data: data,
|
|
120
|
+
customer_metadata: customer_metadata,
|
|
121
|
+
actions: actions,
|
|
122
|
+
additional_properties: additional_properties)
|
|
123
|
+
end
|
|
124
|
+
|
|
125
|
+
def to_custom_timestamp
|
|
126
|
+
DateTimeHelper.to_rfc3339(timestamp)
|
|
127
|
+
end
|
|
128
|
+
|
|
129
|
+
# Validates an instance of the object from a given value.
|
|
130
|
+
# @param [ConsumerOnboardingPatch | Hash] The value against the validation is performed.
|
|
131
|
+
def self.validate(value)
|
|
132
|
+
if value.instance_of? self
|
|
133
|
+
return (
|
|
134
|
+
APIHelper.valid_type?(value.workflow,
|
|
135
|
+
->(val) { val.instance_of? String }) and
|
|
136
|
+
APIHelper.valid_type?(value.id,
|
|
137
|
+
->(val) { val.instance_of? String }) and
|
|
138
|
+
APIHelper.valid_type?(value.timestamp,
|
|
139
|
+
->(val) { val.instance_of? DateTime }) and
|
|
140
|
+
APIHelper.valid_type?(value.data,
|
|
141
|
+
->(val) { Data10.validate(val) },
|
|
142
|
+
is_model_hash: true)
|
|
143
|
+
)
|
|
144
|
+
end
|
|
145
|
+
|
|
146
|
+
return false unless value.instance_of? Hash
|
|
147
|
+
|
|
148
|
+
(
|
|
149
|
+
APIHelper.valid_type?(value['workflow'],
|
|
150
|
+
->(val) { val.instance_of? String }) and
|
|
151
|
+
APIHelper.valid_type?(value['id'],
|
|
152
|
+
->(val) { val.instance_of? String }) and
|
|
153
|
+
APIHelper.valid_type?(value['timestamp'],
|
|
154
|
+
->(val) { val.instance_of? String }) and
|
|
155
|
+
APIHelper.valid_type?(value['data'],
|
|
156
|
+
->(val) { Data10.validate(val) },
|
|
157
|
+
is_model_hash: true)
|
|
158
|
+
)
|
|
159
|
+
end
|
|
160
|
+
|
|
161
|
+
# Provides a human-readable string representation of the object.
|
|
162
|
+
def to_s
|
|
163
|
+
class_name = self.class.name.split('::').last
|
|
164
|
+
"<#{class_name} workflow: #{@workflow}, id: #{@id}, timestamp: #{@timestamp},"\
|
|
165
|
+
" customer_metadata: #{@customer_metadata}, actions: #{@actions}, data: #{@data},"\
|
|
166
|
+
" additional_properties: #{@additional_properties}>"
|
|
167
|
+
end
|
|
168
|
+
|
|
169
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
170
|
+
def inspect
|
|
171
|
+
class_name = self.class.name.split('::').last
|
|
172
|
+
"<#{class_name} workflow: #{@workflow.inspect}, id: #{@id.inspect}, timestamp:"\
|
|
173
|
+
" #{@timestamp.inspect}, customer_metadata: #{@customer_metadata.inspect}, actions:"\
|
|
174
|
+
" #{@actions.inspect}, data: #{@data.inspect}, additional_properties:"\
|
|
175
|
+
" #{@additional_properties}>"
|
|
176
|
+
end
|
|
177
|
+
end
|
|
178
|
+
end
|
|
@@ -0,0 +1,105 @@
|
|
|
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
|
+
# Crypto address details. Required when `type` is `CRYPTO_ADDRESS`.
|
|
8
|
+
class CryptoAddress < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# Crypto asset code.
|
|
13
|
+
# @return [String]
|
|
14
|
+
attr_accessor :currency
|
|
15
|
+
|
|
16
|
+
# Blockchain network name.
|
|
17
|
+
# @return [String]
|
|
18
|
+
attr_accessor :network
|
|
19
|
+
|
|
20
|
+
# Wallet address.
|
|
21
|
+
# @return [String]
|
|
22
|
+
attr_accessor :address
|
|
23
|
+
|
|
24
|
+
# A mapping from model property names to API property names.
|
|
25
|
+
def self.names
|
|
26
|
+
@_hash = {} if @_hash.nil?
|
|
27
|
+
@_hash['currency'] = 'currency'
|
|
28
|
+
@_hash['network'] = 'network'
|
|
29
|
+
@_hash['address'] = 'address'
|
|
30
|
+
@_hash
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
# An array for optional fields
|
|
34
|
+
def self.optionals
|
|
35
|
+
%w[
|
|
36
|
+
currency
|
|
37
|
+
network
|
|
38
|
+
address
|
|
39
|
+
]
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
# An array for nullable fields
|
|
43
|
+
def self.nullables
|
|
44
|
+
[]
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
def initialize(currency: SKIP, network: SKIP, address: SKIP,
|
|
48
|
+
additional_properties: nil)
|
|
49
|
+
# Add additional model properties to the instance
|
|
50
|
+
additional_properties = {} if additional_properties.nil?
|
|
51
|
+
|
|
52
|
+
@currency = currency unless currency == SKIP
|
|
53
|
+
@network = network unless network == SKIP
|
|
54
|
+
@address = address unless address == SKIP
|
|
55
|
+
@additional_properties = additional_properties
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
# Creates an instance of the object from a hash.
|
|
59
|
+
def self.from_hash(hash)
|
|
60
|
+
return nil unless hash
|
|
61
|
+
|
|
62
|
+
# Extract variables from the hash.
|
|
63
|
+
currency = hash.key?('currency') ? hash['currency'] : SKIP
|
|
64
|
+
network = hash.key?('network') ? hash['network'] : SKIP
|
|
65
|
+
address = hash.key?('address') ? hash['address'] : SKIP
|
|
66
|
+
|
|
67
|
+
# Create a new hash for additional properties, removing known properties.
|
|
68
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
69
|
+
|
|
70
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
71
|
+
new_hash, proc { |value| value }
|
|
72
|
+
)
|
|
73
|
+
|
|
74
|
+
# Create object from extracted values.
|
|
75
|
+
CryptoAddress.new(currency: currency,
|
|
76
|
+
network: network,
|
|
77
|
+
address: address,
|
|
78
|
+
additional_properties: additional_properties)
|
|
79
|
+
end
|
|
80
|
+
|
|
81
|
+
# Validates an instance of the object from a given value.
|
|
82
|
+
# @param [CryptoAddress | Hash] The value against the validation is performed.
|
|
83
|
+
def self.validate(value)
|
|
84
|
+
return true if value.instance_of? self
|
|
85
|
+
|
|
86
|
+
return false unless value.instance_of? Hash
|
|
87
|
+
|
|
88
|
+
true
|
|
89
|
+
end
|
|
90
|
+
|
|
91
|
+
# Provides a human-readable string representation of the object.
|
|
92
|
+
def to_s
|
|
93
|
+
class_name = self.class.name.split('::').last
|
|
94
|
+
"<#{class_name} currency: #{@currency}, network: #{@network}, address: #{@address},"\
|
|
95
|
+
" additional_properties: #{@additional_properties}>"
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
99
|
+
def inspect
|
|
100
|
+
class_name = self.class.name.split('::').last
|
|
101
|
+
"<#{class_name} currency: #{@currency.inspect}, network: #{@network.inspect}, address:"\
|
|
102
|
+
" #{@address.inspect}, additional_properties: #{@additional_properties}>"
|
|
103
|
+
end
|
|
104
|
+
end
|
|
105
|
+
end
|
|
@@ -0,0 +1,106 @@
|
|
|
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 main payload for the Age Assurance workflow.
|
|
8
|
+
class Data < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# The event category for the evaluation.
|
|
13
|
+
# @return [String]
|
|
14
|
+
attr_accessor :event_type
|
|
15
|
+
|
|
16
|
+
# Specifies the mode of interaction on the consumer's end. <br /><br />
|
|
17
|
+
# Available values include: `web`, `mobile`, `pos`, and `other`.
|
|
18
|
+
# @return [Channel]
|
|
19
|
+
attr_accessor :channel
|
|
20
|
+
|
|
21
|
+
# Inputs the configured Age Assurance methods resolve age from.
|
|
22
|
+
# @return [Individual6]
|
|
23
|
+
attr_accessor :individual
|
|
24
|
+
|
|
25
|
+
# A mapping from model property names to API property names.
|
|
26
|
+
def self.names
|
|
27
|
+
@_hash = {} if @_hash.nil?
|
|
28
|
+
@_hash['event_type'] = 'event_type'
|
|
29
|
+
@_hash['channel'] = 'channel'
|
|
30
|
+
@_hash['individual'] = 'individual'
|
|
31
|
+
@_hash
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
# An array for optional fields
|
|
35
|
+
def self.optionals
|
|
36
|
+
%w[
|
|
37
|
+
event_type
|
|
38
|
+
channel
|
|
39
|
+
individual
|
|
40
|
+
]
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
# An array for nullable fields
|
|
44
|
+
def self.nullables
|
|
45
|
+
[]
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
def initialize(event_type: SKIP, channel: SKIP, individual: SKIP,
|
|
49
|
+
additional_properties: nil)
|
|
50
|
+
# Add additional model properties to the instance
|
|
51
|
+
additional_properties = {} if additional_properties.nil?
|
|
52
|
+
|
|
53
|
+
@event_type = event_type unless event_type == SKIP
|
|
54
|
+
@channel = channel unless channel == SKIP
|
|
55
|
+
@individual = individual unless individual == SKIP
|
|
56
|
+
@additional_properties = additional_properties
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
# Creates an instance of the object from a hash.
|
|
60
|
+
def self.from_hash(hash)
|
|
61
|
+
return nil unless hash
|
|
62
|
+
|
|
63
|
+
# Extract variables from the hash.
|
|
64
|
+
event_type = hash.key?('event_type') ? hash['event_type'] : SKIP
|
|
65
|
+
channel = hash.key?('channel') ? hash['channel'] : SKIP
|
|
66
|
+
individual = Individual6.from_hash(hash['individual']) if hash['individual']
|
|
67
|
+
|
|
68
|
+
# Create a new hash for additional properties, removing known properties.
|
|
69
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
70
|
+
|
|
71
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
72
|
+
new_hash, proc { |value| value }
|
|
73
|
+
)
|
|
74
|
+
|
|
75
|
+
# Create object from extracted values.
|
|
76
|
+
Data.new(event_type: event_type,
|
|
77
|
+
channel: channel,
|
|
78
|
+
individual: individual,
|
|
79
|
+
additional_properties: additional_properties)
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
# Validates an instance of the object from a given value.
|
|
83
|
+
# @param [Data | Hash] The value against the validation is performed.
|
|
84
|
+
def self.validate(value)
|
|
85
|
+
return true if value.instance_of? self
|
|
86
|
+
|
|
87
|
+
return false unless value.instance_of? Hash
|
|
88
|
+
|
|
89
|
+
true
|
|
90
|
+
end
|
|
91
|
+
|
|
92
|
+
# Provides a human-readable string representation of the object.
|
|
93
|
+
def to_s
|
|
94
|
+
class_name = self.class.name.split('::').last
|
|
95
|
+
"<#{class_name} event_type: #{@event_type}, channel: #{@channel}, individual:"\
|
|
96
|
+
" #{@individual}, additional_properties: #{@additional_properties}>"
|
|
97
|
+
end
|
|
98
|
+
|
|
99
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
100
|
+
def inspect
|
|
101
|
+
class_name = self.class.name.split('::').last
|
|
102
|
+
"<#{class_name} event_type: #{@event_type.inspect}, channel: #{@channel.inspect},"\
|
|
103
|
+
" individual: #{@individual.inspect}, additional_properties: #{@additional_properties}>"
|
|
104
|
+
end
|
|
105
|
+
end
|
|
106
|
+
end
|