Skip to content

Commit 9906e02

Browse files
stainless-app[bot]stainless-bot
authored andcommitted
feat(api): OpenAPI spec update via Stainless API (#346)
1 parent fed965f commit 9906e02

File tree

8 files changed

+40
-1
lines changed

8 files changed

+40
-1
lines changed

.stats.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
configured_endpoints: 91
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-ad49a3b6fc150ac83a43f43b0b416847bbc36f3b9cb036d61e012ae8b0288c55.yml
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-303379b9db577b964d46fe908e8226e95c60435b11ddd8685bf2fa99c57f4320.yml

src/orb/resources/customers/costs.py

+16
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ def list(
3838
self,
3939
customer_id: str,
4040
*,
41+
currency: Optional[str] | NotGiven = NOT_GIVEN,
4142
timeframe_end: Union[str, datetime, None] | NotGiven = NOT_GIVEN,
4243
timeframe_start: Union[str, datetime, None] | NotGiven = NOT_GIVEN,
4344
view_mode: Optional[Literal["periodic", "cumulative"]] | NotGiven = NOT_GIVEN,
@@ -185,6 +186,8 @@ def list(
185186
`grouping_value` and `secondary_grouping_value` available.
186187
187188
Args:
189+
currency: The currency or custom pricing unit to use.
190+
188191
timeframe_end: Costs returned are exclusive of `timeframe_end`.
189192
190193
timeframe_start: Costs returned are inclusive of `timeframe_start`.
@@ -213,6 +216,7 @@ def list(
213216
timeout=timeout,
214217
query=maybe_transform(
215218
{
219+
"currency": currency,
216220
"timeframe_end": timeframe_end,
217221
"timeframe_start": timeframe_start,
218222
"view_mode": view_mode,
@@ -227,6 +231,7 @@ def list_by_external_id(
227231
self,
228232
external_customer_id: str,
229233
*,
234+
currency: Optional[str] | NotGiven = NOT_GIVEN,
230235
timeframe_end: Union[str, datetime, None] | NotGiven = NOT_GIVEN,
231236
timeframe_start: Union[str, datetime, None] | NotGiven = NOT_GIVEN,
232237
view_mode: Optional[Literal["periodic", "cumulative"]] | NotGiven = NOT_GIVEN,
@@ -374,6 +379,8 @@ def list_by_external_id(
374379
`grouping_value` and `secondary_grouping_value` available.
375380
376381
Args:
382+
currency: The currency or custom pricing unit to use.
383+
377384
timeframe_end: Costs returned are exclusive of `timeframe_end`.
378385
379386
timeframe_start: Costs returned are inclusive of `timeframe_start`.
@@ -404,6 +411,7 @@ def list_by_external_id(
404411
timeout=timeout,
405412
query=maybe_transform(
406413
{
414+
"currency": currency,
407415
"timeframe_end": timeframe_end,
408416
"timeframe_start": timeframe_start,
409417
"view_mode": view_mode,
@@ -428,6 +436,7 @@ async def list(
428436
self,
429437
customer_id: str,
430438
*,
439+
currency: Optional[str] | NotGiven = NOT_GIVEN,
431440
timeframe_end: Union[str, datetime, None] | NotGiven = NOT_GIVEN,
432441
timeframe_start: Union[str, datetime, None] | NotGiven = NOT_GIVEN,
433442
view_mode: Optional[Literal["periodic", "cumulative"]] | NotGiven = NOT_GIVEN,
@@ -575,6 +584,8 @@ async def list(
575584
`grouping_value` and `secondary_grouping_value` available.
576585
577586
Args:
587+
currency: The currency or custom pricing unit to use.
588+
578589
timeframe_end: Costs returned are exclusive of `timeframe_end`.
579590
580591
timeframe_start: Costs returned are inclusive of `timeframe_start`.
@@ -603,6 +614,7 @@ async def list(
603614
timeout=timeout,
604615
query=await async_maybe_transform(
605616
{
617+
"currency": currency,
606618
"timeframe_end": timeframe_end,
607619
"timeframe_start": timeframe_start,
608620
"view_mode": view_mode,
@@ -617,6 +629,7 @@ async def list_by_external_id(
617629
self,
618630
external_customer_id: str,
619631
*,
632+
currency: Optional[str] | NotGiven = NOT_GIVEN,
620633
timeframe_end: Union[str, datetime, None] | NotGiven = NOT_GIVEN,
621634
timeframe_start: Union[str, datetime, None] | NotGiven = NOT_GIVEN,
622635
view_mode: Optional[Literal["periodic", "cumulative"]] | NotGiven = NOT_GIVEN,
@@ -764,6 +777,8 @@ async def list_by_external_id(
764777
`grouping_value` and `secondary_grouping_value` available.
765778
766779
Args:
780+
currency: The currency or custom pricing unit to use.
781+
767782
timeframe_end: Costs returned are exclusive of `timeframe_end`.
768783
769784
timeframe_start: Costs returned are inclusive of `timeframe_start`.
@@ -794,6 +809,7 @@ async def list_by_external_id(
794809
timeout=timeout,
795810
query=await async_maybe_transform(
796811
{
812+
"currency": currency,
797813
"timeframe_end": timeframe_end,
798814
"timeframe_start": timeframe_start,
799815
"view_mode": view_mode,

src/orb/resources/subscriptions.py

+8
Original file line numberDiff line numberDiff line change
@@ -832,6 +832,7 @@ def fetch_costs(
832832
self,
833833
subscription_id: str,
834834
*,
835+
currency: Optional[str] | NotGiven = NOT_GIVEN,
835836
timeframe_end: Union[str, datetime, None] | NotGiven = NOT_GIVEN,
836837
timeframe_start: Union[str, datetime, None] | NotGiven = NOT_GIVEN,
837838
view_mode: Optional[Literal["periodic", "cumulative"]] | NotGiven = NOT_GIVEN,
@@ -855,6 +856,8 @@ def fetch_costs(
855856
same day).
856857
857858
Args:
859+
currency: The currency or custom pricing unit to use.
860+
858861
timeframe_end: Costs returned are exclusive of `timeframe_end`.
859862
860863
timeframe_start: Costs returned are inclusive of `timeframe_start`.
@@ -883,6 +886,7 @@ def fetch_costs(
883886
timeout=timeout,
884887
query=maybe_transform(
885888
{
889+
"currency": currency,
886890
"timeframe_end": timeframe_end,
887891
"timeframe_start": timeframe_start,
888892
"view_mode": view_mode,
@@ -2557,6 +2561,7 @@ async def fetch_costs(
25572561
self,
25582562
subscription_id: str,
25592563
*,
2564+
currency: Optional[str] | NotGiven = NOT_GIVEN,
25602565
timeframe_end: Union[str, datetime, None] | NotGiven = NOT_GIVEN,
25612566
timeframe_start: Union[str, datetime, None] | NotGiven = NOT_GIVEN,
25622567
view_mode: Optional[Literal["periodic", "cumulative"]] | NotGiven = NOT_GIVEN,
@@ -2580,6 +2585,8 @@ async def fetch_costs(
25802585
same day).
25812586
25822587
Args:
2588+
currency: The currency or custom pricing unit to use.
2589+
25832590
timeframe_end: Costs returned are exclusive of `timeframe_end`.
25842591
25852592
timeframe_start: Costs returned are inclusive of `timeframe_start`.
@@ -2608,6 +2615,7 @@ async def fetch_costs(
26082615
timeout=timeout,
26092616
query=await async_maybe_transform(
26102617
{
2618+
"currency": currency,
26112619
"timeframe_end": timeframe_end,
26122620
"timeframe_start": timeframe_start,
26132621
"view_mode": view_mode,

src/orb/types/customers/cost_list_by_external_id_params.py

+3
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@
1212

1313

1414
class CostListByExternalIDParams(TypedDict, total=False):
15+
currency: Optional[str]
16+
"""The currency or custom pricing unit to use."""
17+
1518
timeframe_end: Annotated[Union[str, datetime, None], PropertyInfo(format="iso8601")]
1619
"""Costs returned are exclusive of `timeframe_end`."""
1720

src/orb/types/customers/cost_list_params.py

+3
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@
1212

1313

1414
class CostListParams(TypedDict, total=False):
15+
currency: Optional[str]
16+
"""The currency or custom pricing unit to use."""
17+
1518
timeframe_end: Annotated[Union[str, datetime, None], PropertyInfo(format="iso8601")]
1619
"""Costs returned are exclusive of `timeframe_end`."""
1720

src/orb/types/subscription_fetch_costs_params.py

+3
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@
1212

1313

1414
class SubscriptionFetchCostsParams(TypedDict, total=False):
15+
currency: Optional[str]
16+
"""The currency or custom pricing unit to use."""
17+
1518
timeframe_end: Annotated[Union[str, datetime, None], PropertyInfo(format="iso8601")]
1619
"""Costs returned are exclusive of `timeframe_end`."""
1720

tests/api_resources/customers/test_costs.py

+4
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ def test_method_list(self, client: Orb) -> None:
3232
def test_method_list_with_all_params(self, client: Orb) -> None:
3333
cost = client.customers.costs.list(
3434
customer_id="customer_id",
35+
currency="currency",
3536
timeframe_end=parse_datetime("2022-03-01T05:00:00Z"),
3637
timeframe_start=parse_datetime("2022-02-01T05:00:00Z"),
3738
view_mode="periodic",
@@ -80,6 +81,7 @@ def test_method_list_by_external_id(self, client: Orb) -> None:
8081
def test_method_list_by_external_id_with_all_params(self, client: Orb) -> None:
8182
cost = client.customers.costs.list_by_external_id(
8283
external_customer_id="external_customer_id",
84+
currency="currency",
8385
timeframe_end=parse_datetime("2022-03-01T05:00:00Z"),
8486
timeframe_start=parse_datetime("2022-02-01T05:00:00Z"),
8587
view_mode="periodic",
@@ -132,6 +134,7 @@ async def test_method_list(self, async_client: AsyncOrb) -> None:
132134
async def test_method_list_with_all_params(self, async_client: AsyncOrb) -> None:
133135
cost = await async_client.customers.costs.list(
134136
customer_id="customer_id",
137+
currency="currency",
135138
timeframe_end=parse_datetime("2022-03-01T05:00:00Z"),
136139
timeframe_start=parse_datetime("2022-02-01T05:00:00Z"),
137140
view_mode="periodic",
@@ -180,6 +183,7 @@ async def test_method_list_by_external_id(self, async_client: AsyncOrb) -> None:
180183
async def test_method_list_by_external_id_with_all_params(self, async_client: AsyncOrb) -> None:
181184
cost = await async_client.customers.costs.list_by_external_id(
182185
external_customer_id="external_customer_id",
186+
currency="currency",
183187
timeframe_end=parse_datetime("2022-03-01T05:00:00Z"),
184188
timeframe_start=parse_datetime("2022-02-01T05:00:00Z"),
185189
view_mode="periodic",

tests/api_resources/test_subscriptions.py

+2
Original file line numberDiff line numberDiff line change
@@ -320,6 +320,7 @@ def test_method_fetch_costs(self, client: Orb) -> None:
320320
def test_method_fetch_costs_with_all_params(self, client: Orb) -> None:
321321
subscription = client.subscriptions.fetch_costs(
322322
subscription_id="subscription_id",
323+
currency="currency",
323324
timeframe_end=parse_datetime("2022-03-01T05:00:00Z"),
324325
timeframe_start=parse_datetime("2022-02-01T05:00:00Z"),
325326
view_mode="periodic",
@@ -1436,6 +1437,7 @@ async def test_method_fetch_costs(self, async_client: AsyncOrb) -> None:
14361437
async def test_method_fetch_costs_with_all_params(self, async_client: AsyncOrb) -> None:
14371438
subscription = await async_client.subscriptions.fetch_costs(
14381439
subscription_id="subscription_id",
1440+
currency="currency",
14391441
timeframe_end=parse_datetime("2022-03-01T05:00:00Z"),
14401442
timeframe_start=parse_datetime("2022-02-01T05:00:00Z"),
14411443
view_mode="periodic",

0 commit comments

Comments
 (0)