lithic 0.4.0 → 0.6.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 (149) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +59 -0
  3. data/README.md +10 -1
  4. data/lib/lithic/internal/transport/pooled_net_requester.rb +1 -1
  5. data/lib/lithic/internal/util.rb +1 -1
  6. data/lib/lithic/models/account_holder.rb +14 -5
  7. data/lib/lithic/models/account_holder_create_params.rb +10 -1
  8. data/lib/lithic/models/account_holder_simulate_enrollment_review_params.rb +1 -0
  9. data/lib/lithic/models/account_holder_simulate_enrollment_review_response.rb +14 -5
  10. data/lib/lithic/models/account_holder_update_params.rb +10 -1
  11. data/lib/lithic/models/account_holder_update_response.rb +14 -5
  12. data/lib/lithic/models/account_holder_updated_webhook_event.rb +10 -1
  13. data/lib/lithic/models/account_holders/account_holder_entity.rb +183 -0
  14. data/lib/lithic/models/account_holders/entity_create_params.rb +159 -0
  15. data/lib/lithic/models/account_holders/entity_create_response.rb +113 -0
  16. data/lib/lithic/models/account_holders/entity_delete_params.rb +22 -0
  17. data/lib/lithic/models/auth_rules/auth_rule.rb +6 -2
  18. data/lib/lithic/models/auth_rules/conditional_ach_action_parameters.rb +3 -3
  19. data/lib/lithic/models/auth_rules/conditional_block_parameters.rb +3 -0
  20. data/lib/lithic/models/auth_rules/conditional_tokenization_action_parameters.rb +47 -21
  21. data/lib/lithic/models/auth_rules/v2_create_params.rb +5 -2
  22. data/lib/lithic/models/auth_rules/v2_draft_params.rb +1 -0
  23. data/lib/lithic/models/auth_rules/v2_list_results_params.rb +70 -0
  24. data/lib/lithic/models/auth_rules/v2_list_results_response.rb +740 -0
  25. data/lib/lithic/models/book_transfer_create_params.rb +9 -1
  26. data/lib/lithic/models/card_authorization_approval_request_webhook_event.rb +178 -25
  27. data/lib/lithic/models/digital_wallet_tokenization_approval_request_webhook_event.rb +9 -9
  28. data/lib/lithic/models/financial_account.rb +1 -0
  29. data/lib/lithic/models/financial_account_update_status_params.rb +1 -0
  30. data/lib/lithic/models/financial_accounts/category_tier.rb +28 -0
  31. data/lib/lithic/models/financial_accounts/interest_tier_schedule.rb +50 -0
  32. data/lib/lithic/models/financial_accounts/interest_tier_schedule_create_params.rb +16 -0
  33. data/lib/lithic/models/financial_accounts/interest_tier_schedule_delete_params.rb +22 -0
  34. data/lib/lithic/models/financial_accounts/interest_tier_schedule_list_params.rb +40 -0
  35. data/lib/lithic/models/financial_accounts/interest_tier_schedule_retrieve_params.rb +22 -0
  36. data/lib/lithic/models/financial_accounts/interest_tier_schedule_update_params.rb +44 -0
  37. data/lib/lithic/models/financial_accounts/loan_tape.rb +1 -0
  38. data/lib/lithic/models/financial_accounts/loan_tape_configuration.rb +63 -0
  39. data/lib/lithic/models/financial_accounts/loan_tape_configuration_retrieve_params.rb +16 -0
  40. data/lib/lithic/models/financial_accounts/loan_tape_rebuild_configuration.rb +36 -0
  41. data/lib/lithic/models/financial_accounts/statement.rb +1 -0
  42. data/lib/lithic/models/kyb.rb +10 -1
  43. data/lib/lithic/models/parsed_webhook_event.rb +10 -1
  44. data/lib/lithic/models/{digital_wallet_token_metadata.rb → token_metadata.rb} +18 -19
  45. data/lib/lithic/models/tokenization_approval_request_webhook_event.rb +9 -9
  46. data/lib/lithic/models/tokenization_decisioning_request_webhook_event.rb +9 -9
  47. data/lib/lithic/models.rb +4 -2
  48. data/lib/lithic/resources/account_holders/entities.rb +89 -0
  49. data/lib/lithic/resources/account_holders.rb +10 -2
  50. data/lib/lithic/resources/auth_rules/v2.rb +42 -0
  51. data/lib/lithic/resources/book_transfers.rb +3 -1
  52. data/lib/lithic/resources/financial_accounts/interest_tier_schedule.rb +205 -0
  53. data/lib/lithic/resources/financial_accounts/loan_tape_configuration.rb +36 -0
  54. data/lib/lithic/resources/financial_accounts.rb +9 -0
  55. data/lib/lithic/version.rb +1 -1
  56. data/lib/lithic.rb +20 -1
  57. data/rbi/lithic/internal/util.rbi +1 -1
  58. data/rbi/lithic/models/account_holder.rbi +19 -6
  59. data/rbi/lithic/models/account_holder_create_params.rbi +13 -0
  60. data/rbi/lithic/models/account_holder_simulate_enrollment_review_params.rbi +5 -0
  61. data/rbi/lithic/models/account_holder_simulate_enrollment_review_response.rbi +19 -6
  62. data/rbi/lithic/models/account_holder_update_params.rbi +13 -0
  63. data/rbi/lithic/models/account_holder_update_response.rbi +19 -6
  64. data/rbi/lithic/models/account_holder_updated_webhook_event.rbi +13 -0
  65. data/rbi/lithic/models/account_holders/account_holder_entity.rbi +296 -0
  66. data/rbi/lithic/models/account_holders/entity_create_params.rbi +242 -0
  67. data/rbi/lithic/models/account_holders/entity_create_response.rbi +292 -0
  68. data/rbi/lithic/models/account_holders/entity_delete_params.rbi +43 -0
  69. data/rbi/lithic/models/auth_rules/auth_rule.rbi +6 -3
  70. data/rbi/lithic/models/auth_rules/conditional_ach_action_parameters.rbi +3 -3
  71. data/rbi/lithic/models/auth_rules/conditional_block_parameters.rbi +1 -0
  72. data/rbi/lithic/models/auth_rules/conditional_tokenization_action_parameters.rbi +69 -30
  73. data/rbi/lithic/models/auth_rules/v2_create_params.rbi +6 -3
  74. data/rbi/lithic/models/auth_rules/v2_list_results_params.rbi +112 -0
  75. data/rbi/lithic/models/auth_rules/v2_list_results_response.rbi +1826 -0
  76. data/rbi/lithic/models/book_transfer_create_params.rbi +11 -0
  77. data/rbi/lithic/models/card_authorization_approval_request_webhook_event.rbi +337 -36
  78. data/rbi/lithic/models/digital_wallet_tokenization_approval_request_webhook_event.rbi +15 -17
  79. data/rbi/lithic/models/financial_account.rbi +5 -0
  80. data/rbi/lithic/models/financial_account_update_status_params.rbi +5 -0
  81. data/rbi/lithic/models/financial_accounts/category_tier.rbi +45 -0
  82. data/rbi/lithic/models/financial_accounts/interest_tier_schedule.rbi +75 -0
  83. data/rbi/lithic/models/financial_accounts/interest_tier_schedule_create_params.rbi +32 -0
  84. data/rbi/lithic/models/financial_accounts/interest_tier_schedule_delete_params.rbi +43 -0
  85. data/rbi/lithic/models/financial_accounts/interest_tier_schedule_list_params.rbi +73 -0
  86. data/rbi/lithic/models/financial_accounts/interest_tier_schedule_retrieve_params.rbi +43 -0
  87. data/rbi/lithic/models/financial_accounts/interest_tier_schedule_update_params.rbi +70 -0
  88. data/rbi/lithic/models/financial_accounts/loan_tape.rbi +5 -0
  89. data/rbi/lithic/models/financial_accounts/loan_tape_configuration.rbi +99 -0
  90. data/rbi/lithic/models/financial_accounts/loan_tape_configuration_retrieve_params.rbi +32 -0
  91. data/rbi/lithic/models/financial_accounts/loan_tape_rebuild_configuration.rbi +65 -0
  92. data/rbi/lithic/models/financial_accounts/statement.rbi +5 -0
  93. data/rbi/lithic/models/kyb.rbi +13 -0
  94. data/rbi/lithic/models/parsed_webhook_event.rbi +13 -0
  95. data/rbi/lithic/models/{digital_wallet_token_metadata.rbi → token_metadata.rbi} +34 -41
  96. data/rbi/lithic/models/tokenization_approval_request_webhook_event.rbi +11 -17
  97. data/rbi/lithic/models/tokenization_decisioning_request_webhook_event.rbi +15 -17
  98. data/rbi/lithic/models.rbi +4 -2
  99. data/rbi/lithic/resources/account_holders/entities.rbi +80 -0
  100. data/rbi/lithic/resources/account_holders.rbi +11 -0
  101. data/rbi/lithic/resources/auth_rules/v2.rbi +44 -1
  102. data/rbi/lithic/resources/book_transfers.rbi +3 -0
  103. data/rbi/lithic/resources/financial_accounts/interest_tier_schedule.rbi +156 -0
  104. data/rbi/lithic/resources/financial_accounts/loan_tape_configuration.rbi +30 -0
  105. data/rbi/lithic/resources/financial_accounts.rbi +10 -0
  106. data/sig/lithic/models/account_holder.rbs +7 -0
  107. data/sig/lithic/models/account_holder_create_params.rbs +7 -0
  108. data/sig/lithic/models/account_holder_simulate_enrollment_review_params.rbs +2 -1
  109. data/sig/lithic/models/account_holder_simulate_enrollment_review_response.rbs +7 -0
  110. data/sig/lithic/models/account_holder_update_params.rbs +7 -0
  111. data/sig/lithic/models/account_holder_update_response.rbs +7 -0
  112. data/sig/lithic/models/account_holder_updated_webhook_event.rbs +7 -0
  113. data/sig/lithic/models/account_holders/account_holder_entity.rbs +137 -0
  114. data/sig/lithic/models/account_holders/entity_create_params.rbs +118 -0
  115. data/sig/lithic/models/account_holders/entity_create_response.rbs +117 -0
  116. data/sig/lithic/models/account_holders/entity_delete_params.rbs +26 -0
  117. data/sig/lithic/models/auth_rules/v2_list_results_params.rbs +65 -0
  118. data/sig/lithic/models/auth_rules/v2_list_results_response.rbs +752 -0
  119. data/sig/lithic/models/book_transfer_create_params.rbs +7 -0
  120. data/sig/lithic/models/card_authorization_approval_request_webhook_event.rbs +96 -0
  121. data/sig/lithic/models/digital_wallet_tokenization_approval_request_webhook_event.rbs +5 -9
  122. data/sig/lithic/models/financial_account.rbs +2 -0
  123. data/sig/lithic/models/financial_account_update_status_params.rbs +2 -0
  124. data/sig/lithic/models/financial_accounts/category_tier.rbs +21 -0
  125. data/sig/lithic/models/financial_accounts/interest_tier_schedule.rbs +41 -0
  126. data/sig/lithic/models/financial_accounts/interest_tier_schedule_create_params.rbs +17 -0
  127. data/sig/lithic/models/financial_accounts/interest_tier_schedule_delete_params.rbs +26 -0
  128. data/sig/lithic/models/financial_accounts/interest_tier_schedule_list_params.rbs +40 -0
  129. data/sig/lithic/models/financial_accounts/interest_tier_schedule_retrieve_params.rbs +26 -0
  130. data/sig/lithic/models/financial_accounts/interest_tier_schedule_update_params.rbs +38 -0
  131. data/sig/lithic/models/financial_accounts/loan_tape.rbs +2 -0
  132. data/sig/lithic/models/financial_accounts/loan_tape_configuration.rbs +60 -0
  133. data/sig/lithic/models/financial_accounts/loan_tape_configuration_retrieve_params.rbs +17 -0
  134. data/sig/lithic/models/financial_accounts/loan_tape_rebuild_configuration.rbs +32 -0
  135. data/sig/lithic/models/financial_accounts/statement.rbs +2 -0
  136. data/sig/lithic/models/kyb.rbs +7 -0
  137. data/sig/lithic/models/parsed_webhook_event.rbs +7 -0
  138. data/sig/lithic/models/{digital_wallet_token_metadata.rbs → token_metadata.rbs} +19 -17
  139. data/sig/lithic/models/tokenization_approval_request_webhook_event.rbs +5 -9
  140. data/sig/lithic/models/tokenization_decisioning_request_webhook_event.rbs +5 -9
  141. data/sig/lithic/models.rbs +4 -2
  142. data/sig/lithic/resources/account_holders/entities.rbs +28 -0
  143. data/sig/lithic/resources/account_holders.rbs +4 -0
  144. data/sig/lithic/resources/auth_rules/v2.rbs +10 -0
  145. data/sig/lithic/resources/book_transfers.rbs +1 -0
  146. data/sig/lithic/resources/financial_accounts/interest_tier_schedule.rbs +46 -0
  147. data/sig/lithic/resources/financial_accounts/loan_tape_configuration.rbs +14 -0
  148. data/sig/lithic/resources/financial_accounts.rbs +4 -0
  149. metadata +62 -5
