lithic 0.2.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +38 -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/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/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/management_operation_create_params.rb +6 -1
- data/lib/lithic/models/parsed_webhook_event.rb +3 -4
- data/lib/lithic/models/payment.rb +10 -1
- data/lib/lithic/models/three_ds_authentication_approval_request_webhook_event.rb +17 -0
- data/lib/lithic/models/transaction.rb +2 -0
- 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 +12 -6
- data/lib/lithic/resources/book_transfers.rb +27 -0
- data/lib/lithic/resources/cards.rb +1 -5
- data/lib/lithic/resources/external_payments.rb +13 -1
- data/lib/lithic/resources/financial_accounts.rb +3 -1
- data/lib/lithic/resources/management_operations.rb +4 -1
- 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 +6 -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/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/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/management_operation_create_params.rbi +4 -0
- data/rbi/lithic/models/parsed_webhook_event.rbi +2 -2
- data/rbi/lithic/models/payment.rbi +13 -3
- data/rbi/lithic/models/three_ds_authentication_approval_request_webhook_event.rbi +27 -0
- data/rbi/lithic/models/transaction.rbi +10 -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 +12 -6
- data/rbi/lithic/resources/book_transfers.rbi +18 -0
- data/rbi/lithic/resources/cards.rbi +1 -4
- data/rbi/lithic/resources/external_payments.rbi +2 -0
- data/rbi/lithic/resources/financial_accounts.rbi +3 -0
- data/rbi/lithic/resources/management_operations.rbi +2 -0
- data/rbi/lithic/resources/transfer_limits.rbi +28 -0
- data/rbi/lithic/resources/webhooks.rbi +2 -124
- data/sig/lithic/client.rbs +2 -2
- data/sig/lithic/models/auth_rules/conditional_tokenization_action_parameters.rbs +2 -0
- 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/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 +2 -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 +4 -0
- 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 +10 -6
- data/sig/lithic/resources/book_transfers.rbs +6 -0
- data/sig/lithic/resources/cards.rbs +0 -2
- data/sig/lithic/resources/financial_accounts.rbs +1 -0
- data/sig/lithic/resources/transfer_limits.rbs +12 -0
- data/sig/lithic/resources/webhooks.rbs +2 -116
- metadata +20 -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
data/lib/lithic/models.rb
CHANGED
|
@@ -90,14 +90,8 @@ module Lithic
|
|
|
90
90
|
|
|
91
91
|
AddressUpdate = Lithic::Models::AddressUpdate
|
|
92
92
|
|
|
93
|
-
AggregateBalance = Lithic::Models::AggregateBalance
|
|
94
|
-
|
|
95
|
-
AggregateBalanceListParams = Lithic::Models::AggregateBalanceListParams
|
|
96
|
-
|
|
97
93
|
APIStatus = Lithic::Models::APIStatus
|
|
98
94
|
|
|
99
|
-
AsaRequestWebhookEvent = Lithic::Models::AsaRequestWebhookEvent
|
|
100
|
-
|
|
101
95
|
AuthRules = Lithic::Models::AuthRules
|
|
102
96
|
|
|
103
97
|
AuthRulesBacktestReportCreatedWebhookEvent = Lithic::Models::AuthRulesBacktestReportCreatedWebhookEvent
|
|
@@ -122,6 +116,8 @@ module Lithic
|
|
|
122
116
|
|
|
123
117
|
BookTransferRetrieveParams = Lithic::Models::BookTransferRetrieveParams
|
|
124
118
|
|
|
119
|
+
BookTransferRetryParams = Lithic::Models::BookTransferRetryParams
|
|
120
|
+
|
|
125
121
|
BookTransferReverseParams = Lithic::Models::BookTransferReverseParams
|
|
126
122
|
|
|
127
123
|
BookTransferTransactionCreatedWebhookEvent = Lithic::Models::BookTransferTransactionCreatedWebhookEvent
|
|
@@ -130,6 +126,9 @@ module Lithic
|
|
|
130
126
|
|
|
131
127
|
Card = Lithic::Models::Card
|
|
132
128
|
|
|
129
|
+
CardAuthorizationApprovalRequestWebhookEvent =
|
|
130
|
+
Lithic::Models::CardAuthorizationApprovalRequestWebhookEvent
|
|
131
|
+
|
|
133
132
|
CardBulkOrder = Lithic::Models::CardBulkOrder
|
|
134
133
|
|
|
135
134
|
CardBulkOrderCreateParams = Lithic::Models::CardBulkOrderCreateParams
|
|
@@ -478,6 +477,9 @@ module Lithic
|
|
|
478
477
|
|
|
479
478
|
ThreeDSAuthentication = Lithic::Models::ThreeDSAuthentication
|
|
480
479
|
|
|
480
|
+
ThreeDSAuthenticationApprovalRequestWebhookEvent =
|
|
481
|
+
Lithic::Models::ThreeDSAuthenticationApprovalRequestWebhookEvent
|
|
482
|
+
|
|
481
483
|
ThreeDSAuthenticationChallengeWebhookEvent = Lithic::Models::ThreeDSAuthenticationChallengeWebhookEvent
|
|
482
484
|
|
|
483
485
|
ThreeDSAuthenticationCreatedWebhookEvent = Lithic::Models::ThreeDSAuthenticationCreatedWebhookEvent
|
|
@@ -562,6 +564,10 @@ module Lithic
|
|
|
562
564
|
|
|
563
565
|
TransferCreateParams = Lithic::Models::TransferCreateParams
|
|
564
566
|
|
|
567
|
+
TransferLimitListParams = Lithic::Models::TransferLimitListParams
|
|
568
|
+
|
|
569
|
+
TransferLimitsResponse = Lithic::Models::TransferLimitsResponse
|
|
570
|
+
|
|
565
571
|
VerificationMethod = Lithic::Models::VerificationMethod
|
|
566
572
|
|
|
567
573
|
WalletDecisioningInfo = Lithic::Models::WalletDecisioningInfo
|
|
@@ -113,6 +113,33 @@ module Lithic
|
|
|
113
113
|
)
|
|
114
114
|
end
|
|
115
115
|
|
|
116
|
+
# Some parameter documentations has been truncated, see
|
|
117
|
+
# {Lithic::Models::BookTransferRetryParams} for more details.
|
|
118
|
+
#
|
|
119
|
+
# Retry a book transfer that has been declined
|
|
120
|
+
#
|
|
121
|
+
# @overload retry_(book_transfer_token, retry_token:, request_options: {})
|
|
122
|
+
#
|
|
123
|
+
# @param book_transfer_token [String] Token of the book transfer to retry
|
|
124
|
+
#
|
|
125
|
+
# @param retry_token [String] Customer-provided token that will serve as an idempotency token. This token will
|
|
126
|
+
#
|
|
127
|
+
# @param request_options [Lithic::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
128
|
+
#
|
|
129
|
+
# @return [Lithic::Models::BookTransferResponse]
|
|
130
|
+
#
|
|
131
|
+
# @see Lithic::Models::BookTransferRetryParams
|
|
132
|
+
def retry_(book_transfer_token, params)
|
|
133
|
+
parsed, options = Lithic::BookTransferRetryParams.dump_request(params)
|
|
134
|
+
@client.request(
|
|
135
|
+
method: :post,
|
|
136
|
+
path: ["v1/book_transfers/%1$s/retry", book_transfer_token],
|
|
137
|
+
body: parsed,
|
|
138
|
+
model: Lithic::BookTransferResponse,
|
|
139
|
+
options: options
|
|
140
|
+
)
|
|
141
|
+
end
|
|
142
|
+
|
|
116
143
|
# Reverse a book transfer
|
|
117
144
|
#
|
|
118
145
|
# @overload reverse(book_transfer_token, memo: nil, request_options: {})
|
|
@@ -3,9 +3,6 @@
|
|
|
3
3
|
module Lithic
|
|
4
4
|
module Resources
|
|
5
5
|
class Cards
|
|
6
|
-
# @return [Lithic::Resources::Cards::AggregateBalances]
|
|
7
|
-
attr_reader :aggregate_balances
|
|
8
|
-
|
|
9
6
|
# @return [Lithic::Resources::Cards::Balances]
|
|
10
7
|
attr_reader :balances
|
|
11
8
|
|
|
@@ -447,7 +444,7 @@ module Lithic
|
|
|
447
444
|
# {Lithic::Models::CardWebProvisionParams} for more details.
|
|
448
445
|
#
|
|
449
446
|
# Allow your cardholders to directly add payment cards to the device's digital
|
|
450
|
-
# wallet from a browser on the web.
|
|
447
|
+
# wallet from a browser on the web.
|
|
451
448
|
#
|
|
452
449
|
# This requires some additional setup and configuration. Please
|
|
453
450
|
# [Contact Us](https://lithic.com/contact) or your Customer Success representative
|
|
@@ -486,7 +483,6 @@ module Lithic
|
|
|
486
483
|
# @param client [Lithic::Client]
|
|
487
484
|
def initialize(client:)
|
|
488
485
|
@client = client
|
|
489
|
-
@aggregate_balances = Lithic::Resources::Cards::AggregateBalances.new(client: client)
|
|
490
486
|
@balances = Lithic::Resources::Cards::Balances.new(client: client)
|
|
491
487
|
@financial_transactions = Lithic::Resources::Cards::FinancialTransactions.new(client: client)
|
|
492
488
|
end
|
|
@@ -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]
|
|
@@ -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
|
#
|
|
@@ -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::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"
|
|
@@ -374,6 +371,7 @@ require_relative "lithic/models/three_ds/decisioning_challenge_response_params"
|
|
|
374
371
|
require_relative "lithic/models/three_ds/decisioning_retrieve_secret_params"
|
|
375
372
|
require_relative "lithic/models/three_ds/decisioning_retrieve_secret_response"
|
|
376
373
|
require_relative "lithic/models/three_ds/decisioning_rotate_secret_params"
|
|
374
|
+
require_relative "lithic/models/three_ds_authentication_approval_request_webhook_event"
|
|
377
375
|
require_relative "lithic/models/three_ds_authentication_challenge_webhook_event"
|
|
378
376
|
require_relative "lithic/models/three_ds_authentication_created_webhook_event"
|
|
379
377
|
require_relative "lithic/models/three_ds_authentication_updated_webhook_event"
|
|
@@ -423,6 +421,8 @@ require_relative "lithic/models/transaction_simulate_void_params"
|
|
|
423
421
|
require_relative "lithic/models/transaction_simulate_void_response"
|
|
424
422
|
require_relative "lithic/models/transfer"
|
|
425
423
|
require_relative "lithic/models/transfer_create_params"
|
|
424
|
+
require_relative "lithic/models/transfer_limit_list_params"
|
|
425
|
+
require_relative "lithic/models/transfer_limits_response"
|
|
426
426
|
require_relative "lithic/models/verification_method"
|
|
427
427
|
require_relative "lithic/models/wallet_decisioning_info"
|
|
428
428
|
require_relative "lithic/models/webhook_parsed_params"
|
|
@@ -431,7 +431,6 @@ require_relative "lithic/models"
|
|
|
431
431
|
require_relative "lithic/resources/account_activity"
|
|
432
432
|
require_relative "lithic/resources/account_holders"
|
|
433
433
|
require_relative "lithic/resources/accounts"
|
|
434
|
-
require_relative "lithic/resources/aggregate_balances"
|
|
435
434
|
require_relative "lithic/resources/auth_rules"
|
|
436
435
|
require_relative "lithic/resources/auth_rules/v2"
|
|
437
436
|
require_relative "lithic/resources/auth_rules/v2/backtests"
|
|
@@ -441,7 +440,6 @@ require_relative "lithic/resources/book_transfers"
|
|
|
441
440
|
require_relative "lithic/resources/card_bulk_orders"
|
|
442
441
|
require_relative "lithic/resources/card_programs"
|
|
443
442
|
require_relative "lithic/resources/cards"
|
|
444
|
-
require_relative "lithic/resources/cards/aggregate_balances"
|
|
445
443
|
require_relative "lithic/resources/cards/balances"
|
|
446
444
|
require_relative "lithic/resources/cards/financial_transactions"
|
|
447
445
|
require_relative "lithic/resources/credit_products"
|
|
@@ -483,5 +481,6 @@ require_relative "lithic/resources/transactions"
|
|
|
483
481
|
require_relative "lithic/resources/transactions/enhanced_commercial_data"
|
|
484
482
|
require_relative "lithic/resources/transactions/events"
|
|
485
483
|
require_relative "lithic/resources/transactions/events/enhanced_commercial_data"
|
|
484
|
+
require_relative "lithic/resources/transfer_limits"
|
|
486
485
|
require_relative "lithic/resources/transfers"
|
|
487
486
|
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(
|
|
@@ -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
|