Skip to content

Commit 7d67d35

Browse files
feat(api): add PROGRAM scope to auth_rules and case entity types
1 parent 9c1cfe4 commit 7d67d35

9 files changed

Lines changed: 30 additions & 14 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: 213
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic/lithic-4ea61aa22fa852629c506efa84f633535d32a7133bdf3ae2d09040d2fb6caeb2.yml
3-
openapi_spec_hash: 76c21b84082530356fe45eed27e84cfe
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/lithic/lithic-c0289201680f9b61dd0d9887f88dfb7d0f6bc99d2d04fb93a2350d3ce96a3591.yml
3+
openapi_spec_hash: dd5295389b7ef07182cc6ad20310a05b
44
config_hash: 337a99d8cc30006358b7bc2531401669

‎src/lithic/resources/transaction_monitoring/cases/cases.py‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,9 @@ def list(
243243
ending_before: A cursor representing an item's token before which a page of results should end.
244244
Used to retrieve the previous page of results before this item.
245245
246-
entity_token: Only return cases associated with the provided entity.
246+
entity_token: Only return cases associated with the provided entity. Accepts a card, account,
247+
or financial account token. Cases with a `PROGRAM` entity have no entity token
248+
and are never returned by this filter.
247249
248250
page_size: Page size (for pagination).
249251
@@ -637,7 +639,9 @@ def list(
637639
ending_before: A cursor representing an item's token before which a page of results should end.
638640
Used to retrieve the previous page of results before this item.
639641
640-
entity_token: Only return cases associated with the provided entity.
642+
entity_token: Only return cases associated with the provided entity. Accepts a card, account,
643+
or financial account token. Cases with a `PROGRAM` entity have no entity token
644+
and are never returned by this filter.
641645
642646
page_size: Page size (for pagination).
643647

‎src/lithic/types/auth_rules/ach_payment_update_action.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class CreateCaseAction(BaseModel):
2323
queue_token: str
2424
"""The token of the queue to create the case in"""
2525

26-
scope: Literal["FINANCIAL_ACCOUNT"]
26+
scope: Literal["FINANCIAL_ACCOUNT", "PROGRAM"]
2727
"""The scope of the case to create"""
2828

2929
type: Literal["CREATE_CASE"]

‎src/lithic/types/auth_rules/ach_payment_update_action_param.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class CreateCaseAction(TypedDict, total=False):
2323
queue_token: Required[str]
2424
"""The token of the queue to create the case in"""
2525

26-
scope: Required[Literal["FINANCIAL_ACCOUNT"]]
26+
scope: Required[Literal["FINANCIAL_ACCOUNT", "PROGRAM"]]
2727
"""The scope of the case to create"""
2828

2929
type: Required[Literal["CREATE_CASE"]]

‎src/lithic/types/auth_rules/card_transaction_update_action.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class CreateCaseAction(BaseModel):
2323
queue_token: str
2424
"""The token of the queue to create the case in"""
2525

26-
scope: Literal["CARD", "ACCOUNT"]
26+
scope: Literal["CARD", "ACCOUNT", "PROGRAM"]
2727
"""The scope of the case to create"""
2828

2929
type: Literal["CREATE_CASE"]

‎src/lithic/types/auth_rules/card_transaction_update_action_param.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class CreateCaseAction(TypedDict, total=False):
2323
queue_token: Required[str]
2424
"""The token of the queue to create the case in"""
2525

26-
scope: Required[Literal["CARD", "ACCOUNT"]]
26+
scope: Required[Literal["CARD", "ACCOUNT", "PROGRAM"]]
2727
"""The scope of the case to create"""
2828

2929
type: Required[Literal["CREATE_CASE"]]

‎src/lithic/types/auth_rules/v2_list_results_response.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -412,7 +412,7 @@ class CardTransactionUpdateResultActionCreateCaseAction(BaseModel):
412412
queue_token: str
413413
"""The token of the queue to create the case in"""
414414

415-
scope: Literal["CARD", "ACCOUNT"]
415+
scope: Literal["CARD", "ACCOUNT", "PROGRAM"]
416416
"""The scope of the case to create"""
417417

418418
type: Literal["CREATE_CASE"]
@@ -474,7 +474,7 @@ class ACHPaymentUpdateResultActionCreateCaseAction(BaseModel):
474474
queue_token: str
475475
"""The token of the queue to create the case in"""
476476

477-
scope: Literal["FINANCIAL_ACCOUNT"]
477+
scope: Literal["FINANCIAL_ACCOUNT", "PROGRAM"]
478478
"""The scope of the case to create"""
479479

480480
type: Literal["CREATE_CASE"]
Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
22

3+
from typing import Optional
34
from typing_extensions import Literal
45

56
from ..._models import BaseModel
@@ -10,12 +11,19 @@
1011
class CaseEntity(BaseModel):
1112
"""The entity a case is associated with"""
1213

13-
entity_token: str
14-
"""Globally unique identifier for the associated entity"""
14+
entity_token: Optional[str] = None
15+
"""
16+
Globally unique identifier for the associated entity: the card token for `CARD`,
17+
the account token for `ACCOUNT`, and the financial account token for
18+
`FINANCIAL_ACCOUNT`. Null for `PROGRAM`, which is not scoped to an individual
19+
entity
20+
"""
1521

16-
entity_type: Literal["CARD", "ACCOUNT"]
22+
entity_type: Literal["CARD", "ACCOUNT", "FINANCIAL_ACCOUNT", "PROGRAM"]
1723
"""The type of entity a case is associated with:
1824
1925
- `CARD` - The case is associated with a card
2026
- `ACCOUNT` - The case is associated with an account
27+
- `FINANCIAL_ACCOUNT` - The case is associated with a financial account
28+
- `PROGRAM` - The case is associated with the whole program
2129
"""

‎src/lithic/types/transaction_monitoring/case_list_params.py‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,11 @@ class CaseListParams(TypedDict, total=False):
4545
"""
4646

4747
entity_token: str
48-
"""Only return cases associated with the provided entity."""
48+
"""Only return cases associated with the provided entity.
49+
50+
Accepts a card, account, or financial account token. Cases with a `PROGRAM`
51+
entity have no entity token and are never returned by this filter.
52+
"""
4953

5054
page_size: int
5155
"""Page size (for pagination)."""

0 commit comments

Comments
 (0)