diff --git a/.release-please-manifest.json b/.release-please-manifest.json index faa0df4e..82f5ad97 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "3.12.0" + ".": "3.13.0" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 280bf448..514f89a4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 3.13.0 (2025-03-05) + +Full Changelog: [v3.12.0...v3.13.0](https://github.com/orbcorp/orb-python/compare/v3.12.0...v3.13.0) + +### Features + +* **api:** manual updates ([#572](https://github.com/orbcorp/orb-python/issues/572)) ([6f728ae](https://github.com/orbcorp/orb-python/commit/6f728ae08a126538c82bc3c978f53462f0749d21)) + ## 3.12.0 (2025-03-05) Full Changelog: [v3.11.0...v3.12.0](https://github.com/orbcorp/orb-python/compare/v3.11.0...v3.12.0) diff --git a/api.md b/api.md index c1becb05..20c99565 100644 --- a/api.md +++ b/api.md @@ -19,6 +19,7 @@ from orb.types import ( ReplaceSubscriptionPriceParams, TrialDiscount, UpdatePriceRequestParams, + UsageDiscount, ) ``` diff --git a/pyproject.toml b/pyproject.toml index 3a441ffa..69bab280 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "orb-billing" -version = "3.12.0" +version = "3.13.0" description = "The official Python library for the orb API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/orb/_version.py b/src/orb/_version.py index acbe38bd..35fdc42a 100644 --- a/src/orb/_version.py +++ b/src/orb/_version.py @@ -1,4 +1,4 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. __title__ = "orb" -__version__ = "3.12.0" # x-release-please-version +__version__ = "3.13.0" # x-release-please-version diff --git a/src/orb/types/__init__.py b/src/orb/types/__init__.py index eb07f36d..7f695fb0 100644 --- a/src/orb/types/__init__.py +++ b/src/orb/types/__init__.py @@ -10,6 +10,7 @@ from .shared import ( Discount as Discount, TrialDiscount as TrialDiscount, + UsageDiscount as UsageDiscount, AmountDiscount as AmountDiscount, PaginationMetadata as PaginationMetadata, PercentageDiscount as PercentageDiscount, diff --git a/src/orb/types/shared/__init__.py b/src/orb/types/shared/__init__.py index 4f862f83..e7843b23 100644 --- a/src/orb/types/shared/__init__.py +++ b/src/orb/types/shared/__init__.py @@ -2,6 +2,7 @@ from .discount import Discount as Discount from .trial_discount import TrialDiscount as TrialDiscount +from .usage_discount import UsageDiscount as UsageDiscount from .amount_discount import AmountDiscount as AmountDiscount from .pagination_metadata import PaginationMetadata as PaginationMetadata from .percentage_discount import PercentageDiscount as PercentageDiscount diff --git a/src/orb/types/shared/discount.py b/src/orb/types/shared/discount.py index c2491612..b4e8df38 100644 --- a/src/orb/types/shared/discount.py +++ b/src/orb/types/shared/discount.py @@ -1,34 +1,15 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import List, Union, Optional -from typing_extensions import Literal, Annotated, TypeAlias +from typing import Union +from typing_extensions import Annotated, TypeAlias from ..._utils import PropertyInfo -from ..._models import BaseModel from .trial_discount import TrialDiscount +from .usage_discount import UsageDiscount from .amount_discount import AmountDiscount from .percentage_discount import PercentageDiscount -__all__ = ["Discount", "UsageDiscount"] - - -class UsageDiscount(BaseModel): - applies_to_price_ids: List[str] - """List of price_ids that this discount applies to. - - For plan/plan phase discounts, this can be a subset of prices. - """ - - discount_type: Literal["usage"] - - usage_discount: float - """Only available if discount_type is `usage`. - - Number of usage units that this discount is for - """ - - reason: Optional[str] = None - +__all__ = ["Discount"] Discount: TypeAlias = Annotated[ Union[PercentageDiscount, TrialDiscount, UsageDiscount, AmountDiscount], PropertyInfo(discriminator="discount_type") diff --git a/src/orb/types/shared/usage_discount.py b/src/orb/types/shared/usage_discount.py new file mode 100644 index 00000000..df1d2186 --- /dev/null +++ b/src/orb/types/shared/usage_discount.py @@ -0,0 +1,26 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import List, Optional +from typing_extensions import Literal + +from ..._models import BaseModel + +__all__ = ["UsageDiscount"] + + +class UsageDiscount(BaseModel): + applies_to_price_ids: List[str] + """List of price_ids that this discount applies to. + + For plan/plan phase discounts, this can be a subset of prices. + """ + + discount_type: Literal["usage"] + + usage_discount: float + """Only available if discount_type is `usage`. + + Number of usage units that this discount is for + """ + + reason: Optional[str] = None diff --git a/src/orb/types/shared_params/__init__.py b/src/orb/types/shared_params/__init__.py index ca6e4bc4..6b74220e 100644 --- a/src/orb/types/shared_params/__init__.py +++ b/src/orb/types/shared_params/__init__.py @@ -2,6 +2,7 @@ from .discount import Discount as Discount from .trial_discount import TrialDiscount as TrialDiscount +from .usage_discount import UsageDiscount as UsageDiscount from .amount_discount import AmountDiscount as AmountDiscount from .percentage_discount import PercentageDiscount as PercentageDiscount from .billing_cycle_relative_date import BillingCycleRelativeDate as BillingCycleRelativeDate diff --git a/src/orb/types/shared_params/discount.py b/src/orb/types/shared_params/discount.py index 93cbb8fd..06e817b3 100644 --- a/src/orb/types/shared_params/discount.py +++ b/src/orb/types/shared_params/discount.py @@ -2,32 +2,14 @@ from __future__ import annotations -from typing import List, Union, Optional -from typing_extensions import Literal, Required, TypeAlias, TypedDict +from typing import Union +from typing_extensions import TypeAlias from .trial_discount import TrialDiscount +from .usage_discount import UsageDiscount from .amount_discount import AmountDiscount from .percentage_discount import PercentageDiscount -__all__ = ["Discount", "UsageDiscount"] - - -class UsageDiscount(TypedDict, total=False): - applies_to_price_ids: Required[List[str]] - """List of price_ids that this discount applies to. - - For plan/plan phase discounts, this can be a subset of prices. - """ - - discount_type: Required[Literal["usage"]] - - usage_discount: Required[float] - """Only available if discount_type is `usage`. - - Number of usage units that this discount is for - """ - - reason: Optional[str] - +__all__ = ["Discount"] Discount: TypeAlias = Union[PercentageDiscount, TrialDiscount, UsageDiscount, AmountDiscount] diff --git a/src/orb/types/shared_params/usage_discount.py b/src/orb/types/shared_params/usage_discount.py new file mode 100644 index 00000000..091dd67d --- /dev/null +++ b/src/orb/types/shared_params/usage_discount.py @@ -0,0 +1,26 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing import List, Optional +from typing_extensions import Literal, Required, TypedDict + +__all__ = ["UsageDiscount"] + + +class UsageDiscount(TypedDict, total=False): + applies_to_price_ids: Required[List[str]] + """List of price_ids that this discount applies to. + + For plan/plan phase discounts, this can be a subset of prices. + """ + + discount_type: Required[Literal["usage"]] + + usage_discount: Required[float] + """Only available if discount_type is `usage`. + + Number of usage units that this discount is for + """ + + reason: Optional[str]