lithic 0.3.0 → 0.5.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 (122) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +73 -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/auth_rules/conditional_ach_action_parameters.rb +3 -3
  14. data/lib/lithic/models/auth_rules/conditional_tokenization_action_parameters.rb +47 -21
  15. data/lib/lithic/models/auth_rules/v2_list_results_params.rb +70 -0
  16. data/lib/lithic/models/auth_rules/v2_list_results_response.rb +740 -0
  17. data/lib/lithic/models/auth_rules/velocity_limit_params.rb +21 -21
  18. data/lib/lithic/models/book_transfer_create_params.rb +9 -1
  19. data/lib/lithic/models/card_authorization_approval_request_webhook_event.rb +178 -25
  20. data/lib/lithic/models/card_create_params.rb +12 -5
  21. data/lib/lithic/models/card_updated_webhook_event.rb +40 -0
  22. data/lib/lithic/models/card_web_provision_response.rb +5 -5
  23. data/lib/lithic/models/event.rb +3 -0
  24. data/lib/lithic/models/event_list_params.rb +2 -0
  25. data/lib/lithic/models/event_subscription.rb +2 -0
  26. data/lib/lithic/models/events/subscription_create_params.rb +2 -0
  27. data/lib/lithic/models/events/subscription_send_simulated_example_params.rb +1 -0
  28. data/lib/lithic/models/events/subscription_update_params.rb +2 -0
  29. data/lib/lithic/models/financial_transaction.rb +4 -2
  30. data/lib/lithic/models/kyb.rb +10 -1
  31. data/lib/lithic/models/non_pci_card.rb +8 -10
  32. data/lib/lithic/models/parsed_webhook_event.rb +13 -2
  33. data/lib/lithic/models/payment.rb +1 -1
  34. data/lib/lithic/models/payment_create_params.rb +1 -1
  35. data/lib/lithic/models/transaction.rb +10 -1
  36. data/lib/lithic/models/transaction_simulate_authorization_params.rb +25 -1
  37. data/lib/lithic/models/transaction_simulate_credit_authorization_advice_params.rb +25 -1
  38. data/lib/lithic/models.rb +2 -0
  39. data/lib/lithic/resources/account_holders.rb +6 -2
  40. data/lib/lithic/resources/auth_rules/v2.rb +42 -0
  41. data/lib/lithic/resources/book_transfers.rb +3 -1
  42. data/lib/lithic/resources/cards.rb +32 -22
  43. data/lib/lithic/resources/financial_accounts.rb +5 -5
  44. data/lib/lithic/resources/transactions.rb +14 -2
  45. data/lib/lithic/resources/webhooks.rb +1 -1
  46. data/lib/lithic/version.rb +1 -1
  47. data/lib/lithic.rb +3 -0
  48. data/rbi/lithic/internal/util.rbi +1 -1
  49. data/rbi/lithic/models/account_holder.rbi +19 -6
  50. data/rbi/lithic/models/account_holder_create_params.rbi +13 -0
  51. data/rbi/lithic/models/account_holder_simulate_enrollment_review_params.rbi +5 -0
  52. data/rbi/lithic/models/account_holder_simulate_enrollment_review_response.rbi +19 -6
  53. data/rbi/lithic/models/account_holder_update_params.rbi +13 -0
  54. data/rbi/lithic/models/account_holder_update_response.rbi +19 -6
  55. data/rbi/lithic/models/account_holder_updated_webhook_event.rbi +13 -0
  56. data/rbi/lithic/models/auth_rules/conditional_ach_action_parameters.rbi +3 -3
  57. data/rbi/lithic/models/auth_rules/conditional_tokenization_action_parameters.rbi +69 -30
  58. data/rbi/lithic/models/auth_rules/v2_list_results_params.rbi +112 -0
  59. data/rbi/lithic/models/auth_rules/v2_list_results_response.rbi +1826 -0
  60. data/rbi/lithic/models/auth_rules/velocity_limit_params.rbi +47 -45
  61. data/rbi/lithic/models/book_transfer_create_params.rbi +11 -0
  62. data/rbi/lithic/models/card_authorization_approval_request_webhook_event.rbi +337 -36
  63. data/rbi/lithic/models/card_create_params.rbi +15 -6
  64. data/rbi/lithic/models/card_updated_webhook_event.rbi +61 -0
  65. data/rbi/lithic/models/card_web_provision_response.rbi +5 -10
  66. data/rbi/lithic/models/event.rbi +5 -0
  67. data/rbi/lithic/models/event_list_params.rbi +6 -0
  68. data/rbi/lithic/models/event_subscription.rbi +6 -0
  69. data/rbi/lithic/models/events/subscription_create_params.rbi +6 -0
  70. data/rbi/lithic/models/events/subscription_send_simulated_example_params.rbi +5 -0
  71. data/rbi/lithic/models/events/subscription_update_params.rbi +6 -0
  72. data/rbi/lithic/models/financial_transaction.rbi +8 -4
  73. data/rbi/lithic/models/kyb.rbi +13 -0
  74. data/rbi/lithic/models/non_pci_card.rbi +12 -15
  75. data/rbi/lithic/models/parsed_webhook_event.rbi +14 -0
  76. data/rbi/lithic/models/payment.rbi +5 -2
  77. data/rbi/lithic/models/transaction.rbi +10 -0
  78. data/rbi/lithic/models/transaction_simulate_authorization_params.rbi +33 -0
  79. data/rbi/lithic/models/transaction_simulate_credit_authorization_advice_params.rbi +33 -0
  80. data/rbi/lithic/models.rbi +2 -0
  81. data/rbi/lithic/resources/account_holders.rbi +8 -0
  82. data/rbi/lithic/resources/auth_rules/v2.rbi +42 -0
  83. data/rbi/lithic/resources/book_transfers.rbi +3 -0
  84. data/rbi/lithic/resources/cards.rbi +51 -45
  85. data/rbi/lithic/resources/financial_accounts.rbi +5 -5
  86. data/rbi/lithic/resources/transactions.rbi +18 -0
  87. data/rbi/lithic/resources/webhooks.rbi +62 -1
  88. data/sig/lithic/models/account_holder.rbs +7 -0
  89. data/sig/lithic/models/account_holder_create_params.rbs +7 -0
  90. data/sig/lithic/models/account_holder_simulate_enrollment_review_params.rbs +2 -1
  91. data/sig/lithic/models/account_holder_simulate_enrollment_review_response.rbs +7 -0
  92. data/sig/lithic/models/account_holder_update_params.rbs +7 -0
  93. data/sig/lithic/models/account_holder_update_response.rbs +7 -0
  94. data/sig/lithic/models/account_holder_updated_webhook_event.rbs +7 -0
  95. data/sig/lithic/models/auth_rules/v2_list_results_params.rbs +65 -0
  96. data/sig/lithic/models/auth_rules/v2_list_results_response.rbs +752 -0
  97. data/sig/lithic/models/auth_rules/velocity_limit_params.rbs +20 -16
  98. data/sig/lithic/models/book_transfer_create_params.rbs +7 -0
  99. data/sig/lithic/models/card_authorization_approval_request_webhook_event.rbs +96 -0
  100. data/sig/lithic/models/card_create_params.rbs +8 -1
  101. data/sig/lithic/models/card_updated_webhook_event.rbs +35 -0
  102. data/sig/lithic/models/card_web_provision_response.rbs +4 -10
  103. data/sig/lithic/models/event.rbs +2 -0
  104. data/sig/lithic/models/event_list_params.rbs +2 -0
  105. data/sig/lithic/models/event_subscription.rbs +2 -0
  106. data/sig/lithic/models/events/subscription_create_params.rbs +2 -0
  107. data/sig/lithic/models/events/subscription_send_simulated_example_params.rbs +2 -0
  108. data/sig/lithic/models/events/subscription_update_params.rbs +2 -0
  109. data/sig/lithic/models/kyb.rbs +7 -0
  110. data/sig/lithic/models/parsed_webhook_event.rbs +8 -0
  111. data/sig/lithic/models/payment.rbs +2 -2
  112. data/sig/lithic/models/transaction.rbs +5 -0
  113. data/sig/lithic/models/transaction_simulate_authorization_params.rbs +21 -0
  114. data/sig/lithic/models/transaction_simulate_credit_authorization_advice_params.rbs +22 -1
  115. data/sig/lithic/models.rbs +2 -0
  116. data/sig/lithic/resources/account_holders.rbs +2 -0
  117. data/sig/lithic/resources/auth_rules/v2.rbs +10 -0
  118. data/sig/lithic/resources/book_transfers.rbs +1 -0
  119. data/sig/lithic/resources/cards.rbs +1 -0
  120. data/sig/lithic/resources/transactions.rbs +6 -0
  121. data/sig/lithic/resources/webhooks.rbs +58 -1
  122. metadata +25 -2
