Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions src/lithic/resources/cards.py
Original file line number Diff line number Diff line change
Expand Up @@ -335,6 +335,7 @@ def list(
end: Union[str, datetime] | NotGiven = NOT_GIVEN,
page: int | NotGiven = NOT_GIVEN,
page_size: int | NotGiven = NOT_GIVEN,
state: Literal["OPEN", "PAUSED", "CLOSED", "PENDING_FULFILLMENT", "PENDING_ACTIVATION"] | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
Expand All @@ -358,6 +359,8 @@ def list(

page_size: Page size (for pagination).

state: Returns cards with the specified state.

extra_headers: Send extra headers

extra_query: Add additional query parameters to the request
Expand All @@ -381,6 +384,7 @@ def list(
"end": end,
"page": page,
"page_size": page_size,
"state": state,
},
card_list_params.CardListParams,
),
Expand Down Expand Up @@ -1011,6 +1015,7 @@ def list(
end: Union[str, datetime] | NotGiven = NOT_GIVEN,
page: int | NotGiven = NOT_GIVEN,
page_size: int | NotGiven = NOT_GIVEN,
state: Literal["OPEN", "PAUSED", "CLOSED", "PENDING_FULFILLMENT", "PENDING_ACTIVATION"] | NotGiven = NOT_GIVEN,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
Expand All @@ -1034,6 +1039,8 @@ def list(

page_size: Page size (for pagination).

state: Returns cards with the specified state.

extra_headers: Send extra headers

extra_query: Add additional query parameters to the request
Expand All @@ -1057,6 +1064,7 @@ def list(
"end": end,
"page": page,
"page_size": page_size,
"state": state,
},
card_list_params.CardListParams,
),
Expand Down
5 changes: 4 additions & 1 deletion src/lithic/types/card_list_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

from typing import Union
from datetime import datetime
from typing_extensions import Annotated, TypedDict
from typing_extensions import Literal, Annotated, TypedDict

from .._utils import PropertyInfo

Expand Down Expand Up @@ -32,3 +32,6 @@ class CardListParams(TypedDict, total=False):

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

state: Literal["OPEN", "PAUSED", "CLOSED", "PENDING_FULFILLMENT", "PENDING_ACTIVATION"]
"""Returns cards with the specified state."""
2 changes: 2 additions & 0 deletions tests/api_resources/test_cards.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ def test_method_list_with_all_params(self, client: Lithic) -> None:
end=parse_datetime("2019-12-27T18:11:19.117Z"),
page=0,
page_size=1,
state="OPEN",
)
assert_matches_type(SyncPage[Card], card, path=["response"])

Expand Down Expand Up @@ -257,6 +258,7 @@ async def test_method_list_with_all_params(self, client: AsyncLithic) -> None:
end=parse_datetime("2019-12-27T18:11:19.117Z"),
page=0,
page_size=1,
state="OPEN",
)
assert_matches_type(AsyncPage[Card], card, path=["response"])

Expand Down