Skip to content

Commit 9942dbd

Browse files
feat(client): adds support for 3DS to Auth Rules
- Auth Rules now support decisioning on 3DS authentications: https://docs.lithic.com/changelog/may-28-2025
1 parent b95b766 commit 9942dbd

56 files changed

Lines changed: 13315 additions & 470 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 161
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-025f40c854a9485cf316c9058f9cc5fa37f069add30e409d49ab93f2e166f4fb.yml
3-
openapi_spec_hash: a9391f3a54b8db5d5df40169de8c645c
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-89dfdedd460a673d9addf6d763389f59895e986036296d99baf89366ba622034.yml
3+
openapi_spec_hash: b6183fb775fc8bfa3d40ed7130b17976
44
config_hash: fa3481d1d8505e4157f6cebe93211bd0

lib/lithic/models/account_update_params.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ class AccountUpdateParams < Lithic::Internal::Type::BaseModel
4444
#
4545
# Address used during Address Verification Service (AVS) checks during
4646
# transactions if enabled via Auth Rules. This field is deprecated as AVS checks
47-
# are no longer supported by Authorization Rules. The field will be removed from
48-
# the schema in a future release.
47+
# are no longer supported by Auth Rules. The field will be removed from the schema
48+
# in a future release.
4949
#
5050
# @return [Lithic::Models::AccountUpdateParams::VerificationAddress, nil]
5151
optional :verification_address, -> { Lithic::AccountUpdateParams::VerificationAddress }
@@ -112,8 +112,8 @@ class VerificationAddress < Lithic::Internal::Type::BaseModel
112112
# @!method initialize(address1: nil, address2: nil, city: nil, country: nil, postal_code: nil, state: nil)
113113
# Address used during Address Verification Service (AVS) checks during
114114
# transactions if enabled via Auth Rules. This field is deprecated as AVS checks
115-
# are no longer supported by Authorization Rules. The field will be removed from
116-
# the schema in a future release.
115+
# are no longer supported by Auth Rules. The field will be removed from the schema
116+
# in a future release.
117117
#
118118
# @param address1 [String]
119119
# @param address2 [String]

lib/lithic/models/auth_rules/v2/backtest_results.rb

Lines changed: 100 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -55,22 +55,31 @@ class Results < Lithic::Internal::Type::BaseModel
5555
class CurrentVersion < Lithic::Internal::Type::BaseModel
5656
# @!attribute approved
5757
# The total number of historical transactions approved by this rule during the
58-
# backtest period, or the number of transactions that would have been approved if
58+
# relevant period, or the number of transactions that would have been approved if
5959
# the rule was evaluated in shadow mode.
6060
#
6161
# @return [Integer, nil]
6262
optional :approved, Integer
6363

64+
# @!attribute challenged
65+
# The total number of historical transactions challenged by this rule during the
66+
# relevant period, or the number of transactions that would have been challenged
67+
# if the rule was evaluated in shadow mode. Currently applicable only for 3DS Auth
68+
# Rules.
69+
#
70+
# @return [Integer, nil]
71+
optional :challenged, Integer
72+
6473
# @!attribute declined
6574
# The total number of historical transactions declined by this rule during the
66-
# backtest period, or the number of transactions that would have been declined if
75+
# relevant period, or the number of transactions that would have been declined if
6776
# the rule was evaluated in shadow mode.
6877
#
6978
# @return [Integer, nil]
7079
optional :declined, Integer
7180

7281
# @!attribute examples
73-
# Example authorization request events that would have been approved or declined.
82+
# Example events and their outcomes.
7483
#
7584
# @return [Array<Lithic::Models::AuthRules::V2::BacktestResults::Results::CurrentVersion::Example>, nil]
7685
optional :examples,
@@ -87,67 +96,103 @@ class CurrentVersion < Lithic::Internal::Type::BaseModel
8796
optional :version, Integer
8897
end
8998

