sc-apimatic-sdk 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (122) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE +28 -0
  3. data/README.md +166 -0
  4. data/bin/console +15 -0
  5. data/lib/socure_risk_os_api/api_helper.rb +10 -0
  6. data/lib/socure_risk_os_api/apis/base_api.rb +67 -0
  7. data/lib/socure_risk_os_api/apis/evaluation_api.rb +318 -0
  8. data/lib/socure_risk_os_api/apis/feedback_api.rb +102 -0
  9. data/lib/socure_risk_os_api/apis/reason_codes_api.rb +61 -0
  10. data/lib/socure_risk_os_api/client.rb +85 -0
  11. data/lib/socure_risk_os_api/configuration.rb +179 -0
  12. data/lib/socure_risk_os_api/exceptions/api_exception.rb +21 -0
  13. data/lib/socure_risk_os_api/exceptions/error_exception.rb +80 -0
  14. data/lib/socure_risk_os_api/http/api_response.rb +19 -0
  15. data/lib/socure_risk_os_api/http/auth/oauth_2.rb +53 -0
  16. data/lib/socure_risk_os_api/http/http_call_back.rb +10 -0
  17. data/lib/socure_risk_os_api/http/http_method_enum.rb +10 -0
  18. data/lib/socure_risk_os_api/http/http_request.rb +10 -0
  19. data/lib/socure_risk_os_api/http/http_response.rb +10 -0
  20. data/lib/socure_risk_os_api/http/proxy_settings.rb +22 -0
  21. data/lib/socure_risk_os_api/logging/configuration/api_logging_configuration.rb +186 -0
  22. data/lib/socure_risk_os_api/logging/sdk_logger.rb +17 -0
  23. data/lib/socure_risk_os_api/models/account.rb +206 -0
  24. data/lib/socure_risk_os_api/models/account1.rb +203 -0
  25. data/lib/socure_risk_os_api/models/account_inquiry.rb +36 -0
  26. data/lib/socure_risk_os_api/models/account_snapshot.rb +106 -0
  27. data/lib/socure_risk_os_api/models/account_view.rb +116 -0
  28. data/lib/socure_risk_os_api/models/actions.rb +88 -0
  29. data/lib/socure_risk_os_api/models/additional_context.rb +235 -0
  30. data/lib/socure_risk_os_api/models/additional_individual.rb +270 -0
  31. data/lib/socure_risk_os_api/models/address.rb +159 -0
  32. data/lib/socure_risk_os_api/models/address1.rb +144 -0
  33. data/lib/socure_risk_os_api/models/advanced_prefill.rb +168 -0
  34. data/lib/socure_risk_os_api/models/age_assurance.rb +163 -0
  35. data/lib/socure_risk_os_api/models/amount.rb +95 -0
  36. data/lib/socure_risk_os_api/models/api_evaluation_monitoring_request.rb +96 -0
  37. data/lib/socure_risk_os_api/models/api_evaluation_monitoring_response.rb +84 -0
  38. data/lib/socure_risk_os_api/models/api_feedback_request.rb +153 -0
  39. data/lib/socure_risk_os_api/models/api_reason_codes_response.rb +85 -0
  40. data/lib/socure_risk_os_api/models/attachment.rb +95 -0
  41. data/lib/socure_risk_os_api/models/bank_account_verification.rb +167 -0
  42. data/lib/socure_risk_os_api/models/base_model.rb +110 -0
  43. data/lib/socure_risk_os_api/models/business.rb +224 -0
  44. data/lib/socure_risk_os_api/models/business_onboarding.rb +167 -0
  45. data/lib/socure_risk_os_api/models/channel.rb +45 -0
  46. data/lib/socure_risk_os_api/models/channel1.rb +44 -0
  47. data/lib/socure_risk_os_api/models/code.rb +68 -0
  48. data/lib/socure_risk_os_api/models/consumer_onboarding.rb +167 -0
  49. data/lib/socure_risk_os_api/models/consumer_onboarding_patch.rb +178 -0
  50. data/lib/socure_risk_os_api/models/crypto_address.rb +105 -0
  51. data/lib/socure_risk_os_api/models/data.rb +106 -0
  52. data/lib/socure_risk_os_api/models/data1.rb +166 -0
  53. data/lib/socure_risk_os_api/models/data10.rb +166 -0
  54. data/lib/socure_risk_os_api/models/data2.rb +145 -0
  55. data/lib/socure_risk_os_api/models/data3.rb +160 -0
  56. data/lib/socure_risk_os_api/models/data4.rb +157 -0
  57. data/lib/socure_risk_os_api/models/data5.rb +154 -0
  58. data/lib/socure_risk_os_api/models/data6.rb +174 -0
  59. data/lib/socure_risk_os_api/models/data7.rb +205 -0
  60. data/lib/socure_risk_os_api/models/data8.rb +115 -0
  61. data/lib/socure_risk_os_api/models/data9.rb +130 -0
  62. data/lib/socure_risk_os_api/models/data_enrichment.rb +182 -0
  63. data/lib/socure_risk_os_api/models/decision.rb +47 -0
  64. data/lib/socure_risk_os_api/models/decision1.rb +48 -0
  65. data/lib/socure_risk_os_api/models/destination.rb +136 -0
  66. data/lib/socure_risk_os_api/models/device.rb +339 -0
  67. data/lib/socure_risk_os_api/models/disclosure_purpose.rb +29 -0
  68. data/lib/socure_risk_os_api/models/document_verification_config.rb +195 -0
  69. data/lib/socure_risk_os_api/models/docv.rb +98 -0
  70. data/lib/socure_risk_os_api/models/environment_name.rb +37 -0
  71. data/lib/socure_risk_os_api/models/eval_response_with_out_socure_data.rb +413 -0
  72. data/lib/socure_risk_os_api/models/eval_source.rb +38 -0
  73. data/lib/socure_risk_os_api/models/event_category.rb +45 -0
  74. data/lib/socure_risk_os_api/models/event_category1.rb +45 -0
  75. data/lib/socure_risk_os_api/models/event_category2.rb +57 -0
  76. data/lib/socure_risk_os_api/models/event_details.rb +96 -0
  77. data/lib/socure_risk_os_api/models/formation.rb +138 -0
  78. data/lib/socure_risk_os_api/models/fraud_feedback_import_response.rb +73 -0
  79. data/lib/socure_risk_os_api/models/fraud_feedback_response.rb +73 -0
  80. data/lib/socure_risk_os_api/models/fraud_label.rb +37 -0
  81. data/lib/socure_risk_os_api/models/gender.rb +40 -0
  82. data/lib/socure_risk_os_api/models/generic_passthrough.rb +169 -0
  83. data/lib/socure_risk_os_api/models/individual.rb +281 -0
  84. data/lib/socure_risk_os_api/models/individual1.rb +292 -0
  85. data/lib/socure_risk_os_api/models/individual3.rb +206 -0
  86. data/lib/socure_risk_os_api/models/individual4.rb +182 -0
  87. data/lib/socure_risk_os_api/models/individual5.rb +297 -0
  88. data/lib/socure_risk_os_api/models/individual6.rb +148 -0
  89. data/lib/socure_risk_os_api/models/input.rb +86 -0
  90. data/lib/socure_risk_os_api/models/inquiry.rb +36 -0
  91. data/lib/socure_risk_os_api/models/invalid_arg.rb +85 -0
  92. data/lib/socure_risk_os_api/models/language.rb +247 -0
  93. data/lib/socure_risk_os_api/models/login_and_authentication.rb +167 -0
  94. data/lib/socure_risk_os_api/models/method.rb +37 -0
  95. data/lib/socure_risk_os_api/models/monitoring_status.rb +37 -0
  96. data/lib/socure_risk_os_api/models/operation.rb +38 -0
  97. data/lib/socure_risk_os_api/models/otp.rb +95 -0
  98. data/lib/socure_risk_os_api/models/otp1.rb +98 -0
  99. data/lib/socure_risk_os_api/models/payment_screening.rb +167 -0
  100. data/lib/socure_risk_os_api/models/payment_screening_business.rb +155 -0
  101. data/lib/socure_risk_os_api/models/payment_screening_individual.rb +254 -0
  102. data/lib/socure_risk_os_api/models/payment_screening_instrument.rb +105 -0
  103. data/lib/socure_risk_os_api/models/product.rb +76 -0
  104. data/lib/socure_risk_os_api/models/reason_code.rb +149 -0
  105. data/lib/socure_risk_os_api/models/redirect.rb +118 -0
  106. data/lib/socure_risk_os_api/models/response.rb +77 -0
  107. data/lib/socure_risk_os_api/models/source.rb +146 -0
  108. data/lib/socure_risk_os_api/models/status.rb +40 -0
  109. data/lib/socure_risk_os_api/models/status1.rb +40 -0
  110. data/lib/socure_risk_os_api/models/transaction_details.rb +97 -0
  111. data/lib/socure_risk_os_api/models/trust_and_safety.rb +167 -0
  112. data/lib/socure_risk_os_api/models/type.rb +36 -0
  113. data/lib/socure_risk_os_api/models/type1.rb +36 -0
  114. data/lib/socure_risk_os_api/models/type2.rb +36 -0
  115. data/lib/socure_risk_os_api/models/update_decision.rb +156 -0
  116. data/lib/socure_risk_os_api/models/update_status.rb +169 -0
  117. data/lib/socure_risk_os_api/models/workforce_verification.rb +167 -0
  118. data/lib/socure_risk_os_api/utilities/date_time_helper.rb +11 -0
  119. data/lib/socure_risk_os_api/utilities/file_wrapper.rb +28 -0
  120. data/lib/socure_risk_os_api/utilities/union_type_lookup.rb +69 -0
  121. data/lib/socure_risk_os_api.rb +143 -0
  122. metadata +205 -0