@@ -4,11 +4,6 @@ module Lithic
4
4
  module Models
5
5
  module AuthRules
6
6
  class VelocityLimitParams < Lithic::Internal::Type::BaseModel
7
- # @!attribute filters
8
- #
9
- # @return [Lithic::Models::AuthRules::VelocityLimitParams::Filters]
10
- required :filters, -> { Lithic::AuthRules::VelocityLimitParams::Filters }
11
-
12
7
  # @!attribute period
13
8
  # Velocity over the current day since 00:00 / 12 AM in Eastern Time
14
9
  #
@@ -21,6 +16,11 @@ module Lithic
21
16
  # @return [Symbol, Lithic::Models::AuthRules::VelocityLimitParams::Scope]
22
17
  required :scope, enum: -> { Lithic::AuthRules::VelocityLimitParams::Scope }
23
18
 
19
+ # @!attribute filters
20
+ #
21
+ # @return [Lithic::Models::AuthRules::VelocityLimitParams::Filters, nil]
22
+ optional :filters, -> { Lithic::AuthRules::VelocityLimitParams::Filters }
23
+
24
24
  # @!attribute limit_amount
25
25
  # The maximum amount of spend velocity allowed in the period in minor units (the
26
26
  # smallest unit of a currency, e.g. cents for USD). Transactions exceeding this
@@ -39,20 +39,33 @@ module Lithic
39
39
  # @return [Integer, nil]
40
40
  optional :limit_count, Integer, nil?: true
41
41
 
42
- # @!method initialize(filters:, period:, scope:, limit_amount: nil, limit_count: nil)
42
+ # @!method initialize(period:, scope:, filters: nil, limit_amount: nil, limit_count: nil)
43
43
  # Some parameter documentations has been truncated, see
44
44
  # {Lithic::Models::AuthRules::VelocityLimitParams} for more details.
45
45
  #
46
- # @param filters [Lithic::Models::AuthRules::VelocityLimitParams::Filters]
47
- #
48
46
  # @param period [Lithic::Models::AuthRules::VelocityLimitPeriod::TrailingWindowObject, Lithic::Models::AuthRules::VelocityLimitPeriod::FixedWindowDay, Lithic::Models::AuthRules::VelocityLimitPeriod::FixedWindowWeek, Lithic::Models::AuthRules::VelocityLimitPeriod::FixedWindowMonth, Lithic::Models::AuthRules::VelocityLimitPeriod::FixedWindowYear] Velocity over the current day since 00:00 / 12 AM in Eastern Time