90-
# @!method initialize(approved: nil, declined: nil, examples: nil, version: nil)
99+
# @!method initialize(approved: nil, challenged: nil, declined: nil, examples: nil, version: nil)
91100
# Some parameter documentations has been truncated, see
92101
# {Lithic::Models::AuthRules::V2::BacktestResults::Results::CurrentVersion} for
93102
# more details.
94103
#
95-
# @param approved [Integer] The total number of historical transactions approved by this rule during the bac
104+
# @param approved [Integer] The total number of historical transactions approved by this rule during the rel
96105
#
97-
# @param declined [Integer] The total number of historical transactions declined by this rule during the bac
106+
# @param challenged [Integer] The total number of historical transactions challenged by this rule during the r
98107
#
99-
# @param examples [Array<Lithic::Models::AuthRules::V2::BacktestResults::Results::CurrentVersion::Example>] Example authorization request events that would have been approved or declined.
108+
# @param declined [Integer] The total number of historical transactions declined by this rule during the rel
109+
#
110+
# @param examples [Array<Lithic::Models::AuthRules::V2::BacktestResults::Results::CurrentVersion::Example>] Example events and their outcomes.
100111
#
101112
# @param version [Integer] The version of the rule, this is incremented whenever the rule's parameters chan
102113

103114
class Example < Lithic::Internal::Type::BaseModel
104115
# @!attribute approved
105-
# Whether the rule would have approved the authorization request.
116+
# Whether the rule would have approved the request.
106117
#
107118
# @return [Boolean, nil]
108119
optional :approved, Lithic::Internal::Type::Boolean
109120

121+
# @!attribute decision
122+
# The decision made by the rule for this event.
123+
#
124+
# @return [Symbol, Lithic::Models::AuthRules::V2::BacktestResults::Results::CurrentVersion::Example::Decision, nil]
125+
optional :decision,
126+
enum: -> {
127+
Lithic::AuthRules::V2::BacktestResults::Results::CurrentVersion::Example::Decision
128+
}
129+
110130
# @!attribute event_token
111-
# The authorization request event token.
131+
# The event token.
112132
#
113133
# @return [String, nil]
114134
optional :event_token, String
115135

116136
# @!attribute timestamp
117-
# The timestamp of the authorization request event.
137+
# The timestamp of the event.
118138
#
119139
# @return [Time, nil]
120140
optional :timestamp, Time
121141

122-
# @!method initialize(approved: nil, event_token: nil, timestamp: nil)
123-
# @param approved [Boolean] Whether the rule would have approved the authorization request.
142+
# @!method initialize(approved: nil, decision: nil, event_token: nil, timestamp: nil)
143+
# @param approved [Boolean] Whether the rule would have approved the request.
124144
#
125-
# @param event_token [String] The authorization request event token.
145+
# @param decision [Symbol, Lithic::Models::AuthRules::V2::BacktestResults::Results::CurrentVersion::Example::Decision] The decision made by the rule for this event.
126146
#
127-
# @param timestamp [Time] The timestamp of the authorization request event.
147+
# @param event_token [String] The event token.
148+
#
149+
# @param timestamp [Time] The timestamp of the event.
150+
151+
# The decision made by the rule for this event.
152+
#
153+
# @see Lithic::Models::AuthRules::V2::BacktestResults::Results::CurrentVersion::Example#decision
154+
module Decision
155+
extend Lithic::Internal::Type::Enum
156+
157+
APPROVED = :APPROVED
158+
DECLINED = :DECLINED
159+
CHALLENGED = :CHALLENGED
160+
161+
# @!method self.values
162+
# @return [Array<Symbol>]
163+
end
128164
end
129165
end
130166

131167
# @see Lithic::Models::AuthRules::V2::BacktestResults::Results#draft_version
132168
class DraftVersion < Lithic::Internal::Type::BaseModel
133169
# @!attribute approved
134170
# The total number of historical transactions approved by this rule during the
135-
# backtest period, or the number of transactions that would have been approved if
171+
# relevant period, or the number of transactions that would have been approved if
136172
# the rule was evaluated in shadow mode.
137173
#
138174
# @return [Integer, nil]
139175
optional :approved, Integer
140176

177+
# @!attribute challenged
178+
# The total number of historical transactions challenged by this rule during the
179+
# relevant period, or the number of transactions that would have been challenged
180+
# if the rule was evaluated in shadow mode. Currently applicable only for 3DS Auth
181+
# Rules.
182+
#
183+
# @return [Integer, nil]
184+
optional :challenged, Integer
185+
141186
# @!attribute declined
142187
# The total number of historical transactions declined by this rule during the
143-
# backtest period, or the number of transactions that would have been declined if
188+
# relevant period, or the number of transactions that would have been declined if
144189
# the rule was evaluated in shadow mode.
145190
#
146191
# @return [Integer, nil]
147192
optional :declined, Integer
148193

