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
|
+
# LoginAndAuthentication Model.
|
|
9
|
+
class LoginAndAuthentication < 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 Login and Authentication workflow.
|
|
44
|
+
# @return [Data7]
|
|
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 = Data7.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
|
+
LoginAndAuthentication.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 [LoginAndAuthentication | 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) { Data7.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) { Data7.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,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
|
+
# The redirect method. > **Note**: This field is required if `redirect` is
|
|
8
|
+
# provided.
|
|
9
|
+
class Method
|
|
10
|
+
METHOD = [
|
|
11
|
+
# TODO: Write general description for GET
|
|
12
|
+
GET = 'GET'.freeze,
|
|
13
|
+
|
|
14
|
+
# TODO: Write general description for POST
|
|
15
|
+
POST = 'POST'.freeze
|
|
16
|
+
].freeze
|
|
17
|
+
|
|
18
|
+
def self.validate(value)
|
|
19
|
+
return false if value.nil?
|
|
20
|
+
|
|
21
|
+
METHOD.include?(value)
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
def self.from_value(value, default_value = GET)
|
|
25
|
+
return default_value if value.nil?
|
|
26
|
+
|
|
27
|
+
str = value.to_s.strip
|
|
28
|
+
|
|
29
|
+
case str.downcase
|
|
30
|
+
when 'get' then GET
|
|
31
|
+
when 'post' then POST
|
|
32
|
+
else
|
|
33
|
+
default_value
|
|
34
|
+
end
|
|
35
|
+
end
|
|
36
|
+
end
|
|
37
|
+
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
|
+
# Current status of the monitoring subscription after the operation has been
|
|
8
|
+
# processed.
|
|
9
|
+
class MonitoringStatus
|
|
10
|
+
MONITORING_STATUS = [
|
|
11
|
+
# TODO: Write general description for ENABLED
|
|
12
|
+
ENABLED = 'enabled'.freeze,
|
|
13
|
+
|
|
14
|
+
# TODO: Write general description for DISABLED
|
|
15
|
+
DISABLED = 'disabled'.freeze
|
|
16
|
+
].freeze
|
|
17
|
+
|
|
18
|
+
def self.validate(value)
|
|
19
|
+
return false if value.nil?
|
|
20
|
+
|
|
21
|
+
MONITORING_STATUS.include?(value)
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
def self.from_value(value, default_value = ENABLED)
|
|
25
|
+
return default_value if value.nil?
|
|
26
|
+
|
|
27
|
+
str = value.to_s.strip
|
|
28
|
+
|
|
29
|
+
case str.downcase
|
|
30
|
+
when 'enabled' then ENABLED
|
|
31
|
+
when 'disabled' then DISABLED
|
|
32
|
+
else
|
|
33
|
+
default_value
|
|
34
|
+
end
|
|
35
|
+
end
|
|
36
|
+
end
|
|
37
|
+
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
|
+
# Specifies the action to be taken for monitoring enrollment. - `enable`:
|
|
8
|
+
# Activates Watchlist Monitoring for the specified evaluation. - `disable`:
|
|
9
|
+
# Deactivates Watchlist Monitoring for the specified evaluation.
|
|
10
|
+
class Operation
|
|
11
|
+
OPERATION = [
|
|
12
|
+
# TODO: Write general description for ENABLE
|
|
13
|
+
ENABLE = 'enable'.freeze,
|
|
14
|
+
|
|
15
|
+
# TODO: Write general description for DISABLE
|
|
16
|
+
DISABLE = 'disable'.freeze
|
|
17
|
+
].freeze
|
|
18
|
+
|
|
19
|
+
def self.validate(value)
|
|
20
|
+
return false if value.nil?
|
|
21
|
+
|
|
22
|
+
OPERATION.include?(value)
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
def self.from_value(value, default_value = ENABLE)
|
|
26
|
+
return default_value if value.nil?
|
|
27
|
+
|
|
28
|
+
str = value.to_s.strip
|
|
29
|
+
|
|
30
|
+
case str.downcase
|
|
31
|
+
when 'enable' then ENABLE
|
|
32
|
+
when 'disable' then DISABLE
|
|
33
|
+
else
|
|
34
|
+
default_value
|
|
35
|
+
end
|
|
36
|
+
end
|
|
37
|
+
end
|
|
38
|
+
end
|
|
@@ -0,0 +1,95 @@
|
|
|
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
|
+
# Contains the OTP data for the transaction.
|
|
8
|
+
class Otp < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# The one-time passcode.
|
|
13
|
+
# @return [String]
|
|
14
|
+
attr_accessor :code
|
|
15
|
+
|
|
16
|
+
# Set to `true` to trigger a resend of the OTP.
|
|
17
|
+
# @return [TrueClass | FalseClass]
|
|
18
|
+
attr_accessor :resend
|
|
19
|
+
|
|
20
|
+
# A mapping from model property names to API property names.
|
|
21
|
+
def self.names
|
|
22
|
+
@_hash = {} if @_hash.nil?
|
|
23
|
+
@_hash['code'] = 'code'
|
|
24
|
+
@_hash['resend'] = 'resend'
|
|
25
|
+
@_hash
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
# An array for optional fields
|
|
29
|
+
def self.optionals
|
|
30
|
+
%w[
|
|
31
|
+
code
|
|
32
|
+
resend
|
|
33
|
+
]
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
# An array for nullable fields
|
|
37
|
+
def self.nullables
|
|
38
|
+
[]
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
def initialize(code: SKIP, resend: SKIP, additional_properties: nil)
|
|
42
|
+
# Add additional model properties to the instance
|
|
43
|
+
additional_properties = {} if additional_properties.nil?
|
|
44
|
+
|
|
45
|
+
@code = code unless code == SKIP
|
|
46
|
+
@resend = resend unless resend == SKIP
|
|
47
|
+
@additional_properties = additional_properties
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
# Creates an instance of the object from a hash.
|
|
51
|
+
def self.from_hash(hash)
|
|
52
|
+
return nil unless hash
|
|
53
|
+
|
|
54
|
+
# Extract variables from the hash.
|
|
55
|
+
code = hash.key?('code') ? hash['code'] : SKIP
|
|
56
|
+
resend = hash.key?('resend') ? hash['resend'] : SKIP
|
|
57
|
+
|
|
58
|
+
# Create a new hash for additional properties, removing known properties.
|
|
59
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
60
|
+
|
|
61
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
62
|
+
new_hash, proc { |value| value }
|
|
63
|
+
)
|
|
64
|
+
|
|
65
|
+
# Create object from extracted values.
|
|
66
|
+
Otp.new(code: code,
|
|
67
|
+
resend: resend,
|
|
68
|
+
additional_properties: additional_properties)
|
|
69
|
+
end
|
|
70
|
+
|
|
71
|
+
# Validates an instance of the object from a given value.
|
|
72
|
+
# @param [Otp | Hash] The value against the validation is performed.
|
|
73
|
+
def self.validate(value)
|
|
74
|
+
return true if value.instance_of? self
|
|
75
|
+
|
|
76
|
+
return false unless value.instance_of? Hash
|
|
77
|
+
|
|
78
|
+
true
|
|
79
|
+
end
|
|
80
|
+
|
|
81
|
+
# Provides a human-readable string representation of the object.
|
|
82
|
+
def to_s
|
|
83
|
+
class_name = self.class.name.split('::').last
|
|
84
|
+
"<#{class_name} code: #{@code}, resend: #{@resend}, additional_properties:"\
|
|
85
|
+
" #{@additional_properties}>"
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
89
|
+
def inspect
|
|
90
|
+
class_name = self.class.name.split('::').last
|
|
91
|
+
"<#{class_name} code: #{@code.inspect}, resend: #{@resend.inspect}, additional_properties:"\
|
|
92
|
+
" #{@additional_properties}>"
|
|
93
|
+
end
|
|
94
|
+
end
|
|
95
|
+
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
|
+
# Contains the OTP data for the transaction. > **Note:** In a `PATCH` request,
|
|
8
|
+
# the `OTP` object uses the following: - The `code` field to send the OTP
|
|
9
|
+
# code to RiskOS™ for verification. - The `resend` flag to re-trigger the
|
|
10
|
+
# send OTP block.
|
|
11
|
+
class Otp1 < BaseModel
|
|
12
|
+
SKIP = Object.new
|
|
13
|
+
private_constant :SKIP
|
|
14
|
+
|
|
15
|
+
# The one-time passcode.
|
|
16
|
+
# @return [String]
|
|
17
|
+
attr_accessor :code
|
|
18
|
+
|
|
19
|
+
# Set to `true` to trigger a resend of the OTP.
|
|
20
|
+
# @return [TrueClass | FalseClass]
|
|
21
|
+
attr_accessor :resend
|
|
22
|
+
|
|
23
|
+
# A mapping from model property names to API property names.
|
|
24
|
+
def self.names
|
|
25
|
+
@_hash = {} if @_hash.nil?
|
|
26
|
+
@_hash['code'] = 'code'
|
|
27
|
+
@_hash['resend'] = 'resend'
|
|
28
|
+
@_hash
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
# An array for optional fields
|
|
32
|
+
def self.optionals
|
|
33
|
+
%w[
|
|
34
|
+
code
|
|
35
|
+
resend
|
|
36
|
+
]
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
# An array for nullable fields
|
|
40
|
+
def self.nullables
|
|
41
|
+
[]
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
def initialize(code: SKIP, resend: SKIP, additional_properties: nil)
|
|
45
|
+
# Add additional model properties to the instance
|
|
46
|
+
additional_properties = {} if additional_properties.nil?
|
|
47
|
+
|
|
48
|
+
@code = code unless code == SKIP
|
|
49
|
+
@resend = resend unless resend == SKIP
|
|
50
|
+
@additional_properties = additional_properties
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
# Creates an instance of the object from a hash.
|
|
54
|
+
def self.from_hash(hash)
|
|
55
|
+
return nil unless hash
|
|
56
|
+
|
|
57
|
+
# Extract variables from the hash.
|
|
58
|
+
code = hash.key?('code') ? hash['code'] : SKIP
|
|
59
|
+
resend = hash.key?('resend') ? hash['resend'] : SKIP
|
|
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
|
+
Otp1.new(code: code,
|
|
70
|
+
resend: resend,
|
|
71
|
+
additional_properties: additional_properties)
|
|
72
|
+
end
|
|
73
|
+
|
|
74
|
+
# Validates an instance of the object from a given value.
|
|
75
|
+
# @param [Otp1 | 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} code: #{@code}, resend: #{@resend}, additional_properties:"\
|
|
88
|
+
" #{@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} code: #{@code.inspect}, resend: #{@resend.inspect}, additional_properties:"\
|
|
95
|
+
" #{@additional_properties}>"
|
|
96
|
+
end
|
|
97
|
+
end
|
|
98
|
+
end
|
|
@@ -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
|
+
# PaymentScreening Model.
|
|
9
|
+
class PaymentScreening < 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 Payment Screening workflow.
|
|
44
|
+
# @return [Data9]
|
|
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 = Data9.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
|
+
PaymentScreening.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 [PaymentScreening | 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) { Data9.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) { Data9.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
|