lithic 0.2.0 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +78 -0
- data/README.md +1 -1
- data/lib/lithic/client.rb +5 -10
- data/lib/lithic/internal/transport/pooled_net_requester.rb +12 -10
- data/lib/lithic/internal/util.rb +7 -2
- data/lib/lithic/models/auth_rules/conditional_tokenization_action_parameters.rb +5 -0
- data/lib/lithic/models/auth_rules/velocity_limit_params.rb +21 -21
- data/lib/lithic/models/book_transfer_retry_params.rb +26 -0
- data/lib/lithic/models/{asa_request_webhook_event.rb → card_authorization_approval_request_webhook_event.rb} +151 -129
- data/lib/lithic/models/card_create_params.rb +12 -5
- data/lib/lithic/models/card_updated_webhook_event.rb +40 -0
- data/lib/lithic/models/card_web_provision_response.rb +5 -5
- data/lib/lithic/models/event.rb +3 -0
- data/lib/lithic/models/event_list_params.rb +2 -0
- data/lib/lithic/models/event_subscription.rb +2 -0
- data/lib/lithic/models/events/subscription_create_params.rb +2 -0
- data/lib/lithic/models/events/subscription_send_simulated_example_params.rb +1 -0
- data/lib/lithic/models/events/subscription_update_params.rb +2 -0
- data/lib/lithic/models/external_payment_create_params.rb +15 -1
- data/lib/lithic/models/financial_account.rb +33 -25
- data/lib/lithic/models/financial_account_update_status_params.rb +9 -1
- data/lib/lithic/models/financial_accounts/loan_tape.rb +52 -3
- data/lib/lithic/models/financial_transaction.rb +4 -2
- data/lib/lithic/models/management_operation_create_params.rb +6 -1
- data/lib/lithic/models/non_pci_card.rb +8 -10
- data/lib/lithic/models/parsed_webhook_event.rb +5 -4
- data/lib/lithic/models/payment.rb +10 -1
- data/lib/lithic/models/payment_create_params.rb +1 -1
- data/lib/lithic/models/three_ds_authentication_approval_request_webhook_event.rb +17 -0
- data/lib/lithic/models/transaction.rb +12 -1
- data/lib/lithic/models/transaction_simulate_authorization_params.rb +25 -1
- data/lib/lithic/models/transaction_simulate_credit_authorization_advice_params.rb +25 -1
- data/lib/lithic/models/transfer_limit_list_params.rb +22 -0
- data/lib/lithic/models/transfer_limits_response.rb +274 -0
- data/lib/lithic/models.rb +14 -6
- data/lib/lithic/resources/book_transfers.rb +27 -0
- data/lib/lithic/resources/cards.rb +33 -27
- data/lib/lithic/resources/external_payments.rb +13 -1
- data/lib/lithic/resources/financial_accounts.rb +8 -6
- data/lib/lithic/resources/management_operations.rb +4 -1
- data/lib/lithic/resources/transactions.rb +14 -2
- data/lib/lithic/resources/transfer_limits.rb +37 -0
- data/lib/lithic/resources/webhooks.rb +3 -2
- data/lib/lithic/version.rb +1 -1
- data/lib/lithic.rb +7 -7
- data/rbi/lithic/client.rbi +3 -3
- data/rbi/lithic/models/auth_rules/conditional_tokenization_action_parameters.rbi +11 -0
- data/rbi/lithic/models/auth_rules/velocity_limit_params.rbi +47 -45
- data/rbi/lithic/models/book_transfer_retry_params.rbi +42 -0
- data/rbi/lithic/models/{asa_request_webhook_event.rbi → card_authorization_approval_request_webhook_event.rbi} +394 -256
- data/rbi/lithic/models/card_create_params.rbi +15 -6
- data/rbi/lithic/models/card_updated_webhook_event.rbi +61 -0
- data/rbi/lithic/models/card_web_provision_response.rbi +5 -10
- data/rbi/lithic/models/event.rbi +5 -0
- data/rbi/lithic/models/event_list_params.rbi +6 -0
- data/rbi/lithic/models/event_subscription.rbi +6 -0
- data/rbi/lithic/models/events/subscription_create_params.rbi +6 -0
- data/rbi/lithic/models/events/subscription_send_simulated_example_params.rbi +5 -0
- data/rbi/lithic/models/events/subscription_update_params.rbi +6 -0
- data/rbi/lithic/models/external_payment_create_params.rbi +4 -0
- data/rbi/lithic/models/financial_account.rbi +62 -54
- data/rbi/lithic/models/financial_account_update_status_params.rbi +11 -0
- data/rbi/lithic/models/financial_accounts/loan_tape.rbi +93 -4
- data/rbi/lithic/models/financial_transaction.rbi +8 -4
- data/rbi/lithic/models/management_operation_create_params.rbi +4 -0
- data/rbi/lithic/models/non_pci_card.rbi +12 -15
- data/rbi/lithic/models/parsed_webhook_event.rbi +3 -2
- data/rbi/lithic/models/payment.rbi +16 -3
- data/rbi/lithic/models/three_ds_authentication_approval_request_webhook_event.rbi +27 -0
- data/rbi/lithic/models/transaction.rbi +20 -0
- data/rbi/lithic/models/transaction_simulate_authorization_params.rbi +33 -0
- data/rbi/lithic/models/transaction_simulate_credit_authorization_advice_params.rbi +33 -0
- data/rbi/lithic/models/transfer_limit_list_params.rbi +43 -0
- data/rbi/lithic/models/transfer_limits_response.rbi +604 -0
- data/rbi/lithic/models.rbi +14 -6
- data/rbi/lithic/resources/book_transfers.rbi +18 -0
- data/rbi/lithic/resources/cards.rbi +52 -49
- data/rbi/lithic/resources/external_payments.rbi +2 -0
- data/rbi/lithic/resources/financial_accounts.rbi +8 -5
- data/rbi/lithic/resources/management_operations.rbi +2 -0
- data/rbi/lithic/resources/transactions.rbi +18 -0
- data/rbi/lithic/resources/transfer_limits.rbi +28 -0
- data/rbi/lithic/resources/webhooks.rbi +4 -65
- data/sig/lithic/client.rbs +2 -2
- data/sig/lithic/models/auth_rules/conditional_tokenization_action_parameters.rbs +2 -0
- data/sig/lithic/models/auth_rules/velocity_limit_params.rbs +20 -16
- data/sig/lithic/models/book_transfer_retry_params.rbs +23 -0
- data/sig/lithic/models/{asa_request_webhook_event.rbs → card_authorization_approval_request_webhook_event.rbs} +161 -156
- data/sig/lithic/models/card_create_params.rbs +8 -1
- data/sig/lithic/models/card_updated_webhook_event.rbs +35 -0
- data/sig/lithic/models/card_web_provision_response.rbs +4 -10
- data/sig/lithic/models/event.rbs +2 -0
- data/sig/lithic/models/event_list_params.rbs +2 -0
- data/sig/lithic/models/event_subscription.rbs +2 -0
- data/sig/lithic/models/events/subscription_create_params.rbs +2 -0
- data/sig/lithic/models/events/subscription_send_simulated_example_params.rbs +2 -0
- data/sig/lithic/models/events/subscription_update_params.rbs +2 -0
- data/sig/lithic/models/financial_account.rbs +32 -27
- data/sig/lithic/models/financial_account_update_status_params.rbs +8 -1
- data/sig/lithic/models/financial_accounts/loan_tape.rbs +46 -4
- data/sig/lithic/models/parsed_webhook_event.rbs +3 -2
- data/sig/lithic/models/payment.rbs +10 -3
- data/sig/lithic/models/three_ds_authentication_approval_request_webhook_event.rbs +22 -0
- data/sig/lithic/models/transaction.rbs +9 -0
- data/sig/lithic/models/transaction_simulate_authorization_params.rbs +21 -0
- data/sig/lithic/models/transaction_simulate_credit_authorization_advice_params.rbs +22 -1
- data/sig/lithic/models/transfer_limit_list_params.rbs +22 -0
- data/sig/lithic/models/transfer_limits_response.rbs +232 -0
- data/sig/lithic/models.rbs +12 -6
- data/sig/lithic/resources/book_transfers.rbs +6 -0
- data/sig/lithic/resources/cards.rbs +1 -2
- data/sig/lithic/resources/financial_accounts.rbs +1 -0
- data/sig/lithic/resources/transactions.rbs +6 -0
- data/sig/lithic/resources/transfer_limits.rbs +12 -0
- data/sig/lithic/resources/webhooks.rbs +4 -61
- metadata +37 -23
- data/lib/lithic/models/aggregate_balance.rb +0 -113
- data/lib/lithic/models/aggregate_balance_list_params.rb +0 -35
- data/lib/lithic/models/cards/aggregate_balance_list_params.rb +0 -32
- data/lib/lithic/models/cards/aggregate_balance_list_response.rb +0 -92
- data/lib/lithic/resources/aggregate_balances.rb +0 -38
- data/lib/lithic/resources/cards/aggregate_balances.rb +0 -41
- data/rbi/lithic/models/aggregate_balance.rbi +0 -164
- data/rbi/lithic/models/aggregate_balance_list_params.rbi +0 -104
- data/rbi/lithic/models/cards/aggregate_balance_list_params.rbi +0 -62
- data/rbi/lithic/models/cards/aggregate_balance_list_response.rbi +0 -115
- data/rbi/lithic/resources/aggregate_balances.rbi +0 -28
- data/rbi/lithic/resources/cards/aggregate_balances.rbi +0 -35
- data/sig/lithic/models/aggregate_balance.rbs +0 -78
- data/sig/lithic/models/aggregate_balance_list_params.rbs +0 -43
- data/sig/lithic/models/cards/aggregate_balance_list_params.rbs +0 -34
- data/sig/lithic/models/cards/aggregate_balance_list_response.rbs +0 -62
- data/sig/lithic/resources/aggregate_balances.rbs +0 -12
- data/sig/lithic/resources/cards/aggregate_balances.rbs +0 -15
|
@@ -3,19 +3,31 @@
|
|
|
3
3
|
module Lithic
|
|
4
4
|
module Resources
|
|
5
5
|
class ExternalPayments
|
|
6
|
+
# Some parameter documentations has been truncated, see
|
|
7
|
+
# {Lithic::Models::ExternalPaymentCreateParams} for more details.
|
|
8
|
+
#
|
|
6
9
|
# Create external payment
|
|
7
10
|
#
|
|
8
11
|
# @overload create(amount:, category:, effective_date:, financial_account_token:, payment_type:, token: nil, memo: nil, progress_to: nil, user_defined_id: nil, request_options: {})
|
|
9
12
|
#
|
|
10
13
|
# @param amount [Integer]
|
|
14
|
+
#
|
|
11
15
|
# @param category [Symbol, Lithic::Models::ExternalPaymentCreateParams::Category]
|
|
16
|
+
#
|
|
12
17
|
# @param effective_date [Date]
|
|
18
|
+
#
|
|
13
19
|
# @param financial_account_token [String]
|
|
20
|
+
#
|
|
14
21
|
# @param payment_type [Symbol, Lithic::Models::ExternalPaymentCreateParams::PaymentType]
|
|
15
|
-
#
|
|
22
|
+
#
|
|
23
|
+
# @param token [String] Customer-provided token that will serve as an idempotency token. This token will
|
|
24
|
+
#
|
|
16
25
|
# @param memo [String]
|
|
26
|
+
#
|
|
17
27
|
# @param progress_to [Symbol, Lithic::Models::ExternalPaymentCreateParams::ProgressTo]
|
|
28
|
+
#
|
|
18
29
|
# @param user_defined_id [String]
|
|
30
|
+
#
|
|
19
31
|
# @param request_options [Lithic::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
20
32
|
#
|
|
21
33
|
# @return [Lithic::Models::ExternalPayment]
|
|
@@ -22,15 +22,15 @@ module Lithic
|
|
|
22
22
|
#
|
|
23
23
|
# @overload create(nickname:, type:, account_token: nil, is_for_benefit_of: nil, idempotency_key: nil, request_options: {})
|
|
24
24
|
#
|
|
25
|
-
# @param nickname [String] Body param
|
|
25
|
+
# @param nickname [String] Body param
|
|
26
26
|
#
|
|
27
|
-
# @param type [Symbol, Lithic::Models::FinancialAccountCreateParams::Type] Body param
|
|
27
|
+
# @param type [Symbol, Lithic::Models::FinancialAccountCreateParams::Type] Body param
|
|
28
28
|
#
|
|
29
|
-
# @param account_token [String] Body param
|
|
29
|
+
# @param account_token [String] Body param
|
|
30
30
|
#
|
|
31
|
-
# @param is_for_benefit_of [Boolean] Body param
|
|
31
|
+
# @param is_for_benefit_of [Boolean] Body param
|
|
32
32
|
#
|
|
33
|
-
# @param idempotency_key [String] Header param:
|
|
33
|
+
# @param idempotency_key [String] Header param: Idempotency key for the request
|
|
34
34
|
#
|
|
35
35
|
# @param request_options [Lithic::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
36
36
|
#
|
|
@@ -145,7 +145,7 @@ module Lithic
|
|
|
145
145
|
|
|
146
146
|
# Update financial account status
|
|
147
147
|
#
|
|
148
|
-
# @overload update_status(financial_account_token, status:, substatus:, request_options: {})
|
|
148
|
+
# @overload update_status(financial_account_token, status:, substatus:, user_defined_status: nil, request_options: {})
|
|
149
149
|
#
|
|
150
150
|
# @param financial_account_token [String] Globally unique identifier for financial account.
|
|
151
151
|
#
|
|
@@ -153,6 +153,8 @@ module Lithic
|
|
|
153
153
|
#
|
|
154
154
|
# @param substatus [Symbol, Lithic::Models::FinancialAccountUpdateStatusParams::Substatus, nil] Substatus for the financial account
|
|
155
155
|
#
|
|
156
|
+
# @param user_defined_status [String] User-defined status for the financial account
|
|
157
|
+
#
|
|
156
158
|
# @param request_options [Lithic::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
157
159
|
#
|
|
158
160
|
# @return [Lithic::Models::FinancialAccount]
|
|
@@ -3,6 +3,9 @@
|
|
|
3
3
|
module Lithic
|
|
4
4
|
module Resources
|
|
5
5
|
class ManagementOperations
|
|
6
|
+
# Some parameter documentations has been truncated, see
|
|
7
|
+
# {Lithic::Models::ManagementOperationCreateParams} for more details.
|
|
8
|
+
#
|
|
6
9
|
# Create management operation
|
|
7
10
|
#
|
|
8
11
|
# @overload create(amount:, category:, direction:, effective_date:, event_type:, financial_account_token:, token: nil, memo: nil, on_closed_account: nil, subtype: nil, user_defined_id: nil, request_options: {})
|
|
@@ -19,7 +22,7 @@ module Lithic
|
|
|
19
22
|
#
|
|
20
23
|
# @param financial_account_token [String]
|
|
21
24
|
#
|
|
22
|
-
# @param token [String]
|
|
25
|
+
# @param token [String] Customer-provided token that will serve as an idempotency token. This token will
|
|
23
26
|
#
|
|
24
27
|
# @param memo [String]
|
|
25
28
|
#
|
|
@@ -105,7 +105,7 @@ module Lithic
|
|
|
105
105
|
# [update account](https://docs.lithic.com/reference/patchaccountbytoken)
|
|
106
106
|
# endpoint.
|
|
107
107
|
#
|
|
108
|
-
# @overload simulate_authorization(amount:, descriptor:, pan:, mcc: nil, merchant_acceptor_id: nil, merchant_amount: nil, merchant_currency: nil, partial_approval_capable: nil, pin: nil, status: nil, request_options: {})
|
|
108
|
+
# @overload simulate_authorization(amount:, descriptor:, pan:, mcc: nil, merchant_acceptor_city: nil, merchant_acceptor_country: nil, merchant_acceptor_id: nil, merchant_acceptor_state: nil, merchant_amount: nil, merchant_currency: nil, partial_approval_capable: nil, pin: nil, status: nil, request_options: {})
|
|
109
109
|
#
|
|
110
110
|
# @param amount [Integer] Amount (in cents) to authorize. For credit authorizations and financial credit a
|
|
111
111
|
#
|
|
@@ -115,8 +115,14 @@ module Lithic
|
|
|
115
115
|
#
|
|
116
116
|
# @param mcc [String] Merchant category code for the transaction to be simulated. A four-digit number
|
|
117
117
|
#
|
|
118
|
+
# @param merchant_acceptor_city [String] Merchant acceptor city
|
|
119
|
+
#
|
|
120
|
+
# @param merchant_acceptor_country [String] Merchant acceptor country code (ISO 3166-1 alpha-3)
|
|
121
|
+
#
|
|
118
122
|
# @param merchant_acceptor_id [String] Unique identifier to identify the payment card acceptor.
|
|
119
123
|
#
|
|
124
|
+
# @param merchant_acceptor_state [String] Merchant acceptor state/province (ISO 3166-2 subdivision code)
|
|
125
|
+
#
|
|
120
126
|
# @param merchant_amount [Integer] Amount of the transaction to be simulated in currency specified in merchant_curr
|
|
121
127
|
#
|
|
122
128
|
# @param merchant_currency [String] 3-character alphabetic ISO 4217 currency code. Note: Simulator only accepts USD,
|
|
@@ -211,7 +217,7 @@ module Lithic
|
|
|
211
217
|
# Simulates a credit authorization advice from the card network. This message
|
|
212
218
|
# indicates that the network approved a credit authorization on your behalf.
|
|
213
219
|
#
|
|
214
|
-
# @overload simulate_credit_authorization_advice(amount:, descriptor:, pan:, mcc: nil, merchant_acceptor_id: nil, request_options: {})
|
|
220
|
+
# @overload simulate_credit_authorization_advice(amount:, descriptor:, pan:, mcc: nil, merchant_acceptor_city: nil, merchant_acceptor_country: nil, merchant_acceptor_id: nil, merchant_acceptor_state: nil, request_options: {})
|
|
215
221
|
#
|
|
216
222
|
# @param amount [Integer] Amount (in cents). Any value entered will be converted into a negative amount in
|
|
217
223
|
#
|
|
@@ -221,8 +227,14 @@ module Lithic
|
|
|
221
227
|
#
|
|
222
228
|
# @param mcc [String] Merchant category code for the transaction to be simulated. A four-digit number
|
|
223
229
|
#
|
|
230
|
+
# @param merchant_acceptor_city [String] Merchant acceptor city
|
|
231
|
+
#
|
|
232
|
+
# @param merchant_acceptor_country [String] Merchant acceptor country code (ISO 3166-1 alpha-3)
|
|
233
|
+
#
|
|
224
234
|
# @param merchant_acceptor_id [String] Unique identifier to identify the payment card acceptor.
|
|
225
235
|
#
|
|
236
|
+
# @param merchant_acceptor_state [String] Merchant acceptor state/province (ISO 3166-2 subdivision code)
|
|
237
|
+
#
|
|
226
238
|
# @param request_options [Lithic::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
227
239
|
#
|
|
228
240
|
# @return [Lithic::Models::TransactionSimulateCreditAuthorizationAdviceResponse]
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Lithic
|
|
4
|
+
module Resources
|
|
5
|
+
class TransferLimits
|
|
6
|
+
# Get transfer limits for a specified date
|
|
7
|
+
#
|
|
8
|
+
# @overload list(date: nil, request_options: {})
|
|
9
|
+
#
|
|
10
|
+
# @param date [Date] Date for which to retrieve transfer limits (ISO 8601 format)
|
|
11
|
+
#
|
|
12
|
+
# @param request_options [Lithic::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
13
|
+
#
|
|
14
|
+
# @return [Lithic::Internal::SinglePage<Lithic::Models::TransferLimitsResponse::Data>]
|
|
15
|
+
#
|
|
16
|
+
# @see Lithic::Models::TransferLimitListParams
|
|
17
|
+
def list(params = {})
|
|
18
|
+
parsed, options = Lithic::TransferLimitListParams.dump_request(params)
|
|
19
|
+
@client.request(
|
|
20
|
+
method: :get,
|
|
21
|
+
path: "v1/transfer_limits",
|
|
22
|
+
query: parsed,
|
|
23
|
+
page: Lithic::Internal::SinglePage,
|
|
24
|
+
model: Lithic::TransferLimitsResponse::Data,
|
|
25
|
+
options: options
|
|
26
|
+
)
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
# @api private
|
|
30
|
+
#
|
|
31
|
+
# @param client [Lithic::Client]
|
|
32
|
+
def initialize(client:)
|
|
33
|
+
@client = client
|
|
34
|
+
end
|
|
35
|
+
end
|
|
36
|
+
end
|
|
37
|
+
end
|
|
@@ -32,7 +32,7 @@ module Lithic
|
|
|
32
32
|
#
|
|
33
33
|
# @param payload [String] The raw webhook payload as a string
|
|
34
34
|
#
|
|
35
|
-
# @return [Lithic::Models::AccountHolderCreatedWebhookEvent, Lithic::Models::ParsedWebhookEvent::KYBPayload, Lithic::Models::ParsedWebhookEvent::KYCPayload, Lithic::Models::ParsedWebhookEvent::LegacyPayload, Lithic::Models::AccountHolderVerificationWebhookEvent, Lithic::Models::AccountHolderDocumentUpdatedWebhookEvent, Lithic::Models::
|
|
35
|
+
# @return [Lithic::Models::AccountHolderCreatedWebhookEvent, Lithic::Models::ParsedWebhookEvent::KYBPayload, Lithic::Models::ParsedWebhookEvent::KYCPayload, Lithic::Models::ParsedWebhookEvent::LegacyPayload, Lithic::Models::AccountHolderVerificationWebhookEvent, Lithic::Models::AccountHolderDocumentUpdatedWebhookEvent, Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent, Lithic::Models::TokenizationDecisioningRequestWebhookEvent, Lithic::Models::AuthRulesBacktestReportCreatedWebhookEvent, Lithic::Models::BalanceUpdatedWebhookEvent, Lithic::Models::BookTransferTransactionCreatedWebhookEvent, Lithic::Models::BookTransferTransactionUpdatedWebhookEvent, Lithic::Models::CardCreatedWebhookEvent, Lithic::Models::CardConvertedWebhookEvent, Lithic::Models::CardRenewedWebhookEvent, Lithic::Models::CardReissuedWebhookEvent, Lithic::Models::CardShippedWebhookEvent, Lithic::Models::CardUpdatedWebhookEvent, Lithic::Models::CardTransactionUpdatedWebhookEvent, Lithic::Models::CardTransactionEnhancedDataCreatedWebhookEvent, Lithic::Models::CardTransactionEnhancedDataUpdatedWebhookEvent, Lithic::Models::DigitalWalletTokenizationApprovalRequestWebhookEvent, Lithic::Models::DigitalWalletTokenizationResultWebhookEvent, Lithic::Models::DigitalWalletTokenizationTwoFactorAuthenticationCodeWebhookEvent, Lithic::Models::DigitalWalletTokenizationTwoFactorAuthenticationCodeSentWebhookEvent, Lithic::Models::DigitalWalletTokenizationUpdatedWebhookEvent, Lithic::Models::DisputeUpdatedWebhookEvent, Lithic::Models::DisputeEvidenceUploadFailedWebhookEvent, Lithic::Models::ExternalBankAccountCreatedWebhookEvent, Lithic::Models::ExternalBankAccountUpdatedWebhookEvent, Lithic::Models::ExternalPaymentCreatedWebhookEvent, Lithic::Models::ExternalPaymentUpdatedWebhookEvent, Lithic::Models::FinancialAccountCreatedWebhookEvent, Lithic::Models::FinancialAccountUpdatedWebhookEvent, Lithic::Models::FundingEventCreatedWebhookEvent, Lithic::Models::LoanTapeCreatedWebhookEvent, Lithic::Models::LoanTapeUpdatedWebhookEvent, Lithic::Models::ManagementOperationCreatedWebhookEvent, Lithic::Models::ManagementOperationUpdatedWebhookEvent, Lithic::Models::InternalTransactionCreatedWebhookEvent, Lithic::Models::InternalTransactionUpdatedWebhookEvent, Lithic::Models::NetworkTotalCreatedWebhookEvent, Lithic::Models::NetworkTotalUpdatedWebhookEvent, Lithic::Models::PaymentTransactionCreatedWebhookEvent, Lithic::Models::PaymentTransactionUpdatedWebhookEvent, Lithic::Models::SettlementReportUpdatedWebhookEvent, Lithic::Models::StatementsCreatedWebhookEvent, Lithic::Models::ThreeDSAuthenticationCreatedWebhookEvent, Lithic::Models::ThreeDSAuthenticationUpdatedWebhookEvent, Lithic::Models::ThreeDSAuthenticationChallengeWebhookEvent, Lithic::Models::TokenizationApprovalRequestWebhookEvent, Lithic::Models::TokenizationResultWebhookEvent, Lithic::Models::TokenizationTwoFactorAuthenticationCodeWebhookEvent, Lithic::Models::TokenizationTwoFactorAuthenticationCodeSentWebhookEvent, Lithic::Models::TokenizationUpdatedWebhookEvent, Lithic::Models::ThreeDSAuthenticationApprovalRequestWebhookEvent, Lithic::Models::DisputeTransactionCreatedWebhookEvent, Lithic::Models::DisputeTransactionUpdatedWebhookEvent]
|
|
36
36
|
def parse_unsafe(payload)
|
|
37
37
|
parsed = JSON.parse(payload, symbolize_names: true)
|
|
38
38
|
Lithic::Internal::Type::Converter.coerce(Lithic::Models::ParsedWebhookEvent, parsed)
|
|
@@ -60,7 +60,8 @@ module Lithic
|
|
|
60
60
|
def verify_signature(payload:, headers:, secret: nil)
|
|
61
61
|
secret ||= ENV["LITHIC_WEBHOOK_SECRET"]
|
|
62
62
|
if secret.nil? || secret.empty?
|
|
63
|
-
raise ArgumentError,
|
|
63
|
+
raise ArgumentError,
|
|
64
|
+
"Webhook secret must be provided or set in LITHIC_WEBHOOK_SECRET environment variable"
|
|
64
65
|
end
|
|
65
66
|
|
|
66
67
|
begin
|
data/lib/lithic/version.rb
CHANGED
data/lib/lithic.rb
CHANGED
|
@@ -106,10 +106,7 @@ require_relative "lithic/models/account_spend_limits"
|
|
|
106
106
|
require_relative "lithic/models/account_update_params"
|
|
107
107
|
require_relative "lithic/models/address"
|
|
108
108
|
require_relative "lithic/models/address_update"
|
|
109
|
-
require_relative "lithic/models/aggregate_balance"
|
|
110
|
-
require_relative "lithic/models/aggregate_balance_list_params"
|
|
111
109
|
require_relative "lithic/models/api_status"
|
|
112
|
-
require_relative "lithic/models/asa_request_webhook_event"
|
|
113
110
|
require_relative "lithic/models/auth_rules/auth_rule"
|
|
114
111
|
require_relative "lithic/models/auth_rules/auth_rule_condition"
|
|
115
112
|
require_relative "lithic/models/auth_rules/conditional_3ds_action_parameters"
|
|
@@ -149,10 +146,12 @@ require_relative "lithic/models/balance_updated_webhook_event"
|
|
|
149
146
|
require_relative "lithic/models/book_transfer_create_params"
|
|
150
147
|
require_relative "lithic/models/book_transfer_list_params"
|
|
151
148
|
require_relative "lithic/models/book_transfer_retrieve_params"
|
|
149
|
+
require_relative "lithic/models/book_transfer_retry_params"
|
|
152
150
|
require_relative "lithic/models/book_transfer_reverse_params"
|
|
153
151
|
require_relative "lithic/models/book_transfer_transaction_created_webhook_event"
|
|
154
152
|
require_relative "lithic/models/book_transfer_transaction_updated_webhook_event"
|
|
155
153
|
require_relative "lithic/models/card"
|
|
154
|
+
require_relative "lithic/models/card_authorization_approval_request_webhook_event"
|
|
156
155
|
require_relative "lithic/models/card_bulk_order"
|
|
157
156
|
require_relative "lithic/models/card_bulk_order_create_params"
|
|
158
157
|
require_relative "lithic/models/card_bulk_order_list_params"
|
|
@@ -177,8 +176,6 @@ require_relative "lithic/models/card_renewed_webhook_event"
|
|
|
177
176
|
require_relative "lithic/models/card_renew_params"
|
|
178
177
|
require_relative "lithic/models/card_retrieve_params"
|
|
179
178
|
require_relative "lithic/models/card_retrieve_spend_limits_params"
|
|
180
|
-
require_relative "lithic/models/cards/aggregate_balance_list_params"
|
|
181
|
-
require_relative "lithic/models/cards/aggregate_balance_list_response"
|
|
182
179
|
require_relative "lithic/models/cards/balance_list_params"
|
|
183
180
|
require_relative "lithic/models/cards/financial_transaction_list_params"
|
|
184
181
|
require_relative "lithic/models/cards/financial_transaction_retrieve_params"
|
|
@@ -188,6 +185,7 @@ require_relative "lithic/models/card_spend_limits"
|
|
|
188
185
|
require_relative "lithic/models/card_transaction_enhanced_data_created_webhook_event"
|
|
189
186
|
require_relative "lithic/models/card_transaction_enhanced_data_updated_webhook_event"
|
|
190
187
|
require_relative "lithic/models/card_transaction_updated_webhook_event"
|
|
188
|
+
require_relative "lithic/models/card_updated_webhook_event"
|
|
191
189
|
require_relative "lithic/models/card_update_params"
|
|
192
190
|
require_relative "lithic/models/card_web_provision_params"
|
|
193
191
|
require_relative "lithic/models/card_web_provision_response"
|
|
@@ -374,6 +372,7 @@ require_relative "lithic/models/three_ds/decisioning_challenge_response_params"
|
|
|
374
372
|
require_relative "lithic/models/three_ds/decisioning_retrieve_secret_params"
|
|
375
373
|
require_relative "lithic/models/three_ds/decisioning_retrieve_secret_response"
|
|
376
374
|
require_relative "lithic/models/three_ds/decisioning_rotate_secret_params"
|
|
375
|
+
require_relative "lithic/models/three_ds_authentication_approval_request_webhook_event"
|
|
377
376
|
require_relative "lithic/models/three_ds_authentication_challenge_webhook_event"
|
|
378
377
|
require_relative "lithic/models/three_ds_authentication_created_webhook_event"
|
|
379
378
|
require_relative "lithic/models/three_ds_authentication_updated_webhook_event"
|
|
@@ -423,6 +422,8 @@ require_relative "lithic/models/transaction_simulate_void_params"
|
|
|
423
422
|
require_relative "lithic/models/transaction_simulate_void_response"
|
|
424
423
|
require_relative "lithic/models/transfer"
|
|
425
424
|
require_relative "lithic/models/transfer_create_params"
|
|
425
|
+
require_relative "lithic/models/transfer_limit_list_params"
|
|
426
|
+
require_relative "lithic/models/transfer_limits_response"
|
|
426
427
|
require_relative "lithic/models/verification_method"
|
|
427
428
|
require_relative "lithic/models/wallet_decisioning_info"
|
|
428
429
|
require_relative "lithic/models/webhook_parsed_params"
|
|
@@ -431,7 +432,6 @@ require_relative "lithic/models"
|
|
|
431
432
|
require_relative "lithic/resources/account_activity"
|
|
432
433
|
require_relative "lithic/resources/account_holders"
|
|
433
434
|
require_relative "lithic/resources/accounts"
|
|
434
|
-
require_relative "lithic/resources/aggregate_balances"
|
|
435
435
|
require_relative "lithic/resources/auth_rules"
|
|
436
436
|
require_relative "lithic/resources/auth_rules/v2"
|
|
437
437
|
require_relative "lithic/resources/auth_rules/v2/backtests"
|
|
@@ -441,7 +441,6 @@ require_relative "lithic/resources/book_transfers"
|
|
|
441
441
|
require_relative "lithic/resources/card_bulk_orders"
|
|
442
442
|
require_relative "lithic/resources/card_programs"
|
|
443
443
|
require_relative "lithic/resources/cards"
|
|
444
|
-
require_relative "lithic/resources/cards/aggregate_balances"
|
|
445
444
|
require_relative "lithic/resources/cards/balances"
|
|
446
445
|
require_relative "lithic/resources/cards/financial_transactions"
|
|
447
446
|
require_relative "lithic/resources/credit_products"
|
|
@@ -483,5 +482,6 @@ require_relative "lithic/resources/transactions"
|
|
|
483
482
|
require_relative "lithic/resources/transactions/enhanced_commercial_data"
|
|
484
483
|
require_relative "lithic/resources/transactions/events"
|
|
485
484
|
require_relative "lithic/resources/transactions/events/enhanced_commercial_data"
|
|
485
|
+
require_relative "lithic/resources/transfer_limits"
|
|
486
486
|
require_relative "lithic/resources/transfers"
|
|
487
487
|
require_relative "lithic/resources/webhooks"
|
data/rbi/lithic/client.rbi
CHANGED
|
@@ -49,9 +49,6 @@ module Lithic
|
|
|
49
49
|
sig { returns(Lithic::Resources::Balances) }
|
|
50
50
|
attr_reader :balances
|
|
51
51
|
|
|
52
|
-
sig { returns(Lithic::Resources::AggregateBalances) }
|
|
53
|
-
attr_reader :aggregate_balances
|
|
54
|
-
|
|
55
52
|
sig { returns(Lithic::Resources::Disputes) }
|
|
56
53
|
attr_reader :disputes
|
|
57
54
|
|
|
@@ -118,6 +115,9 @@ module Lithic
|
|
|
118
115
|
sig { returns(Lithic::Resources::AccountActivity) }
|
|
119
116
|
attr_reader :account_activity
|
|
120
117
|
|
|
118
|
+
sig { returns(Lithic::Resources::TransferLimits) }
|
|
119
|
+
attr_reader :transfer_limits
|
|
120
|
+
|
|
121
121
|
sig { returns(Lithic::Resources::Webhooks) }
|
|
122
122
|
attr_reader :webhooks
|
|
123
123
|
|
|
@@ -514,6 +514,8 @@ module Lithic
|
|
|
514
514
|
# `TOO_MANY_RECENT_TOKENS`, `UNABLE_TO_ASSESS`.
|
|
515
515
|
# - `TOKEN_REQUESTOR_ID`: Unique identifier for the entity requesting the token.
|
|
516
516
|
# - `WALLET_TOKEN_STATUS`: The current status of the wallet token.
|
|
517
|
+
# - `CARD_STATE`: The state of the card being tokenized. Valid values are
|
|
518
|
+
# `CLOSED`, `OPEN`, `PAUSED`, `PENDING_ACTIVATION`, `PENDING_FULFILLMENT`.
|
|
517
519
|
sig do
|
|
518
520
|
returns(
|
|
519
521
|
Lithic::AuthRules::ConditionalTokenizationActionParameters::Condition::Attribute::OrSymbol
|
|
@@ -570,6 +572,8 @@ module Lithic
|
|
|
570
572
|
# `TOO_MANY_RECENT_TOKENS`, `UNABLE_TO_ASSESS`.
|
|
571
573
|
# - `TOKEN_REQUESTOR_ID`: Unique identifier for the entity requesting the token.
|
|
572
574
|
# - `WALLET_TOKEN_STATUS`: The current status of the wallet token.
|
|
575
|
+
# - `CARD_STATE`: The state of the card being tokenized. Valid values are
|
|
576
|
+
# `CLOSED`, `OPEN`, `PAUSED`, `PENDING_ACTIVATION`, `PENDING_FULFILLMENT`.
|
|
573
577
|
attribute:,
|
|
574
578
|
# The operation to apply to the attribute
|
|
575
579
|
operation:,
|
|
@@ -623,6 +627,8 @@ module Lithic
|
|
|
623
627
|
# `TOO_MANY_RECENT_TOKENS`, `UNABLE_TO_ASSESS`.
|
|
624
628
|
# - `TOKEN_REQUESTOR_ID`: Unique identifier for the entity requesting the token.
|
|
625
629
|
# - `WALLET_TOKEN_STATUS`: The current status of the wallet token.
|
|
630
|
+
# - `CARD_STATE`: The state of the card being tokenized. Valid values are
|
|
631
|
+
# `CLOSED`, `OPEN`, `PAUSED`, `PENDING_ACTIVATION`, `PENDING_FULFILLMENT`.
|
|
626
632
|
module Attribute
|
|
627
633
|
extend Lithic::Internal::Type::Enum
|
|
628
634
|
|
|
@@ -685,6 +691,11 @@ module Lithic
|
|
|
685
691
|
:WALLET_TOKEN_STATUS,
|
|
686
692
|
Lithic::AuthRules::ConditionalTokenizationActionParameters::Condition::Attribute::TaggedSymbol
|
|
687
693
|
)
|
|
694
|
+
CARD_STATE =
|
|
695
|
+
T.let(
|
|
696
|
+
:CARD_STATE,
|
|
697
|
+
Lithic::AuthRules::ConditionalTokenizationActionParameters::Condition::Attribute::TaggedSymbol
|
|
698
|
+
)
|
|
688
699
|
|
|
689
700
|
sig do
|
|
690
701
|
override.returns(
|
|
@@ -12,16 +12,6 @@ module Lithic
|
|
|
12
12
|
)
|
|
13
13
|
end
|
|
14
14
|
|
|
15
|
-
sig { returns(Lithic::AuthRules::VelocityLimitParams::Filters) }
|
|
16
|
-
attr_reader :filters
|
|
17
|
-
|
|
18
|
-
sig do
|
|
19
|
-
params(
|
|
20
|
-
filters: Lithic::AuthRules::VelocityLimitParams::Filters::OrHash
|
|
21
|
-
).void
|
|
22
|
-
end
|
|
23
|
-
attr_writer :filters
|
|
24
|
-
|
|
25
15
|
# Velocity over the current day since 00:00 / 12 AM in Eastern Time
|
|
26
16
|
sig do
|
|
27
17
|
returns(
|
|
@@ -40,6 +30,18 @@ module Lithic
|
|
|
40
30
|
sig { returns(Lithic::AuthRules::VelocityLimitParams::Scope::OrSymbol) }
|
|
41
31
|
attr_accessor :scope
|
|
42
32
|
|
|
33
|
+
sig do
|
|
34
|
+
returns(T.nilable(Lithic::AuthRules::VelocityLimitParams::Filters))
|
|
35
|
+
end
|
|
36
|
+
attr_reader :filters
|
|
37
|
+
|
|
38
|
+
sig do
|
|
39
|
+
params(
|
|
40
|
+
filters: Lithic::AuthRules::VelocityLimitParams::Filters::OrHash
|
|
41
|
+
).void
|
|
42
|
+
end
|
|
43
|
+
attr_writer :filters
|
|
44
|
+
|
|
43
45
|
# The maximum amount of spend velocity allowed in the period in minor units (the
|
|
44
46
|
# smallest unit of a currency, e.g. cents for USD). Transactions exceeding this
|
|
45
47
|
# limit will be declined.
|
|
@@ -56,7 +58,6 @@ module Lithic
|
|
|
56
58
|
|
|
57
59
|
sig do
|
|
58
60
|
params(
|
|
59
|
-
filters: Lithic::AuthRules::VelocityLimitParams::Filters::OrHash,
|
|
60
61
|
period:
|
|
61
62
|
T.any(
|
|
62
63
|
Lithic::AuthRules::VelocityLimitPeriod::TrailingWindowObject::OrHash,
|
|
@@ -66,16 +67,17 @@ module Lithic
|
|
|
66
67
|
Lithic::AuthRules::VelocityLimitPeriod::FixedWindowYear::OrHash
|
|
67
68
|
),
|
|
68
69
|
scope: Lithic::AuthRules::VelocityLimitParams::Scope::OrSymbol,
|
|
70
|
+
filters: Lithic::AuthRules::VelocityLimitParams::Filters::OrHash,
|
|
69
71
|
limit_amount: T.nilable(Integer),
|
|
70
72
|
limit_count: T.nilable(Integer)
|
|
71
73
|
).returns(T.attached_class)
|
|
72
74
|
end
|
|
73
75
|
def self.new(
|
|
74
|
-
filters:,
|
|
75
76
|
# Velocity over the current day since 00:00 / 12 AM in Eastern Time
|
|
76
77
|
period:,
|
|
77
78
|
# The scope the velocity is calculated for
|
|
78
79
|
scope:,
|
|
80
|
+
filters: nil,
|
|
79
81
|
# The maximum amount of spend velocity allowed in the period in minor units (the
|
|
80
82
|
# smallest unit of a currency, e.g. cents for USD). Transactions exceeding this
|
|
81
83
|
# limit will be declined.
|
|
@@ -92,7 +94,6 @@ module Lithic
|
|
|
92
94
|
sig do
|
|
93
95
|
override.returns(
|
|
94
96
|
{
|
|
95
|
-
filters: Lithic::AuthRules::VelocityLimitParams::Filters,
|
|
96
97
|
period:
|
|
97
98
|
T.any(
|
|
98
99
|
Lithic::AuthRules::VelocityLimitPeriod::TrailingWindowObject,
|
|
@@ -102,6 +103,7 @@ module Lithic
|
|
|
102
103
|
Lithic::AuthRules::VelocityLimitPeriod::FixedWindowYear
|
|
103
104
|
),
|
|
104
105
|
scope: Lithic::AuthRules::VelocityLimitParams::Scope::OrSymbol,
|
|
106
|
+
filters: Lithic::AuthRules::VelocityLimitParams::Filters,
|
|
105
107
|
limit_amount: T.nilable(Integer),
|
|
106
108
|
limit_count: T.nilable(Integer)
|
|
107
109
|
}
|
|
@@ -110,6 +112,38 @@ module Lithic
|
|
|
110
112
|
def to_hash
|
|
111
113
|
end
|
|
112
114
|
|
|
115
|
+
# The scope the velocity is calculated for
|
|
116
|
+
module Scope
|
|
117
|
+
extend Lithic::Internal::Type::Enum
|
|
118
|
+
|
|
119
|
+
TaggedSymbol =
|
|
120
|
+
T.type_alias do
|
|
121
|
+
T.all(Symbol, Lithic::AuthRules::VelocityLimitParams::Scope)
|
|
122
|
+
end
|
|
123
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
124
|
+
|
|
125
|
+
CARD =
|
|
126
|
+
T.let(
|
|
127
|
+
:CARD,
|
|
128
|
+
Lithic::AuthRules::VelocityLimitParams::Scope::TaggedSymbol
|
|
129
|
+
)
|
|
130
|
+
ACCOUNT =
|
|
131
|
+
T.let(
|
|
132
|
+
:ACCOUNT,
|
|
133
|
+
Lithic::AuthRules::VelocityLimitParams::Scope::TaggedSymbol
|
|
134
|
+
)
|
|
135
|
+
|
|
136
|
+
sig do
|
|
137
|
+
override.returns(
|
|
138
|
+
T::Array[
|
|
139
|
+
Lithic::AuthRules::VelocityLimitParams::Scope::TaggedSymbol
|
|
140
|
+
]
|
|
141
|
+
)
|
|
142
|
+
end
|
|
143
|
+
def self.values
|
|
144
|
+
end
|
|
145
|
+
end
|
|
146
|
+
|
|
113
147
|
class Filters < Lithic::Internal::Type::BaseModel
|
|
114
148
|
OrHash =
|
|
115
149
|
T.type_alias do
|
|
@@ -307,38 +341,6 @@ module Lithic
|
|
|
307
341
|
end
|
|
308
342
|
end
|
|
309
343
|
end
|
|
310
|
-
|
|
311
|
-
# The scope the velocity is calculated for
|
|
312
|
-
module Scope
|
|
313
|
-
extend Lithic::Internal::Type::Enum
|
|
314
|
-
|
|
315
|
-
TaggedSymbol =
|
|
316
|
-
T.type_alias do
|
|
317
|
-
T.all(Symbol, Lithic::AuthRules::VelocityLimitParams::Scope)
|
|
318
|
-
end
|
|
319
|
-
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
320
|
-
|
|
321
|
-
CARD =
|
|
322
|
-
T.let(
|
|
323
|
-
:CARD,
|
|
324
|
-
Lithic::AuthRules::VelocityLimitParams::Scope::TaggedSymbol
|
|
325
|
-
)
|
|
326
|
-
ACCOUNT =
|
|
327
|
-
T.let(
|
|
328
|
-
:ACCOUNT,
|
|
329
|
-
Lithic::AuthRules::VelocityLimitParams::Scope::TaggedSymbol
|
|
330
|
-
)
|
|
331
|
-
|
|
332
|
-
sig do
|
|
333
|
-
override.returns(
|
|
334
|
-
T::Array[
|
|
335
|
-
Lithic::AuthRules::VelocityLimitParams::Scope::TaggedSymbol
|
|
336
|
-
]
|
|
337
|
-
)
|
|
338
|
-
end
|
|
339
|
-
def self.values
|
|
340
|
-
end
|
|
341
|
-
end
|
|
342
344
|
end
|
|
343
345
|
end
|
|
344
346
|
end
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Lithic
|
|
4
|
+
module Models
|
|
5
|
+
class BookTransferRetryParams < Lithic::Internal::Type::BaseModel
|
|
6
|
+
extend Lithic::Internal::Type::RequestParameters::Converter
|
|
7
|
+
include Lithic::Internal::Type::RequestParameters
|
|
8
|
+
|
|
9
|
+
OrHash =
|
|
10
|
+
T.type_alias do
|
|
11
|
+
T.any(Lithic::BookTransferRetryParams, Lithic::Internal::AnyHash)
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
# Customer-provided token that will serve as an idempotency token. This token will
|
|
15
|
+
# become the transaction token.
|
|
16
|
+
sig { returns(String) }
|
|
17
|
+
attr_accessor :retry_token
|
|
18
|
+
|
|
19
|
+
sig do
|
|
20
|
+
params(
|
|
21
|
+
retry_token: String,
|
|
22
|
+
request_options: Lithic::RequestOptions::OrHash
|
|
23
|
+
).returns(T.attached_class)
|
|
24
|
+
end
|
|
25
|
+
def self.new(
|
|
26
|
+
# Customer-provided token that will serve as an idempotency token. This token will
|
|
27
|
+
# become the transaction token.
|
|
28
|
+
retry_token:,
|
|
29
|
+
request_options: {}
|
|
30
|
+
)
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
sig do
|
|
34
|
+
override.returns(
|
|
35
|
+
{ retry_token: String, request_options: Lithic::RequestOptions }
|
|
36
|
+
)
|
|
37
|
+
end
|
|
38
|
+
def to_hash
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
end
|
|
42
|
+
end
|