Skip to content

Commit b5bc545

Browse files
feat(api): Add CARD_AGE and ACCOUNT_AGE attributes to authorization rules
1 parent 039d7e3 commit b5bc545

6 files changed

Lines changed: 35 additions & 4 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-5bb8d2bedef02f07498de3f252fa6da1393d2fb59f727b05828804cea9aded30.yml
3-
openapi_spec_hash: d1f260252b3bb7ebc77fa7134db6c65d
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic%2Flithic-5f3c4878ed085a0e8925abdf14ed250ba25b04d5a128e3edd81f28be5fd79b69.yml
3+
openapi_spec_hash: f2cc51f780daf0454712a4f73b9c8302
44
config_hash: 400b9afe0f7f7b7d96177d05950775f9

lib/lithic/models/auth_rules/conditional_authorization_action_parameters.rb

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,9 @@ class Condition < Lithic::Internal::Type::BaseModel
9090
# - `ADDRESS_MATCH`: Lithic's evaluation result comparing transaction's address
9191
# data with the cardholder KYC data if it exists. Valid values are `MATCH`,
9292
# `MATCH_ADDRESS_ONLY`, `MATCH_ZIP_ONLY`,`MISMATCH`,`NOT_PRESENT`.
93+
# - `CARD_AGE`: The age of the card in seconds at the time of the authorization.
94+
# - `ACCOUNT_AGE`: The age of the account holder's account in seconds at the time
95+
# of the authorization.
9396
#
9497
# @return [Symbol, Lithic::Models::AuthRules::ConditionalAuthorizationActionParameters::Condition::Attribute]
9598
required :attribute,
@@ -172,6 +175,9 @@ class Condition < Lithic::Internal::Type::BaseModel
172175
# - `ADDRESS_MATCH`: Lithic's evaluation result comparing transaction's address
173176
# data with the cardholder KYC data if it exists. Valid values are `MATCH`,
174177
# `MATCH_ADDRESS_ONLY`, `MATCH_ZIP_ONLY`,`MISMATCH`,`NOT_PRESENT`.
178+
# - `CARD_AGE`: The age of the card in seconds at the time of the authorization.
179+
# - `ACCOUNT_AGE`: The age of the account holder's account in seconds at the time
180+
# of the authorization.
175181
#
176182
# @see Lithic::Models::AuthRules::ConditionalAuthorizationActionParameters::Condition#attribute
177183
module Attribute
@@ -196,6 +202,8 @@ module Attribute
196202
WALLET_TYPE = :WALLET_TYPE
197203
TRANSACTION_INITIATOR = :TRANSACTION_INITIATOR
198204
ADDRESS_MATCH = :ADDRESS_MATCH
205+
CARD_AGE = :CARD_AGE
206+
ACCOUNT_AGE = :ACCOUNT_AGE
199207

200208
# @!method self.values
201209
# @return [Array<Symbol>]

lib/lithic/models/auth_rules/rule_feature.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ module AuthRules
1818
# - `CARD`: The card associated with the event. Available for AUTHORIZATION and
1919
# THREE_DS_AUTHENTICATION event stream rules.
2020
# - `ACCOUNT_HOLDER`: The account holder associated with the card. Available for
21-
# THREE_DS_AUTHENTICATION event stream rules.
21+
# AUTHORIZATION and THREE_DS_AUTHENTICATION event stream rules.
2222
# - `IP_METADATA`: IP address metadata for the request. Available for
2323
# THREE_DS_AUTHENTICATION event stream rules.
2424
# - `SPEND_VELOCITY`: Spend velocity data for the card or account. Requires

