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,166 @@
1
+ # socure_risk_os_api
2
+ #
3
+ # This file was automatically generated by APIMATIC
4
+ # v3.0 ( https://www.apimatic.io ).
5
+
6
+ module SocureRiskOsApi
7
+ # The main payload for the Consumer Onboarding workflow.
8
+ class Data1 < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # Represents core information about the primary consumer.
13
+ # @return [Individual1]
14
+ attr_accessor :individual
15
+
16
+ # Include details of additional consumers if the evaluation involves
17
+ # multiple people. This field allows you to expand the evaluation scope
18
+ # beyond the primary consumer.
19
+ # @return [Array[AdditionalIndividual]]
20
+ attr_accessor :additional_individuals
21
+
22
+ # Specifies the mode of interaction on the consumer's end. <br /><br />
23
+ # Available values include: `web`, `mobile`, `pos`, and `other`.
24
+ # @return [Channel]
25
+ attr_accessor :channel
26
+
27
+ # Optional free-form field that allows to pass on the line of business the
28
+ # request originates from.
29
+ # @return [String]
30
+ attr_accessor :line_of_business
31
+
32
+ # The consumer's IP address in IPv4 decimal or IPv6 hexadecimal format.
33
+ # @return [String]
34
+ attr_accessor :ip_address
35
+
36
+ # Use this field to provide external device data, e.g. originating from a
37
+ # third party data intelligence provider.
38
+ # @return [Device]
39
+ attr_accessor :external_device
40
+
41
+ # Use this field to send any additional, customer-specific data relevant to
42
+ # the evaluation. See [Custom
43
+ # Fields](https://help.socure.com/riskos/docs/custom-fields) for more
44
+ # information.
45
+ # @return [Object]
46
+ attr_accessor :custom
47
+
48
+ # A mapping from model property names to API property names.
49
+ def self.names
50
+ @_hash = {} if @_hash.nil?
51
+ @_hash['individual'] = 'individual'
52
+ @_hash['additional_individuals'] = 'additional_individuals'
53
+ @_hash['channel'] = 'channel'
54
+ @_hash['line_of_business'] = 'line_of_business'
55
+ @_hash['ip_address'] = 'ip_address'
56
+ @_hash['external_device'] = 'external_device'
57
+ @_hash['custom'] = 'custom'
58
+ @_hash
59
+ end
60
+
61
+ # An array for optional fields
62
+ def self.optionals
63
+ %w[
64
+ individual
65
+ additional_individuals
66
+ channel
67
+ line_of_business
68
+ ip_address
69
+ external_device
70
+ custom
71
+ ]
72
+ end
73
+
74
+ # An array for nullable fields
75
+ def self.nullables
76
+ []
77
+ end
78
+
79
+ def initialize(individual: SKIP, additional_individuals: SKIP,
80
+ channel: SKIP, line_of_business: SKIP, ip_address: SKIP,
81
+ external_device: SKIP, custom: SKIP,
82
+ additional_properties: nil)
83
+ # Add additional model properties to the instance
84
+ additional_properties = {} if additional_properties.nil?
85
+
86
+ @individual = individual unless individual == SKIP
87
+ @additional_individuals = additional_individuals unless additional_individuals == SKIP
88
+ @channel = channel unless channel == SKIP
89
+ @line_of_business = line_of_business unless line_of_business == SKIP
90
+ @ip_address = ip_address unless ip_address == SKIP
91
+ @external_device = external_device unless external_device == SKIP
92
+ @custom = custom unless custom == SKIP
93
+ @additional_properties = additional_properties
94
+ end
95
+
96
+ # Creates an instance of the object from a hash.
97
+ def self.from_hash(hash)
98
+ return nil unless hash
99
+
100
+ # Extract variables from the hash.
101
+ individual = Individual1.from_hash(hash['individual']) if hash['individual']
102
+ # Parameter is an array, so we need to iterate through it
103
+ additional_individuals = nil
104
+ unless hash['additional_individuals'].nil?
105
+ additional_individuals = []
106
+ hash['additional_individuals'].each do |structure|
107
+ additional_individuals << (AdditionalIndividual.from_hash(structure) if structure)
108
+ end
109
+ end
110
+
111
+ additional_individuals = SKIP unless hash.key?('additional_individuals')
112
+ channel = hash.key?('channel') ? hash['channel'] : SKIP
113
+ line_of_business =
114
+ hash.key?('line_of_business') ? hash['line_of_business'] : SKIP
115
+ ip_address = hash.key?('ip_address') ? hash['ip_address'] : SKIP
116
+ external_device = Device.from_hash(hash['external_device']) if hash['external_device']
117
+ custom = hash.key?('custom') ? hash['custom'] : SKIP
118
+
119
+ # Create a new hash for additional properties, removing known properties.
120
+ new_hash = hash.reject { |k, _| names.value?(k) }
121
+
122
+ additional_properties = APIHelper.get_additional_properties(
123
+ new_hash, proc { |value| value }
124
+ )
125
+
126
+ # Create object from extracted values.
127
+ Data1.new(individual: individual,
128
+ additional_individuals: additional_individuals,
129
+ channel: channel,
130
+ line_of_business: line_of_business,
131
+ ip_address: ip_address,
132
+ external_device: external_device,
133
+ custom: custom,
134
+ additional_properties: additional_properties)
135
+ end
136
+
137
+ # Validates an instance of the object from a given value.
138
+ # @param [Data1 | Hash] The value against the validation is performed.
139
+ def self.validate(value)
140
+ return true if value.instance_of? self
141
+
142
+ return false unless value.instance_of? Hash
143
+
144
+ true
145
+ end
146
+
147
+ # Provides a human-readable string representation of the object.
148
+ def to_s
149
+ class_name = self.class.name.split('::').last
150
+ "<#{class_name} individual: #{@individual}, additional_individuals:"\
151
+ " #{@additional_individuals}, channel: #{@channel}, line_of_business: #{@line_of_business},"\
152
+ " ip_address: #{@ip_address}, external_device: #{@external_device}, custom: #{@custom},"\
153
+ " additional_properties: #{@additional_properties}>"
154
+ end
155
+
156
+ # Provides a debugging-friendly string with detailed object information.
157
+ def inspect
158
+ class_name = self.class.name.split('::').last
159
+ "<#{class_name} individual: #{@individual.inspect}, additional_individuals:"\
160
+ " #{@additional_individuals.inspect}, channel: #{@channel.inspect}, line_of_business:"\
161
+ " #{@line_of_business.inspect}, ip_address: #{@ip_address.inspect}, external_device:"\
162
+ " #{@external_device.inspect}, custom: #{@custom.inspect}, additional_properties:"\
163
+ " #{@additional_properties}>"
164
+ end
165
+ end
166
+ end
@@ -0,0 +1,166 @@
1
+ # socure_risk_os_api
2
+ #
3
+ # This file was automatically generated by APIMATIC
4
+ # v3.0 ( https://www.apimatic.io ).
5
+
6
+ module SocureRiskOsApi
7
+ # The main payload for the Consumer Onboarding workflow.
8
+ class Data10 < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # Represents core information about the primary consumer.
13
+ # @return [Individual5]
14
+ attr_accessor :individual
15
+
16
+ # Include details of additional consumers if the evaluation involves
17
+ # multiple people. This field allows you to expand the evaluation scope
18
+ # beyond the primary consumer.
19
+ # @return [Array[Individual]]
20
+ attr_accessor :additional_individuals
21
+
22
+ # Specifies the mode of interaction on the consumer's end. <br /><br />
23
+ # Available values include: `web`, `mobile`, `pos`, and `other`.
24
+ # @return [Channel]
25
+ attr_accessor :channel
26
+
27
+ # Optional free-form field that allows to pass on the line of business the
28
+ # request originates from.
29
+ # @return [String]
30
+ attr_accessor :line_of_business
31
+
32
+ # The consumer's IP address in IPv4 decimal or IPv6 hexadecimal format.
33
+ # @return [String]
34
+ attr_accessor :ip_address
35
+
36
+ # Use this field to provide external device data, e.g. originating from a
37
+ # third party data intelligence provider.
38
+ # @return [Device]
39
+ attr_accessor :external_device
40
+
41
+ # Use this field to send any additional, customer-specific data relevant to
42
+ # the evaluation. See [Custom
43
+ # Fields](https://help.socure.com/riskos/docs/custom-fields) for more
44
+ # information.
45
+ # @return [Object]
46
+ attr_accessor :custom
47
+
48
+ # A mapping from model property names to API property names.
49
+ def self.names
50
+ @_hash = {} if @_hash.nil?
51
+ @_hash['individual'] = 'individual'
52
+ @_hash['additional_individuals'] = 'additional_individuals'
53
+ @_hash['channel'] = 'channel'
54
+ @_hash['line_of_business'] = 'line_of_business'
55
+ @_hash['ip_address'] = 'ip_address'
56
+ @_hash['external_device'] = 'external_device'
57
+ @_hash['custom'] = 'custom'
58
+ @_hash
59
+ end
60
+
61
+ # An array for optional fields
62
+ def self.optionals
63
+ %w[
64
+ individual
65
+ additional_individuals
66
+ channel
67
+ line_of_business
68
+ ip_address
69
+ external_device
70
+ custom
71
+ ]
72
+ end
73
+
74
+ # An array for nullable fields
75
+ def self.nullables
76
+ []
77
+ end
78
+
79
+ def initialize(individual: SKIP, additional_individuals: SKIP,
80
+ channel: SKIP, line_of_business: SKIP, ip_address: SKIP,
81
+ external_device: SKIP, custom: SKIP,
82
+ additional_properties: nil)
83
+ # Add additional model properties to the instance
84
+ additional_properties = {} if additional_properties.nil?
85
+
86
+ @individual = individual unless individual == SKIP
87
+ @additional_individuals = additional_individuals unless additional_individuals == SKIP
88
+ @channel = channel unless channel == SKIP
89
+ @line_of_business = line_of_business unless line_of_business == SKIP
90
+ @ip_address = ip_address unless ip_address == SKIP
91
+ @external_device = external_device unless external_device == SKIP
92
+ @custom = custom unless custom == SKIP
93
+ @additional_properties = additional_properties
94
+ end
95
+
96
+ # Creates an instance of the object from a hash.
97
+ def self.from_hash(hash)
98
+ return nil unless hash
99
+
100
+ # Extract variables from the hash.
101
+ individual = Individual5.from_hash(hash['individual']) if hash['individual']
102
+ # Parameter is an array, so we need to iterate through it
103
+ additional_individuals = nil
104
+ unless hash['additional_individuals'].nil?
105
+ additional_individuals = []
106
+ hash['additional_individuals'].each do |structure|
107
+ additional_individuals << (Individual.from_hash(structure) if structure)
108
+ end
109
+ end
110
+
111
+ additional_individuals = SKIP unless hash.key?('additional_individuals')
112
+ channel = hash.key?('channel') ? hash['channel'] : SKIP
113
+ line_of_business =
114
+ hash.key?('line_of_business') ? hash['line_of_business'] : SKIP
115
+ ip_address = hash.key?('ip_address') ? hash['ip_address'] : SKIP
116
+ external_device = Device.from_hash(hash['external_device']) if hash['external_device']
117
+ custom = hash.key?('custom') ? hash['custom'] : SKIP
118
+
119
+ # Create a new hash for additional properties, removing known properties.
120
+ new_hash = hash.reject { |k, _| names.value?(k) }
121
+
122
+ additional_properties = APIHelper.get_additional_properties(
123
+ new_hash, proc { |value| value }
124
+ )
125
+
126
+ # Create object from extracted values.
127
+ Data10.new(individual: individual,
128
+ additional_individuals: additional_individuals,
129
+ channel: channel,
130
+ line_of_business: line_of_business,
131
+ ip_address: ip_address,
132
+ external_device: external_device,
133
+ custom: custom,
134
+ additional_properties: additional_properties)
135
+ end
136
+
137
+ # Validates an instance of the object from a given value.
138
+ # @param [Data10 | Hash] The value against the validation is performed.
139
+ def self.validate(value)
140
+ return true if value.instance_of? self
141
+
142
+ return false unless value.instance_of? Hash
143
+
144
+ true
145
+ end
146
+
147
+ # Provides a human-readable string representation of the object.
148
+ def to_s
149
+ class_name = self.class.name.split('::').last
150
+ "<#{class_name} individual: #{@individual}, additional_individuals:"\
151
+ " #{@additional_individuals}, channel: #{@channel}, line_of_business: #{@line_of_business},"\
152
+ " ip_address: #{@ip_address}, external_device: #{@external_device}, custom: #{@custom},"\
153
+ " additional_properties: #{@additional_properties}>"
154
+ end
155
+
156
+ # Provides a debugging-friendly string with detailed object information.
157
+ def inspect
158
+ class_name = self.class.name.split('::').last
159
+ "<#{class_name} individual: #{@individual.inspect}, additional_individuals:"\
160
+ " #{@additional_individuals.inspect}, channel: #{@channel.inspect}, line_of_business:"\
161
+ " #{@line_of_business.inspect}, ip_address: #{@ip_address.inspect}, external_device:"\
162
+ " #{@external_device.inspect}, custom: #{@custom.inspect}, additional_properties:"\
163
+ " #{@additional_properties}>"
164
+ end
165
+ end
166
+ end
@@ -0,0 +1,145 @@
1
+ # socure_risk_os_api
2
+ #
3
+ # This file was automatically generated by APIMATIC
4
+ # v3.0 ( https://www.apimatic.io ).
5
+
6
+ module SocureRiskOsApi
7
+ # The main payload for the Advanced Prefill workflow.
8
+ class Data2 < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # Minimal identity and device inputs used to verify the requester and gate
13
+ # identity-data disclosure. Only `phone_number` and `di_session_token` are
14
+ # required; additional attributes improve Prefill match accuracy.
15
+ # @return [Individual3]
16
+ attr_accessor :individual
17
+
18
+ # Specifies the mode of interaction on the consumer's end. <br /><br />
19
+ # Available values include: `web`, `mobile`, `pos`, and `other`.
20
+ # @return [Channel]
21
+ attr_accessor :channel
22
+
23
+ # Optional free-form field that allows to pass on the line of business the
24
+ # request originates from.
25
+ # @return [String]
26
+ attr_accessor :line_of_business
27
+
28
+ # The consumer's IP address in IPv4 decimal or IPv6 hexadecimal format.
29
+ # @return [String]
30
+ attr_accessor :ip_address
31
+
32
+ # Use this field to provide external device data, e.g. originating from a
33
+ # third party data intelligence provider.
34
+ # @return [Device]
35
+ attr_accessor :external_device
36
+
37
+ # Use this field to send any additional, customer-specific data relevant to
38
+ # the evaluation. See [Custom
39
+ # Fields](https://help.socure.com/riskos/docs/custom-fields) for more
40
+ # information.
41
+ # @return [Object]
42
+ attr_accessor :custom
43
+
44
+ # A mapping from model property names to API property names.
45
+ def self.names
46
+ @_hash = {} if @_hash.nil?
47
+ @_hash['individual'] = 'individual'
48
+ @_hash['channel'] = 'channel'
49
+ @_hash['line_of_business'] = 'line_of_business'
50
+ @_hash['ip_address'] = 'ip_address'
51
+ @_hash['external_device'] = 'external_device'
52
+ @_hash['custom'] = 'custom'
53
+ @_hash
54
+ end
55
+
56
+ # An array for optional fields
57
+ def self.optionals
58
+ %w[
59
+ individual
60
+ channel
61
+ line_of_business
62
+ ip_address
63
+ external_device
64
+ custom
65
+ ]
66
+ end
67
+
68
+ # An array for nullable fields
69
+ def self.nullables
70
+ []
71
+ end
72
+
73
+ def initialize(individual: SKIP, channel: SKIP, line_of_business: SKIP,
74
+ ip_address: SKIP, external_device: SKIP, custom: SKIP,
75
+ additional_properties: nil)
76
+ # Add additional model properties to the instance
77
+ additional_properties = {} if additional_properties.nil?
78
+
79
+ @individual = individual unless individual == SKIP
80
+ @channel = channel unless channel == SKIP
81
+ @line_of_business = line_of_business unless line_of_business == SKIP
82
+ @ip_address = ip_address unless ip_address == SKIP
83
+ @external_device = external_device unless external_device == SKIP
84
+ @custom = custom unless custom == SKIP
85
+ @additional_properties = additional_properties
86
+ end
87
+
88
+ # Creates an instance of the object from a hash.
89
+ def self.from_hash(hash)
90
+ return nil unless hash
91
+
92
+ # Extract variables from the hash.
93
+ individual = Individual3.from_hash(hash['individual']) if hash['individual']
94
+ channel = hash.key?('channel') ? hash['channel'] : SKIP
95
+ line_of_business =
96
+ hash.key?('line_of_business') ? hash['line_of_business'] : SKIP
97
+ ip_address = hash.key?('ip_address') ? hash['ip_address'] : SKIP
98
+ external_device = Device.from_hash(hash['external_device']) if hash['external_device']
99
+ custom = hash.key?('custom') ? hash['custom'] : SKIP
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
+ Data2.new(individual: individual,
110
+ channel: channel,
111
+ line_of_business: line_of_business,
112
+ ip_address: ip_address,
113
+ external_device: external_device,
114
+ custom: custom,
115
+ additional_properties: additional_properties)
116
+ end
117
+
118
+ # Validates an instance of the object from a given value.
119
+ # @param [Data2 | Hash] The value against the validation is performed.
120
+ def self.validate(value)
121
+ return true if value.instance_of? self
122
+
123
+ return false unless value.instance_of? Hash
124
+
125
+ true
126
+ end
127
+
128
+ # Provides a human-readable string representation of the object.
129
+ def to_s
130
+ class_name = self.class.name.split('::').last
131
+ "<#{class_name} individual: #{@individual}, channel: #{@channel}, line_of_business:"\
132
+ " #{@line_of_business}, ip_address: #{@ip_address}, external_device: #{@external_device},"\
133
+ " custom: #{@custom}, additional_properties: #{@additional_properties}>"
134
+ end
135
+
136
+ # Provides a debugging-friendly string with detailed object information.
137
+ def inspect
138
+ class_name = self.class.name.split('::').last
139
+ "<#{class_name} individual: #{@individual.inspect}, channel: #{@channel.inspect},"\
140
+ " line_of_business: #{@line_of_business.inspect}, ip_address: #{@ip_address.inspect},"\
141
+ " external_device: #{@external_device.inspect}, custom: #{@custom.inspect},"\
142
+ " additional_properties: #{@additional_properties}>"
143
+ end
144
+ end
145
+ end
@@ -0,0 +1,160 @@
1
+ # socure_risk_os_api
2
+ #
3
+ # This file was automatically generated by APIMATIC
4
+ # v3.0 ( https://www.apimatic.io ).
5
+
6
+ module SocureRiskOsApi
7
+ # The main payload for the Pass-Through workflow.
8
+ class Data3 < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # Represents core information about the primary individual consumer.
13
+ # @return [Individual]
14
+ attr_accessor :individual
15
+
16
+ # A list of Socure module names to include in the pass-through evaluation.
17
+ # Each entry is a module identifier string following the same naming
18
+ # convention as the ID+ endpoint modules — for example `["fraud",
19
+ # "synthetic"]`. The module names you can request depend on the enrichments
20
+ # enabled for your workflow and your Socure contract:
21
+ # - `accountintelligence`
22
+ # - `accountintelligencepremier`
23
+ # - `addressrisk`
24
+ # - `deceasedcheck`
25
+ # - `devicerisk`
26
+ # - `digitalintelligence`
27
+ # - `documentverification`
28
+ # - `ecbsv`
29
+ # - `emailrisk`
30
+ # - `firstpartyfraud`
31
+ # - `fraud`
32
+ # - `graphintelligenceplus`
33
+ # - `graphintelligencestandard`
34
+ # - `kyc`
35
+ # - `kycplus`
36
+ # - `phonerisk`
37
+ # - `prefill`
38
+ # - `secondarydocument`
39
+ # - `selfieintelligence`
40
+ # - `selfiereverification`
41
+ # - `synthetic`
42
+ # - `watchlistplus`
43
+ # - `watchlistpremier`
44
+ # - `watchliststandard`
45
+ # **Note:** Listing a module in `data.modules` does not by itself guarantee
46
+ # a pass-through. The requested module data is returned only when your
47
+ # workflow is configured with a pass-through enrichment.
48
+ # @return [Array[String]]
49
+ attr_accessor :modules
50
+
51
+ # Specifies the mode of interaction on the consumer's end. <br /><br />
52
+ # Available values include: `web`, `mobile`, `pos`, and `other`.
53
+ # @return [Channel]
54
+ attr_accessor :channel
55
+
56
+ # Optional free-form field that allows to pass on the line of business the
57
+ # request originates from.
58
+ # @return [String]
59
+ attr_accessor :line_of_business
60
+
61
+ # The consumer's IP address in IPv4 decimal or IPv6 hexadecimal format.
62
+ # @return [String]
63
+ attr_accessor :ip_address
64
+
65
+ # A mapping from model property names to API property names.
66
+ def self.names
67
+ @_hash = {} if @_hash.nil?
68
+ @_hash['individual'] = 'individual'
69
+ @_hash['modules'] = 'modules'
70
+ @_hash['channel'] = 'channel'
71
+ @_hash['line_of_business'] = 'line_of_business'
72
+ @_hash['ip_address'] = 'ip_address'
73
+ @_hash
74
+ end
75
+
76
+ # An array for optional fields
77
+ def self.optionals
78
+ %w[
79
+ individual
80
+ modules
81
+ channel
82
+ line_of_business
83
+ ip_address
84
+ ]
85
+ end
86
+
87
+ # An array for nullable fields
88
+ def self.nullables
89
+ []
90
+ end
91
+
92
+ def initialize(individual: SKIP, modules: SKIP, channel: SKIP,
93
+ line_of_business: SKIP, ip_address: SKIP,
94
+ additional_properties: nil)
95
+ # Add additional model properties to the instance
96
+ additional_properties = {} if additional_properties.nil?
97
+
98
+ @individual = individual unless individual == SKIP
99
+ @modules = modules unless modules == SKIP
100
+ @channel = channel unless channel == SKIP
101
+ @line_of_business = line_of_business unless line_of_business == SKIP
102
+ @ip_address = ip_address unless ip_address == SKIP
103
+ @additional_properties = additional_properties
104
+ end
105
+
106
+ # Creates an instance of the object from a hash.
107
+ def self.from_hash(hash)
108
+ return nil unless hash
109
+
110
+ # Extract variables from the hash.
111
+ individual = Individual.from_hash(hash['individual']) if hash['individual']
112
+ modules = hash.key?('modules') ? hash['modules'] : SKIP
113
+ channel = hash.key?('channel') ? hash['channel'] : SKIP
114
+ line_of_business =
115
+ hash.key?('line_of_business') ? hash['line_of_business'] : SKIP
116
+ ip_address = hash.key?('ip_address') ? hash['ip_address'] : SKIP
117
+
118
+ # Create a new hash for additional properties, removing known properties.
119
+ new_hash = hash.reject { |k, _| names.value?(k) }
120
+
121
+ additional_properties = APIHelper.get_additional_properties(
122
+ new_hash, proc { |value| value }
123
+ )
124
+
125
+ # Create object from extracted values.
126
+ Data3.new(individual: individual,
127
+ modules: modules,
128
+ channel: channel,
129
+ line_of_business: line_of_business,
130
+ ip_address: ip_address,
131
+ additional_properties: additional_properties)
132
+ end
133
+
134
+ # Validates an instance of the object from a given value.
135
+ # @param [Data3 | Hash] The value against the validation is performed.
136
+ def self.validate(value)
137
+ return true if value.instance_of? self
138
+
139
+ return false unless value.instance_of? Hash
140
+
141
+ true
142
+ end
143
+
144
+ # Provides a human-readable string representation of the object.
145
+ def to_s
146
+ class_name = self.class.name.split('::').last
147
+ "<#{class_name} individual: #{@individual}, modules: #{@modules}, channel: #{@channel},"\
148
+ " line_of_business: #{@line_of_business}, ip_address: #{@ip_address}, additional_properties:"\
149
+ " #{@additional_properties}>"
150
+ end
151
+
152
+ # Provides a debugging-friendly string with detailed object information.
153
+ def inspect
154
+ class_name = self.class.name.split('::').last
155
+ "<#{class_name} individual: #{@individual.inspect}, modules: #{@modules.inspect}, channel:"\
156
+ " #{@channel.inspect}, line_of_business: #{@line_of_business.inspect}, ip_address:"\
157
+ " #{@ip_address.inspect}, additional_properties: #{@additional_properties}>"
158
+ end
159
+ end
160
+ end