Skip to content

Commit acca757

Browse files
feat(api): add transaction_token field to auth_rules v2 results response
1 parent 5a0bdeb commit acca757

4 files changed

Lines changed: 105 additions & 21 deletions

File tree

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 190
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-bce16144ab1915776bd58c413ad5226451e06d1ab10b8329a0954d65020defb7.yml
3-
openapi_spec_hash: ee2dded6efa47929d7fde4aed56e141d
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-fde7dad9bd08702d5db270fdd3cb533bc927387c4ea5aa19b11c67dd3ea643d4.yml
3+
openapi_spec_hash: bf4c200978915ccdf7f4a5734e796a07
44
config_hash: edbdfefeb0d3d927c2f9fe3402793215

lib/lithic/models/auth_rules/v2_list_results_response.rb

Lines changed: 36 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,13 @@ class AuthorizationResult < Lithic::Internal::Type::BaseModel
6767
# @return [Integer]
6868
required :rule_version, Integer
6969

70-
# @!method initialize(token:, actions:, auth_rule_token:, evaluation_time:, event_token:, mode:, rule_version:, event_stream: :AUTHORIZATION)
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)
7177
# @param token [String] Globally unique identifier for the evaluation
7278
#
7379
# @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 @@ class AuthorizationResult < Lithic::Internal::Type::BaseModel
8288
#
8389
# @param rule_version [Integer] Version of the rule that was evaluated
8490
#
91+
# @param transaction_token [String, nil] The token of the transaction that triggered the rule evaluation
92+
#
8593
# @param event_stream [Symbol, :AUTHORIZATION] The event stream during which the rule was evaluated
8694

8795
module Action
@@ -295,7 +303,13 @@ class Authentication3DSResult < Lithic::Internal::Type::BaseModel
295303
# @return [Integer]
296304
required :rule_version, Integer
297305

298-
# @!method initialize(token:, actions:, auth_rule_token:, evaluation_time:, event_token:, mode:, rule_version:, event_stream: :THREE_DS_AUTHENTICATION)
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)
299313
# @param token [String] Globally unique identifier for the evaluation
300314
#
301315
# @param actions [Array<Lithic::Models::AuthRules::V2ListResultsResponse::Authentication3DSResult::Action>] Actions returned by the rule evaluation
@@ -310,6 +324,8 @@ class Authentication3DSResult < Lithic::Internal::Type::BaseModel
310324
#
311325
# @param rule_version [Integer] Version of the rule that was evaluated
312326
#
327+
# @param transaction_token [String, nil] The token of the transaction that triggered the rule evaluation
328+
#
313329
# @param event_stream [Symbol, :THREE_DS_AUTHENTICATION] The event stream during which the rule was evaluated
314330

315331
class Action < Lithic::Internal::Type::BaseModel
@@ -406,7 +422,13 @@ class TokenizationResult < Lithic::Internal::Type::BaseModel
406422
# @return [Integer]
407423
required :rule_version, Integer
408424

409-
# @!method initialize(token:, actions:, auth_rule_token:, evaluation_time:, event_token:, mode:, rule_version:, event_stream: :TOKENIZATION)
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)
410432
# @param token [String] Globally unique identifier for the evaluation
411433
#
412434
# @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 @@ class TokenizationResult < Lithic::Internal::Type::BaseModel
421443
#
422444
# @param rule_version [Integer] Version of the rule that was evaluated
423445
#
446+
# @param transaction_token [String, nil] The token of the transaction that triggered the rule evaluation
447+
#
424448
# @param event_stream [Symbol, :TOKENIZATION] The event stream during which the rule was evaluated
425449

426450
module Action
@@ -631,7 +655,13 @@ class ACHResult < Lithic::Internal::Type::BaseModel
631655
# @return [Integer]
632656
required :rule_version, Integer
633657

634-
# @!method initialize(token:, actions:, auth_rule_token:, evaluation_time:, event_stream:, event_token:, mode:, rule_version:)
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:)
635665
# @param token [String] Globally unique identifier for the evaluation
636666
#
637667
# @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 @@ class ACHResult < Lithic::Internal::Type::BaseModel
647677
# @param mode [Symbol, Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult::Mode] The state of the Auth Rule
648678
#
649679
# @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
650682

651683
module Action
652684
extend Lithic::Internal::Type::Union

rbi/lithic/models/auth_rules/v2_list_results_response.rbi

Lines changed: 38 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,10 @@ module Lithic
6868
sig { returns(Integer) }
6969
attr_accessor :rule_version
7070