rbi/lithic/models/auth_rules/conditional_authorization_action_parameters.rbi

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,9 @@ module Lithic
159159
# - `ADDRESS_MATCH`: Lithic's evaluation result comparing transaction's address
160160
# data with the cardholder KYC data if it exists. Valid values are `MATCH`,
161161
# `MATCH_ADDRESS_ONLY`, `MATCH_ZIP_ONLY`,`MISMATCH`,`NOT_PRESENT`.
162+
# - `CARD_AGE`: The age of the card in seconds at the time of the authorization.
163+
# - `ACCOUNT_AGE`: The age of the account holder's account in seconds at the time
164+
# of the authorization.
162165
sig do
163166
returns(
164167
Lithic::AuthRules::ConditionalAuthorizationActionParameters::Condition::Attribute::OrSymbol
@@ -237,6 +240,9 @@ module Lithic
237240
# - `ADDRESS_MATCH`: Lithic's evaluation result comparing transaction's address
238241
# data with the cardholder KYC data if it exists. Valid values are `MATCH`,
239242
# `MATCH_ADDRESS_ONLY`, `MATCH_ZIP_ONLY`,`MISMATCH`,`NOT_PRESENT`.
243+
# - `CARD_AGE`: The age of the card in seconds at the time of the authorization.
244+
# - `ACCOUNT_AGE`: The age of the account holder's account in seconds at the time
245+
# of the authorization.
240246
attribute:,
241247
# The operation to apply to the attribute
242248
operation:,
@@ -312,6 +318,9 @@ module Lithic
312318
# - `ADDRESS_MATCH`: Lithic's evaluation result comparing transaction's address
313319
# data with the cardholder KYC data if it exists. Valid values are `MATCH`,
314320
# `MATCH_ADDRESS_ONLY`, `MATCH_ZIP_ONLY`,`MISMATCH`,`NOT_PRESENT`.
321+
# - `CARD_AGE`: The age of the card in seconds at the time of the authorization.
322+
# - `ACCOUNT_AGE`: The age of the account holder's account in seconds at the time
323+
# of the authorization.
315324
module Attribute
316325
extend Lithic::Internal::Type::Enum
317326

@@ -419,6 +428,16 @@ module Lithic
419428
:ADDRESS_MATCH,
420429
Lithic::AuthRules::ConditionalAuthorizationActionParameters::Condition::Attribute::TaggedSymbol
421430
)
431+
CARD_AGE =
432+
T.let(
433+
:CARD_AGE,
434+
Lithic::AuthRules::ConditionalAuthorizationActionParameters::Condition::Attribute::TaggedSymbol
435+
)
436+
ACCOUNT_AGE =
437+
T.let(
438+
:ACCOUNT_AGE,
439+
Lithic::AuthRules::ConditionalAuthorizationActionParameters::Condition::Attribute::TaggedSymbol
440+
)
422441

423442
sig do
424443
override.returns(

rbi/lithic/models/auth_rules/rule_feature.rbi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ module Lithic
1818
# - `CARD`: The card associated with the event. Available for AUTHORIZATION and
1919
# THREE_DS_AUTHENTICATION event stream rules.
2020
# - `ACCOUNT_HOLDER`: The account holder associated with the card. Available for
21-
# THREE_DS_AUTHENTICATION event stream rules.
21+
# AUTHORIZATION and THREE_DS_AUTHENTICATION event stream rules.
2222
# - `IP_METADATA`: IP address metadata for the request. Available for
2323
# THREE_DS_AUTHENTICATION event stream rules.
2424
# - `SPEND_VELOCITY`: Spend velocity data for the card or account. Requires

sig/lithic/models/auth_rules/conditional_authorization_action_parameters.rbs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,8 @@ module Lithic
7979
| :WALLET_TYPE
8080
| :TRANSACTION_INITIATOR
8181
| :ADDRESS_MATCH
82+
| :CARD_AGE
83+
| :ACCOUNT_AGE
8284

8385
module Attribute
8486
extend Lithic::Internal::Type::Enum
@@ -102,6 +104,8 @@ module Lithic
102104
WALLET_TYPE: :WALLET_TYPE
103105
TRANSACTION_INITIATOR: :TRANSACTION_INITIATOR
104106
ADDRESS_MATCH: :ADDRESS_MATCH
107+
CARD_AGE: :CARD_AGE
108+
ACCOUNT_AGE: :ACCOUNT_AGE
105109

106110
def self?.values: -> ::Array[Lithic::Models::AuthRules::ConditionalAuthorizationActionParameters::Condition::attribute]
107111
end

0 commit comments

Comments
 (0)