lithic 0.21.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 +19 -0
- data/README.md +1 -10
- data/lib/lithic/internal/type/union.rb +21 -7
- 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 +55 -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/v2_create_params.rb +203 -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_update_entities_params.rb +39 -0
- data/lib/lithic/models/auth_rules/v2_update_params.rb +133 -12
- data/lib/lithic/models/card_authorization.rb +11 -1
- data/lib/lithic/models/card_create_params.rb +11 -1
- data/lib/lithic/models/card_update_params.rb +12 -1
- 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/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/non_pci_card.rb +11 -1
- data/lib/lithic/models/parsed_webhook_event.rb +120 -66
- data/lib/lithic/models/payment.rb +2 -1
- data/lib/lithic/models/transaction.rb +2 -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/resources/auth_rules/v2/backtests.rb +8 -8
- data/lib/lithic/resources/auth_rules/v2.rb +44 -8
- data/lib/lithic/resources/cards.rb +6 -2
- data/lib/lithic/resources/financial_accounts/installment_plans/statements.rb +107 -0
- data/lib/lithic/resources/financial_accounts/installment_plans.rb +4 -0
- 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 +8 -1
- 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 +53 -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/v2_create_params.rbi +325 -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_update_entities_params.rbi +68 -0
- data/rbi/lithic/models/auth_rules/v2_update_params.rbi +198 -5
- data/rbi/lithic/models/card_authorization.rbi +12 -0
- data/rbi/lithic/models/card_create_params.rbi +15 -0
- data/rbi/lithic/models/card_update_params.rbi +17 -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/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/non_pci_card.rbi +12 -0
- data/rbi/lithic/models/parsed_webhook_event.rbi +195 -90
- data/rbi/lithic/models/payment.rbi +4 -2
- data/rbi/lithic/models/transaction.rbi +4 -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/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/cards.rbi +11 -0
- data/rbi/lithic/resources/financial_accounts/installment_plans/statements.rbi +86 -0
- data/rbi/lithic/resources/financial_accounts/installment_plans.rbi +7 -0
- data/rbi/lithic/resources/transactions.rbi +31 -2
- 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 +8 -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/v2_create_params.rbs +86 -16
- data/sig/lithic/models/auth_rules/v2_draft_params.rbs +1 -2
- 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/card_authorization.rbs +5 -0
- data/sig/lithic/models/card_create_params.rbs +7 -0
- data/sig/lithic/models/card_update_params.rbs +8 -1
- 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/kyb_business_entity.rbs +13 -13
- data/sig/lithic/models/non_pci_card.rbs +5 -0
- data/sig/lithic/models/parsed_webhook_event.rbs +39 -39
- 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/resources/auth_rules/v2.rbs +7 -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 +2 -0
- data/sig/lithic/resources/transactions.rbs +5 -0
- metadata +26 -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
|
@@ -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
|
|
@@ -4,6 +4,9 @@ module Lithic
|
|
|
4
4
|
module Resources
|
|
5
5
|
class FinancialAccounts
|
|
6
6
|
class InstallmentPlans
|
|
7
|
+
# @return [Lithic::Resources::FinancialAccounts::InstallmentPlans::Statements]
|
|
8
|
+
attr_reader :statements
|
|
9
|
+
|
|
7
10
|
# Get a specific installment plan for a given financial account.
|
|
8
11
|
#
|
|
9
12
|
# @overload retrieve(installment_plan_token, financial_account_token:, request_options: {})
|
|
@@ -75,6 +78,7 @@ module Lithic
|
|
|
75
78
|
# @param client [Lithic::Client]
|
|
76
79
|
def initialize(client:)
|
|
77
80
|
@client = client
|
|
81
|
+
@statements = Lithic::Resources::FinancialAccounts::InstallmentPlans::Statements.new(client: client)
|
|
78
82
|
end
|
|
79
83
|
end
|
|
80
84
|
end
|
|
@@ -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
data/lib/lithic.rb
CHANGED
|
@@ -120,6 +120,9 @@ require_relative "lithic/models/api_status"
|
|
|
120
120
|
require_relative "lithic/models/auth_rules/ach_payment_update_action"
|
|
121
121
|
require_relative "lithic/models/auth_rules/auth_rule"
|
|
122
122
|
require_relative "lithic/models/auth_rules/auth_rule_condition"
|
|
123
|
+
require_relative "lithic/models/auth_rules/auth_rule_entities"
|
|
124
|
+
require_relative "lithic/models/auth_rules/auth_rule_entities_response"
|
|
125
|
+
require_relative "lithic/models/auth_rules/auth_rule_entity"
|
|
123
126
|
require_relative "lithic/models/auth_rules/auth_rule_version"
|
|
124
127
|
require_relative "lithic/models/auth_rules/backtest_stats"
|
|
125
128
|
require_relative "lithic/models/auth_rules/card_transaction_update_action"
|
|
@@ -129,7 +132,6 @@ require_relative "lithic/models/auth_rules/conditional_ach_payment_update_action
|
|
|
129
132
|
require_relative "lithic/models/auth_rules/conditional_attribute"
|
|
130
133
|
require_relative "lithic/models/auth_rules/conditional_authorization_action_parameters"
|
|
131
134
|
require_relative "lithic/models/auth_rules/conditional_authorization_adjustment_parameters"
|
|
132
|
-
require_relative "lithic/models/auth_rules/conditional_block_parameters"
|
|
133
135
|
require_relative "lithic/models/auth_rules/conditional_card_transaction_update_action_parameters"
|
|
134
136
|
require_relative "lithic/models/auth_rules/conditional_operation"
|
|
135
137
|
require_relative "lithic/models/auth_rules/conditional_tokenization_action_parameters"
|
|
@@ -157,6 +159,7 @@ require_relative "lithic/models/auth_rules/v2_retrieve_features_response"
|
|
|
157
159
|
require_relative "lithic/models/auth_rules/v2_retrieve_params"
|
|
158
160
|
require_relative "lithic/models/auth_rules/v2_retrieve_report_params"
|
|
159
161
|
require_relative "lithic/models/auth_rules/v2_retrieve_report_response"
|
|
162
|
+
require_relative "lithic/models/auth_rules/v2_update_entities_params"
|
|
160
163
|
require_relative "lithic/models/auth_rules/v2_update_params"
|
|
161
164
|
require_relative "lithic/models/auth_rules/velocity_limit_params"
|
|
162
165
|
require_relative "lithic/models/auth_rules/velocity_limit_period"
|
|
@@ -331,6 +334,9 @@ require_relative "lithic/models/financial_accounts/financial_transaction_retriev
|
|
|
331
334
|
require_relative "lithic/models/financial_accounts/installment_plan"
|
|
332
335
|
require_relative "lithic/models/financial_accounts/installment_plan_list_params"
|
|
333
336
|
require_relative "lithic/models/financial_accounts/installment_plan_retrieve_params"
|
|
337
|
+
require_relative "lithic/models/financial_accounts/installment_plans/installment_plan_statement"
|
|
338
|
+
require_relative "lithic/models/financial_accounts/installment_plans/statement_list_params"
|
|
339
|
+
require_relative "lithic/models/financial_accounts/installment_plans/statement_retrieve_params"
|
|
334
340
|
require_relative "lithic/models/financial_accounts/interest_tier_schedule_create_params"
|
|
335
341
|
require_relative "lithic/models/financial_accounts/interest_tier_schedule_delete_params"
|
|
336
342
|
require_relative "lithic/models/financial_accounts/interest_tier_schedule_list_params"
|
|
@@ -562,6 +568,7 @@ require_relative "lithic/resources/financial_accounts/balances"
|
|
|
562
568
|
require_relative "lithic/resources/financial_accounts/credit_configuration"
|
|
563
569
|
require_relative "lithic/resources/financial_accounts/financial_transactions"
|
|
564
570
|
require_relative "lithic/resources/financial_accounts/installment_plans"
|
|
571
|
+
require_relative "lithic/resources/financial_accounts/installment_plans/statements"
|
|
565
572
|
require_relative "lithic/resources/financial_accounts/interest_tier_schedule"
|
|
566
573
|
require_relative "lithic/resources/financial_accounts/loan_tape_configuration"
|
|
567
574
|
require_relative "lithic/resources/financial_accounts/loan_tapes"
|
|
@@ -406,7 +406,8 @@ module Lithic
|
|
|
406
406
|
attr_accessor :last_name
|
|
407
407
|
|
|
408
408
|
# Individual's current address - PO boxes, UPS drops, and FedEx drops are not
|
|
409
|
-
# acceptable; APO/FPO are acceptable. Only USA addresses are
|
|
409
|
+
# acceptable; APO/FPO are acceptable. Only USA addresses are supported for the KYB
|
|
410
|
+
# and KYC workflows.
|
|
410
411
|
sig { returns(T.nilable(Lithic::Address)) }
|
|
411
412
|
attr_reader :address
|
|
412
413
|
|
|
@@ -464,7 +465,8 @@ module Lithic
|
|
|
464
465
|
# Individual's last name, as it appears on government-issued identity documents.
|
|
465
466
|
last_name:,
|
|
466
467
|
# Individual's current address - PO boxes, UPS drops, and FedEx drops are not
|
|
467
|
-
# acceptable; APO/FPO are acceptable. Only USA addresses are
|
|
468
|
+
# acceptable; APO/FPO are acceptable. Only USA addresses are supported for the KYB
|
|
469
|
+
# and KYC workflows.
|
|
468
470
|
address: nil,
|
|
469
471
|
# Individual's date of birth, as an RFC 3339 date.
|
|
470
472
|
dob: nil,
|
|
@@ -516,7 +518,8 @@ module Lithic
|
|
|
516
518
|
attr_accessor :last_name
|
|
517
519
|
|
|
518
520
|
# Individual's current address - PO boxes, UPS drops, and FedEx drops are not
|
|
519
|
-
# acceptable; APO/FPO are acceptable. Only USA addresses are
|
|
521
|
+
# acceptable; APO/FPO are acceptable. Only USA addresses are supported for the KYB
|
|
522
|
+
# and KYC workflows.
|
|
520
523
|
sig { returns(T.nilable(Lithic::Address)) }
|
|
521
524
|
attr_reader :address
|
|
522
525
|
|
|
@@ -580,7 +583,8 @@ module Lithic
|
|
|
580
583
|
# Individual's last name, as it appears on government-issued identity documents.
|
|
581
584
|
last_name:,
|
|
582
585
|
# Individual's current address - PO boxes, UPS drops, and FedEx drops are not
|
|
583
|
-
# acceptable; APO/FPO are acceptable. Only USA addresses are
|
|
586
|
+
# acceptable; APO/FPO are acceptable. Only USA addresses are supported for the KYB
|
|
587
|
+
# and KYC workflows.
|
|
584
588
|
address: nil,
|
|
585
589
|
# Individual's date of birth, as an RFC 3339 date.
|
|
586
590
|
dob: nil,
|