149194
# @!attribute examples
150-
# Example authorization request events that would have been approved or declined.
195+
# Example events and their outcomes.
151196
#
152197
# @return [Array<Lithic::Models::AuthRules::V2::BacktestResults::Results::DraftVersion::Example>, nil]
153198
optional :examples,
@@ -164,44 +209,71 @@ class DraftVersion < Lithic::Internal::Type::BaseModel
164209
optional :version, Integer
165210
end
166211

167-
# @!method initialize(approved: nil, declined: nil, examples: nil, version: nil)
212+
# @!method initialize(approved: nil, challenged: nil, declined: nil, examples: nil, version: nil)
168213
# Some parameter documentations has been truncated, see
169214
# {Lithic::Models::AuthRules::V2::BacktestResults::Results::DraftVersion} for more
170215
# details.
171216
#
172-
# @param approved [Integer] The total number of historical transactions approved by this rule during the bac
217+
# @param approved [Integer] The total number of historical transactions approved by this rule during the rel
173218
#
174-
# @param declined [Integer] The total number of historical transactions declined by this rule during the bac
219+
# @param challenged [Integer] The total number of historical transactions challenged by this rule during the r
175220
#
176-
# @param examples [Array<Lithic::Models::AuthRules::V2::BacktestResults::Results::DraftVersion::Example>] Example authorization request events that would have been approved or declined.
221+
# @param declined [Integer] The total number of historical transactions declined by this rule during the rel
222+
#
223+
# @param examples [Array<Lithic::Models::AuthRules::V2::BacktestResults::Results::DraftVersion::Example>] Example events and their outcomes.
177224
#
178225
# @param version [Integer] The version of the rule, this is incremented whenever the rule's parameters chan
179226

180227
class Example < Lithic::Internal::Type::BaseModel
181228
# @!attribute approved
182-
# Whether the rule would have approved the authorization request.
229+
# Whether the rule would have approved the request.
183230
#
184231
# @return [Boolean, nil]
185232
optional :approved, Lithic::Internal::Type::Boolean
186233

234+
# @!attribute decision
235+
# The decision made by the rule for this event.
236+
#
237+
# @return [Symbol, Lithic::Models::AuthRules::V2::BacktestResults::Results::DraftVersion::Example::Decision, nil]
238+
optional :decision,
239+
enum: -> {
240+
Lithic::AuthRules::V2::BacktestResults::Results::DraftVersion::Example::Decision
241+
}
242+
187243
# @!attribute event_token
188-
# The authorization request event token.
244+
# The event token.
189245
#
190246
# @return [String, nil]
191247
optional :event_token, String
192248

193249
# @!attribute timestamp
194-
# The timestamp of the authorization request event.
250+
# The timestamp of the event.
195251
#
196252
# @return [Time, nil]
197253
optional :timestamp, Time
198254

199-
# @!method initialize(approved: nil, event_token: nil, timestamp: nil)
200-
# @param approved [Boolean] Whether the rule would have approved the authorization request.
255+
# @!method initialize(approved: nil, decision: nil, event_token: nil, timestamp: nil)
256+
# @param approved [Boolean] Whether the rule would have approved the request.
201257
#
202-
# @param event_token [String] The authorization request event token.
258+
# @param decision [Symbol, Lithic::Models::AuthRules::V2::BacktestResults::Results::DraftVersion::Example::Decision] The decision made by the rule for this event.
203259
#
204-
# @param timestamp [Time] The timestamp of the authorization request event.
260+
# @param event_token [String] The event token.
261+
#
262+
# @param timestamp [Time] The timestamp of the event.
263+
264+
# The decision made by the rule for this event.
265+
#
266+
# @see Lithic::Models::AuthRules::V2::BacktestResults::Results::DraftVersion::Example#decision
267+
module Decision
268+
extend Lithic::Internal::Type::Enum
269+
270+
APPROVED = :APPROVED
271+
DECLINED = :DECLINED
272+
CHALLENGED = :CHALLENGED
273+
274+
# @!method self.values
275+
# @return [Array<Symbol>]
276+
end
205277
end
206278
end
207279
end

0 commit comments

Comments
 (0)