49
47
  #
50
48
  # @param scope [Symbol, Lithic::Models::AuthRules::VelocityLimitParams::Scope] The scope the velocity is calculated for
51
49
  #
50
+ # @param filters [Lithic::Models::AuthRules::VelocityLimitParams::Filters]
51
+ #
52
52
  # @param limit_amount [Integer, nil] The maximum amount of spend velocity allowed in the period in minor units (the s
53
53
  #
54
54
  # @param limit_count [Integer, nil] The number of spend velocity impacting transactions may not exceed this limit in
55
55
 
56
+ # The scope the velocity is calculated for
57
+ #
58
+ # @see Lithic::Models::AuthRules::VelocityLimitParams#scope
59
+ module Scope
60
+ extend Lithic::Internal::Type::Enum
61
+
62
+ CARD = :CARD
63
+ ACCOUNT = :ACCOUNT
64
+
65
+ # @!method self.values
66
+ # @return [Array<Symbol>]
67
+ end
68
+
56
69
  # @see Lithic::Models::AuthRules::VelocityLimitParams#filters
57
70
  class Filters < Lithic::Internal::Type::BaseModel
58
71
  # @!attribute exclude_countries
@@ -133,19 +146,6 @@ module Lithic
133
146
  # @return [Array<Symbol>]
134
147
  end
135
148
  end
136
-
137
- # The scope the velocity is calculated for
138
- #
139
- # @see Lithic::Models::AuthRules::VelocityLimitParams#scope
140
- module Scope
141
- extend Lithic::Internal::Type::Enum
142
-
143
- CARD = :CARD
144
- ACCOUNT = :ACCOUNT
145
-
146
- # @!method self.values
147
- # @return [Array<Symbol>]
148
- end
149
149
  end
150
150
  end
151
151
  end
@@ -58,6 +58,12 @@ module Lithic
58
58
  # @return [String, nil]
59
59
  optional :external_id, String
60
60
 
61
+ # @!attribute hold_token
62
+ # Token of an existing hold to settle when this transfer is initiated
63
+ #
64
+ # @return [String, nil]
65
+ optional :hold_token, String
66
+
61
67
  # @!attribute memo
62
68
  # Optional descriptor for the transfer.
63
69
  #
@@ -70,7 +76,7 @@ module Lithic
70
76
  # @return [Symbol, Lithic::Models::BookTransferCreateParams::OnClosedAccount, nil]
71
77
  optional :on_closed_account, enum: -> { Lithic::BookTransferCreateParams::OnClosedAccount }
72
78
 
73
- # @!method initialize(amount:, category:, from_financial_account_token:, subtype:, to_financial_account_token:, type:, token: nil, external_id: nil, memo: nil, on_closed_account: nil, request_options: {})
79
+ # @!method initialize(amount:, category:, from_financial_account_token:, subtype:, to_financial_account_token:, type:, token: nil, external_id: nil, hold_token: nil, memo: nil, on_closed_account: nil, request_options: {})
74
80
  # Some parameter documentations has been truncated, see
75
81
  # {Lithic::Models::BookTransferCreateParams} for more details.
76
82
  #
@@ -90,6 +96,8 @@ module Lithic
90
96
  #
91
97
  # @param external_id [String] External ID defined by the customer
92
98
  #
99
+ # @param hold_token [String] Token of an existing hold to settle when this transfer is initiated
100
+ #
93
101
  # @param memo [String] Optional descriptor for the transfer.
94
102
  #
95
103
  # @param on_closed_account [Symbol, Lithic::Models::BookTransferCreateParams::OnClosedAccount] What to do if the financial account is closed when posting an operation
@@ -18,16 +18,31 @@ module Lithic
18
18
  required :acquirer_fee, Integer
19
19
 
20
20
  # @!attribute amount
21
- # Authorization amount of the transaction (in cents), including any acquirer fees.
22
- # The contents of this field are identical to `authorization_amount`.
21
+ # @deprecated
22
+ #
23
+ # Deprecated, use `amounts`. Authorization amount of the transaction (in cents),
24
+ # including any acquirer fees. The contents of this field are identical to
25
+ # `authorization_amount`.
23
26
  #
24
27
  # @return [Integer]
25
28
  required :amount, Integer
26
29
 
30
+ # @!attribute amounts
31
+ # Structured amounts for this authorization. The `cardholder` and `merchant`
32
+ # amounts reflect the original network authorization values. For programs with
33
+ # hold adjustments enabled (e.g., automated fuel dispensers or tipping MCCs), the
34
+ # `hold` amount may exceed the `cardholder` and `merchant` amounts to account for
35
+ # anticipated final transaction amounts such as tips or fuel fill-ups
36
+ #
37
+ # @return [Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::Amounts]
38
+ required :amounts, -> { Lithic::CardAuthorizationApprovalRequestWebhookEvent::Amounts }
39
+
27
40
  # @!attribute authorization_amount
28
- # The base transaction amount (in cents) plus the acquirer fee field. This is the
29
- # amount the issuer should authorize against unless the issuer is paying the
30
- # acquirer fee on behalf of the cardholder.
41
+ # @deprecated
42
+ #
43
+ # Deprecated, use `amounts`. The base transaction amount (in cents) plus the
44
+ # acquirer fee field. This is the amount the issuer should authorize against
45
+ # unless the issuer is paying the acquirer fee on behalf of the cardholder.
31
46
  #
32
47
  # @return [Integer]
33
48
  required :authorization_amount, Integer
@@ -44,7 +59,10 @@ module Lithic
44
59
  required :card, -> { Lithic::CardAuthorizationApprovalRequestWebhookEvent::Card }
45
60
 