71+
# The token of the transaction that triggered the rule evaluation
72+
sig { returns(T.nilable(String)) }
73+
attr_accessor :transaction_token
74+
7175
sig do
7276
params(
7377
token: String,
@@ -84,6 +88,7 @@ module Lithic
8488
mode:
8589
Lithic::Models::AuthRules::V2ListResultsResponse::AuthorizationResult::Mode::OrSymbol,
8690
rule_version: Integer,
91+
transaction_token: T.nilable(String),
8792
event_stream: Symbol
8893
).returns(T.attached_class)
8994
end
@@ -102,6 +107,8 @@ module Lithic
102107
mode:,
103108
# Version of the rule that was evaluated
104109
rule_version:,
110+
# The token of the transaction that triggered the rule evaluation
111+
transaction_token:,
105112
# The event stream during which the rule was evaluated
106113
event_stream: :AUTHORIZATION
107114
)
@@ -121,7 +128,8 @@ module Lithic
121128
event_token: String,
122129
mode:
123130
Lithic::Models::AuthRules::V2ListResultsResponse::AuthorizationResult::Mode::TaggedSymbol,
124-
rule_version: Integer
131+
rule_version: Integer,
132+
transaction_token: T.nilable(String)
125133
}
126134
)
127135
end
@@ -719,6 +727,10 @@ module Lithic
719727
sig { returns(Integer) }
720728
attr_accessor :rule_version
721729

730+
# The token of the transaction that triggered the rule evaluation
731+
sig { returns(T.nilable(String)) }
732+
attr_accessor :transaction_token
733+
722734
sig do
723735
params(
724736
token: String,
@@ -732,6 +744,7 @@ module Lithic
732744
mode:
733745
Lithic::Models::AuthRules::V2ListResultsResponse::Authentication3DSResult::Mode::OrSymbol,
734746
rule_version: Integer,
747+
transaction_token: T.nilable(String),
735748
event_stream: Symbol
736749
).returns(T.attached_class)
737750
end
@@ -750,6 +763,8 @@ module Lithic
750763
mode:,
751764
# Version of the rule that was evaluated
752765
rule_version:,
766+
# The token of the transaction that triggered the rule evaluation
767+
transaction_token:,
753768
# The event stream during which the rule was evaluated
754769
event_stream: :THREE_DS_AUTHENTICATION
755770
)
@@ -769,7 +784,8 @@ module Lithic
769784
event_token: String,
770785
mode:
771786
Lithic::Models::AuthRules::V2ListResultsResponse::Authentication3DSResult::Mode::TaggedSymbol,
772-
rule_version: Integer
787+
rule_version: Integer,
788+
transaction_token: T.nilable(String)
773789
}
774790
)
775791
end
@@ -947,6 +963,10 @@ module Lithic
947963
sig { returns(Integer) }
948964
attr_accessor :rule_version
949965

966+
# The token of the transaction that triggered the rule evaluation
967+
sig { returns(T.nilable(String)) }
968+
attr_accessor :transaction_token
969+
950970
sig do
951971
params(
952972
token: String,
@@ -963,6 +983,7 @@ module Lithic
963983
mode:
964984
Lithic::Models::AuthRules::V2ListResultsResponse::TokenizationResult::Mode::OrSymbol,
965985
rule_version: Integer,
986+
transaction_token: T.nilable(String),
966987
event_stream: Symbol
967988
).returns(T.attached_class)
968989
end
@@ -981,6 +1002,8 @@ module Lithic
9811002
mode:,
9821003
# Version of the rule that was evaluated
9831004
rule_version:,
1005+
# The token of the transaction that triggered the rule evaluation
1006+
transaction_token:,
9841007
# The event stream during which the rule was evaluated
9851008
event_stream: :TOKENIZATION
9861009
)
@@ -1000,7 +1023,8 @@ module Lithic
10001023
event_token: String,
10011024
mode:
10021025
Lithic::Models::AuthRules::V2ListResultsResponse::TokenizationResult::Mode::TaggedSymbol,
1003-
rule_version: Integer
1026+
rule_version: Integer,
1027+
transaction_token: T.nilable(String)
10041028
}
10051029
)
10061030
end
@@ -1522,6 +1546,10 @@ module Lithic
15221546
sig { returns(Integer) }
15231547
attr_accessor :rule_version
15241548

1549+
# The token of the transaction that triggered the rule evaluation
1550+
sig { returns(T.nilable(String)) }
1551+
attr_accessor :transaction_token
1552+
15251553
sig do
15261554
params(
15271555
token: String,
@@ -1539,7 +1567,8 @@ module Lithic
15391567
event_token: String,
15401568
mode:
15411569
Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult::Mode::OrSymbol,
1542-
rule_version: Integer
1570+
rule_version: Integer,
1571+
transaction_token: T.nilable(String)
15431572
).returns(T.attached_class)
15441573
end
15451574
def self.new(
@@ -1558,7 +1587,9 @@ module Lithic
15581587
# The state of the Auth Rule
15591588
mode:,
15601589
# Version of the rule that was evaluated
1561-
rule_version:
1590+
rule_version:,
1591+
# The token of the transaction that triggered the rule evaluation
1592+
transaction_token:
15621593
)
15631594
end
15641595

@@ -1577,7 +1608,8 @@ module Lithic
15771608
event_token: String,
15781609
mode:
15791610
Lithic::Models::AuthRules::V2ListResultsResponse::ACHResult::Mode::TaggedSymbol,
1580-
rule_version: Integer
1611+
rule_version: Integer,
1612+
transaction_token: T.nilable(String)
15811613
}
15821614
)
15831615
end

0 commit comments

Comments
 (0)