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,115 @@
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
+ # Event payload for the workforce verification application.
8
+ class Data8 < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # Type of event being emitted.
13
+ # @return [String]
14
+ attr_reader :event_type
15
+
16
+ # Category of the event.
17
+ # @return [String]
18
+ attr_reader :event_category
19
+
20
+ # Information about the individual being verified.
21
+ # @return [Individual4]
22
+ attr_accessor :individual
23
+
24
+ # A mapping from model property names to API property names.
25
+ def self.names
26
+ @_hash = {} if @_hash.nil?
27
+ @_hash['event_type'] = 'event_type'
28
+ @_hash['event_category'] = 'event_category'
29
+ @_hash['individual'] = 'individual'
30
+ @_hash
31
+ end
32
+
33
+ # An array for optional fields
34
+ def self.optionals
35
+ []
36
+ end
37
+
38
+ # An array for nullable fields
39
+ def self.nullables
40
+ []
41
+ end
42
+
43
+ def initialize(individual:, additional_properties: nil)
44
+ # Add additional model properties to the instance
45
+ additional_properties = {} if additional_properties.nil?
46
+
47
+ @event_type = 'application_submitted'
48
+ @event_category = 'workforce_verification'
49
+ @individual = individual
50
+ @additional_properties = additional_properties
51
+ end
52
+
53
+ # Creates an instance of the object from a hash.
54
+ def self.from_hash(hash)
55
+ return nil unless hash
56
+
57
+ # Extract variables from the hash.
58
+ individual = Individual4.from_hash(hash['individual']) if hash['individual']
59
+
60
+ # Create a new hash for additional properties, removing known properties.
61
+ new_hash = hash.reject { |k, _| names.value?(k) }
62
+
63
+ additional_properties = APIHelper.get_additional_properties(
64
+ new_hash, proc { |value| value }
65
+ )
66
+
67
+ # Create object from extracted values.
68
+ Data8.new(individual: individual,
69
+ additional_properties: additional_properties)
70
+ end
71
+
72
+ # Validates an instance of the object from a given value.
73
+ # @param [Data8 | Hash] The value against the validation is performed.
74
+ def self.validate(value)
75
+ if value.instance_of? self
76
+ return (
77
+ APIHelper.valid_type?(value.event_type,
78
+ ->(val) { val.instance_of? String }) and
79
+ APIHelper.valid_type?(value.event_category,
80
+ ->(val) { val.instance_of? String }) and
81
+ APIHelper.valid_type?(value.individual,
82
+ ->(val) { Individual4.validate(val) },
83
+ is_model_hash: true)
84
+ )
85
+ end
86
+
87
+ return false unless value.instance_of? Hash
88
+
89
+ (
90
+ APIHelper.valid_type?(value['event_type'],
91
+ ->(val) { val.instance_of? String }) and
92
+ APIHelper.valid_type?(value['event_category'],
93
+ ->(val) { val.instance_of? String }) and
94
+ APIHelper.valid_type?(value['individual'],
95
+ ->(val) { Individual4.validate(val) },
96
+ is_model_hash: true)
97
+ )
98
+ end
99
+
100
+ # Provides a human-readable string representation of the object.
101
+ def to_s
102
+ class_name = self.class.name.split('::').last
103
+ "<#{class_name} event_type: #{@event_type}, event_category: #{@event_category}, individual:"\
104
+ " #{@individual}, additional_properties: #{@additional_properties}>"
105
+ end
106
+
107
+ # Provides a debugging-friendly string with detailed object information.
108
+ def inspect
109
+ class_name = self.class.name.split('::').last
110
+ "<#{class_name} event_type: #{@event_type.inspect}, event_category:"\
111
+ " #{@event_category.inspect}, individual: #{@individual.inspect}, additional_properties:"\
112
+ " #{@additional_properties}>"
113
+ end
114
+ end
115
+ end
@@ -0,0 +1,130 @@
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 Payment Screening workflow.
8
+ class Data9 < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # Single-select transaction type.
13
+ # @return [String]
14
+ attr_reader :transaction_type
15
+
16
+ # Optional free-form field identifying the line of business the request
17
+ # originates from.
18
+ # @return [String]
19
+ attr_accessor :line_of_business
20
+
21
+ # Transaction detail fields.
22
+ # @return [TransactionDetails]
23
+ attr_accessor :transaction_details
24
+
25
+ # Source party information.
26
+ # @return [Source]
27
+ attr_accessor :source
28
+
29
+ # Destination party information.
30
+ # @return [Destination]
31
+ attr_accessor :destination
32
+
33
+ # A mapping from model property names to API property names.
34
+ def self.names
35
+ @_hash = {} if @_hash.nil?
36
+ @_hash['transaction_type'] = 'transaction_type'
37
+ @_hash['line_of_business'] = 'line_of_business'
38
+ @_hash['transaction_details'] = 'transaction_details'
39
+ @_hash['source'] = 'source'
40
+ @_hash['destination'] = 'destination'
41
+ @_hash
42
+ end
43
+
44
+ # An array for optional fields
45
+ def self.optionals
46
+ %w[
47
+ line_of_business
48
+ transaction_details
49
+ source
50
+ destination
51
+ ]
52
+ end
53
+
54
+ # An array for nullable fields
55
+ def self.nullables
56
+ []
57
+ end
58
+
59
+ def initialize(line_of_business: SKIP, transaction_details: SKIP,
60
+ source: SKIP, destination: SKIP, additional_properties: nil)
61
+ # Add additional model properties to the instance
62
+ additional_properties = {} if additional_properties.nil?
63
+
64
+ @transaction_type = 'transfer'
65
+ @line_of_business = line_of_business unless line_of_business == SKIP
66
+ @transaction_details = transaction_details unless transaction_details == SKIP
67
+ @source = source unless source == SKIP
68
+ @destination = destination unless destination == SKIP
69
+ @additional_properties = additional_properties
70
+ end
71
+
72
+ # Creates an instance of the object from a hash.
73
+ def self.from_hash(hash)
74
+ return nil unless hash
75
+
76
+ # Extract variables from the hash.
77
+ line_of_business =
78
+ hash.key?('line_of_business') ? hash['line_of_business'] : SKIP
79
+ transaction_details = TransactionDetails.from_hash(hash['transaction_details']) if
80
+ hash['transaction_details']
81
+ source = Source.from_hash(hash['source']) if hash['source']
82
+ destination = Destination.from_hash(hash['destination']) if hash['destination']
83
+
84
+ # Create a new hash for additional properties, removing known properties.
85
+ new_hash = hash.reject { |k, _| names.value?(k) }
86
+
87
+ additional_properties = APIHelper.get_additional_properties(
88
+ new_hash, proc { |value| value }
89
+ )
90
+
91
+ # Create object from extracted values.
92
+ Data9.new(line_of_business: line_of_business,
93
+ transaction_details: transaction_details,
94
+ source: source,
95
+ destination: destination,
96
+ additional_properties: additional_properties)
97
+ end
98
+
99
+ # Validates an instance of the object from a given value.
100
+ # @param [Data9 | Hash] The value against the validation is performed.
101
+ def self.validate(value)
102
+ if value.instance_of? self
103
+ return APIHelper.valid_type?(value.transaction_type,
104
+ ->(val) { val.instance_of? String })
105
+ end
106
+
107
+ return false unless value.instance_of? Hash
108
+
109
+ APIHelper.valid_type?(value['transaction_type'],
110
+ ->(val) { val.instance_of? String })
111
+ end
112
+
113
+ # Provides a human-readable string representation of the object.
114
+ def to_s
115
+ class_name = self.class.name.split('::').last
116
+ "<#{class_name} transaction_type: #{@transaction_type}, line_of_business:"\
117
+ " #{@line_of_business}, transaction_details: #{@transaction_details}, source: #{@source},"\
118
+ " destination: #{@destination}, additional_properties: #{@additional_properties}>"
119
+ end
120
+
121
+ # Provides a debugging-friendly string with detailed object information.
122
+ def inspect
123
+ class_name = self.class.name.split('::').last
124
+ "<#{class_name} transaction_type: #{@transaction_type.inspect}, line_of_business:"\
125
+ " #{@line_of_business.inspect}, transaction_details: #{@transaction_details.inspect},"\
126
+ " source: #{@source.inspect}, destination: #{@destination.inspect}, additional_properties:"\
127
+ " #{@additional_properties}>"
128
+ end
129
+ end
130
+ end
@@ -0,0 +1,182 @@
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
+ # Common metadata shared by every enrichment result, describing the provider
8
+ # and call outcome.
9
+ class DataEnrichment < BaseModel
10
+ SKIP = Object.new
11
+ private_constant :SKIP
12
+
13
+ # The human-readable name of the enrichment that executed.
14
+ # @return [String]
15
+ attr_accessor :enrichment_name
16
+
17
+ # Identifies the Socure service that processed this enrichment. The value
18
+ # varies by enrichment type — for example, `SocureOTP` for OTP, `SocureSNA`
19
+ # for SNA, and `SocurePaymentScreening` for Payment Screening. Core
20
+ # enrichments such as email risk may return the generic value `Socure`.
21
+ # @return [String]
22
+ attr_accessor :enrichment_provider
23
+
24
+ # The API endpoint used for the enrichment request.
25
+ # @return [String]
26
+ attr_accessor :enrichment_endpoint
27
+
28
+ # The provider or orchestration status code for the enrichment attempt.
29
+ # @return [Integer]
30
+ attr_accessor :status_code
31
+
32
+ # The payload sent to the enrichment provider.
33
+ # @return [Object]
34
+ attr_accessor :request
35
+
36
+ # Query string parameters sent to the enrichment provider, for enrichments
37
+ # called via URL parameters rather than a request body.
38
+ # @return [Object]
39
+ attr_accessor :request_url_params
40
+
41
+ # The data returned from the enrichment provider.
42
+ # @return [Response]
43
+ attr_accessor :response
44
+
45
+ # Indicates whether the result was returned from source cache instead of a
46
+ # fresh provider call.
47
+ # @return [TrueClass | FalseClass]
48
+ attr_accessor :is_source_cache
49
+
50
+ # Total number of attempts made to complete the enrichment.
51
+ # @return [Integer]
52
+ attr_accessor :total_attempts
53
+
54
+ # Error detail when the enrichment request failed or only partially
55
+ # completed.
56
+ # @return [String]
57
+ attr_accessor :error_message
58
+
59
+ # A mapping from model property names to API property names.
60
+ def self.names
61
+ @_hash = {} if @_hash.nil?
62
+ @_hash['enrichment_name'] = 'enrichment_name'
63
+ @_hash['enrichment_provider'] = 'enrichment_provider'
64
+ @_hash['enrichment_endpoint'] = 'enrichment_endpoint'
65
+ @_hash['status_code'] = 'status_code'
66
+ @_hash['request'] = 'request'
67
+ @_hash['request_url_params'] = 'request_url_params'
68
+ @_hash['response'] = 'response'
69
+ @_hash['is_source_cache'] = 'is_source_cache'
70
+ @_hash['total_attempts'] = 'total_attempts'
71
+ @_hash['error_message'] = 'error_message'
72
+ @_hash
73
+ end
74
+
75
+ # An array for optional fields
76
+ def self.optionals
77
+ %w[
78
+ enrichment_name
79
+ enrichment_provider
80
+ enrichment_endpoint
81
+ status_code
82
+ request
83
+ request_url_params
84
+ response
85
+ is_source_cache
86
+ total_attempts
87
+ error_message
88
+ ]
89
+ end
90
+
91
+ # An array for nullable fields
92
+ def self.nullables
93
+ []
94
+ end
95
+
96
+ def initialize(enrichment_name: SKIP, enrichment_provider: SKIP,
97
+ enrichment_endpoint: SKIP, status_code: SKIP, request: SKIP,
98
+ request_url_params: SKIP, response: SKIP,
99
+ is_source_cache: SKIP, total_attempts: SKIP,
100
+ error_message: SKIP, additional_properties: nil)
101
+ # Add additional model properties to the instance
102
+ additional_properties = {} if additional_properties.nil?
103
+
104
+ @enrichment_name = enrichment_name unless enrichment_name == SKIP
105
+ @enrichment_provider = enrichment_provider unless enrichment_provider == SKIP
106
+ @enrichment_endpoint = enrichment_endpoint unless enrichment_endpoint == SKIP
107
+ @status_code = status_code unless status_code == SKIP
108
+ @request = request unless request == SKIP
109
+ @request_url_params = request_url_params unless request_url_params == SKIP
110
+ @response = response unless response == SKIP
111
+ @is_source_cache = is_source_cache unless is_source_cache == SKIP
112
+ @total_attempts = total_attempts unless total_attempts == SKIP
113
+ @error_message = error_message unless error_message == SKIP
114
+ @additional_properties = additional_properties
115
+ end
116
+
117
+ # Creates an instance of the object from a hash.
118
+ def self.from_hash(hash)
119
+ return nil unless hash
120
+
121
+ # Extract variables from the hash.
122
+ enrichment_name =
123
+ hash.key?('enrichment_name') ? hash['enrichment_name'] : SKIP
124
+ enrichment_provider =
125
+ hash.key?('enrichment_provider') ? hash['enrichment_provider'] : SKIP
126
+ enrichment_endpoint =
127
+ hash.key?('enrichment_endpoint') ? hash['enrichment_endpoint'] : SKIP
128
+ status_code = hash.key?('status_code') ? hash['status_code'] : SKIP
129
+ request = hash.key?('request') ? hash['request'] : SKIP
130
+ request_url_params =
131
+ hash.key?('request_url_params') ? hash['request_url_params'] : SKIP
132
+ response = Response.from_hash(hash['response']) if hash['response']
133
+ is_source_cache =
134
+ hash.key?('is_source_cache') ? hash['is_source_cache'] : SKIP
135
+ total_attempts =
136
+ hash.key?('total_attempts') ? hash['total_attempts'] : SKIP
137
+ error_message = hash.key?('error_message') ? hash['error_message'] : SKIP
138
+
139
+ # Create a new hash for additional properties, removing known properties.
140
+ new_hash = hash.reject { |k, _| names.value?(k) }
141
+
142
+ additional_properties = APIHelper.get_additional_properties(
143
+ new_hash, proc { |value| value }
144
+ )
145
+
146
+ # Create object from extracted values.
147
+ DataEnrichment.new(enrichment_name: enrichment_name,
148
+ enrichment_provider: enrichment_provider,
149
+ enrichment_endpoint: enrichment_endpoint,
150
+ status_code: status_code,
151
+ request: request,
152
+ request_url_params: request_url_params,
153
+ response: response,
154
+ is_source_cache: is_source_cache,
155
+ total_attempts: total_attempts,
156
+ error_message: error_message,
157
+ additional_properties: additional_properties)
158
+ end
159
+
160
+ # Provides a human-readable string representation of the object.
161
+ def to_s
162
+ class_name = self.class.name.split('::').last
163
+ "<#{class_name} enrichment_name: #{@enrichment_name}, enrichment_provider:"\
164
+ " #{@enrichment_provider}, enrichment_endpoint: #{@enrichment_endpoint}, status_code:"\
165
+ " #{@status_code}, request: #{@request}, request_url_params: #{@request_url_params},"\
166
+ " response: #{@response}, is_source_cache: #{@is_source_cache}, total_attempts:"\
167
+ " #{@total_attempts}, error_message: #{@error_message}, additional_properties:"\
168
+ " #{@additional_properties}>"
169
+ end
170
+
171
+ # Provides a debugging-friendly string with detailed object information.
172
+ def inspect
173
+ class_name = self.class.name.split('::').last
174
+ "<#{class_name} enrichment_name: #{@enrichment_name.inspect}, enrichment_provider:"\
175
+ " #{@enrichment_provider.inspect}, enrichment_endpoint: #{@enrichment_endpoint.inspect},"\
176
+ " status_code: #{@status_code.inspect}, request: #{@request.inspect}, request_url_params:"\
177
+ " #{@request_url_params.inspect}, response: #{@response.inspect}, is_source_cache:"\
178
+ " #{@is_source_cache.inspect}, total_attempts: #{@total_attempts.inspect}, error_message:"\
179
+ " #{@error_message.inspect}, additional_properties: #{@additional_properties}>"
180
+ end
181
+ end
182
+ end
@@ -0,0 +1,47 @@
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 final outcome of the evaluation. Possible decision values are: *
8
+ # `ACCEPT`: The evaluation is approved; proceed with fulfillment/onboarding
9
+ # and the happy‑path experience. * `REVIEW`: Additional assessment is
10
+ # required; route to manual review and/or configured step‑up checks per
11
+ # workflow logic. * `REJECT`: The evaluation has failed the required checks
12
+ # and the entity is rejected. > **Note:** `ACCEPT`, `REVIEW`, and `REJECT` are
13
+ # the default decision values. Your integration can be customized to use
14
+ # different default decision values based on specific workflow needs.
15
+ class Decision
16
+ DECISION = [
17
+ # TODO: Write general description for ACCEPT
18
+ ACCEPT = 'ACCEPT'.freeze,
19
+
20
+ # TODO: Write general description for REVIEW
21
+ REVIEW = 'REVIEW'.freeze,
22
+
23
+ # TODO: Write general description for REJECT
24
+ REJECT = 'REJECT'.freeze
25
+ ].freeze
26
+
27
+ def self.validate(value)
28
+ return false if value.nil?
29
+
30
+ DECISION.include?(value)
31
+ end
32
+
33
+ def self.from_value(value, default_value = ACCEPT)
34
+ return default_value if value.nil?
35
+
36
+ str = value.to_s.strip
37
+
38
+ case str.downcase
39
+ when 'accept' then ACCEPT
40
+ when 'review' then REVIEW
41
+ when 'reject' then REJECT
42
+ else
43
+ default_value
44
+ end
45
+ end
46
+ end
47
+ end
@@ -0,0 +1,48 @@
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 new decision value to apply.
8
+ class Decision1
9
+ DECISION1 = [
10
+ # TODO: Write general description for ACCEPT
11
+ ACCEPT = 'ACCEPT'.freeze,
12
+
13
+ # TODO: Write general description for REJECT
14
+ REJECT = 'REJECT'.freeze,
15
+
16
+ # TODO: Write general description for REVIEW
17
+ REVIEW = 'REVIEW'.freeze,
18
+
19
+ # TODO: Write general description for RESUBMIT
20
+ RESUBMIT = 'RESUBMIT'.freeze,
21
+
22
+ # TODO: Write general description for CANCEL
23
+ CANCEL = 'CANCEL'.freeze
24
+ ].freeze
25
+
26
+ def self.validate(value)
27
+ return false if value.nil?
28
+
29
+ DECISION1.include?(value)
30
+ end
31
+
32
+ def self.from_value(value, default_value = ACCEPT)
33
+ return default_value if value.nil?
34
+
35
+ str = value.to_s.strip
36
+
37
+ case str.downcase
38
+ when 'accept' then ACCEPT
39
+ when 'reject' then REJECT
40
+ when 'review' then REVIEW
41
+ when 'resubmit' then RESUBMIT
42
+ when 'cancel' then CANCEL
43
+ else
44
+ default_value
45
+ end
46
+ end
47
+ end
48
+ end
@@ -0,0 +1,136 @@
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
+ # Destination party information.
8
+ class Destination < BaseModel
9
+ SKIP = Object.new
10
+ private_constant :SKIP
11
+
12
+ # Amount in minor currency units.
13
+ # @return [Integer]
14
+ attr_accessor :amount
15
+
16
+ # ISO 4217 currency code for the amount.
17
+ # @return [String]
18
+ attr_accessor :currency
19
+
20
+ # Mode of interaction on the consumer's end.
21
+ # @return [Channel1]
22
+ attr_accessor :channel
23
+
24
+ # Consumer IP address in IPv4 or IPv6 format.
25
+ # @return [String]
26
+ attr_accessor :ip_address
27
+
28
+ # Individual party details for Payment Screening.
29
+ # @return [PaymentScreeningIndividual]
30
+ attr_accessor :individual
31
+
32
+ # Business party details for Payment Screening.
33
+ # @return [PaymentScreeningBusiness]
34
+ attr_accessor :business
35
+
36
+ # A mapping from model property names to API property names.
37
+ def self.names
38
+ @_hash = {} if @_hash.nil?
39
+ @_hash['amount'] = 'amount'
40
+ @_hash['currency'] = 'currency'
41
+ @_hash['channel'] = 'channel'
42
+ @_hash['ip_address'] = 'ip_address'
43
+ @_hash['individual'] = 'individual'
44
+ @_hash['business'] = 'business'
45
+ @_hash
46
+ end
47
+
48
+ # An array for optional fields
49
+ def self.optionals
50
+ %w[
51
+ amount
52
+ currency
53
+ channel
54
+ ip_address
55
+ individual
56
+ business
57
+ ]
58
+ end
59
+
60
+ # An array for nullable fields
61
+ def self.nullables
62
+ []
63
+ end
64
+
65
+ def initialize(amount: SKIP, currency: SKIP, channel: SKIP,
66
+ ip_address: SKIP, individual: SKIP, business: SKIP,
67
+ additional_properties: nil)
68
+ # Add additional model properties to the instance
69
+ additional_properties = {} if additional_properties.nil?
70
+
71
+ @amount = amount unless amount == SKIP
72
+ @currency = currency unless currency == SKIP
73
+ @channel = channel unless channel == SKIP
74
+ @ip_address = ip_address unless ip_address == SKIP
75
+ @individual = individual unless individual == SKIP
76
+ @business = business unless business == SKIP
77
+ @additional_properties = additional_properties
78
+ end
79
+
80
+ # Creates an instance of the object from a hash.
81
+ def self.from_hash(hash)
82
+ return nil unless hash
83
+
84
+ # Extract variables from the hash.
85
+ amount = hash.key?('amount') ? hash['amount'] : SKIP
86
+ currency = hash.key?('currency') ? hash['currency'] : SKIP
87
+ channel = hash.key?('channel') ? hash['channel'] : SKIP
88
+ ip_address = hash.key?('ip_address') ? hash['ip_address'] : SKIP
89
+ individual = PaymentScreeningIndividual.from_hash(hash['individual']) if hash['individual']
90
+ business = PaymentScreeningBusiness.from_hash(hash['business']) if hash['business']
91
+
92
+ # Create a new hash for additional properties, removing known properties.
93
+ new_hash = hash.reject { |k, _| names.value?(k) }
94
+
95
+ additional_properties = APIHelper.get_additional_properties(
96
+ new_hash, proc { |value| value }
97
+ )
98
+
99
+ # Create object from extracted values.
100
+ Destination.new(amount: amount,
101
+ currency: currency,
102
+ channel: channel,
103
+ ip_address: ip_address,
104
+ individual: individual,
105
+ business: business,
106
+ additional_properties: additional_properties)
107
+ end
108
+
109
+ # Validates an instance of the object from a given value.
110
+ # @param [Destination | Hash] The value against the validation is performed.
111
+ def self.validate(value)
112
+ return true if value.instance_of? self
113
+
114
+ return false unless value.instance_of? Hash
115
+
116
+ true
117
+ end
118
+
119
+ # Provides a human-readable string representation of the object.
120
+ def to_s
121
+ class_name = self.class.name.split('::').last
122
+ "<#{class_name} amount: #{@amount}, currency: #{@currency}, channel: #{@channel},"\
123
+ " ip_address: #{@ip_address}, individual: #{@individual}, business: #{@business},"\
124
+ " additional_properties: #{@additional_properties}>"
125
+ end
126
+
127
+ # Provides a debugging-friendly string with detailed object information.
128
+ def inspect
129
+ class_name = self.class.name.split('::').last
130
+ "<#{class_name} amount: #{@amount.inspect}, currency: #{@currency.inspect}, channel:"\
131
+ " #{@channel.inspect}, ip_address: #{@ip_address.inspect}, individual:"\
132
+ " #{@individual.inspect}, business: #{@business.inspect}, additional_properties:"\
133
+ " #{@additional_properties}>"
134
+ end
135
+ end
136
+ end