46
61
  # @!attribute cardholder_currency
47
- # 3-character alphabetic ISO 4217 code for cardholder's billing currency.
62
+ # @deprecated
63
+ #
64
+ # Deprecated, use `amounts`. 3-character alphabetic ISO 4217 code for cardholder's
65
+ # billing currency.
48
66
  #
49
67
  # @return [String]
50
68
  required :cardholder_currency, String
@@ -77,24 +95,30 @@ module Lithic
77
95
  required :merchant, -> { Lithic::Merchant }
78
96
 
79
97
  # @!attribute merchant_amount
80
- # The amount that the merchant will receive, denominated in `merchant_currency`
81
- # and in the smallest currency unit. Note the amount includes `acquirer_fee`,
82
- # similar to `authorization_amount`. It will be different from
83
- # `authorization_amount` if the merchant is taking payment in a different
84
- # currency.
98
+ # @deprecated
99
+ #
100
+ # Deprecated, use `amounts`. The amount that the merchant will receive,
101
+ # denominated in `merchant_currency` and in the smallest currency unit. Note the
102
+ # amount includes `acquirer_fee`, similar to `authorization_amount`. It will be
103
+ # different from `authorization_amount` if the merchant is taking payment in a
104
+ # different currency.
85
105
  #
86
106
  # @return [Integer]
87
107
  required :merchant_amount, Integer
88
108
 
89
109
  # @!attribute merchant_currency
110
+ # @deprecated
111
+ #
90
112
  # 3-character alphabetic ISO 4217 code for the local currency of the transaction.
91
113
  #
92
114
  # @return [String]
93
115
  required :merchant_currency, String
94
116
 
95
117
  # @!attribute settled_amount
96
- # Amount (in cents) of the transaction that has been settled, including any
97
- # acquirer fees
118
+ # @deprecated
119
+ #
120
+ # Deprecated, use `amounts`. Amount (in cents) of the transaction that has been
121
+ # settled, including any acquirer fees.
98
122
  #
99
123
  # @return [Integer]
100
124
  required :settled_amount, Integer
@@ -131,11 +155,13 @@ module Lithic
131
155
  optional :cashback, Integer
132
156
 
133
157
  # @!attribute conversion_rate
134
- # If the transaction was requested in a currency other than the settlement
135
- # currency, this field will be populated to indicate the rate used to translate
136
- # the merchant_amount to the amount (i.e., `merchant_amount` x `conversion_rate` =
137
- # `amount`). Note that the `merchant_amount` is in the local currency and the
138
- # amount is in the settlement currency.
158
+ # @deprecated
159
+ #
160
+ # Deprecated, use `amounts`. If the transaction was requested in a currency other
161
+ # than the settlement currency, this field will be populated to indicate the rate
162
+ # used to translate the merchant_amount to the amount (i.e., `merchant_amount` x
163
+ # `conversion_rate` = `amount`). Note that the `merchant_amount` is in the local
164
+ # currency and the amount is in the settlement currency.
139
165
  #
140
166
  # @return [Float, nil]
141
167
  optional :conversion_rate, Float
@@ -206,7 +232,7 @@ module Lithic
206
232
  # @return [Time, nil]
207
233
  optional :ttl, Time
208
234
 
209
- # @!method initialize(token:, acquirer_fee:, amount:, authorization_amount:, avs:, card:, cardholder_currency:, cash_amount:, created:, merchant:, merchant_amount:, merchant_currency:, settled_amount:, status:, transaction_initiator:, account_type: nil, cardholder_authentication: nil, cashback: nil, conversion_rate: nil, event_token: nil, fleet_info: nil, latest_challenge: nil, network: nil, network_risk_score: nil, network_specific_data: nil, pos: nil, token_info: nil, ttl: nil, event_type: :"card_authorization.approval_request")
235
+ # @!method initialize(token:, acquirer_fee:, amount:, amounts:, authorization_amount:, avs:, card:, cardholder_currency:, cash_amount:, created:, merchant:, merchant_amount:, merchant_currency:, settled_amount:, status:, transaction_initiator:, account_type: nil, cardholder_authentication: nil, cashback: nil, conversion_rate: nil, event_token: nil, fleet_info: nil, latest_challenge: nil, network: nil, network_risk_score: nil, network_specific_data: nil, pos: nil, token_info: nil, ttl: nil, event_type: :"card_authorization.approval_request")
210
236
  # Some parameter documentations has been truncated, see
211
237
  # {Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent} for more details.
212
238
  #
@@ -214,15 +240,17 @@ module Lithic
214
240
  #
215
241
  # @param acquirer_fee [Integer] Fee (in cents) assessed by the merchant and paid for by the cardholder. Will be
216
242
  #
217
- # @param amount [Integer] Authorization amount of the transaction (in cents), including any acquirer fees.
243
+ # @param amount [Integer] Deprecated, use `amounts`. Authorization amount of the transaction (in cents), i
244
+ #
245
+ # @param amounts [Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::Amounts] Structured amounts for this authorization. The `cardholder` and `merchant` amoun
218
246
  #
219
- # @param authorization_amount [Integer] The base transaction amount (in cents) plus the acquirer fee field. This is the
247
+ # @param authorization_amount [Integer] Deprecated, use `amounts`. The base transaction amount (in cents) plus the acqui
220
248
  #
221
249
  # @param avs [Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::Avs]
222
250
  #
223
251
  # @param card [Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::Card] Card object in ASA
224
252
  #
225
- # @param cardholder_currency [String] 3-character alphabetic ISO 4217 code for cardholder's billing currency.
253
+ # @param cardholder_currency [String] Deprecated, use `amounts`. 3-character alphabetic ISO 4217 code for cardholder's
226
254
  #