@@ -52,6 +52,13 @@ module Lithic
52
52
  sig { params(external_id: String).void }
53
53
  attr_writer :external_id
54
54
 
55
+ # Token of an existing hold to settle when this transfer is initiated
56
+ sig { returns(T.nilable(String)) }
57
+ attr_reader :hold_token
58
+
59
+ sig { params(hold_token: String).void }
60
+ attr_writer :hold_token
61
+
55
62
  # Optional descriptor for the transfer.
56
63
  sig { returns(T.nilable(String)) }
57
64
  attr_reader :memo
@@ -85,6 +92,7 @@ module Lithic
85
92
  type: Lithic::BookTransferCreateParams::Type::OrSymbol,
86
93
  token: String,
87
94
  external_id: String,
95
+ hold_token: String,
88
96
  memo: String,
89
97
  on_closed_account:
90
98
  Lithic::BookTransferCreateParams::OnClosedAccount::OrSymbol,
@@ -111,6 +119,8 @@ module Lithic
111
119
  token: nil,
112
120
  # External ID defined by the customer
113
121
  external_id: nil,
122
+ # Token of an existing hold to settle when this transfer is initiated
123
+ hold_token: nil,
114
124
  # Optional descriptor for the transfer.
115
125
  memo: nil,
116
126
  # What to do if the financial account is closed when posting an operation
