lithic 0.10.0 → 0.12.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 +49 -0
- data/README.md +1 -1
- data/lib/lithic/internal/util.rb +22 -7
- data/lib/lithic/models/auth_rules/backtest_stats.rb +9 -1
- data/lib/lithic/models/auth_rules/conditional_authorization_action_parameters.rb +158 -1
- data/lib/lithic/models/auth_rules/report_stats.rb +46 -81
- data/lib/lithic/models/auth_rules/rule_feature.rb +47 -1
- data/lib/lithic/models/auth_rules/typescript_code_parameters.rb +2 -2
- data/lib/lithic/models/auth_rules/v2_list_results_response.rb +36 -4
- data/lib/lithic/models/auth_rules/v2_retrieve_report_response.rb +4 -531
- data/lib/lithic/models/card_authorization_approval_request_webhook_event.rb +17 -26
- data/lib/lithic/models/card_authorization_challenge_response_webhook_event.rb +103 -0
- data/lib/lithic/models/card_bulk_order.rb +8 -3
- data/lib/lithic/models/card_bulk_order_create_params.rb +8 -3
- data/lib/lithic/models/card_convert_physical_params.rb +5 -3
- data/lib/lithic/models/card_create_params.rb +5 -3
- data/lib/lithic/models/card_reissue_params.rb +5 -3
- data/lib/lithic/models/card_renew_params.rb +5 -3
- 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_bank_account_set_verification_method_params.rb +55 -0
- data/lib/lithic/models/financial_account.rb +1 -0
- data/lib/lithic/models/financial_account_update_status_params.rb +1 -0
- data/lib/lithic/models/financial_accounts/statement.rb +11 -4
- data/lib/lithic/models/instance_financial_account_type.rb +1 -0
- data/lib/lithic/models/parsed_webhook_event.rb +3 -1
- data/lib/lithic/models/payment_create_params.rb +13 -1
- data/lib/lithic/models.rb +6 -0
- data/lib/lithic/resources/card_bulk_orders.rb +10 -11
- data/lib/lithic/resources/external_bank_accounts.rb +31 -0
- data/lib/lithic/resources/webhooks.rb +1 -1
- data/lib/lithic/version.rb +1 -1
- data/lib/lithic.rb +2 -0
- data/rbi/lithic/internal/util.rbi +8 -0
- data/rbi/lithic/models/auth_rules/backtest_stats.rbi +11 -3
- data/rbi/lithic/models/auth_rules/conditional_authorization_action_parameters.rbi +370 -3
- data/rbi/lithic/models/auth_rules/report_stats.rbi +73 -177
- data/rbi/lithic/models/auth_rules/rule_feature.rbi +104 -1
- data/rbi/lithic/models/auth_rules/typescript_code_parameters.rbi +6 -3
- data/rbi/lithic/models/auth_rules/v2_list_results_response.rbi +38 -6
- data/rbi/lithic/models/auth_rules/v2_retrieve_report_response.rbi +3 -1721
- data/rbi/lithic/models/card_authorization_approval_request_webhook_event.rbi +23 -78
- data/rbi/lithic/models/card_authorization_challenge_response_webhook_event.rbi +175 -0
- data/rbi/lithic/models/card_bulk_order.rbi +21 -3
- data/rbi/lithic/models/card_bulk_order_create_params.rbi +21 -3
- data/rbi/lithic/models/card_convert_physical_params.rbi +8 -5
- data/rbi/lithic/models/card_create_params.rbi +8 -8
- data/rbi/lithic/models/card_reissue_params.rbi +8 -8
- data/rbi/lithic/models/card_renew_params.rbi +8 -8
- data/rbi/lithic/models/event.rbi +11 -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_bank_account_set_verification_method_params.rbi +111 -0
- data/rbi/lithic/models/financial_account.rbi +5 -0
- data/rbi/lithic/models/financial_account_update_status_params.rbi +5 -0
- data/rbi/lithic/models/financial_accounts/statement.rbi +15 -6
- data/rbi/lithic/models/instance_financial_account_type.rbi +5 -0
- data/rbi/lithic/models/parsed_webhook_event.rbi +1 -0
- data/rbi/lithic/models/payment_create_params.rbi +13 -3
- data/rbi/lithic/models.rbi +6 -0
- data/rbi/lithic/resources/card_bulk_orders.rbi +11 -11
- data/rbi/lithic/resources/cards.rbi +8 -4
- data/rbi/lithic/resources/external_bank_accounts.rbi +22 -0
- data/rbi/lithic/resources/webhooks.rbi +1 -0
- data/sig/lithic/internal/util.rbs +4 -0
- data/sig/lithic/models/auth_rules/backtest_stats.rbs +8 -3
- data/sig/lithic/models/auth_rules/conditional_authorization_action_parameters.rbs +93 -3
- data/sig/lithic/models/auth_rules/report_stats.rbs +34 -70
- data/sig/lithic/models/auth_rules/rule_feature.rbs +42 -0
- data/sig/lithic/models/auth_rules/v2_list_results_response.rbs +29 -9
- data/sig/lithic/models/auth_rules/v2_retrieve_report_response.rbs +4 -667
- data/sig/lithic/models/card_authorization_approval_request_webhook_event.rbs +14 -41
- data/sig/lithic/models/card_authorization_challenge_response_webhook_event.rbs +76 -0
- data/sig/lithic/models/card_bulk_order.rbs +5 -1
- data/sig/lithic/models/card_bulk_order_create_params.rbs +5 -1
- data/sig/lithic/models/card_convert_physical_params.rbs +2 -2
- data/sig/lithic/models/card_create_params.rbs +2 -2
- data/sig/lithic/models/card_reissue_params.rbs +2 -2
- data/sig/lithic/models/card_renew_params.rbs +2 -2
- 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_bank_account_set_verification_method_params.rbs +51 -0
- data/sig/lithic/models/financial_account.rbs +2 -0
- data/sig/lithic/models/financial_account_update_status_params.rbs +2 -0
- data/sig/lithic/models/financial_accounts/statement.rbs +16 -7
- data/sig/lithic/models/instance_financial_account_type.rbs +2 -0
- data/sig/lithic/models/parsed_webhook_event.rbs +1 -0
- data/sig/lithic/models/payment_create_params.rbs +8 -3
- data/sig/lithic/models.rbs +4 -0
- data/sig/lithic/resources/external_bank_accounts.rbs +7 -0
- data/sig/lithic/resources/webhooks.rbs +1 -0
- metadata +8 -2
|
@@ -24,6 +24,10 @@ module Lithic
|
|
|
24
24
|
# - `SPEND_VELOCITY`: Spend velocity data for the card or account. Requires
|
|
25
25
|
# `scope`, `period`, and optionally `filters` to configure the velocity
|
|
26
26
|
# calculation. Available for AUTHORIZATION event stream rules.
|
|
27
|
+
# - `TRANSACTION_HISTORY_SIGNALS`: Behavioral feature state derived from the
|
|
28
|
+
# entity's transaction history. Requires `scope` to specify whether to load
|
|
29
|
+
# card, account, or business account history. Available for AUTHORIZATION event
|
|
30
|
+
# stream rules.
|
|
27
31
|
module RuleFeature
|
|
28
32
|
extend Lithic::Internal::Type::Union
|
|
29
33
|
|
|
@@ -43,6 +47,8 @@ module Lithic
|
|
|
43
47
|
|
|
44
48
|
variant -> { Lithic::AuthRules::RuleFeature::SpendVelocityFeature }
|
|
45
49
|
|
|
50
|
+
variant -> { Lithic::AuthRules::RuleFeature::TransactionHistorySignalsFeature }
|
|
51
|
+
|
|
46
52
|
class AuthorizationFeature < Lithic::Internal::Type::BaseModel
|
|
47
53
|
# @!attribute type
|
|
48
54
|
#
|
|
@@ -223,8 +229,48 @@ module Lithic
|
|
|
223
229
|
end
|
|
224
230
|
end
|
|
225
231
|
|
|
232
|
+
class TransactionHistorySignalsFeature < Lithic::Internal::Type::BaseModel
|
|
233
|
+
# @!attribute scope
|
|
234
|
+
# The entity scope to load transaction history signals for.
|
|
235
|
+
#
|
|
236
|
+
# @return [Symbol, Lithic::Models::AuthRules::RuleFeature::TransactionHistorySignalsFeature::Scope]
|
|
237
|
+
required :scope, enum: -> { Lithic::AuthRules::RuleFeature::TransactionHistorySignalsFeature::Scope }
|
|
238
|
+
|
|
239
|
+
# @!attribute type
|
|
240
|
+
#
|
|
241
|
+
# @return [Symbol, :TRANSACTION_HISTORY_SIGNALS]
|
|
242
|
+
required :type, const: :TRANSACTION_HISTORY_SIGNALS
|
|
243
|
+
|
|
244
|
+
# @!attribute name
|
|
245
|
+
# The variable name for this feature in the rule function signature
|
|
246
|
+
#
|
|
247
|
+
# @return [String, nil]
|
|
248
|
+
optional :name, String
|
|
249
|
+
|
|
250
|
+
# @!method initialize(scope:, name: nil, type: :TRANSACTION_HISTORY_SIGNALS)
|
|
251
|
+
# @param scope [Symbol, Lithic::Models::AuthRules::RuleFeature::TransactionHistorySignalsFeature::Scope] The entity scope to load transaction history signals for.
|
|
252
|
+
#
|
|
253
|
+
# @param name [String] The variable name for this feature in the rule function signature
|
|
254
|
+
#
|
|
255
|
+
# @param type [Symbol, :TRANSACTION_HISTORY_SIGNALS]
|
|
256
|
+
|
|
257
|
+
# The entity scope to load transaction history signals for.
|
|
258
|
+
#
|
|
259
|
+
# @see Lithic::Models::AuthRules::RuleFeature::TransactionHistorySignalsFeature#scope
|
|
260
|
+
module Scope
|
|
261
|
+
extend Lithic::Internal::Type::Enum
|
|
262
|
+
|
|
263
|
+
CARD = :CARD
|
|
264
|
+
ACCOUNT = :ACCOUNT
|
|
265
|
+
BUSINESS_ACCOUNT = :BUSINESS_ACCOUNT
|
|
266
|
+
|
|
267
|
+
# @!method self.values
|
|
268
|
+
# @return [Array<Symbol>]
|
|
269
|
+
end
|
|
270
|
+
end
|
|
271
|
+
|
|
226
272
|
# @!method self.variants
|
|
227
|
-
# @return [Array(Lithic::Models::AuthRules::RuleFeature::AuthorizationFeature, Lithic::Models::AuthRules::RuleFeature::AuthenticationFeature, Lithic::Models::AuthRules::RuleFeature::TokenizationFeature, Lithic::Models::AuthRules::RuleFeature::ACHReceiptFeature, Lithic::Models::AuthRules::RuleFeature::CardFeature, Lithic::Models::AuthRules::RuleFeature::AccountHolderFeature, Lithic::Models::AuthRules::RuleFeature::IPMetadataFeature, Lithic::Models::AuthRules::RuleFeature::SpendVelocityFeature)]
|
|
273
|
+
# @return [Array(Lithic::Models::AuthRules::RuleFeature::AuthorizationFeature, Lithic::Models::AuthRules::RuleFeature::AuthenticationFeature, Lithic::Models::AuthRules::RuleFeature::TokenizationFeature, Lithic::Models::AuthRules::RuleFeature::ACHReceiptFeature, Lithic::Models::AuthRules::RuleFeature::CardFeature, Lithic::Models::AuthRules::RuleFeature::AccountHolderFeature, Lithic::Models::AuthRules::RuleFeature::IPMetadataFeature, Lithic::Models::AuthRules::RuleFeature::SpendVelocityFeature, Lithic::Models::AuthRules::RuleFeature::TransactionHistorySignalsFeature)]
|
|
228
274
|
end
|
|
229
275
|
end
|
|
230
276
|
end
|
|
@@ -15,7 +15,7 @@ module Lithic
|
|
|
15
15
|
# @!attribute features
|
|
16
16
|
# Features available to the TypeScript code at evaluation time
|
|
17
17
|
#
|
|
18
|
-
# @return [Array<Lithic::Models::AuthRules::RuleFeature::AuthorizationFeature, Lithic::Models::AuthRules::RuleFeature::AuthenticationFeature, Lithic::Models::AuthRules::RuleFeature::TokenizationFeature, Lithic::Models::AuthRules::RuleFeature::ACHReceiptFeature, Lithic::Models::AuthRules::RuleFeature::CardFeature, Lithic::Models::AuthRules::RuleFeature::AccountHolderFeature, Lithic::Models::AuthRules::RuleFeature::IPMetadataFeature, Lithic::Models::AuthRules::RuleFeature::SpendVelocityFeature>]
|
|
18
|
+
# @return [Array<Lithic::Models::AuthRules::RuleFeature::AuthorizationFeature, Lithic::Models::AuthRules::RuleFeature::AuthenticationFeature, Lithic::Models::AuthRules::RuleFeature::TokenizationFeature, Lithic::Models::AuthRules::RuleFeature::ACHReceiptFeature, Lithic::Models::AuthRules::RuleFeature::CardFeature, Lithic::Models::AuthRules::RuleFeature::AccountHolderFeature, Lithic::Models::AuthRules::RuleFeature::IPMetadataFeature, Lithic::Models::AuthRules::RuleFeature::SpendVelocityFeature, Lithic::Models::AuthRules::RuleFeature::TransactionHistorySignalsFeature>]
|
|
19
19
|
required :features, -> { Lithic::Internal::Type::ArrayOf[union: Lithic::AuthRules::RuleFeature] }
|
|
20
20
|
|
|
21
21
|
# @!method initialize(code:, features:)
|
|
@@ -26,7 +26,7 @@ module Lithic
|
|
|
26
26
|
#
|
|
27
27
|
# @param code [String] The TypeScript source code of the rule. Must define a `rule()` function that acc
|
|
28
28
|
#
|
|
29
|
-
# @param features [Array<Lithic::Models::AuthRules::RuleFeature::AuthorizationFeature, Lithic::Models::AuthRules::RuleFeature::AuthenticationFeature, Lithic::Models::AuthRules::RuleFeature::TokenizationFeature, Lithic::Models::AuthRules::RuleFeature::ACHReceiptFeature, Lithic::Models::AuthRules::RuleFeature::CardFeature, Lithic::Models::AuthRules::RuleFeature::AccountHolderFeature, Lithic::Models::AuthRules::RuleFeature::IPMetadataFeature, Lithic::Models::AuthRules::RuleFeature::SpendVelocityFeature>] Features available to the TypeScript code at evaluation time
|
|
29
|
+
# @param features [Array<Lithic::Models::AuthRules::RuleFeature::AuthorizationFeature, Lithic::Models::AuthRules::RuleFeature::AuthenticationFeature, Lithic::Models::AuthRules::RuleFeature::TokenizationFeature, Lithic::Models::AuthRules::RuleFeature::ACHReceiptFeature, Lithic::Models::AuthRules::RuleFeature::CardFeature, Lithic::Models::AuthRules::RuleFeature::AccountHolderFeature, Lithic::Models::AuthRules::RuleFeature::IPMetadataFeature, Lithic::Models::AuthRules::RuleFeature::SpendVelocityFeature, Lithic::Models::AuthRules::RuleFeature::TransactionHistorySignalsFeature>] Features available to the TypeScript code at evaluation time
|
|
30
30
|
end
|
|
31
31
|
end
|
|
32
32
|
end
|
|
@@ -67,7 +67,13 @@ module Lithic
|
|
|
67
67
|
# @return [Integer]
|
|
68
68
|
required :rule_version, Integer
|
|
69
69
|
|
|
70
|
-
# @!
|
|
70
|
+
# @!attribute transaction_token
|
|
71
|
+
# The token of the transaction that triggered the rule evaluation
|
|
72
|
+
#
|
|
73
|
+
# @return [String, nil]
|
|
74
|
+
required :transaction_token, String, nil?: true
|
|
75
|
+
|
|
76
|
+
# @!method initialize(token:, actions:, auth_rule_token:, evaluation_time:, event_token:, mode:, rule_version:, transaction_token:, event_stream: :AUTHORIZATION)
|
|
71
77
|
# @param token [String] Globally unique identifier for the evaluation
|
|
72
78
|
#
|
|
73
79
|
# @param actions [Array<Lithic::Models::AuthRules::V2ListResultsResponse::AuthorizationResult::Action::DeclineActionAuthorization, Lithic::Models::AuthRules::V2ListResultsResponse::AuthorizationResult::Action::ChallengeActionAuthorization>] Actions returned by the rule evaluation
|
|
@@ -82,6 +88,8 @@ module Lithic
|
|
|
82
88
|
#
|
|
83
89
|
# @param rule_version [Integer] Version of the rule that was evaluated
|
|
84
90
|
#
|
|
91
|
+
# @param transaction_token [String, nil] The token of the transaction that triggered the rule evaluation
|
|
92
|
+
#
|
|
85
93
|
# @param event_stream [Symbol, :AUTHORIZATION] The event stream during which the rule was evaluated
|
|
86
94
|
|
|
87
95
|
module Action
|
|
@@ -295,7 +303,13 @@ module Lithic
|
|
|
295
303
|
# @return [Integer]
|
|
296
304
|
required :rule_version, Integer
|
|
297
305
|
|
|
298
|
-
# @!
|
|
306
|
+
# @!attribute transaction_token
|
|
307
|
+
# The token of the transaction that triggered the rule evaluation
|
|
308
|
+
#
|
|
309
|
+
# @return [String, nil]
|
|
310
|
+
required :transaction_token, String, nil?: true
|
|
311
|
+
|
|
312
|
+
# @!method initialize(token:, actions:, auth_rule_token:, evaluation_time:, event_token:, mode:, rule_version:, transaction_token:, event_stream: :THREE_DS_AUTHENTICATION)
|
|
299
313
|
# @param token [String] Globally unique identifier for the evaluation
|
|
300
314
|
#
|
|
301
315
|
# @param actions [Array<Lithic::Models::AuthRules::V2ListResultsResponse::Authentication3DSResult::Action>] Actions returned by the rule evaluation
|
|
@@ -310,6 +324,8 @@ module Lithic
|
|
|
310
324
|
#
|
|
311
325
|
# @param rule_version [Integer] Version of the rule that was evaluated
|
|
312
326
|
#
|
|
327
|
+
# @param transaction_token [String, nil] The token of the transaction that triggered the rule evaluation
|
|
328
|
+
#
|
|
313
329
|
# @param event_stream [Symbol, :THREE_DS_AUTHENTICATION] The event stream during which the rule was evaluated
|
|
314
330
|
|
|
315
331
|
class Action < Lithic::Internal::Type::BaseModel
|
|
@@ -406,7 +422,13 @@ module Lithic
|
|
|
406
422
|
# @return [Integer]
|
|
407
423
|
required :rule_version, Integer
|
|
408
424
|
|
|
409
|
-
# @!
|
|
425
|
+
# @!attribute transaction_token
|
|
426
|
+
# The token of the transaction that triggered the rule evaluation
|
|
427
|
+
#
|
|
428
|
+
# @return [String, nil]
|
|
429
|
+
required :transaction_token, String, nil?: true
|
|
430
|
+
|
|
431
|
+
# @!method initialize(token:, actions:, auth_rule_token:, evaluation_time:, event_token:, mode:, rule_version:, transaction_token:, event_stream: :TOKENIZATION)
|
|
410
432
|
# @param token [String] Globally unique identifier for the evaluation
|
|
411
433
|
#
|
|
412
434
|
# @param actions [Array<Lithic::Models::AuthRules::V2ListResultsResponse::TokenizationResult::Action::DeclineActionTokenization, Lithic::Models::AuthRules::V2ListResultsResponse::TokenizationResult::Action::RequireTfaAction>] Actions returned by the rule evaluation
|
|
@@ -421,6 +443,8 @@ module Lithic
|
|
|
421
443
|
#
|
|
422
444
|
# @param rule_version [Integer] Version of the rule that was evaluated
|
|
423
445
|
#
|
|
446
|
+
# @param transaction_token [String, nil] The token of the transaction that triggered the rule evaluation
|
|
447
|
+
#
|
|
424
448
|
# @param event_stream [Symbol, :TOKENIZATION] The event stream during which the rule was evaluated
|
|
425
449
|
|
|
426
450
|
module Action
|
|
@@ -631,7 +655,13 @@ module Lithic
|
|
|
631
655
|
# @return [Integer]
|
|
632
656
|
required :rule_version, Integer
|
|
633
657
|
|
|
634
|
-
# @!
|
|
658
|
+
# @!attribute transaction_token
|
|
659
|
+
# The token of the transaction that triggered the rule evaluation
|
|
660
|
+
#
|
|
661
|
+
# @return [String, nil]
|
|
662
|
+
required :transaction_token, String, nil?: true
|
|
663
|
+
|
|
664
|
+
# @!method initialize(token:, actions:, auth_rule_token:, evaluation_time:, event_stream:, event_token:, mode:, rule_version:, transaction_token:)
|
|
635
665
|
# @param token [String] Globally unique identifier for the evaluation
|
|
636
666
|
#
|
|
637
667
|
# @param actions [Array<Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult::Action::ApproveActionACH, Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult::Action::ReturnAction>] Actions returned by the rule evaluation
|
|
@@ -647,6 +677,8 @@ module Lithic
|
|
|
647
677
|
# @param mode [Symbol, Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult::Mode] The state of the Auth Rule
|
|
648
678
|
#
|
|
649
679
|
# @param rule_version [Integer] Version of the rule that was evaluated
|
|
680
|
+
#
|
|
681
|
+
# @param transaction_token [String, nil] The token of the transaction that triggered the rule evaluation
|
|
650
682
|
|
|
651
683
|
module Action
|
|
652
684
|
extend Lithic::Internal::Type::Union
|