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,168 @@
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
+ # AdvancedPrefill Model.
9
+ class AdvancedPrefill < 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. Use
15
+ # the identifier for your Advanced Prefill workflow (for example,
16
+ # `advanced_pre_fill`). <br /><br /> **Note:** The workflow name must be
17
+ # unique within your RiskOS™ environment. It is not scoped by use case and
18
+ # must identify a single active workflow for each Evaluation API request.
19
+ # @return [String]
20
+ attr_accessor :workflow
21
+
22
+ # Required, customer-defined unique identifier for the request. <br /><br />
23
+ # This value must be unique for each evaluation. Reusing an ID causes
24
+ # RiskOS™ to treat the request as a re-run and can impact processing
25
+ # behavior, results, and downstream workflows.
26
+ # @return [String]
27
+ attr_accessor :id
28
+
29
+ # The timestamp indicating when the evaluation was initiated, in ISO 8601 /
30
+ # RFC 3339 format.
31
+ # @return [DateTime]
32
+ attr_accessor :timestamp
33
+
34
+ # Optional, opaque JSON object echoed back unchanged on the response and at
35
+ # the top level of webhook callbacks — use it to route and correlate
36
+ # requests. Must be a JSON object of up to 200 characters total (the entire
37
+ # serialized JSON); larger payloads return `413
38
+ # CUSTOMER_METADATA_TOO_LARGE`. Omit it or send `null` to skip. Don't
39
+ # include PII or secrets. See [Customer
40
+ # Metadata](https://help.socure.com/riskos/docs/customer-metadata).
41
+ # @return [Object]
42
+ attr_accessor :customer_metadata
43
+
44
+ # The main payload for the Advanced Prefill workflow.
45
+ # @return [Data2]
46
+ attr_accessor :data
47
+
48
+ # A mapping from model property names to API property names.
49
+ def self.names
50
+ @_hash = {} if @_hash.nil?
51
+ @_hash['workflow'] = 'workflow'
52
+ @_hash['id'] = 'id'
53
+ @_hash['timestamp'] = 'timestamp'
54
+ @_hash['customer_metadata'] = 'customer_metadata'
55
+ @_hash['data'] = 'data'
56
+ @_hash
57
+ end
58
+
59
+ # An array for optional fields
60
+ def self.optionals
61
+ %w[
62
+ customer_metadata
63
+ ]
64
+ end
65
+
66
+ # An array for nullable fields
67
+ def self.nullables
68
+ %w[
69
+ customer_metadata
70
+ ]
71
+ end
72
+
73
+ def initialize(workflow:, id:, timestamp:, data:, customer_metadata: SKIP,
74
+ additional_properties: nil)
75
+ # Add additional model properties to the instance
76
+ additional_properties = {} if additional_properties.nil?
77
+
78
+ @workflow = workflow
79
+ @id = id
80
+ @timestamp = timestamp
81
+ @customer_metadata = customer_metadata unless customer_metadata == SKIP
82
+ @data = data
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
+ id = hash.key?('id') ? hash['id'] : nil
93
+ timestamp = if hash.key?('timestamp')
94
+ (DateTimeHelper.from_rfc3339(hash['timestamp']) if hash['timestamp'])
95
+ end
96
+ data = Data2.from_hash(hash['data']) if hash['data']
97
+ customer_metadata =
98
+ hash.key?('customer_metadata') ? hash['customer_metadata'] : SKIP
99
+
100
+ # Create a new hash for additional properties, removing known properties.
101
+ new_hash = hash.reject { |k, _| names.value?(k) }
102
+
103
+ additional_properties = APIHelper.get_additional_properties(
104
+ new_hash, proc { |value| value }
105
+ )
106
+
107
+ # Create object from extracted values.
108
+ AdvancedPrefill.new(workflow: workflow,
109
+ id: id,
110
+ timestamp: timestamp,
111
+ data: data,
112
+ customer_metadata: customer_metadata,
113
+ additional_properties: additional_properties)
114
+ end
115
+
116
+ def to_custom_timestamp
117
+ DateTimeHelper.to_rfc3339(timestamp)
118
+ end
119
+
120
+ # Validates an instance of the object from a given value.
121
+ # @param [AdvancedPrefill | Hash] The value against the validation is performed.
122
+ def self.validate(value)
123
+ if value.instance_of? self
124
+ return (
125
+ APIHelper.valid_type?(value.workflow,
126
+ ->(val) { val.instance_of? String }) and
127
+ APIHelper.valid_type?(value.id,
128
+ ->(val) { val.instance_of? String }) and
129
+ APIHelper.valid_type?(value.timestamp,
130
+ ->(val) { val.instance_of? DateTime }) and
131
+ APIHelper.valid_type?(value.data,
132
+ ->(val) { Data2.validate(val) },
133
+ is_model_hash: true)
134
+ )
135
+ end
136
+
137
+ return false unless value.instance_of? Hash
138
+
139
+ (
140
+ APIHelper.valid_type?(value['workflow'],
141
+ ->(val) { val.instance_of? String }) and
142
+ APIHelper.valid_type?(value['id'],
143
+ ->(val) { val.instance_of? String }) and
144
+ APIHelper.valid_type?(value['timestamp'],
145
+ ->(val) { val.instance_of? String }) and
146
+ APIHelper.valid_type?(value['data'],
147
+ ->(val) { Data2.validate(val) },
148
+ is_model_hash: true)
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}, id: #{@id}, timestamp: #{@timestamp},"\
156
+ " customer_metadata: #{@customer_metadata}, data: #{@data}, additional_properties:"\
157
+ " #{@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}, id: #{@id.inspect}, timestamp:"\
164
+ " #{@timestamp.inspect}, customer_metadata: #{@customer_metadata.inspect}, data:"\
165
+ " #{@data.inspect}, additional_properties: #{@additional_properties}>"
166
+ end
167
+ end
168
+ end
@@ -0,0 +1,163 @@
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
+ # AgeAssurance Model.
9
+ class AgeAssurance < BaseModel
10
+ SKIP = Object.new
11
+ private_constant :SKIP
12
+
13
+ # Your environment-specific Age Assurance workflow identifier. You can find
14
+ # this value in the RiskOS™ Dashboard > Developer Workbench > Integration
15
+ # Checklist.
16
+ # @return [String]
17
+ attr_accessor :workflow
18
+
19
+ # Required, customer-defined unique identifier for the request. Reusing an
20
+ # ID causes RiskOS™ to treat the request as a re-run.
21
+ # @return [String]
22
+ attr_accessor :id
23
+
24
+ # The timestamp indicating when the evaluation was initiated, in ISO 8601 /
25
+ # RFC 3339 format.
26
+ # @return [DateTime]
27
+ attr_accessor :timestamp
28
+
29
+ # Optional, opaque JSON object echoed back unchanged on the response and at
30
+ # the top level of webhook callbacks — use it to route and correlate
31
+ # requests. Must be a JSON object of up to 200 characters total (the entire
32
+ # serialized JSON); larger payloads return `413
33
+ # CUSTOMER_METADATA_TOO_LARGE`. Omit it or send `null` to skip. Don't
34
+ # include PII or secrets. See [Customer
35
+ # Metadata](https://help.socure.com/riskos/docs/customer-metadata).
36
+ # @return [Object]
37
+ attr_accessor :customer_metadata
38
+
39
+ # The main payload for the Age Assurance workflow.
40
+ # @return [Data]
41
+ attr_accessor :data
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['id'] = 'id'
48
+ @_hash['timestamp'] = 'timestamp'
49
+ @_hash['customer_metadata'] = 'customer_metadata'
50
+ @_hash['data'] = 'data'
51
+ @_hash
52
+ end
53
+
54
+ # An array for optional fields
55
+ def self.optionals
56
+ %w[
57
+ customer_metadata
58
+ ]
59
+ end
60
+
61
+ # An array for nullable fields
62
+ def self.nullables
63
+ %w[
64
+ customer_metadata
65
+ ]
66
+ end
67
+
68
+ def initialize(workflow:, id:, timestamp:, data:, customer_metadata: SKIP,
69
+ additional_properties: nil)
70
+ # Add additional model properties to the instance
71
+ additional_properties = {} if additional_properties.nil?
72
+
73
+ @workflow = workflow
74
+ @id = id
75
+ @timestamp = timestamp
76
+ @customer_metadata = customer_metadata unless customer_metadata == SKIP
77
+ @data = data
78
+ @additional_properties = additional_properties
79
+ end
80
+
81
+ # Creates an instance of the object from a hash.
82
+ def self.from_hash(hash)
83
+ return nil unless hash
84
+
85
+ # Extract variables from the hash.
86
+ workflow = hash.key?('workflow') ? hash['workflow'] : nil
87
+ id = hash.key?('id') ? hash['id'] : nil
88
+ timestamp = if hash.key?('timestamp')
89
+ (DateTimeHelper.from_rfc3339(hash['timestamp']) if hash['timestamp'])
90
+ end
91
+ data = Data.from_hash(hash['data']) if hash['data']
92
+ customer_metadata =
93
+ hash.key?('customer_metadata') ? hash['customer_metadata'] : SKIP
94
+
95
+ # Create a new hash for additional properties, removing known properties.
96
+ new_hash = hash.reject { |k, _| names.value?(k) }
97
+
98
+ additional_properties = APIHelper.get_additional_properties(
99
+ new_hash, proc { |value| value }
100
+ )
101
+
102
+ # Create object from extracted values.
103
+ AgeAssurance.new(workflow: workflow,
104
+ id: id,
105
+ timestamp: timestamp,
106
+ data: data,
107
+ customer_metadata: customer_metadata,
108
+ additional_properties: additional_properties)
109
+ end
110
+
111
+ def to_custom_timestamp
112
+ DateTimeHelper.to_rfc3339(timestamp)
113
+ end
114
+
115
+ # Validates an instance of the object from a given value.
116
+ # @param [AgeAssurance | Hash] The value against the validation is performed.
117
+ def self.validate(value)
118
+ if value.instance_of? self
119
+ return (
120
+ APIHelper.valid_type?(value.workflow,
121
+ ->(val) { val.instance_of? String }) and
122
+ APIHelper.valid_type?(value.id,
123
+ ->(val) { val.instance_of? String }) and
124
+ APIHelper.valid_type?(value.timestamp,
125
+ ->(val) { val.instance_of? DateTime }) and
126
+ APIHelper.valid_type?(value.data,
127
+ ->(val) { Data.validate(val) },
128
+ is_model_hash: true)
129
+ )
130
+ end
131
+
132
+ return false unless value.instance_of? Hash
133
+
134
+ (
135
+ APIHelper.valid_type?(value['workflow'],
136
+ ->(val) { val.instance_of? String }) and
137
+ APIHelper.valid_type?(value['id'],
138
+ ->(val) { val.instance_of? String }) and
139
+ APIHelper.valid_type?(value['timestamp'],
140
+ ->(val) { val.instance_of? String }) and
141
+ APIHelper.valid_type?(value['data'],
142
+ ->(val) { Data.validate(val) },
143
+ is_model_hash: true)
144
+ )
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} workflow: #{@workflow}, id: #{@id}, timestamp: #{@timestamp},"\
151
+ " customer_metadata: #{@customer_metadata}, data: #{@data}, additional_properties:"\
152
+ " #{@additional_properties}>"
153
+ end
154
+
155
+ # Provides a debugging-friendly string with detailed object information.
156
+ def inspect
157
+ class_name = self.class.name.split('::').last
158
+ "<#{class_name} workflow: #{@workflow.inspect}, id: #{@id.inspect}, timestamp:"\
159
+ " #{@timestamp.inspect}, customer_metadata: #{@customer_metadata.inspect}, data:"\
160
+ " #{@data.inspect}, additional_properties: #{@additional_properties}>"
161
+ end
162
+ end
163
+ end
@@ -0,0 +1,95 @@
1
+ # socure_risk_os_api
2
+ #
3
+ # This file was automatically generated by APIMATIC
4
+ # v3.0 ( https://www.apimatic.io ).
5
+
6
+ module SocureRiskOsApi
7
+ # Represents a monetary amount with its associated currency.
8
+ class Amount < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # The monetary value, represented as a numeric value.
13
+ # @return [Float]
14
+ attr_accessor :amount
15
+
16
+ # The currency code in ISO 4217 format (e.g., USD for US dollars).
17
+ # @return [String]
18
+ attr_accessor :currency
19
+
20
+ # A mapping from model property names to API property names.
21
+ def self.names
22
+ @_hash = {} if @_hash.nil?
23
+ @_hash['amount'] = 'amount'
24
+ @_hash['currency'] = 'currency'
25
+ @_hash
26
+ end
27
+
28
+ # An array for optional fields
29
+ def self.optionals
30
+ %w[
31
+ amount
32
+ currency
33
+ ]
34
+ end
35
+
36
+ # An array for nullable fields
37
+ def self.nullables
38
+ []
39
+ end
40
+
41
+ def initialize(amount: SKIP, currency: SKIP, additional_properties: nil)
42
+ # Add additional model properties to the instance
43
+ additional_properties = {} if additional_properties.nil?
44
+
45
+ @amount = amount unless amount == SKIP
46
+ @currency = currency unless currency == SKIP
47
+ @additional_properties = additional_properties
48
+ end
49
+
50
+ # Creates an instance of the object from a hash.
51
+ def self.from_hash(hash)
52
+ return nil unless hash
53
+
54
+ # Extract variables from the hash.
55
+ amount = hash.key?('amount') ? hash['amount'] : SKIP
56
+ currency = hash.key?('currency') ? hash['currency'] : SKIP
57
+
58
+ # Create a new hash for additional properties, removing known properties.
59
+ new_hash = hash.reject { |k, _| names.value?(k) }
60
+
61
+ additional_properties = APIHelper.get_additional_properties(
62
+ new_hash, proc { |value| value }
63
+ )
64
+
65
+ # Create object from extracted values.
66
+ Amount.new(amount: amount,
67
+ currency: currency,
68
+ additional_properties: additional_properties)
69
+ end
70
+
71
+ # Validates an instance of the object from a given value.
72
+ # @param [Amount | Hash] The value against the validation is performed.
73
+ def self.validate(value)
74
+ return true if value.instance_of? self
75
+
76
+ return false unless value.instance_of? Hash
77
+
78
+ true
79
+ end
80
+
81
+ # Provides a human-readable string representation of the object.
82
+ def to_s
83
+ class_name = self.class.name.split('::').last
84
+ "<#{class_name} amount: #{@amount}, currency: #{@currency}, additional_properties:"\
85
+ " #{@additional_properties}>"
86
+ end
87
+
88
+ # Provides a debugging-friendly string with detailed object information.
89
+ def inspect
90
+ class_name = self.class.name.split('::').last
91
+ "<#{class_name} amount: #{@amount.inspect}, currency: #{@currency.inspect},"\
92
+ " additional_properties: #{@additional_properties}>"
93
+ end
94
+ end
95
+ end
@@ -0,0 +1,96 @@
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
+ # ApiEvaluationMonitoringRequest Model.
8
+ class ApiEvaluationMonitoringRequest < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # Unique identifier assigned to a Watchlist enrichment after a RiskOS™
13
+ # workflow is finalized. You can retrieve this value from the response of a
14
+ # successful call to the Evaluation endpoint.
15
+ # @return [UUID | String]
16
+ attr_accessor :reference_id
17
+
18
+ # Specifies the type of monitoring list to which the entity (identified by
19
+ # its enrichment `referenceId`) will be subscribed.
20
+ # Passing `watchlist` enables monitoring for changes across all watchlist
21
+ # types defined in your Monitoring policy.
22
+ # @return [String]
23
+ attr_reader :list_type
24
+
25
+ # Specifies the action to be taken for monitoring enrollment.
26
+ # - `enable`: Activates Watchlist Monitoring for the specified evaluation.
27
+ # - `disable`: Deactivates Watchlist Monitoring for the specified
28
+ # evaluation.
29
+ # @return [Operation]
30
+ attr_accessor :operation
31
+
32
+ # A mapping from model property names to API property names.
33
+ def self.names
34
+ @_hash = {} if @_hash.nil?
35
+ @_hash['reference_id'] = 'reference_id'
36
+ @_hash['list_type'] = 'list_type'
37
+ @_hash['operation'] = 'operation'
38
+ @_hash
39
+ end
40
+
41
+ # An array for optional fields
42
+ def self.optionals
43
+ []
44
+ end
45
+
46
+ # An array for nullable fields
47
+ def self.nullables
48
+ []
49
+ end
50
+
51
+ def initialize(reference_id:, operation:, additional_properties: nil)
52
+ # Add additional model properties to the instance
53
+ additional_properties = {} if additional_properties.nil?
54
+
55
+ @reference_id = reference_id
56
+ @list_type = 'watchlist'
57
+ @operation = operation
58
+ @additional_properties = additional_properties
59
+ end
60
+
61
+ # Creates an instance of the object from a hash.
62
+ def self.from_hash(hash)
63
+ return nil unless hash
64
+
65
+ # Extract variables from the hash.
66
+ reference_id = hash.key?('reference_id') ? hash['reference_id'] : nil
67
+ operation = hash.key?('operation') ? hash['operation'] : nil
68
+
69
+ # Create a new hash for additional properties, removing known properties.
70
+ new_hash = hash.reject { |k, _| names.value?(k) }
71
+
72
+ additional_properties = APIHelper.get_additional_properties(
73
+ new_hash, proc { |value| value }
74
+ )
75
+
76
+ # Create object from extracted values.
77
+ ApiEvaluationMonitoringRequest.new(reference_id: reference_id,
78
+ operation: operation,
79
+ additional_properties: additional_properties)
80
+ end
81
+
82
+ # Provides a human-readable string representation of the object.
83
+ def to_s
84
+ class_name = self.class.name.split('::').last
85
+ "<#{class_name} reference_id: #{@reference_id}, list_type: #{@list_type}, operation:"\
86
+ " #{@operation}, additional_properties: #{@additional_properties}>"
87
+ end
88
+
89
+ # Provides a debugging-friendly string with detailed object information.
90
+ def inspect
91
+ class_name = self.class.name.split('::').last
92
+ "<#{class_name} reference_id: #{@reference_id.inspect}, list_type: #{@list_type.inspect},"\
93
+ " operation: #{@operation.inspect}, additional_properties: #{@additional_properties}>"
94
+ end
95
+ end
96
+ end
@@ -0,0 +1,84 @@
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
+ # ApiEvaluationMonitoringResponse Model.
8
+ class ApiEvaluationMonitoringResponse < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # Indicates whether the monitoring enrollment operation was successful.
13
+ # @return [TrueClass | FalseClass]
14
+ attr_accessor :success
15
+
16
+ # Current status of the monitoring subscription after the operation has been
17
+ # processed.
18
+ # @return [MonitoringStatus]
19
+ attr_accessor :monitoring_status
20
+
21
+ # A mapping from model property names to API property names.
22
+ def self.names
23
+ @_hash = {} if @_hash.nil?
24
+ @_hash['success'] = 'success'
25
+ @_hash['monitoring_status'] = 'monitoring_status'
26
+ @_hash
27
+ end
28
+
29
+ # An array for optional fields
30
+ def self.optionals
31
+ []
32
+ end
33
+
34
+ # An array for nullable fields
35
+ def self.nullables
36
+ []
37
+ end
38
+
39
+ def initialize(success:, monitoring_status:, additional_properties: nil)
40
+ # Add additional model properties to the instance
41
+ additional_properties = {} if additional_properties.nil?
42
+
43
+ @success = success
44
+ @monitoring_status = monitoring_status
45
+ @additional_properties = additional_properties
46
+ end
47
+
48
+ # Creates an instance of the object from a hash.
49
+ def self.from_hash(hash)
50
+ return nil unless hash
51
+
52
+ # Extract variables from the hash.
53
+ success = hash.key?('success') ? hash['success'] : nil
54
+ monitoring_status =
55
+ hash.key?('monitoring_status') ? hash['monitoring_status'] : nil
56
+
57
+ # Create a new hash for additional properties, removing known properties.
58
+ new_hash = hash.reject { |k, _| names.value?(k) }
59
+
60
+ additional_properties = APIHelper.get_additional_properties(
61
+ new_hash, proc { |value| value }
62
+ )
63
+
64
+ # Create object from extracted values.
65
+ ApiEvaluationMonitoringResponse.new(success: success,
66
+ monitoring_status: monitoring_status,
67
+ additional_properties: additional_properties)
68
+ end
69
+
70
+ # Provides a human-readable string representation of the object.
71
+ def to_s
72
+ class_name = self.class.name.split('::').last
73
+ "<#{class_name} success: #{@success}, monitoring_status: #{@monitoring_status},"\
74
+ " additional_properties: #{@additional_properties}>"
75
+ end
76
+
77
+ # Provides a debugging-friendly string with detailed object information.
78
+ def inspect
79
+ class_name = self.class.name.split('::').last
80
+ "<#{class_name} success: #{@success.inspect}, monitoring_status:"\
81
+ " #{@monitoring_status.inspect}, additional_properties: #{@additional_properties}>"
82
+ end
83
+ end
84
+ end