@@ -0,0 +1,224 @@
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
+ # Information related to the business entity being evaluated.
8
+ class Business < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # A unique identifier for the business entity.
13
+ # @return [String]
14
+ attr_accessor :id
15
+
16
+ # The registered legal name of the business.
17
+ # @return [String]
18
+ attr_accessor :name
19
+
20
+ # The consumer’s phone number. The API expects the standard E.164 format
21
+ # (e.g., +12025550147) but tolerates hyphens and spaces for user
22
+ # convenience.
23
+ # **Examples:**
24
+ # - United States: `+13475550100`
25
+ # - United Kingdom: `+447911123456`
26
+ # - Brazil: `+5511987654321`
27
+ # - India: `+919876543210`
28
+ # - Australia: `+61412345678`
29
+ # @return [String]
30
+ attr_accessor :phone_number
31
+
32
+ # The consumer’s phone number. The API expects the standard E.164 format
33
+ # (e.g., +12025550147) but tolerates hyphens and spaces for user
34
+ # convenience.
35
+ # **Examples:**
36
+ # - United States: `+13475550100`
37
+ # - United Kingdom: `+447911123456`
38
+ # - Brazil: `+5511987654321`
39
+ # - India: `+919876543210`
40
+ # - Australia: `+61412345678`
41
+ # @return [Address]
42
+ attr_accessor :address
43
+
44
+ # The consumer’s phone number. The API expects the standard E.164 format
45
+ # (e.g., +12025550147) but tolerates hyphens and spaces for user
46
+ # convenience.
47
+ # **Examples:**
48
+ # - United States: `+13475550100`
49
+ # - United Kingdom: `+447911123456`
50
+ # - Brazil: `+5511987654321`
51
+ # - India: `+919876543210`
52
+ # - Australia: `+61412345678`
53
+ # @return [Formation]
54
+ attr_accessor :formation
55
+
56
+ # The Employer Identification Number (EIN) of the business.
57
+ # @return [String]
58
+ attr_accessor :ein
59
+
60
+ # Additional addresses associated with the business, such as mailing or
61
+ # branch locations.
62
+ # @return [Array[Address]]
63
+ attr_accessor :additional_addresses
64
+
65
+ # The website URL of the business.
66
+ # @return [String]
67
+ attr_accessor :website_url
68
+
69
+ # Represents a monetary amount with its associated currency.
70
+ # @return [Amount]
71
+ attr_accessor :last_fiscal_revenue
72
+
73
+ # Defines the schema of an bank account.
74
+ # @return [Account]
75
+ attr_accessor :account
76
+
77
+ # Use this field to send any additional, customer-specific data relevant to
78
+ # the business evaluation. See [Custom
79
+ # Fields](https://help.socure.com/riskos/docs/custom-fields) for more
80
+ # information.
81
+ # @return [Hash[String, Object]]
82
+ attr_accessor :custom
83
+
84
+ # A mapping from model property names to API property names.
85
+ def self.names
86
+ @_hash = {} if @_hash.nil?
87
+ @_hash['id'] = 'id'
88
+ @_hash['name'] = 'name'
89
+ @_hash['phone_number'] = 'phone_number'
90
+ @_hash['address'] = 'address'
91
+ @_hash['formation'] = 'formation'
92
+ @_hash['ein'] = 'ein'
93
+ @_hash['additional_addresses'] = 'additional_addresses'
94
+ @_hash['website_url'] = 'website_url'
95
+ @_hash['last_fiscal_revenue'] = 'last_fiscal_revenue'
96
+ @_hash['account'] = 'account'
97
+ @_hash['custom'] = 'custom'
98
+ @_hash
99
+ end
100
+
101
+ # An array for optional fields
102
+ def self.optionals
103
+ %w[
104
+ id
105
+ name
106
+ phone_number
107
+ address
108
+ formation
109
+ ein
110
+ additional_addresses
111
+ website_url
112
+ last_fiscal_revenue
113
+ account
114
+ custom
115
+ ]
116
+ end
117
+
118
+ # An array for nullable fields
119
+ def self.nullables
120
+ []
121
+ end
122
+
123
+ def initialize(id: SKIP, name: SKIP, phone_number: SKIP, address: SKIP,
124
+ formation: SKIP, ein: SKIP, additional_addresses: SKIP,
125
+ website_url: SKIP, last_fiscal_revenue: SKIP, account: SKIP,
126
+ custom: SKIP, additional_properties: nil)
127
+ # Add additional model properties to the instance
128
+ additional_properties = {} if additional_properties.nil?
129
+
130
+ @id = id unless id == SKIP
131
+ @name = name unless name == SKIP
132
+ @phone_number = phone_number unless phone_number == SKIP
133
+ @address = address unless address == SKIP
134
+ @formation = formation unless formation == SKIP
135
+ @ein = ein unless ein == SKIP
136
+ @additional_addresses = additional_addresses unless additional_addresses == SKIP
137
+ @website_url = website_url unless website_url == SKIP
138
+ @last_fiscal_revenue = last_fiscal_revenue unless last_fiscal_revenue == SKIP
139
+ @account = account unless account == SKIP
140
+ @custom = custom unless custom == SKIP
141
+ @additional_properties = additional_properties
142
+ end
143
+
144
+ # Creates an instance of the object from a hash.
145
+ def self.from_hash(hash)
146
+ return nil unless hash
147
+
148
+ # Extract variables from the hash.
149
+ id = hash.key?('id') ? hash['id'] : SKIP
150
+ name = hash.key?('name') ? hash['name'] : SKIP
151
+ phone_number = hash.key?('phone_number') ? hash['phone_number'] : SKIP
152
+ address = Address.from_hash(hash['address']) if hash['address']
153
+ formation = Formation.from_hash(hash['formation']) if hash['formation']
154
+ ein = hash.key?('ein') ? hash['ein'] : SKIP
155
+ # Parameter is an array, so we need to iterate through it
156
+ additional_addresses = nil
157
+ unless hash['additional_addresses'].nil?
158
+ additional_addresses = []
159
+ hash['additional_addresses'].each do |structure|
160
+ additional_addresses << (Address.from_hash(structure) if structure)
161
+ end
162
+ end
163
+
164
+ additional_addresses = SKIP unless hash.key?('additional_addresses')
165
+ website_url = hash.key?('website_url') ? hash['website_url'] : SKIP
166
+ last_fiscal_revenue = Amount.from_hash(hash['last_fiscal_revenue']) if
167
+ hash['last_fiscal_revenue']
168
+ account = Account.from_hash(hash['account']) if hash['account']
169
+ custom = hash.key?('custom') ? hash['custom'] : SKIP
170
+
171
+ # Create a new hash for additional properties, removing known properties.
172
+ new_hash = hash.reject { |k, _| names.value?(k) }
173
+
174
+ additional_properties = APIHelper.get_additional_properties(
175
+ new_hash, proc { |value| value }
176
+ )
177
+
178
+ # Create object from extracted values.
179
+ Business.new(id: id,
180
+ name: name,
181
+ phone_number: phone_number,
182
+ address: address,
183
+ formation: formation,
184
+ ein: ein,
185
+ additional_addresses: additional_addresses,
186
+ website_url: website_url,
187
+ last_fiscal_revenue: last_fiscal_revenue,
188
+ account: account,
189
+ custom: custom,
190
+ additional_properties: additional_properties)
191
+ end
192
+
193
+ # Validates an instance of the object from a given value.
194
+ # @param [Business | Hash] The value against the validation is performed.
195
+ def self.validate(value)
196
+ return true if value.instance_of? self
197
+
198
+ return false unless value.instance_of? Hash
199
+
200
+ true
201
+ end
202
+
203
+ # Provides a human-readable string representation of the object.
204
+ def to_s
205
+ class_name = self.class.name.split('::').last
206
+ "<#{class_name} id: #{@id}, name: #{@name}, phone_number: #{@phone_number}, address:"\
207
+ " #{@address}, formation: #{@formation}, ein: #{@ein}, additional_addresses:"\
208
+ " #{@additional_addresses}, website_url: #{@website_url}, last_fiscal_revenue:"\
209
+ " #{@last_fiscal_revenue}, account: #{@account}, custom: #{@custom}, additional_properties:"\
210
+ " #{@additional_properties}>"
211
+ end
212
+
213
+ # Provides a debugging-friendly string with detailed object information.
214
+ def inspect
215
+ class_name = self.class.name.split('::').last
216
+ "<#{class_name} id: #{@id.inspect}, name: #{@name.inspect}, phone_number:"\
217
+ " #{@phone_number.inspect}, address: #{@address.inspect}, formation: #{@formation.inspect},"\
218
+ " ein: #{@ein.inspect}, additional_addresses: #{@additional_addresses.inspect}, website_url:"\
219
+ " #{@website_url.inspect}, last_fiscal_revenue: #{@last_fiscal_revenue.inspect}, account:"\
220
+ " #{@account.inspect}, custom: #{@custom.inspect}, additional_properties:"\
221
+ " #{@additional_properties}>"
222
+ end
223
+ end
224
+ 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
+ # BusinessOnboarding Model.
9
+ class BusinessOnboarding < 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 Business Onboarding workflow.
44
+ # @return [Data6]
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 = Data6.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
+ BusinessOnboarding.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 [BusinessOnboarding | 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) { Data6.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) { Data6.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,45 @@
1
+ # socure_risk_os_api
2
+ #
3
+ # This file was automatically generated by APIMATIC
4
+ # v3.0 ( https://www.apimatic.io ).
5
+
6
+ module SocureRiskOsApi
7
+ # Specifies the mode of interaction on the consumer's end. <br /><br />
8
+ # Available values include: `web`, `mobile`, `pos`, and `other`.
9
+ class Channel
10
+ CHANNEL = [
11
+ # TODO: Write general description for WEB
12
+ WEB = 'web'.freeze,
13
+
14
+ # TODO: Write general description for MOBILE
15
+ MOBILE = 'mobile'.freeze,
16
+
17
+ # TODO: Write general description for POS
18
+ POS = 'pos'.freeze,
19
+
20
+ # TODO: Write general description for OTHER
21
+ OTHER = 'other'.freeze
22
+ ].freeze
23
+
24
+ def self.validate(value)
25
+ return false if value.nil?
26
+
27
+ CHANNEL.include?(value)
28
+ end
29
+
30
+ def self.from_value(value, default_value = WEB)
31
+ return default_value if value.nil?
32
+
33
+ str = value.to_s.strip
34
+
35
+ case str.downcase
36
+ when 'web' then WEB
37
+ when 'mobile' then MOBILE
38
+ when 'pos' then POS
39
+ when 'other' then OTHER
40
+ else
41
+ default_value
42
+ end
43
+ end
44
+ end
45
+ end
@@ -0,0 +1,44 @@
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
+ # Mode of interaction on the consumer's end.
8
+ class Channel1
9
+ CHANNEL1 = [
10
+ # TODO: Write general description for WEB
11
+ WEB = 'web'.freeze,
12
+
13
+ # TODO: Write general description for MOBILE
14
+ MOBILE = 'mobile'.freeze,
15
+
16
+ # TODO: Write general description for POS
17
+ POS = 'pos'.freeze,
18
+
19
+ # TODO: Write general description for OTHER
20
+ OTHER = 'other'.freeze
21
+ ].freeze
22
+
23
+ def self.validate(value)
24
+ return false if value.nil?
25
+
26
+ CHANNEL1.include?(value)
27
+ end
28
+
29
+ def self.from_value(value, default_value = WEB)
30
+ return default_value if value.nil?
31
+
32
+ str = value.to_s.strip
33
+
34
+ case str.downcase
35
+ when 'web' then WEB
36
+ when 'mobile' then MOBILE
37
+ when 'pos' then POS
38
+ when 'other' then OTHER
39
+ else
40
+ default_value
41
+ end
42
+ end
43
+ end
44
+ end
@@ -0,0 +1,68 @@
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
+ # A machine-readable error code for programmatic handling.
8
+ class Code
9
+ CODE = [
10
+ # TODO: Write general description for AUTHENTICATION_FAILED
11
+ AUTHENTICATION_FAILED = 'AUTHENTICATION_FAILED'.freeze,
12
+
13
+ # TODO: Write general description for PERMISSION_DENIED
14
+ PERMISSION_DENIED = 'PERMISSION_DENIED'.freeze,
15
+
16
+ # TODO: Write general description for WORKFLOW_NOT_FOUND
17
+ WORKFLOW_NOT_FOUND = 'WORKFLOW_NOT_FOUND'.freeze,
18
+
19
+ # TODO: Write general description for WORKFLOW_NOT_PUBLISHED
20
+ WORKFLOW_NOT_PUBLISHED = 'WORKFLOW_NOT_PUBLISHED'.freeze,
21
+
22
+ # TODO: Write general description for INVALID_REQUEST
23
+ INVALID_REQUEST = 'INVALID_REQUEST'.freeze,
24
+
25
+ # TODO: Write general description for INVALID_PAYLOAD
26
+ INVALID_PAYLOAD = 'INVALID_PAYLOAD'.freeze,
27
+
28
+ # TODO: Write general description for INVALID_ID
29
+ INVALID_ID = 'INVALID_ID'.freeze,
30
+
31
+ # TODO: Write general description for INVALID_FRAUD_TYPE
32
+ INVALID_FRAUD_TYPE = 'INVALID_FRAUD_TYPE'.freeze,
33
+
34
+ # TODO: Write general description for INTERNAL_ERROR
35
+ INTERNAL_ERROR = 'INTERNAL_ERROR'.freeze,
36
+
37
+ # TODO: Write general description for CUSTOMER_METADATA_TOO_LARGE
38
+ CUSTOMER_METADATA_TOO_LARGE = 'CUSTOMER_METADATA_TOO_LARGE'.freeze
39
+ ].freeze
40
+
41
+ def self.validate(value)
42
+ return false if value.nil?
43
+
44
+ CODE.include?(value)
45
+ end
46
+
47
+ def self.from_value(value, default_value = AUTHENTICATION_FAILED)
48
+ return default_value if value.nil?
49
+
50
+ str = value.to_s.strip
51
+
52
+ case str.downcase
53
+ when 'authentication_failed' then AUTHENTICATION_FAILED
54
+ when 'permission_denied' then PERMISSION_DENIED
55
+ when 'workflow_not_found' then WORKFLOW_NOT_FOUND
56
+ when 'workflow_not_published' then WORKFLOW_NOT_PUBLISHED
57
+ when 'invalid_request' then INVALID_REQUEST
58
+ when 'invalid_payload' then INVALID_PAYLOAD
59
+ when 'invalid_id' then INVALID_ID
60
+ when 'invalid_fraud_type' then INVALID_FRAUD_TYPE
61
+ when 'internal_error' then INTERNAL_ERROR
62
+ when 'customer_metadata_too_large' then CUSTOMER_METADATA_TOO_LARGE
63
+ else
64
+ default_value
65
+ end
66
+ end
67
+ end
68
+ end