lithic 0.1.0 → 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 (256) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +51 -0
  3. data/README.md +36 -1
  4. data/lib/lithic/client.rb +9 -10
  5. data/lib/lithic/errors.rb +15 -0
  6. data/lib/lithic/internal/transport/pooled_net_requester.rb +12 -10
  7. data/lib/lithic/internal/util.rb +7 -2
  8. data/lib/lithic/models/account_holder_created_webhook_event.rb +75 -0
  9. data/lib/lithic/models/account_holder_document_updated_webhook_event.rb +191 -0
  10. data/lib/lithic/models/account_holder_updated_webhook_event.rb +702 -0
  11. data/lib/lithic/models/account_holder_verification_webhook_event.rb +69 -0
  12. data/lib/lithic/models/auth_rules/conditional_tokenization_action_parameters.rb +5 -0
  13. data/lib/lithic/models/auth_rules_backtest_report_created_webhook_event.rb +16 -0
  14. data/lib/lithic/models/balance_updated_webhook_event.rb +23 -0
  15. data/lib/lithic/models/book_transfer_retry_params.rb +26 -0
  16. data/lib/lithic/models/book_transfer_transaction_created_webhook_event.rb +18 -0
  17. data/lib/lithic/models/book_transfer_transaction_updated_webhook_event.rb +18 -0
  18. data/lib/lithic/models/card_authorization_approval_request_webhook_event.rb +1032 -0
  19. data/lib/lithic/models/card_converted_webhook_event.rb +24 -0
  20. data/lib/lithic/models/card_created_webhook_event.rb +32 -0
  21. data/lib/lithic/models/card_reissued_webhook_event.rb +24 -0
  22. data/lib/lithic/models/card_renewed_webhook_event.rb +56 -0
  23. data/lib/lithic/models/card_shipped_webhook_event.rb +70 -0
  24. data/lib/lithic/models/card_transaction_enhanced_data_created_webhook_event.rb +16 -0
  25. data/lib/lithic/models/card_transaction_enhanced_data_updated_webhook_event.rb +16 -0
  26. data/lib/lithic/models/card_transaction_updated_webhook_event.rb +16 -0
  27. data/lib/lithic/models/digital_wallet_tokenization_approval_request_webhook_event.rb +253 -0
  28. data/lib/lithic/models/digital_wallet_tokenization_result_webhook_event.rb +145 -0
  29. data/lib/lithic/models/digital_wallet_tokenization_two_factor_authentication_code_sent_webhook_event.rb +100 -0
  30. data/lib/lithic/models/digital_wallet_tokenization_two_factor_authentication_code_webhook_event.rb +108 -0
  31. data/lib/lithic/models/digital_wallet_tokenization_updated_webhook_event.rb +47 -0
  32. data/lib/lithic/models/dispute_evidence_upload_failed_webhook_event.rb +18 -0
  33. data/lib/lithic/models/dispute_transaction_created_webhook_event.rb +18 -0
  34. data/lib/lithic/models/dispute_transaction_updated_webhook_event.rb +18 -0
  35. data/lib/lithic/models/dispute_updated_webhook_event.rb +18 -0
  36. data/lib/lithic/models/external_bank_account_created_webhook_event.rb +16 -0
  37. data/lib/lithic/models/external_bank_account_updated_webhook_event.rb +16 -0
  38. data/lib/lithic/models/external_payment_create_params.rb +15 -1
  39. data/lib/lithic/models/external_payment_created_webhook_event.rb +16 -0
  40. data/lib/lithic/models/external_payment_updated_webhook_event.rb +16 -0
  41. data/lib/lithic/models/financial_account.rb +33 -25
  42. data/lib/lithic/models/financial_account_created_webhook_event.rb +16 -0
  43. data/lib/lithic/models/financial_account_update_status_params.rb +9 -1
  44. data/lib/lithic/models/financial_account_updated_webhook_event.rb +16 -0
  45. data/lib/lithic/models/financial_accounts/loan_tape.rb +52 -3
  46. data/lib/lithic/models/funding_event_created_webhook_event.rb +16 -0
  47. data/lib/lithic/models/internal_transaction_created_webhook_event.rb +16 -0
  48. data/lib/lithic/models/internal_transaction_updated_webhook_event.rb +16 -0
  49. data/lib/lithic/models/loan_tape_created_webhook_event.rb +16 -0
  50. data/lib/lithic/models/loan_tape_updated_webhook_event.rb +16 -0
  51. data/lib/lithic/models/management_operation_create_params.rb +6 -1
  52. data/lib/lithic/models/management_operation_created_webhook_event.rb +16 -0
  53. data/lib/lithic/models/management_operation_updated_webhook_event.rb +16 -0
  54. data/lib/lithic/models/network_total_created_webhook_event.rb +16 -0
  55. data/lib/lithic/models/network_total_updated_webhook_event.rb +16 -0
  56. data/lib/lithic/models/parsed_webhook_event.rb +817 -0
  57. data/lib/lithic/models/payment.rb +10 -1
  58. data/lib/lithic/models/payment_transaction_created_webhook_event.rb +18 -0
  59. data/lib/lithic/models/payment_transaction_updated_webhook_event.rb +18 -0
  60. data/lib/lithic/models/settlement_report_updated_webhook_event.rb +16 -0
  61. data/lib/lithic/models/statements_created_webhook_event.rb +16 -0
  62. data/lib/lithic/models/three_ds_authentication_approval_request_webhook_event.rb +17 -0
  63. data/lib/lithic/models/three_ds_authentication_challenge_webhook_event.rb +89 -0
  64. data/lib/lithic/models/three_ds_authentication_created_webhook_event.rb +18 -0
  65. data/lib/lithic/models/three_ds_authentication_updated_webhook_event.rb +18 -0
  66. data/lib/lithic/models/tokenization_approval_request_webhook_event.rb +249 -0
  67. data/lib/lithic/models/tokenization_decisioning_request_webhook_event.rb +159 -0
  68. data/lib/lithic/models/tokenization_result_webhook_event.rb +141 -0
  69. data/lib/lithic/models/tokenization_two_factor_authentication_code_sent_webhook_event.rb +100 -0
  70. data/lib/lithic/models/tokenization_two_factor_authentication_code_webhook_event.rb +108 -0
  71. data/lib/lithic/models/tokenization_updated_webhook_event.rb +47 -0
  72. data/lib/lithic/models/transaction.rb +2 -0
  73. data/lib/lithic/models/transfer_limit_list_params.rb +22 -0
  74. data/lib/lithic/models/transfer_limits_response.rb +274 -0
  75. data/lib/lithic/models/webhook_parsed_params.rb +14 -0
  76. data/lib/lithic/models.rb +130 -4
  77. data/lib/lithic/resources/book_transfers.rb +27 -0
  78. data/lib/lithic/resources/cards.rb +1 -5
  79. data/lib/lithic/resources/external_payments.rb +13 -1
  80. data/lib/lithic/resources/financial_accounts.rb +3 -1
  81. data/lib/lithic/resources/management_operations.rb +4 -1
  82. data/lib/lithic/resources/transfer_limits.rb +37 -0
  83. data/lib/lithic/resources/webhooks.rb +88 -0
  84. data/lib/lithic/version.rb +1 -1
  85. data/lib/lithic.rb +79 -23
  86. data/rbi/lithic/client.rbi +6 -3
  87. data/rbi/lithic/models/account_holder_created_webhook_event.rbi +149 -0
  88. data/rbi/lithic/models/account_holder_document_updated_webhook_event.rbi +479 -0
  89. data/rbi/lithic/models/account_holder_updated_webhook_event.rbi +1274 -0
  90. data/rbi/lithic/models/account_holder_verification_webhook_event.rbi +143 -0
  91. data/rbi/lithic/models/auth_rules/conditional_tokenization_action_parameters.rbi +11 -0
  92. data/rbi/lithic/models/auth_rules_backtest_report_created_webhook_event.rbi +30 -0
  93. data/rbi/lithic/models/balance_updated_webhook_event.rbi +43 -0
  94. data/rbi/lithic/models/book_transfer_retry_params.rbi +42 -0
  95. data/rbi/lithic/models/book_transfer_transaction_created_webhook_event.rbi +31 -0
  96. data/rbi/lithic/models/book_transfer_transaction_updated_webhook_event.rbi +31 -0
  97. data/rbi/lithic/models/card_authorization_approval_request_webhook_event.rbi +2367 -0
  98. data/rbi/lithic/models/card_converted_webhook_event.rbi +35 -0
  99. data/rbi/lithic/models/card_created_webhook_event.rbi +53 -0
  100. data/rbi/lithic/models/card_reissued_webhook_event.rbi +38 -0
  101. data/rbi/lithic/models/card_renewed_webhook_event.rbi +92 -0
  102. data/rbi/lithic/models/card_shipped_webhook_event.rbi +150 -0
  103. data/rbi/lithic/models/card_transaction_enhanced_data_created_webhook_event.rbi +30 -0
  104. data/rbi/lithic/models/card_transaction_enhanced_data_updated_webhook_event.rbi +30 -0
  105. data/rbi/lithic/models/card_transaction_updated_webhook_event.rbi +30 -0
  106. data/rbi/lithic/models/digital_wallet_token_metadata.rbi +2 -2
  107. data/rbi/lithic/models/digital_wallet_tokenization_approval_request_webhook_event.rbi +548 -0
  108. data/rbi/lithic/models/digital_wallet_tokenization_result_webhook_event.rbi +295 -0
  109. data/rbi/lithic/models/digital_wallet_tokenization_two_factor_authentication_code_sent_webhook_event.rbi +186 -0
  110. data/rbi/lithic/models/digital_wallet_tokenization_two_factor_authentication_code_webhook_event.rbi +194 -0
  111. data/rbi/lithic/models/digital_wallet_tokenization_updated_webhook_event.rbi +73 -0
  112. data/rbi/lithic/models/dispute_evidence_upload_failed_webhook_event.rbi +31 -0
  113. data/rbi/lithic/models/dispute_transaction_created_webhook_event.rbi +31 -0
  114. data/rbi/lithic/models/dispute_transaction_updated_webhook_event.rbi +31 -0
  115. data/rbi/lithic/models/dispute_updated_webhook_event.rbi +28 -0
  116. data/rbi/lithic/models/external_bank_account_created_webhook_event.rbi +30 -0
  117. data/rbi/lithic/models/external_bank_account_updated_webhook_event.rbi +30 -0
  118. data/rbi/lithic/models/external_payment_create_params.rbi +4 -0
  119. data/rbi/lithic/models/external_payment_created_webhook_event.rbi +30 -0
  120. data/rbi/lithic/models/external_payment_updated_webhook_event.rbi +30 -0
  121. data/rbi/lithic/models/financial_account.rbi +62 -54
  122. data/rbi/lithic/models/financial_account_created_webhook_event.rbi +30 -0
  123. data/rbi/lithic/models/financial_account_update_status_params.rbi +11 -0
  124. data/rbi/lithic/models/financial_account_updated_webhook_event.rbi +30 -0
  125. data/rbi/lithic/models/financial_accounts/loan_tape.rbi +93 -4
  126. data/rbi/lithic/models/funding_event_created_webhook_event.rbi +30 -0
  127. data/rbi/lithic/models/internal_transaction.rbi +15 -10
  128. data/rbi/lithic/models/internal_transaction_created_webhook_event.rbi +30 -0
  129. data/rbi/lithic/models/internal_transaction_updated_webhook_event.rbi +30 -0
  130. data/rbi/lithic/models/loan_tape_created_webhook_event.rbi +27 -0
  131. data/rbi/lithic/models/loan_tape_updated_webhook_event.rbi +27 -0
  132. data/rbi/lithic/models/management_operation_create_params.rbi +4 -0
  133. data/rbi/lithic/models/management_operation_created_webhook_event.rbi +30 -0
  134. data/rbi/lithic/models/management_operation_updated_webhook_event.rbi +30 -0
  135. data/rbi/lithic/models/network_total_created_webhook_event.rbi +30 -0
  136. data/rbi/lithic/models/network_total_updated_webhook_event.rbi +30 -0
  137. data/rbi/lithic/models/parsed_webhook_event.rbi +1310 -0
  138. data/rbi/lithic/models/payment.rbi +13 -3
  139. data/rbi/lithic/models/payment_transaction_created_webhook_event.rbi +31 -0
  140. data/rbi/lithic/models/payment_transaction_updated_webhook_event.rbi +31 -0
  141. data/rbi/lithic/models/settlement_report_updated_webhook_event.rbi +30 -0
  142. data/rbi/lithic/models/statements_created_webhook_event.rbi +30 -0
  143. data/rbi/lithic/models/three_ds_authentication_approval_request_webhook_event.rbi +27 -0
  144. data/rbi/lithic/models/three_ds_authentication_challenge_webhook_event.rbi +175 -0
  145. data/rbi/lithic/models/three_ds_authentication_created_webhook_event.rbi +31 -0
  146. data/rbi/lithic/models/three_ds_authentication_updated_webhook_event.rbi +31 -0
  147. data/rbi/lithic/models/tokenization_approval_request_webhook_event.rbi +548 -0
  148. data/rbi/lithic/models/tokenization_decisioning_request_webhook_event.rbi +333 -0
  149. data/rbi/lithic/models/tokenization_result_webhook_event.rbi +295 -0
  150. data/rbi/lithic/models/tokenization_two_factor_authentication_code_sent_webhook_event.rbi +186 -0
  151. data/rbi/lithic/models/tokenization_two_factor_authentication_code_webhook_event.rbi +194 -0
  152. data/rbi/lithic/models/tokenization_updated_webhook_event.rbi +73 -0
  153. data/rbi/lithic/models/transaction.rbi +10 -0
  154. data/rbi/lithic/models/transfer_limit_list_params.rbi +43 -0
  155. data/rbi/lithic/models/transfer_limits_response.rbi +604 -0
  156. data/rbi/lithic/models/webhook_parsed_params.rbi +27 -0
  157. data/rbi/lithic/models.rbi +165 -4
  158. data/rbi/lithic/resources/book_transfers.rbi +18 -0
  159. data/rbi/lithic/resources/cards.rbi +1 -4
  160. data/rbi/lithic/resources/external_payments.rbi +2 -0
  161. data/rbi/lithic/resources/financial_accounts.rbi +3 -0
  162. data/rbi/lithic/resources/management_operations.rbi +2 -0
  163. data/rbi/lithic/resources/transfer_limits.rbi +28 -0
  164. data/rbi/lithic/resources/webhooks.rbi +36 -0
  165. data/sig/lithic/client.rbs +4 -2
  166. data/sig/lithic/models/account_holder_created_webhook_event.rbs +77 -0
  167. data/sig/lithic/models/account_holder_document_updated_webhook_event.rbs +219 -0
  168. data/sig/lithic/models/account_holder_updated_webhook_event.rbs +587 -0
  169. data/sig/lithic/models/account_holder_verification_webhook_event.rbs +69 -0
  170. data/sig/lithic/models/auth_rules/conditional_tokenization_action_parameters.rbs +2 -0
  171. data/sig/lithic/models/auth_rules_backtest_report_created_webhook_event.rbs +20 -0
  172. data/sig/lithic/models/balance_updated_webhook_event.rbs +25 -0
  173. data/sig/lithic/models/book_transfer_retry_params.rbs +23 -0
  174. data/sig/lithic/models/book_transfer_transaction_created_webhook_event.rbs +20 -0
  175. data/sig/lithic/models/book_transfer_transaction_updated_webhook_event.rbs +20 -0
  176. data/sig/lithic/models/card_authorization_approval_request_webhook_event.rbs +886 -0
  177. data/sig/lithic/models/card_converted_webhook_event.rbs +19 -0
  178. data/sig/lithic/models/card_created_webhook_event.rbs +30 -0
  179. data/sig/lithic/models/card_reissued_webhook_event.rbs +21 -0
  180. data/sig/lithic/models/card_renewed_webhook_event.rbs +55 -0
  181. data/sig/lithic/models/card_shipped_webhook_event.rbs +71 -0
  182. data/sig/lithic/models/card_transaction_enhanced_data_created_webhook_event.rbs +20 -0
  183. data/sig/lithic/models/card_transaction_enhanced_data_updated_webhook_event.rbs +20 -0
  184. data/sig/lithic/models/card_transaction_updated_webhook_event.rbs +18 -0
  185. data/sig/lithic/models/digital_wallet_tokenization_approval_request_webhook_event.rbs +223 -0
  186. data/sig/lithic/models/digital_wallet_tokenization_result_webhook_event.rbs +133 -0
  187. data/sig/lithic/models/digital_wallet_tokenization_two_factor_authentication_code_sent_webhook_event.rbs +78 -0
  188. data/sig/lithic/models/digital_wallet_tokenization_two_factor_authentication_code_webhook_event.rbs +83 -0
  189. data/sig/lithic/models/digital_wallet_tokenization_updated_webhook_event.rbs +40 -0
  190. data/sig/lithic/models/dispute_evidence_upload_failed_webhook_event.rbs +18 -0
  191. data/sig/lithic/models/dispute_transaction_created_webhook_event.rbs +18 -0
  192. data/sig/lithic/models/dispute_transaction_updated_webhook_event.rbs +18 -0
  193. data/sig/lithic/models/dispute_updated_webhook_event.rbs +15 -0
  194. data/sig/lithic/models/external_bank_account_created_webhook_event.rbs +18 -0
  195. data/sig/lithic/models/external_bank_account_updated_webhook_event.rbs +18 -0
  196. data/sig/lithic/models/external_payment_created_webhook_event.rbs +18 -0
  197. data/sig/lithic/models/external_payment_updated_webhook_event.rbs +18 -0
  198. data/sig/lithic/models/financial_account.rbs +32 -27
  199. data/sig/lithic/models/financial_account_created_webhook_event.rbs +18 -0
  200. data/sig/lithic/models/financial_account_update_status_params.rbs +8 -1
  201. data/sig/lithic/models/financial_account_updated_webhook_event.rbs +18 -0
  202. data/sig/lithic/models/financial_accounts/loan_tape.rbs +46 -4
  203. data/sig/lithic/models/funding_event_created_webhook_event.rbs +16 -0
  204. data/sig/lithic/models/internal_transaction_created_webhook_event.rbs +18 -0
  205. data/sig/lithic/models/internal_transaction_updated_webhook_event.rbs +18 -0
  206. data/sig/lithic/models/loan_tape_created_webhook_event.rbs +15 -0
  207. data/sig/lithic/models/loan_tape_updated_webhook_event.rbs +15 -0
  208. data/sig/lithic/models/management_operation_created_webhook_event.rbs +18 -0
  209. data/sig/lithic/models/management_operation_updated_webhook_event.rbs +18 -0
  210. data/sig/lithic/models/network_total_created_webhook_event.rbs +16 -0
  211. data/sig/lithic/models/network_total_updated_webhook_event.rbs +16 -0
  212. data/sig/lithic/models/parsed_webhook_event.rbs +641 -0
  213. data/sig/lithic/models/payment.rbs +10 -3
  214. data/sig/lithic/models/payment_transaction_created_webhook_event.rbs +18 -0
  215. data/sig/lithic/models/payment_transaction_updated_webhook_event.rbs +18 -0
  216. data/sig/lithic/models/settlement_report_updated_webhook_event.rbs +18 -0
  217. data/sig/lithic/models/statements_created_webhook_event.rbs +16 -0
  218. data/sig/lithic/models/three_ds_authentication_approval_request_webhook_event.rbs +22 -0
  219. data/sig/lithic/models/three_ds_authentication_challenge_webhook_event.rbs +72 -0
  220. data/sig/lithic/models/three_ds_authentication_created_webhook_event.rbs +18 -0
  221. data/sig/lithic/models/three_ds_authentication_updated_webhook_event.rbs +18 -0
  222. data/sig/lithic/models/tokenization_approval_request_webhook_event.rbs +223 -0
  223. data/sig/lithic/models/tokenization_decisioning_request_webhook_event.rbs +134 -0
  224. data/sig/lithic/models/tokenization_result_webhook_event.rbs +133 -0
  225. data/sig/lithic/models/tokenization_two_factor_authentication_code_sent_webhook_event.rbs +78 -0
  226. data/sig/lithic/models/tokenization_two_factor_authentication_code_webhook_event.rbs +83 -0
  227. data/sig/lithic/models/tokenization_updated_webhook_event.rbs +40 -0
  228. data/sig/lithic/models/transaction.rbs +4 -0
  229. data/sig/lithic/models/transfer_limit_list_params.rbs +22 -0
  230. data/sig/lithic/models/transfer_limits_response.rbs +232 -0
  231. data/sig/lithic/models/webhook_parsed_params.rbs +15 -0
  232. data/sig/lithic/models.rbs +120 -4
  233. data/sig/lithic/resources/book_transfers.rbs +6 -0
  234. data/sig/lithic/resources/cards.rbs +0 -2
  235. data/sig/lithic/resources/financial_accounts.rbs +1 -0
  236. data/sig/lithic/resources/transfer_limits.rbs +12 -0
  237. data/sig/lithic/resources/webhooks.rbs +21 -0
  238. metadata +188 -20
  239. data/lib/lithic/models/aggregate_balance.rb +0 -113
  240. data/lib/lithic/models/aggregate_balance_list_params.rb +0 -35
  241. data/lib/lithic/models/cards/aggregate_balance_list_params.rb +0 -32
  242. data/lib/lithic/models/cards/aggregate_balance_list_response.rb +0 -92
  243. data/lib/lithic/resources/aggregate_balances.rb +0 -38
  244. data/lib/lithic/resources/cards/aggregate_balances.rb +0 -41
  245. data/rbi/lithic/models/aggregate_balance.rbi +0 -164
  246. data/rbi/lithic/models/aggregate_balance_list_params.rbi +0 -104
  247. data/rbi/lithic/models/cards/aggregate_balance_list_params.rbi +0 -62
  248. data/rbi/lithic/models/cards/aggregate_balance_list_response.rbi +0 -115
  249. data/rbi/lithic/resources/aggregate_balances.rbi +0 -28
  250. data/rbi/lithic/resources/cards/aggregate_balances.rbi +0 -35
  251. data/sig/lithic/models/aggregate_balance.rbs +0 -78
  252. data/sig/lithic/models/aggregate_balance_list_params.rbs +0 -43
  253. data/sig/lithic/models/cards/aggregate_balance_list_params.rbs +0 -34
  254. data/sig/lithic/models/cards/aggregate_balance_list_response.rbs +0 -62
  255. data/sig/lithic/resources/aggregate_balances.rbs +0 -12
  256. data/sig/lithic/resources/cards/aggregate_balances.rbs +0 -15