227
255
  # @param cash_amount [Integer] The portion of the transaction requested as cash back by the cardholder, and doe
228
256
  #
@@ -230,11 +258,11 @@ module Lithic
230
258
  #
231
259
  # @param merchant [Lithic::Models::Merchant]
232
260
  #
233
- # @param merchant_amount [Integer] The amount that the merchant will receive, denominated in `merchant_currency` an
261
+ # @param merchant_amount [Integer] Deprecated, use `amounts`. The amount that the merchant will receive, denominate
234
262
  #
235
263
  # @param merchant_currency [String] 3-character alphabetic ISO 4217 code for the local currency of the transaction.
236
264
  #
237
- # @param settled_amount [Integer] Amount (in cents) of the transaction that has been settled, including any acquir
265
+ # @param settled_amount [Integer] Deprecated, use `amounts`. Amount (in cents) of the transaction that has been se
238
266
  #
239
267
  # @param status [Symbol, Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::Status] The type of authorization request that this request is for. Note that `CREDIT_AU
240
268
  #
@@ -246,7 +274,7 @@ module Lithic
246
274
  #
247
275
  # @param cashback [Integer] Deprecated, use `cash_amount`.
248
276
  #
249
- # @param conversion_rate [Float] If the transaction was requested in a currency other than the settlement currenc
277
+ # @param conversion_rate [Float] Deprecated, use `amounts`. If the transaction was requested in a currency other
250
278
  #
251
279
  # @param event_token [String] The event token associated with the authorization. This field is only set for pr
252
280
  #
@@ -268,6 +296,131 @@ module Lithic
268
296
  #
269
297
  # @param event_type [Symbol, :"card_authorization.approval_request"]
270
298
 
299
+ # @see Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent#amounts
300
+ class Amounts < Lithic::Internal::Type::BaseModel
301
+ # @!attribute cardholder
302
+ #
303
+ # @return [Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::Amounts::Cardholder]
304
+ required :cardholder, -> { Lithic::CardAuthorizationApprovalRequestWebhookEvent::Amounts::Cardholder }
305
+
306
+ # @!attribute hold
307
+ #
308
+ # @return [Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::Amounts::Hold, nil]
309
+ required :hold, -> { Lithic::CardAuthorizationApprovalRequestWebhookEvent::Amounts::Hold }, nil?: true
310
+
311
+ # @!attribute merchant
312
+ #
313
+ # @return [Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::Amounts::Merchant]
314
+ required :merchant, -> { Lithic::CardAuthorizationApprovalRequestWebhookEvent::Amounts::Merchant }
315
+
316
+ # @!attribute settlement
317
+ #
318
+ # @return [Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::Amounts::Settlement, nil]
319
+ required :settlement,
320
+ -> { Lithic::CardAuthorizationApprovalRequestWebhookEvent::Amounts::Settlement },
321
+ nil?: true
322
+
323
+ # @!method initialize(cardholder:, hold:, merchant:, settlement:)
324
+ # Structured amounts for this authorization. The `cardholder` and `merchant`
325
+ # amounts reflect the original network authorization values. For programs with
326
+ # hold adjustments enabled (e.g., automated fuel dispensers or tipping MCCs), the
327
+ # `hold` amount may exceed the `cardholder` and `merchant` amounts to account for
328
+ # anticipated final transaction amounts such as tips or fuel fill-ups
329
+ #
330
+ # @param cardholder [Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::Amounts::Cardholder]
331
+ # @param hold [Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::Amounts::Hold, nil]
332
+ # @param merchant [Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::Amounts::Merchant]
333
+ # @param settlement [Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::Amounts::Settlement, nil]
334
+
335
+ # @see Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::Amounts#cardholder
336
+ class Cardholder < Lithic::Internal::Type::BaseModel
337
+ # @!attribute amount
338
+ # Amount in the smallest unit of the applicable currency (e.g., cents)
339
+ #
340
+ # @return [Integer]
341
+ required :amount, Integer
342
+
343
+ # @!attribute conversion_rate
344
+ # Exchange rate used for currency conversion
345
+ #
346
+ # @return [String]
347
+ required :conversion_rate, String
348
+
349
+ # @!attribute currency
350
+ # 3-character alphabetic ISO 4217 currency
351
+ #
352
+ # @return [String]
353
+ required :currency, String
354
+
355
+ # @!method initialize(amount:, conversion_rate:, currency:)
356
+ # @param amount [Integer] Amount in the smallest unit of the applicable currency (e.g., cents)
357
+ #
358
+ # @param conversion_rate [String] Exchange rate used for currency conversion
359
+ #
360
+ # @param currency [String] 3-character alphabetic ISO 4217 currency
361
+ end
362
+
363
+ # @see Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::Amounts#hold
364
+ class Hold < Lithic::Internal::Type::BaseModel
365
+ # @!attribute amount
366
+ # Amount in the smallest unit of the applicable currency (e.g., cents)
367
+ #
368
+ # @return [Integer]
369
+ required :amount, Integer
370
+
371
+ # @!attribute currency
372
+ # 3-character alphabetic ISO 4217 currency
373
+ #
374
+ # @return [String]
375
+ required :currency, String
376
+
377
+ # @!method initialize(amount:, currency:)
378
+ # @param amount [Integer] Amount in the smallest unit of the applicable currency (e.g., cents)
379
+ #
380
+ # @param currency [String] 3-character alphabetic ISO 4217 currency
381
+ end
382
+
383
+ # @see Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::Amounts#merchant
384
+ class Merchant < Lithic::Internal::Type::BaseModel
385
+ # @!attribute amount
386
+ # Amount in the smallest unit of the applicable currency (e.g., cents)
387
+ #
388
+ # @return [Integer]
389
+ required :amount, Integer
390
+
391
+ # @!attribute currency
392
+ # 3-character alphabetic ISO 4217 currency
393
+ #
394
+ # @return [String]
395
+ required :currency, String
396
+
397
+ # @!method initialize(amount:, currency:)
398
+ # @param amount [Integer] Amount in the smallest unit of the applicable currency (e.g., cents)
399
+ #
400
+ # @param currency [String] 3-character alphabetic ISO 4217 currency
401
+ end
402
+
403
+ # @see Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent::Amounts#settlement
404
+ class Settlement < Lithic::Internal::Type::BaseModel
405
+ # @!attribute amount
406
+ # Amount in the smallest unit of the applicable currency (e.g., cents)
407
+ #
408
+ # @return [Integer]
409
+ required :amount, Integer
410
+
411
+ # @!attribute currency
412
+ # 3-character alphabetic ISO 4217 currency
413
+ #
414
+ # @return [String]
415
+ required :currency, String
416
+
417
+ # @!method initialize(amount:, currency:)
418
+ # @param amount [Integer] Amount in the smallest unit of the applicable currency (e.g., cents)
419
+ #
420
+ # @param currency [String] 3-character alphabetic ISO 4217 currency
421
+ end
422
+ end
423
+
271
424
  # @see Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent#avs
