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,155 @@
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
+ # Business party details for Payment Screening.
8
+ class PaymentScreeningBusiness < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # Unique identifier for the business entity.
13
+ # @return [String]
14
+ attr_accessor :id
15
+
16
+ # Legal business name. Recommended when party type is BUSINESS.
17
+ # @return [String]
18
+ attr_accessor :name
19
+
20
+ # Business phone number. E.164 is expected, but hyphens and spaces are
21
+ # tolerated.
22
+ # @return [String]
23
+ attr_accessor :phone_number
24
+
25
+ # Employer Identification Number (EIN) of the business.
26
+ # @return [String]
27
+ attr_accessor :ein
28
+
29
+ # Business website URL.
30
+ # @return [String]
31
+ attr_accessor :website_url
32
+
33
+ # Business website URL.
34
+ # @return [Address]
35
+ attr_accessor :address
36
+
37
+ # Financial instrument details for Payment Screening.
38
+ # @return [PaymentScreeningInstrument]
39
+ attr_accessor :instrument
40
+
41
+ # Business formation details.
42
+ # @return [Object]
43
+ attr_accessor :formation
44
+
45
+ # A mapping from model property names to API property names.
46
+ def self.names
47
+ @_hash = {} if @_hash.nil?
48
+ @_hash['id'] = 'id'
49
+ @_hash['name'] = 'name'
50
+ @_hash['phone_number'] = 'phone_number'
51
+ @_hash['ein'] = 'ein'
52
+ @_hash['website_url'] = 'website_url'
53
+ @_hash['address'] = 'address'
54
+ @_hash['instrument'] = 'instrument'
55
+ @_hash['formation'] = 'formation'
56
+ @_hash
57
+ end
58
+
59
+ # An array for optional fields
60
+ def self.optionals
61
+ %w[
62
+ id
63
+ name
64
+ phone_number
65
+ ein
66
+ website_url
67
+ address
68
+ instrument
69
+ formation
70
+ ]
71
+ end
72
+
73
+ # An array for nullable fields
74
+ def self.nullables
75
+ []
76
+ end
77
+
78
+ def initialize(id: SKIP, name: SKIP, phone_number: SKIP, ein: SKIP,
79
+ website_url: SKIP, address: SKIP, instrument: SKIP,
80
+ formation: SKIP, additional_properties: nil)
81
+ # Add additional model properties to the instance
82
+ additional_properties = {} if additional_properties.nil?
83
+
84
+ @id = id unless id == SKIP
85
+ @name = name unless name == SKIP
86
+ @phone_number = phone_number unless phone_number == SKIP
87
+ @ein = ein unless ein == SKIP
88
+ @website_url = website_url unless website_url == SKIP
89
+ @address = address unless address == SKIP
90
+ @instrument = instrument unless instrument == SKIP
91
+ @formation = formation unless formation == SKIP
92
+ @additional_properties = additional_properties
93
+ end
94
+
95
+ # Creates an instance of the object from a hash.
96
+ def self.from_hash(hash)
97
+ return nil unless hash
98
+
99
+ # Extract variables from the hash.
100
+ id = hash.key?('id') ? hash['id'] : SKIP
101
+ name = hash.key?('name') ? hash['name'] : SKIP
102
+ phone_number = hash.key?('phone_number') ? hash['phone_number'] : SKIP
103
+ ein = hash.key?('ein') ? hash['ein'] : SKIP
104
+ website_url = hash.key?('website_url') ? hash['website_url'] : SKIP
105
+ address = Address.from_hash(hash['address']) if hash['address']
106
+ instrument = PaymentScreeningInstrument.from_hash(hash['instrument']) if hash['instrument']
107
+ formation = hash.key?('formation') ? hash['formation'] : SKIP
108
+
109
+ # Create a new hash for additional properties, removing known properties.
110
+ new_hash = hash.reject { |k, _| names.value?(k) }
111
+
112
+ additional_properties = APIHelper.get_additional_properties(
113
+ new_hash, proc { |value| value }
114
+ )
115
+
116
+ # Create object from extracted values.
117
+ PaymentScreeningBusiness.new(id: id,
118
+ name: name,
119
+ phone_number: phone_number,
120
+ ein: ein,
121
+ website_url: website_url,
122
+ address: address,
123
+ instrument: instrument,
124
+ formation: formation,
125
+ additional_properties: additional_properties)
126
+ end
127
+
128
+ # Validates an instance of the object from a given value.
129
+ # @param [PaymentScreeningBusiness | Hash] The value against the validation is performed.
130
+ def self.validate(value)
131
+ return true if value.instance_of? self
132
+
133
+ return false unless value.instance_of? Hash
134
+
135
+ true
136
+ end
137
+
138
+ # Provides a human-readable string representation of the object.
139
+ def to_s
140
+ class_name = self.class.name.split('::').last
141
+ "<#{class_name} id: #{@id}, name: #{@name}, phone_number: #{@phone_number}, ein: #{@ein},"\
142
+ " website_url: #{@website_url}, address: #{@address}, instrument: #{@instrument}, formation:"\
143
+ " #{@formation}, additional_properties: #{@additional_properties}>"
144
+ end
145
+
146
+ # Provides a debugging-friendly string with detailed object information.
147
+ def inspect
148
+ class_name = self.class.name.split('::').last
149
+ "<#{class_name} id: #{@id.inspect}, name: #{@name.inspect}, phone_number:"\
150
+ " #{@phone_number.inspect}, ein: #{@ein.inspect}, website_url: #{@website_url.inspect},"\
151
+ " address: #{@address.inspect}, instrument: #{@instrument.inspect}, formation:"\
152
+ " #{@formation.inspect}, additional_properties: #{@additional_properties}>"
153
+ end
154
+ end
155
+ end
@@ -0,0 +1,254 @@
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
+ # Individual party details for Payment Screening.
8
+ class PaymentScreeningIndividual < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # Unique internal identifier for the consumer.
13
+ # @return [String]
14
+ attr_accessor :id
15
+
16
+ # The consumer's given name.
17
+ # **Requirements:**
18
+ # - Must be UTF-8 encoded
19
+ # - Supports single-byte Latin characters only
20
+ # - Certain special characters are not supported
21
+ # @return [String]
22
+ attr_accessor :given_name
23
+
24
+ # The consumer's family name.
25
+ # **Requirements:**
26
+ # - Must be UTF-8 encoded
27
+ # - Supports single-byte Latin characters only
28
+ # - Certain special characters are not supported
29
+ # @return [String]
30
+ attr_accessor :family_name
31
+
32
+ # Suffix for the consumer's name, if applicable (e.g., Jr., Sr., III).
33
+ # @return [String]
34
+ attr_accessor :suffix
35
+
36
+ # The consumer's national identification number. For US consumers, this can
37
+ # be a nine-digit Social Security Number (SSN) or Individual Tax
38
+ # Identification Number (ITIN). Partial SSNs (last four digits) are also
39
+ # accepted. Hyphens are optional.
40
+ # @return [String]
41
+ attr_accessor :national_id
42
+
43
+ # Consumer date of birth in YYYY-MM-DD format.
44
+ # @return [Date]
45
+ attr_accessor :date_of_birth
46
+
47
+ # Consumer email address.
48
+ # @return [String]
49
+ attr_accessor :email
50
+
51
+ # Consumer alternate email address.
52
+ # @return [String]
53
+ attr_accessor :alternate_email
54
+
55
+ # The consumer's phone number. The API expects the standard E.164 format
56
+ # (e.g., +12025550147) but tolerates hyphens and spaces for user
57
+ # convenience.
58
+ # **Examples:**
59
+ # - United States: `+13475550100`
60
+ # - United Kingdom: `+447911123456`
61
+ # - Brazil: `+5511987654321`
62
+ # - India: `+919876543210`
63
+ # - Australia: `+61412345678`
64
+ # @return [String]
65
+ attr_accessor :phone_number
66
+
67
+ # The consumer's alternate phone number in E.164 format. The API expects the
68
+ # standard E.164 format but tolerates hyphens and spaces for user
69
+ # convenience.
70
+ # @return [String]
71
+ attr_accessor :alternate_phone_number
72
+
73
+ # The consumer's gender.
74
+ # @return [Gender]
75
+ attr_accessor :gender
76
+
77
+ # The consumer's gender.
78
+ # @return [Address]
79
+ attr_accessor :address
80
+
81
+ # Financial instrument details for Payment Screening.
82
+ # @return [PaymentScreeningInstrument]
83
+ attr_accessor :instrument
84
+
85
+ # Use this field to pass additional data required by specific Socure
86
+ # products. Additional fields are typically optional and should only be used
87
+ # if explicitly stated in the product documentation.
88
+ # @return [AdditionalContext]
89
+ attr_accessor :additional_context
90
+
91
+ # Device intelligence session token.
92
+ # @return [String]
93
+ attr_accessor :di_session_token
94
+
95
+ # A mapping from model property names to API property names.
96
+ def self.names
97
+ @_hash = {} if @_hash.nil?
98
+ @_hash['id'] = 'id'
99
+ @_hash['given_name'] = 'given_name'
100
+ @_hash['family_name'] = 'family_name'
101
+ @_hash['suffix'] = 'suffix'
102
+ @_hash['national_id'] = 'national_id'
103
+ @_hash['date_of_birth'] = 'date_of_birth'
104
+ @_hash['email'] = 'email'
105
+ @_hash['alternate_email'] = 'alternate_email'
106
+ @_hash['phone_number'] = 'phone_number'
107
+ @_hash['alternate_phone_number'] = 'alternate_phone_number'
108
+ @_hash['gender'] = 'gender'
109
+ @_hash['address'] = 'address'
110
+ @_hash['instrument'] = 'instrument'
111
+ @_hash['additional_context'] = 'additional_context'
112
+ @_hash['di_session_token'] = 'di_session_token'
113
+ @_hash
114
+ end
115
+
116
+ # An array for optional fields
117
+ def self.optionals
118
+ %w[
119
+ id
120
+ given_name
121
+ family_name
122
+ suffix
123
+ national_id
124
+ date_of_birth
125
+ email
126
+ alternate_email
127
+ phone_number
128
+ alternate_phone_number
129
+ gender
130
+ address
131
+ instrument
132
+ additional_context
133
+ di_session_token
134
+ ]
135
+ end
136
+
137
+ # An array for nullable fields
138
+ def self.nullables
139
+ []
140
+ end
141
+
142
+ def initialize(id: SKIP, given_name: SKIP, family_name: SKIP, suffix: SKIP,
143
+ national_id: SKIP, date_of_birth: SKIP, email: SKIP,
144
+ alternate_email: SKIP, phone_number: SKIP,
145
+ alternate_phone_number: SKIP, gender: SKIP, address: SKIP,
146
+ instrument: SKIP, additional_context: SKIP,
147
+ di_session_token: SKIP, additional_properties: nil)
148
+ # Add additional model properties to the instance
149
+ additional_properties = {} if additional_properties.nil?
150
+
151
+ @id = id unless id == SKIP
152
+ @given_name = given_name unless given_name == SKIP
153
+ @family_name = family_name unless family_name == SKIP
154
+ @suffix = suffix unless suffix == SKIP
155
+ @national_id = national_id unless national_id == SKIP
156
+ @date_of_birth = date_of_birth unless date_of_birth == SKIP
157
+ @email = email unless email == SKIP
158
+ @alternate_email = alternate_email unless alternate_email == SKIP
159
+ @phone_number = phone_number unless phone_number == SKIP
160
+ @alternate_phone_number = alternate_phone_number unless alternate_phone_number == SKIP
161
+ @gender = gender unless gender == SKIP
162
+ @address = address unless address == SKIP
163
+ @instrument = instrument unless instrument == SKIP
164
+ @additional_context = additional_context unless additional_context == SKIP
165
+ @di_session_token = di_session_token unless di_session_token == SKIP
166
+ @additional_properties = additional_properties
167
+ end
168
+
169
+ # Creates an instance of the object from a hash.
170
+ def self.from_hash(hash)
171
+ return nil unless hash
172
+
173
+ # Extract variables from the hash.
174
+ id = hash.key?('id') ? hash['id'] : SKIP
175
+ given_name = hash.key?('given_name') ? hash['given_name'] : SKIP
176
+ family_name = hash.key?('family_name') ? hash['family_name'] : SKIP
177
+ suffix = hash.key?('suffix') ? hash['suffix'] : SKIP
178
+ national_id = hash.key?('national_id') ? hash['national_id'] : SKIP
179
+ date_of_birth = hash.key?('date_of_birth') ? hash['date_of_birth'] : SKIP
180
+ email = hash.key?('email') ? hash['email'] : SKIP
181
+ alternate_email =
182
+ hash.key?('alternate_email') ? hash['alternate_email'] : SKIP
183
+ phone_number = hash.key?('phone_number') ? hash['phone_number'] : SKIP
184
+ alternate_phone_number =
185
+ hash.key?('alternate_phone_number') ? hash['alternate_phone_number'] : SKIP
186
+ gender = hash.key?('gender') ? hash['gender'] : SKIP
187
+ address = Address.from_hash(hash['address']) if hash['address']
188
+ instrument = PaymentScreeningInstrument.from_hash(hash['instrument']) if hash['instrument']
189
+ additional_context = AdditionalContext.from_hash(hash['additional_context']) if
190
+ hash['additional_context']
191
+ di_session_token =
192
+ hash.key?('di_session_token') ? hash['di_session_token'] : SKIP
193
+
194
+ # Create a new hash for additional properties, removing known properties.
195
+ new_hash = hash.reject { |k, _| names.value?(k) }
196
+
197
+ additional_properties = APIHelper.get_additional_properties(
198
+ new_hash, proc { |value| value }
199
+ )
200
+
201
+ # Create object from extracted values.
202
+ PaymentScreeningIndividual.new(id: id,
203
+ given_name: given_name,
204
+ family_name: family_name,
205
+ suffix: suffix,
206
+ national_id: national_id,
207
+ date_of_birth: date_of_birth,
208
+ email: email,
209
+ alternate_email: alternate_email,
210
+ phone_number: phone_number,
211
+ alternate_phone_number: alternate_phone_number,
212
+ gender: gender,
213
+ address: address,
214
+ instrument: instrument,
215
+ additional_context: additional_context,
216
+ di_session_token: di_session_token,
217
+ additional_properties: additional_properties)
218
+ end
219
+
220
+ # Validates an instance of the object from a given value.
221
+ # @param [PaymentScreeningIndividual | Hash] The value against the validation is performed.
222
+ def self.validate(value)
223
+ return true if value.instance_of? self
224
+
225
+ return false unless value.instance_of? Hash
226
+
227
+ true
228
+ end
229
+
230
+ # Provides a human-readable string representation of the object.
231
+ def to_s
232
+ class_name = self.class.name.split('::').last
233
+ "<#{class_name} id: #{@id}, given_name: #{@given_name}, family_name: #{@family_name},"\
234
+ " suffix: #{@suffix}, national_id: #{@national_id}, date_of_birth: #{@date_of_birth}, email:"\
235
+ " #{@email}, alternate_email: #{@alternate_email}, phone_number: #{@phone_number},"\
236
+ " alternate_phone_number: #{@alternate_phone_number}, gender: #{@gender}, address:"\
237
+ " #{@address}, instrument: #{@instrument}, additional_context: #{@additional_context},"\
238
+ " di_session_token: #{@di_session_token}, additional_properties: #{@additional_properties}>"
239
+ end
240
+
241
+ # Provides a debugging-friendly string with detailed object information.
242
+ def inspect
243
+ class_name = self.class.name.split('::').last
244
+ "<#{class_name} id: #{@id.inspect}, given_name: #{@given_name.inspect}, family_name:"\
245
+ " #{@family_name.inspect}, suffix: #{@suffix.inspect}, national_id: #{@national_id.inspect},"\
246
+ " date_of_birth: #{@date_of_birth.inspect}, email: #{@email.inspect}, alternate_email:"\
247
+ " #{@alternate_email.inspect}, phone_number: #{@phone_number.inspect},"\
248
+ " alternate_phone_number: #{@alternate_phone_number.inspect}, gender: #{@gender.inspect},"\
249
+ " address: #{@address.inspect}, instrument: #{@instrument.inspect}, additional_context:"\
250
+ " #{@additional_context.inspect}, di_session_token: #{@di_session_token.inspect},"\
251
+ " additional_properties: #{@additional_properties}>"
252
+ end
253
+ end
254
+ 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
+ # Financial instrument details for Payment Screening.
8
+ class PaymentScreeningInstrument < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # Financial instrument type.
13
+ # @return [Type1]
14
+ attr_accessor :type
15
+
16
+ # Bank account details. Required when `type` is `BANK_ACCOUNT`.
17
+ # @return [Account1]
18
+ attr_accessor :account
19
+
20
+ # Crypto address details. Required when `type` is `CRYPTO_ADDRESS`.
21
+ # @return [CryptoAddress]
22
+ attr_accessor :crypto_address
23
+
24
+ # A mapping from model property names to API property names.
25
+ def self.names
26
+ @_hash = {} if @_hash.nil?
27
+ @_hash['type'] = 'type'
28
+ @_hash['account'] = 'account'
29
+ @_hash['crypto_address'] = 'crypto_address'
30
+ @_hash
31
+ end
32
+
33
+ # An array for optional fields
34
+ def self.optionals
35
+ %w[
36
+ type
37
+ account
38
+ crypto_address
39
+ ]
40
+ end
41
+
42
+ # An array for nullable fields
43
+ def self.nullables
44
+ []
45
+ end
46
+
47
+ def initialize(type: SKIP, account: SKIP, crypto_address: SKIP,
48
+ additional_properties: nil)
49
+ # Add additional model properties to the instance
50
+ additional_properties = {} if additional_properties.nil?
51
+
52
+ @type = type unless type == SKIP
53
+ @account = account unless account == SKIP
54
+ @crypto_address = crypto_address unless crypto_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
+ type = hash.key?('type') ? hash['type'] : SKIP
64
+ account = Account1.from_hash(hash['account']) if hash['account']
65
+ crypto_address = CryptoAddress.from_hash(hash['crypto_address']) if hash['crypto_address']
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
+ PaymentScreeningInstrument.new(type: type,
76
+ account: account,
77
+ crypto_address: crypto_address,
78
+ additional_properties: additional_properties)
79
+ end
80
+
81
+ # Validates an instance of the object from a given value.
82
+ # @param [PaymentScreeningInstrument | 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} type: #{@type}, account: #{@account}, crypto_address: #{@crypto_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} type: #{@type.inspect}, account: #{@account.inspect}, crypto_address:"\
102
+ " #{@crypto_address.inspect}, additional_properties: #{@additional_properties}>"
103
+ end
104
+ end
105
+ end
@@ -0,0 +1,76 @@
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
+ # product.
8
+ class Product
9
+ PRODUCT = [
10
+ # TODO: Write general description for ENUM_ACCOUNT_INTELLIGENCE
11
+ ENUM_ACCOUNT_INTELLIGENCE = 'Account Intelligence'.freeze,
12
+
13
+ # TODO: Write general description for ENUM_ADDRESS_RISK
14
+ ENUM_ADDRESS_RISK = 'Address Risk'.freeze,
15
+
16
+ # TODO: Write general description for ENUM_DECEASED_CHECK
17
+ ENUM_DECEASED_CHECK = 'Deceased Check'.freeze,
18
+
19
+ # TODO: Write general description for ENUM_DEVICE_RISK
20
+ ENUM_DEVICE_RISK = 'Device Risk'.freeze,
21
+
22
+ # TODO: Write general description for ENUM_EMAIL_RISK
23
+ ENUM_EMAIL_RISK = 'Email Risk'.freeze,
24
+
25
+ # TODO: Write general description for ENUM_GLOBAL_WATCHLIST_SCREENING
26
+ ENUM_GLOBAL_WATCHLIST_SCREENING = 'Global Watchlist Screening'.freeze,
27
+
28
+ # TODO: Write general description for ENUM_PHONE_RISK
29
+ ENUM_PHONE_RISK = 'Phone Risk'.freeze,
30
+
31
+ # TODO: Write general description for ENUM_PREDICTIVE_DOCV
32
+ ENUM_PREDICTIVE_DOCV = 'Predictive DocV'.freeze,
33
+
34
+ # TODO: Write general description for ENUM_SIGMA_FIRSTPARTY_FRAUD
35
+ ENUM_SIGMA_FIRSTPARTY_FRAUD = 'Sigma First-Party Fraud'.freeze,
36
+
37
+ # TODO: Write general description for ENUM_SIGMA_IDENTITY_FRAUD
38
+ ENUM_SIGMA_IDENTITY_FRAUD = 'Sigma Identity Fraud'.freeze,
39
+
40
+ # TODO: Write general description for ENUM_SIGMA_SYNTHETIC
41
+ ENUM_SIGMA_SYNTHETIC = 'Sigma Synthetic'.freeze,
42
+
43
+ # TODO: Write general description for ENUM_SOCURE_VERIFY_KYC
44
+ ENUM_SOCURE_VERIFY_KYC = 'Socure Verify (KYC)'.freeze
45
+ ].freeze
46
+
47
+ def self.validate(value)
48
+ return false if value.nil?
49
+
50
+ PRODUCT.include?(value)
51
+ end
52
+
53
+ def self.from_value(value, default_value = ENUM_ACCOUNT_INTELLIGENCE)
54
+ return default_value if value.nil?
55
+
56
+ str = value.to_s.strip
57
+
58
+ case str.downcase
59
+ when 'enum_account_intelligence' then ENUM_ACCOUNT_INTELLIGENCE
60
+ when 'enum_address_risk' then ENUM_ADDRESS_RISK
61
+ when 'enum_deceased_check' then ENUM_DECEASED_CHECK
62
+ when 'enum_device_risk' then ENUM_DEVICE_RISK
63
+ when 'enum_email_risk' then ENUM_EMAIL_RISK
64
+ when 'enum_global_watchlist_screening' then ENUM_GLOBAL_WATCHLIST_SCREENING
65
+ when 'enum_phone_risk' then ENUM_PHONE_RISK
66
+ when 'enum_predictive_docv' then ENUM_PREDICTIVE_DOCV
67
+ when 'enum_sigma_firstparty_fraud' then ENUM_SIGMA_FIRSTPARTY_FRAUD
68
+ when 'enum_sigma_identity_fraud' then ENUM_SIGMA_IDENTITY_FRAUD
69
+ when 'enum_sigma_synthetic' then ENUM_SIGMA_SYNTHETIC
70
+ when 'enum_socure_verify_kyc' then ENUM_SOCURE_VERIFY_KYC
71
+ else
72
+ default_value
73
+ end
74
+ end
75
+ end
76
+ end