Skip to content

Commit fbf7fdb

Browse files
feat(api): api update (#1003)
1 parent e2dd741 commit fbf7fdb

File tree

4 files changed

+25
-4
lines changed

4 files changed

+25
-4
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: 201
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-8882da77555a843811f51c01d96a8a0f5dd36dc70de46bdf01a1e624807ba3a6.yml
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-6a74a7c2c7897ef6df01004d4e776e33d166bad2206cf5e66152e30bba5a6807.yml

src/increase/resources/cards.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,7 @@ def list(
232232
cursor: str | NotGiven = NOT_GIVEN,
233233
idempotency_key: str | NotGiven = NOT_GIVEN,
234234
limit: int | NotGiven = NOT_GIVEN,
235+
status: card_list_params.Status | NotGiven = NOT_GIVEN,
235236
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
236237
# The extra values given here take precedence over values defined on the client or passed to this method.
237238
extra_headers: Headers | None = None,
@@ -278,6 +279,7 @@ def list(
278279
"cursor": cursor,
279280
"idempotency_key": idempotency_key,
280281
"limit": limit,
282+
"status": status,
281283
},
282284
card_list_params.CardListParams,
283285
),
@@ -525,6 +527,7 @@ def list(
525527
cursor: str | NotGiven = NOT_GIVEN,
526528
idempotency_key: str | NotGiven = NOT_GIVEN,
527529
limit: int | NotGiven = NOT_GIVEN,
530+
status: card_list_params.Status | NotGiven = NOT_GIVEN,
528531
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
529532
# The extra values given here take precedence over values defined on the client or passed to this method.
530533
extra_headers: Headers | None = None,
@@ -571,6 +574,7 @@ def list(
571574
"cursor": cursor,
572575
"idempotency_key": idempotency_key,
573576
"limit": limit,
577+
"status": status,
574578
},
575579
card_list_params.CardListParams,
576580
),

src/increase/types/card_list_params.py

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22

33
from __future__ import annotations
44

5-
from typing import Union
5+
from typing import List, Union
66
from datetime import datetime
7-
from typing_extensions import Annotated, TypedDict
7+
from typing_extensions import Literal, Annotated, TypedDict
88

99
from .._utils import PropertyInfo
1010

11-
__all__ = ["CardListParams", "CreatedAt"]
11+
__all__ = ["CardListParams", "CreatedAt", "Status"]
1212

1313

1414
class CardListParams(TypedDict, total=False):
@@ -34,6 +34,8 @@ class CardListParams(TypedDict, total=False):
3434
The default (and maximum) is 100 objects.
3535
"""
3636

37+
status: Status
38+
3739

3840
class CreatedAt(TypedDict, total=False):
3941
after: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")]
@@ -59,3 +61,16 @@ class CreatedAt(TypedDict, total=False):
5961
Return results on or before this
6062
[ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp.
6163
"""
64+
65+
66+
_StatusReservedKeywords = TypedDict(
67+
"_StatusReservedKeywords",
68+
{
69+
"in": List[Literal["active", "disabled", "canceled"]],
70+
},
71+
total=False,
72+
)
73+
74+
75+
class Status(_StatusReservedKeywords, total=False):
76+
pass

tests/api_resources/test_cards.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,7 @@ def test_method_list_with_all_params(self, client: Increase) -> None:
187187
cursor="cursor",
188188
idempotency_key="x",
189189
limit=1,
190+
status={"in": ["active"]},
190191
)
191192
assert_matches_type(SyncPage[Card], card, path=["response"])
192193

@@ -420,6 +421,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncIncrease) ->
420421
cursor="cursor",
421422
idempotency_key="x",
422423
limit=1,
424+
status={"in": ["active"]},
423425
)
424426
assert_matches_type(AsyncPage[Card], card, path=["response"])
425427

0 commit comments

Comments
 (0)