@@ -130,6 +140,7 @@ module Lithic
130
140
  type: Lithic::BookTransferCreateParams::Type::OrSymbol,
131
141
  token: String,
132
142
  external_id: String,
143
+ hold_token: String,
133
144
  memo: String,
134
145
  on_closed_account:
135
146
  Lithic::BookTransferCreateParams::OnClosedAccount::OrSymbol,
@@ -21,14 +21,33 @@ module Lithic
21
21
  sig { returns(Integer) }
22
22
  attr_accessor :acquirer_fee
23
23
 
24
- # Authorization amount of the transaction (in cents), including any acquirer fees.
25
- # The contents of this field are identical to `authorization_amount`.
24
+ # Deprecated, use `amounts`. Authorization amount of the transaction (in cents),
25
+ # including any acquirer fees. The contents of this field are identical to
26
+ # `authorization_amount`.
26
27
  sig { returns(Integer) }
27
28
  attr_accessor :amount
28
29
 
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.
30
+ # Structured amounts for this authorization. The `cardholder` and `merchant`
31
+ # amounts reflect the original network authorization values. For programs with
32
+ # hold adjustments enabled (e.g., automated fuel dispensers or tipping MCCs), the
33
+ # `hold` amount may exceed the `cardholder` and `merchant` amounts to account for
34
+ # anticipated final transaction amounts such as tips or fuel fill-ups
35
+ sig do
36
+ returns(Lithic::CardAuthorizationApprovalRequestWebhookEvent::Amounts)
37
+ end
38
+ attr_reader :amounts
39
+
40
+ sig do
41
+ params(
42
+ amounts:
43
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Amounts::OrHash
44
+ ).void
45
+ end
46
+ attr_writer :amounts
47
+
48
+ # Deprecated, use `amounts`. The base transaction amount (in cents) plus the
49
+ # acquirer fee field. This is the amount the issuer should authorize against
50
+ # unless the issuer is paying the acquirer fee on behalf of the cardholder.
32
51
  sig { returns(Integer) }
