alogram_payrisk 0.2.23 → 0.3.0
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.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +2 -2
- data/RELEASE.json +4 -4
- data/alogram_payrisk.gemspec +1 -1
- data/lib/alogram_payrisk/api/forensic_data_api.rb +19 -19
- data/lib/alogram_payrisk/api/risk_scoring_api.rb +28 -28
- data/lib/alogram_payrisk/api/roadmap_preview_api.rb +55 -55
- data/lib/alogram_payrisk/api/signal_intelligence_api.rb +55 -55
- data/lib/alogram_payrisk/api/system_api.rb +1 -1
- data/lib/alogram_payrisk/api_client.rb +1 -1
- data/lib/alogram_payrisk/api_error.rb +1 -1
- data/lib/alogram_payrisk/api_model_base.rb +1 -1
- data/lib/alogram_payrisk/configuration.rb +1 -1
- data/lib/alogram_payrisk/models/account.rb +1 -1
- data/lib/alogram_payrisk/models/account_check_request.rb +1 -1
- data/lib/alogram_payrisk/models/agent_manifest.rb +1 -1
- data/lib/alogram_payrisk/models/agent_provider.rb +1 -1
- data/lib/alogram_payrisk/models/auth_context.rb +1 -1
- data/lib/alogram_payrisk/models/avs_result_enum.rb +1 -1
- data/lib/alogram_payrisk/models/bank_transfer.rb +1 -1
- data/lib/alogram_payrisk/models/card.rb +1 -1
- data/lib/alogram_payrisk/models/card_network_enum.rb +1 -1
- data/lib/alogram_payrisk/models/category_signal.rb +1 -1
- data/lib/alogram_payrisk/models/channel_enum.rb +1 -1
- data/lib/alogram_payrisk/models/check_request.rb +1 -1
- data/lib/alogram_payrisk/models/confidence_enum.rb +1 -1
- data/lib/alogram_payrisk/models/crypto.rb +1 -1
- data/lib/alogram_payrisk/models/cvv_result_enum.rb +1 -1
- data/lib/alogram_payrisk/models/decision_resolution_request.rb +1 -1
- data/lib/alogram_payrisk/models/decision_resolution_request_analyst.rb +1 -1
- data/lib/alogram_payrisk/models/decision_resolution_response.rb +1 -1
- data/lib/alogram_payrisk/models/decision_response.rb +32 -216
- data/lib/alogram_payrisk/models/decision_response_policy.rb +159 -0
- data/lib/alogram_payrisk/models/device_info.rb +1 -1
- data/lib/alogram_payrisk/models/discount_code.rb +1 -1
- data/lib/alogram_payrisk/models/entity_ids.rb +36 -5
- data/lib/alogram_payrisk/models/entry_method_enum.rb +1 -1
- data/lib/alogram_payrisk/models/external_assessment.rb +1 -1
- data/lib/alogram_payrisk/models/fraud_score.rb +1 -1
- data/lib/alogram_payrisk/models/identity.rb +1 -1
- data/lib/alogram_payrisk/models/ingest_payment_event202_response.rb +1 -1
- data/lib/alogram_payrisk/models/integrity.rb +1 -1
- data/lib/alogram_payrisk/models/interaction.rb +1 -1
- data/lib/alogram_payrisk/models/interaction_type_enum.rb +1 -1
- data/lib/alogram_payrisk/models/invoice.rb +1 -1
- data/lib/alogram_payrisk/models/ip_info.rb +1 -1
- data/lib/alogram_payrisk/models/kyc_check_request.rb +1 -1
- data/lib/alogram_payrisk/models/kyc_payload.rb +1 -1
- data/lib/alogram_payrisk/models/merchant_context.rb +1 -1
- data/lib/alogram_payrisk/models/operator_type.rb +42 -0
- data/lib/alogram_payrisk/models/order_context.rb +1 -1
- data/lib/alogram_payrisk/models/payer_type_enum.rb +1 -1
- data/lib/alogram_payrisk/models/payment_authorization_outcome.rb +1 -1
- data/lib/alogram_payrisk/models/payment_capture_outcome.rb +1 -1
- data/lib/alogram_payrisk/models/payment_card_type_enum.rb +1 -1
- data/lib/alogram_payrisk/models/payment_chargeback.rb +1 -1
- data/lib/alogram_payrisk/models/payment_chargeback_outcome.rb +1 -1
- data/lib/alogram_payrisk/models/payment_dispute_outcome.rb +1 -1
- data/lib/alogram_payrisk/models/payment_event.rb +1 -1
- data/lib/alogram_payrisk/models/payment_event_type.rb +1 -1
- data/lib/alogram_payrisk/models/payment_method.rb +1 -1
- data/lib/alogram_payrisk/models/payment_outcome.rb +1 -1
- data/lib/alogram_payrisk/models/payment_realtime_type_enum.rb +1 -1
- data/lib/alogram_payrisk/models/payment_refund_outcome.rb +1 -1
- data/lib/alogram_payrisk/models/payment_wallet_type_enum.rb +1 -1
- data/lib/alogram_payrisk/models/postal_address.rb +1 -1
- data/lib/alogram_payrisk/models/problem.rb +1 -1
- data/lib/alogram_payrisk/models/purchase.rb +1 -1
- data/lib/alogram_payrisk/models/purchase_initiator_enum.rb +1 -1
- data/lib/alogram_payrisk/models/purchase_sequence_enum.rb +1 -1
- data/lib/alogram_payrisk/models/purchase_usage_enum.rb +1 -1
- data/lib/alogram_payrisk/models/realtime.rb +1 -1
- data/lib/alogram_payrisk/models/reason_detail.rb +15 -5
- data/lib/alogram_payrisk/models/risk_breakdown.rb +1 -1
- data/lib/alogram_payrisk/models/risk_category_enum.rb +1 -1
- data/lib/alogram_payrisk/models/risk_level_enum.rb +1 -1
- data/lib/alogram_payrisk/models/sca_method_enum.rb +1 -1
- data/lib/alogram_payrisk/models/score_record.rb +19 -117
- data/lib/alogram_payrisk/models/scores_success_response.rb +1 -1
- data/lib/alogram_payrisk/models/signals_account_variant.rb +1 -1
- data/lib/alogram_payrisk/models/signals_interaction_variant.rb +1 -1
- data/lib/alogram_payrisk/models/signals_request.rb +1 -1
- data/lib/alogram_payrisk/models/stored_credential_context.rb +1 -1
- data/lib/alogram_payrisk/models/three_ds_data.rb +1 -1
- data/lib/alogram_payrisk/models/wallet.rb +1 -1
- data/lib/alogram_payrisk/version.rb +2 -2
- data/lib/alogram_payrisk.rb +3 -1
- data/spec/api/forensic_data_api_spec.rb +3 -3
- data/spec/api/risk_scoring_api_spec.rb +4 -4
- data/spec/api/roadmap_preview_api_spec.rb +7 -7
- data/spec/api/signal_intelligence_api_spec.rb +7 -7
- data/spec/api/system_api_spec.rb +1 -1
- data/spec/models/account_check_request_spec.rb +1 -1
- data/spec/models/account_spec.rb +1 -1
- data/spec/models/agent_manifest_spec.rb +1 -1
- data/spec/models/agent_provider_spec.rb +1 -1
- data/spec/models/auth_context_spec.rb +1 -1
- data/spec/models/avs_result_enum_spec.rb +1 -1
- data/spec/models/bank_transfer_spec.rb +1 -1
- data/spec/models/card_network_enum_spec.rb +1 -1
- data/spec/models/card_spec.rb +1 -1
- data/spec/models/category_signal_spec.rb +1 -1
- data/spec/models/channel_enum_spec.rb +1 -1
- data/spec/models/check_request_spec.rb +1 -1
- data/spec/models/confidence_enum_spec.rb +1 -1
- data/spec/models/crypto_spec.rb +1 -1
- data/spec/models/cvv_result_enum_spec.rb +1 -1
- data/spec/models/decision_resolution_request_analyst_spec.rb +1 -1
- data/spec/models/decision_resolution_request_spec.rb +1 -1
- data/spec/models/decision_resolution_response_spec.rb +1 -1
- data/spec/models/decision_response_policy_spec.rb +42 -0
- data/spec/models/decision_response_spec.rb +4 -50
- data/spec/models/device_info_spec.rb +1 -1
- data/spec/models/discount_code_spec.rb +1 -1
- data/spec/models/entity_ids_spec.rb +7 -1
- data/spec/models/entry_method_enum_spec.rb +1 -1
- data/spec/models/external_assessment_spec.rb +1 -1
- data/spec/models/fraud_score_spec.rb +1 -1
- data/spec/models/identity_spec.rb +1 -1
- data/spec/models/ingest_payment_event202_response_spec.rb +1 -1
- data/spec/models/integrity_spec.rb +1 -1
- data/spec/models/interaction_spec.rb +1 -1
- data/spec/models/interaction_type_enum_spec.rb +1 -1
- data/spec/models/invoice_spec.rb +1 -1
- data/spec/models/ip_info_spec.rb +1 -1
- data/spec/models/kyc_check_request_spec.rb +1 -1
- data/spec/models/kyc_payload_spec.rb +1 -1
- data/spec/models/merchant_context_spec.rb +1 -1
- data/spec/models/operator_type_spec.rb +30 -0
- data/spec/models/order_context_spec.rb +1 -1
- data/spec/models/payer_type_enum_spec.rb +1 -1
- data/spec/models/payment_authorization_outcome_spec.rb +1 -1
- data/spec/models/payment_capture_outcome_spec.rb +1 -1
- data/spec/models/payment_card_type_enum_spec.rb +1 -1
- data/spec/models/payment_chargeback_outcome_spec.rb +1 -1
- data/spec/models/payment_chargeback_spec.rb +1 -1
- data/spec/models/payment_dispute_outcome_spec.rb +1 -1
- data/spec/models/payment_event_spec.rb +1 -1
- data/spec/models/payment_event_type_spec.rb +1 -1
- data/spec/models/payment_method_spec.rb +1 -1
- data/spec/models/payment_outcome_spec.rb +1 -1
- data/spec/models/payment_realtime_type_enum_spec.rb +1 -1
- data/spec/models/payment_refund_outcome_spec.rb +1 -1
- data/spec/models/payment_wallet_type_enum_spec.rb +1 -1
- data/spec/models/postal_address_spec.rb +1 -1
- data/spec/models/problem_spec.rb +1 -1
- data/spec/models/purchase_initiator_enum_spec.rb +1 -1
- data/spec/models/purchase_sequence_enum_spec.rb +1 -1
- data/spec/models/purchase_spec.rb +1 -1
- data/spec/models/purchase_usage_enum_spec.rb +1 -1
- data/spec/models/realtime_spec.rb +1 -1
- data/spec/models/reason_detail_spec.rb +7 -1
- data/spec/models/risk_breakdown_spec.rb +1 -1
- data/spec/models/risk_category_enum_spec.rb +1 -1
- data/spec/models/risk_level_enum_spec.rb +1 -1
- data/spec/models/sca_method_enum_spec.rb +1 -1
- data/spec/models/score_record_spec.rb +2 -20
- data/spec/models/scores_success_response_spec.rb +1 -1
- data/spec/models/signals_account_variant_spec.rb +1 -1
- data/spec/models/signals_interaction_variant_spec.rb +1 -1
- data/spec/models/signals_request_spec.rb +1 -1
- data/spec/models/stored_credential_context_spec.rb +1 -1
- data/spec/models/three_ds_data_spec.rb +1 -1
- data/spec/models/wallet_spec.rb +1 -1
- data/spec/spec_helper.rb +1 -1
- data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/byebug-13.0.0/gem_make.out +5 -5
- data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/date-3.5.1/gem_make.out +5 -5
- data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/io-console-0.8.2/gem_make.out +5 -5
- data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/jaro_winkler-1.5.6/gem_make.out +5 -5
- data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/psych-5.4.0/gem_make.out +5 -5
- data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/racc-1.8.1/gem_make.out +5 -5
- data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/stringio-3.2.0/gem_make.out +5 -5
- metadata +8 -2
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
#Alogram PayRisk is an AI-native decision engine built for the speed and complexity of the modern commerce era. In a high-velocity world where AI-driven threats evolve in milliseconds, Alogram provides the real-time adaptability and forensic transparency needed to protect your ecosystem with total confidence. We solve the challenge of balancing frictionless growth with regulatory explainability, delivering instant, intelligent risk orchestration at enterprise scale. --- ## Licensing & Terms Our client libraries and API specifications are open-source under the **Apache License 2.0** to ensure seamless integration into your tech stack. Use of the Alogram PayRisk API service is proprietary and governed by our [Terms of Service](https://alogram.ai/#tos) and your specific **Enterprise Agreement**, if applicable. To access the service, you must have: * A valid Alogram API Key. * An active subscription or signed Master Service Agreement. Unauthorized use, including automated scraping or reverse engineering of the scoring engine, is strictly prohibited. --- ## Support & Traceability Every Alogram API response includes a unique **`x-trace-id`** header. Please include this ID when contacting [packages@alogram.ai](mailto:packages@alogram.ai) regarding specific transactions or errors. --- ## Specification The authoritative OpenAPI specification for this version is available for download: **[Download openapi.yaml](https://developers.alogram.ai/openapi.yaml)** | **[Download openapi.json](https://developers.alogram.ai/openapi.json)**
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 0.
|
|
6
|
+
The version of the OpenAPI document: 0.3.0
|
|
7
7
|
Contact: packages@alogram.ai
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.15.0
|
|
@@ -16,43 +16,24 @@ require 'time'
|
|
|
16
16
|
module AlogramPayRisk
|
|
17
17
|
# The synchronous risk decision for a purchase.
|
|
18
18
|
class DecisionResponse < ApiModelBase
|
|
19
|
-
#
|
|
20
|
-
attr_accessor :
|
|
19
|
+
# Alogram's unique, authoritative evaluation and transaction identifier. Prefixed with 'pi_' for purchases.
|
|
20
|
+
attr_accessor :id
|
|
21
21
|
|
|
22
|
+
# The authoritative, absolute policy command for this transaction. Downstream systems must bind their operational behavior (approve/decline/review) directly to this field.
|
|
22
23
|
attr_accessor :decision
|
|
23
24
|
|
|
24
25
|
# RFC 3339 timestamp with timezone.
|
|
25
26
|
attr_accessor :decision_at
|
|
26
27
|
|
|
27
|
-
#
|
|
28
|
+
# The authoritative, policy-adjusted blended risk score (0.0 - 1.0) derived from expert fusion.
|
|
28
29
|
attr_accessor :risk_score
|
|
29
30
|
|
|
30
|
-
# The authoritative blended risk score (0.0 - 1.0) derived from expert fusion.
|
|
31
|
-
attr_accessor :decision_score
|
|
32
|
-
|
|
33
|
-
attr_accessor :fraud_score
|
|
34
|
-
|
|
35
|
-
attr_accessor :breakdown
|
|
36
|
-
|
|
37
|
-
# Technical reason codes for the decision.
|
|
38
|
-
attr_accessor :reason_codes
|
|
39
|
-
|
|
40
31
|
# Structured reason details for the decision.
|
|
41
32
|
attr_accessor :reasons
|
|
42
33
|
|
|
43
|
-
attr_accessor :
|
|
44
|
-
|
|
45
|
-
# Server-minted unique payment identifier.
|
|
46
|
-
attr_accessor :payment_intent_id
|
|
47
|
-
|
|
48
|
-
# The version of the policy that generated the decision.
|
|
49
|
-
attr_accessor :policy_version
|
|
50
|
-
|
|
51
|
-
# The version of the model that generated the decision.
|
|
52
|
-
attr_accessor :model_version
|
|
34
|
+
attr_accessor :breakdown
|
|
53
35
|
|
|
54
|
-
|
|
55
|
-
attr_accessor :ttl_seconds
|
|
36
|
+
attr_accessor :policy
|
|
56
37
|
|
|
57
38
|
class EnumAttributeValidator
|
|
58
39
|
attr_reader :datatype
|
|
@@ -79,20 +60,13 @@ module AlogramPayRisk
|
|
|
79
60
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
80
61
|
def self.attribute_map
|
|
81
62
|
{
|
|
82
|
-
:'
|
|
63
|
+
:'id' => :'id',
|
|
83
64
|
:'decision' => :'decision',
|
|
84
65
|
:'decision_at' => :'decisionAt',
|
|
85
66
|
:'risk_score' => :'riskScore',
|
|
86
|
-
:'decision_score' => :'decisionScore',
|
|
87
|
-
:'fraud_score' => :'fraudScore',
|
|
88
|
-
:'breakdown' => :'breakdown',
|
|
89
|
-
:'reason_codes' => :'reasonCodes',
|
|
90
67
|
:'reasons' => :'reasons',
|
|
91
|
-
:'
|
|
92
|
-
:'
|
|
93
|
-
:'policy_version' => :'policyVersion',
|
|
94
|
-
:'model_version' => :'modelVersion',
|
|
95
|
-
:'ttl_seconds' => :'ttlSeconds'
|
|
68
|
+
:'breakdown' => :'breakdown',
|
|
69
|
+
:'policy' => :'policy'
|
|
96
70
|
}
|
|
97
71
|
end
|
|
98
72
|
|
|
@@ -109,20 +83,13 @@ module AlogramPayRisk
|
|
|
109
83
|
# Attribute type mapping.
|
|
110
84
|
def self.openapi_types
|
|
111
85
|
{
|
|
112
|
-
:'
|
|
86
|
+
:'id' => :'String',
|
|
113
87
|
:'decision' => :'String',
|
|
114
88
|
:'decision_at' => :'String',
|
|
115
89
|
:'risk_score' => :'Float',
|
|
116
|
-
:'decision_score' => :'Float',
|
|
117
|
-
:'fraud_score' => :'FraudScore',
|
|
118
|
-
:'breakdown' => :'RiskBreakdown',
|
|
119
|
-
:'reason_codes' => :'Array<String>',
|
|
120
90
|
:'reasons' => :'Array<ReasonDetail>',
|
|
121
|
-
:'
|
|
122
|
-
:'
|
|
123
|
-
:'policy_version' => :'String',
|
|
124
|
-
:'model_version' => :'String',
|
|
125
|
-
:'ttl_seconds' => :'Integer'
|
|
91
|
+
:'breakdown' => :'RiskBreakdown',
|
|
92
|
+
:'policy' => :'DecisionResponsePolicy'
|
|
126
93
|
}
|
|
127
94
|
end
|
|
128
95
|
|
|
@@ -148,10 +115,10 @@ module AlogramPayRisk
|
|
|
148
115
|
h[k.to_sym] = v
|
|
149
116
|
}
|
|
150
117
|
|
|
151
|
-
if attributes.key?(:'
|
|
152
|
-
self.
|
|
118
|
+
if attributes.key?(:'id')
|
|
119
|
+
self.id = attributes[:'id']
|
|
153
120
|
else
|
|
154
|
-
self.
|
|
121
|
+
self.id = nil
|
|
155
122
|
end
|
|
156
123
|
|
|
157
124
|
if attributes.key?(:'decision')
|
|
@@ -172,52 +139,18 @@ module AlogramPayRisk
|
|
|
172
139
|
self.risk_score = nil
|
|
173
140
|
end
|
|
174
141
|
|
|
175
|
-
if attributes.key?(:'decision_score')
|
|
176
|
-
self.decision_score = attributes[:'decision_score']
|
|
177
|
-
else
|
|
178
|
-
self.decision_score = nil
|
|
179
|
-
end
|
|
180
|
-
|
|
181
|
-
if attributes.key?(:'fraud_score')
|
|
182
|
-
self.fraud_score = attributes[:'fraud_score']
|
|
183
|
-
end
|
|
184
|
-
|
|
185
|
-
if attributes.key?(:'breakdown')
|
|
186
|
-
self.breakdown = attributes[:'breakdown']
|
|
187
|
-
end
|
|
188
|
-
|
|
189
|
-
if attributes.key?(:'reason_codes')
|
|
190
|
-
if (value = attributes[:'reason_codes']).is_a?(Array)
|
|
191
|
-
self.reason_codes = value
|
|
192
|
-
end
|
|
193
|
-
end
|
|
194
|
-
|
|
195
142
|
if attributes.key?(:'reasons')
|
|
196
143
|
if (value = attributes[:'reasons']).is_a?(Array)
|
|
197
144
|
self.reasons = value
|
|
198
145
|
end
|
|
199
146
|
end
|
|
200
147
|
|
|
201
|
-
if attributes.key?(:'
|
|
202
|
-
|
|
203
|
-
self.actions = value
|
|
204
|
-
end
|
|
205
|
-
end
|
|
206
|
-
|
|
207
|
-
if attributes.key?(:'payment_intent_id')
|
|
208
|
-
self.payment_intent_id = attributes[:'payment_intent_id']
|
|
209
|
-
end
|
|
210
|
-
|
|
211
|
-
if attributes.key?(:'policy_version')
|
|
212
|
-
self.policy_version = attributes[:'policy_version']
|
|
213
|
-
end
|
|
214
|
-
|
|
215
|
-
if attributes.key?(:'model_version')
|
|
216
|
-
self.model_version = attributes[:'model_version']
|
|
148
|
+
if attributes.key?(:'breakdown')
|
|
149
|
+
self.breakdown = attributes[:'breakdown']
|
|
217
150
|
end
|
|
218
151
|
|
|
219
|
-
if attributes.key?(:'
|
|
220
|
-
self.
|
|
152
|
+
if attributes.key?(:'policy')
|
|
153
|
+
self.policy = attributes[:'policy']
|
|
221
154
|
end
|
|
222
155
|
end
|
|
223
156
|
|
|
@@ -226,21 +159,8 @@ module AlogramPayRisk
|
|
|
226
159
|
def list_invalid_properties
|
|
227
160
|
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
228
161
|
invalid_properties = Array.new
|
|
229
|
-
if @
|
|
230
|
-
invalid_properties.push('invalid value for "
|
|
231
|
-
end
|
|
232
|
-
|
|
233
|
-
if @assessment_id.to_s.length > 64
|
|
234
|
-
invalid_properties.push('invalid value for "assessment_id", the character length must be smaller than or equal to 64.')
|
|
235
|
-
end
|
|
236
|
-
|
|
237
|
-
if @assessment_id.to_s.length < 8
|
|
238
|
-
invalid_properties.push('invalid value for "assessment_id", the character length must be greater than or equal to 8.')
|
|
239
|
-
end
|
|
240
|
-
|
|
241
|
-
pattern = Regexp.new(/^[a-zA-Z0-9\-_]+$/)
|
|
242
|
-
if @assessment_id !~ pattern
|
|
243
|
-
invalid_properties.push("invalid value for \"assessment_id\", must conform to the pattern #{pattern}.")
|
|
162
|
+
if @id.nil?
|
|
163
|
+
invalid_properties.push('invalid value for "id", id cannot be nil.')
|
|
244
164
|
end
|
|
245
165
|
|
|
246
166
|
if @decision.nil?
|
|
@@ -268,35 +188,6 @@ module AlogramPayRisk
|
|
|
268
188
|
invalid_properties.push('invalid value for "risk_score", must be greater than or equal to 0.0.')
|
|
269
189
|
end
|
|
270
190
|
|
|
271
|
-
if @decision_score.nil?
|
|
272
|
-
invalid_properties.push('invalid value for "decision_score", decision_score cannot be nil.')
|
|
273
|
-
end
|
|
274
|
-
|
|
275
|
-
if @decision_score > 1.0
|
|
276
|
-
invalid_properties.push('invalid value for "decision_score", must be smaller than or equal to 1.0.')
|
|
277
|
-
end
|
|
278
|
-
|
|
279
|
-
if @decision_score < 0.0
|
|
280
|
-
invalid_properties.push('invalid value for "decision_score", must be greater than or equal to 0.0.')
|
|
281
|
-
end
|
|
282
|
-
|
|
283
|
-
if !@payment_intent_id.nil? && @payment_intent_id.to_s.length > 35
|
|
284
|
-
invalid_properties.push('invalid value for "payment_intent_id", the character length must be smaller than or equal to 35.')
|
|
285
|
-
end
|
|
286
|
-
|
|
287
|
-
if !@payment_intent_id.nil? && @payment_intent_id.to_s.length < 35
|
|
288
|
-
invalid_properties.push('invalid value for "payment_intent_id", the character length must be greater than or equal to 35.')
|
|
289
|
-
end
|
|
290
|
-
|
|
291
|
-
pattern = Regexp.new(/^pi_[a-f0-9]{32}$/)
|
|
292
|
-
if !@payment_intent_id.nil? && @payment_intent_id !~ pattern
|
|
293
|
-
invalid_properties.push("invalid value for \"payment_intent_id\", must conform to the pattern #{pattern}.")
|
|
294
|
-
end
|
|
295
|
-
|
|
296
|
-
if !@ttl_seconds.nil? && @ttl_seconds < 0
|
|
297
|
-
invalid_properties.push('invalid value for "ttl_seconds", must be greater than or equal to 0.')
|
|
298
|
-
end
|
|
299
|
-
|
|
300
191
|
invalid_properties
|
|
301
192
|
end
|
|
302
193
|
|
|
@@ -304,10 +195,7 @@ module AlogramPayRisk
|
|
|
304
195
|
# @return true if the model is valid
|
|
305
196
|
def valid?
|
|
306
197
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
307
|
-
return false if @
|
|
308
|
-
return false if @assessment_id.to_s.length > 64
|
|
309
|
-
return false if @assessment_id.to_s.length < 8
|
|
310
|
-
return false if @assessment_id !~ Regexp.new(/^[a-zA-Z0-9\-_]+$/)
|
|
198
|
+
return false if @id.nil?
|
|
311
199
|
return false if @decision.nil?
|
|
312
200
|
decision_validator = EnumAttributeValidator.new('String', ["approve", "review", "decline", "step_up"])
|
|
313
201
|
return false unless decision_validator.valid?(@decision)
|
|
@@ -316,36 +204,17 @@ module AlogramPayRisk
|
|
|
316
204
|
return false if @risk_score.nil?
|
|
317
205
|
return false if @risk_score > 1.0
|
|
318
206
|
return false if @risk_score < 0.0
|
|
319
|
-
return false if @decision_score.nil?
|
|
320
|
-
return false if @decision_score > 1.0
|
|
321
|
-
return false if @decision_score < 0.0
|
|
322
|
-
return false if !@payment_intent_id.nil? && @payment_intent_id.to_s.length > 35
|
|
323
|
-
return false if !@payment_intent_id.nil? && @payment_intent_id.to_s.length < 35
|
|
324
|
-
return false if !@payment_intent_id.nil? && @payment_intent_id !~ Regexp.new(/^pi_[a-f0-9]{32}$/)
|
|
325
|
-
return false if !@ttl_seconds.nil? && @ttl_seconds < 0
|
|
326
207
|
true
|
|
327
208
|
end
|
|
328
209
|
|
|
329
210
|
# Custom attribute writer method with validation
|
|
330
|
-
# @param [Object]
|
|
331
|
-
def
|
|
332
|
-
if
|
|
333
|
-
fail ArgumentError, '
|
|
334
|
-
end
|
|
335
|
-
if assessment_id.to_s.length > 64
|
|
336
|
-
fail ArgumentError, 'invalid value for "assessment_id", the character length must be smaller than or equal to 64.'
|
|
337
|
-
end
|
|
338
|
-
|
|
339
|
-
if assessment_id.to_s.length < 8
|
|
340
|
-
fail ArgumentError, 'invalid value for "assessment_id", the character length must be greater than or equal to 8.'
|
|
341
|
-
end
|
|
342
|
-
|
|
343
|
-
pattern = Regexp.new(/^[a-zA-Z0-9\-_]+$/)
|
|
344
|
-
if assessment_id !~ pattern
|
|
345
|
-
fail ArgumentError, "invalid value for \"assessment_id\", must conform to the pattern #{pattern}."
|
|
211
|
+
# @param [Object] id Value to be assigned
|
|
212
|
+
def id=(id)
|
|
213
|
+
if id.nil?
|
|
214
|
+
fail ArgumentError, 'id cannot be nil'
|
|
346
215
|
end
|
|
347
216
|
|
|
348
|
-
@
|
|
217
|
+
@id = id
|
|
349
218
|
end
|
|
350
219
|
|
|
351
220
|
# Custom attribute writer method checking allowed values (enum).
|
|
@@ -389,71 +258,18 @@ module AlogramPayRisk
|
|
|
389
258
|
@risk_score = risk_score
|
|
390
259
|
end
|
|
391
260
|
|
|
392
|
-
# Custom attribute writer method with validation
|
|
393
|
-
# @param [Object] decision_score Value to be assigned
|
|
394
|
-
def decision_score=(decision_score)
|
|
395
|
-
if decision_score.nil?
|
|
396
|
-
fail ArgumentError, 'decision_score cannot be nil'
|
|
397
|
-
end
|
|
398
|
-
if decision_score > 1.0
|
|
399
|
-
fail ArgumentError, 'invalid value for "decision_score", must be smaller than or equal to 1.0.'
|
|
400
|
-
end
|
|
401
|
-
|
|
402
|
-
if decision_score < 0.0
|
|
403
|
-
fail ArgumentError, 'invalid value for "decision_score", must be greater than or equal to 0.0.'
|
|
404
|
-
end
|
|
405
|
-
|
|
406
|
-
@decision_score = decision_score
|
|
407
|
-
end
|
|
408
|
-
|
|
409
|
-
# Custom attribute writer method with validation
|
|
410
|
-
# @param [Object] payment_intent_id Value to be assigned
|
|
411
|
-
def payment_intent_id=(payment_intent_id)
|
|
412
|
-
if payment_intent_id.to_s.length > 35
|
|
413
|
-
fail ArgumentError, 'invalid value for "payment_intent_id", the character length must be smaller than or equal to 35.'
|
|
414
|
-
end
|
|
415
|
-
|
|
416
|
-
if payment_intent_id.to_s.length < 35
|
|
417
|
-
fail ArgumentError, 'invalid value for "payment_intent_id", the character length must be greater than or equal to 35.'
|
|
418
|
-
end
|
|
419
|
-
|
|
420
|
-
pattern = Regexp.new(/^pi_[a-f0-9]{32}$/)
|
|
421
|
-
if payment_intent_id !~ pattern
|
|
422
|
-
fail ArgumentError, "invalid value for \"payment_intent_id\", must conform to the pattern #{pattern}."
|
|
423
|
-
end
|
|
424
|
-
|
|
425
|
-
@payment_intent_id = payment_intent_id
|
|
426
|
-
end
|
|
427
|
-
|
|
428
|
-
# Custom attribute writer method with validation
|
|
429
|
-
# @param [Object] ttl_seconds Value to be assigned
|
|
430
|
-
def ttl_seconds=(ttl_seconds)
|
|
431
|
-
if ttl_seconds < 0
|
|
432
|
-
fail ArgumentError, 'invalid value for "ttl_seconds", must be greater than or equal to 0.'
|
|
433
|
-
end
|
|
434
|
-
|
|
435
|
-
@ttl_seconds = ttl_seconds
|
|
436
|
-
end
|
|
437
|
-
|
|
438
261
|
# Checks equality by comparing each attribute.
|
|
439
262
|
# @param [Object] Object to be compared
|
|
440
263
|
def ==(o)
|
|
441
264
|
return true if self.equal?(o)
|
|
442
265
|
self.class == o.class &&
|
|
443
|
-
|
|
266
|
+
id == o.id &&
|
|
444
267
|
decision == o.decision &&
|
|
445
268
|
decision_at == o.decision_at &&
|
|
446
269
|
risk_score == o.risk_score &&
|
|
447
|
-
decision_score == o.decision_score &&
|
|
448
|
-
fraud_score == o.fraud_score &&
|
|
449
|
-
breakdown == o.breakdown &&
|
|
450
|
-
reason_codes == o.reason_codes &&
|
|
451
270
|
reasons == o.reasons &&
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
policy_version == o.policy_version &&
|
|
455
|
-
model_version == o.model_version &&
|
|
456
|
-
ttl_seconds == o.ttl_seconds
|
|
271
|
+
breakdown == o.breakdown &&
|
|
272
|
+
policy == o.policy
|
|
457
273
|
end
|
|
458
274
|
|
|
459
275
|
# @see the `==` method
|
|
@@ -465,7 +281,7 @@ module AlogramPayRisk
|
|
|
465
281
|
# Calculates hash code according to all attributes.
|
|
466
282
|
# @return [Integer] Hash code
|
|
467
283
|
def hash
|
|
468
|
-
[
|
|
284
|
+
[id, decision, decision_at, risk_score, reasons, breakdown, policy].hash
|
|
469
285
|
end
|
|
470
286
|
|
|
471
287
|
# Builds the object from hash
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Alogram PayRisk Engine
|
|
3
|
+
|
|
4
|
+
#Alogram PayRisk is an AI-native decision engine built for the speed and complexity of the modern commerce era. In a high-velocity world where AI-driven threats evolve in milliseconds, Alogram provides the real-time adaptability and forensic transparency needed to protect your ecosystem with total confidence. We solve the challenge of balancing frictionless growth with regulatory explainability, delivering instant, intelligent risk orchestration at enterprise scale. --- ## Licensing & Terms Our client libraries and API specifications are open-source under the **Apache License 2.0** to ensure seamless integration into your tech stack. Use of the Alogram PayRisk API service is proprietary and governed by our [Terms of Service](https://alogram.ai/#tos) and your specific **Enterprise Agreement**, if applicable. To access the service, you must have: * A valid Alogram API Key. * An active subscription or signed Master Service Agreement. Unauthorized use, including automated scraping or reverse engineering of the scoring engine, is strictly prohibited. --- ## Support & Traceability Every Alogram API response includes a unique **`x-trace-id`** header. Please include this ID when contacting [packages@alogram.ai](mailto:packages@alogram.ai) regarding specific transactions or errors. --- ## Specification The authoritative OpenAPI specification for this version is available for download: **[Download openapi.yaml](https://developers.alogram.ai/openapi.yaml)** | **[Download openapi.json](https://developers.alogram.ai/openapi.json)**
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 0.3.0
|
|
7
|
+
Contact: packages@alogram.ai
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.15.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module AlogramPayRisk
|
|
17
|
+
# Structured policy metadata and context active during transaction evaluation.
|
|
18
|
+
class DecisionResponsePolicy < ApiModelBase
|
|
19
|
+
# The unique identifier of the active policy.
|
|
20
|
+
attr_accessor :id
|
|
21
|
+
|
|
22
|
+
# The name/version of the ruleset configuration.
|
|
23
|
+
attr_accessor :rule_set
|
|
24
|
+
|
|
25
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
26
|
+
def self.attribute_map
|
|
27
|
+
{
|
|
28
|
+
:'id' => :'id',
|
|
29
|
+
:'rule_set' => :'ruleSet'
|
|
30
|
+
}
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
# Returns attribute mapping this model knows about
|
|
34
|
+
def self.acceptable_attribute_map
|
|
35
|
+
attribute_map
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
# Returns all the JSON keys this model knows about
|
|
39
|
+
def self.acceptable_attributes
|
|
40
|
+
acceptable_attribute_map.values
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
# Attribute type mapping.
|
|
44
|
+
def self.openapi_types
|
|
45
|
+
{
|
|
46
|
+
:'id' => :'String',
|
|
47
|
+
:'rule_set' => :'String'
|
|
48
|
+
}
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
# List of attributes with nullable: true
|
|
52
|
+
def self.openapi_nullable
|
|
53
|
+
Set.new([
|
|
54
|
+
])
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
# Initializes the object
|
|
58
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
59
|
+
def initialize(attributes = {})
|
|
60
|
+
if (!attributes.is_a?(Hash))
|
|
61
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `AlogramPayRisk::DecisionResponsePolicy` initialize method"
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
65
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
66
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
67
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
68
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `AlogramPayRisk::DecisionResponsePolicy`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
69
|
+
end
|
|
70
|
+
h[k.to_sym] = v
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
if attributes.key?(:'id')
|
|
74
|
+
self.id = attributes[:'id']
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
if attributes.key?(:'rule_set')
|
|
78
|
+
self.rule_set = attributes[:'rule_set']
|
|
79
|
+
end
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
83
|
+
# @return Array for valid properties with the reasons
|
|
84
|
+
def list_invalid_properties
|
|
85
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
86
|
+
invalid_properties = Array.new
|
|
87
|
+
invalid_properties
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
# Check to see if the all the properties in the model are valid
|
|
91
|
+
# @return true if the model is valid
|
|
92
|
+
def valid?
|
|
93
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
94
|
+
true
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
# Checks equality by comparing each attribute.
|
|
98
|
+
# @param [Object] Object to be compared
|
|
99
|
+
def ==(o)
|
|
100
|
+
return true if self.equal?(o)
|
|
101
|
+
self.class == o.class &&
|
|
102
|
+
id == o.id &&
|
|
103
|
+
rule_set == o.rule_set
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
# @see the `==` method
|
|
107
|
+
# @param [Object] Object to be compared
|
|
108
|
+
def eql?(o)
|
|
109
|
+
self == o
|
|
110
|
+
end
|
|
111
|
+
|
|
112
|
+
# Calculates hash code according to all attributes.
|
|
113
|
+
# @return [Integer] Hash code
|
|
114
|
+
def hash
|
|
115
|
+
[id, rule_set].hash
|
|
116
|
+
end
|
|
117
|
+
|
|
118
|
+
# Builds the object from hash
|
|
119
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
120
|
+
# @return [Object] Returns the model itself
|
|
121
|
+
def self.build_from_hash(attributes)
|
|
122
|
+
return nil unless attributes.is_a?(Hash)
|
|
123
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
124
|
+
transformed_hash = {}
|
|
125
|
+
openapi_types.each_pair do |key, type|
|
|
126
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
127
|
+
transformed_hash["#{key}"] = nil
|
|
128
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
129
|
+
# check to ensure the input is an array given that the attribute
|
|
130
|
+
# is documented as an array but the input is not
|
|
131
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
132
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
133
|
+
end
|
|
134
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
135
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
136
|
+
end
|
|
137
|
+
end
|
|
138
|
+
new(transformed_hash)
|
|
139
|
+
end
|
|
140
|
+
|
|
141
|
+
# Returns the object in the form of hash
|
|
142
|
+
# @return [Hash] Returns the object in the form of hash
|
|
143
|
+
def to_hash
|
|
144
|
+
hash = {}
|
|
145
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
146
|
+
value = self.send(attr)
|
|
147
|
+
if value.nil?
|
|
148
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
149
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
150
|
+
end
|
|
151
|
+
|
|
152
|
+
hash[param] = _to_hash(value)
|
|
153
|
+
end
|
|
154
|
+
hash
|
|
155
|
+
end
|
|
156
|
+
|
|
157
|
+
end
|
|
158
|
+
|
|
159
|
+
end
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
#Alogram PayRisk is an AI-native decision engine built for the speed and complexity of the modern commerce era. In a high-velocity world where AI-driven threats evolve in milliseconds, Alogram provides the real-time adaptability and forensic transparency needed to protect your ecosystem with total confidence. We solve the challenge of balancing frictionless growth with regulatory explainability, delivering instant, intelligent risk orchestration at enterprise scale. --- ## Licensing & Terms Our client libraries and API specifications are open-source under the **Apache License 2.0** to ensure seamless integration into your tech stack. Use of the Alogram PayRisk API service is proprietary and governed by our [Terms of Service](https://alogram.ai/#tos) and your specific **Enterprise Agreement**, if applicable. To access the service, you must have: * A valid Alogram API Key. * An active subscription or signed Master Service Agreement. Unauthorized use, including automated scraping or reverse engineering of the scoring engine, is strictly prohibited. --- ## Support & Traceability Every Alogram API response includes a unique **`x-trace-id`** header. Please include this ID when contacting [packages@alogram.ai](mailto:packages@alogram.ai) regarding specific transactions or errors. --- ## Specification The authoritative OpenAPI specification for this version is available for download: **[Download openapi.yaml](https://developers.alogram.ai/openapi.yaml)** | **[Download openapi.json](https://developers.alogram.ai/openapi.json)**
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 0.
|
|
6
|
+
The version of the OpenAPI document: 0.3.0
|
|
7
7
|
Contact: packages@alogram.ai
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.15.0
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
#Alogram PayRisk is an AI-native decision engine built for the speed and complexity of the modern commerce era. In a high-velocity world where AI-driven threats evolve in milliseconds, Alogram provides the real-time adaptability and forensic transparency needed to protect your ecosystem with total confidence. We solve the challenge of balancing frictionless growth with regulatory explainability, delivering instant, intelligent risk orchestration at enterprise scale. --- ## Licensing & Terms Our client libraries and API specifications are open-source under the **Apache License 2.0** to ensure seamless integration into your tech stack. Use of the Alogram PayRisk API service is proprietary and governed by our [Terms of Service](https://alogram.ai/#tos) and your specific **Enterprise Agreement**, if applicable. To access the service, you must have: * A valid Alogram API Key. * An active subscription or signed Master Service Agreement. Unauthorized use, including automated scraping or reverse engineering of the scoring engine, is strictly prohibited. --- ## Support & Traceability Every Alogram API response includes a unique **`x-trace-id`** header. Please include this ID when contacting [packages@alogram.ai](mailto:packages@alogram.ai) regarding specific transactions or errors. --- ## Specification The authoritative OpenAPI specification for this version is available for download: **[Download openapi.yaml](https://developers.alogram.ai/openapi.yaml)** | **[Download openapi.json](https://developers.alogram.ai/openapi.json)**
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 0.
|
|
6
|
+
The version of the OpenAPI document: 0.3.0
|
|
7
7
|
Contact: packages@alogram.ai
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.15.0
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
#Alogram PayRisk is an AI-native decision engine built for the speed and complexity of the modern commerce era. In a high-velocity world where AI-driven threats evolve in milliseconds, Alogram provides the real-time adaptability and forensic transparency needed to protect your ecosystem with total confidence. We solve the challenge of balancing frictionless growth with regulatory explainability, delivering instant, intelligent risk orchestration at enterprise scale. --- ## Licensing & Terms Our client libraries and API specifications are open-source under the **Apache License 2.0** to ensure seamless integration into your tech stack. Use of the Alogram PayRisk API service is proprietary and governed by our [Terms of Service](https://alogram.ai/#tos) and your specific **Enterprise Agreement**, if applicable. To access the service, you must have: * A valid Alogram API Key. * An active subscription or signed Master Service Agreement. Unauthorized use, including automated scraping or reverse engineering of the scoring engine, is strictly prohibited. --- ## Support & Traceability Every Alogram API response includes a unique **`x-trace-id`** header. Please include this ID when contacting [packages@alogram.ai](mailto:packages@alogram.ai) regarding specific transactions or errors. --- ## Specification The authoritative OpenAPI specification for this version is available for download: **[Download openapi.yaml](https://developers.alogram.ai/openapi.yaml)** | **[Download openapi.json](https://developers.alogram.ai/openapi.json)**
|
|
5
5
|
|
|
6
|
-
The version of the OpenAPI document: 0.
|
|
6
|
+
The version of the OpenAPI document: 0.3.0
|
|
7
7
|
Contact: packages@alogram.ai
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
9
|
Generator version: 7.15.0
|
|
@@ -28,6 +28,8 @@ module AlogramPayRisk
|
|
|
28
28
|
# Canonical ID for a Tenant Operator (staff/automation) holding membership in the platform. Opaque, immutable, lowercase. Supports \"mid_\" slugs (Legacy) or \"op_\" hex (Preferred).
|
|
29
29
|
attr_accessor :operator_id
|
|
30
30
|
|
|
31
|
+
attr_accessor :operator_type
|
|
32
|
+
|
|
31
33
|
attr_accessor :auth
|
|
32
34
|
|
|
33
35
|
# Canonical ID for a marketplace product edition or billing SKU. Always follows the Fortress-36 (sku_ + 32 hex) format.
|
|
@@ -62,6 +64,28 @@ module AlogramPayRisk
|
|
|
62
64
|
# Normalized+lowercased billing address hash (e.g., sha256).
|
|
63
65
|
attr_accessor :billing_address_hash
|
|
64
66
|
|
|
67
|
+
class EnumAttributeValidator
|
|
68
|
+
attr_reader :datatype
|
|
69
|
+
attr_reader :allowable_values
|
|
70
|
+
|
|
71
|
+
def initialize(datatype, allowable_values)
|
|
72
|
+
@allowable_values = allowable_values.map do |value|
|
|
73
|
+
case datatype.to_s
|
|
74
|
+
when /Integer/i
|
|
75
|
+
value.to_i
|
|
76
|
+
when /Float/i
|
|
77
|
+
value.to_f
|
|
78
|
+
else
|
|
79
|
+
value
|
|
80
|
+
end
|
|
81
|
+
end
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
def valid?(value)
|
|
85
|
+
!value || allowable_values.include?(value)
|
|
86
|
+
end
|
|
87
|
+
end
|
|
88
|
+
|
|
65
89
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
66
90
|
def self.attribute_map
|
|
67
91
|
{
|
|
@@ -69,6 +93,7 @@ module AlogramPayRisk
|
|
|
69
93
|
:'client_id' => :'clientId',
|
|
70
94
|
:'end_customer_id' => :'endCustomerId',
|
|
71
95
|
:'operator_id' => :'operatorId',
|
|
96
|
+
:'operator_type' => :'operatorType',
|
|
72
97
|
:'auth' => :'auth',
|
|
73
98
|
:'sku_id' => :'skuId',
|
|
74
99
|
:'sku_handle' => :'skuHandle',
|
|
@@ -101,6 +126,7 @@ module AlogramPayRisk
|
|
|
101
126
|
:'client_id' => :'String',
|
|
102
127
|
:'end_customer_id' => :'String',
|
|
103
128
|
:'operator_id' => :'String',
|
|
129
|
+
:'operator_type' => :'OperatorType',
|
|
104
130
|
:'auth' => :'AuthContext',
|
|
105
131
|
:'sku_id' => :'String',
|
|
106
132
|
:'sku_handle' => :'String',
|
|
@@ -154,6 +180,10 @@ module AlogramPayRisk
|
|
|
154
180
|
self.operator_id = attributes[:'operator_id']
|
|
155
181
|
end
|
|
156
182
|
|
|
183
|
+
if attributes.key?(:'operator_type')
|
|
184
|
+
self.operator_type = attributes[:'operator_type']
|
|
185
|
+
end
|
|
186
|
+
|
|
157
187
|
if attributes.key?(:'auth')
|
|
158
188
|
self.auth = attributes[:'auth']
|
|
159
189
|
end
|
|
@@ -255,7 +285,7 @@ module AlogramPayRisk
|
|
|
255
285
|
invalid_properties.push('invalid value for "operator_id", the character length must be greater than or equal to 5.')
|
|
256
286
|
end
|
|
257
287
|
|
|
258
|
-
pattern = Regexp.new(/^(mid_[a-z0-9_-]{2,96}|op_[a-f0-9]{32})$/)
|
|
288
|
+
pattern = Regexp.new(/^(mid_[a-z0-9_-]{2,96}|op_([a-f0-9]{32}|system|[a-z0-9_-]{2,64}))$/)
|
|
259
289
|
if !@operator_id.nil? && @operator_id !~ pattern
|
|
260
290
|
invalid_properties.push("invalid value for \"operator_id\", must conform to the pattern #{pattern}.")
|
|
261
291
|
end
|
|
@@ -376,7 +406,7 @@ module AlogramPayRisk
|
|
|
376
406
|
return false if !@end_customer_id.nil? && @end_customer_id !~ Regexp.new(/^(ecid_[a-z0-9\-_]{2,96}|cus_[a-f0-9]{32})$/)
|
|
377
407
|
return false if !@operator_id.nil? && @operator_id.to_s.length > 100
|
|
378
408
|
return false if !@operator_id.nil? && @operator_id.to_s.length < 5
|
|
379
|
-
return false if !@operator_id.nil? && @operator_id !~ Regexp.new(/^(mid_[a-z0-9_-]{2,96}|op_[a-f0-9]{32})$/)
|
|
409
|
+
return false if !@operator_id.nil? && @operator_id !~ Regexp.new(/^(mid_[a-z0-9_-]{2,96}|op_([a-f0-9]{32}|system|[a-z0-9_-]{2,64}))$/)
|
|
380
410
|
return false if !@sku_id.nil? && @sku_id.to_s.length > 37
|
|
381
411
|
return false if !@sku_id.nil? && @sku_id.to_s.length < 36
|
|
382
412
|
return false if !@sku_id.nil? && @sku_id !~ Regexp.new(/^sku_[a-f0-9]{32}$/)
|
|
@@ -470,7 +500,7 @@ module AlogramPayRisk
|
|
|
470
500
|
fail ArgumentError, 'invalid value for "operator_id", the character length must be greater than or equal to 5.'
|
|
471
501
|
end
|
|
472
502
|
|
|
473
|
-
pattern = Regexp.new(/^(mid_[a-z0-9_-]{2,96}|op_[a-f0-9]{32})$/)
|
|
503
|
+
pattern = Regexp.new(/^(mid_[a-z0-9_-]{2,96}|op_([a-f0-9]{32}|system|[a-z0-9_-]{2,64}))$/)
|
|
474
504
|
if operator_id !~ pattern
|
|
475
505
|
fail ArgumentError, "invalid value for \"operator_id\", must conform to the pattern #{pattern}."
|
|
476
506
|
end
|
|
@@ -645,6 +675,7 @@ module AlogramPayRisk
|
|
|
645
675
|
client_id == o.client_id &&
|
|
646
676
|
end_customer_id == o.end_customer_id &&
|
|
647
677
|
operator_id == o.operator_id &&
|
|
678
|
+
operator_type == o.operator_type &&
|
|
648
679
|
auth == o.auth &&
|
|
649
680
|
sku_id == o.sku_id &&
|
|
650
681
|
sku_handle == o.sku_handle &&
|
|
@@ -668,7 +699,7 @@ module AlogramPayRisk
|
|
|
668
699
|
# Calculates hash code according to all attributes.
|
|
669
700
|
# @return [Integer] Hash code
|
|
670
701
|
def hash
|
|
671
|
-
[tenant_id, client_id, end_customer_id, operator_id, auth, sku_id, sku_handle, payment_instrument_id, device_id, session_id, agent, email_hash, email_domain_hash, phone_hash, shipping_address_hash, billing_address_hash].hash
|
|
702
|
+
[tenant_id, client_id, end_customer_id, operator_id, operator_type, auth, sku_id, sku_handle, payment_instrument_id, device_id, session_id, agent, email_hash, email_domain_hash, phone_hash, shipping_address_hash, billing_address_hash].hash
|
|
672
703
|
end
|
|
673
704
|
|
|
674
705
|
# Builds the object from hash
|