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
|
+
# TrustAndSafety Model.
|
|
9
|
+
class TrustAndSafety < 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 Trust and Safety workflow.
|
|
44
|
+
# @return [Data4]
|
|
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 = Data4.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
|
+
TrustAndSafety.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 [TrustAndSafety | 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) { Data4.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) { Data4.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,36 @@
|
|
|
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
|
+
# Account Type
|
|
8
|
+
class Type
|
|
9
|
+
TYPE = [
|
|
10
|
+
# TODO: Write general description for CHECKING
|
|
11
|
+
CHECKING = 'CHECKING'.freeze,
|
|
12
|
+
|
|
13
|
+
# TODO: Write general description for SAVINGS
|
|
14
|
+
SAVINGS = 'SAVINGS'.freeze
|
|
15
|
+
].freeze
|
|
16
|
+
|
|
17
|
+
def self.validate(value)
|
|
18
|
+
return false if value.nil?
|
|
19
|
+
|
|
20
|
+
TYPE.include?(value)
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
def self.from_value(value, default_value = CHECKING)
|
|
24
|
+
return default_value if value.nil?
|
|
25
|
+
|
|
26
|
+
str = value.to_s.strip
|
|
27
|
+
|
|
28
|
+
case str.downcase
|
|
29
|
+
when 'checking' then CHECKING
|
|
30
|
+
when 'savings' then SAVINGS
|
|
31
|
+
else
|
|
32
|
+
default_value
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
end
|
|
36
|
+
end
|
|
@@ -0,0 +1,36 @@
|
|
|
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
|
+
# Financial instrument type.
|
|
8
|
+
class Type1
|
|
9
|
+
TYPE1 = [
|
|
10
|
+
# TODO: Write general description for BANK_ACCOUNT
|
|
11
|
+
BANK_ACCOUNT = 'BANK_ACCOUNT'.freeze,
|
|
12
|
+
|
|
13
|
+
# TODO: Write general description for CRYPTO_ADDRESS
|
|
14
|
+
CRYPTO_ADDRESS = 'CRYPTO_ADDRESS'.freeze
|
|
15
|
+
].freeze
|
|
16
|
+
|
|
17
|
+
def self.validate(value)
|
|
18
|
+
return false if value.nil?
|
|
19
|
+
|
|
20
|
+
TYPE1.include?(value)
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
def self.from_value(value, default_value = BANK_ACCOUNT)
|
|
24
|
+
return default_value if value.nil?
|
|
25
|
+
|
|
26
|
+
str = value.to_s.strip
|
|
27
|
+
|
|
28
|
+
case str.downcase
|
|
29
|
+
when 'bank_account' then BANK_ACCOUNT
|
|
30
|
+
when 'crypto_address' then CRYPTO_ADDRESS
|
|
31
|
+
else
|
|
32
|
+
default_value
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
end
|
|
36
|
+
end
|
|
@@ -0,0 +1,36 @@
|
|
|
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
|
+
# Bank account type.
|
|
8
|
+
class Type2
|
|
9
|
+
TYPE2 = [
|
|
10
|
+
# TODO: Write general description for CHECKING
|
|
11
|
+
CHECKING = 'CHECKING'.freeze,
|
|
12
|
+
|
|
13
|
+
# TODO: Write general description for SAVINGS
|
|
14
|
+
SAVINGS = 'SAVINGS'.freeze
|
|
15
|
+
].freeze
|
|
16
|
+
|
|
17
|
+
def self.validate(value)
|
|
18
|
+
return false if value.nil?
|
|
19
|
+
|
|
20
|
+
TYPE2.include?(value)
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
def self.from_value(value, default_value = CHECKING)
|
|
24
|
+
return default_value if value.nil?
|
|
25
|
+
|
|
26
|
+
str = value.to_s.strip
|
|
27
|
+
|
|
28
|
+
case str.downcase
|
|
29
|
+
when 'checking' then CHECKING
|
|
30
|
+
when 'savings' then SAVINGS
|
|
31
|
+
else
|
|
32
|
+
default_value
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
end
|
|
36
|
+
end
|
|
@@ -0,0 +1,156 @@
|
|
|
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
|
+
# UpdateDecision Model.
|
|
8
|
+
class UpdateDecision < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# Your environment-specific workflow identifier. <br /><br /> **Note:** The
|
|
13
|
+
# workflow name must be unique within your RiskOS™ environment. It is not
|
|
14
|
+
# scoped by use case and must identify a single active workflow for each
|
|
15
|
+
# Evaluation API request.
|
|
16
|
+
# @return [String]
|
|
17
|
+
attr_accessor :workflow
|
|
18
|
+
|
|
19
|
+
# The new decision value to apply.
|
|
20
|
+
# @return [Decision1]
|
|
21
|
+
attr_accessor :decision
|
|
22
|
+
|
|
23
|
+
# Comma-separated list of tags to apply to the evaluation.
|
|
24
|
+
# @return [String]
|
|
25
|
+
attr_accessor :tags
|
|
26
|
+
|
|
27
|
+
# The review queue to assign the evaluation to.
|
|
28
|
+
# @return [String]
|
|
29
|
+
attr_accessor :queue
|
|
30
|
+
|
|
31
|
+
# Optional notes to add context to the evaluation.
|
|
32
|
+
# @return [String]
|
|
33
|
+
attr_accessor :notes
|
|
34
|
+
|
|
35
|
+
# An array of base64-encoded attachment files.
|
|
36
|
+
# @return [Array[Attachment]]
|
|
37
|
+
attr_accessor :attachments
|
|
38
|
+
|
|
39
|
+
# A mapping from model property names to API property names.
|
|
40
|
+
def self.names
|
|
41
|
+
@_hash = {} if @_hash.nil?
|
|
42
|
+
@_hash['workflow'] = 'workflow'
|
|
43
|
+
@_hash['decision'] = 'decision'
|
|
44
|
+
@_hash['tags'] = 'tags'
|
|
45
|
+
@_hash['queue'] = 'queue'
|
|
46
|
+
@_hash['notes'] = 'notes'
|
|
47
|
+
@_hash['attachments'] = 'attachments'
|
|
48
|
+
@_hash
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
# An array for optional fields
|
|
52
|
+
def self.optionals
|
|
53
|
+
%w[
|
|
54
|
+
tags
|
|
55
|
+
queue
|
|
56
|
+
notes
|
|
57
|
+
attachments
|
|
58
|
+
]
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
# An array for nullable fields
|
|
62
|
+
def self.nullables
|
|
63
|
+
[]
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
def initialize(workflow:, decision:, tags: SKIP, queue: SKIP, notes: SKIP,
|
|
67
|
+
attachments: SKIP, additional_properties: nil)
|
|
68
|
+
# Add additional model properties to the instance
|
|
69
|
+
additional_properties = {} if additional_properties.nil?
|
|
70
|
+
|
|
71
|
+
@workflow = workflow
|
|
72
|
+
@decision = decision
|
|
73
|
+
@tags = tags unless tags == SKIP
|
|
74
|
+
@queue = queue unless queue == SKIP
|
|
75
|
+
@notes = notes unless notes == SKIP
|
|
76
|
+
@attachments = attachments unless attachments == SKIP
|
|
77
|
+
@additional_properties = additional_properties
|
|
78
|
+
end
|
|
79
|
+
|
|
80
|
+
# Creates an instance of the object from a hash.
|
|
81
|
+
def self.from_hash(hash)
|
|
82
|
+
return nil unless hash
|
|
83
|
+
|
|
84
|
+
# Extract variables from the hash.
|
|
85
|
+
workflow = hash.key?('workflow') ? hash['workflow'] : nil
|
|
86
|
+
decision = hash.key?('decision') ? hash['decision'] : nil
|
|
87
|
+
tags = hash.key?('tags') ? hash['tags'] : SKIP
|
|
88
|
+
queue = hash.key?('queue') ? hash['queue'] : SKIP
|
|
89
|
+
notes = hash.key?('notes') ? hash['notes'] : SKIP
|
|
90
|
+
# Parameter is an array, so we need to iterate through it
|
|
91
|
+
attachments = nil
|
|
92
|
+
unless hash['attachments'].nil?
|
|
93
|
+
attachments = []
|
|
94
|
+
hash['attachments'].each do |structure|
|
|
95
|
+
attachments << (Attachment.from_hash(structure) if structure)
|
|
96
|
+
end
|
|
97
|
+
end
|
|
98
|
+
|
|
99
|
+
attachments = SKIP unless hash.key?('attachments')
|
|
100
|
+
|
|
101
|
+
# Create a new hash for additional properties, removing known properties.
|
|
102
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
103
|
+
|
|
104
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
105
|
+
new_hash, proc { |value| value }
|
|
106
|
+
)
|
|
107
|
+
|
|
108
|
+
# Create object from extracted values.
|
|
109
|
+
UpdateDecision.new(workflow: workflow,
|
|
110
|
+
decision: decision,
|
|
111
|
+
tags: tags,
|
|
112
|
+
queue: queue,
|
|
113
|
+
notes: notes,
|
|
114
|
+
attachments: attachments,
|
|
115
|
+
additional_properties: additional_properties)
|
|
116
|
+
end
|
|
117
|
+
|
|
118
|
+
# Validates an instance of the object from a given value.
|
|
119
|
+
# @param [UpdateDecision | Hash] The value against the validation is performed.
|
|
120
|
+
def self.validate(value)
|
|
121
|
+
if value.instance_of? self
|
|
122
|
+
return (
|
|
123
|
+
APIHelper.valid_type?(value.workflow,
|
|
124
|
+
->(val) { val.instance_of? String }) and
|
|
125
|
+
APIHelper.valid_type?(value.decision,
|
|
126
|
+
->(val) { Decision1.validate(val) })
|
|
127
|
+
)
|
|
128
|
+
end
|
|
129
|
+
|
|
130
|
+
return false unless value.instance_of? Hash
|
|
131
|
+
|
|
132
|
+
(
|
|
133
|
+
APIHelper.valid_type?(value['workflow'],
|
|
134
|
+
->(val) { val.instance_of? String }) and
|
|
135
|
+
APIHelper.valid_type?(value['decision'],
|
|
136
|
+
->(val) { Decision1.validate(val) })
|
|
137
|
+
)
|
|
138
|
+
end
|
|
139
|
+
|
|
140
|
+
# Provides a human-readable string representation of the object.
|
|
141
|
+
def to_s
|
|
142
|
+
class_name = self.class.name.split('::').last
|
|
143
|
+
"<#{class_name} workflow: #{@workflow}, decision: #{@decision}, tags: #{@tags}, queue:"\
|
|
144
|
+
" #{@queue}, notes: #{@notes}, attachments: #{@attachments}, additional_properties:"\
|
|
145
|
+
" #{@additional_properties}>"
|
|
146
|
+
end
|
|
147
|
+
|
|
148
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
149
|
+
def inspect
|
|
150
|
+
class_name = self.class.name.split('::').last
|
|
151
|
+
"<#{class_name} workflow: #{@workflow.inspect}, decision: #{@decision.inspect}, tags:"\
|
|
152
|
+
" #{@tags.inspect}, queue: #{@queue.inspect}, notes: #{@notes.inspect}, attachments:"\
|
|
153
|
+
" #{@attachments.inspect}, additional_properties: #{@additional_properties}>"
|
|
154
|
+
end
|
|
155
|
+
end
|
|
156
|
+
end
|
|
@@ -0,0 +1,169 @@
|
|
|
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
|
+
# UpdateStatus Model.
|
|
8
|
+
class UpdateStatus < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# Your environment-specific workflow identifier. <br /><br /> **Note:** The
|
|
13
|
+
# workflow name must be unique within your RiskOS™ environment. It is not
|
|
14
|
+
# scoped by use case and must identify a single active workflow for each
|
|
15
|
+
# Evaluation API request.
|
|
16
|
+
# @return [String]
|
|
17
|
+
attr_accessor :workflow
|
|
18
|
+
|
|
19
|
+
# The new status to apply.
|
|
20
|
+
# @return [Status1]
|
|
21
|
+
attr_accessor :status
|
|
22
|
+
|
|
23
|
+
# An optional sub-status providing more detail (e.g., `In Review`).
|
|
24
|
+
# @return [String]
|
|
25
|
+
attr_accessor :sub_status
|
|
26
|
+
|
|
27
|
+
# Comma-separated list of tags to apply to the evaluation.
|
|
28
|
+
# @return [String]
|
|
29
|
+
attr_accessor :tags
|
|
30
|
+
|
|
31
|
+
# The review queue to assign the evaluation to.
|
|
32
|
+
# @return [String]
|
|
33
|
+
attr_accessor :queue
|
|
34
|
+
|
|
35
|
+
# Optional notes to add context to the evaluation.
|
|
36
|
+
# @return [String]
|
|
37
|
+
attr_accessor :notes
|
|
38
|
+
|
|
39
|
+
# An array of base64-encoded attachment files.
|
|
40
|
+
# @return [Array[Attachment]]
|
|
41
|
+
attr_accessor :attachments
|
|
42
|
+
|
|
43
|
+
# A mapping from model property names to API property names.
|
|
44
|
+
def self.names
|
|
45
|
+
@_hash = {} if @_hash.nil?
|
|
46
|
+
@_hash['workflow'] = 'workflow'
|
|
47
|
+
@_hash['status'] = 'status'
|
|
48
|
+
@_hash['sub_status'] = 'sub_status'
|
|
49
|
+
@_hash['tags'] = 'tags'
|
|
50
|
+
@_hash['queue'] = 'queue'
|
|
51
|
+
@_hash['notes'] = 'notes'
|
|
52
|
+
@_hash['attachments'] = 'attachments'
|
|
53
|
+
@_hash
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
# An array for optional fields
|
|
57
|
+
def self.optionals
|
|
58
|
+
%w[
|
|
59
|
+
tags
|
|
60
|
+
queue
|
|
61
|
+
notes
|
|
62
|
+
attachments
|
|
63
|
+
]
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
# An array for nullable fields
|
|
67
|
+
def self.nullables
|
|
68
|
+
[]
|
|
69
|
+
end
|
|
70
|
+
|
|
71
|
+
def initialize(workflow:, status:, sub_status:, tags: SKIP, queue: SKIP,
|
|
72
|
+
notes: SKIP, attachments: SKIP, additional_properties: nil)
|
|
73
|
+
# Add additional model properties to the instance
|
|
74
|
+
additional_properties = {} if additional_properties.nil?
|
|
75
|
+
|
|
76
|
+
@workflow = workflow
|
|
77
|
+
@status = status
|
|
78
|
+
@sub_status = sub_status
|
|
79
|
+
@tags = tags unless tags == SKIP
|
|
80
|
+
@queue = queue unless queue == SKIP
|
|
81
|
+
@notes = notes unless notes == SKIP
|
|
82
|
+
@attachments = attachments unless attachments == SKIP
|
|
83
|
+
@additional_properties = additional_properties
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
# Creates an instance of the object from a hash.
|
|
87
|
+
def self.from_hash(hash)
|
|
88
|
+
return nil unless hash
|
|
89
|
+
|
|
90
|
+
# Extract variables from the hash.
|
|
91
|
+
workflow = hash.key?('workflow') ? hash['workflow'] : nil
|
|
92
|
+
status = hash.key?('status') ? hash['status'] : nil
|
|
93
|
+
sub_status = hash.key?('sub_status') ? hash['sub_status'] : nil
|
|
94
|
+
tags = hash.key?('tags') ? hash['tags'] : SKIP
|
|
95
|
+
queue = hash.key?('queue') ? hash['queue'] : SKIP
|
|
96
|
+
notes = hash.key?('notes') ? hash['notes'] : SKIP
|
|
97
|
+
# Parameter is an array, so we need to iterate through it
|
|
98
|
+
attachments = nil
|
|
99
|
+
unless hash['attachments'].nil?
|
|
100
|
+
attachments = []
|
|
101
|
+
hash['attachments'].each do |structure|
|
|
102
|
+
attachments << (Attachment.from_hash(structure) if structure)
|
|
103
|
+
end
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
attachments = SKIP unless hash.key?('attachments')
|
|
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
|
+
UpdateStatus.new(workflow: workflow,
|
|
117
|
+
status: status,
|
|
118
|
+
sub_status: sub_status,
|
|
119
|
+
tags: tags,
|
|
120
|
+
queue: queue,
|
|
121
|
+
notes: notes,
|
|
122
|
+
attachments: attachments,
|
|
123
|
+
additional_properties: additional_properties)
|
|
124
|
+
end
|
|
125
|
+
|
|
126
|
+
# Validates an instance of the object from a given value.
|
|
127
|
+
# @param [UpdateStatus | Hash] The value against the validation is performed.
|
|
128
|
+
def self.validate(value)
|
|
129
|
+
if value.instance_of? self
|
|
130
|
+
return (
|
|
131
|
+
APIHelper.valid_type?(value.workflow,
|
|
132
|
+
->(val) { val.instance_of? String }) and
|
|
133
|
+
APIHelper.valid_type?(value.status,
|
|
134
|
+
->(val) { Status1.validate(val) }) and
|
|
135
|
+
APIHelper.valid_type?(value.sub_status,
|
|
136
|
+
->(val) { val.instance_of? String })
|
|
137
|
+
)
|
|
138
|
+
end
|
|
139
|
+
|
|
140
|
+
return false unless value.instance_of? Hash
|
|
141
|
+
|
|
142
|
+
(
|
|
143
|
+
APIHelper.valid_type?(value['workflow'],
|
|
144
|
+
->(val) { val.instance_of? String }) and
|
|
145
|
+
APIHelper.valid_type?(value['status'],
|
|
146
|
+
->(val) { Status1.validate(val) }) and
|
|
147
|
+
APIHelper.valid_type?(value['sub_status'],
|
|
148
|
+
->(val) { val.instance_of? String })
|
|
149
|
+
)
|
|
150
|
+
end
|
|
151
|
+
|
|
152
|
+
# Provides a human-readable string representation of the object.
|
|
153
|
+
def to_s
|
|
154
|
+
class_name = self.class.name.split('::').last
|
|
155
|
+
"<#{class_name} workflow: #{@workflow}, status: #{@status}, sub_status: #{@sub_status},"\
|
|
156
|
+
" tags: #{@tags}, queue: #{@queue}, notes: #{@notes}, attachments: #{@attachments},"\
|
|
157
|
+
" additional_properties: #{@additional_properties}>"
|
|
158
|
+
end
|
|
159
|
+
|
|
160
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
161
|
+
def inspect
|
|
162
|
+
class_name = self.class.name.split('::').last
|
|
163
|
+
"<#{class_name} workflow: #{@workflow.inspect}, status: #{@status.inspect}, sub_status:"\
|
|
164
|
+
" #{@sub_status.inspect}, tags: #{@tags.inspect}, queue: #{@queue.inspect}, notes:"\
|
|
165
|
+
" #{@notes.inspect}, attachments: #{@attachments.inspect}, additional_properties:"\
|
|
166
|
+
" #{@additional_properties}>"
|
|
167
|
+
end
|
|
168
|
+
end
|
|
169
|
+
end
|