272
425
  class Avs < Lithic::Internal::Type::BaseModel
273
426
  # @!attribute address
@@ -18,8 +18,8 @@ module Lithic
18
18
  # Reach out at [lithic.com/contact](https://lithic.com/contact) for more
19
19
  # information.
20
20
  # - `SINGLE_USE` - Card is closed upon first successful authorization.
21
- # - `MERCHANT_LOCKED` - _[Deprecated]_ Card is locked to the first merchant that
22
- # successfully authorizes the card.
21
+ # - `MERCHANT_LOCKED` - Card is locked to the first merchant that successfully
22
+ # authorizes the card.
23
23
  # - `UNLOCKED` - _[Deprecated]_ Similar behavior to VIRTUAL cards, please use
24
24
  # VIRTUAL instead.
25
25
  # - `DIGITAL_WALLET` - _[Deprecated]_ Similar behavior to VIRTUAL cards, please
@@ -226,7 +226,12 @@ module Lithic
226
226
  # @return [Symbol, Lithic::Models::CardCreateParams::State, nil]
227
227
  optional :state, enum: -> { Lithic::CardCreateParams::State }
228
228
 
229
- # @!method initialize(type:, account_token: nil, bulk_order_token: nil, card_program_token: nil, carrier: nil, digital_card_art_token: nil, exp_month: nil, exp_year: nil, memo: nil, pin: nil, product_id: nil, replacement_account_token: nil, replacement_comment: nil, replacement_for: nil, replacement_substatus: nil, shipping_address: nil, shipping_method: nil, spend_limit: nil, spend_limit_duration: nil, state: nil, request_options: {})
229
+ # @!attribute idempotency_key
230
+ #
231
+ # @return [String, nil]
232
+ optional :idempotency_key, String
233
+
234
+ # @!method initialize(type:, account_token: nil, bulk_order_token: nil, card_program_token: nil, carrier: nil, digital_card_art_token: nil, exp_month: nil, exp_year: nil, memo: nil, pin: nil, product_id: nil, replacement_account_token: nil, replacement_comment: nil, replacement_for: nil, replacement_substatus: nil, shipping_address: nil, shipping_method: nil, spend_limit: nil, spend_limit_duration: nil, state: nil, idempotency_key: nil, request_options: {})
230
235
  # Some parameter documentations has been truncated, see
231
236
  # {Lithic::Models::CardCreateParams} for more details.
232
237
  #
@@ -270,6 +275,8 @@ module Lithic
270
275
  #
271
276
  # @param state [Symbol, Lithic::Models::CardCreateParams::State] Card state values:
272
277
  #
278
+ # @param idempotency_key [String]
279
+ #
273
280
  # @param request_options [Lithic::RequestOptions, Hash{Symbol=>Object}]
274
281
 
275
282
  # Card types:
@@ -282,8 +289,8 @@ module Lithic
282
289
  # Reach out at [lithic.com/contact](https://lithic.com/contact) for more
283
290
  # information.
284
291
  # - `SINGLE_USE` - Card is closed upon first successful authorization.
285
- # - `MERCHANT_LOCKED` - _[Deprecated]_ Card is locked to the first merchant that
286
- # successfully authorizes the card.
292
+ # - `MERCHANT_LOCKED` - Card is locked to the first merchant that successfully
293
+ # authorizes the card.
287
294
  # - `UNLOCKED` - _[Deprecated]_ Similar behavior to VIRTUAL cards, please use
288
295
  # VIRTUAL instead.
289
296
  # - `DIGITAL_WALLET` - _[Deprecated]_ Similar behavior to VIRTUAL cards, please
@@ -0,0 +1,40 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Lithic
4
+ module Models
5
+ class CardUpdatedWebhookEvent < Lithic::Internal::Type::BaseModel
6
+ # @!attribute card_token
7
+ # The token of the card that was updated.
8
+ #
9
+ # @return [String]
10
+ required :card_token, String
11
+
12
+ # @!attribute event_type
13
+ # The type of event that occurred.
14
+ #
15
+ # @return [Symbol, :"card.updated"]
16
+ required :event_type, const: :"card.updated"
17
+
18
+ # @!attribute previous_fields
19
+ # The previous values of the fields that were updated.
20
+ #
21
+ # @return [Object]
22
+ required :previous_fields, Lithic::Internal::Type::Unknown
23
+
24
+ # @!attribute state
25
+ # The current state of the card.
26
+ #
27
+ # @return [String]
28
+ required :state, String
29
+
30
+ # @!method initialize(card_token:, previous_fields:, state:, event_type: :"card.updated")
31
+ # @param card_token [String] The token of the card that was updated.
32
+ #
33
+ # @param previous_fields [Object] The previous values of the fields that were updated.
34
+ #
35
+ # @param state [String] The current state of the card.
36
+ #
37
+ # @param event_type [Symbol, :"card.updated"] The type of event that occurred.
38
+ end
39
+ end
40
+ end
@@ -14,16 +14,16 @@ module Lithic
14
14
  # @!attribute jws
