alogram_payrisk 0.2.21 → 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.
Files changed (234) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +2 -2
  3. data/README.md +2 -2
  4. data/RELEASE.json +4 -4
  5. data/alogram_payrisk.gemspec +1 -1
  6. data/lib/alogram_payrisk/api/forensic_data_api.rb +19 -19
  7. data/lib/alogram_payrisk/api/risk_scoring_api.rb +28 -28
  8. data/lib/alogram_payrisk/api/roadmap_preview_api.rb +153 -55
  9. data/lib/alogram_payrisk/api/signal_intelligence_api.rb +55 -55
  10. data/lib/alogram_payrisk/api/system_api.rb +1 -1
  11. data/lib/alogram_payrisk/api_client.rb +1 -1
  12. data/lib/alogram_payrisk/api_error.rb +1 -1
  13. data/lib/alogram_payrisk/api_model_base.rb +1 -1
  14. data/lib/alogram_payrisk/configuration.rb +1 -1
  15. data/lib/alogram_payrisk/models/account.rb +1 -1
  16. data/lib/alogram_payrisk/models/account_check_request.rb +1 -1
  17. data/lib/alogram_payrisk/models/agent_manifest.rb +1 -1
  18. data/lib/alogram_payrisk/models/agent_provider.rb +1 -1
  19. data/lib/alogram_payrisk/models/auth_context.rb +1 -1
  20. data/lib/alogram_payrisk/models/avs_result_enum.rb +1 -1
  21. data/lib/alogram_payrisk/models/bank_transfer.rb +1 -1
  22. data/lib/alogram_payrisk/models/card.rb +1 -1
  23. data/lib/alogram_payrisk/models/card_network_enum.rb +1 -1
  24. data/lib/alogram_payrisk/models/category_signal.rb +1 -1
  25. data/lib/alogram_payrisk/models/channel_enum.rb +1 -1
  26. data/lib/alogram_payrisk/models/check_request.rb +1 -1
  27. data/lib/alogram_payrisk/models/confidence_enum.rb +1 -1
  28. data/lib/alogram_payrisk/models/crypto.rb +1 -1
  29. data/lib/alogram_payrisk/models/cvv_result_enum.rb +1 -1
  30. data/lib/alogram_payrisk/models/decision_resolution_request.rb +310 -0
  31. data/lib/alogram_payrisk/models/decision_resolution_request_analyst.rb +216 -0
  32. data/lib/alogram_payrisk/models/decision_resolution_response.rb +219 -0
  33. data/lib/alogram_payrisk/models/decision_response.rb +32 -216
  34. data/lib/alogram_payrisk/models/decision_response_policy.rb +159 -0
  35. data/lib/alogram_payrisk/models/device_info.rb +1 -1
  36. data/lib/alogram_payrisk/models/discount_code.rb +1 -1
  37. data/lib/alogram_payrisk/models/entity_ids.rb +36 -5
  38. data/lib/alogram_payrisk/models/entry_method_enum.rb +1 -1
  39. data/lib/alogram_payrisk/models/external_assessment.rb +1 -1
  40. data/lib/alogram_payrisk/models/fraud_score.rb +1 -1
  41. data/lib/alogram_payrisk/models/identity.rb +1 -1
  42. data/lib/alogram_payrisk/models/ingest_payment_event202_response.rb +1 -1
  43. data/lib/alogram_payrisk/models/integrity.rb +1 -1
  44. data/lib/alogram_payrisk/models/interaction.rb +1 -1
  45. data/lib/alogram_payrisk/models/interaction_type_enum.rb +1 -1
  46. data/lib/alogram_payrisk/models/invoice.rb +1 -1
  47. data/lib/alogram_payrisk/models/ip_info.rb +1 -1
  48. data/lib/alogram_payrisk/models/kyc_check_request.rb +1 -1
  49. data/lib/alogram_payrisk/models/kyc_payload.rb +1 -1
  50. data/lib/alogram_payrisk/models/merchant_context.rb +1 -1
  51. data/lib/alogram_payrisk/models/operator_type.rb +42 -0
  52. data/lib/alogram_payrisk/models/order_context.rb +1 -1
  53. data/lib/alogram_payrisk/models/payer_type_enum.rb +1 -1
  54. data/lib/alogram_payrisk/models/payment_authorization_outcome.rb +1 -1
  55. data/lib/alogram_payrisk/models/payment_capture_outcome.rb +1 -1
  56. data/lib/alogram_payrisk/models/payment_card_type_enum.rb +1 -1
  57. data/lib/alogram_payrisk/models/payment_chargeback.rb +1 -1
  58. data/lib/alogram_payrisk/models/payment_chargeback_outcome.rb +1 -1
  59. data/lib/alogram_payrisk/models/payment_dispute_outcome.rb +1 -1
  60. data/lib/alogram_payrisk/models/payment_event.rb +1 -1
  61. data/lib/alogram_payrisk/models/payment_event_type.rb +1 -1
  62. data/lib/alogram_payrisk/models/payment_method.rb +1 -1
  63. data/lib/alogram_payrisk/models/payment_outcome.rb +1 -1
  64. data/lib/alogram_payrisk/models/payment_realtime_type_enum.rb +1 -1
  65. data/lib/alogram_payrisk/models/payment_refund_outcome.rb +1 -1
  66. data/lib/alogram_payrisk/models/payment_wallet_type_enum.rb +1 -1
  67. data/lib/alogram_payrisk/models/postal_address.rb +1 -1
  68. data/lib/alogram_payrisk/models/problem.rb +1 -1
  69. data/lib/alogram_payrisk/models/purchase.rb +1 -1
  70. data/lib/alogram_payrisk/models/purchase_initiator_enum.rb +1 -1
  71. data/lib/alogram_payrisk/models/purchase_sequence_enum.rb +1 -1
  72. data/lib/alogram_payrisk/models/purchase_usage_enum.rb +1 -1
  73. data/lib/alogram_payrisk/models/realtime.rb +1 -1
  74. data/lib/alogram_payrisk/models/reason_detail.rb +15 -5
  75. data/lib/alogram_payrisk/models/risk_breakdown.rb +1 -1
  76. data/lib/alogram_payrisk/models/risk_category_enum.rb +1 -1
  77. data/lib/alogram_payrisk/models/risk_level_enum.rb +1 -1
  78. data/lib/alogram_payrisk/models/sca_method_enum.rb +1 -1
  79. data/lib/alogram_payrisk/models/score_record.rb +19 -117
  80. data/lib/alogram_payrisk/models/scores_success_response.rb +1 -1
  81. data/lib/alogram_payrisk/models/signals_account_variant.rb +1 -1
  82. data/lib/alogram_payrisk/models/signals_interaction_variant.rb +1 -1
  83. data/lib/alogram_payrisk/models/signals_request.rb +1 -1
  84. data/lib/alogram_payrisk/models/stored_credential_context.rb +1 -1
  85. data/lib/alogram_payrisk/models/three_ds_data.rb +1 -1
  86. data/lib/alogram_payrisk/models/wallet.rb +1 -1
  87. data/lib/alogram_payrisk/version.rb +2 -2
  88. data/lib/alogram_payrisk.rb +6 -1
  89. data/spec/api/forensic_data_api_spec.rb +3 -3
  90. data/spec/api/risk_scoring_api_spec.rb +4 -4
  91. data/spec/api/roadmap_preview_api_spec.rb +22 -7
  92. data/spec/api/signal_intelligence_api_spec.rb +7 -7
  93. data/spec/api/system_api_spec.rb +1 -1
  94. data/spec/models/account_check_request_spec.rb +1 -1
  95. data/spec/models/account_spec.rb +1 -1
  96. data/spec/models/agent_manifest_spec.rb +1 -1
  97. data/spec/models/agent_provider_spec.rb +1 -1
  98. data/spec/models/auth_context_spec.rb +1 -1
  99. data/spec/models/avs_result_enum_spec.rb +1 -1
  100. data/spec/models/bank_transfer_spec.rb +1 -1
  101. data/spec/models/card_network_enum_spec.rb +1 -1
  102. data/spec/models/card_spec.rb +1 -1
  103. data/spec/models/category_signal_spec.rb +1 -1
  104. data/spec/models/channel_enum_spec.rb +1 -1
  105. data/spec/models/check_request_spec.rb +1 -1
  106. data/spec/models/confidence_enum_spec.rb +1 -1
  107. data/spec/models/crypto_spec.rb +1 -1
  108. data/spec/models/cvv_result_enum_spec.rb +1 -1
  109. data/spec/models/decision_resolution_request_analyst_spec.rb +46 -0
  110. data/spec/models/decision_resolution_request_spec.rb +78 -0
  111. data/spec/models/decision_resolution_response_spec.rb +48 -0
  112. data/spec/models/decision_response_policy_spec.rb +42 -0
  113. data/spec/models/decision_response_spec.rb +4 -50
  114. data/spec/models/device_info_spec.rb +1 -1
  115. data/spec/models/discount_code_spec.rb +1 -1
  116. data/spec/models/entity_ids_spec.rb +7 -1
  117. data/spec/models/entry_method_enum_spec.rb +1 -1
  118. data/spec/models/external_assessment_spec.rb +1 -1
  119. data/spec/models/fraud_score_spec.rb +1 -1
  120. data/spec/models/identity_spec.rb +1 -1
  121. data/spec/models/ingest_payment_event202_response_spec.rb +1 -1
  122. data/spec/models/integrity_spec.rb +1 -1
  123. data/spec/models/interaction_spec.rb +1 -1
  124. data/spec/models/interaction_type_enum_spec.rb +1 -1
  125. data/spec/models/invoice_spec.rb +1 -1
  126. data/spec/models/ip_info_spec.rb +1 -1
  127. data/spec/models/kyc_check_request_spec.rb +1 -1
  128. data/spec/models/kyc_payload_spec.rb +1 -1
  129. data/spec/models/merchant_context_spec.rb +1 -1
  130. data/spec/models/operator_type_spec.rb +30 -0
  131. data/spec/models/order_context_spec.rb +1 -1
  132. data/spec/models/payer_type_enum_spec.rb +1 -1
  133. data/spec/models/payment_authorization_outcome_spec.rb +1 -1
  134. data/spec/models/payment_capture_outcome_spec.rb +1 -1
  135. data/spec/models/payment_card_type_enum_spec.rb +1 -1
  136. data/spec/models/payment_chargeback_outcome_spec.rb +1 -1
  137. data/spec/models/payment_chargeback_spec.rb +1 -1
  138. data/spec/models/payment_dispute_outcome_spec.rb +1 -1
  139. data/spec/models/payment_event_spec.rb +1 -1
  140. data/spec/models/payment_event_type_spec.rb +1 -1
  141. data/spec/models/payment_method_spec.rb +1 -1
  142. data/spec/models/payment_outcome_spec.rb +1 -1
  143. data/spec/models/payment_realtime_type_enum_spec.rb +1 -1
  144. data/spec/models/payment_refund_outcome_spec.rb +1 -1
  145. data/spec/models/payment_wallet_type_enum_spec.rb +1 -1
  146. data/spec/models/postal_address_spec.rb +1 -1
  147. data/spec/models/problem_spec.rb +1 -1
  148. data/spec/models/purchase_initiator_enum_spec.rb +1 -1
  149. data/spec/models/purchase_sequence_enum_spec.rb +1 -1
  150. data/spec/models/purchase_spec.rb +1 -1
  151. data/spec/models/purchase_usage_enum_spec.rb +1 -1
  152. data/spec/models/realtime_spec.rb +1 -1
  153. data/spec/models/reason_detail_spec.rb +7 -1
  154. data/spec/models/risk_breakdown_spec.rb +1 -1
  155. data/spec/models/risk_category_enum_spec.rb +1 -1
  156. data/spec/models/risk_level_enum_spec.rb +1 -1
  157. data/spec/models/sca_method_enum_spec.rb +1 -1
  158. data/spec/models/score_record_spec.rb +2 -20
  159. data/spec/models/scores_success_response_spec.rb +1 -1
  160. data/spec/models/signals_account_variant_spec.rb +1 -1
  161. data/spec/models/signals_interaction_variant_spec.rb +1 -1
  162. data/spec/models/signals_request_spec.rb +1 -1
  163. data/spec/models/stored_credential_context_spec.rb +1 -1
  164. data/spec/models/three_ds_data_spec.rb +1 -1
  165. data/spec/models/wallet_spec.rb +1 -1
  166. data/spec/spec_helper.rb +1 -1
  167. data/vendor/bundle/ruby/3.3.0/cache/psych-5.4.0.gem +0 -0
  168. data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/byebug-13.0.0/gem_make.out +5 -5
  169. data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/date-3.5.1/gem_make.out +5 -5
  170. data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/io-console-0.8.2/gem_make.out +5 -5
  171. data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/jaro_winkler-1.5.6/gem_make.out +5 -5
  172. data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/{psych-5.3.1 → psych-5.4.0}/gem_make.out +10 -10
  173. data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/{psych-5.3.1 → psych-5.4.0}/psych.so +0 -0
  174. data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/racc-1.8.1/gem_make.out +5 -5
  175. data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/stringio-3.2.0/gem_make.out +5 -5
  176. data/vendor/bundle/ruby/3.3.0/gems/{psych-5.3.1 → psych-5.4.0}/README.md +2 -2
  177. data/vendor/bundle/ruby/3.3.0/gems/{psych-5.3.1 → psych-5.4.0}/ext/psych/psych_parser.c +14 -3
  178. data/vendor/bundle/ruby/3.3.0/gems/{psych-5.3.1 → psych-5.4.0}/lib/psych/versions.rb +1 -1
  179. data/vendor/bundle/ruby/3.3.0/gems/{psych-5.3.1 → psych-5.4.0}/lib/psych.so +0 -0
  180. data/vendor/bundle/ruby/3.3.0/specifications/{psych-5.3.1.gemspec → psych-5.4.0.gemspec} +2 -2
  181. metadata +77 -62
  182. data/vendor/bundle/ruby/3.3.0/cache/psych-5.3.1.gem +0 -0
  183. /data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/{psych-5.3.1 → psych-5.4.0}/gem.build_complete +0 -0
  184. /data/vendor/bundle/ruby/3.3.0/extensions/x86_64-linux/3.3.0/{psych-5.3.1 → psych-5.4.0}/mkmf.log +0 -0
  185. /data/vendor/bundle/ruby/3.3.0/gems/{psych-5.3.1 → psych-5.4.0}/CONTRIBUTING.md +0 -0
  186. /data/vendor/bundle/ruby/3.3.0/gems/{psych-5.3.1 → psych-5.4.0}/LICENSE +0 -0
  187. /data/vendor/bundle/ruby/3.3.0/gems/{psych-5.3.1 → psych-5.4.0}/ext/psych/Makefile +0 -0
  188. /data/vendor/bundle/ruby/3.3.0/gems/{psych-5.3.1 → psych-5.4.0}/ext/psych/depend +0 -0
  189. /data/vendor/bundle/ruby/3.3.0/gems/{psych-5.3.1 → psych-5.4.0}/ext/psych/extconf.rb +0 -0
  190. /data/vendor/bundle/ruby/3.3.0/gems/{psych-5.3.1 → psych-5.4.0}/ext/psych/psych.c +0 -0
  191. /data/vendor/bundle/ruby/3.3.0/gems/{psych-5.3.1 → psych-5.4.0}/ext/psych/psych.h +0 -0
  192. /data/vendor/bundle/ruby/3.3.0/gems/{psych-5.3.1 → psych-5.4.0}/ext/psych/psych_emitter.c +0 -0
  193. /data/vendor/bundle/ruby/3.3.0/gems/{psych-5.3.1 → psych-5.4.0}/ext/psych/psych_emitter.h +0 -0
  194. /data/vendor/bundle/ruby/3.3.0/gems/{psych-5.3.1 → psych-5.4.0}/ext/psych/psych_parser.h +0 -0
  195. /data/vendor/bundle/ruby/3.3.0/gems/{psych-5.3.1 → psych-5.4.0}/ext/psych/psych_to_ruby.c +0 -0
  196. /data/vendor/bundle/ruby/3.3.0/gems/{psych-5.3.1 → psych-5.4.0}/ext/psych/psych_to_ruby.h +0 -0
  197. /data/vendor/bundle/ruby/3.3.0/gems/{psych-5.3.1 → psych-5.4.0}/ext/psych/psych_yaml_tree.c +0 -0
  198. /data/vendor/bundle/ruby/3.3.0/gems/{psych-5.3.1 → psych-5.4.0}/ext/psych/psych_yaml_tree.h +0 -0
  199. /data/vendor/bundle/ruby/3.3.0/gems/{psych-5.3.1 → psych-5.4.0}/lib/psych/class_loader.rb +0 -0
  200. /data/vendor/bundle/ruby/3.3.0/gems/{psych-5.3.1 → psych-5.4.0}/lib/psych/coder.rb +0 -0
  201. /data/vendor/bundle/ruby/3.3.0/gems/{psych-5.3.1 → psych-5.4.0}/lib/psych/core_ext.rb +0 -0
  202. /data/vendor/bundle/ruby/3.3.0/gems/{psych-5.3.1 → psych-5.4.0}/lib/psych/exception.rb +0 -0
  203. /data/vendor/bundle/ruby/3.3.0/gems/{psych-5.3.1 → psych-5.4.0}/lib/psych/handler.rb +0 -0
  204. /data/vendor/bundle/ruby/3.3.0/gems/{psych-5.3.1 → psych-5.4.0}/lib/psych/handlers/document_stream.rb +0 -0
  205. /data/vendor/bundle/ruby/3.3.0/gems/{psych-5.3.1 → psych-5.4.0}/lib/psych/handlers/recorder.rb +0 -0
  206. /data/vendor/bundle/ruby/3.3.0/gems/{psych-5.3.1 → psych-5.4.0}/lib/psych/json/ruby_events.rb +0 -0
  207. /data/vendor/bundle/ruby/3.3.0/gems/{psych-5.3.1 → psych-5.4.0}/lib/psych/json/stream.rb +0 -0
  208. /data/vendor/bundle/ruby/3.3.0/gems/{psych-5.3.1 → psych-5.4.0}/lib/psych/json/tree_builder.rb +0 -0
  209. /data/vendor/bundle/ruby/3.3.0/gems/{psych-5.3.1 → psych-5.4.0}/lib/psych/json/yaml_events.rb +0 -0
  210. /data/vendor/bundle/ruby/3.3.0/gems/{psych-5.3.1 → psych-5.4.0}/lib/psych/nodes/alias.rb +0 -0
  211. /data/vendor/bundle/ruby/3.3.0/gems/{psych-5.3.1 → psych-5.4.0}/lib/psych/nodes/document.rb +0 -0
  212. /data/vendor/bundle/ruby/3.3.0/gems/{psych-5.3.1 → psych-5.4.0}/lib/psych/nodes/mapping.rb +0 -0
  213. /data/vendor/bundle/ruby/3.3.0/gems/{psych-5.3.1 → psych-5.4.0}/lib/psych/nodes/node.rb +0 -0
  214. /data/vendor/bundle/ruby/3.3.0/gems/{psych-5.3.1 → psych-5.4.0}/lib/psych/nodes/scalar.rb +0 -0
  215. /data/vendor/bundle/ruby/3.3.0/gems/{psych-5.3.1 → psych-5.4.0}/lib/psych/nodes/sequence.rb +0 -0
  216. /data/vendor/bundle/ruby/3.3.0/gems/{psych-5.3.1 → psych-5.4.0}/lib/psych/nodes/stream.rb +0 -0
  217. /data/vendor/bundle/ruby/3.3.0/gems/{psych-5.3.1 → psych-5.4.0}/lib/psych/nodes.rb +0 -0
  218. /data/vendor/bundle/ruby/3.3.0/gems/{psych-5.3.1 → psych-5.4.0}/lib/psych/omap.rb +0 -0
  219. /data/vendor/bundle/ruby/3.3.0/gems/{psych-5.3.1 → psych-5.4.0}/lib/psych/parser.rb +0 -0
  220. /data/vendor/bundle/ruby/3.3.0/gems/{psych-5.3.1 → psych-5.4.0}/lib/psych/scalar_scanner.rb +0 -0
  221. /data/vendor/bundle/ruby/3.3.0/gems/{psych-5.3.1 → psych-5.4.0}/lib/psych/set.rb +0 -0
  222. /data/vendor/bundle/ruby/3.3.0/gems/{psych-5.3.1 → psych-5.4.0}/lib/psych/stream.rb +0 -0
  223. /data/vendor/bundle/ruby/3.3.0/gems/{psych-5.3.1 → psych-5.4.0}/lib/psych/streaming.rb +0 -0
  224. /data/vendor/bundle/ruby/3.3.0/gems/{psych-5.3.1 → psych-5.4.0}/lib/psych/syntax_error.rb +0 -0
  225. /data/vendor/bundle/ruby/3.3.0/gems/{psych-5.3.1 → psych-5.4.0}/lib/psych/tree_builder.rb +0 -0
  226. /data/vendor/bundle/ruby/3.3.0/gems/{psych-5.3.1 → psych-5.4.0}/lib/psych/visitors/depth_first.rb +0 -0
  227. /data/vendor/bundle/ruby/3.3.0/gems/{psych-5.3.1 → psych-5.4.0}/lib/psych/visitors/emitter.rb +0 -0
  228. /data/vendor/bundle/ruby/3.3.0/gems/{psych-5.3.1 → psych-5.4.0}/lib/psych/visitors/json_tree.rb +0 -0
  229. /data/vendor/bundle/ruby/3.3.0/gems/{psych-5.3.1 → psych-5.4.0}/lib/psych/visitors/to_ruby.rb +0 -0
  230. /data/vendor/bundle/ruby/3.3.0/gems/{psych-5.3.1 → psych-5.4.0}/lib/psych/visitors/visitor.rb +0 -0
  231. /data/vendor/bundle/ruby/3.3.0/gems/{psych-5.3.1 → psych-5.4.0}/lib/psych/visitors/yaml_tree.rb +0 -0
  232. /data/vendor/bundle/ruby/3.3.0/gems/{psych-5.3.1 → psych-5.4.0}/lib/psych/visitors.rb +0 -0
  233. /data/vendor/bundle/ruby/3.3.0/gems/{psych-5.3.1 → psych-5.4.0}/lib/psych/y.rb +0 -0
  234. /data/vendor/bundle/ruby/3.3.0/gems/{psych-5.3.1 → psych-5.4.0}/lib/psych.rb +0 -0