@@ -0,0 +1,2367 @@
1
+ # typed: strong
2
+
3
+ module Lithic
4
+ module Models
5
+ class CardAuthorizationApprovalRequestWebhookEvent < Lithic::Internal::Type::BaseModel
6
+ OrHash =
7
+ T.type_alias do
8
+ T.any(
9
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent,
10
+ Lithic::Internal::AnyHash
11
+ )
12
+ end
13
+
14
+ # The provisional transaction group uuid associated with the authorization
15
+ sig { returns(String) }
16
+ attr_accessor :token
17
+
18
+ # Fee (in cents) assessed by the merchant and paid for by the cardholder. Will be
19
+ # zero if no fee is assessed. Rebates may be transmitted as a negative value to
20
+ # indicate credited fees.
21
+ sig { returns(Integer) }
22
+ attr_accessor :acquirer_fee
23
+
24
+ # Authorization amount of the transaction (in cents), including any acquirer fees.
25
+ # The contents of this field are identical to `authorization_amount`.
26
+ sig { returns(Integer) }
27
+ attr_accessor :amount
28
+
29
+ # The base transaction amount (in cents) plus the acquirer fee field. This is the
30
+ # amount the issuer should authorize against unless the issuer is paying the
31
+ # acquirer fee on behalf of the cardholder.
32
+ sig { returns(Integer) }
33
+ attr_accessor :authorization_amount
34
+
35
+ sig { returns(Lithic::CardAuthorizationApprovalRequestWebhookEvent::Avs) }
36
+ attr_reader :avs
37
+
38
+ sig do
39
+ params(
40
+ avs: Lithic::CardAuthorizationApprovalRequestWebhookEvent::Avs::OrHash
41
+ ).void
42
+ end
43
+ attr_writer :avs
44
+
45
+ # Card object in ASA
46
+ sig do
47
+ returns(Lithic::CardAuthorizationApprovalRequestWebhookEvent::Card)
48
+ end
49
+ attr_reader :card
50
+
51
+ sig do
52
+ params(
53
+ card:
54
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Card::OrHash
55
+ ).void
56
+ end
57
+ attr_writer :card
58
+
59
+ # 3-character alphabetic ISO 4217 code for cardholder's billing currency.
60
+ sig { returns(String) }
61
+ attr_accessor :cardholder_currency
62
+
63
+ # The portion of the transaction requested as cash back by the cardholder, and
64
+ # does not include any acquirer fees. The amount field includes the purchase
65
+ # amount, the requested cash back amount, and any acquirer fees.
66
+ #
67
+ # If no cash back was requested, the value of this field will be 0, and the field
68
+ # will always be present.
69
+ sig { returns(Integer) }
70
+ attr_accessor :cash_amount
71
+
72
+ # Date and time when the transaction first occurred in UTC.
73
+ sig { returns(Time) }
74
+ attr_accessor :created
75
+
76
+ sig { returns(Symbol) }
77
+ attr_accessor :event_type
78
+
79
+ sig { returns(Lithic::Merchant) }
80
+ attr_reader :merchant
81
+
82
+ sig { params(merchant: Lithic::Merchant::OrHash).void }
83
+ attr_writer :merchant
84
+
85
+ # The amount that the merchant will receive, denominated in `merchant_currency`
86
+ # and in the smallest currency unit. Note the amount includes `acquirer_fee`,
87
+ # similar to `authorization_amount`. It will be different from
88
+ # `authorization_amount` if the merchant is taking payment in a different
89
+ # currency.
90
+ sig { returns(Integer) }
91
+ attr_accessor :merchant_amount
92
+
93
+ # 3-character alphabetic ISO 4217 code for the local currency of the transaction.
94
+ sig { returns(String) }
95
+ attr_accessor :merchant_currency
96
+
97
+ # Amount (in cents) of the transaction that has been settled, including any
98
+ # acquirer fees
99
+ sig { returns(Integer) }
100
+ attr_accessor :settled_amount
101
+
102
+ # The type of authorization request that this request is for. Note that
103
+ # `CREDIT_AUTHORIZATION` and `FINANCIAL_CREDIT_AUTHORIZATION` is only available to
104
+ # users with credit decisioning via ASA enabled.
105
+ sig do
106
+ returns(
107
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Status::TaggedSymbol
108
+ )
109
+ end
110
+ attr_accessor :status
111
+
112
+ # The entity that initiated the transaction.
113
+ sig do
114
+ returns(
115
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::TransactionInitiator::TaggedSymbol
116
+ )
117
+ end
118
+ attr_accessor :transaction_initiator
119
+
120
+ sig do
121
+ returns(
122
+ T.nilable(
123
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::AccountType::TaggedSymbol
124
+ )
125
+ )
126
+ end
127
+ attr_reader :account_type
128
+
129
+ sig do
130
+ params(
131
+ account_type:
132
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::AccountType::OrSymbol
133
+ ).void
134
+ end
135
+ attr_writer :account_type
136
+
137
+ sig { returns(T.nilable(Lithic::CardholderAuthentication)) }
138
+ attr_reader :cardholder_authentication
139
+
140
+ sig do
141
+ params(
142
+ cardholder_authentication: Lithic::CardholderAuthentication::OrHash
143
+ ).void
144
+ end
145
+ attr_writer :cardholder_authentication
146
+
147
+ # Deprecated, use `cash_amount`.
148
+ sig { returns(T.nilable(Integer)) }
149
+ attr_reader :cashback
150
+
151
+ sig { params(cashback: Integer).void }
152
+ attr_writer :cashback
153
+
154
+ # If the transaction was requested in a currency other than the settlement
155
+ # currency, this field will be populated to indicate the rate used to translate
156
+ # the merchant_amount to the amount (i.e., `merchant_amount` x `conversion_rate` =
157
+ # `amount`). Note that the `merchant_amount` is in the local currency and the
158
+ # amount is in the settlement currency.
159
+ sig { returns(T.nilable(Float)) }
160
+ attr_reader :conversion_rate
161
+
162
+ sig { params(conversion_rate: Float).void }
163
+ attr_writer :conversion_rate
164
+
165
+ # The event token associated with the authorization. This field is only set for
166
+ # programs enrolled into the beta.
167
+ sig { returns(T.nilable(String)) }
168
+ attr_reader :event_token
169
+
170
+ sig { params(event_token: String).void }
171
+ attr_writer :event_token
172
+
173
+ # Optional Object containing information if the Card is a part of a Fleet managed
174
+ # program
175
+ sig do
176
+ returns(
177
+ T.nilable(
178
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::FleetInfo
179
+ )
180
+ )
181
+ end
182
+ attr_reader :fleet_info
183
+
184
+ sig do
185
+ params(
186
+ fleet_info:
187
+ T.nilable(
188
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::FleetInfo::OrHash
189
+ )
190
+ ).void
191
+ end
192
+ attr_writer :fleet_info
193
+
194
+ # The latest Authorization Challenge that was issued to the cardholder for this
195
+ # merchant.
196
+ sig do
197
+ returns(
198
+ T.nilable(
199
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::LatestChallenge
200
+ )
201
+ )
202
+ end
203
+ attr_reader :latest_challenge
204
+
205
+ sig do
206
+ params(
207
+ latest_challenge:
208
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::LatestChallenge::OrHash
209
+ ).void
210
+ end
211
+ attr_writer :latest_challenge
212
+
213
+ # Card network of the authorization.
214
+ sig do
215
+ returns(
216
+ T.nilable(
217
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Network::TaggedSymbol
218
+ )
219
+ )
220
+ end
221
+ attr_reader :network
222
+
223
+ sig do
224
+ params(
225
+ network:
226
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Network::OrSymbol
227
+ ).void
228
+ end
229
+ attr_writer :network
230
+
231
+ # Network-provided score assessing risk level associated with a given
232
+ # authorization. Scores are on a range of 0-999, with 0 representing the lowest
233
+ # risk and 999 representing the highest risk. For Visa transactions, where the raw
234
+ # score has a range of 0-99, Lithic will normalize the score by multiplying the
235
+ # raw score by 10x.
236
+ sig { returns(T.nilable(Integer)) }
237
+ attr_accessor :network_risk_score
238
+
239
+ # Contains raw data provided by the card network, including attributes that
240
+ # provide further context about the authorization. If populated by the network,
241
+ # data is organized by Lithic and passed through without further modification.
242
+ # Please consult the official network documentation for more details about these
243
+ # values and how to use them. This object is only available to certain programs-
244
+ # contact your Customer Success Manager to discuss enabling access.
245
+ sig do
246
+ returns(
247
+ T.nilable(
248
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::NetworkSpecificData
249
+ )
250
+ )
251
+ end
252
+ attr_reader :network_specific_data
253
+
254
+ sig do
255
+ params(
256
+ network_specific_data:
257
+ T.nilable(
258
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::NetworkSpecificData::OrHash
259
+ )
260
+ ).void
261
+ end
262
+ attr_writer :network_specific_data
263
+
264
+ sig do
265
+ returns(
266
+ T.nilable(Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos)
267
+ )
268
+ end
269
+ attr_reader :pos
270
+
271
+ sig do
272
+ params(
273
+ pos: Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::OrHash
274
+ ).void
275
+ end
276
+ attr_writer :pos
277
+
278
+ sig { returns(T.nilable(Lithic::TokenInfo)) }
279
+ attr_reader :token_info
280
+
281
+ sig { params(token_info: T.nilable(Lithic::TokenInfo::OrHash)).void }
282
+ attr_writer :token_info
283
+
284
+ # Deprecated: approximate time-to-live for the authorization.
285
+ sig { returns(T.nilable(Time)) }
286
+ attr_reader :ttl
287
+
288
+ sig { params(ttl: Time).void }
289
+ attr_writer :ttl
290
+
291
+ sig do
292
+ params(
293
+ token: String,
294
+ acquirer_fee: Integer,
295
+ amount: Integer,
296
+ authorization_amount: Integer,
297
+ avs:
298
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Avs::OrHash,
299
+ card:
300
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Card::OrHash,
301
+ cardholder_currency: String,
302
+ cash_amount: Integer,
303
+ created: Time,
304
+ merchant: Lithic::Merchant::OrHash,
305
+ merchant_amount: Integer,
306
+ merchant_currency: String,
307
+ settled_amount: Integer,
308
+ status:
309
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Status::OrSymbol,
310
+ transaction_initiator:
311
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::TransactionInitiator::OrSymbol,
312
+ account_type:
313
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::AccountType::OrSymbol,
314
+ cardholder_authentication: Lithic::CardholderAuthentication::OrHash,
315
+ cashback: Integer,
316
+ conversion_rate: Float,
317
+ event_token: String,
318
+ fleet_info:
319
+ T.nilable(
320
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::FleetInfo::OrHash
321
+ ),
322
+ latest_challenge:
323
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::LatestChallenge::OrHash,
324
+ network:
325
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Network::OrSymbol,
326
+ network_risk_score: T.nilable(Integer),
327
+ network_specific_data:
328
+ T.nilable(
329
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::NetworkSpecificData::OrHash
330
+ ),
331
+ pos:
332
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::OrHash,
333
+ token_info: T.nilable(Lithic::TokenInfo::OrHash),
334
+ ttl: Time,
335
+ event_type: Symbol
336
+ ).returns(T.attached_class)
337
+ end
338
+ def self.new(
339
+ # The provisional transaction group uuid associated with the authorization
340
+ token:,
341
+ # Fee (in cents) assessed by the merchant and paid for by the cardholder. Will be
342
+ # zero if no fee is assessed. Rebates may be transmitted as a negative value to
343
+ # indicate credited fees.
344
+ acquirer_fee:,
345
+ # Authorization amount of the transaction (in cents), including any acquirer fees.
346
+ # The contents of this field are identical to `authorization_amount`.
347
+ amount:,
348
+ # The base transaction amount (in cents) plus the acquirer fee field. This is the
349
+ # amount the issuer should authorize against unless the issuer is paying the
350
+ # acquirer fee on behalf of the cardholder.
351
+ authorization_amount:,
352
+ avs:,
353
+ # Card object in ASA
354
+ card:,
355
+ # 3-character alphabetic ISO 4217 code for cardholder's billing currency.
356
+ cardholder_currency:,
357
+ # The portion of the transaction requested as cash back by the cardholder, and
358
+ # does not include any acquirer fees. The amount field includes the purchase
359
+ # amount, the requested cash back amount, and any acquirer fees.
360
+ #
361
+ # If no cash back was requested, the value of this field will be 0, and the field
362
+ # will always be present.
363
+ cash_amount:,
364
+ # Date and time when the transaction first occurred in UTC.
365
+ created:,
366
+ merchant:,
367
+ # The amount that the merchant will receive, denominated in `merchant_currency`
368
+ # and in the smallest currency unit. Note the amount includes `acquirer_fee`,
369
+ # similar to `authorization_amount`. It will be different from
370
+ # `authorization_amount` if the merchant is taking payment in a different
371
+ # currency.
372
+ merchant_amount:,
373
+ # 3-character alphabetic ISO 4217 code for the local currency of the transaction.
374
+ merchant_currency:,
375
+ # Amount (in cents) of the transaction that has been settled, including any
376
+ # acquirer fees
377
+ settled_amount:,
378
+ # The type of authorization request that this request is for. Note that
379
+ # `CREDIT_AUTHORIZATION` and `FINANCIAL_CREDIT_AUTHORIZATION` is only available to
380
+ # users with credit decisioning via ASA enabled.
381
+ status:,
382
+ # The entity that initiated the transaction.
383
+ transaction_initiator:,
384
+ account_type: nil,
385
+ cardholder_authentication: nil,
386
+ # Deprecated, use `cash_amount`.
387
+ cashback: nil,
388
+ # If the transaction was requested in a currency other than the settlement
389
+ # currency, this field will be populated to indicate the rate used to translate
390
+ # the merchant_amount to the amount (i.e., `merchant_amount` x `conversion_rate` =
391
+ # `amount`). Note that the `merchant_amount` is in the local currency and the
392
+ # amount is in the settlement currency.
393
+ conversion_rate: nil,
394
+ # The event token associated with the authorization. This field is only set for
395
+ # programs enrolled into the beta.
396
+ event_token: nil,
397
+ # Optional Object containing information if the Card is a part of a Fleet managed
398
+ # program
399
+ fleet_info: nil,
400
+ # The latest Authorization Challenge that was issued to the cardholder for this
401
+ # merchant.
402
+ latest_challenge: nil,
403
+ # Card network of the authorization.
404
+ network: nil,
405
+ # Network-provided score assessing risk level associated with a given
406
+ # authorization. Scores are on a range of 0-999, with 0 representing the lowest
407
+ # risk and 999 representing the highest risk. For Visa transactions, where the raw
408
+ # score has a range of 0-99, Lithic will normalize the score by multiplying the
409
+ # raw score by 10x.
410
+ network_risk_score: nil,
411
+ # Contains raw data provided by the card network, including attributes that
412
+ # provide further context about the authorization. If populated by the network,
413
+ # data is organized by Lithic and passed through without further modification.
414
+ # Please consult the official network documentation for more details about these
415
+ # values and how to use them. This object is only available to certain programs-
416
+ # contact your Customer Success Manager to discuss enabling access.
417
+ network_specific_data: nil,
418
+ pos: nil,
419
+ token_info: nil,
420
+ # Deprecated: approximate time-to-live for the authorization.
421
+ ttl: nil,
422
+ event_type: :"card_authorization.approval_request"
423
+ )
424
+ end
425
+
426
+ sig do
427
+ override.returns(
428
+ {
429
+ token: String,
430
+ acquirer_fee: Integer,
431
+ amount: Integer,
432
+ authorization_amount: Integer,
433
+ avs: Lithic::CardAuthorizationApprovalRequestWebhookEvent::Avs,
434
+ card: Lithic::CardAuthorizationApprovalRequestWebhookEvent::Card,
435
+ cardholder_currency: String,
436
+ cash_amount: Integer,
437
+ created: Time,
438
+ event_type: Symbol,
439
+ merchant: Lithic::Merchant,
440
+ merchant_amount: Integer,
441
+ merchant_currency: String,
442
+ settled_amount: Integer,
443
+ status:
444
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Status::TaggedSymbol,
445
+ transaction_initiator:
446
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::TransactionInitiator::TaggedSymbol,
447
+ account_type:
448
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::AccountType::TaggedSymbol,
449
+ cardholder_authentication: Lithic::CardholderAuthentication,
450
+ cashback: Integer,
451
+ conversion_rate: Float,
452
+ event_token: String,
453
+ fleet_info:
454
+ T.nilable(
455
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::FleetInfo
456
+ ),
457
+ latest_challenge:
458
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::LatestChallenge,
459
+ network:
460
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Network::TaggedSymbol,
461
+ network_risk_score: T.nilable(Integer),
462
+ network_specific_data:
463
+ T.nilable(
464
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::NetworkSpecificData
465
+ ),
466
+ pos: Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos,
467
+ token_info: T.nilable(Lithic::TokenInfo),
468
+ ttl: Time
469
+ }
470
+ )
471
+ end
472
+ def to_hash
473
+ end
474
+
475
+ class Avs < Lithic::Internal::Type::BaseModel
476
+ OrHash =
477
+ T.type_alias do
478
+ T.any(
479
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Avs,
480
+ Lithic::Internal::AnyHash
481
+ )
482
+ end
483
+
484
+ # Cardholder address
485
+ sig { returns(String) }
486
+ attr_accessor :address
487
+
488
+ # Lithic's evaluation result comparing the transaction's address data with the
489
+ # cardholder KYC data if it exists. In the event Lithic does not have any
490
+ # Cardholder KYC data, or the transaction does not contain any address data,
491
+ # NOT_PRESENT will be returned
492
+ sig do
493
+ returns(
494
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Avs::AddressOnFileMatch::TaggedSymbol
495
+ )
496
+ end
497
+ attr_accessor :address_on_file_match
498
+
499
+ # Cardholder ZIP code
500
+ sig { returns(String) }
501
+ attr_accessor :zipcode
502
+
503
+ sig do
504
+ params(
505
+ address: String,
506
+ address_on_file_match:
507
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Avs::AddressOnFileMatch::OrSymbol,
508
+ zipcode: String
509
+ ).returns(T.attached_class)
510
+ end
511
+ def self.new(
512
+ # Cardholder address
513
+ address:,
514
+ # Lithic's evaluation result comparing the transaction's address data with the
515
+ # cardholder KYC data if it exists. In the event Lithic does not have any
516
+ # Cardholder KYC data, or the transaction does not contain any address data,
517
+ # NOT_PRESENT will be returned
518
+ address_on_file_match:,
519
+ # Cardholder ZIP code
520
+ zipcode:
521
+ )
522
+ end
523
+
524
+ sig do
525
+ override.returns(
526
+ {
527
+ address: String,
528
+ address_on_file_match:
529
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Avs::AddressOnFileMatch::TaggedSymbol,
530
+ zipcode: String
531
+ }
532
+ )
533
+ end
534
+ def to_hash
535
+ end
536
+
537
+ # Lithic's evaluation result comparing the transaction's address data with the
538
+ # cardholder KYC data if it exists. In the event Lithic does not have any
539
+ # Cardholder KYC data, or the transaction does not contain any address data,
540
+ # NOT_PRESENT will be returned
541
+ module AddressOnFileMatch
542
+ extend Lithic::Internal::Type::Enum
543
+
544
+ TaggedSymbol =
545
+ T.type_alias do
546
+ T.all(
547
+ Symbol,
548
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Avs::AddressOnFileMatch
549
+ )
550
+ end
551
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
552
+
553
+ MATCH =
554
+ T.let(
555
+ :MATCH,
556
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Avs::AddressOnFileMatch::TaggedSymbol
557
+ )
558
+ MATCH_ADDRESS_ONLY =
559
+ T.let(
560
+ :MATCH_ADDRESS_ONLY,
561
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Avs::AddressOnFileMatch::TaggedSymbol
562
+ )
563
+ MATCH_ZIP_ONLY =
564
+ T.let(
565
+ :MATCH_ZIP_ONLY,
566
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Avs::AddressOnFileMatch::TaggedSymbol
567
+ )
568
+ MISMATCH =
569
+ T.let(
570
+ :MISMATCH,
571
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Avs::AddressOnFileMatch::TaggedSymbol
572
+ )
573
+ NOT_PRESENT =
574
+ T.let(
575
+ :NOT_PRESENT,
576
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Avs::AddressOnFileMatch::TaggedSymbol
577
+ )
578
+
579
+ sig do
580
+ override.returns(
581
+ T::Array[
582
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Avs::AddressOnFileMatch::TaggedSymbol
583
+ ]
584
+ )
585
+ end
586
+ def self.values
587
+ end
588
+ end
589
+ end
590
+
591
+ class Card < Lithic::Internal::Type::BaseModel
592
+ OrHash =
593
+ T.type_alias do
594
+ T.any(
595
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Card,
596
+ Lithic::Internal::AnyHash
597
+ )
598
+ end
599
+
600
+ # Globally unique identifier for the card.
601
+ sig { returns(T.nilable(String)) }
602
+ attr_reader :token
603
+
604
+ sig { params(token: String).void }
605
+ attr_writer :token
606
+
607
+ # Hostname of card’s locked merchant (will be empty if not applicable)
608
+ sig { returns(T.nilable(String)) }
609
+ attr_reader :hostname
610
+
611
+ sig { params(hostname: String).void }
612
+ attr_writer :hostname
613
+
614
+ # Last four digits of the card number
615
+ sig { returns(T.nilable(String)) }
616
+ attr_reader :last_four
617
+
618
+ sig { params(last_four: String).void }
619
+ attr_writer :last_four
620
+
621
+ # Customizable name to identify the card. We recommend against using this field to
622
+ # store JSON data as it can cause unexpected behavior.
623
+ sig { returns(T.nilable(String)) }
624
+ attr_reader :memo
625
+
626
+ sig { params(memo: String).void }
627
+ attr_writer :memo
628
+
629
+ # Amount (in cents) to limit approved authorizations. Purchase requests above the
630
+ # spend limit will be declined (refunds and credits will be approved).
631
+ #
632
+ # Note that while spend limits are enforced based on authorized and settled volume
633
+ # on a card, they are not recommended to be used for balance or
634
+ # reconciliation-level accuracy. Spend limits also cannot block force posted
635
+ # charges (i.e., when a merchant sends a clearing message without a prior
636
+ # authorization).
637
+ sig { returns(T.nilable(Integer)) }
638
+ attr_reader :spend_limit
639
+
640
+ sig { params(spend_limit: Integer).void }
641
+ attr_writer :spend_limit
642
+
643
+ # Note that to support recurring monthly payments, which can occur on different
644
+ # day every month, the time window we consider for MONTHLY velocity starts 6 days
645
+ # after the current calendar date one month prior.
646
+ sig do
647
+ returns(
648
+ T.nilable(
649
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Card::SpendLimitDuration::TaggedSymbol
650
+ )
651
+ )
652
+ end
653
+ attr_reader :spend_limit_duration
654
+
655
+ sig do
656
+ params(
657
+ spend_limit_duration:
658
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Card::SpendLimitDuration::OrSymbol
659
+ ).void
660
+ end
661
+ attr_writer :spend_limit_duration
662
+
663
+ sig do
664
+ returns(
665
+ T.nilable(
666
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Card::State::TaggedSymbol
667
+ )
668
+ )
669
+ end
670
+ attr_reader :state
671
+
672
+ sig do
673
+ params(
674
+ state:
675
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Card::State::OrSymbol
676
+ ).void
677
+ end
678
+ attr_writer :state
679
+
680
+ sig do
681
+ returns(
682
+ T.nilable(
683
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Card::Type::TaggedSymbol
684
+ )
685
+ )
686
+ end
687
+ attr_reader :type
688
+
689
+ sig do
690
+ params(
691
+ type:
692
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Card::Type::OrSymbol
693
+ ).void
694
+ end
695
+ attr_writer :type
696
+
697
+ # Card object in ASA
698
+ sig do
699
+ params(
700
+ token: String,
701
+ hostname: String,
702
+ last_four: String,
703
+ memo: String,
704
+ spend_limit: Integer,
705
+ spend_limit_duration:
706
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Card::SpendLimitDuration::OrSymbol,
707
+ state:
708
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Card::State::OrSymbol,
709
+ type:
710
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Card::Type::OrSymbol
711
+ ).returns(T.attached_class)
712
+ end
713
+ def self.new(
714
+ # Globally unique identifier for the card.
715
+ token: nil,
716
+ # Hostname of card’s locked merchant (will be empty if not applicable)
717
+ hostname: nil,
718
+ # Last four digits of the card number
719
+ last_four: nil,
720
+ # Customizable name to identify the card. We recommend against using this field to
721
+ # store JSON data as it can cause unexpected behavior.
722
+ memo: nil,
723
+ # Amount (in cents) to limit approved authorizations. Purchase requests above the
724
+ # spend limit will be declined (refunds and credits will be approved).
725
+ #
726
+ # Note that while spend limits are enforced based on authorized and settled volume
727
+ # on a card, they are not recommended to be used for balance or
728
+ # reconciliation-level accuracy. Spend limits also cannot block force posted
729
+ # charges (i.e., when a merchant sends a clearing message without a prior
730
+ # authorization).
731
+ spend_limit: nil,
732
+ # Note that to support recurring monthly payments, which can occur on different
733
+ # day every month, the time window we consider for MONTHLY velocity starts 6 days
734
+ # after the current calendar date one month prior.
735
+ spend_limit_duration: nil,
736
+ state: nil,
737
+ type: nil
738
+ )
739
+ end
740
+
741
+ sig do
742
+ override.returns(
743
+ {
744
+ token: String,
745
+ hostname: String,
746
+ last_four: String,
747
+ memo: String,
748
+ spend_limit: Integer,
749
+ spend_limit_duration:
750
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Card::SpendLimitDuration::TaggedSymbol,
751
+ state:
752
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Card::State::TaggedSymbol,
753
+ type:
754
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Card::Type::TaggedSymbol
755
+ }
756
+ )
757
+ end
758
+ def to_hash
759
+ end
760
+
761
+ # Note that to support recurring monthly payments, which can occur on different
762
+ # day every month, the time window we consider for MONTHLY velocity starts 6 days
763
+ # after the current calendar date one month prior.
764
+ module SpendLimitDuration
765
+ extend Lithic::Internal::Type::Enum
766
+
767
+ TaggedSymbol =
768
+ T.type_alias do
769
+ T.all(
770
+ Symbol,
771
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Card::SpendLimitDuration
772
+ )
773
+ end
774
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
775
+
776
+ ANNUALLY =
777
+ T.let(
778
+ :ANNUALLY,
779
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Card::SpendLimitDuration::TaggedSymbol
780
+ )
781
+ FOREVER =
782
+ T.let(
783
+ :FOREVER,
784
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Card::SpendLimitDuration::TaggedSymbol
785
+ )
786
+ MONTHLY =
787
+ T.let(
788
+ :MONTHLY,
789
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Card::SpendLimitDuration::TaggedSymbol
790
+ )
791
+ TRANSACTION =
792
+ T.let(
793
+ :TRANSACTION,
794
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Card::SpendLimitDuration::TaggedSymbol
795
+ )
796
+
797
+ sig do
798
+ override.returns(
799
+ T::Array[
800
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Card::SpendLimitDuration::TaggedSymbol
801
+ ]
802
+ )
803
+ end
804
+ def self.values
805
+ end
806
+ end
807
+
808
+ module State
809
+ extend Lithic::Internal::Type::Enum
810
+
811
+ TaggedSymbol =
812
+ T.type_alias do
813
+ T.all(
814
+ Symbol,
815
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Card::State
816
+ )
817
+ end
818
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
819
+
820
+ CLOSED =
821
+ T.let(
822
+ :CLOSED,
823
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Card::State::TaggedSymbol
824
+ )
825
+ OPEN =
826
+ T.let(
827
+ :OPEN,
828
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Card::State::TaggedSymbol
829
+ )
830
+ PAUSED =
831
+ T.let(
832
+ :PAUSED,
833
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Card::State::TaggedSymbol
834
+ )
835
+ PENDING_ACTIVATION =
836
+ T.let(
837
+ :PENDING_ACTIVATION,
838
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Card::State::TaggedSymbol
839
+ )
840
+ PENDING_FULFILLMENT =
841
+ T.let(
842
+ :PENDING_FULFILLMENT,
843
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Card::State::TaggedSymbol
844
+ )
845
+
846
+ sig do
847
+ override.returns(
848
+ T::Array[
849
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Card::State::TaggedSymbol
850
+ ]
851
+ )
852
+ end
853
+ def self.values
854
+ end
855
+ end
856
+
857
+ module Type
858
+ extend Lithic::Internal::Type::Enum
859
+
860
+ TaggedSymbol =
861
+ T.type_alias do
862
+ T.all(
863
+ Symbol,
864
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Card::Type
865
+ )
866
+ end
867
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
868
+
869
+ SINGLE_USE =
870
+ T.let(
871
+ :SINGLE_USE,
872
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Card::Type::TaggedSymbol
873
+ )
874
+ MERCHANT_LOCKED =
875
+ T.let(
876
+ :MERCHANT_LOCKED,
877
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Card::Type::TaggedSymbol
878
+ )
879
+ UNLOCKED =
880
+ T.let(
881
+ :UNLOCKED,
882
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Card::Type::TaggedSymbol
883
+ )
884
+ PHYSICAL =
885
+ T.let(
886
+ :PHYSICAL,
887
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Card::Type::TaggedSymbol
888
+ )
889
+ DIGITAL_WALLET =
890
+ T.let(
891
+ :DIGITAL_WALLET,
892
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Card::Type::TaggedSymbol
893
+ )
894
+ VIRTUAL =
895
+ T.let(
896
+ :VIRTUAL,
897
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Card::Type::TaggedSymbol
898
+ )
899
+
900
+ sig do
901
+ override.returns(
902
+ T::Array[
903
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Card::Type::TaggedSymbol
904
+ ]
905
+ )
906
+ end
907
+ def self.values
908
+ end
909
+ end
910
+ end
911
+
912
+ # The type of authorization request that this request is for. Note that
913
+ # `CREDIT_AUTHORIZATION` and `FINANCIAL_CREDIT_AUTHORIZATION` is only available to
914
+ # users with credit decisioning via ASA enabled.
915
+ module Status
916
+ extend Lithic::Internal::Type::Enum
917
+
918
+ TaggedSymbol =
919
+ T.type_alias do
920
+ T.all(
921
+ Symbol,
922
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Status
923
+ )
924
+ end
925
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
926
+
927
+ AUTHORIZATION =
928
+ T.let(
929
+ :AUTHORIZATION,
930
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Status::TaggedSymbol
931
+ )
932
+ CREDIT_AUTHORIZATION =
933
+ T.let(
934
+ :CREDIT_AUTHORIZATION,
935
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Status::TaggedSymbol
936
+ )
937
+ FINANCIAL_AUTHORIZATION =
938
+ T.let(
939
+ :FINANCIAL_AUTHORIZATION,
940
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Status::TaggedSymbol
941
+ )
942
+ FINANCIAL_CREDIT_AUTHORIZATION =
943
+ T.let(
944
+ :FINANCIAL_CREDIT_AUTHORIZATION,
945
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Status::TaggedSymbol
946
+ )
947
+ BALANCE_INQUIRY =
948
+ T.let(
949
+ :BALANCE_INQUIRY,
950
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Status::TaggedSymbol
951
+ )
952
+
953
+ sig do
954
+ override.returns(
955
+ T::Array[
956
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Status::TaggedSymbol
957
+ ]
958
+ )
959
+ end
960
+ def self.values
961
+ end
962
+ end
963
+
964
+ # The entity that initiated the transaction.
965
+ module TransactionInitiator
966
+ extend Lithic::Internal::Type::Enum
967
+
968
+ TaggedSymbol =
969
+ T.type_alias do
970
+ T.all(
971
+ Symbol,
972
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::TransactionInitiator
973
+ )
974
+ end
975
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
976
+
977
+ CARDHOLDER =
978
+ T.let(
979
+ :CARDHOLDER,
980
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::TransactionInitiator::TaggedSymbol
981
+ )
982
+ MERCHANT =
983
+ T.let(
984
+ :MERCHANT,
985
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::TransactionInitiator::TaggedSymbol
986
+ )
987
+ UNKNOWN =
988
+ T.let(
989
+ :UNKNOWN,
990
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::TransactionInitiator::TaggedSymbol
991
+ )
992
+
993
+ sig do
994
+ override.returns(
995
+ T::Array[
996
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::TransactionInitiator::TaggedSymbol
997
+ ]
998
+ )
999
+ end
1000
+ def self.values
1001
+ end
1002
+ end
1003
+
1004
+ module AccountType
1005
+ extend Lithic::Internal::Type::Enum
1006
+
1007
+ TaggedSymbol =
1008
+ T.type_alias do
1009
+ T.all(
1010
+ Symbol,
1011
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::AccountType
1012
+ )
1013
+ end
1014
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
1015
+
1016
+ CHECKING =
1017
+ T.let(
1018
+ :CHECKING,
1019
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::AccountType::TaggedSymbol
1020
+ )
1021
+ SAVINGS =
1022
+ T.let(
1023
+ :SAVINGS,
1024
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::AccountType::TaggedSymbol
1025
+ )
1026
+
1027
+ sig do
1028
+ override.returns(
1029
+ T::Array[
1030
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::AccountType::TaggedSymbol
1031
+ ]
1032
+ )
1033
+ end
1034
+ def self.values
1035
+ end
1036
+ end
1037
+
1038
+ class FleetInfo < Lithic::Internal::Type::BaseModel
1039
+ OrHash =
1040
+ T.type_alias do
1041
+ T.any(
1042
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::FleetInfo,
1043
+ Lithic::Internal::AnyHash
1044
+ )
1045
+ end
1046
+
1047
+ # Code indicating what the driver was prompted to enter at time of purchase. This
1048
+ # is configured at a program level and is a static configuration, and does not
1049
+ # change on a request to request basis
1050
+ sig do
1051
+ returns(
1052
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::FleetInfo::FleetPromptCode::TaggedSymbol
1053
+ )
1054
+ end
1055
+ attr_accessor :fleet_prompt_code
1056
+
1057
+ # Code indicating which restrictions, if any, there are on purchase. This is
1058
+ # configured at a program level and is a static configuration, and does not change
1059
+ # on a request to request basis
1060
+ sig do
1061
+ returns(
1062
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::FleetInfo::FleetRestrictionCode::TaggedSymbol
1063
+ )
1064
+ end
1065
+ attr_accessor :fleet_restriction_code
1066
+
1067
+ # Number representing the driver
1068
+ sig { returns(T.nilable(String)) }
1069
+ attr_accessor :driver_number
1070
+
1071
+ # Number associated with the vehicle
1072
+ sig { returns(T.nilable(String)) }
1073
+ attr_accessor :vehicle_number
1074
+
1075
+ # Optional Object containing information if the Card is a part of a Fleet managed
1076
+ # program
1077
+ sig do
1078
+ params(
1079
+ fleet_prompt_code:
1080
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::FleetInfo::FleetPromptCode::OrSymbol,
1081
+ fleet_restriction_code:
1082
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::FleetInfo::FleetRestrictionCode::OrSymbol,
1083
+ driver_number: T.nilable(String),
1084
+ vehicle_number: T.nilable(String)
1085
+ ).returns(T.attached_class)
1086
+ end
1087
+ def self.new(
1088
+ # Code indicating what the driver was prompted to enter at time of purchase. This
1089
+ # is configured at a program level and is a static configuration, and does not
1090
+ # change on a request to request basis
1091
+ fleet_prompt_code:,
1092
+ # Code indicating which restrictions, if any, there are on purchase. This is
1093
+ # configured at a program level and is a static configuration, and does not change
1094
+ # on a request to request basis
1095
+ fleet_restriction_code:,
1096
+ # Number representing the driver
1097
+ driver_number: nil,
1098
+ # Number associated with the vehicle
1099
+ vehicle_number: nil
1100
+ )
1101
+ end
1102
+
1103
+ sig do
1104
+ override.returns(
1105
+ {
1106
+ fleet_prompt_code:
1107
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::FleetInfo::FleetPromptCode::TaggedSymbol,
1108
+ fleet_restriction_code:
1109
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::FleetInfo::FleetRestrictionCode::TaggedSymbol,
1110
+ driver_number: T.nilable(String),
1111
+ vehicle_number: T.nilable(String)
1112
+ }
1113
+ )
1114
+ end
1115
+ def to_hash
1116
+ end
1117
+
1118
+ # Code indicating what the driver was prompted to enter at time of purchase. This
1119
+ # is configured at a program level and is a static configuration, and does not
1120
+ # change on a request to request basis
1121
+ module FleetPromptCode
1122
+ extend Lithic::Internal::Type::Enum
1123
+
1124
+ TaggedSymbol =
1125
+ T.type_alias do
1126
+ T.all(
1127
+ Symbol,
1128
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::FleetInfo::FleetPromptCode
1129
+ )
1130
+ end
1131
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
1132
+
1133
+ NO_PROMPT =
1134
+ T.let(
1135
+ :NO_PROMPT,
1136
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::FleetInfo::FleetPromptCode::TaggedSymbol
1137
+ )
1138
+ VEHICLE_NUMBER =
1139
+ T.let(
1140
+ :VEHICLE_NUMBER,
1141
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::FleetInfo::FleetPromptCode::TaggedSymbol
1142
+ )
1143
+ DRIVER_NUMBER =
1144
+ T.let(
1145
+ :DRIVER_NUMBER,
1146
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::FleetInfo::FleetPromptCode::TaggedSymbol
1147
+ )
1148
+
1149
+ sig do
1150
+ override.returns(
1151
+ T::Array[
1152
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::FleetInfo::FleetPromptCode::TaggedSymbol
1153
+ ]
1154
+ )
1155
+ end
1156
+ def self.values
1157
+ end
1158
+ end
1159
+
1160
+ # Code indicating which restrictions, if any, there are on purchase. This is
1161
+ # configured at a program level and is a static configuration, and does not change
1162
+ # on a request to request basis
1163
+ module FleetRestrictionCode
1164
+ extend Lithic::Internal::Type::Enum
1165
+
1166
+ TaggedSymbol =
1167
+ T.type_alias do
1168
+ T.all(
1169
+ Symbol,
1170
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::FleetInfo::FleetRestrictionCode
1171
+ )
1172
+ end
1173
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
1174
+
1175
+ NO_RESTRICTIONS =
1176
+ T.let(
1177
+ :NO_RESTRICTIONS,
1178
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::FleetInfo::FleetRestrictionCode::TaggedSymbol
1179
+ )
1180
+ FUEL_ONLY =
1181
+ T.let(
1182
+ :FUEL_ONLY,
1183
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::FleetInfo::FleetRestrictionCode::TaggedSymbol
1184
+ )
1185
+
1186
+ sig do
1187
+ override.returns(
1188
+ T::Array[
1189
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::FleetInfo::FleetRestrictionCode::TaggedSymbol
1190
+ ]
1191
+ )
1192
+ end
1193
+ def self.values
1194
+ end
1195
+ end
1196
+ end
1197
+
1198
+ class LatestChallenge < Lithic::Internal::Type::BaseModel
1199
+ OrHash =
1200
+ T.type_alias do
1201
+ T.any(
1202
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::LatestChallenge,
1203
+ Lithic::Internal::AnyHash
1204
+ )
1205
+ end
1206
+
1207
+ # The phone number used for sending Authorization Challenge SMS.
1208
+ sig { returns(String) }
1209
+ attr_accessor :phone_number
1210
+
1211
+ # The status of the Authorization Challenge
1212
+ #
1213
+ # - `COMPLETED` - Challenge was successfully completed by the cardholder
1214
+ # - `PENDING` - Challenge is still open
1215
+ # - `EXPIRED` - Challenge has expired without being completed
1216
+ # - `ERROR` - There was an error processing the challenge
1217
+ sig do
1218
+ returns(
1219
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::LatestChallenge::Status::TaggedSymbol
1220
+ )
1221
+ end
1222
+ attr_accessor :status
1223
+
1224
+ # The date and time when the Authorization Challenge was completed in UTC. Present
1225
+ # only if the status is `COMPLETED`.
1226
+ sig { returns(T.nilable(Time)) }
1227
+ attr_reader :completed_at
1228
+
1229
+ sig { params(completed_at: Time).void }
1230
+ attr_writer :completed_at
1231
+
1232
+ # The latest Authorization Challenge that was issued to the cardholder for this
1233
+ # merchant.
1234
+ sig do
1235
+ params(
1236
+ phone_number: String,
1237
+ status:
1238
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::LatestChallenge::Status::OrSymbol,
1239
+ completed_at: Time
1240
+ ).returns(T.attached_class)
1241
+ end
1242
+ def self.new(
1243
+ # The phone number used for sending Authorization Challenge SMS.
1244
+ phone_number:,
1245
+ # The status of the Authorization Challenge
1246
+ #
1247
+ # - `COMPLETED` - Challenge was successfully completed by the cardholder
1248
+ # - `PENDING` - Challenge is still open
1249
+ # - `EXPIRED` - Challenge has expired without being completed
1250
+ # - `ERROR` - There was an error processing the challenge
1251
+ status:,
1252
+ # The date and time when the Authorization Challenge was completed in UTC. Present
1253
+ # only if the status is `COMPLETED`.
1254
+ completed_at: nil
1255
+ )
1256
+ end
1257
+
1258
+ sig do
1259
+ override.returns(
1260
+ {
1261
+ phone_number: String,
1262
+ status:
1263
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::LatestChallenge::Status::TaggedSymbol,
1264
+ completed_at: Time
1265
+ }
1266
+ )
1267
+ end
1268
+ def to_hash
1269
+ end
1270
+
1271
+ # The status of the Authorization Challenge
1272
+ #
1273
+ # - `COMPLETED` - Challenge was successfully completed by the cardholder
1274
+ # - `PENDING` - Challenge is still open
1275
+ # - `EXPIRED` - Challenge has expired without being completed
1276
+ # - `ERROR` - There was an error processing the challenge
1277
+ module Status
1278
+ extend Lithic::Internal::Type::Enum
1279
+
1280
+ TaggedSymbol =
1281
+ T.type_alias do
1282
+ T.all(
1283
+ Symbol,
1284
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::LatestChallenge::Status
1285
+ )
1286
+ end
1287
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
1288
+
1289
+ COMPLETED =
1290
+ T.let(
1291
+ :COMPLETED,
1292
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::LatestChallenge::Status::TaggedSymbol
1293
+ )
1294
+ PENDING =
1295
+ T.let(
1296
+ :PENDING,
1297
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::LatestChallenge::Status::TaggedSymbol
1298
+ )
1299
+ EXPIRED =
1300
+ T.let(
1301
+ :EXPIRED,
1302
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::LatestChallenge::Status::TaggedSymbol
1303
+ )
1304
+ ERROR =
1305
+ T.let(
1306
+ :ERROR,
1307
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::LatestChallenge::Status::TaggedSymbol
1308
+ )
1309
+
1310
+ sig do
1311
+ override.returns(
1312
+ T::Array[
1313
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::LatestChallenge::Status::TaggedSymbol
1314
+ ]
1315
+ )
1316
+ end
1317
+ def self.values
1318
+ end
1319
+ end
1320
+ end
1321
+
1322
+ # Card network of the authorization.
1323
+ module Network
1324
+ extend Lithic::Internal::Type::Enum
1325
+
1326
+ TaggedSymbol =
1327
+ T.type_alias do
1328
+ T.all(
1329
+ Symbol,
1330
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Network
1331
+ )
1332
+ end
1333
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
1334
+
1335
+ AMEX =
1336
+ T.let(
1337
+ :AMEX,
1338
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Network::TaggedSymbol
1339
+ )
1340
+ INTERLINK =
1341
+ T.let(
1342
+ :INTERLINK,
1343
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Network::TaggedSymbol
1344
+ )
1345
+ MAESTRO =
1346
+ T.let(
1347
+ :MAESTRO,
1348
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Network::TaggedSymbol
1349
+ )
1350
+ MASTERCARD =
1351
+ T.let(
1352
+ :MASTERCARD,
1353
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Network::TaggedSymbol
1354
+ )
1355
+ UNKNOWN =
1356
+ T.let(
1357
+ :UNKNOWN,
1358
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Network::TaggedSymbol
1359
+ )
1360
+ VISA =
1361
+ T.let(
1362
+ :VISA,
1363
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Network::TaggedSymbol
1364
+ )
1365
+
1366
+ sig do
1367
+ override.returns(
1368
+ T::Array[
1369
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Network::TaggedSymbol
1370
+ ]
1371
+ )
1372
+ end
1373
+ def self.values
1374
+ end
1375
+ end
1376
+
1377
+ class NetworkSpecificData < Lithic::Internal::Type::BaseModel
1378
+ OrHash =
1379
+ T.type_alias do
1380
+ T.any(
1381
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::NetworkSpecificData,
1382
+ Lithic::Internal::AnyHash
1383
+ )
1384
+ end
1385
+
1386
+ sig do
1387
+ returns(
1388
+ T.nilable(
1389
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::NetworkSpecificData::Mastercard
1390
+ )
1391
+ )
1392
+ end
1393
+ attr_reader :mastercard
1394
+
1395
+ sig do
1396
+ params(
1397
+ mastercard:
1398
+ T.nilable(
1399
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::NetworkSpecificData::Mastercard::OrHash
1400
+ )
1401
+ ).void
1402
+ end
1403
+ attr_writer :mastercard
1404
+
1405
+ sig do
1406
+ returns(
1407
+ T.nilable(
1408
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::NetworkSpecificData::Visa
1409
+ )
1410
+ )
1411
+ end
1412
+ attr_reader :visa
1413
+
1414
+ sig do
1415
+ params(
1416
+ visa:
1417
+ T.nilable(
1418
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::NetworkSpecificData::Visa::OrHash
1419
+ )
1420
+ ).void
1421
+ end
1422
+ attr_writer :visa
1423
+
1424
+ # Contains raw data provided by the card network, including attributes that
1425
+ # provide further context about the authorization. If populated by the network,
1426
+ # data is organized by Lithic and passed through without further modification.
1427
+ # Please consult the official network documentation for more details about these
1428
+ # values and how to use them. This object is only available to certain programs-
1429
+ # contact your Customer Success Manager to discuss enabling access.
1430
+ sig do
1431
+ params(
1432
+ mastercard:
1433
+ T.nilable(
1434
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::NetworkSpecificData::Mastercard::OrHash
1435
+ ),
1436
+ visa:
1437
+ T.nilable(
1438
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::NetworkSpecificData::Visa::OrHash
1439
+ )
1440
+ ).returns(T.attached_class)
1441
+ end
1442
+ def self.new(mastercard: nil, visa: nil)
1443
+ end
1444
+
1445
+ sig do
1446
+ override.returns(
1447
+ {
1448
+ mastercard:
1449
+ T.nilable(
1450
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::NetworkSpecificData::Mastercard
1451
+ ),
1452
+ visa:
1453
+ T.nilable(
1454
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::NetworkSpecificData::Visa
1455
+ )
1456
+ }
1457
+ )
1458
+ end
1459
+ def to_hash
1460
+ end
1461
+
1462
+ class Mastercard < Lithic::Internal::Type::BaseModel
1463
+ OrHash =
1464
+ T.type_alias do
1465
+ T.any(
1466
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::NetworkSpecificData::Mastercard,
1467
+ Lithic::Internal::AnyHash
1468
+ )
1469
+ end
1470
+
1471
+ # Indicates the electronic commerce security level and UCAF collection.
1472
+ sig { returns(T.nilable(String)) }
1473
+ attr_accessor :ecommerce_security_level_indicator
1474
+
1475
+ # The On-behalf Service performed on the transaction and the results. Contains all
1476
+ # applicable, on-behalf service results that were performed on a given
1477
+ # transaction.
1478
+ sig do
1479
+ returns(
1480
+ T.nilable(
1481
+ T::Array[
1482
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::NetworkSpecificData::Mastercard::OnBehalfServiceResult
1483
+ ]
1484
+ )
1485
+ )
1486
+ end
1487
+ attr_accessor :on_behalf_service_result
1488
+
1489
+ # Indicates the type of additional transaction purpose.
1490
+ sig { returns(T.nilable(String)) }
1491
+ attr_accessor :transaction_type_identifier
1492
+
1493
+ sig do
1494
+ params(
1495
+ ecommerce_security_level_indicator: T.nilable(String),
1496
+ on_behalf_service_result:
1497
+ T.nilable(
1498
+ T::Array[
1499
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::NetworkSpecificData::Mastercard::OnBehalfServiceResult::OrHash
1500
+ ]
1501
+ ),
1502
+ transaction_type_identifier: T.nilable(String)
1503
+ ).returns(T.attached_class)
1504
+ end
1505
+ def self.new(
1506
+ # Indicates the electronic commerce security level and UCAF collection.
1507
+ ecommerce_security_level_indicator: nil,
1508
+ # The On-behalf Service performed on the transaction and the results. Contains all
1509
+ # applicable, on-behalf service results that were performed on a given
1510
+ # transaction.
1511
+ on_behalf_service_result: nil,
1512
+ # Indicates the type of additional transaction purpose.
1513
+ transaction_type_identifier: nil
1514
+ )
1515
+ end
1516
+
1517
+ sig do
1518
+ override.returns(
1519
+ {
1520
+ ecommerce_security_level_indicator: T.nilable(String),
1521
+ on_behalf_service_result:
1522
+ T.nilable(
1523
+ T::Array[
1524
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::NetworkSpecificData::Mastercard::OnBehalfServiceResult
1525
+ ]
1526
+ ),
1527
+ transaction_type_identifier: T.nilable(String)
1528
+ }
1529
+ )
1530
+ end
1531
+ def to_hash
1532
+ end
1533
+
1534
+ class OnBehalfServiceResult < Lithic::Internal::Type::BaseModel
1535
+ OrHash =
1536
+ T.type_alias do
1537
+ T.any(
1538
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::NetworkSpecificData::Mastercard::OnBehalfServiceResult,
1539
+ Lithic::Internal::AnyHash
1540
+ )
1541
+ end
1542
+
1543
+ # Indicates the results of the service processing.
1544
+ sig { returns(String) }
1545
+ attr_accessor :result_1
1546
+
1547
+ # Identifies the results of the service processing.
1548
+ sig { returns(String) }
1549
+ attr_accessor :result_2
1550
+
1551
+ # Indicates the service performed on the transaction.
1552
+ sig { returns(String) }
1553
+ attr_accessor :service
1554
+
1555
+ sig do
1556
+ params(
1557
+ result_1: String,
1558
+ result_2: String,
1559
+ service: String
1560
+ ).returns(T.attached_class)
1561
+ end
1562
+ def self.new(
1563
+ # Indicates the results of the service processing.
1564
+ result_1:,
1565
+ # Identifies the results of the service processing.
1566
+ result_2:,
1567
+ # Indicates the service performed on the transaction.
1568
+ service:
1569
+ )
1570
+ end
1571
+
1572
+ sig do
1573
+ override.returns(
1574
+ { result_1: String, result_2: String, service: String }
1575
+ )
1576
+ end
1577
+ def to_hash
1578
+ end
1579
+ end
1580
+ end
1581
+
1582
+ class Visa < Lithic::Internal::Type::BaseModel
1583
+ OrHash =
1584
+ T.type_alias do
1585
+ T.any(
1586
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::NetworkSpecificData::Visa,
1587
+ Lithic::Internal::AnyHash
1588
+ )
1589
+ end
1590
+
1591
+ # Identifies the purpose or category of a transaction, used to classify and
1592
+ # process transactions according to Visa’s rules.
1593
+ sig { returns(T.nilable(String)) }
1594
+ attr_accessor :business_application_identifier
1595
+
1596
+ sig do
1597
+ params(business_application_identifier: T.nilable(String)).returns(
1598
+ T.attached_class
1599
+ )
1600
+ end
1601
+ def self.new(
1602
+ # Identifies the purpose or category of a transaction, used to classify and
1603
+ # process transactions according to Visa’s rules.
1604
+ business_application_identifier: nil
1605
+ )
1606
+ end
1607
+
1608
+ sig do
1609
+ override.returns(
1610
+ { business_application_identifier: T.nilable(String) }
1611
+ )
1612
+ end
1613
+ def to_hash
1614
+ end
1615
+ end
1616
+ end
1617
+
1618
+ class Pos < Lithic::Internal::Type::BaseModel
1619
+ OrHash =
1620
+ T.type_alias do
1621
+ T.any(
1622
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos,
1623
+ Lithic::Internal::AnyHash
1624
+ )
1625
+ end
1626
+
1627
+ # POS > Entry Mode object in ASA
1628
+ sig do
1629
+ returns(
1630
+ T.nilable(
1631
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::EntryMode
1632
+ )
1633
+ )
1634
+ end
1635
+ attr_reader :entry_mode
1636
+
1637
+ sig do
1638
+ params(
1639
+ entry_mode:
1640
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::EntryMode::OrHash
1641
+ ).void
1642
+ end
1643
+ attr_writer :entry_mode
1644
+
1645
+ sig do
1646
+ returns(
1647
+ T.nilable(
1648
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::Terminal
1649
+ )
1650
+ )
1651
+ end
1652
+ attr_reader :terminal
1653
+
1654
+ sig do
1655
+ params(
1656
+ terminal:
1657
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::Terminal::OrHash
1658
+ ).void
1659
+ end
1660
+ attr_writer :terminal
1661
+
1662
+ sig do
1663
+ params(
1664
+ entry_mode:
1665
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::EntryMode::OrHash,
1666
+ terminal:
1667
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::Terminal::OrHash
1668
+ ).returns(T.attached_class)
1669
+ end
1670
+ def self.new(
1671
+ # POS > Entry Mode object in ASA
1672
+ entry_mode: nil,
1673
+ terminal: nil
1674
+ )
1675
+ end
1676
+
1677
+ sig do
1678
+ override.returns(
1679
+ {
1680
+ entry_mode:
1681
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::EntryMode,
1682
+ terminal:
1683
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::Terminal
1684
+ }
1685
+ )
1686
+ end
1687
+ def to_hash
1688
+ end
1689
+
1690
+ class EntryMode < Lithic::Internal::Type::BaseModel
1691
+ OrHash =
1692
+ T.type_alias do
1693
+ T.any(
1694
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::EntryMode,
1695
+ Lithic::Internal::AnyHash
1696
+ )
1697
+ end
1698
+
1699
+ # Card Presence Indicator
1700
+ sig do
1701
+ returns(
1702
+ T.nilable(
1703
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::EntryMode::Card::TaggedSymbol
1704
+ )
1705
+ )
1706
+ end
1707
+ attr_reader :card
1708
+
1709
+ sig do
1710
+ params(
1711
+ card:
1712
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::EntryMode::Card::OrSymbol
1713
+ ).void
1714
+ end
1715
+ attr_writer :card
1716
+
1717
+ # Cardholder Presence Indicator
1718
+ sig do
1719
+ returns(
1720
+ T.nilable(
1721
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::EntryMode::Cardholder::TaggedSymbol
1722
+ )
1723
+ )
1724
+ end
1725
+ attr_reader :cardholder
1726
+
1727
+ sig do
1728
+ params(
1729
+ cardholder:
1730
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::EntryMode::Cardholder::OrSymbol
1731
+ ).void
1732
+ end
1733
+ attr_writer :cardholder
1734
+
1735
+ # Method of entry for the PAN
1736
+ sig do
1737
+ returns(
1738
+ T.nilable(
1739
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::EntryMode::Pan::TaggedSymbol
1740
+ )
1741
+ )
1742
+ end
1743
+ attr_reader :pan
1744
+
1745
+ sig do
1746
+ params(
1747
+ pan:
1748
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::EntryMode::Pan::OrSymbol
1749
+ ).void
1750
+ end
1751
+ attr_writer :pan
1752
+
1753
+ # Indicates whether the cardholder entered the PIN. True if the PIN was entered.
1754
+ sig { returns(T.nilable(T::Boolean)) }
1755
+ attr_reader :pin_entered
1756
+
1757
+ sig { params(pin_entered: T::Boolean).void }
1758
+ attr_writer :pin_entered
1759
+
1760
+ # POS > Entry Mode object in ASA
1761
+ sig do
1762
+ params(
1763
+ card:
1764
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::EntryMode::Card::OrSymbol,
1765
+ cardholder:
1766
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::EntryMode::Cardholder::OrSymbol,
1767
+ pan:
1768
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::EntryMode::Pan::OrSymbol,
1769
+ pin_entered: T::Boolean
1770
+ ).returns(T.attached_class)
1771
+ end
1772
+ def self.new(
1773
+ # Card Presence Indicator
1774
+ card: nil,
1775
+ # Cardholder Presence Indicator
1776
+ cardholder: nil,
1777
+ # Method of entry for the PAN
1778
+ pan: nil,
1779
+ # Indicates whether the cardholder entered the PIN. True if the PIN was entered.
1780
+ pin_entered: nil
1781
+ )
1782
+ end
1783
+
1784
+ sig do
1785
+ override.returns(
1786
+ {
1787
+ card:
1788
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::EntryMode::Card::TaggedSymbol,
1789
+ cardholder:
1790
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::EntryMode::Cardholder::TaggedSymbol,
1791
+ pan:
1792
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::EntryMode::Pan::TaggedSymbol,
1793
+ pin_entered: T::Boolean
1794
+ }
1795
+ )
1796
+ end
1797
+ def to_hash
1798
+ end
1799
+
1800
+ # Card Presence Indicator
1801
+ module Card
1802
+ extend Lithic::Internal::Type::Enum
1803
+
1804
+ TaggedSymbol =
1805
+ T.type_alias do
1806
+ T.all(
1807
+ Symbol,
1808
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::EntryMode::Card
1809
+ )
1810
+ end
1811
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
1812
+
1813
+ PRESENT =
1814
+ T.let(
1815
+ :PRESENT,
1816
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::EntryMode::Card::TaggedSymbol
1817
+ )
1818
+ NOT_PRESENT =
1819
+ T.let(
1820
+ :NOT_PRESENT,
1821
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::EntryMode::Card::TaggedSymbol
1822
+ )
1823
+ UNKNOWN =
1824
+ T.let(
1825
+ :UNKNOWN,
1826
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::EntryMode::Card::TaggedSymbol
1827
+ )
1828
+
1829
+ sig do
1830
+ override.returns(
1831
+ T::Array[
1832
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::EntryMode::Card::TaggedSymbol
1833
+ ]
1834
+ )
1835
+ end
1836
+ def self.values
1837
+ end
1838
+ end
1839
+
1840
+ # Cardholder Presence Indicator
1841
+ module Cardholder
1842
+ extend Lithic::Internal::Type::Enum
1843
+
1844
+ TaggedSymbol =
1845
+ T.type_alias do
1846
+ T.all(
1847
+ Symbol,
1848
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::EntryMode::Cardholder
1849
+ )
1850
+ end
1851
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
1852
+
1853
+ DEFERRED_BILLING =
1854
+ T.let(
1855
+ :DEFERRED_BILLING,
1856
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::EntryMode::Cardholder::TaggedSymbol
1857
+ )
1858
+ ELECTRONIC_ORDER =
1859
+ T.let(
1860
+ :ELECTRONIC_ORDER,
1861
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::EntryMode::Cardholder::TaggedSymbol
1862
+ )
1863
+ INSTALLMENT =
1864
+ T.let(
1865
+ :INSTALLMENT,
1866
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::EntryMode::Cardholder::TaggedSymbol
1867
+ )
1868
+ MAIL_ORDER =
1869
+ T.let(
1870
+ :MAIL_ORDER,
1871
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::EntryMode::Cardholder::TaggedSymbol
1872
+ )
1873
+ NOT_PRESENT =
1874
+ T.let(
1875
+ :NOT_PRESENT,
1876
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::EntryMode::Cardholder::TaggedSymbol
1877
+ )
1878
+ PRESENT =
1879
+ T.let(
1880
+ :PRESENT,
1881
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::EntryMode::Cardholder::TaggedSymbol
1882
+ )
1883
+ REOCCURRING =
1884
+ T.let(
1885
+ :REOCCURRING,
1886
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::EntryMode::Cardholder::TaggedSymbol
1887
+ )
1888
+ TELEPHONE_ORDER =
1889
+ T.let(
1890
+ :TELEPHONE_ORDER,
1891
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::EntryMode::Cardholder::TaggedSymbol
1892
+ )
1893
+ UNKNOWN =
1894
+ T.let(
1895
+ :UNKNOWN,
1896
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::EntryMode::Cardholder::TaggedSymbol
1897
+ )
1898
+
1899
+ sig do
1900
+ override.returns(
1901
+ T::Array[
1902
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::EntryMode::Cardholder::TaggedSymbol
1903
+ ]
1904
+ )
1905
+ end
1906
+ def self.values
1907
+ end
1908
+ end
1909
+
1910
+ # Method of entry for the PAN
1911
+ module Pan
1912
+ extend Lithic::Internal::Type::Enum
1913
+
1914
+ TaggedSymbol =
1915
+ T.type_alias do
1916
+ T.all(
1917
+ Symbol,
1918
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::EntryMode::Pan
1919
+ )
1920
+ end
1921
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
1922
+
1923
+ AUTO_ENTRY =
1924
+ T.let(
1925
+ :AUTO_ENTRY,
1926
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::EntryMode::Pan::TaggedSymbol
1927
+ )
1928
+ BAR_CODE =
1929
+ T.let(
1930
+ :BAR_CODE,
1931
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::EntryMode::Pan::TaggedSymbol
1932
+ )
1933
+ CONTACTLESS =
1934
+ T.let(
1935
+ :CONTACTLESS,
1936
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::EntryMode::Pan::TaggedSymbol
1937
+ )
1938
+ ECOMMERCE =
1939
+ T.let(
1940
+ :ECOMMERCE,
1941
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::EntryMode::Pan::TaggedSymbol
1942
+ )
1943
+ ERROR_KEYED =
1944
+ T.let(
1945
+ :ERROR_KEYED,
1946
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::EntryMode::Pan::TaggedSymbol
1947
+ )
1948
+ ERROR_MAGNETIC_STRIPE =
1949
+ T.let(
1950
+ :ERROR_MAGNETIC_STRIPE,
1951
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::EntryMode::Pan::TaggedSymbol
1952
+ )
1953
+ ICC =
1954
+ T.let(
1955
+ :ICC,
1956
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::EntryMode::Pan::TaggedSymbol
1957
+ )
1958
+ KEY_ENTERED =
1959
+ T.let(
1960
+ :KEY_ENTERED,
1961
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::EntryMode::Pan::TaggedSymbol
1962
+ )
1963
+ MAGNETIC_STRIPE =
1964
+ T.let(
1965
+ :MAGNETIC_STRIPE,
1966
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::EntryMode::Pan::TaggedSymbol
1967
+ )
1968
+ MANUAL =
1969
+ T.let(
1970
+ :MANUAL,
1971
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::EntryMode::Pan::TaggedSymbol
1972
+ )
1973
+ OCR =
1974
+ T.let(
1975
+ :OCR,
1976
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::EntryMode::Pan::TaggedSymbol
1977
+ )
1978
+ SECURE_CARDLESS =
1979
+ T.let(
1980
+ :SECURE_CARDLESS,
1981
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::EntryMode::Pan::TaggedSymbol
1982
+ )
1983
+ UNSPECIFIED =
1984
+ T.let(
1985
+ :UNSPECIFIED,
1986
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::EntryMode::Pan::TaggedSymbol
1987
+ )
1988
+ UNKNOWN =
1989
+ T.let(
1990
+ :UNKNOWN,
1991
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::EntryMode::Pan::TaggedSymbol
1992
+ )
1993
+ CREDENTIAL_ON_FILE =
1994
+ T.let(
1995
+ :CREDENTIAL_ON_FILE,
1996
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::EntryMode::Pan::TaggedSymbol
1997
+ )
1998
+
1999
+ sig do
2000
+ override.returns(
2001
+ T::Array[
2002
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::EntryMode::Pan::TaggedSymbol
2003
+ ]
2004
+ )
2005
+ end
2006
+ def self.values
2007
+ end
2008
+ end
2009
+ end
2010
+
2011
+ class Terminal < Lithic::Internal::Type::BaseModel
2012
+ OrHash =
2013
+ T.type_alias do
2014
+ T.any(
2015
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::Terminal,
2016
+ Lithic::Internal::AnyHash
2017
+ )
2018
+ end
2019
+
2020
+ # True if a clerk is present at the sale.
2021
+ sig { returns(T::Boolean) }
2022
+ attr_accessor :attended
2023
+
2024
+ # True if the terminal is capable of retaining the card.
2025
+ sig { returns(T::Boolean) }
2026
+ attr_accessor :card_retention_capable
2027
+
2028
+ # True if the sale was made at the place of business (vs. mobile).
2029
+ sig { returns(T::Boolean) }
2030
+ attr_accessor :on_premise
2031
+
2032
+ # The person that is designated to swipe the card
2033
+ sig do
2034
+ returns(
2035
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::Terminal::Operator::TaggedSymbol
2036
+ )
2037
+ end
2038
+ attr_accessor :operator
2039
+
2040
+ # True if the terminal is capable of partial approval. Partial approval is when
2041
+ # part of a transaction is approved and another payment must be used for the
2042
+ # remainder. Example scenario: A $40 transaction is attempted on a prepaid card
2043
+ # with a $25 balance. If partial approval is enabled, $25 can be authorized, at
2044
+ # which point the POS will prompt the user for an additional payment of $15.
2045
+ sig { returns(T::Boolean) }
2046
+ attr_accessor :partial_approval_capable
2047
+
2048
+ # Status of whether the POS is able to accept PINs
2049
+ sig do
2050
+ returns(
2051
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::Terminal::PinCapability::TaggedSymbol
2052
+ )
2053
+ end
2054
+ attr_accessor :pin_capability
2055
+
2056
+ # POS Type
2057
+ sig do
2058
+ returns(
2059
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::Terminal::Type::TaggedSymbol
2060
+ )
2061
+ end
2062
+ attr_accessor :type
2063
+
2064
+ # Uniquely identifies a terminal at the card acceptor location of acquiring
2065
+ # institutions or merchant POS Systems. Left justified with trailing spaces.
2066
+ sig { returns(T.nilable(String)) }
2067
+ attr_accessor :acceptor_terminal_id
2068
+
2069
+ sig do
2070
+ params(
2071
+ attended: T::Boolean,
2072
+ card_retention_capable: T::Boolean,
2073
+ on_premise: T::Boolean,
2074
+ operator:
2075
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::Terminal::Operator::OrSymbol,
2076
+ partial_approval_capable: T::Boolean,
2077
+ pin_capability:
2078
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::Terminal::PinCapability::OrSymbol,
2079
+ type:
2080
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::Terminal::Type::OrSymbol,
2081
+ acceptor_terminal_id: T.nilable(String)
2082
+ ).returns(T.attached_class)
2083
+ end
2084
+ def self.new(
2085
+ # True if a clerk is present at the sale.
2086
+ attended:,
2087
+ # True if the terminal is capable of retaining the card.
2088
+ card_retention_capable:,
2089
+ # True if the sale was made at the place of business (vs. mobile).
2090
+ on_premise:,
2091
+ # The person that is designated to swipe the card
2092
+ operator:,
2093
+ # True if the terminal is capable of partial approval. Partial approval is when
2094
+ # part of a transaction is approved and another payment must be used for the
2095
+ # remainder. Example scenario: A $40 transaction is attempted on a prepaid card
2096
+ # with a $25 balance. If partial approval is enabled, $25 can be authorized, at
2097
+ # which point the POS will prompt the user for an additional payment of $15.
2098
+ partial_approval_capable:,
2099
+ # Status of whether the POS is able to accept PINs
2100
+ pin_capability:,
2101
+ # POS Type
2102
+ type:,
2103
+ # Uniquely identifies a terminal at the card acceptor location of acquiring
2104
+ # institutions or merchant POS Systems. Left justified with trailing spaces.
2105
+ acceptor_terminal_id: nil
2106
+ )
2107
+ end
2108
+
2109
+ sig do
2110
+ override.returns(
2111
+ {
2112
+ attended: T::Boolean,
2113
+ card_retention_capable: T::Boolean,
2114
+ on_premise: T::Boolean,
2115
+ operator:
2116
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::Terminal::Operator::TaggedSymbol,
2117
+ partial_approval_capable: T::Boolean,
2118
+ pin_capability:
2119
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::Terminal::PinCapability::TaggedSymbol,
2120
+ type:
2121
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::Terminal::Type::TaggedSymbol,
2122
+ acceptor_terminal_id: T.nilable(String)
2123
+ }
2124
+ )
2125
+ end
2126
+ def to_hash
2127
+ end
2128
+
2129
+ # The person that is designated to swipe the card
2130
+ module Operator
2131
+ extend Lithic::Internal::Type::Enum
2132
+
2133
+ TaggedSymbol =
2134
+ T.type_alias do
2135
+ T.all(
2136
+ Symbol,
2137
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::Terminal::Operator
2138
+ )
2139
+ end
2140
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
2141
+
2142
+ ADMINISTRATIVE =
2143
+ T.let(
2144
+ :ADMINISTRATIVE,
2145
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::Terminal::Operator::TaggedSymbol
2146
+ )
2147
+ CARDHOLDER =
2148
+ T.let(
2149
+ :CARDHOLDER,
2150
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::Terminal::Operator::TaggedSymbol
2151
+ )
2152
+ CARD_ACCEPTOR =
2153
+ T.let(
2154
+ :CARD_ACCEPTOR,
2155
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::Terminal::Operator::TaggedSymbol
2156
+ )
2157
+ UNKNOWN =
2158
+ T.let(
2159
+ :UNKNOWN,
2160
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::Terminal::Operator::TaggedSymbol
2161
+ )
2162
+
2163
+ sig do
2164
+ override.returns(
2165
+ T::Array[
2166
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::Terminal::Operator::TaggedSymbol
2167
+ ]
2168
+ )
2169
+ end
2170
+ def self.values
2171
+ end
2172
+ end
2173
+
2174
+ # Status of whether the POS is able to accept PINs
2175
+ module PinCapability
2176
+ extend Lithic::Internal::Type::Enum
2177
+
2178
+ TaggedSymbol =
2179
+ T.type_alias do
2180
+ T.all(
2181
+ Symbol,
2182
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::Terminal::PinCapability
2183
+ )
2184
+ end
2185
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
2186
+
2187
+ CAPABLE =
2188
+ T.let(
2189
+ :CAPABLE,
2190
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::Terminal::PinCapability::TaggedSymbol
2191
+ )
2192
+ INOPERATIVE =
2193
+ T.let(
2194
+ :INOPERATIVE,
2195
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::Terminal::PinCapability::TaggedSymbol
2196
+ )
2197
+ NOT_CAPABLE =
2198
+ T.let(
2199
+ :NOT_CAPABLE,
2200
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::Terminal::PinCapability::TaggedSymbol
2201
+ )
2202
+ UNSPECIFIED =
2203
+ T.let(
2204
+ :UNSPECIFIED,
2205
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::Terminal::PinCapability::TaggedSymbol
2206
+ )
2207
+
2208
+ sig do
2209
+ override.returns(
2210
+ T::Array[
2211
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::Terminal::PinCapability::TaggedSymbol
2212
+ ]
2213
+ )
2214
+ end
2215
+ def self.values
2216
+ end
2217
+ end
2218
+
2219
+ # POS Type
2220
+ module Type
2221
+ extend Lithic::Internal::Type::Enum
2222
+
2223
+ TaggedSymbol =
2224
+ T.type_alias do
2225
+ T.all(
2226
+ Symbol,
2227
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::Terminal::Type
2228
+ )
2229
+ end
2230
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
2231
+
2232
+ ADMINISTRATIVE =
2233
+ T.let(
2234
+ :ADMINISTRATIVE,
2235
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::Terminal::Type::TaggedSymbol
2236
+ )
2237
+ ATM =
2238
+ T.let(
2239
+ :ATM,
2240
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::Terminal::Type::TaggedSymbol
2241
+ )
2242
+ AUTHORIZATION =
2243
+ T.let(
2244
+ :AUTHORIZATION,
2245
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::Terminal::Type::TaggedSymbol
2246
+ )
2247
+ COUPON_MACHINE =
2248
+ T.let(
2249
+ :COUPON_MACHINE,
2250
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::Terminal::Type::TaggedSymbol
2251
+ )
2252
+ DIAL_TERMINAL =
2253
+ T.let(
2254
+ :DIAL_TERMINAL,
2255
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::Terminal::Type::TaggedSymbol
2256
+ )
2257
+ ECOMMERCE =
2258
+ T.let(
2259
+ :ECOMMERCE,
2260
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::Terminal::Type::TaggedSymbol
2261
+ )
2262
+ ECR =
2263
+ T.let(
2264
+ :ECR,
2265
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::Terminal::Type::TaggedSymbol
2266
+ )
2267
+ FUEL_MACHINE =
2268
+ T.let(
2269
+ :FUEL_MACHINE,
2270
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::Terminal::Type::TaggedSymbol
2271
+ )
2272
+ HOME_TERMINAL =
2273
+ T.let(
2274
+ :HOME_TERMINAL,
2275
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::Terminal::Type::TaggedSymbol
2276
+ )
2277
+ MICR =
2278
+ T.let(
2279
+ :MICR,
2280
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::Terminal::Type::TaggedSymbol
2281
+ )
2282
+ OFF_PREMISE =
2283
+ T.let(
2284
+ :OFF_PREMISE,
2285
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::Terminal::Type::TaggedSymbol
2286
+ )
2287
+ PAYMENT =
2288
+ T.let(
2289
+ :PAYMENT,
2290
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::Terminal::Type::TaggedSymbol
2291
+ )
2292
+ PDA =
2293
+ T.let(
2294
+ :PDA,
2295
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::Terminal::Type::TaggedSymbol
2296
+ )
2297
+ PHONE =
2298
+ T.let(
2299
+ :PHONE,
2300
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::Terminal::Type::TaggedSymbol
2301
+ )
2302
+ POINT =
2303
+ T.let(
2304
+ :POINT,
2305
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::Terminal::Type::TaggedSymbol
2306
+ )
2307
+ POS_TERMINAL =
2308
+ T.let(
2309
+ :POS_TERMINAL,
2310
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::Terminal::Type::TaggedSymbol
2311
+ )
2312
+ PUBLIC_UTILITY =
2313
+ T.let(
2314
+ :PUBLIC_UTILITY,
2315
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::Terminal::Type::TaggedSymbol
2316
+ )
2317
+ SELF_SERVICE =
2318
+ T.let(
2319
+ :SELF_SERVICE,
2320
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::Terminal::Type::TaggedSymbol
2321
+ )
2322
+ TELEVISION =
2323
+ T.let(
2324
+ :TELEVISION,
2325
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::Terminal::Type::TaggedSymbol
2326
+ )
2327
+ TELLER =
2328
+ T.let(
2329
+ :TELLER,
2330
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::Terminal::Type::TaggedSymbol
2331
+ )
2332
+ TRAVELERS_CHECK_MACHINE =
2333
+ T.let(
2334
+ :TRAVELERS_CHECK_MACHINE,
2335
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::Terminal::Type::TaggedSymbol
2336
+ )
2337
+ VENDING =
2338
+ T.let(
2339
+ :VENDING,
2340
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::Terminal::Type::TaggedSymbol
2341
+ )
2342
+ VOICE =
2343
+ T.let(
2344
+ :VOICE,
2345
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::Terminal::Type::TaggedSymbol
2346
+ )
2347
+ UNKNOWN =
2348
+ T.let(
2349
+ :UNKNOWN,
2350
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::Terminal::Type::TaggedSymbol
2351
+ )
2352
+
2353
+ sig do
2354
+ override.returns(
2355
+ T::Array[
2356
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Pos::Terminal::Type::TaggedSymbol
2357
+ ]
2358
+ )
2359
+ end
2360
+ def self.values
2361
+ end
2362
+ end
2363
+ end
2364
+ end
2365
+ end
2366
+ end
2367
+ end