33
52
  attr_accessor :authorization_amount
34
53
 
@@ -56,7 +75,8 @@ module Lithic
56
75
  end
57
76
  attr_writer :card
58
77
 
59
- # 3-character alphabetic ISO 4217 code for cardholder's billing currency.
78
+ # Deprecated, use `amounts`. 3-character alphabetic ISO 4217 code for cardholder's
79
+ # billing currency.
60
80
  sig { returns(String) }
61
81
  attr_accessor :cardholder_currency
62
82
 
@@ -82,11 +102,11 @@ module Lithic
82
102
  sig { params(merchant: Lithic::Merchant::OrHash).void }
83
103
  attr_writer :merchant
84
104
 
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.
105
+ # Deprecated, use `amounts`. The amount that the merchant will receive,
106
+ # denominated in `merchant_currency` and in the smallest currency unit. Note the
107
+ # amount includes `acquirer_fee`, similar to `authorization_amount`. It will be
108
+ # different from `authorization_amount` if the merchant is taking payment in a
109
+ # different currency.
90
110
  sig { returns(Integer) }
91
111
  attr_accessor :merchant_amount
92
112
 
@@ -94,8 +114,8 @@ module Lithic
94
114
  sig { returns(String) }
95
115
  attr_accessor :merchant_currency
96
116
 
97
- # Amount (in cents) of the transaction that has been settled, including any
98
- # acquirer fees
117
+ # Deprecated, use `amounts`. Amount (in cents) of the transaction that has been
118
+ # settled, including any acquirer fees.
99
119
  sig { returns(Integer) }
100
120
  attr_accessor :settled_amount
101
121
 
@@ -151,11 +171,11 @@ module Lithic
151
171
  sig { params(cashback: Integer).void }
152
172
  attr_writer :cashback
153
173
 
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.
174
+ # Deprecated, use `amounts`. If the transaction was requested in a currency other
175
+ # than the settlement currency, this field will be populated to indicate the rate
176
+ # used to translate the merchant_amount to the amount (i.e., `merchant_amount` x
177
+ # `conversion_rate` = `amount`). Note that the `merchant_amount` is in the local
178
+ # currency and the amount is in the settlement currency.
159
179
  sig { returns(T.nilable(Float)) }
160
180
  attr_reader :conversion_rate
161
181
 
@@ -293,6 +313,8 @@ module Lithic
293
313
  token: String,
294
314
  acquirer_fee: Integer,
295
315
  amount: Integer,