@@ -0,0 +1,219 @@
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
+ class DecisionResolutionResponse < ApiModelBase
18
+ # Indicates if the decision was successfully resolved and persisted.
19
+ attr_accessor :ok
20
+
21
+ # Operational summary message.
22
+ attr_accessor :message
23
+
24
+ # ISO-8601 timestamp of resolution completion.
25
+ attr_accessor :resolved_at
26
+
27
+ # Attribute mapping from ruby-style variable name to JSON key.
28
+ def self.attribute_map
29
+ {
30
+ :'ok' => :'ok',
31
+ :'message' => :'message',
32
+ :'resolved_at' => :'resolvedAt'
33
+ }
34
+ end
35
+
36
+ # Returns attribute mapping this model knows about
37
+ def self.acceptable_attribute_map
38
+ attribute_map
39
+ end
40
+
41
+ # Returns all the JSON keys this model knows about
42
+ def self.acceptable_attributes
43
+ acceptable_attribute_map.values
44
+ end
45
+
46
+ # Attribute type mapping.
47
+ def self.openapi_types
48
+ {
49
+ :'ok' => :'Boolean',
50
+ :'message' => :'String',
51
+ :'resolved_at' => :'Time'
52
+ }
53
+ end
54
+
55
+ # List of attributes with nullable: true
56
+ def self.openapi_nullable
57
+ Set.new([
58
+ ])
59
+ end
60
+
61
+ # Initializes the object
62
+ # @param [Hash] attributes Model attributes in the form of hash
63
+ def initialize(attributes = {})
64
+ if (!attributes.is_a?(Hash))
65
+ fail ArgumentError, "The input argument (attributes) must be a hash in `AlogramPayRisk::DecisionResolutionResponse` initialize method"
66
+ end
67
+
68
+ # check to see if the attribute exists and convert string to symbol for hash key
69
+ acceptable_attribute_map = self.class.acceptable_attribute_map
70
+ attributes = attributes.each_with_object({}) { |(k, v), h|
71
+ if (!acceptable_attribute_map.key?(k.to_sym))
72
+ fail ArgumentError, "`#{k}` is not a valid attribute in `AlogramPayRisk::DecisionResolutionResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
73
+ end
74
+ h[k.to_sym] = v
75
+ }
76
+
77
+ if attributes.key?(:'ok')
78
+ self.ok = attributes[:'ok']
79
+ else
80
+ self.ok = nil
81
+ end
82
+
83
+ if attributes.key?(:'message')
84
+ self.message = attributes[:'message']
85
+ else
86
+ self.message = nil
87
+ end
88
+
89
+ if attributes.key?(:'resolved_at')
90
+ self.resolved_at = attributes[:'resolved_at']
91
+ else
92
+ self.resolved_at = nil
93
+ end
94
+ end
95
+
96
+ # Show invalid properties with the reasons. Usually used together with valid?
97
+ # @return Array for valid properties with the reasons
98
+ def list_invalid_properties
99
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
100
+ invalid_properties = Array.new
101
+ if @ok.nil?
102
+ invalid_properties.push('invalid value for "ok", ok cannot be nil.')
103
+ end
104
+
105
+ if @message.nil?
106
+ invalid_properties.push('invalid value for "message", message cannot be nil.')
107
+ end
108
+
109
+ if @resolved_at.nil?
110
+ invalid_properties.push('invalid value for "resolved_at", resolved_at cannot be nil.')
111
+ end
112
+
113
+ invalid_properties
114
+ end
115
+
116
+ # Check to see if the all the properties in the model are valid
117
+ # @return true if the model is valid
118
+ def valid?
119
+ warn '[DEPRECATED] the `valid?` method is obsolete'
120
+ return false if @ok.nil?
121
+ return false if @message.nil?
122
+ return false if @resolved_at.nil?
123
+ true
124
+ end
125
+
126
+ # Custom attribute writer method with validation
127
+ # @param [Object] ok Value to be assigned
128
+ def ok=(ok)
129
+ if ok.nil?
130
+ fail ArgumentError, 'ok cannot be nil'
131
+ end
132
+
133
+ @ok = ok
134
+ end
135
+
136
+ # Custom attribute writer method with validation
137
+ # @param [Object] message Value to be assigned
138
+ def message=(message)
139
+ if message.nil?
140
+ fail ArgumentError, 'message cannot be nil'
141
+ end
142
+
143
+ @message = message
144
+ end
145
+
146
+ # Custom attribute writer method with validation
147
+ # @param [Object] resolved_at Value to be assigned
148
+ def resolved_at=(resolved_at)
149
+ if resolved_at.nil?
150
+ fail ArgumentError, 'resolved_at cannot be nil'
151
+ end
152
+
153
+ @resolved_at = resolved_at
154
+ end
155
+
156
+ # Checks equality by comparing each attribute.
157
+ # @param [Object] Object to be compared
158
+ def ==(o)
159
+ return true if self.equal?(o)
160
+ self.class == o.class &&
161
+ ok == o.ok &&
162
+ message == o.message &&
163
+ resolved_at == o.resolved_at
164
+ end
165
+
166
+ # @see the `==` method
167
+ # @param [Object] Object to be compared
168
+ def eql?(o)
169
+ self == o
170
+ end
171
+
172
+ # Calculates hash code according to all attributes.
173
+ # @return [Integer] Hash code
174
+ def hash
175
+ [ok, message, resolved_at].hash
176
+ end
177
+
178
+ # Builds the object from hash
179
+ # @param [Hash] attributes Model attributes in the form of hash
180
+ # @return [Object] Returns the model itself
181
+ def self.build_from_hash(attributes)
182
+ return nil unless attributes.is_a?(Hash)
183
+ attributes = attributes.transform_keys(&:to_sym)
184
+ transformed_hash = {}
185
+ openapi_types.each_pair do |key, type|
186
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
187
+ transformed_hash["#{key}"] = nil
188
+ elsif type =~ /\AArray<(.*)>/i
189
+ # check to ensure the input is an array given that the attribute
190
+ # is documented as an array but the input is not
191
+ if attributes[attribute_map[key]].is_a?(Array)
192
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
193
+ end
194
+ elsif !attributes[attribute_map[key]].nil?
195
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
196
+ end
197
+ end
198
+ new(transformed_hash)
199
+ end
200
+
201
+ # Returns the object in the form of hash
202
+ # @return [Hash] Returns the object in the form of hash
203
+ def to_hash
204
+ hash = {}
205
+ self.class.attribute_map.each_pair do |attr, param|
206
+ value = self.send(attr)
207
+ if value.nil?
208
+ is_nullable = self.class.openapi_nullable.include?(attr)
209
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
210
+ end
211
+
212
+ hash[param] = _to_hash(value)
213
+ end
214
+ hash
215
+ end
216
+
217
+ end
218
+
219
+ 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.2.21
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
- # Universal decision identifier. For purchases, equals paymentIntentId.
20
- attr_accessor :assessment_id
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
- # DEPRECATED: Use decisionScore instead. Current blended risk score.
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 :actions
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
- # Time to live for the decision in seconds.
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
- :'assessment_id' => :'assessmentId',
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
- :'actions' => :'actions',
92
- :'payment_intent_id' => :'paymentIntentId',
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
- :'assessment_id' => :'String',
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
- :'actions' => :'Array<String>',
122
- :'payment_intent_id' => :'String',
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?(:'assessment_id')
152
- self.assessment_id = attributes[:'assessment_id']
118
+ if attributes.key?(:'id')
119
+ self.id = attributes[:'id']
153
120
  else
154
- self.assessment_id = nil
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?(:'actions')
202
- if (value = attributes[:'actions']).is_a?(Array)
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?(:'ttl_seconds')
220
- self.ttl_seconds = attributes[:'ttl_seconds']
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 @assessment_id.nil?
230
- invalid_properties.push('invalid value for "assessment_id", assessment_id cannot be nil.')
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 @assessment_id.nil?
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] assessment_id Value to be assigned
331
- def assessment_id=(assessment_id)
332
- if assessment_id.nil?
333
- fail ArgumentError, 'assessment_id cannot be nil'
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
- @assessment_id = assessment_id
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
- assessment_id == o.assessment_id &&
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
- actions == o.actions &&
453
- payment_intent_id == o.payment_intent_id &&
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
- [assessment_id, decision, decision_at, risk_score, decision_score, fraud_score, breakdown, reason_codes, reasons, actions, payment_intent_id, policy_version, model_version, ttl_seconds].hash
284
+ [id, decision, decision_at, risk_score, reasons, breakdown, policy].hash
469
285
  end
470
286
 
471
287
  # Builds the object from hash