Skip to content

Commit 1b7b6a3

Browse files
stainless-app[bot]stainless-bot
authored andcommitted
feat(api): add support for query param include_all_blocks (#301)
1 parent 922476f commit 1b7b6a3

File tree

7 files changed

+31
-1
lines changed

7 files changed

+31
-1
lines changed

.stats.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
configured_endpoints: 90
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb-2f2e1b9fbe79b0ed97d846a5a26937f421c162e559a2f85a82d7c6e432463f32.yml
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb-2ec02cbf3446827f8bbc949216aec29ff745d79c39f1aa1b7ce2289eab0f338f.yml

src/orb/resources/customers/credits/credits.py

+16
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ def list(
6363
*,
6464
currency: Optional[str] | NotGiven = NOT_GIVEN,
6565
cursor: Optional[str] | NotGiven = NOT_GIVEN,
66+
include_all_blocks: bool | NotGiven = NOT_GIVEN,
6667
limit: int | NotGiven = NOT_GIVEN,
6768
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
6869
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -83,6 +84,8 @@ def list(
8384
cursor: Cursor for pagination. This can be populated by the `next_cursor` value returned
8485
from the initial request.
8586
87+
include_all_blocks: Include all blocks, not just active ones.
88+
8689
limit: The number of items to fetch. Defaults to 20.
8790
8891
extra_headers: Send extra headers
@@ -107,6 +110,7 @@ def list(
107110
{
108111
"currency": currency,
109112
"cursor": cursor,
113+
"include_all_blocks": include_all_blocks,
110114
"limit": limit,
111115
},
112116
credit_list_params.CreditListParams,
@@ -121,6 +125,7 @@ def list_by_external_id(
121125
*,
122126
currency: Optional[str] | NotGiven = NOT_GIVEN,
123127
cursor: Optional[str] | NotGiven = NOT_GIVEN,
128+
include_all_blocks: bool | NotGiven = NOT_GIVEN,
124129
limit: int | NotGiven = NOT_GIVEN,
125130
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
126131
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -141,6 +146,8 @@ def list_by_external_id(
141146
cursor: Cursor for pagination. This can be populated by the `next_cursor` value returned
142147
from the initial request.
143148
149+
include_all_blocks: Include all blocks, not just active ones.
150+
144151
limit: The number of items to fetch. Defaults to 20.
145152
146153
extra_headers: Send extra headers
@@ -167,6 +174,7 @@ def list_by_external_id(
167174
{
168175
"currency": currency,
169176
"cursor": cursor,
177+
"include_all_blocks": include_all_blocks,
170178
"limit": limit,
171179
},
172180
credit_list_by_external_id_params.CreditListByExternalIDParams,
@@ -199,6 +207,7 @@ def list(
199207
*,
200208
currency: Optional[str] | NotGiven = NOT_GIVEN,
201209
cursor: Optional[str] | NotGiven = NOT_GIVEN,
210+
include_all_blocks: bool | NotGiven = NOT_GIVEN,
202211
limit: int | NotGiven = NOT_GIVEN,
203212
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
204213
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -219,6 +228,8 @@ def list(
219228
cursor: Cursor for pagination. This can be populated by the `next_cursor` value returned
220229
from the initial request.
221230
231+
include_all_blocks: Include all blocks, not just active ones.
232+
222233
limit: The number of items to fetch. Defaults to 20.
223234
224235
extra_headers: Send extra headers
@@ -243,6 +254,7 @@ def list(
243254
{
244255
"currency": currency,
245256
"cursor": cursor,
257+
"include_all_blocks": include_all_blocks,
246258
"limit": limit,
247259
},
248260
credit_list_params.CreditListParams,
@@ -257,6 +269,7 @@ def list_by_external_id(
257269
*,
258270
currency: Optional[str] | NotGiven = NOT_GIVEN,
259271
cursor: Optional[str] | NotGiven = NOT_GIVEN,
272+
include_all_blocks: bool | NotGiven = NOT_GIVEN,
260273
limit: int | NotGiven = NOT_GIVEN,
261274
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
262275
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -277,6 +290,8 @@ def list_by_external_id(
277290
cursor: Cursor for pagination. This can be populated by the `next_cursor` value returned
278291
from the initial request.
279292
293+
include_all_blocks: Include all blocks, not just active ones.
294+
280295
limit: The number of items to fetch. Defaults to 20.
281296
282297
extra_headers: Send extra headers
@@ -303,6 +318,7 @@ def list_by_external_id(
303318
{
304319
"currency": currency,
305320
"cursor": cursor,
321+
"include_all_blocks": include_all_blocks,
306322
"limit": limit,
307323
},
308324
credit_list_by_external_id_params.CreditListByExternalIDParams,

src/orb/types/customers/credit_list_by_external_id_params.py

+3
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,8 @@ class CreditListByExternalIDParams(TypedDict, total=False):
1919
request.
2020
"""
2121

22+
include_all_blocks: bool
23+
"""Include all blocks, not just active ones."""
24+
2225
limit: int
2326
"""The number of items to fetch. Defaults to 20."""

src/orb/types/customers/credit_list_by_external_id_response.py

+2
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ class CreditListByExternalIDResponse(BaseModel):
1818

1919
expiry_date: Optional[datetime] = None
2020

21+
maximum_initial_balance: Optional[float] = None
22+
2123
per_unit_cost_basis: Optional[str] = None
2224

2325
status: Literal["active", "pending_payment"]

src/orb/types/customers/credit_list_params.py

+3
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,8 @@ class CreditListParams(TypedDict, total=False):
1919
request.
2020
"""
2121

22+
include_all_blocks: bool
23+
"""Include all blocks, not just active ones."""
24+
2225
limit: int
2326
"""The number of items to fetch. Defaults to 20."""

src/orb/types/customers/credit_list_response.py

+2
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ class CreditListResponse(BaseModel):
1818

1919
expiry_date: Optional[datetime] = None
2020

21+
maximum_initial_balance: Optional[float] = None
22+
2123
per_unit_cost_basis: Optional[str] = None
2224

2325
status: Literal["active", "pending_payment"]

tests/api_resources/customers/test_credits.py

+4
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ def test_method_list_with_all_params(self, client: Orb) -> None:
3434
"string",
3535
currency="string",
3636
cursor="string",
37+
include_all_blocks=True,
3738
limit=1,
3839
)
3940
assert_matches_type(SyncPage[CreditListResponse], credit, path=["response"])
@@ -82,6 +83,7 @@ def test_method_list_by_external_id_with_all_params(self, client: Orb) -> None:
8283
"string",
8384
currency="string",
8485
cursor="string",
86+
include_all_blocks=True,
8587
limit=1,
8688
)
8789
assert_matches_type(SyncPage[CreditListByExternalIDResponse], credit, path=["response"])
@@ -134,6 +136,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncOrb) -> None
134136
"string",
135137
currency="string",
136138
cursor="string",
139+
include_all_blocks=True,
137140
limit=1,
138141
)
139142
assert_matches_type(AsyncPage[CreditListResponse], credit, path=["response"])
@@ -182,6 +185,7 @@ async def test_method_list_by_external_id_with_all_params(self, async_client: As
182185
"string",
183186
currency="string",
184187
cursor="string",
188+
include_all_blocks=True,
185189
limit=1,
186190
)
187191
assert_matches_type(AsyncPage[CreditListByExternalIDResponse], credit, path=["response"])

0 commit comments

Comments
 (0)