lithic 0.7.0 → 0.8.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 +36 -0
- data/README.md +3 -3
- data/lib/lithic/client.rb +11 -0
- data/lib/lithic/models/account_activity_list_params.rb +2 -0
- data/lib/lithic/models/account_activity_list_response.rb +8 -2
- data/lib/lithic/models/account_activity_retrieve_transaction_response.rb +8 -2
- data/lib/lithic/models/auth_rules/auth_rule.rb +84 -8
- data/lib/lithic/models/auth_rules/auth_rule_version.rb +92 -0
- data/lib/lithic/models/auth_rules/rule_feature.rb +231 -0
- data/lib/lithic/models/auth_rules/typescript_code_parameters.rb +33 -0
- data/lib/lithic/models/auth_rules/v2/backtest_results.rb +9 -17
- data/lib/lithic/models/auth_rules/v2_create_params.rb +50 -10
- data/lib/lithic/models/auth_rules/v2_draft_params.rb +6 -3
- data/lib/lithic/models/auth_rules/v2_list_versions_params.rb +22 -0
- data/lib/lithic/models/auth_rules/v2_list_versions_response.rb +18 -0
- data/lib/lithic/models/auth_rules/v2_retrieve_features_response.rb +3 -83
- data/lib/lithic/models/auth_rules/v2_retrieve_report_response.rb +525 -1
- data/lib/lithic/models/auth_rules/v2_update_params.rb +17 -1
- data/lib/lithic/models/auth_rules/velocity_limit_filters.rb +87 -0
- data/lib/lithic/models/auth_rules/velocity_limit_params.rb +3 -84
- data/lib/lithic/models/digital_wallet_tokenization_approval_request_webhook_event.rb +69 -59
- data/lib/lithic/models/dispute_create_params.rb +11 -11
- data/lib/lithic/models/dispute_list_params.rb +3 -3
- data/lib/lithic/models/dispute_update_params.rb +9 -9
- data/lib/lithic/models/event.rb +0 -7
- data/lib/lithic/models/event_list_params.rb +0 -4
- data/lib/lithic/models/event_subscription.rb +0 -4
- data/lib/lithic/models/events/subscription_create_params.rb +0 -4
- data/lib/lithic/models/events/subscription_send_simulated_example_params.rb +0 -1
- data/lib/lithic/models/events/subscription_update_params.rb +0 -4
- data/lib/lithic/models/financial_account.rb +1 -0
- data/lib/lithic/models/financial_account_list_params.rb +1 -0
- data/lib/lithic/models/financial_accounts/interest_tier_schedule.rb +9 -1
- data/lib/lithic/models/financial_accounts/interest_tier_schedule_update_params.rb +9 -1
- data/lib/lithic/models/financial_accounts/statements/statement_line_items.rb +27 -2
- data/lib/lithic/models/hold.rb +147 -0
- data/lib/lithic/models/hold_create_params.rb +61 -0
- data/lib/lithic/models/hold_event.rb +110 -0
- data/lib/lithic/models/hold_list_params.rb +89 -0
- data/lib/lithic/models/hold_retrieve_params.rb +20 -0
- data/lib/lithic/models/hold_void_params.rb +29 -0
- data/lib/lithic/models/instance_financial_account_type.rb +1 -0
- data/lib/lithic/models/parsed_webhook_event.rb +2 -4
- data/lib/lithic/models/payment.rb +76 -12
- data/lib/lithic/models/payment_simulate_action_params.rb +1 -0
- data/lib/lithic/models.rb +12 -2
- data/lib/lithic/resources/account_activity.rb +2 -2
- data/lib/lithic/resources/auth_rules/v2.rb +24 -4
- data/lib/lithic/resources/disputes.rb +21 -21
- data/lib/lithic/resources/financial_accounts/interest_tier_schedule.rb +6 -2
- data/lib/lithic/resources/holds.rb +132 -0
- data/lib/lithic/resources/webhooks.rb +2 -3
- data/lib/lithic/version.rb +1 -1
- data/lib/lithic.rb +14 -1
- data/rbi/lithic/client.rbi +9 -0
- data/rbi/lithic/models/account_activity_list_params.rbi +10 -0
- data/rbi/lithic/models/account_activity_list_response.rbi +14 -2
- data/rbi/lithic/models/account_activity_retrieve_transaction_response.rbi +14 -2
- data/rbi/lithic/models/auth_rules/auth_rule.rbi +128 -4
- data/rbi/lithic/models/auth_rules/auth_rule_version.rbi +142 -0
- data/rbi/lithic/models/auth_rules/rule_feature.rbi +414 -0
- data/rbi/lithic/models/auth_rules/typescript_code_parameters.rbi +94 -0
- data/rbi/lithic/models/auth_rules/v2/backtest_results.rbi +12 -35
- data/rbi/lithic/models/auth_rules/v2_create_params.rbi +81 -12
- data/rbi/lithic/models/auth_rules/v2_draft_params.rbi +8 -4
- data/rbi/lithic/models/auth_rules/v2_list_versions_params.rbi +40 -0
- data/rbi/lithic/models/auth_rules/v2_list_versions_response.rbi +36 -0
- data/rbi/lithic/models/auth_rules/v2_retrieve_features_response.rbi +4 -209
- data/rbi/lithic/models/auth_rules/v2_retrieve_report_response.rbi +1692 -3
- data/rbi/lithic/models/auth_rules/v2_update_params.rbi +24 -0
- data/rbi/lithic/models/auth_rules/velocity_limit_filters.rbi +205 -0
- data/rbi/lithic/models/auth_rules/velocity_limit_params.rbi +4 -206
- data/rbi/lithic/models/digital_wallet_tokenization_approval_request_webhook_event.rbi +154 -142
- data/rbi/lithic/models/dispute_create_params.rbi +11 -11
- data/rbi/lithic/models/dispute_list_params.rbi +3 -3
- data/rbi/lithic/models/dispute_update_params.rbi +9 -9
- data/rbi/lithic/models/event.rbi +0 -14
- data/rbi/lithic/models/event_list_params.rbi +0 -8
- data/rbi/lithic/models/event_subscription.rbi +0 -8
- data/rbi/lithic/models/events/subscription_create_params.rbi +0 -8
- data/rbi/lithic/models/events/subscription_send_simulated_example_params.rbi +0 -5
- data/rbi/lithic/models/events/subscription_update_params.rbi +0 -8
- data/rbi/lithic/models/financial_account.rbi +5 -0
- data/rbi/lithic/models/financial_account_list_params.rbi +5 -0
- data/rbi/lithic/models/financial_accounts/interest_tier_schedule.rbi +11 -0
- data/rbi/lithic/models/financial_accounts/interest_tier_schedule_update_params.rbi +11 -0
- data/rbi/lithic/models/financial_accounts/statements/statement_line_items.rbi +38 -3
- data/rbi/lithic/models/hold.rbi +183 -0
- data/rbi/lithic/models/hold_create_params.rbi +90 -0
- data/rbi/lithic/models/hold_event.rbi +148 -0
- data/rbi/lithic/models/hold_list_params.rbi +137 -0
- data/rbi/lithic/models/hold_retrieve_params.rbi +35 -0
- data/rbi/lithic/models/hold_void_params.rbi +49 -0
- data/rbi/lithic/models/instance_financial_account_type.rbi +5 -0
- data/rbi/lithic/models/parsed_webhook_event.rbi +0 -1
- data/rbi/lithic/models/payment.rbi +139 -13
- data/rbi/lithic/models/payment_simulate_action_params.rbi +5 -0
- data/rbi/lithic/models.rbi +12 -3
- data/rbi/lithic/resources/auth_rules/v2.rbi +16 -4
- data/rbi/lithic/resources/disputes.rbi +21 -21
- data/rbi/lithic/resources/financial_accounts/interest_tier_schedule.rbi +6 -0
- data/rbi/lithic/resources/holds.rbi +111 -0
- data/rbi/lithic/resources/webhooks.rbi +8 -2
- data/sig/lithic/client.rbs +5 -0
- data/sig/lithic/models/account_activity_list_params.rbs +4 -0
- data/sig/lithic/models/account_activity_list_response.rbs +5 -0
- data/sig/lithic/models/account_activity_retrieve_transaction_response.rbs +5 -0
- data/sig/lithic/models/auth_rules/auth_rule.rbs +42 -0
- data/sig/lithic/models/auth_rules/auth_rule_version.rbs +67 -0
- data/sig/lithic/models/auth_rules/rule_feature.rbs +173 -0
- data/sig/lithic/models/auth_rules/typescript_code_parameters.rbs +27 -0
- data/sig/lithic/models/auth_rules/v2/backtest_results.rbs +5 -18
- data/sig/lithic/models/auth_rules/v2_create_params.rbs +25 -0
- data/sig/lithic/models/auth_rules/v2_draft_params.rbs +1 -0
- data/sig/lithic/models/auth_rules/v2_list_versions_params.rbs +25 -0
- data/sig/lithic/models/auth_rules/v2_list_versions_response.rbs +18 -0
- data/sig/lithic/models/auth_rules/v2_retrieve_features_response.rbs +4 -80
- data/sig/lithic/models/auth_rules/v2_retrieve_report_response.rbs +658 -3
- data/sig/lithic/models/auth_rules/v2_update_params.rbs +16 -0
- data/sig/lithic/models/auth_rules/velocity_limit_filters.rbs +81 -0
- data/sig/lithic/models/auth_rules/velocity_limit_params.rbs +6 -82
- data/sig/lithic/models/digital_wallet_tokenization_approval_request_webhook_event.rbs +38 -38
- data/sig/lithic/models/event.rbs +0 -2
- data/sig/lithic/models/event_list_params.rbs +0 -2
- data/sig/lithic/models/event_subscription.rbs +0 -2
- data/sig/lithic/models/events/subscription_create_params.rbs +0 -2
- data/sig/lithic/models/events/subscription_send_simulated_example_params.rbs +0 -2
- data/sig/lithic/models/events/subscription_update_params.rbs +0 -2
- data/sig/lithic/models/financial_account.rbs +2 -0
- data/sig/lithic/models/financial_account_list_params.rbs +7 -1
- data/sig/lithic/models/financial_accounts/interest_tier_schedule.rbs +7 -0
- data/sig/lithic/models/financial_accounts/interest_tier_schedule_update_params.rbs +7 -0
- data/sig/lithic/models/financial_accounts/statements/statement_line_items.rbs +17 -3
- data/sig/lithic/models/hold.rbs +137 -0
- data/sig/lithic/models/hold_create_params.rbs +57 -0
- data/sig/lithic/models/hold_event.rbs +91 -0
- data/sig/lithic/models/hold_list_params.rbs +83 -0
- data/sig/lithic/models/hold_retrieve_params.rbs +23 -0
- data/sig/lithic/models/hold_void_params.rbs +28 -0
- data/sig/lithic/models/instance_financial_account_type.rbs +2 -0
- data/sig/lithic/models/parsed_webhook_event.rbs +0 -1
- data/sig/lithic/models/payment.rbs +23 -8
- data/sig/lithic/models/payment_simulate_action_params.rbs +2 -0
- data/sig/lithic/models.rbs +12 -2
- data/sig/lithic/resources/auth_rules/v2.rbs +5 -0
- data/sig/lithic/resources/financial_accounts/interest_tier_schedule.rbs +2 -0
- data/sig/lithic/resources/holds.rbs +39 -0
- data/sig/lithic/resources/webhooks.rbs +0 -1
- metadata +41 -5
- data/lib/lithic/models/tokenization_decisioning_request_webhook_event.rb +0 -159
- data/rbi/lithic/models/tokenization_decisioning_request_webhook_event.rbi +0 -331
- data/sig/lithic/models/tokenization_decisioning_request_webhook_event.rbs +0 -130
data/lib/lithic.rb
CHANGED
|
@@ -30,6 +30,7 @@ end
|
|
|
30
30
|
|
|
31
31
|
# Gems.
|
|
32
32
|
require "connection_pool"
|
|
33
|
+
require "standardwebhooks"
|
|
33
34
|
|
|
34
35
|
# Package files.
|
|
35
36
|
require_relative "lithic/version"
|
|
@@ -114,6 +115,7 @@ require_relative "lithic/models/address_update"
|
|
|
114
115
|
require_relative "lithic/models/api_status"
|
|
115
116
|
require_relative "lithic/models/auth_rules/auth_rule"
|
|
116
117
|
require_relative "lithic/models/auth_rules/auth_rule_condition"
|
|
118
|
+
require_relative "lithic/models/auth_rules/auth_rule_version"
|
|
117
119
|
require_relative "lithic/models/auth_rules/backtest_stats"
|
|
118
120
|
require_relative "lithic/models/auth_rules/conditional_3ds_action_parameters"
|
|
119
121
|
require_relative "lithic/models/auth_rules/conditional_ach_action_parameters"
|
|
@@ -126,6 +128,8 @@ require_relative "lithic/models/auth_rules/conditional_value"
|
|
|
126
128
|
require_relative "lithic/models/auth_rules/event_stream"
|
|
127
129
|
require_relative "lithic/models/auth_rules/merchant_lock_parameters"
|
|
128
130
|
require_relative "lithic/models/auth_rules/report_stats"
|
|
131
|
+
require_relative "lithic/models/auth_rules/rule_feature"
|
|
132
|
+
require_relative "lithic/models/auth_rules/typescript_code_parameters"
|
|
129
133
|
require_relative "lithic/models/auth_rules/v2/backtest_create_params"
|
|
130
134
|
require_relative "lithic/models/auth_rules/v2/backtest_create_response"
|
|
131
135
|
require_relative "lithic/models/auth_rules/v2/backtest_retrieve_params"
|
|
@@ -135,6 +139,8 @@ require_relative "lithic/models/auth_rules/v2_draft_params"
|
|
|
135
139
|
require_relative "lithic/models/auth_rules/v2_list_params"
|
|
136
140
|
require_relative "lithic/models/auth_rules/v2_list_results_params"
|
|
137
141
|
require_relative "lithic/models/auth_rules/v2_list_results_response"
|
|
142
|
+
require_relative "lithic/models/auth_rules/v2_list_versions_params"
|
|
143
|
+
require_relative "lithic/models/auth_rules/v2_list_versions_response"
|
|
138
144
|
require_relative "lithic/models/auth_rules/v2_promote_params"
|
|
139
145
|
require_relative "lithic/models/auth_rules/v2_retrieve_features_params"
|
|
140
146
|
require_relative "lithic/models/auth_rules/v2_retrieve_features_response"
|
|
@@ -142,6 +148,7 @@ require_relative "lithic/models/auth_rules/v2_retrieve_params"
|
|
|
142
148
|
require_relative "lithic/models/auth_rules/v2_retrieve_report_params"
|
|
143
149
|
require_relative "lithic/models/auth_rules/v2_retrieve_report_response"
|
|
144
150
|
require_relative "lithic/models/auth_rules/v2_update_params"
|
|
151
|
+
require_relative "lithic/models/auth_rules/velocity_limit_filters"
|
|
145
152
|
require_relative "lithic/models/auth_rules/velocity_limit_params"
|
|
146
153
|
require_relative "lithic/models/auth_rules/velocity_limit_period"
|
|
147
154
|
require_relative "lithic/models/auth_rules_backtest_report_created_webhook_event"
|
|
@@ -320,6 +327,12 @@ require_relative "lithic/models/funding_event_list_params"
|
|
|
320
327
|
require_relative "lithic/models/funding_event_retrieve_details_params"
|
|
321
328
|
require_relative "lithic/models/funding_event_retrieve_details_response"
|
|
322
329
|
require_relative "lithic/models/funding_event_retrieve_params"
|
|
330
|
+
require_relative "lithic/models/hold"
|
|
331
|
+
require_relative "lithic/models/hold_create_params"
|
|
332
|
+
require_relative "lithic/models/hold_event"
|
|
333
|
+
require_relative "lithic/models/hold_list_params"
|
|
334
|
+
require_relative "lithic/models/hold_retrieve_params"
|
|
335
|
+
require_relative "lithic/models/hold_void_params"
|
|
323
336
|
require_relative "lithic/models/instance_financial_account_type"
|
|
324
337
|
require_relative "lithic/models/internal_transaction_created_webhook_event"
|
|
325
338
|
require_relative "lithic/models/internal_transaction_updated_webhook_event"
|
|
@@ -397,7 +410,6 @@ require_relative "lithic/models/tokenization"
|
|
|
397
410
|
require_relative "lithic/models/tokenization_activate_params"
|
|
398
411
|
require_relative "lithic/models/tokenization_approval_request_webhook_event"
|
|
399
412
|
require_relative "lithic/models/tokenization_deactivate_params"
|
|
400
|
-
require_relative "lithic/models/tokenization_decisioning_request_webhook_event"
|
|
401
413
|
require_relative "lithic/models/tokenization_decisioning_retrieve_secret_params"
|
|
402
414
|
require_relative "lithic/models/tokenization_decisioning_rotate_secret_params"
|
|
403
415
|
require_relative "lithic/models/tokenization_decisioning_rotate_secret_response"
|
|
@@ -485,6 +497,7 @@ require_relative "lithic/resources/financial_accounts/statements/line_items"
|
|
|
485
497
|
require_relative "lithic/resources/fraud"
|
|
486
498
|
require_relative "lithic/resources/fraud/transactions"
|
|
487
499
|
require_relative "lithic/resources/funding_events"
|
|
500
|
+
require_relative "lithic/resources/holds"
|
|
488
501
|
require_relative "lithic/resources/internal_transaction"
|
|
489
502
|
require_relative "lithic/resources/management_operations"
|
|
490
503
|
require_relative "lithic/resources/network_programs"
|
data/rbi/lithic/client.rbi
CHANGED
|
@@ -22,6 +22,9 @@ module Lithic
|
|
|
22
22
|
sig { returns(String) }
|
|
23
23
|
attr_reader :api_key
|
|
24
24
|
|
|
25
|
+
sig { returns(T.nilable(String)) }
|
|
26
|
+
attr_reader :webhook_secret
|
|
27
|
+
|
|
25
28
|
sig { returns(Lithic::Resources::Accounts) }
|
|
26
29
|
attr_reader :accounts
|
|
27
30
|
|
|
@@ -112,6 +115,9 @@ module Lithic
|
|
|
112
115
|
sig { returns(Lithic::Resources::NetworkPrograms) }
|
|
113
116
|
attr_reader :network_programs
|
|
114
117
|
|
|
118
|
+
sig { returns(Lithic::Resources::Holds) }
|
|
119
|
+
attr_reader :holds
|
|
120
|
+
|
|
115
121
|
sig { returns(Lithic::Resources::AccountActivity) }
|
|
116
122
|
attr_reader :account_activity
|
|
117
123
|
|
|
@@ -139,6 +145,7 @@ module Lithic
|
|
|
139
145
|
sig do
|
|
140
146
|
params(
|
|
141
147
|
api_key: T.nilable(String),
|
|
148
|
+
webhook_secret: T.nilable(String),
|
|
142
149
|
environment: T.nilable(T.any(Symbol, String)),
|
|
143
150
|
base_url: T.nilable(String),
|
|
144
151
|
max_retries: Integer,
|
|
@@ -150,6 +157,8 @@ module Lithic
|
|
|
150
157
|
def self.new(
|
|
151
158
|
# Defaults to `ENV["LITHIC_API_KEY"]`
|
|
152
159
|
api_key: ENV["LITHIC_API_KEY"],
|
|
160
|
+
# Defaults to `ENV["LITHIC_WEBHOOK_SECRET"]`
|
|
161
|
+
webhook_secret: ENV["LITHIC_WEBHOOK_SECRET"],
|
|
153
162
|
# Specifies the environment to use for the API.
|
|
154
163
|
#
|
|
155
164
|
# Each environment maps to a different base URL:
|
|
@@ -188,6 +188,11 @@ module Lithic
|
|
|
188
188
|
|
|
189
189
|
ACH =
|
|
190
190
|
T.let(:ACH, Lithic::AccountActivityListParams::Category::TaggedSymbol)
|
|
191
|
+
WIRE =
|
|
192
|
+
T.let(
|
|
193
|
+
:WIRE,
|
|
194
|
+
Lithic::AccountActivityListParams::Category::TaggedSymbol
|
|
195
|
+
)
|
|
191
196
|
BALANCE_OR_FUNDING =
|
|
192
197
|
T.let(
|
|
193
198
|
:BALANCE_OR_FUNDING,
|
|
@@ -275,6 +280,11 @@ module Lithic
|
|
|
275
280
|
:MANAGEMENT_DISBURSEMENT,
|
|
276
281
|
Lithic::AccountActivityListParams::Category::TaggedSymbol
|
|
277
282
|
)
|
|
283
|
+
HOLD =
|
|
284
|
+
T.let(
|
|
285
|
+
:HOLD,
|
|
286
|
+
Lithic::AccountActivityListParams::Category::TaggedSymbol
|
|
287
|
+
)
|
|
278
288
|
PROGRAM_FUNDING =
|
|
279
289
|
T.let(
|
|
280
290
|
:PROGRAM_FUNDING,
|
|
@@ -6,7 +6,8 @@ module Lithic
|
|
|
6
6
|
# which transaction type is returned: INTERNAL returns FinancialTransaction,
|
|
7
7
|
# TRANSFER returns BookTransferTransaction, CARD returns CardTransaction, PAYMENT
|
|
8
8
|
# returns PaymentTransaction, EXTERNAL_PAYMENT returns ExternalPaymentResponse,
|
|
9
|
-
#
|
|
9
|
+
# MANAGEMENT_OPERATION returns ManagementOperationTransaction, and HOLD returns
|
|
10
|
+
# HoldTransaction
|
|
10
11
|
module AccountActivityListResponse
|
|
11
12
|
extend Lithic::Internal::Type::Union
|
|
12
13
|
|
|
@@ -18,7 +19,8 @@ module Lithic
|
|
|
18
19
|
Lithic::Models::AccountActivityListResponse::Card,
|
|
19
20
|
Lithic::Payment,
|
|
20
21
|
Lithic::ExternalPayment,
|
|
21
|
-
Lithic::ManagementOperationTransaction
|
|
22
|
+
Lithic::ManagementOperationTransaction,
|
|
23
|
+
Lithic::Hold
|
|
22
24
|
)
|
|
23
25
|
end
|
|
24
26
|
|
|
@@ -189,6 +191,11 @@ module Lithic
|
|
|
189
191
|
:ACH,
|
|
190
192
|
Lithic::Models::AccountActivityListResponse::Internal::Category::TaggedSymbol
|
|
191
193
|
)
|
|
194
|
+
WIRE =
|
|
195
|
+
T.let(
|
|
196
|
+
:WIRE,
|
|
197
|
+
Lithic::Models::AccountActivityListResponse::Internal::Category::TaggedSymbol
|
|
198
|
+
)
|
|
192
199
|
BALANCE_OR_FUNDING =
|
|
193
200
|
T.let(
|
|
194
201
|
:BALANCE_OR_FUNDING,
|
|
@@ -279,6 +286,11 @@ module Lithic
|
|
|
279
286
|
:MANAGEMENT_DISBURSEMENT,
|
|
280
287
|
Lithic::Models::AccountActivityListResponse::Internal::Category::TaggedSymbol
|
|
281
288
|
)
|
|
289
|
+
HOLD =
|
|
290
|
+
T.let(
|
|
291
|
+
:HOLD,
|
|
292
|
+
Lithic::Models::AccountActivityListResponse::Internal::Category::TaggedSymbol
|
|
293
|
+
)
|
|
282
294
|
PROGRAM_FUNDING =
|
|
283
295
|
T.let(
|
|
284
296
|
:PROGRAM_FUNDING,
|
|
@@ -6,7 +6,8 @@ module Lithic
|
|
|
6
6
|
# which transaction type is returned: INTERNAL returns FinancialTransaction,
|
|
7
7
|
# TRANSFER returns BookTransferTransaction, CARD returns CardTransaction, PAYMENT
|
|
8
8
|
# returns PaymentTransaction, EXTERNAL_PAYMENT returns ExternalPaymentResponse,
|
|
9
|
-
#
|
|
9
|
+
# MANAGEMENT_OPERATION returns ManagementOperationTransaction, and HOLD returns
|
|
10
|
+
# HoldTransaction
|
|
10
11
|
module AccountActivityRetrieveTransactionResponse
|
|
11
12
|
extend Lithic::Internal::Type::Union
|
|
12
13
|
|
|
@@ -18,7 +19,8 @@ module Lithic
|
|
|
18
19
|
Lithic::Models::AccountActivityRetrieveTransactionResponse::Card,
|
|
19
20
|
Lithic::Payment,
|
|
20
21
|
Lithic::ExternalPayment,
|
|
21
|
-
Lithic::ManagementOperationTransaction
|
|
22
|
+
Lithic::ManagementOperationTransaction,
|
|
23
|
+
Lithic::Hold
|
|
22
24
|
)
|
|
23
25
|
end
|
|
24
26
|
|
|
@@ -189,6 +191,11 @@ module Lithic
|
|
|
189
191
|
:ACH,
|
|
190
192
|
Lithic::Models::AccountActivityRetrieveTransactionResponse::Internal::Category::TaggedSymbol
|
|
191
193
|
)
|
|
194
|
+
WIRE =
|
|
195
|
+
T.let(
|
|
196
|
+
:WIRE,
|
|
197
|
+
Lithic::Models::AccountActivityRetrieveTransactionResponse::Internal::Category::TaggedSymbol
|
|
198
|
+
)
|
|
192
199
|
BALANCE_OR_FUNDING =
|
|
193
200
|
T.let(
|
|
194
201
|
:BALANCE_OR_FUNDING,
|
|
@@ -279,6 +286,11 @@ module Lithic
|
|
|
279
286
|
:MANAGEMENT_DISBURSEMENT,
|
|
280
287
|
Lithic::Models::AccountActivityRetrieveTransactionResponse::Internal::Category::TaggedSymbol
|
|
281
288
|
)
|
|
289
|
+
HOLD =
|
|
290
|
+
T.let(
|
|
291
|
+
:HOLD,
|
|
292
|
+
Lithic::Models::AccountActivityRetrieveTransactionResponse::Internal::Category::TaggedSymbol
|
|
293
|
+
)
|
|
282
294
|
PROGRAM_FUNDING =
|
|
283
295
|
T.let(
|
|
284
296
|
:PROGRAM_FUNDING,
|
|
@@ -81,9 +81,25 @@ module Lithic
|
|
|
81
81
|
# - `MERCHANT_LOCK`: AUTHORIZATION event stream.
|
|
82
82
|
# - `CONDITIONAL_ACTION`: AUTHORIZATION, THREE_DS_AUTHENTICATION, TOKENIZATION,
|
|
83
83
|
# ACH_CREDIT_RECEIPT, or ACH_DEBIT_RECEIPT event stream.
|
|
84
|
+
# - `TYPESCRIPT_CODE`: AUTHORIZATION, THREE_DS_AUTHENTICATION, TOKENIZATION,
|
|
85
|
+
# ACH_CREDIT_RECEIPT, or ACH_DEBIT_RECEIPT event stream.
|
|
84
86
|
sig { returns(Lithic::AuthRules::AuthRule::Type::TaggedSymbol) }
|
|
85
87
|
attr_accessor :type
|
|
86
88
|
|
|
89
|
+
# Account tokens to which the Auth Rule does not apply.
|
|
90
|
+
sig { returns(T.nilable(T::Array[String])) }
|
|
91
|
+
attr_reader :excluded_account_tokens
|
|
92
|
+
|
|
93
|
+
sig { params(excluded_account_tokens: T::Array[String]).void }
|
|
94
|
+
attr_writer :excluded_account_tokens
|
|
95
|
+
|
|
96
|
+
# Business account tokens to which the Auth Rule does not apply.
|
|
97
|
+
sig { returns(T.nilable(T::Array[String])) }
|
|
98
|
+
attr_reader :excluded_business_account_tokens
|
|
99
|
+
|
|
100
|
+
sig { params(excluded_business_account_tokens: T::Array[String]).void }
|
|
101
|
+
attr_writer :excluded_business_account_tokens
|
|
102
|
+
|
|
87
103
|
# Card tokens to which the Auth Rule does not apply.
|
|
88
104
|
sig { returns(T.nilable(T::Array[String])) }
|
|
89
105
|
attr_reader :excluded_card_tokens
|
|
@@ -107,6 +123,8 @@ module Lithic
|
|
|
107
123
|
program_level: T::Boolean,
|
|
108
124
|
state: Lithic::AuthRules::AuthRule::State::OrSymbol,
|
|
109
125
|
type: Lithic::AuthRules::AuthRule::Type::OrSymbol,
|
|
126
|
+
excluded_account_tokens: T::Array[String],
|
|
127
|
+
excluded_business_account_tokens: T::Array[String],
|
|
110
128
|
excluded_card_tokens: T::Array[String]
|
|
111
129
|
).returns(T.attached_class)
|
|
112
130
|
end
|
|
@@ -143,7 +161,13 @@ module Lithic
|
|
|
143
161
|
# - `MERCHANT_LOCK`: AUTHORIZATION event stream.
|
|
144
162
|
# - `CONDITIONAL_ACTION`: AUTHORIZATION, THREE_DS_AUTHENTICATION, TOKENIZATION,
|
|
145
163
|
# ACH_CREDIT_RECEIPT, or ACH_DEBIT_RECEIPT event stream.
|
|
164
|
+
# - `TYPESCRIPT_CODE`: AUTHORIZATION, THREE_DS_AUTHENTICATION, TOKENIZATION,
|
|
165
|
+
# ACH_CREDIT_RECEIPT, or ACH_DEBIT_RECEIPT event stream.
|
|
146
166
|
type:,
|
|
167
|
+
# Account tokens to which the Auth Rule does not apply.
|
|
168
|
+
excluded_account_tokens: nil,
|
|
169
|
+
# Business account tokens to which the Auth Rule does not apply.
|
|
170
|
+
excluded_business_account_tokens: nil,
|
|
147
171
|
# Card tokens to which the Auth Rule does not apply.
|
|
148
172
|
excluded_card_tokens: nil
|
|
149
173
|
)
|
|
@@ -166,6 +190,8 @@ module Lithic
|
|
|
166
190
|
program_level: T::Boolean,
|
|
167
191
|
state: Lithic::AuthRules::AuthRule::State::TaggedSymbol,
|
|
168
192
|
type: Lithic::AuthRules::AuthRule::Type::TaggedSymbol,
|
|
193
|
+
excluded_account_tokens: T::Array[String],
|
|
194
|
+
excluded_business_account_tokens: T::Array[String],
|
|
169
195
|
excluded_card_tokens: T::Array[String]
|
|
170
196
|
}
|
|
171
197
|
)
|
|
@@ -205,7 +231,8 @@ module Lithic
|
|
|
205
231
|
Lithic::AuthRules::Conditional3DSActionParameters::OrHash,
|
|
206
232
|
Lithic::AuthRules::ConditionalAuthorizationActionParameters::OrHash,
|
|
207
233
|
Lithic::AuthRules::ConditionalACHActionParameters::OrHash,
|
|
208
|
-
Lithic::AuthRules::ConditionalTokenizationActionParameters::OrHash
|
|
234
|
+
Lithic::AuthRules::ConditionalTokenizationActionParameters::OrHash,
|
|
235
|
+
Lithic::AuthRules::TypescriptCodeParameters::OrHash
|
|
209
236
|
),
|
|
210
237
|
version: Integer
|
|
211
238
|
).returns(T.attached_class)
|
|
@@ -244,7 +271,8 @@ module Lithic
|
|
|
244
271
|
Lithic::AuthRules::Conditional3DSActionParameters,
|
|
245
272
|
Lithic::AuthRules::ConditionalAuthorizationActionParameters,
|
|
246
273
|
Lithic::AuthRules::ConditionalACHActionParameters,
|
|
247
|
-
Lithic::AuthRules::ConditionalTokenizationActionParameters
|
|
274
|
+
Lithic::AuthRules::ConditionalTokenizationActionParameters,
|
|
275
|
+
Lithic::AuthRules::TypescriptCodeParameters
|
|
248
276
|
)
|
|
249
277
|
end
|
|
250
278
|
|
|
@@ -269,6 +297,11 @@ module Lithic
|
|
|
269
297
|
)
|
|
270
298
|
end
|
|
271
299
|
|
|
300
|
+
# An error message if the draft version failed compilation. Populated when `state`
|
|
301
|
+
# is `ERROR`, `null` otherwise.
|
|
302
|
+
sig { returns(T.nilable(String)) }
|
|
303
|
+
attr_accessor :error
|
|
304
|
+
|
|
272
305
|
# Parameters for the Auth Rule
|
|
273
306
|
sig do
|
|
274
307
|
returns(
|
|
@@ -277,6 +310,23 @@ module Lithic
|
|
|
277
310
|
end
|
|
278
311
|
attr_accessor :parameters
|
|
279
312
|
|
|
313
|
+
# The state of the draft version. Most rules are created synchronously and the
|
|
314
|
+
# state is immediately `SHADOWING`. Rules backed by TypeScript code are compiled
|
|
315
|
+
# asynchronously — the state starts as `PENDING` and transitions to `SHADOWING` on
|
|
316
|
+
# success or `ERROR` on failure.
|
|
317
|
+
#
|
|
318
|
+
# - `PENDING`: Compilation of the rule is in progress (TypeScript rules only).
|
|
319
|
+
# - `SHADOWING`: The draft version is ready and evaluating in shadow mode
|
|
320
|
+
# alongside the current active version. It can be promoted to the active
|
|
321
|
+
# version.
|
|
322
|
+
# - `ERROR`: Compilation of the rule failed. Check the `error` field for details.
|
|
323
|
+
sig do
|
|
324
|
+
returns(
|
|
325
|
+
Lithic::AuthRules::AuthRule::DraftVersion::State::TaggedSymbol
|
|
326
|
+
)
|
|
327
|
+
end
|
|
328
|
+
attr_accessor :state
|
|
329
|
+
|
|
280
330
|
# The version of the rule, this is incremented whenever the rule's parameters
|
|
281
331
|
# change.
|
|
282
332
|
sig { returns(Integer) }
|
|
@@ -284,6 +334,7 @@ module Lithic
|
|
|
284
334
|
|
|
285
335
|
sig do
|
|
286
336
|
params(
|
|
337
|
+
error: T.nilable(String),
|
|
287
338
|
parameters:
|
|
288
339
|
T.any(
|
|
289
340
|
Lithic::AuthRules::ConditionalBlockParameters::OrHash,
|
|
@@ -292,14 +343,30 @@ module Lithic
|
|
|
292
343
|
Lithic::AuthRules::Conditional3DSActionParameters::OrHash,
|
|
293
344
|
Lithic::AuthRules::ConditionalAuthorizationActionParameters::OrHash,
|
|
294
345
|
Lithic::AuthRules::ConditionalACHActionParameters::OrHash,
|
|
295
|
-
Lithic::AuthRules::ConditionalTokenizationActionParameters::OrHash
|
|
346
|
+
Lithic::AuthRules::ConditionalTokenizationActionParameters::OrHash,
|
|
347
|
+
Lithic::AuthRules::TypescriptCodeParameters::OrHash
|
|
296
348
|
),
|
|
349
|
+
state: Lithic::AuthRules::AuthRule::DraftVersion::State::OrSymbol,
|
|
297
350
|
version: Integer
|
|
298
351
|
).returns(T.attached_class)
|
|
299
352
|
end
|
|
300
353
|
def self.new(
|
|
354
|
+
# An error message if the draft version failed compilation. Populated when `state`
|
|
355
|
+
# is `ERROR`, `null` otherwise.
|
|
356
|
+
error:,
|
|
301
357
|
# Parameters for the Auth Rule
|
|
302
358
|
parameters:,
|
|
359
|
+
# The state of the draft version. Most rules are created synchronously and the
|
|
360
|
+
# state is immediately `SHADOWING`. Rules backed by TypeScript code are compiled
|
|
361
|
+
# asynchronously — the state starts as `PENDING` and transitions to `SHADOWING` on
|
|
362
|
+
# success or `ERROR` on failure.
|
|
363
|
+
#
|
|
364
|
+
# - `PENDING`: Compilation of the rule is in progress (TypeScript rules only).
|
|
365
|
+
# - `SHADOWING`: The draft version is ready and evaluating in shadow mode
|
|
366
|
+
# alongside the current active version. It can be promoted to the active
|
|
367
|
+
# version.
|
|
368
|
+
# - `ERROR`: Compilation of the rule failed. Check the `error` field for details.
|
|
369
|
+
state:,
|
|
303
370
|
# The version of the rule, this is incremented whenever the rule's parameters
|
|
304
371
|
# change.
|
|
305
372
|
version:
|
|
@@ -309,8 +376,11 @@ module Lithic
|
|
|
309
376
|
sig do
|
|
310
377
|
override.returns(
|
|
311
378
|
{
|
|
379
|
+
error: T.nilable(String),
|
|
312
380
|
parameters:
|
|
313
381
|
Lithic::AuthRules::AuthRule::DraftVersion::Parameters::Variants,
|
|
382
|
+
state:
|
|
383
|
+
Lithic::AuthRules::AuthRule::DraftVersion::State::TaggedSymbol,
|
|
314
384
|
version: Integer
|
|
315
385
|
}
|
|
316
386
|
)
|
|
@@ -331,7 +401,8 @@ module Lithic
|
|
|
331
401
|
Lithic::AuthRules::Conditional3DSActionParameters,
|
|
332
402
|
Lithic::AuthRules::ConditionalAuthorizationActionParameters,
|
|
333
403
|
Lithic::AuthRules::ConditionalACHActionParameters,
|
|
334
|
-
Lithic::AuthRules::ConditionalTokenizationActionParameters
|
|
404
|
+
Lithic::AuthRules::ConditionalTokenizationActionParameters,
|
|
405
|
+
Lithic::AuthRules::TypescriptCodeParameters
|
|
335
406
|
)
|
|
336
407
|
end
|
|
337
408
|
|
|
@@ -345,6 +416,52 @@ module Lithic
|
|
|
345
416
|
def self.variants
|
|
346
417
|
end
|
|
347
418
|
end
|
|
419
|
+
|
|
420
|
+
# The state of the draft version. Most rules are created synchronously and the
|
|
421
|
+
# state is immediately `SHADOWING`. Rules backed by TypeScript code are compiled
|
|
422
|
+
# asynchronously — the state starts as `PENDING` and transitions to `SHADOWING` on
|
|
423
|
+
# success or `ERROR` on failure.
|
|
424
|
+
#
|
|
425
|
+
# - `PENDING`: Compilation of the rule is in progress (TypeScript rules only).
|
|
426
|
+
# - `SHADOWING`: The draft version is ready and evaluating in shadow mode
|
|
427
|
+
# alongside the current active version. It can be promoted to the active
|
|
428
|
+
# version.
|
|
429
|
+
# - `ERROR`: Compilation of the rule failed. Check the `error` field for details.
|
|
430
|
+
module State
|
|
431
|
+
extend Lithic::Internal::Type::Enum
|
|
432
|
+
|
|
433
|
+
TaggedSymbol =
|
|
434
|
+
T.type_alias do
|
|
435
|
+
T.all(Symbol, Lithic::AuthRules::AuthRule::DraftVersion::State)
|
|
436
|
+
end
|
|
437
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
438
|
+
|
|
439
|
+
PENDING =
|
|
440
|
+
T.let(
|
|
441
|
+
:PENDING,
|
|
442
|
+
Lithic::AuthRules::AuthRule::DraftVersion::State::TaggedSymbol
|
|
443
|
+
)
|
|
444
|
+
SHADOWING =
|
|
445
|
+
T.let(
|
|
446
|
+
:SHADOWING,
|
|
447
|
+
Lithic::AuthRules::AuthRule::DraftVersion::State::TaggedSymbol
|
|
448
|
+
)
|
|
449
|
+
ERROR =
|
|
450
|
+
T.let(
|
|
451
|
+
:ERROR,
|
|
452
|
+
Lithic::AuthRules::AuthRule::DraftVersion::State::TaggedSymbol
|
|
453
|
+
)
|
|
454
|
+
|
|
455
|
+
sig do
|
|
456
|
+
override.returns(
|
|
457
|
+
T::Array[
|
|
458
|
+
Lithic::AuthRules::AuthRule::DraftVersion::State::TaggedSymbol
|
|
459
|
+
]
|
|
460
|
+
)
|
|
461
|
+
end
|
|
462
|
+
def self.values
|
|
463
|
+
end
|
|
464
|
+
end
|
|
348
465
|
end
|
|
349
466
|
|
|
350
467
|
# The state of the Auth Rule
|
|
@@ -380,6 +497,8 @@ module Lithic
|
|
|
380
497
|
# - `MERCHANT_LOCK`: AUTHORIZATION event stream.
|
|
381
498
|
# - `CONDITIONAL_ACTION`: AUTHORIZATION, THREE_DS_AUTHENTICATION, TOKENIZATION,
|
|
382
499
|
# ACH_CREDIT_RECEIPT, or ACH_DEBIT_RECEIPT event stream.
|
|
500
|
+
# - `TYPESCRIPT_CODE`: AUTHORIZATION, THREE_DS_AUTHENTICATION, TOKENIZATION,
|
|
501
|
+
# ACH_CREDIT_RECEIPT, or ACH_DEBIT_RECEIPT event stream.
|
|
383
502
|
module Type
|
|
384
503
|
extend Lithic::Internal::Type::Enum
|
|
385
504
|
|
|
@@ -407,6 +526,11 @@ module Lithic
|
|
|
407
526
|
:CONDITIONAL_ACTION,
|
|
408
527
|
Lithic::AuthRules::AuthRule::Type::TaggedSymbol
|
|
409
528
|
)
|
|
529
|
+
TYPESCRIPT_CODE =
|
|
530
|
+
T.let(
|
|
531
|
+
:TYPESCRIPT_CODE,
|
|
532
|
+
Lithic::AuthRules::AuthRule::Type::TaggedSymbol
|
|
533
|
+
)
|
|
410
534
|
|
|
411
535
|
sig do
|
|
412
536
|
override.returns(
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Lithic
|
|
4
|
+
module Models
|
|
5
|
+
AuthRuleVersion = AuthRules::AuthRuleVersion
|
|
6
|
+
|
|
7
|
+
module AuthRules
|
|
8
|
+
class AuthRuleVersion < Lithic::Internal::Type::BaseModel
|
|
9
|
+
OrHash =
|
|
10
|
+
T.type_alias do
|
|
11
|
+
T.any(Lithic::AuthRules::AuthRuleVersion, Lithic::Internal::AnyHash)
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
# Timestamp of when this version was created.
|
|
15
|
+
sig { returns(Time) }
|
|
16
|
+
attr_accessor :created
|
|
17
|
+
|
|
18
|
+
# Parameters for the Auth Rule
|
|
19
|
+
sig do
|
|
20
|
+
returns(Lithic::AuthRules::AuthRuleVersion::Parameters::Variants)
|
|
21
|
+
end
|
|
22
|
+
attr_accessor :parameters
|
|
23
|
+
|
|
24
|
+
# The current state of this version.
|
|
25
|
+
sig { returns(Lithic::AuthRules::AuthRuleVersion::State::TaggedSymbol) }
|
|
26
|
+
attr_accessor :state
|
|
27
|
+
|
|
28
|
+
# The version of the rule, this is incremented whenever the rule's parameters
|
|
29
|
+
# change.
|
|
30
|
+
sig { returns(Integer) }
|
|
31
|
+
attr_accessor :version
|
|
32
|
+
|
|
33
|
+
sig do
|
|
34
|
+
params(
|
|
35
|
+
created: Time,
|
|
36
|
+
parameters:
|
|
37
|
+
T.any(
|
|
38
|
+
Lithic::AuthRules::ConditionalBlockParameters::OrHash,
|
|
39
|
+
Lithic::AuthRules::VelocityLimitParams::OrHash,
|
|
40
|
+
Lithic::AuthRules::MerchantLockParameters::OrHash,
|
|
41
|
+
Lithic::AuthRules::Conditional3DSActionParameters::OrHash,
|
|
42
|
+
Lithic::AuthRules::ConditionalAuthorizationActionParameters::OrHash,
|
|
43
|
+
Lithic::AuthRules::ConditionalACHActionParameters::OrHash,
|
|
44
|
+
Lithic::AuthRules::ConditionalTokenizationActionParameters::OrHash,
|
|
45
|
+
Lithic::AuthRules::TypescriptCodeParameters::OrHash
|
|
46
|
+
),
|
|
47
|
+
state: Lithic::AuthRules::AuthRuleVersion::State::OrSymbol,
|
|
48
|
+
version: Integer
|
|
49
|
+
).returns(T.attached_class)
|
|
50
|
+
end
|
|
51
|
+
def self.new(
|
|
52
|
+
# Timestamp of when this version was created.
|
|
53
|
+
created:,
|
|
54
|
+
# Parameters for the Auth Rule
|
|
55
|
+
parameters:,
|
|
56
|
+
# The current state of this version.
|
|
57
|
+
state:,
|
|
58
|
+
# The version of the rule, this is incremented whenever the rule's parameters
|
|
59
|
+
# change.
|
|
60
|
+
version:
|
|
61
|
+
)
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
sig do
|
|
65
|
+
override.returns(
|
|
66
|
+
{
|
|
67
|
+
created: Time,
|
|
68
|
+
parameters:
|
|
69
|
+
Lithic::AuthRules::AuthRuleVersion::Parameters::Variants,
|
|
70
|
+
state: Lithic::AuthRules::AuthRuleVersion::State::TaggedSymbol,
|
|
71
|
+
version: Integer
|
|
72
|
+
}
|
|
73
|
+
)
|
|
74
|
+
end
|
|
75
|
+
def to_hash
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
# Parameters for the Auth Rule
|
|
79
|
+
module Parameters
|
|
80
|
+
extend Lithic::Internal::Type::Union
|
|
81
|
+
|
|
82
|
+
Variants =
|
|
83
|
+
T.type_alias do
|
|
84
|
+
T.any(
|
|
85
|
+
Lithic::AuthRules::ConditionalBlockParameters,
|
|
86
|
+
Lithic::AuthRules::VelocityLimitParams,
|
|
87
|
+
Lithic::AuthRules::MerchantLockParameters,
|
|
88
|
+
Lithic::AuthRules::Conditional3DSActionParameters,
|
|
89
|
+
Lithic::AuthRules::ConditionalAuthorizationActionParameters,
|
|
90
|
+
Lithic::AuthRules::ConditionalACHActionParameters,
|
|
91
|
+
Lithic::AuthRules::ConditionalTokenizationActionParameters,
|
|
92
|
+
Lithic::AuthRules::TypescriptCodeParameters
|
|
93
|
+
)
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
sig do
|
|
97
|
+
override.returns(
|
|
98
|
+
T::Array[Lithic::AuthRules::AuthRuleVersion::Parameters::Variants]
|
|
99
|
+
)
|
|
100
|
+
end
|
|
101
|
+
def self.variants
|
|
102
|
+
end
|
|
103
|
+
end
|
|
104
|
+
|
|
105
|
+
# The current state of this version.
|
|
106
|
+
module State
|
|
107
|
+
extend Lithic::Internal::Type::Enum
|
|
108
|
+
|
|
109
|
+
TaggedSymbol =
|
|
110
|
+
T.type_alias do
|
|
111
|
+
T.all(Symbol, Lithic::AuthRules::AuthRuleVersion::State)
|
|
112
|
+
end
|
|
113
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
114
|
+
|
|
115
|
+
ACTIVE =
|
|
116
|
+
T.let(
|
|
117
|
+
:ACTIVE,
|
|
118
|
+
Lithic::AuthRules::AuthRuleVersion::State::TaggedSymbol
|
|
119
|
+
)
|
|
120
|
+
SHADOW =
|
|
121
|
+
T.let(
|
|
122
|
+
:SHADOW,
|
|
123
|
+
Lithic::AuthRules::AuthRuleVersion::State::TaggedSymbol
|
|
124
|
+
)
|
|
125
|
+
INACTIVE =
|
|
126
|
+
T.let(
|
|
127
|
+
:INACTIVE,
|
|
128
|
+
Lithic::AuthRules::AuthRuleVersion::State::TaggedSymbol
|
|
129
|
+
)
|
|
130
|
+
|
|
131
|
+
sig do
|
|
132
|
+
override.returns(
|
|
133
|
+
T::Array[Lithic::AuthRules::AuthRuleVersion::State::TaggedSymbol]
|
|
134
|
+
)
|
|
135
|
+
end
|
|
136
|
+
def self.values
|
|
137
|
+
end
|
|
138
|
+
end
|
|
139
|
+
end
|
|
140
|
+
end
|
|
141
|
+
end
|
|
142
|
+
end
|