15
15
  # JWS object required for handoff to Apple's script.
16
16
  #
17
- # @return [Lithic::Models::CardWebProvisionResponse::AppleWebPushProvisioningResponse::Jws, nil]
18
- optional :jws, -> { Lithic::Models::CardWebProvisionResponse::AppleWebPushProvisioningResponse::Jws }
17
+ # @return [Lithic::Models::CardWebProvisionResponse::AppleWebPushProvisioningResponse::Jws]
18
+ required :jws, -> { Lithic::Models::CardWebProvisionResponse::AppleWebPushProvisioningResponse::Jws }
19
19
 
20
20
  # @!attribute state
21
21
  # A unique identifier for the JWS object.
22
22
  #
23
- # @return [String, nil]
24
- optional :state, String
23
+ # @return [String]
24
+ required :state, String
25
25
 
26
- # @!method initialize(jws: nil, state: nil)
26
+ # @!method initialize(jws:, state:)
27
27
  # @param jws [Lithic::Models::CardWebProvisionResponse::AppleWebPushProvisioningResponse::Jws] JWS object required for handoff to Apple's script.
28
28
  #
29
29
  # @param state [String] A unique identifier for the JWS object.
@@ -44,6 +44,7 @@ module Lithic
44
44
  # - card.reissued: Occurs when a card is reissued.
45
45
  # - card.renewed: Occurs when a card is renewed.
46
46
  # - card.shipped: Occurs when a card is shipped.
47
+ # - card.updated: Occurs when a card is updated.
47
48
  # - digital_wallet.tokenization_approval_request: Occurs when a tokenization
48
49
  # approval request is made. This event will be deprecated in the future. We
49
50
  # recommend using `tokenization.approval_request` instead.
@@ -167,6 +168,7 @@ module Lithic
167
168
  # - card.reissued: Occurs when a card is reissued.
168
169
  # - card.renewed: Occurs when a card is renewed.
169
170
  # - card.shipped: Occurs when a card is shipped.
171
+ # - card.updated: Occurs when a card is updated.
170
172
  # - digital_wallet.tokenization_approval_request: Occurs when a tokenization
171
173
  # approval request is made. This event will be deprecated in the future. We
172
174
  # recommend using `tokenization.approval_request` instead.
@@ -263,6 +265,7 @@ module Lithic
263
265
  CARD_REISSUED = :"card.reissued"
264
266
  CARD_RENEWED = :"card.renewed"
265
267
  CARD_SHIPPED = :"card.shipped"
268
+ CARD_UPDATED = :"card.updated"
266
269
  DIGITAL_WALLET_TOKENIZATION_APPROVAL_REQUEST = :"digital_wallet.tokenization_approval_request"
267
270
  DIGITAL_WALLET_TOKENIZATION_RESULT = :"digital_wallet.tokenization_result"
268
271
  DIGITAL_WALLET_TOKENIZATION_TWO_FACTOR_AUTHENTICATION_CODE =
@@ -98,6 +98,7 @@ module Lithic
98
98
  # - card.reissued: Occurs when a card is reissued.
99
99
  # - card.renewed: Occurs when a card is renewed.
100
100
  # - card.shipped: Occurs when a card is shipped.
101
+ # - card.updated: Occurs when a card is updated.
101
102
  # - digital_wallet.tokenization_approval_request: Occurs when a tokenization
102
103
  # approval request is made. This event will be deprecated in the future. We
103
104
  # recommend using `tokenization.approval_request` instead.
@@ -192,6 +193,7 @@ module Lithic
192
193
  CARD_REISSUED = :"card.reissued"
193
194
  CARD_RENEWED = :"card.renewed"
194
195
  CARD_SHIPPED = :"card.shipped"
196
+ CARD_UPDATED = :"card.updated"
195
197
  DIGITAL_WALLET_TOKENIZATION_APPROVAL_REQUEST = :"digital_wallet.tokenization_approval_request"
196
198
  DIGITAL_WALLET_TOKENIZATION_RESULT = :"digital_wallet.tokenization_result"
197
199
  DIGITAL_WALLET_TOKENIZATION_TWO_FACTOR_AUTHENTICATION_CODE =
@@ -71,6 +71,7 @@ module Lithic
71
71
  # - card.reissued: Occurs when a card is reissued.
72
72
  # - card.renewed: Occurs when a card is renewed.
73
73
  # - card.shipped: Occurs when a card is shipped.
74
+ # - card.updated: Occurs when a card is updated.
74
75
  # - digital_wallet.tokenization_approval_request: Occurs when a tokenization
75
76
  # approval request is made. This event will be deprecated in the future. We
76
77
  # recommend using `tokenization.approval_request` instead.
@@ -165,6 +166,7 @@ module Lithic
165
166
  CARD_REISSUED = :"card.reissued"
166
167
  CARD_RENEWED = :"card.renewed"
167
168
  CARD_SHIPPED = :"card.shipped"
169
+ CARD_UPDATED = :"card.updated"
168
170
  DIGITAL_WALLET_TOKENIZATION_APPROVAL_REQUEST = :"digital_wallet.tokenization_approval_request"
