lithic 0.20.0 → 0.22.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 +44 -0
- data/README.md +1 -10
- data/lib/lithic/internal/type/union.rb +21 -7
- data/lib/lithic/models/account_activity_list_params.rb +1 -0
- data/lib/lithic/models/account_activity_list_response.rb +1 -0
- data/lib/lithic/models/account_activity_retrieve_transaction_response.rb +1 -0
- data/lib/lithic/models/account_holder_create_params.rb +4 -2
- data/lib/lithic/models/account_holder_simulate_enrollment_review_response.rb +120 -66
- data/lib/lithic/models/account_holder_update_params.rb +6 -3
- data/lib/lithic/models/account_holder_update_response.rb +156 -86
- data/lib/lithic/models/account_holder_updated_webhook_event.rb +120 -66
- data/lib/lithic/models/account_holders/account_holder_entity.rb +35 -19
- data/lib/lithic/models/account_holders/entity_create_params.rb +39 -21
- data/lib/lithic/models/address.rb +33 -19
- data/lib/lithic/models/address_update.rb +27 -11
- data/lib/lithic/models/auth_rules/auth_rule.rb +60 -27
- data/lib/lithic/models/auth_rules/auth_rule_condition.rb +189 -6
- data/lib/lithic/models/auth_rules/auth_rule_entities.rb +47 -0
- data/lib/lithic/models/auth_rules/auth_rule_entities_response.rb +31 -0
- data/lib/lithic/models/auth_rules/auth_rule_entity.rb +150 -0
- data/lib/lithic/models/auth_rules/auth_rule_version.rb +3 -6
- data/lib/lithic/models/auth_rules/conditional_3ds_action_parameters.rb +33 -6
- data/lib/lithic/models/auth_rules/conditional_attribute.rb +101 -5
- data/lib/lithic/models/auth_rules/conditional_authorization_action_parameters.rb +3 -439
- data/lib/lithic/models/auth_rules/conditional_authorization_adjustment_parameters.rb +7 -0
- data/lib/lithic/models/auth_rules/merchant_lock_parameters.rb +11 -1
- data/lib/lithic/models/auth_rules/report_stats.rb +1 -0
- data/lib/lithic/models/auth_rules/v2_create_params.rb +218 -45
- data/lib/lithic/models/auth_rules/v2_draft_params.rb +3 -6
- data/lib/lithic/models/auth_rules/v2_list_params.rb +5 -3
- data/lib/lithic/models/auth_rules/v2_list_results_response.rb +1 -0
- data/lib/lithic/models/auth_rules/v2_update_entities_params.rb +39 -0
- data/lib/lithic/models/auth_rules/v2_update_params.rb +133 -12
- data/lib/lithic/models/blockchain_recipient_retrieve_params.rb +20 -0
- data/lib/lithic/models/card_authorization.rb +11 -1
- data/lib/lithic/models/card_create_params.rb +11 -1
- data/lib/lithic/models/card_pin_updated_webhook_event.rb +87 -0
- data/lib/lithic/models/card_update_params.rb +12 -1
- data/lib/lithic/models/event.rb +5 -0
- data/lib/lithic/models/event_list_params.rb +3 -0
- data/lib/lithic/models/event_subscription.rb +3 -0
- data/lib/lithic/models/events/subscription_create_params.rb +3 -0
- data/lib/lithic/models/events/subscription_send_simulated_example_params.rb +1 -0
- data/lib/lithic/models/events/subscription_update_params.rb +3 -0
- data/lib/lithic/models/external_payment.rb +6 -0
- data/lib/lithic/models/external_payment_create_params.rb +1 -0
- data/lib/lithic/models/external_payment_list_params.rb +1 -0
- data/lib/lithic/models/financial_accounts/installment_plan.rb +311 -0
- data/lib/lithic/models/financial_accounts/installment_plan_list_params.rb +75 -0
- data/lib/lithic/models/financial_accounts/installment_plan_retrieve_params.rb +32 -0
- data/lib/lithic/models/financial_accounts/installment_plans/installment_plan_statement.rb +279 -0
- data/lib/lithic/models/financial_accounts/installment_plans/statement_list_params.rb +106 -0
- data/lib/lithic/models/financial_accounts/installment_plans/statement_retrieve_params.rb +42 -0
- data/lib/lithic/models/financial_accounts/loan_tape.rb +62 -1
- data/lib/lithic/models/financial_accounts/open_to_buy.rb +36 -0
- data/lib/lithic/models/financial_accounts/open_to_buy_retrieve_params.rb +22 -0
- data/lib/lithic/models/financial_accounts/open_to_buy_summary.rb +46 -0
- data/lib/lithic/models/financial_accounts/statements/statement_line_items.rb +10 -0
- data/lib/lithic/models/financial_accounts/transaction_category_balances.rb +34 -0
- data/lib/lithic/models/financial_event.rb +9 -0
- data/lib/lithic/models/kyb.rb +4 -2
- data/lib/lithic/models/kyb_business_entity.rb +35 -19
- data/lib/lithic/models/kyc.rb +2 -1
- data/lib/lithic/models/management_operation_create_params.rb +4 -0
- data/lib/lithic/models/management_operation_transaction.rb +4 -0
- data/lib/lithic/models/non_pci_card.rb +11 -1
- data/lib/lithic/models/parsed_webhook_event.rb +123 -67
- data/lib/lithic/models/payment.rb +3 -1
- data/lib/lithic/models/payment_create_stablecoin_params.rb +99 -0
- data/lib/lithic/models/payment_create_stablecoin_response.rb +19 -0
- data/lib/lithic/models/payment_list_params.rb +1 -0
- data/lib/lithic/models/payment_retry_params.rb +28 -1
- data/lib/lithic/models/payment_simulate_action_params.rb +1 -0
- data/lib/lithic/models/three_ds_authentication.rb +126 -1
- data/lib/lithic/models/transaction.rb +4 -1
- data/lib/lithic/models/transaction_simulate_authorization_params.rb +28 -4
- data/lib/lithic/models/transaction_simulate_credit_authorization_advice_params.rb +11 -1
- data/lib/lithic/models/transaction_simulate_return_params.rb +24 -1
- data/lib/lithic/models.rb +6 -0
- data/lib/lithic/resources/auth_rules/v2/backtests.rb +8 -8
- data/lib/lithic/resources/auth_rules/v2.rb +44 -8
- data/lib/lithic/resources/blockchain_recipients.rb +23 -0
- data/lib/lithic/resources/cards.rb +10 -4
- data/lib/lithic/resources/financial_accounts/installment_plans/statements.rb +107 -0
- data/lib/lithic/resources/financial_accounts/installment_plans.rb +86 -0
- data/lib/lithic/resources/financial_accounts/open_to_buy.rb +48 -0
- data/lib/lithic/resources/financial_accounts.rb +8 -0
- data/lib/lithic/resources/payments.rb +71 -3
- data/lib/lithic/resources/transactions.rb +17 -4
- data/lib/lithic/resources/webhooks.rb +18 -0
- data/lib/lithic/version.rb +1 -1
- data/lib/lithic.rb +21 -1
- data/rbi/lithic/models/account_activity_list_params.rbi +5 -0
- data/rbi/lithic/models/account_activity_list_response.rbi +5 -0
- data/rbi/lithic/models/account_activity_retrieve_transaction_response.rbi +5 -0
- data/rbi/lithic/models/account_holder_create_params.rbi +8 -4
- data/rbi/lithic/models/account_holder_simulate_enrollment_review_response.rbi +195 -90
- data/rbi/lithic/models/account_holder_update_params.rbi +12 -6
- data/rbi/lithic/models/account_holder_update_response.rbi +254 -117
- data/rbi/lithic/models/account_holder_updated_webhook_event.rbi +195 -90
- data/rbi/lithic/models/account_holders/account_holder_entity.rbi +59 -27
- data/rbi/lithic/models/account_holders/entity_create_params.rbi +65 -30
- data/rbi/lithic/models/address.rbi +57 -29
- data/rbi/lithic/models/address_update.rbi +50 -24
- data/rbi/lithic/models/auth_rules/auth_rule.rbi +60 -19
- data/rbi/lithic/models/auth_rules/auth_rule_condition.rbi +442 -13
- data/rbi/lithic/models/auth_rules/auth_rule_entities.rbi +163 -0
- data/rbi/lithic/models/auth_rules/auth_rule_entities_response.rbi +72 -0
- data/rbi/lithic/models/auth_rules/auth_rule_entity.rbi +199 -0
- data/rbi/lithic/models/auth_rules/auth_rule_version.rbi +0 -2
- data/rbi/lithic/models/auth_rules/conditional_3ds_action_parameters.rbi +67 -9
- data/rbi/lithic/models/auth_rules/conditional_attribute.rbi +193 -5
- data/rbi/lithic/models/auth_rules/conditional_authorization_action_parameters.rbi +3 -939
- data/rbi/lithic/models/auth_rules/conditional_authorization_adjustment_parameters.rbi +14 -0
- data/rbi/lithic/models/auth_rules/merchant_lock_parameters.rbi +14 -3
- data/rbi/lithic/models/auth_rules/report_stats.rbi +5 -0
- data/rbi/lithic/models/auth_rules/v2_create_params.rbi +358 -50
- data/rbi/lithic/models/auth_rules/v2_draft_params.rbi +0 -4
- data/rbi/lithic/models/auth_rules/v2_list_params.rbi +6 -3
- data/rbi/lithic/models/auth_rules/v2_list_results_response.rbi +5 -0
- data/rbi/lithic/models/auth_rules/v2_update_entities_params.rbi +68 -0
- data/rbi/lithic/models/auth_rules/v2_update_params.rbi +198 -5
- data/rbi/lithic/models/blockchain_recipient_retrieve_params.rbi +41 -0
- data/rbi/lithic/models/card_authorization.rbi +12 -0
- data/rbi/lithic/models/card_create_params.rbi +15 -0
- data/rbi/lithic/models/card_pin_updated_webhook_event.rbi +166 -0
- data/rbi/lithic/models/card_update_params.rbi +17 -0
- data/rbi/lithic/models/event.rbi +8 -0
- data/rbi/lithic/models/event_list_params.rbi +7 -0
- data/rbi/lithic/models/event_subscription.rbi +7 -0
- data/rbi/lithic/models/events/subscription_create_params.rbi +7 -0
- data/rbi/lithic/models/events/subscription_send_simulated_example_params.rbi +5 -0
- data/rbi/lithic/models/events/subscription_update_params.rbi +7 -0
- data/rbi/lithic/models/external_payment.rbi +30 -0
- data/rbi/lithic/models/external_payment_create_params.rbi +5 -0
- data/rbi/lithic/models/external_payment_list_params.rbi +5 -0
- data/rbi/lithic/models/financial_accounts/installment_plan.rbi +528 -0
- data/rbi/lithic/models/financial_accounts/installment_plan_list_params.rbi +155 -0
- data/rbi/lithic/models/financial_accounts/installment_plan_retrieve_params.rbi +56 -0
- data/rbi/lithic/models/financial_accounts/installment_plans/installment_plan_statement.rbi +452 -0
- data/rbi/lithic/models/financial_accounts/installment_plans/statement_list_params.rbi +191 -0
- data/rbi/lithic/models/financial_accounts/installment_plans/statement_retrieve_params.rbi +66 -0
- data/rbi/lithic/models/financial_accounts/loan_tape.rbi +119 -0
- data/rbi/lithic/models/financial_accounts/open_to_buy.rbi +64 -0
- data/rbi/lithic/models/financial_accounts/open_to_buy_retrieve_params.rbi +43 -0
- data/rbi/lithic/models/financial_accounts/open_to_buy_summary.rbi +73 -0
- data/rbi/lithic/models/financial_accounts/statements/statement_line_items.rbi +50 -0
- data/rbi/lithic/models/financial_accounts/transaction_category_balances.rbi +81 -0
- data/rbi/lithic/models/financial_event.rbi +35 -0
- data/rbi/lithic/models/kyb.rbi +8 -4
- data/rbi/lithic/models/kyb_business_entity.rbi +59 -27
- data/rbi/lithic/models/kyc.rbi +4 -2
- data/rbi/lithic/models/management_operation_create_params.rbi +20 -0
- data/rbi/lithic/models/management_operation_transaction.rbi +20 -0
- data/rbi/lithic/models/non_pci_card.rbi +12 -0
- data/rbi/lithic/models/parsed_webhook_event.rbi +196 -90
- data/rbi/lithic/models/payment.rbi +6 -2
- data/rbi/lithic/models/payment_create_stablecoin_params.rbi +162 -0
- data/rbi/lithic/models/payment_create_stablecoin_response.rbi +34 -0
- data/rbi/lithic/models/payment_list_params.rbi +2 -0
- data/rbi/lithic/models/payment_retry_params.rbi +47 -2
- data/rbi/lithic/models/payment_simulate_action_params.rbi +5 -0
- data/rbi/lithic/models/three_ds_authentication.rbi +292 -0
- data/rbi/lithic/models/transaction.rbi +14 -2
- data/rbi/lithic/models/transaction_simulate_authorization_params.rbi +42 -4
- data/rbi/lithic/models/transaction_simulate_credit_authorization_advice_params.rbi +15 -0
- data/rbi/lithic/models/transaction_simulate_return_params.rbi +30 -0
- data/rbi/lithic/models.rbi +7 -0
- data/rbi/lithic/resources/account_holders/entities.rbi +2 -1
- data/rbi/lithic/resources/auth_rules/v2/backtests.rbi +8 -8
- data/rbi/lithic/resources/auth_rules/v2.rbi +43 -8
- data/rbi/lithic/resources/blockchain_recipients.rbi +14 -0
- data/rbi/lithic/resources/cards.rbi +15 -2
- data/rbi/lithic/resources/financial_accounts/installment_plans/statements.rbi +86 -0
- data/rbi/lithic/resources/financial_accounts/installment_plans.rbi +73 -0
- data/rbi/lithic/resources/financial_accounts/open_to_buy.rbi +40 -0
- data/rbi/lithic/resources/financial_accounts.rbi +6 -0
- data/rbi/lithic/resources/payments.rbi +68 -2
- data/rbi/lithic/resources/transactions.rbi +31 -2
- data/rbi/lithic/resources/webhooks.rbi +1 -0
- data/sig/lithic/models/account_activity_list_params.rbs +2 -0
- data/sig/lithic/models/account_activity_list_response.rbs +2 -0
- data/sig/lithic/models/account_activity_retrieve_transaction_response.rbs +2 -0
- data/sig/lithic/models/account_holder_simulate_enrollment_review_response.rbs +39 -39
- data/sig/lithic/models/account_holder_update_response.rbs +52 -52
- data/sig/lithic/models/account_holder_updated_webhook_event.rbs +39 -39
- data/sig/lithic/models/account_holders/account_holder_entity.rbs +13 -13
- data/sig/lithic/models/account_holders/entity_create_params.rbs +13 -13
- data/sig/lithic/models/address.rbs +13 -13
- data/sig/lithic/models/address_update.rbs +8 -12
- data/sig/lithic/models/auth_rules/auth_rule.rbs +10 -7
- data/sig/lithic/models/auth_rules/auth_rule_condition.rbs +89 -3
- data/sig/lithic/models/auth_rules/auth_rule_entities.rbs +37 -0
- data/sig/lithic/models/auth_rules/auth_rule_entities_response.rbs +29 -0
- data/sig/lithic/models/auth_rules/auth_rule_entity.rbs +80 -0
- data/sig/lithic/models/auth_rules/auth_rule_version.rbs +1 -2
- data/sig/lithic/models/auth_rules/conditional_3ds_action_parameters.rbs +10 -0
- data/sig/lithic/models/auth_rules/conditional_attribute.rbs +46 -0
- data/sig/lithic/models/auth_rules/conditional_authorization_action_parameters.rbs +4 -204
- data/sig/lithic/models/auth_rules/conditional_authorization_adjustment_parameters.rbs +2 -0
- data/sig/lithic/models/auth_rules/merchant_lock_parameters.rbs +10 -3
- data/sig/lithic/models/auth_rules/report_stats.rbs +2 -0
- data/sig/lithic/models/auth_rules/v2_create_params.rbs +92 -16
- data/sig/lithic/models/auth_rules/v2_draft_params.rbs +1 -2
- data/sig/lithic/models/auth_rules/v2_list_results_response.rbs +2 -0
- data/sig/lithic/models/auth_rules/v2_update_entities_params.rbs +46 -0
- data/sig/lithic/models/auth_rules/v2_update_params.rbs +47 -1
- data/sig/lithic/models/blockchain_recipient_retrieve_params.rbs +24 -0
- data/sig/lithic/models/card_authorization.rbs +5 -0
- data/sig/lithic/models/card_create_params.rbs +7 -0
- data/sig/lithic/models/card_pin_updated_webhook_event.rbs +60 -0
- data/sig/lithic/models/card_update_params.rbs +8 -1
- 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/external_payment.rbs +12 -0
- data/sig/lithic/models/external_payment_create_params.rbs +2 -0
- data/sig/lithic/models/external_payment_list_params.rbs +2 -0
- data/sig/lithic/models/financial_accounts/installment_plan.rbs +227 -0
- data/sig/lithic/models/financial_accounts/installment_plan_list_params.rbs +69 -0
- data/sig/lithic/models/financial_accounts/installment_plan_retrieve_params.rbs +30 -0
- data/sig/lithic/models/financial_accounts/installment_plans/installment_plan_statement.rbs +191 -0
- data/sig/lithic/models/financial_accounts/installment_plans/statement_list_params.rbs +90 -0
- data/sig/lithic/models/financial_accounts/installment_plans/statement_retrieve_params.rbs +40 -0
- data/sig/lithic/models/financial_accounts/loan_tape.rbs +47 -0
- data/sig/lithic/models/financial_accounts/open_to_buy.rbs +27 -0
- data/sig/lithic/models/financial_accounts/open_to_buy_retrieve_params.rbs +26 -0
- data/sig/lithic/models/financial_accounts/open_to_buy_summary.rbs +32 -0
- data/sig/lithic/models/financial_accounts/statements/statement_line_items.rbs +20 -0
- data/sig/lithic/models/financial_accounts/transaction_category_balances.rbs +32 -0
- data/sig/lithic/models/financial_event.rbs +18 -0
- data/sig/lithic/models/kyb_business_entity.rbs +13 -13
- data/sig/lithic/models/management_operation_create_params.rbs +8 -0
- data/sig/lithic/models/management_operation_transaction.rbs +8 -0
- data/sig/lithic/models/non_pci_card.rbs +5 -0
- data/sig/lithic/models/parsed_webhook_event.rbs +40 -39
- data/sig/lithic/models/payment.rbs +2 -0
- data/sig/lithic/models/payment_create_stablecoin_params.rbs +84 -0
- data/sig/lithic/models/payment_create_stablecoin_response.rbs +15 -0
- data/sig/lithic/models/payment_list_params.rbs +2 -1
- data/sig/lithic/models/payment_retry_params.rbs +24 -1
- data/sig/lithic/models/payment_simulate_action_params.rbs +2 -0
- data/sig/lithic/models/three_ds_authentication.rbs +77 -0
- data/sig/lithic/models/transaction.rbs +4 -0
- data/sig/lithic/models/transaction_simulate_authorization_params.rbs +14 -0
- data/sig/lithic/models/transaction_simulate_credit_authorization_advice_params.rbs +7 -0
- data/sig/lithic/models/transaction_simulate_return_params.rbs +19 -1
- data/sig/lithic/models.rbs +6 -0
- data/sig/lithic/resources/auth_rules/v2.rbs +7 -0
- data/sig/lithic/resources/blockchain_recipients.rbs +5 -0
- data/sig/lithic/resources/cards.rbs +2 -0
- data/sig/lithic/resources/financial_accounts/installment_plans/statements.rbs +30 -0
- data/sig/lithic/resources/financial_accounts/installment_plans.rbs +26 -0
- data/sig/lithic/resources/financial_accounts/open_to_buy.rbs +14 -0
- data/sig/lithic/resources/financial_accounts.rbs +4 -0
- data/sig/lithic/resources/payments.rbs +12 -0
- data/sig/lithic/resources/transactions.rbs +5 -0
- data/sig/lithic/resources/webhooks.rbs +1 -0
- metadata +65 -5
- data/lib/lithic/models/auth_rules/conditional_block_parameters.rb +0 -20
- data/rbi/lithic/models/auth_rules/conditional_block_parameters.rbi +0 -37
- data/sig/lithic/models/auth_rules/conditional_block_parameters.rbs +0 -20
|
@@ -46,6 +46,29 @@ module Lithic
|
|
|
46
46
|
)
|
|
47
47
|
end
|
|
48
48
|
|
|
49
|
+
# Get a blockchain recipient by token
|
|
50
|
+
#
|
|
51
|
+
# Use this to poll the `verification_state` after registering an address: a
|
|
52
|
+
# recipient cannot receive a payout until screening completes and moves it out of
|
|
53
|
+
# `PENDING`
|
|
54
|
+
#
|
|
55
|
+
# @overload retrieve(blockchain_recipient_token, request_options: {})
|
|
56
|
+
#
|
|
57
|
+
# @param blockchain_recipient_token [String]
|
|
58
|
+
# @param request_options [Lithic::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
59
|
+
#
|
|
60
|
+
# @return [Lithic::Models::BlockchainRecipient]
|
|
61
|
+
#
|
|
62
|
+
# @see Lithic::Models::BlockchainRecipientRetrieveParams
|
|
63
|
+
def retrieve(blockchain_recipient_token, params = {})
|
|
64
|
+
@client.request(
|
|
65
|
+
method: :get,
|
|
66
|
+
path: ["v1/blockchain_recipients/%1$s", blockchain_recipient_token],
|
|
67
|
+
model: Lithic::BlockchainRecipient,
|
|
68
|
+
options: params[:request_options]
|
|
69
|
+
)
|
|
70
|
+
end
|
|
71
|
+
|
|
49
72
|
# @api private
|
|
50
73
|
#
|
|
51
74
|
# @param client [Lithic::Client]
|
|
@@ -15,7 +15,7 @@ module Lithic
|
|
|
15
15
|
# Create a new virtual or physical card. Parameters `shipping_address` and
|
|
16
16
|
# `product_id` only apply to physical cards.
|
|
17
17
|
#
|
|
18
|
-
# @overload create(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: {})
|
|
18
|
+
# @overload create(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, tags: nil, idempotency_key: nil, request_options: {})
|
|
19
19
|
#
|
|
20
20
|
# @param type [Symbol, Lithic::Models::CardCreateParams::Type] Body param: Card types:
|
|
21
21
|
#
|
|
@@ -57,6 +57,8 @@ module Lithic
|
|
|
57
57
|
#
|
|
58
58
|
# @param state [Symbol, Lithic::Models::CardCreateParams::State] Body param: Card state values:
|
|
59
59
|
#
|
|
60
|
+
# @param tags [Hash{Symbol=>String}] Body param: Key-value pairs to tag the card with. A replacement card does not in
|
|
61
|
+
#
|
|
60
62
|
# @param idempotency_key [String] Header param: Idempotency key for the request
|
|
61
63
|
#
|
|
62
64
|
# @param request_options [Lithic::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
@@ -105,7 +107,7 @@ module Lithic
|
|
|
105
107
|
# _Note: setting a card to a `CLOSED` state is a final action that cannot be
|
|
106
108
|
# undone._
|
|
107
109
|
#
|
|
108
|
-
# @overload update(card_token, comment: nil, digital_card_art_token: nil, memo: nil, network_program_token: nil, pin: nil, pin_status: nil, spend_limit: nil, spend_limit_duration: nil, state: nil, substatus: nil, request_options: {})
|
|
110
|
+
# @overload update(card_token, comment: nil, digital_card_art_token: nil, memo: nil, network_program_token: nil, pin: nil, pin_status: nil, spend_limit: nil, spend_limit_duration: nil, state: nil, substatus: nil, tags: nil, request_options: {})
|
|
109
111
|
#
|
|
110
112
|
# @param card_token [String]
|
|
111
113
|
#
|
|
@@ -129,6 +131,8 @@ module Lithic
|
|
|
129
131
|
#
|
|
130
132
|
# @param substatus [Symbol, Lithic::Models::CardUpdateParams::Substatus] Card state substatus values:
|
|
131
133
|
#
|
|
134
|
+
# @param tags [Hash{Symbol=>String, nil}] Key-value pairs to merge into the card's tags. Supplied keys are added or overwr
|
|
135
|
+
#
|
|
132
136
|
# @param request_options [Lithic::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
133
137
|
#
|
|
134
138
|
# @return [Lithic::Models::Card]
|
|
@@ -361,7 +365,8 @@ module Lithic
|
|
|
361
365
|
# physically damaged). The PAN, expiry, and CVC2 will remain the same and the
|
|
362
366
|
# original card can continue to be used until the new card is activated. Only
|
|
363
367
|
# applies to cards of type `PHYSICAL`. A card can be reissued or renewed a total
|
|
364
|
-
# of 8 times.
|
|
368
|
+
# of 8 times. Returns `409` if the card is still ongoing manufacturing when using
|
|
369
|
+
# Thales as a manufacturer.
|
|
365
370
|
#
|
|
366
371
|
# @overload reissue(card_token, carrier: nil, product_id: nil, shipping_address: nil, shipping_method: nil, request_options: {})
|
|
367
372
|
#
|
|
@@ -402,7 +407,8 @@ module Lithic
|
|
|
402
407
|
# `PHYSICAL` card can be reissued or renewed a total of 8 times. For `VIRTUAL`,
|
|
403
408
|
# the card will retain the same card token and PAN and receive an updated expiry
|
|
404
409
|
# and CVC2 code. `product_id`, `shipping_method`, `shipping_address`, `carrier`
|
|
405
|
-
# are only relevant for renewing `PHYSICAL` cards.
|
|
410
|
+
# are only relevant for renewing `PHYSICAL` cards. Returns `409` if the card is
|
|
411
|
+
# still ongoing manufacturing when using Thales as a manufacturer.
|
|
406
412
|
#
|
|
407
413
|
# @overload renew(card_token, shipping_address:, carrier: nil, exp_month: nil, exp_year: nil, product_id: nil, shipping_method: nil, request_options: {})
|
|
408
414
|
#
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Lithic
|
|
4
|
+
module Resources
|
|
5
|
+
class FinancialAccounts
|
|
6
|
+
class InstallmentPlans
|
|
7
|
+
class Statements
|
|
8
|
+
# Get a specific statement snapshot for a given installment plan.
|
|
9
|
+
#
|
|
10
|
+
# @overload retrieve(statement_token, financial_account_token:, installment_plan_token:, request_options: {})
|
|
11
|
+
#
|
|
12
|
+
# @param statement_token [String] Globally unique identifier for statement.
|
|
13
|
+
#
|
|
14
|
+
# @param financial_account_token [String] Globally unique identifier for financial account.
|
|
15
|
+
#
|
|
16
|
+
# @param installment_plan_token [String] Globally unique identifier for installment plan.
|
|
17
|
+
#
|
|
18
|
+
# @param request_options [Lithic::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
19
|
+
#
|
|
20
|
+
# @return [Lithic::Models::FinancialAccounts::InstallmentPlans::InstallmentPlanStatement]
|
|
21
|
+
#
|
|
22
|
+
# @see Lithic::Models::FinancialAccounts::InstallmentPlans::StatementRetrieveParams
|
|
23
|
+
def retrieve(statement_token, params)
|
|
24
|
+
parsed, options =
|
|
25
|
+
Lithic::FinancialAccounts::InstallmentPlans::StatementRetrieveParams.dump_request(params)
|
|
26
|
+
financial_account_token =
|
|
27
|
+
parsed.delete(:financial_account_token) do
|
|
28
|
+
raise ArgumentError.new("missing required path argument #{_1}")
|
|
29
|
+
end
|
|
30
|
+
installment_plan_token =
|
|
31
|
+
parsed.delete(:installment_plan_token) do
|
|
32
|
+
raise ArgumentError.new("missing required path argument #{_1}")
|
|
33
|
+
end
|
|
34
|
+
@client.request(
|
|
35
|
+
method: :get,
|
|
36
|
+
path: [
|
|
37
|
+
"v1/financial_accounts/%1$s/installment_plans/%2$s/statements/%3$s",
|
|
38
|
+
financial_account_token,
|
|
39
|
+
installment_plan_token,
|
|
40
|
+
statement_token
|
|
41
|
+
],
|
|
42
|
+
model: Lithic::FinancialAccounts::InstallmentPlans::InstallmentPlanStatement,
|
|
43
|
+
options: options
|
|
44
|
+
)
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
# Some parameter documentations has been truncated, see
|
|
48
|
+
# {Lithic::Models::FinancialAccounts::InstallmentPlans::StatementListParams} for
|
|
49
|
+
# more details.
|
|
50
|
+
#
|
|
51
|
+
# List the statement snapshots for a given installment plan.
|
|
52
|
+
#
|
|
53
|
+
# @overload list(installment_plan_token, financial_account_token:, begin_: nil, end_: nil, ending_before: nil, page_size: nil, starting_after: nil, state: nil, request_options: {})
|
|
54
|
+
#
|
|
55
|
+
# @param installment_plan_token [String] Path param: Globally unique identifier for installment plan.
|
|
56
|
+
#
|
|
57
|
+
# @param financial_account_token [String] Path param: Globally unique identifier for financial account.
|
|
58
|
+
#
|
|
59
|
+
# @param begin_ [Date] Query param: Date string in RFC 3339 format. Only entries created after the spec
|
|
60
|
+
#
|
|
61
|
+
# @param end_ [Date] Query param: Date string in RFC 3339 format. Only entries created before the spe
|
|
62
|
+
#
|
|
63
|
+
# @param ending_before [String] Query param: A cursor representing an item's token before which a page of result
|
|
64
|
+
#
|
|
65
|
+
# @param page_size [Integer] Query param: Page size (for pagination).
|
|
66
|
+
#
|
|
67
|
+
# @param starting_after [String] Query param: A cursor representing an item's token after which a page of results
|
|
68
|
+
#
|
|
69
|
+
# @param state [Symbol, Lithic::Models::FinancialAccounts::InstallmentPlans::StatementListParams::State, nil] Query param: Only snapshots in which the plan was in this state will be included
|
|
70
|
+
#
|
|
71
|
+
# @param request_options [Lithic::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
72
|
+
#
|
|
73
|
+
# @return [Lithic::Internal::CursorPage<Lithic::Models::FinancialAccounts::InstallmentPlans::InstallmentPlanStatement>]
|
|
74
|
+
#
|
|
75
|
+
# @see Lithic::Models::FinancialAccounts::InstallmentPlans::StatementListParams
|
|
76
|
+
def list(installment_plan_token, params)
|
|
77
|
+
parsed, options = Lithic::FinancialAccounts::InstallmentPlans::StatementListParams.dump_request(params)
|
|
78
|
+
query = Lithic::Internal::Util.encode_query_params(parsed)
|
|
79
|
+
financial_account_token =
|
|
80
|
+
parsed.delete(:financial_account_token) do
|
|
81
|
+
raise ArgumentError.new("missing required path argument #{_1}")
|
|
82
|
+
end
|
|
83
|
+
@client.request(
|
|
84
|
+
method: :get,
|
|
85
|
+
path: [
|
|
86
|
+
"v1/financial_accounts/%1$s/installment_plans/%2$s/statements",
|
|
87
|
+
financial_account_token,
|
|
88
|
+
installment_plan_token
|
|
89
|
+
],
|
|
90
|
+
query: query.transform_keys(begin_: "begin", end_: "end"),
|
|
91
|
+
page: Lithic::Internal::CursorPage,
|
|
92
|
+
model: Lithic::FinancialAccounts::InstallmentPlans::InstallmentPlanStatement,
|
|
93
|
+
options: options
|
|
94
|
+
)
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
# @api private
|
|
98
|
+
#
|
|
99
|
+
# @param client [Lithic::Client]
|
|
100
|
+
def initialize(client:)
|
|
101
|
+
@client = client
|
|
102
|
+
end
|
|
103
|
+
end
|
|
104
|
+
end
|
|
105
|
+
end
|
|
106
|
+
end
|
|
107
|
+
end
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Lithic
|
|
4
|
+
module Resources
|
|
5
|
+
class FinancialAccounts
|
|
6
|
+
class InstallmentPlans
|
|
7
|
+
# @return [Lithic::Resources::FinancialAccounts::InstallmentPlans::Statements]
|
|
8
|
+
attr_reader :statements
|
|
9
|
+
|
|
10
|
+
# Get a specific installment plan for a given financial account.
|
|
11
|
+
#
|
|
12
|
+
# @overload retrieve(installment_plan_token, financial_account_token:, request_options: {})
|
|
13
|
+
#
|
|
14
|
+
# @param installment_plan_token [String] Globally unique identifier for installment plan.
|
|
15
|
+
#
|
|
16
|
+
# @param financial_account_token [String] Globally unique identifier for financial account.
|
|
17
|
+
#
|
|
18
|
+
# @param request_options [Lithic::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
19
|
+
#
|
|
20
|
+
# @return [Lithic::Models::FinancialAccounts::InstallmentPlan]
|
|
21
|
+
#
|
|
22
|
+
# @see Lithic::Models::FinancialAccounts::InstallmentPlanRetrieveParams
|
|
23
|
+
def retrieve(installment_plan_token, params)
|
|
24
|
+
parsed, options = Lithic::FinancialAccounts::InstallmentPlanRetrieveParams.dump_request(params)
|
|
25
|
+
financial_account_token =
|
|
26
|
+
parsed.delete(:financial_account_token) do
|
|
27
|
+
raise ArgumentError.new("missing required path argument #{_1}")
|
|
28
|
+
end
|
|
29
|
+
@client.request(
|
|
30
|
+
method: :get,
|
|
31
|
+
path: [
|
|
32
|
+
"v1/financial_accounts/%1$s/installment_plans/%2$s",
|
|
33
|
+
financial_account_token,
|
|
34
|
+
installment_plan_token
|
|
35
|
+
],
|
|
36
|
+
model: Lithic::FinancialAccounts::InstallmentPlan,
|
|
37
|
+
options: options
|
|
38
|
+
)
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
# Some parameter documentations has been truncated, see
|
|
42
|
+
# {Lithic::Models::FinancialAccounts::InstallmentPlanListParams} for more details.
|
|
43
|
+
#
|
|
44
|
+
# List the installment plans for a given financial account.
|
|
45
|
+
#
|
|
46
|
+
# @overload list(financial_account_token, ending_before: nil, page_size: nil, starting_after: nil, state: nil, request_options: {})
|
|
47
|
+
#
|
|
48
|
+
# @param financial_account_token [String] Globally unique identifier for financial account.
|
|
49
|
+
#
|
|
50
|
+
# @param ending_before [String] A cursor representing an item's token before which a page of results should end.
|
|
51
|
+
#
|
|
52
|
+
# @param page_size [Integer] Page size (for pagination).
|
|
53
|
+
#
|
|
54
|
+
# @param starting_after [String] A cursor representing an item's token after which a page of results should begin
|
|
55
|
+
#
|
|
56
|
+
# @param state [Symbol, Lithic::Models::FinancialAccounts::InstallmentPlanListParams::State, nil] Only installment plans in this state will be included.
|
|
57
|
+
#
|
|
58
|
+
# @param request_options [Lithic::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
59
|
+
#
|
|
60
|
+
# @return [Lithic::Internal::CursorPage<Lithic::Models::FinancialAccounts::InstallmentPlan>]
|
|
61
|
+
#
|
|
62
|
+
# @see Lithic::Models::FinancialAccounts::InstallmentPlanListParams
|
|
63
|
+
def list(financial_account_token, params = {})
|
|
64
|
+
parsed, options = Lithic::FinancialAccounts::InstallmentPlanListParams.dump_request(params)
|
|
65
|
+
query = Lithic::Internal::Util.encode_query_params(parsed)
|
|
66
|
+
@client.request(
|
|
67
|
+
method: :get,
|
|
68
|
+
path: ["v1/financial_accounts/%1$s/installment_plans", financial_account_token],
|
|
69
|
+
query: query,
|
|
70
|
+
page: Lithic::Internal::CursorPage,
|
|
71
|
+
model: Lithic::FinancialAccounts::InstallmentPlan,
|
|
72
|
+
options: options
|
|
73
|
+
)
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
# @api private
|
|
77
|
+
#
|
|
78
|
+
# @param client [Lithic::Client]
|
|
79
|
+
def initialize(client:)
|
|
80
|
+
@client = client
|
|
81
|
+
@statements = Lithic::Resources::FinancialAccounts::InstallmentPlans::Statements.new(client: client)
|
|
82
|
+
end
|
|
83
|
+
end
|
|
84
|
+
end
|
|
85
|
+
end
|
|
86
|
+
end
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Lithic
|
|
4
|
+
module Resources
|
|
5
|
+
class FinancialAccounts
|
|
6
|
+
class OpenToBuy
|
|
7
|
+
# Get the funds available for card spend backed by a given Security Account, along
|
|
8
|
+
# with the balances that amount is derived from.
|
|
9
|
+
#
|
|
10
|
+
# Open to buy is the amount Lithic authorizes card spend against. It is not a
|
|
11
|
+
# stored balance, so it is recalculated on every request from the Security
|
|
12
|
+
# Account, the funds held against spend Lithic has already paid out to the
|
|
13
|
+
# networks on your behalf, and the spend that has not yet been collected. The
|
|
14
|
+
# accounts that feed the calculation depend on your program setup, so
|
|
15
|
+
# `summary.settled_funds` is `null` outside Commercial Charge.
|
|
16
|
+
#
|
|
17
|
+
# Supported for Commercial Charge, Dynamic Reserve, and Secured Charge programs.
|
|
18
|
+
# Returns `404` if `financial_account_token` is not a Security Account you own, or
|
|
19
|
+
# if your program setup does not use an open to buy calculation.
|
|
20
|
+
#
|
|
21
|
+
# @overload retrieve(financial_account_token, request_options: {})
|
|
22
|
+
#
|
|
23
|
+
# @param financial_account_token [String] Globally unique identifier for the Security Account to price
|
|
24
|
+
#
|
|
25
|
+
# @param request_options [Lithic::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
26
|
+
#
|
|
27
|
+
# @return [Lithic::Models::FinancialAccounts::FinancialAccountsOpenToBuy]
|
|
28
|
+
#
|
|
29
|
+
# @see Lithic::Models::FinancialAccounts::OpenToBuyRetrieveParams
|
|
30
|
+
def retrieve(financial_account_token, params = {})
|
|
31
|
+
@client.request(
|
|
32
|
+
method: :get,
|
|
33
|
+
path: ["v1/financial_accounts/%1$s/open_to_buy", financial_account_token],
|
|
34
|
+
model: Lithic::FinancialAccounts::FinancialAccountsOpenToBuy,
|
|
35
|
+
options: params[:request_options]
|
|
36
|
+
)
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
# @api private
|
|
40
|
+
#
|
|
41
|
+
# @param client [Lithic::Client]
|
|
42
|
+
def initialize(client:)
|
|
43
|
+
@client = client
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
end
|
|
47
|
+
end
|
|
48
|
+
end
|
|
@@ -6,6 +6,9 @@ module Lithic
|
|
|
6
6
|
# @return [Lithic::Resources::FinancialAccounts::Balances]
|
|
7
7
|
attr_reader :balances
|
|
8
8
|
|
|
9
|
+
# @return [Lithic::Resources::FinancialAccounts::OpenToBuy]
|
|
10
|
+
attr_reader :open_to_buy
|
|
11
|
+
|
|
9
12
|
# @return [Lithic::Resources::FinancialAccounts::FinancialTransactions]
|
|
10
13
|
attr_reader :financial_transactions
|
|
11
14
|
|
|
@@ -18,6 +21,9 @@ module Lithic
|
|
|
18
21
|
# @return [Lithic::Resources::FinancialAccounts::LoanTapes]
|
|
19
22
|
attr_reader :loan_tapes
|
|
20
23
|
|
|
24
|
+
# @return [Lithic::Resources::FinancialAccounts::InstallmentPlans]
|
|
25
|
+
attr_reader :installment_plans
|
|
26
|
+
|
|
21
27
|
# @return [Lithic::Resources::FinancialAccounts::LoanTapeConfiguration]
|
|
22
28
|
attr_reader :loan_tape_configuration
|
|
23
29
|
|
|
@@ -184,10 +190,12 @@ module Lithic
|
|
|
184
190
|
def initialize(client:)
|
|
185
191
|
@client = client
|
|
186
192
|
@balances = Lithic::Resources::FinancialAccounts::Balances.new(client: client)
|
|
193
|
+
@open_to_buy = Lithic::Resources::FinancialAccounts::OpenToBuy.new(client: client)
|
|
187
194
|
@financial_transactions = Lithic::Resources::FinancialAccounts::FinancialTransactions.new(client: client)
|
|
188
195
|
@credit_configuration = Lithic::Resources::FinancialAccounts::CreditConfiguration.new(client: client)
|
|
189
196
|
@statements = Lithic::Resources::FinancialAccounts::Statements.new(client: client)
|
|
190
197
|
@loan_tapes = Lithic::Resources::FinancialAccounts::LoanTapes.new(client: client)
|
|
198
|
+
@installment_plans = Lithic::Resources::FinancialAccounts::InstallmentPlans.new(client: client)
|
|
191
199
|
@loan_tape_configuration =
|
|
192
200
|
Lithic::Resources::FinancialAccounts::LoanTapeConfiguration.new(client: client)
|
|
193
201
|
@interest_tier_schedule = Lithic::Resources::FinancialAccounts::InterestTierSchedule.new(client: client)
|
|
@@ -6,7 +6,14 @@ module Lithic
|
|
|
6
6
|
# Some parameter documentations has been truncated, see
|
|
7
7
|
# {Lithic::Models::PaymentCreateParams} for more details.
|
|
8
8
|
#
|
|
9
|
-
# Initiates
|
|
9
|
+
# Initiates an ACH payment between a financial account and an external bank
|
|
10
|
+
# account.
|
|
11
|
+
#
|
|
12
|
+
# This endpoint originates on the ACH rail only. To send a stablecoin payout, use
|
|
13
|
+
# the
|
|
14
|
+
# [Create stablecoin payment](https://docs.lithic.com/reference/createstablecoinpayment)
|
|
15
|
+
# endpoint. Payments on every rail are read back through
|
|
16
|
+
# [List payments](https://docs.lithic.com/reference/searchpayments).
|
|
10
17
|
#
|
|
11
18
|
# @overload create(amount:, external_bank_account_token:, financial_account_token:, method_:, method_attributes:, type:, token: nil, hold: nil, memo: nil, user_defined_id: nil, request_options: {})
|
|
12
19
|
#
|
|
@@ -112,22 +119,83 @@ module Lithic
|
|
|
112
119
|
)
|
|
113
120
|
end
|
|
114
121
|
|
|
122
|
+
# Some parameter documentations has been truncated, see
|
|
123
|
+
# {Lithic::Models::PaymentCreateStablecoinParams} for more details.
|
|
124
|
+
#
|
|
125
|
+
# Initiates a stablecoin payout from a financial account to a registered
|
|
126
|
+
# blockchain recipient.
|
|
127
|
+
#
|
|
128
|
+
# The recipient must have been registered with
|
|
129
|
+
# [Create blockchain recipient](https://docs.lithic.com/reference/createblockchainrecipient)
|
|
130
|
+
# and have completed address screening — only a recipient in the `ENABLED`
|
|
131
|
+
# verification state can receive a payout. The destination address and chain come
|
|
132
|
+
# from the recipient, so they are not supplied here.
|
|
133
|
+
#
|
|
134
|
+
# Only payouts are initiated through this endpoint. Stablecoin pay-ins are
|
|
135
|
+
# credited from on-chain deposits to a financial account's deposit address and are
|
|
136
|
+
# not created through the API. Funds are placed on hold when the payout is
|
|
137
|
+
# initiated, and a payout that fails on chain reverses that hold. A payout cannot
|
|
138
|
+
# be cancelled once it has been submitted on chain.
|
|
139
|
+
#
|
|
140
|
+
# This endpoint is only available to stablecoin-enabled programs. Contact your
|
|
141
|
+
# customer success manager to learn more.
|
|
142
|
+
#
|
|
143
|
+
# @overload create_stablecoin(amount:, blockchain_recipient_token:, financial_account_token:, type:, token: nil, hold: nil, memo: nil, request_options: {})
|
|
144
|
+
#
|
|
145
|
+
# @param amount [Integer] Payout amount in cents
|
|
146
|
+
#
|
|
147
|
+
# @param blockchain_recipient_token [String] Token of the blockchain recipient to send the payout to. The recipient must be i
|
|
148
|
+
#
|
|
149
|
+
# @param financial_account_token [String] Token of the financial account the payout is funded from
|
|
150
|
+
#
|
|
151
|
+
# @param type [Symbol, Lithic::Models::PaymentCreateStablecoinParams::Type] Direction of the payment. Stablecoin supports payouts only
|
|
152
|
+
#
|
|
153
|
+
# @param token [String] Customer-provided token that will serve as an idempotency token. This token will
|
|
154
|
+
#
|
|
155
|
+
# @param hold [Lithic::Models::PaymentCreateStablecoinParams::Hold] Optional hold to settle when this payout is initiated
|
|
156
|
+
#
|
|
157
|
+
# @param memo [String] Memo recorded on the payout. Defaults to `Stablecoin payout on <chain>` when omi
|
|
158
|
+
#
|
|
159
|
+
# @param request_options [Lithic::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
160
|
+
#
|
|
161
|
+
# @return [Lithic::Models::PaymentCreateStablecoinResponse]
|
|
162
|
+
#
|
|
163
|
+
# @see Lithic::Models::PaymentCreateStablecoinParams
|
|
164
|
+
def create_stablecoin(params)
|
|
165
|
+
parsed, options = Lithic::PaymentCreateStablecoinParams.dump_request(params)
|
|
166
|
+
@client.request(
|
|
167
|
+
method: :post,
|
|
168
|
+
path: "v1/payments/stablecoin",
|
|
169
|
+
body: parsed,
|
|
170
|
+
model: Lithic::Models::PaymentCreateStablecoinResponse,
|
|
171
|
+
options: options
|
|
172
|
+
)
|
|
173
|
+
end
|
|
174
|
+
|
|
175
|
+
# Some parameter documentations has been truncated, see
|
|
176
|
+
# {Lithic::Models::PaymentRetryParams} for more details.
|
|
177
|
+
#
|
|
115
178
|
# Retry an origination which has been returned.
|
|
116
179
|
#
|
|
117
|
-
# @overload retry_(payment_token, request_options: {})
|
|
180
|
+
# @overload retry_(payment_token, method_: nil, request_options: {})
|
|
118
181
|
#
|
|
119
182
|
# @param payment_token [String]
|
|
183
|
+
#
|
|
184
|
+
# @param method_ [Symbol, Lithic::Models::PaymentRetryParams::Method] Settlement speed to retry the payment at. Defaults to the original payment's met
|
|
185
|
+
#
|
|
120
186
|
# @param request_options [Lithic::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
121
187
|
#
|
|
122
188
|
# @return [Lithic::Models::PaymentRetryResponse]
|
|
123
189
|
#
|
|
124
190
|
# @see Lithic::Models::PaymentRetryParams
|
|
125
191
|
def retry_(payment_token, params = {})
|
|
192
|
+
parsed, options = Lithic::PaymentRetryParams.dump_request(params)
|
|
126
193
|
@client.request(
|
|
127
194
|
method: :post,
|
|
128
195
|
path: ["v1/payments/%1$s/retry", payment_token],
|
|
196
|
+
body: parsed,
|
|
129
197
|
model: Lithic::Models::PaymentRetryResponse,
|
|
130
|
-
options:
|
|
198
|
+
options: options
|
|
131
199
|
)
|
|
132
200
|
end
|
|
133
201
|
|
|
@@ -131,7 +131,7 @@ module Lithic
|
|
|
131
131
|
# [update account](https://docs.lithic.com/reference/patchaccountbytoken)
|
|
132
132
|
# endpoint.
|
|
133
133
|
#
|
|
134
|
-
# @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: {})
|
|
134
|
+
# @overload simulate_authorization(amount:, descriptor:, pan:, billing_currency: nil, 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, settlement_currency: nil, status: nil, request_options: {})
|
|
135
135
|
#
|
|
136
136
|
# @param amount [Integer] Amount (in cents) to authorize. For credit authorizations and financial credit a
|
|
137
137
|
#
|
|
@@ -139,6 +139,8 @@ module Lithic
|
|
|
139
139
|
#
|
|
140
140
|
# @param pan [String] Sixteen digit card number.
|
|
141
141
|
#
|
|
142
|
+
# @param billing_currency [String] 3-character alphabetic ISO 4217 currency code for the cardholder billing amount.
|
|
143
|
+
#
|
|
142
144
|
# @param mcc [String] Merchant category code for the transaction to be simulated. A four-digit number
|
|
143
145
|
#
|
|
144
146
|
# @param merchant_acceptor_city [String] Merchant acceptor city
|
|
@@ -151,12 +153,14 @@ module Lithic
|
|
|
151
153
|
#
|
|
152
154
|
# @param merchant_amount [Integer] Amount of the transaction to be simulated in currency specified in merchant_curr
|
|
153
155
|
#
|
|
154
|
-
# @param merchant_currency [String] 3-character alphabetic ISO 4217 currency code
|
|
156
|
+
# @param merchant_currency [String] 3-character alphabetic ISO 4217 currency code for the merchant amount. Only used
|
|
155
157
|
#
|
|
156
158
|
# @param partial_approval_capable [Boolean] Set to true if the terminal is capable of partial approval otherwise false.
|
|
157
159
|
#
|
|
158
160
|
# @param pin [String] Simulate entering a PIN. If omitted, PIN check will not be performed.
|
|
159
161
|
#
|
|
162
|
+
# @param settlement_currency [String] 3-character alphabetic ISO 4217 currency code for the settlement amount. Permitt
|
|
163
|
+
#
|
|
160
164
|
# @param status [Symbol, Lithic::Models::TransactionSimulateAuthorizationParams::Status] Type of event to simulate.
|
|
161
165
|
#
|
|
162
166
|
# @param request_options [Lithic::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
@@ -244,7 +248,7 @@ module Lithic
|
|
|
244
248
|
# Simulates a credit authorization advice from the card network. This message
|
|
245
249
|
# indicates that the network approved a credit authorization on your behalf.
|
|
246
250
|
#
|
|
247
|
-
# @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: {})
|
|
251
|
+
# @overload simulate_credit_authorization_advice(amount:, descriptor:, pan:, billing_currency: nil, mcc: nil, merchant_acceptor_city: nil, merchant_acceptor_country: nil, merchant_acceptor_id: nil, merchant_acceptor_state: nil, request_options: {})
|
|
248
252
|
#
|
|
249
253
|
# @param amount [Integer] Amount (in cents). Any value entered will be converted into a negative amount in
|
|
250
254
|
#
|
|
@@ -252,6 +256,8 @@ module Lithic
|
|
|
252
256
|
#
|
|
253
257
|
# @param pan [String] Sixteen digit card number.
|
|
254
258
|
#
|
|
259
|
+
# @param billing_currency [String] 3-character alphabetic ISO 4217 currency code for the cardholder billing amount.
|
|
260
|
+
#
|
|
255
261
|
# @param mcc [String] Merchant category code for the transaction to be simulated. A four-digit number
|
|
256
262
|
#
|
|
257
263
|
# @param merchant_acceptor_city [String] Merchant acceptor city
|
|
@@ -278,11 +284,14 @@ module Lithic
|
|
|
278
284
|
)
|
|
279
285
|
end
|
|
280
286
|
|
|
287
|
+
# Some parameter documentations has been truncated, see
|
|
288
|
+
# {Lithic::Models::TransactionSimulateReturnParams} for more details.
|
|
289
|
+
#
|
|
281
290
|
# Returns, or refunds, an amount back to a card. Returns simulated via this
|
|
282
291
|
# endpoint clear immediately, without prior authorization, and result in a
|
|
283
292
|
# `SETTLED` transaction status.
|
|
284
293
|
#
|
|
285
|
-
# @overload simulate_return(amount:, descriptor:, pan:, request_options: {})
|
|
294
|
+
# @overload simulate_return(amount:, descriptor:, pan:, billing_currency: nil, settlement_currency: nil, request_options: {})
|
|
286
295
|
#
|
|
287
296
|
# @param amount [Integer] Amount (in cents) to authorize.
|
|
288
297
|
#
|
|
@@ -290,6 +299,10 @@ module Lithic
|
|
|
290
299
|
#
|
|
291
300
|
# @param pan [String] Sixteen digit card number.
|
|
292
301
|
#
|
|
302
|
+
# @param billing_currency [String] 3-character alphabetic ISO 4217 currency code for the cardholder billing amount.
|
|
303
|
+
#
|
|
304
|
+
# @param settlement_currency [String] 3-character alphabetic ISO 4217 currency code for the settlement amount. Permitt
|
|
305
|
+
#
|
|
293
306
|
# @param request_options [Lithic::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
294
307
|
#
|
|
295
308
|
# @return [Lithic::Models::TransactionSimulateReturnResponse]
|
|
@@ -37,6 +37,24 @@ module Lithic
|
|
|
37
37
|
Lithic::Internal::Type::Converter.coerce(Lithic::Models::ParsedWebhookEvent, parsed)
|
|
38
38
|
end
|
|
39
39
|
|
|
40
|
+
# @param payload [String] The raw webhook payload as a string
|
|
41
|
+
#
|
|
42
|
+
# @param headers [Hash{String=>String}] The raw HTTP headers that came with the payload
|
|
43
|
+
#
|
|
44
|
+
# @param key [String, nil] The webhook signing key
|
|
45
|
+
#
|
|
46
|
+
# @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::CardAuthorizationChallengeWebhookEvent, Lithic::Models::CardAuthorizationChallengeResponseWebhookEvent, Lithic::Models::AuthRulesBacktestReportCreatedWebhookEvent, Lithic::Models::BalanceUpdatedWebhookEvent, Lithic::Models::BookTransferTransactionCreatedWebhookEvent, Lithic::Models::BookTransferTransactionUpdatedWebhookEvent, Lithic::Models::CardCreatedWebhookEvent, Lithic::Models::CardConvertedWebhookEvent, Lithic::Models::CardPinUpdatedWebhookEvent, Lithic::Models::CardRenewedWebhookEvent, Lithic::Models::CardReissuedWebhookEvent, Lithic::Models::CardShippedWebhookEvent, Lithic::Models::CardUpdatedWebhookEvent, Lithic::Models::CardTransactionUpdatedWebhookEvent, Lithic::Models::CardTransactionEnhancedDataCreatedWebhookEvent, Lithic::Models::CardTransactionEnhancedDataUpdatedWebhookEvent, Lithic::Models::ClaimCreatedWebhookEvent, Lithic::Models::ClaimUpdatedWebhookEvent, Lithic::Models::ClaimDocumentUploadedWebhookEvent, Lithic::Models::ClaimDocumentAcceptedWebhookEvent, Lithic::Models::ClaimDocumentRejectedWebhookEvent, Lithic::Models::DigitalWalletTokenizationApprovalRequestWebhookEvent, Lithic::Models::DigitalWalletTokenizationResultWebhookEvent, Lithic::Models::DigitalWalletTokenizationTwoFactorAuthenticationCodeWebhookEvent, Lithic::Models::DigitalWalletTokenizationTwoFactorAuthenticationCodeSentWebhookEvent, Lithic::Models::DigitalWalletTokenizationUpdatedWebhookEvent, Lithic::Models::DisputeUpdatedWebhookEvent, Lithic::Models::DisputeEvidenceUploadFailedWebhookEvent, Lithic::Models::EmbedSessionGeneratedWebhookEvent, Lithic::Models::EmbedViewedWebhookEvent, 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]
|
|
47
|
+
def parsed(payload, headers:, key: @client.webhook_secret)
|
|
48
|
+
if key.nil?
|
|
49
|
+
raise ArgumentError.new("Cannot verify a webhook without a key on either the client's webhook_secret or passed in as an argument")
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
::StandardWebhooks::Webhook.new(key).verify(payload, headers)
|
|
53
|
+
|
|
54
|
+
parsed = JSON.parse(payload, symbolize_names: true)
|
|
55
|
+
Lithic::Internal::Type::Converter.coerce(Lithic::Models::ParsedWebhookEvent, parsed)
|
|
56
|
+
end
|
|
57
|
+
|
|
40
58
|
# Verifies the signature of a webhook payload using the Standard Webhooks specification.
|
|
41
59
|
#
|
|
42
60
|
# @param payload [String] The raw webhook payload as a string
|
data/lib/lithic/version.rb
CHANGED