Skip to content

Commit 9fc1c59

Browse files
chore(api): new attribute targets for Auth Rules and new Financial Account State schema (#721)
- Adds new attribute targets to Conditional Block Parameters: PIN_ENTERED, PIN_STATUS, WALLET_TYPE, CARD_TRANSACTION_COUNT_15M - Adds Financial Account State details to Account Standing schema
1 parent 5101181 commit 9fc1c59

File tree

6 files changed

+51
-1
lines changed

6 files changed

+51
-1
lines changed

.stats.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
configured_endpoints: 155
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic-ef8c4db34befe33c31ef773a61c836fc13976f75c056768cec6d1333d02a76ac.yml
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic-fe97f820471b725722897539252e7444af7490c5a444a2e9304f5e6eec5513f3.yml

src/lithic/types/auth_rules/auth_rule_condition.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,22 @@ class AuthRuleCondition(BaseModel):
4242
lowest risk and 999 representing the highest risk. For Visa transactions,
4343
where the raw score has a range of 0-99, Lithic will normalize the score by
4444
multiplying the raw score by 10x.
45+
- `CARD_TRANSACTION_COUNT_15M`: The number of transactions on the card in the
46+
trailing 15 minutes before the authorization.
4547
- `CARD_TRANSACTION_COUNT_1H`: The number of transactions on the card in the
4648
trailing hour up and until the authorization.
4749
- `CARD_TRANSACTION_COUNT_24H`: The number of transactions on the card in the
4850
trailing 24 hours up and until the authorization.
4951
- `CARD_STATE`: The current state of the card associated with the transaction.
5052
Valid values are `CLOSED`, `OPEN`, `PAUSED`, `PENDING_ACTIVATION`,
5153
`PENDING_FULFILLMENT`.
54+
- `PIN_ENTERED`: Indicates whether a PIN was entered during the transaction.
55+
Valid values are `TRUE`, `FALSE`.
56+
- `PIN_STATUS`: The current state of card's PIN. Valid values are `NOT_SET`,
57+
`OK`, `BLOCKED`.
58+
- `WALLET_TYPE`: For transactions using a digital wallet token, indicates the
59+
source of the token. Valid values are `APPLE_PAY`, `GOOGLE_PAY`,
60+
`SAMSUNG_PAY`, `MASTERPASS`, `MERCHANT`, `OTHER`, `NONE`.
5261
"""
5362

5463
operation: Optional[

src/lithic/types/auth_rules/auth_rule_condition_param.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,22 @@ class AuthRuleConditionParam(TypedDict, total=False):
4343
lowest risk and 999 representing the highest risk. For Visa transactions,
4444
where the raw score has a range of 0-99, Lithic will normalize the score by
4545
multiplying the raw score by 10x.
46+
- `CARD_TRANSACTION_COUNT_15M`: The number of transactions on the card in the
47+
trailing 15 minutes before the authorization.
4648
- `CARD_TRANSACTION_COUNT_1H`: The number of transactions on the card in the
4749
trailing hour up and until the authorization.
4850
- `CARD_TRANSACTION_COUNT_24H`: The number of transactions on the card in the
4951
trailing 24 hours up and until the authorization.
5052
- `CARD_STATE`: The current state of the card associated with the transaction.
5153
Valid values are `CLOSED`, `OPEN`, `PAUSED`, `PENDING_ACTIVATION`,
5254
`PENDING_FULFILLMENT`.
55+
- `PIN_ENTERED`: Indicates whether a PIN was entered during the transaction.
56+
Valid values are `TRUE`, `FALSE`.
57+
- `PIN_STATUS`: The current state of card's PIN. Valid values are `NOT_SET`,
58+
`OK`, `BLOCKED`.
59+
- `WALLET_TYPE`: For transactions using a digital wallet token, indicates the
60+
source of the token. Valid values are `APPLE_PAY`, `GOOGLE_PAY`,
61+
`SAMSUNG_PAY`, `MASTERPASS`, `MERCHANT`, `OTHER`, `NONE`.
5362
"""
5463

5564
operation: Literal["IS_ONE_OF", "IS_NOT_ONE_OF", "MATCHES", "DOES_NOT_MATCH", "IS_GREATER_THAN", "IS_LESS_THAN"]

src/lithic/types/auth_rules/conditional_attribute.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,11 @@
1414
"PAN_ENTRY_MODE",
1515
"TRANSACTION_AMOUNT",
1616
"RISK_SCORE",
17+
"CARD_TRANSACTION_COUNT_15M",
1718
"CARD_TRANSACTION_COUNT_1H",
1819
"CARD_TRANSACTION_COUNT_24H",
1920
"CARD_STATE",
21+
"PIN_ENTERED",
22+
"PIN_STATUS",
23+
"WALLET_TYPE",
2024
]

src/lithic/types/financial_accounts/loan_tape.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
__all__ = [
1010
"LoanTape",
1111
"AccountStanding",
12+
"AccountStandingFinancialAccountState",
1213
"Balances",
1314
"BalancesDue",
1415
"BalancesNextStatementDue",
@@ -27,6 +28,16 @@
2728
]
2829

2930

31+
class AccountStandingFinancialAccountState(BaseModel):
32+
status: Literal["OPEN", "CLOSED", "SUSPENDED", "PENDING"]
33+
"""Status of the financial account"""
34+
35+
status_change_reason: Optional[
36+
Literal["CHARGED_OFF_DELINQUENT", "CHARGED_OFF_FRAUD", "END_USER_REQUEST", "BANK_REQUEST", "DELINQUENT"]
37+
] = None
38+
"""Reason for the financial account status change"""
39+
40+
3041
class AccountStanding(BaseModel):
3142
consecutive_full_payments_made: int
3243
"""Number of consecutive full payments made"""
@@ -40,6 +51,9 @@ class AccountStanding(BaseModel):
4051
days_past_due: int
4152
"""Number of days past due"""
4253

54+
financial_account_state: AccountStandingFinancialAccountState
55+
"""Information about the financial account state"""
56+
4357
has_grace: bool
4458
"""Whether the account currently has grace or not"""
4559

src/lithic/types/financial_accounts/statement.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
__all__ = [
1010
"Statement",
1111
"AccountStanding",
12+
"AccountStandingFinancialAccountState",
1213
"AmountDue",
1314
"PeriodTotals",
1415
"YtdTotals",
@@ -19,6 +20,16 @@
1920
]
2021

2122

23+
class AccountStandingFinancialAccountState(BaseModel):
24+
status: Literal["OPEN", "CLOSED", "SUSPENDED", "PENDING"]
25+
"""Status of the financial account"""
26+
27+
status_change_reason: Optional[
28+
Literal["CHARGED_OFF_DELINQUENT", "CHARGED_OFF_FRAUD", "END_USER_REQUEST", "BANK_REQUEST", "DELINQUENT"]
29+
] = None
30+
"""Reason for the financial account status change"""
31+
32+
2233
class AccountStanding(BaseModel):
2334
consecutive_full_payments_made: int
2435
"""Number of consecutive full payments made"""
@@ -32,6 +43,9 @@ class AccountStanding(BaseModel):
3243
days_past_due: int
3344
"""Number of days past due"""
3445

46+
financial_account_state: AccountStandingFinancialAccountState
47+
"""Information about the financial account state"""
48+
3549
has_grace: bool
3650
"""Whether the account currently has grace or not"""
3751

0 commit comments

Comments
 (0)