diff --git a/.stats.yml b/.stats.yml index 99751cd5..fa5ec939 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 91 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-ad49a3b6fc150ac83a43f43b0b416847bbc36f3b9cb036d61e012ae8b0288c55.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-303379b9db577b964d46fe908e8226e95c60435b11ddd8685bf2fa99c57f4320.yml diff --git a/src/orb/resources/customers/costs.py b/src/orb/resources/customers/costs.py index 14ce1cb8..4315389e 100644 --- a/src/orb/resources/customers/costs.py +++ b/src/orb/resources/customers/costs.py @@ -38,6 +38,7 @@ def list( self, customer_id: str, *, + currency: Optional[str] | NotGiven = NOT_GIVEN, timeframe_end: Union[str, datetime, None] | NotGiven = NOT_GIVEN, timeframe_start: Union[str, datetime, None] | NotGiven = NOT_GIVEN, view_mode: Optional[Literal["periodic", "cumulative"]] | NotGiven = NOT_GIVEN, @@ -185,6 +186,8 @@ def list( `grouping_value` and `secondary_grouping_value` available. Args: + currency: The currency or custom pricing unit to use. + timeframe_end: Costs returned are exclusive of `timeframe_end`. timeframe_start: Costs returned are inclusive of `timeframe_start`. @@ -213,6 +216,7 @@ def list( timeout=timeout, query=maybe_transform( { + "currency": currency, "timeframe_end": timeframe_end, "timeframe_start": timeframe_start, "view_mode": view_mode, @@ -227,6 +231,7 @@ def list_by_external_id( self, external_customer_id: str, *, + currency: Optional[str] | NotGiven = NOT_GIVEN, timeframe_end: Union[str, datetime, None] | NotGiven = NOT_GIVEN, timeframe_start: Union[str, datetime, None] | NotGiven = NOT_GIVEN, view_mode: Optional[Literal["periodic", "cumulative"]] | NotGiven = NOT_GIVEN, @@ -374,6 +379,8 @@ def list_by_external_id( `grouping_value` and `secondary_grouping_value` available. Args: + currency: The currency or custom pricing unit to use. + timeframe_end: Costs returned are exclusive of `timeframe_end`. timeframe_start: Costs returned are inclusive of `timeframe_start`. @@ -404,6 +411,7 @@ def list_by_external_id( timeout=timeout, query=maybe_transform( { + "currency": currency, "timeframe_end": timeframe_end, "timeframe_start": timeframe_start, "view_mode": view_mode, @@ -428,6 +436,7 @@ async def list( self, customer_id: str, *, + currency: Optional[str] | NotGiven = NOT_GIVEN, timeframe_end: Union[str, datetime, None] | NotGiven = NOT_GIVEN, timeframe_start: Union[str, datetime, None] | NotGiven = NOT_GIVEN, view_mode: Optional[Literal["periodic", "cumulative"]] | NotGiven = NOT_GIVEN, @@ -575,6 +584,8 @@ async def list( `grouping_value` and `secondary_grouping_value` available. Args: + currency: The currency or custom pricing unit to use. + timeframe_end: Costs returned are exclusive of `timeframe_end`. timeframe_start: Costs returned are inclusive of `timeframe_start`. @@ -603,6 +614,7 @@ async def list( timeout=timeout, query=await async_maybe_transform( { + "currency": currency, "timeframe_end": timeframe_end, "timeframe_start": timeframe_start, "view_mode": view_mode, @@ -617,6 +629,7 @@ async def list_by_external_id( self, external_customer_id: str, *, + currency: Optional[str] | NotGiven = NOT_GIVEN, timeframe_end: Union[str, datetime, None] | NotGiven = NOT_GIVEN, timeframe_start: Union[str, datetime, None] | NotGiven = NOT_GIVEN, view_mode: Optional[Literal["periodic", "cumulative"]] | NotGiven = NOT_GIVEN, @@ -764,6 +777,8 @@ async def list_by_external_id( `grouping_value` and `secondary_grouping_value` available. Args: + currency: The currency or custom pricing unit to use. + timeframe_end: Costs returned are exclusive of `timeframe_end`. timeframe_start: Costs returned are inclusive of `timeframe_start`. @@ -794,6 +809,7 @@ async def list_by_external_id( timeout=timeout, query=await async_maybe_transform( { + "currency": currency, "timeframe_end": timeframe_end, "timeframe_start": timeframe_start, "view_mode": view_mode, diff --git a/src/orb/resources/subscriptions.py b/src/orb/resources/subscriptions.py index b8d75bf4..13a13180 100644 --- a/src/orb/resources/subscriptions.py +++ b/src/orb/resources/subscriptions.py @@ -832,6 +832,7 @@ def fetch_costs( self, subscription_id: str, *, + currency: Optional[str] | NotGiven = NOT_GIVEN, timeframe_end: Union[str, datetime, None] | NotGiven = NOT_GIVEN, timeframe_start: Union[str, datetime, None] | NotGiven = NOT_GIVEN, view_mode: Optional[Literal["periodic", "cumulative"]] | NotGiven = NOT_GIVEN, @@ -855,6 +856,8 @@ def fetch_costs( same day). Args: + currency: The currency or custom pricing unit to use. + timeframe_end: Costs returned are exclusive of `timeframe_end`. timeframe_start: Costs returned are inclusive of `timeframe_start`. @@ -883,6 +886,7 @@ def fetch_costs( timeout=timeout, query=maybe_transform( { + "currency": currency, "timeframe_end": timeframe_end, "timeframe_start": timeframe_start, "view_mode": view_mode, @@ -2557,6 +2561,7 @@ async def fetch_costs( self, subscription_id: str, *, + currency: Optional[str] | NotGiven = NOT_GIVEN, timeframe_end: Union[str, datetime, None] | NotGiven = NOT_GIVEN, timeframe_start: Union[str, datetime, None] | NotGiven = NOT_GIVEN, view_mode: Optional[Literal["periodic", "cumulative"]] | NotGiven = NOT_GIVEN, @@ -2580,6 +2585,8 @@ async def fetch_costs( same day). Args: + currency: The currency or custom pricing unit to use. + timeframe_end: Costs returned are exclusive of `timeframe_end`. timeframe_start: Costs returned are inclusive of `timeframe_start`. @@ -2608,6 +2615,7 @@ async def fetch_costs( timeout=timeout, query=await async_maybe_transform( { + "currency": currency, "timeframe_end": timeframe_end, "timeframe_start": timeframe_start, "view_mode": view_mode, diff --git a/src/orb/types/customers/cost_list_by_external_id_params.py b/src/orb/types/customers/cost_list_by_external_id_params.py index 9455e18e..dad37e47 100644 --- a/src/orb/types/customers/cost_list_by_external_id_params.py +++ b/src/orb/types/customers/cost_list_by_external_id_params.py @@ -12,6 +12,9 @@ class CostListByExternalIDParams(TypedDict, total=False): + currency: Optional[str] + """The currency or custom pricing unit to use.""" + timeframe_end: Annotated[Union[str, datetime, None], PropertyInfo(format="iso8601")] """Costs returned are exclusive of `timeframe_end`.""" diff --git a/src/orb/types/customers/cost_list_params.py b/src/orb/types/customers/cost_list_params.py index 041cf861..741fd8d9 100644 --- a/src/orb/types/customers/cost_list_params.py +++ b/src/orb/types/customers/cost_list_params.py @@ -12,6 +12,9 @@ class CostListParams(TypedDict, total=False): + currency: Optional[str] + """The currency or custom pricing unit to use.""" + timeframe_end: Annotated[Union[str, datetime, None], PropertyInfo(format="iso8601")] """Costs returned are exclusive of `timeframe_end`.""" diff --git a/src/orb/types/subscription_fetch_costs_params.py b/src/orb/types/subscription_fetch_costs_params.py index b929aad3..38266115 100644 --- a/src/orb/types/subscription_fetch_costs_params.py +++ b/src/orb/types/subscription_fetch_costs_params.py @@ -12,6 +12,9 @@ class SubscriptionFetchCostsParams(TypedDict, total=False): + currency: Optional[str] + """The currency or custom pricing unit to use.""" + timeframe_end: Annotated[Union[str, datetime, None], PropertyInfo(format="iso8601")] """Costs returned are exclusive of `timeframe_end`.""" diff --git a/tests/api_resources/customers/test_costs.py b/tests/api_resources/customers/test_costs.py index e9e1afa2..17d95e60 100644 --- a/tests/api_resources/customers/test_costs.py +++ b/tests/api_resources/customers/test_costs.py @@ -32,6 +32,7 @@ def test_method_list(self, client: Orb) -> None: def test_method_list_with_all_params(self, client: Orb) -> None: cost = client.customers.costs.list( customer_id="customer_id", + currency="currency", timeframe_end=parse_datetime("2022-03-01T05:00:00Z"), timeframe_start=parse_datetime("2022-02-01T05:00:00Z"), view_mode="periodic", @@ -80,6 +81,7 @@ def test_method_list_by_external_id(self, client: Orb) -> None: def test_method_list_by_external_id_with_all_params(self, client: Orb) -> None: cost = client.customers.costs.list_by_external_id( external_customer_id="external_customer_id", + currency="currency", timeframe_end=parse_datetime("2022-03-01T05:00:00Z"), timeframe_start=parse_datetime("2022-02-01T05:00:00Z"), view_mode="periodic", @@ -132,6 +134,7 @@ async def test_method_list(self, async_client: AsyncOrb) -> None: async def test_method_list_with_all_params(self, async_client: AsyncOrb) -> None: cost = await async_client.customers.costs.list( customer_id="customer_id", + currency="currency", timeframe_end=parse_datetime("2022-03-01T05:00:00Z"), timeframe_start=parse_datetime("2022-02-01T05:00:00Z"), view_mode="periodic", @@ -180,6 +183,7 @@ async def test_method_list_by_external_id(self, async_client: AsyncOrb) -> None: async def test_method_list_by_external_id_with_all_params(self, async_client: AsyncOrb) -> None: cost = await async_client.customers.costs.list_by_external_id( external_customer_id="external_customer_id", + currency="currency", timeframe_end=parse_datetime("2022-03-01T05:00:00Z"), timeframe_start=parse_datetime("2022-02-01T05:00:00Z"), view_mode="periodic", diff --git a/tests/api_resources/test_subscriptions.py b/tests/api_resources/test_subscriptions.py index 2e7e9a7d..c60435d6 100644 --- a/tests/api_resources/test_subscriptions.py +++ b/tests/api_resources/test_subscriptions.py @@ -320,6 +320,7 @@ def test_method_fetch_costs(self, client: Orb) -> None: def test_method_fetch_costs_with_all_params(self, client: Orb) -> None: subscription = client.subscriptions.fetch_costs( subscription_id="subscription_id", + currency="currency", timeframe_end=parse_datetime("2022-03-01T05:00:00Z"), timeframe_start=parse_datetime("2022-02-01T05:00:00Z"), view_mode="periodic", @@ -1436,6 +1437,7 @@ async def test_method_fetch_costs(self, async_client: AsyncOrb) -> None: async def test_method_fetch_costs_with_all_params(self, async_client: AsyncOrb) -> None: subscription = await async_client.subscriptions.fetch_costs( subscription_id="subscription_id", + currency="currency", timeframe_end=parse_datetime("2022-03-01T05:00:00Z"), timeframe_start=parse_datetime("2022-02-01T05:00:00Z"), view_mode="periodic",