Skip to content

Commit 72cf05b

Browse files
feat(api): api update (#1017)
1 parent 7771743 commit 72cf05b

File tree

4 files changed

+38
-4
lines changed

4 files changed

+38
-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: 198
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-82672744c336fb928794ae216fe177d65ad3b762159a39fb972612d991f01c81.yml
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-c09f0dfa89faafa23f31631468c822ada82b0ab08a1661ce7ee2e47fd78e575c.yml

src/increase/resources/check_transfers.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,7 @@ def list(
174174
cursor: str | NotGiven = NOT_GIVEN,
175175
idempotency_key: str | NotGiven = NOT_GIVEN,
176176
limit: int | NotGiven = NOT_GIVEN,
177+
status: check_transfer_list_params.Status | NotGiven = NOT_GIVEN,
177178
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
178179
# The extra values given here take precedence over values defined on the client or passed to this method.
179180
extra_headers: Headers | None = None,
@@ -220,6 +221,7 @@ def list(
220221
"cursor": cursor,
221222
"idempotency_key": idempotency_key,
222223
"limit": limit,
224+
"status": status,
223225
},
224226
check_transfer_list_params.CheckTransferListParams,
225227
),
@@ -505,6 +507,7 @@ def list(
505507
cursor: str | NotGiven = NOT_GIVEN,
506508
idempotency_key: str | NotGiven = NOT_GIVEN,
507509
limit: int | NotGiven = NOT_GIVEN,
510+
status: check_transfer_list_params.Status | NotGiven = NOT_GIVEN,
508511
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
509512
# The extra values given here take precedence over values defined on the client or passed to this method.
510513
extra_headers: Headers | None = None,
@@ -551,6 +554,7 @@ def list(
551554
"cursor": cursor,
552555
"idempotency_key": idempotency_key,
553556
"limit": limit,
557+
"status": status,
554558
},
555559
check_transfer_list_params.CheckTransferListParams,
556560
),

src/increase/types/check_transfer_list_params.py

Lines changed: 31 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__ = ["CheckTransferListParams", "CreatedAt"]
11+
__all__ = ["CheckTransferListParams", "CreatedAt", "Status"]
1212

1313

1414
class CheckTransferListParams(TypedDict, total=False):
@@ -34,6 +34,8 @@ class CheckTransferListParams(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,29 @@ 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[
70+
Literal[
71+
"pending_approval",
72+
"canceled",
73+
"pending_submission",
74+
"requires_attention",
75+
"rejected",
76+
"pending_mailing",
77+
"mailed",
78+
"deposited",
79+
"stopped",
80+
"returned",
81+
]
82+
],
83+
},
84+
total=False,
85+
)
86+
87+
88+
class Status(_StatusReservedKeywords, total=False):
89+
pass

tests/api_resources/test_check_transfers.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,7 @@ def test_method_list_with_all_params(self, client: Increase) -> None:
151151
cursor="cursor",
152152
idempotency_key="x",
153153
limit=1,
154+
status={"in": ["pending_approval"]},
154155
)
155156
assert_matches_type(SyncPage[CheckTransfer], check_transfer, path=["response"])
156157

@@ -430,6 +431,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncIncrease) ->
430431
cursor="cursor",
431432
idempotency_key="x",
432433
limit=1,
434+
status={"in": ["pending_approval"]},
433435
)
434436
assert_matches_type(AsyncPage[CheckTransfer], check_transfer, path=["response"])
435437

0 commit comments

Comments
 (0)