316
+ amounts:
317
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Amounts::OrHash,
296
318
  authorization_amount: Integer,
297
319
  avs:
298
320
  Lithic::CardAuthorizationApprovalRequestWebhookEvent::Avs::OrHash,
@@ -342,17 +364,25 @@ module Lithic
342
364
  # zero if no fee is assessed. Rebates may be transmitted as a negative value to
343
365
  # indicate credited fees.
344
366
  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`.
367
+ # Deprecated, use `amounts`. Authorization amount of the transaction (in cents),
368
+ # including any acquirer fees. The contents of this field are identical to
369
+ # `authorization_amount`.
347
370
  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.
371
+ # Structured amounts for this authorization. The `cardholder` and `merchant`
372
+ # amounts reflect the original network authorization values. For programs with
373
+ # hold adjustments enabled (e.g., automated fuel dispensers or tipping MCCs), the
374
+ # `hold` amount may exceed the `cardholder` and `merchant` amounts to account for
375
+ # anticipated final transaction amounts such as tips or fuel fill-ups
376
+ amounts:,
377
+ # Deprecated, use `amounts`. The base transaction amount (in cents) plus the
378
+ # acquirer fee field. This is the amount the issuer should authorize against
379
+ # unless the issuer is paying the acquirer fee on behalf of the cardholder.
351
380
  authorization_amount:,
352
381
  avs:,
353
382
  # Card object in ASA
354
383
  card:,
355
- # 3-character alphabetic ISO 4217 code for cardholder's billing currency.
384
+ # Deprecated, use `amounts`. 3-character alphabetic ISO 4217 code for cardholder's
385
+ # billing currency.
356
386
  cardholder_currency:,
357
387
  # The portion of the transaction requested as cash back by the cardholder, and
358
388
  # does not include any acquirer fees. The amount field includes the purchase
@@ -364,16 +394,16 @@ module Lithic
364
394
  # Date and time when the transaction first occurred in UTC.
365
395
  created:,
366
396
  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.
397
+ # Deprecated, use `amounts`. The amount that the merchant will receive,
398
+ # denominated in `merchant_currency` and in the smallest currency unit. Note the
399
+ # amount includes `acquirer_fee`, similar to `authorization_amount`. It will be
400
+ # different from `authorization_amount` if the merchant is taking payment in a
401
+ # different currency.
372
402
  merchant_amount:,
373
403
  # 3-character alphabetic ISO 4217 code for the local currency of the transaction.
374
404
  merchant_currency:,
375
- # Amount (in cents) of the transaction that has been settled, including any
376
- # acquirer fees
405
+ # Deprecated, use `amounts`. Amount (in cents) of the transaction that has been
406
+ # settled, including any acquirer fees.
377
407
  settled_amount:,
378
408
  # The type of authorization request that this request is for. Note that
379
409
  # `CREDIT_AUTHORIZATION` and `FINANCIAL_CREDIT_AUTHORIZATION` is only available to
@@ -385,11 +415,11 @@ module Lithic
385
415
  cardholder_authentication: nil,
386
416
  # Deprecated, use `cash_amount`.
387
417
  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.
418
+ # Deprecated, use `amounts`. If the transaction was requested in a currency other
419
+ # than the settlement currency, this field will be populated to indicate the rate
420
+ # used to translate the merchant_amount to the amount (i.e., `merchant_amount` x
421
+ # `conversion_rate` = `amount`). Note that the `merchant_amount` is in the local
422
+ # currency and the amount is in the settlement currency.
393
423
  conversion_rate: nil,
394
424
  # The event token associated with the authorization. This field is only set for
395
425
  # programs enrolled into the beta.
@@ -429,6 +459,8 @@ module Lithic
429
459
  token: String,
430
460
  acquirer_fee: Integer,
431
461
  amount: Integer,
462
+ amounts:
463
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Amounts,
432
464
  authorization_amount: Integer,
433
465
  avs: Lithic::CardAuthorizationApprovalRequestWebhookEvent::Avs,
434
466
  card: Lithic::CardAuthorizationApprovalRequestWebhookEvent::Card,
@@ -472,6 +504,275 @@ module Lithic
472
504
  def to_hash
473
505
  end
474
506
 
507
+ class Amounts < Lithic::Internal::Type::BaseModel
508
+ OrHash =
509
+ T.type_alias do
510
+ T.any(
511
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Amounts,
512
+ Lithic::Internal::AnyHash
513
+ )
514
+ end
515
+
516
+ sig do
517
+ returns(
518
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Amounts::Cardholder
519
+ )
520
+ end
521
+ attr_reader :cardholder
522
+
523
+ sig do
524
+ params(
525
+ cardholder:
526
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Amounts::Cardholder::OrHash
527
+ ).void
528
+ end
529
+ attr_writer :cardholder
530
+
531
+ sig do
532
+ returns(
533
+ T.nilable(
534
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Amounts::Hold
535
+ )
536
+ )
537
+ end
538
+ attr_reader :hold
539
+
540
+ sig do
541
+ params(
542
+ hold:
543
+ T.nilable(
544
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Amounts::Hold::OrHash
545
+ )
546
+ ).void
547
+ end
548
+ attr_writer :hold
549
+
550
+ sig do
551
+ returns(
552
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Amounts::Merchant
553
+ )
554
+ end
555
+ attr_reader :merchant
556
+
557
+ sig do
558
+ params(
559
+ merchant:
560
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Amounts::Merchant::OrHash
561
+ ).void
562
+ end
563
+ attr_writer :merchant
564
+
565
+ sig do
566
+ returns(
567
+ T.nilable(
568
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Amounts::Settlement
569
+ )
570
+ )
571
+ end
572
+ attr_reader :settlement
573
+
574
+ sig do
575
+ params(
576
+ settlement:
577
+ T.nilable(
578
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Amounts::Settlement::OrHash
579
+ )
580
+ ).void
581
+ end
582
+ attr_writer :settlement
583
+
584
+ # Structured amounts for this authorization. The `cardholder` and `merchant`
585
+ # amounts reflect the original network authorization values. For programs with
586
+ # hold adjustments enabled (e.g., automated fuel dispensers or tipping MCCs), the
587
+ # `hold` amount may exceed the `cardholder` and `merchant` amounts to account for
588
+ # anticipated final transaction amounts such as tips or fuel fill-ups
589
+ sig do
590
+ params(
591
+ cardholder:
592
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Amounts::Cardholder::OrHash,
593
+ hold:
594
+ T.nilable(
595
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Amounts::Hold::OrHash
596
+ ),
597
+ merchant:
598
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Amounts::Merchant::OrHash,
599
+ settlement:
600
+ T.nilable(
601
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Amounts::Settlement::OrHash
602
+ )
603
+ ).returns(T.attached_class)
604
+ end
605
+ def self.new(cardholder:, hold:, merchant:, settlement:)
606
+ end
607
+
608
+ sig do
609
+ override.returns(
610
+ {
611
+ cardholder:
612
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Amounts::Cardholder,
613
+ hold:
614
+ T.nilable(
615
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Amounts::Hold
616
+ ),
617
+ merchant:
618
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Amounts::Merchant,
619
+ settlement:
620
+ T.nilable(
621
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Amounts::Settlement
622
+ )
623
+ }
624
+ )
625
+ end
626
+ def to_hash
627
+ end
628
+
629
+ class Cardholder < Lithic::Internal::Type::BaseModel
630
+ OrHash =
631
+ T.type_alias do
632
+ T.any(
633
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Amounts::Cardholder,
634
+ Lithic::Internal::AnyHash
635
+ )
636
+ end
637
+
638
+ # Amount in the smallest unit of the applicable currency (e.g., cents)
639
+ sig { returns(Integer) }
640
+ attr_accessor :amount
641
+
642
+ # Exchange rate used for currency conversion
643
+ sig { returns(String) }
644
+ attr_accessor :conversion_rate
645
+
646
+ # 3-character alphabetic ISO 4217 currency
647
+ sig { returns(String) }
648
+ attr_accessor :currency
649
+
650
+ sig do
651
+ params(
652
+ amount: Integer,
653
+ conversion_rate: String,
654
+ currency: String
655
+ ).returns(T.attached_class)
656
+ end
657
+ def self.new(
658
+ # Amount in the smallest unit of the applicable currency (e.g., cents)
659
+ amount:,
660
+ # Exchange rate used for currency conversion
661
+ conversion_rate:,
662
+ # 3-character alphabetic ISO 4217 currency
663
+ currency:
664
+ )
665
+ end
666
+
667
+ sig do
668
+ override.returns(
669
+ { amount: Integer, conversion_rate: String, currency: String }
670
+ )
671
+ end
672
+ def to_hash
673
+ end
674
+ end
675
+
676
+ class Hold < Lithic::Internal::Type::BaseModel
677
+ OrHash =
678
+ T.type_alias do
679
+ T.any(
680
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Amounts::Hold,
681
+ Lithic::Internal::AnyHash
682
+ )
683
+ end
684
+
685
+ # Amount in the smallest unit of the applicable currency (e.g., cents)
686
+ sig { returns(Integer) }
687
+ attr_accessor :amount
688
+
689
+ # 3-character alphabetic ISO 4217 currency
690
+ sig { returns(String) }
691
+ attr_accessor :currency
692
+
693
+ sig do
694
+ params(amount: Integer, currency: String).returns(T.attached_class)
695
+ end
696
+ def self.new(
697
+ # Amount in the smallest unit of the applicable currency (e.g., cents)
698
+ amount:,
699
+ # 3-character alphabetic ISO 4217 currency
700
+ currency:
701
+ )
702
+ end
703
+
704
+ sig { override.returns({ amount: Integer, currency: String }) }
705
+ def to_hash
706
+ end
707
+ end
708
+
709
+ class Merchant < Lithic::Internal::Type::BaseModel
710
+ OrHash =
711
+ T.type_alias do
712
+ T.any(
713
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Amounts::Merchant,
714
+ Lithic::Internal::AnyHash
715
+ )
716
+ end
717
+
718
+ # Amount in the smallest unit of the applicable currency (e.g., cents)
719
+ sig { returns(Integer) }
720
+ attr_accessor :amount
721
+
722
+ # 3-character alphabetic ISO 4217 currency
723
+ sig { returns(String) }
724
+ attr_accessor :currency
725
+
726
+ sig do
727
+ params(amount: Integer, currency: String).returns(T.attached_class)
728
+ end
729
+ def self.new(
730
+ # Amount in the smallest unit of the applicable currency (e.g., cents)
731
+ amount:,
732
+ # 3-character alphabetic ISO 4217 currency
733
+ currency:
734
+ )
735
+ end
736
+
737
+ sig { override.returns({ amount: Integer, currency: String }) }
738
+ def to_hash
739
+ end
740
+ end
741
+
742
+ class Settlement < Lithic::Internal::Type::BaseModel
743
+ OrHash =
744
+ T.type_alias do
745
+ T.any(
746
+ Lithic::CardAuthorizationApprovalRequestWebhookEvent::Amounts::Settlement,
747
+ Lithic::Internal::AnyHash
748
+ )
749
+ end
750
+
751
+ # Amount in the smallest unit of the applicable currency (e.g., cents)
752
+ sig { returns(Integer) }
753
+ attr_accessor :amount
754
+
755
+ # 3-character alphabetic ISO 4217 currency
756
+ sig { returns(String) }
757
+ attr_accessor :currency
758
+
759
+ sig do
760
+ params(amount: Integer, currency: String).returns(T.attached_class)
761
+ end
762
+ def self.new(
763
+ # Amount in the smallest unit of the applicable currency (e.g., cents)
764
+ amount:,
765
+ # 3-character alphabetic ISO 4217 currency
766
+ currency:
767
+ )
768
+ end
769
+
770
+ sig { override.returns({ amount: Integer, currency: String }) }
771
+ def to_hash
772
+ end
773
+ end
774
+ end
775
+
475
776
  class Avs < Lithic::Internal::Type::BaseModel
476
777
  OrHash =
477
778
  T.type_alias do
@@ -43,6 +43,17 @@ module Lithic
43
43
  end
44
44
  attr_writer :customer_tokenization_decision
45
45
 
46
+ # Contains the metadata for the digital wallet being tokenized.
47
+ sig { returns(Lithic::TokenMetadata) }
48
+ attr_reader :digital_wallet_token_metadata
49
+
50
+ sig do
51
+ params(
52
+ digital_wallet_token_metadata: Lithic::TokenMetadata::OrHash
53
+ ).void
54
+ end
55
+ attr_writer :digital_wallet_token_metadata
56
+
46
57
  # The name of this event
47
58
  sig do
48
59
  returns(
@@ -88,18 +99,6 @@ module Lithic
88
99
  sig { params(device: Lithic::Device::OrHash).void }
89
100
  attr_writer :device
90
101
 
91
- # Contains the metadata for the digital wallet being tokenized.
92
- sig { returns(T.nilable(Lithic::DigitalWalletTokenMetadata)) }
93
- attr_reader :digital_wallet_token_metadata
94
-
95
- sig do
96
- params(
97
- digital_wallet_token_metadata:
98
- Lithic::DigitalWalletTokenMetadata::OrHash
99
- ).void
100
- end
101
- attr_writer :digital_wallet_token_metadata
102
-
103
102
  # Results from rules that were evaluated for this tokenization
104
103
  sig { returns(T.nilable(T::Array[Lithic::TokenizationRuleResult])) }
105
104
  attr_reader :rule_results
@@ -170,6 +169,7 @@ module Lithic
170
169
  T.nilable(
171
170
  Lithic::DigitalWalletTokenizationApprovalRequestWebhookEvent::CustomerTokenizationDecision::OrHash
172
171
  ),
172
+ digital_wallet_token_metadata: Lithic::TokenMetadata::OrHash,
173
173
  event_type:
174
174
  Lithic::DigitalWalletTokenizationApprovalRequestWebhookEvent::EventType::OrSymbol,
175
175
  issuer_decision:
@@ -179,8 +179,6 @@ module Lithic
179
179
  tokenization_token: String,
180
180
  wallet_decisioning_info: Lithic::WalletDecisioningInfo::OrHash,
181
181
  device: Lithic::Device::OrHash,
182
- digital_wallet_token_metadata:
183
- Lithic::DigitalWalletTokenMetadata::OrHash,
184
182
  rule_results: T::Array[Lithic::TokenizationRuleResult::OrHash],
185
183
  tokenization_decline_reasons:
186
184
  T::Array[Lithic::TokenizationDeclineReason::OrSymbol],
@@ -199,6 +197,8 @@ module Lithic
199
197
  created:,
200
198
  # Contains the metadata for the customer tokenization decision.
201
199
  customer_tokenization_decision:,
200
+ # Contains the metadata for the digital wallet being tokenized.
201
+ digital_wallet_token_metadata:,
202
202
  # The name of this event
203
203
  event_type:,
204
204
  # Whether Lithic decisioned on the token, and if so, what the decision was.
@@ -210,8 +210,6 @@ module Lithic
210
210
  tokenization_token:,
211
211
  wallet_decisioning_info:,
212
212
  device: nil,
213
- # Contains the metadata for the digital wallet being tokenized.
214
- digital_wallet_token_metadata: nil,
215
213
  # Results from rules that were evaluated for this tokenization
216
214
  rule_results: nil,
217
215
  # List of reasons why the tokenization was declined
@@ -233,6 +231,7 @@ module Lithic
233
231
  T.nilable(
234
232
  Lithic::DigitalWalletTokenizationApprovalRequestWebhookEvent::CustomerTokenizationDecision
235
233
  ),
234
+ digital_wallet_token_metadata: Lithic::TokenMetadata,
236
235
  event_type:
237
236
  Lithic::DigitalWalletTokenizationApprovalRequestWebhookEvent::EventType::TaggedSymbol,
238
237
  issuer_decision:
@@ -242,7 +241,6 @@ module Lithic
242
241
  tokenization_token: String,
243
242
  wallet_decisioning_info: Lithic::WalletDecisioningInfo,
244
243
  device: Lithic::Device,
245
- digital_wallet_token_metadata: Lithic::DigitalWalletTokenMetadata,
246
244
  rule_results: T::Array[Lithic::TokenizationRuleResult],
247
245
  tokenization_decline_reasons:
248
246
  T::Array[Lithic::TokenizationDeclineReason::TaggedSymbol],
@@ -292,6 +292,11 @@ module Lithic
292
292
  )
293
293
  DELINQUENT =
294
294
  T.let(:DELINQUENT, Lithic::FinancialAccount::Substatus::TaggedSymbol)
295
+ INTEREST_AND_FEES_PAUSED =
296
+ T.let(
297
+ :INTEREST_AND_FEES_PAUSED,
298
+ Lithic::FinancialAccount::Substatus::TaggedSymbol
299
+ )
295
300
 
296
301
  sig do
297
302
  override.returns(
@@ -148,6 +148,11 @@ module Lithic
148
148
  :CHARGED_OFF_DELINQUENT,
149
149
  Lithic::FinancialAccountUpdateStatusParams::Substatus::TaggedSymbol
150
150
  )
151
+ INTEREST_AND_FEES_PAUSED =
152
+ T.let(
153
+ :INTEREST_AND_FEES_PAUSED,
154
+ Lithic::FinancialAccountUpdateStatusParams::Substatus::TaggedSymbol
155
+ )
151
156
 
152
157
  sig do
153
158
  override.returns(
@@ -0,0 +1,45 @@
1
+ # typed: strong
2
+
3
+ module Lithic
4
+ module Models
5
+ module FinancialAccounts
6
+ class CategoryTier < Lithic::Internal::Type::BaseModel
7
+ OrHash =
8
+ T.type_alias do
9
+ T.any(
10
+ Lithic::FinancialAccounts::CategoryTier,
11
+ Lithic::Internal::AnyHash
12
+ )
13
+ end
14
+
15
+ # Maximum interest rate for this category, e.g. '0.0525' for 5.25%
16
+ sig { returns(T.nilable(String)) }
17
+ attr_reader :cap_rate
18
+
19
+ sig { params(cap_rate: String).void }
20
+ attr_writer :cap_rate
21
+
22
+ # Interest rate for this category, e.g. '0.0525' for 5.25%
23
+ sig { returns(T.nilable(String)) }
24
+ attr_reader :rate
25
+
26
+ sig { params(rate: String).void }
27
+ attr_writer :rate
28
+
29
+ # Rate and rate cap for interest on a category
30
+ sig { params(cap_rate: String, rate: String).returns(T.attached_class) }
31
+ def self.new(
32
+ # Maximum interest rate for this category, e.g. '0.0525' for 5.25%
33
+ cap_rate: nil,
34
+ # Interest rate for this category, e.g. '0.0525' for 5.25%
35
+ rate: nil
36
+ )
37
+ end
38
+
39
+ sig { override.returns({ cap_rate: String, rate: String }) }
40
+ def to_hash
41
+ end
42
+ end
43
+ end
44
+ end
45
+ end