169
171
  DIGITAL_WALLET_TOKENIZATION_RESULT = :"digital_wallet.tokenization_result"
170
172
  DIGITAL_WALLET_TOKENIZATION_TWO_FACTOR_AUTHENTICATION_CODE =
@@ -73,6 +73,7 @@ module Lithic
73
73
  # - card.reissued: Occurs when a card is reissued.
74
74
  # - card.renewed: Occurs when a card is renewed.
75
75
  # - card.shipped: Occurs when a card is shipped.
76
+ # - card.updated: Occurs when a card is updated.
76
77
  # - digital_wallet.tokenization_approval_request: Occurs when a tokenization
77
78
  # approval request is made. This event will be deprecated in the future. We
78
79
  # recommend using `tokenization.approval_request` instead.
@@ -167,6 +168,7 @@ module Lithic
167
168
  CARD_REISSUED = :"card.reissued"
168
169
  CARD_RENEWED = :"card.renewed"
169
170
  CARD_SHIPPED = :"card.shipped"
171
+ CARD_UPDATED = :"card.updated"
170
172
  DIGITAL_WALLET_TOKENIZATION_APPROVAL_REQUEST = :"digital_wallet.tokenization_approval_request"
171
173
  DIGITAL_WALLET_TOKENIZATION_RESULT = :"digital_wallet.tokenization_result"
172
174
  DIGITAL_WALLET_TOKENIZATION_TWO_FACTOR_AUTHENTICATION_CODE =
@@ -39,6 +39,7 @@ module Lithic
39
39
  CARD_REISSUED = :"card.reissued"
40
40
  CARD_RENEWED = :"card.renewed"
41
41
  CARD_SHIPPED = :"card.shipped"
42
+ CARD_UPDATED = :"card.updated"
42
43
  DIGITAL_WALLET_TOKENIZATION_APPROVAL_REQUEST = :"digital_wallet.tokenization_approval_request"
43
44
  DIGITAL_WALLET_TOKENIZATION_RESULT = :"digital_wallet.tokenization_result"
44
45
  DIGITAL_WALLET_TOKENIZATION_TWO_FACTOR_AUTHENTICATION_CODE =
@@ -73,6 +73,7 @@ module Lithic
73
73
  # - card.reissued: Occurs when a card is reissued.
74
74
  # - card.renewed: Occurs when a card is renewed.
75
75
  # - card.shipped: Occurs when a card is shipped.
76
+ # - card.updated: Occurs when a card is updated.
76
77
  # - digital_wallet.tokenization_approval_request: Occurs when a tokenization
77
78
  # approval request is made. This event will be deprecated in the future. We
78
79
  # recommend using `tokenization.approval_request` instead.
@@ -167,6 +168,7 @@ module Lithic
167
168
  CARD_REISSUED = :"card.reissued"
168
169
  CARD_RENEWED = :"card.renewed"
169
170
  CARD_SHIPPED = :"card.shipped"
171
+ CARD_UPDATED = :"card.updated"
170
172
  DIGITAL_WALLET_TOKENIZATION_APPROVAL_REQUEST = :"digital_wallet.tokenization_approval_request"
171
173
  DIGITAL_WALLET_TOKENIZATION_RESULT = :"digital_wallet.tokenization_result"
172
174
  DIGITAL_WALLET_TOKENIZATION_TWO_FACTOR_AUTHENTICATION_CODE =
@@ -49,8 +49,10 @@ module Lithic
49
49
 
50
50
  # @!attribute pending_amount
51
51
  # Pending amount of the transaction in the currency's smallest unit (e.g., cents),
52
- # including any acquirer fees. The value of this field will go to zero over time
53
- # once the financial transaction is settled.
52
+ # including any acquirer fees.
53
+ #
54
+ # The value of this field will go to zero over time once the financial transaction
55
+ # is settled.
54
56
  #
55
57
  # @return [Integer]
56
58
  required :pending_amount, Integer
@@ -81,13 +81,20 @@ module Lithic
81
81
  # @return [String, nil]
82
82
  optional :kyb_passed_timestamp, String
83
83
 
84
+ # @!attribute naics_code
85
+ # 6-digit North American Industry Classification System (NAICS) code for the
86
+ # business.
87
+ #
88
+ # @return [String, nil]
89
+ optional :naics_code, String
90
+
84
91
  # @!attribute website_url
85
92
  # Company website URL.
86
93
  #
87
94
  # @return [String, nil]
88
95
  optional :website_url, String
89
96
 
90
- # @!method initialize(beneficial_owner_individuals:, business_entity:, control_person:, nature_of_business:, tos_timestamp:, workflow:, beneficial_owner_entities: nil, external_id: nil, kyb_passed_timestamp: nil, website_url: nil)
97
+ # @!method initialize(beneficial_owner_individuals:, business_entity:, control_person:, nature_of_business:, tos_timestamp:, workflow:, beneficial_owner_entities: nil, external_id: nil, kyb_passed_timestamp: nil, naics_code: nil, website_url: nil)
91
98
  # Some parameter documentations has been truncated, see {Lithic::Models::KYB} for
92
99
  # more details.
93
100
  #
@@ -109,6 +116,8 @@ module Lithic
109
116
  #
110
117
  # @param kyb_passed_timestamp [String] An RFC 3339 timestamp indicating when precomputed KYB was completed on the busin
111
118
  #
119
+ # @param naics_code [String] 6-digit North American Industry Classification System (NAICS) code for the busin
120
+ #
112
121
  # @param website_url [String] Company website URL.
113
122
 
114
123
  class BeneficialOwnerIndividual < Lithic::Internal::Type::BaseModel