diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 803fec4a..a70954af 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "4.42.0" + ".": "4.43.0" } \ No newline at end of file diff --git a/.stats.yml b/.stats.yml index 9e11ba24..9629af67 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 118 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-e639b12e0daebce74f42d1f31f675bda4287b9c749dd7d4620a1e96a83343ec4.yml -openapi_spec_hash: 51eb3d47b25e299de670b2d52f5e9017 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-0ab0946487d1ee971683d894554494d9940010403874c0be724ffc3a82d696db.yml +openapi_spec_hash: 66b792328a4faee3c7659185accc3f0e config_hash: e6db17547fe854b1c240407cf4c6dc9e diff --git a/CHANGELOG.md b/CHANGELOG.md index ecede4dc..75dc0980 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,18 @@ # Changelog +## 4.43.0 (2025-11-25) + +Full Changelog: [v4.42.0...v4.43.0](https://github.com/orbcorp/orb-python/compare/v4.42.0...v4.43.0) + +### Features + +* **api:** api update ([db10b87](https://github.com/orbcorp/orb-python/commit/db10b87bf59ba633a0c3e278d5f1165a0c77d7ea)) + + +### Chores + +* add Python 3.14 classifier and testing ([159b9e5](https://github.com/orbcorp/orb-python/commit/159b9e55b84a78a92b34d4073f65dfb7b75a30e4)) + ## 4.42.0 (2025-11-18) Full Changelog: [v4.41.0...v4.42.0](https://github.com/orbcorp/orb-python/compare/v4.41.0...v4.42.0) diff --git a/pyproject.toml b/pyproject.toml index 845fb11e..03c574e5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "orb-billing" -version = "4.42.0" +version = "4.43.0" description = "The official Python library for the orb API" dynamic = ["readme"] license = "Apache-2.0" @@ -24,6 +24,7 @@ classifiers = [ "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", + "Programming Language :: Python :: 3.14", "Operating System :: OS Independent", "Operating System :: POSIX", "Operating System :: MacOS", diff --git a/src/orb/_version.py b/src/orb/_version.py index 497a54dd..7dc7e9de 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__ = "4.42.0" # x-release-please-version +__version__ = "4.43.0" # x-release-please-version diff --git a/src/orb/resources/subscriptions.py b/src/orb/resources/subscriptions.py index 8dcfbad7..14d6bc79 100644 --- a/src/orb/resources/subscriptions.py +++ b/src/orb/resources/subscriptions.py @@ -1316,9 +1316,8 @@ def price_intervals( credit note. Consider using this as a safety mechanism if you do not expect existing invoices to be changed. - can_defer_billing: If true, ending an in-arrears price interval mid-cycle will defer billing the - final line itemuntil the next scheduled invoice. If false, it will be billed on - its end date. If not provided, behaviorwill follow account default. + can_defer_billing: If set, the default value to use for added/edited price intervals with an + end_date set. edit: A list of price intervals to edit on the subscription. @@ -3408,9 +3407,8 @@ async def price_intervals( credit note. Consider using this as a safety mechanism if you do not expect existing invoices to be changed. - can_defer_billing: If true, ending an in-arrears price interval mid-cycle will defer billing the - final line itemuntil the next scheduled invoice. If false, it will be billed on - its end date. If not provided, behaviorwill follow account default. + can_defer_billing: If set, the default value to use for added/edited price intervals with an + end_date set. edit: A list of price intervals to edit on the subscription. diff --git a/src/orb/types/shared/new_allocation_price.py b/src/orb/types/shared/new_allocation_price.py index 7f0b019d..c2234fb6 100644 --- a/src/orb/types/shared/new_allocation_price.py +++ b/src/orb/types/shared/new_allocation_price.py @@ -44,3 +44,17 @@ class NewAllocationPrice(BaseModel): filters: Optional[List[Filter]] = None """The filters that determine which items the allocation applies to.""" + + item_id: Optional[str] = None + """ + The item ID that line items representing charges for this allocation will be + associated with. If not provided, the default allocation item for the currency + will be used (e.g. 'Included Allocation (USD)'). + """ + + per_unit_cost_basis: Optional[str] = None + """The (per-unit) cost basis of each created block. + + If non-zero, a customer will be invoiced according to the quantity and per unit + cost basis specified for the allocation each cadence. + """ diff --git a/src/orb/types/shared_params/new_allocation_price.py b/src/orb/types/shared_params/new_allocation_price.py index 155c85df..8d42e881 100644 --- a/src/orb/types/shared_params/new_allocation_price.py +++ b/src/orb/types/shared_params/new_allocation_price.py @@ -46,3 +46,17 @@ class NewAllocationPrice(TypedDict, total=False): filters: Optional[Iterable[Filter]] """The filters that determine which items the allocation applies to.""" + + item_id: Optional[str] + """ + The item ID that line items representing charges for this allocation will be + associated with. If not provided, the default allocation item for the currency + will be used (e.g. 'Included Allocation (USD)'). + """ + + per_unit_cost_basis: str + """The (per-unit) cost basis of each created block. + + If non-zero, a customer will be invoiced according to the quantity and per unit + cost basis specified for the allocation each cadence. + """ diff --git a/src/orb/types/subscription_price_intervals_params.py b/src/orb/types/subscription_price_intervals_params.py index f2575595..06df53fd 100644 --- a/src/orb/types/subscription_price_intervals_params.py +++ b/src/orb/types/subscription_price_intervals_params.py @@ -100,9 +100,8 @@ class SubscriptionPriceIntervalsParams(TypedDict, total=False): can_defer_billing: Optional[bool] """ - If true, ending an in-arrears price interval mid-cycle will defer billing the - final line itemuntil the next scheduled invoice. If false, it will be billed on - its end date. If not provided, behaviorwill follow account default. + If set, the default value to use for added/edited price intervals with an + end_date set. """ edit: Iterable[Edit] @@ -665,6 +664,13 @@ class Add(TypedDict, total=False): allocation_price: Optional[NewAllocationPrice] """The definition of a new allocation price to create and add to the subscription.""" + can_defer_billing: Optional[bool] + """ + If true, an in-arrears price interval ending mid-cycle will defer billing the + final line item until the next scheduled invoice. If false, it will be billed on + its end date. + """ + discounts: Optional[Iterable[AddDiscount]] """A list of discounts to initialize on the price interval.""" @@ -775,9 +781,9 @@ class Edit(TypedDict, total=False): can_defer_billing: Optional[bool] """ - If true, ending an in-arrears price interval mid-cycle will defer billing the + If true, an in-arrears price interval ending mid-cycle will defer billing the final line item until the next scheduled invoice. If false, it will be billed on - its end date. If not provided, behavior will follow account default. + its end date. """ end_date: Annotated[Union[Union[str, datetime], BillingCycleRelativeDate, None], PropertyInfo(format="iso8601")] diff --git a/tests/api_resources/beta/test_external_plan_id.py b/tests/api_resources/beta/test_external_plan_id.py index 6f7c409b..1cb8da82 100644 --- a/tests/api_resources/beta/test_external_plan_id.py +++ b/tests/api_resources/beta/test_external_plan_id.py @@ -70,6 +70,8 @@ def test_method_create_plan_version_with_all_params(self, client: Orb) -> None: "values": ["string"], } ], + "item_id": "item_id", + "per_unit_cost_basis": "per_unit_cost_basis", }, "plan_phase_order": 0, "price": { @@ -164,6 +166,8 @@ def test_method_create_plan_version_with_all_params(self, client: Orb) -> None: "values": ["string"], } ], + "item_id": "item_id", + "per_unit_cost_basis": "per_unit_cost_basis", }, "plan_phase_order": 0, "price": { @@ -391,6 +395,8 @@ async def test_method_create_plan_version_with_all_params(self, async_client: As "values": ["string"], } ], + "item_id": "item_id", + "per_unit_cost_basis": "per_unit_cost_basis", }, "plan_phase_order": 0, "price": { @@ -485,6 +491,8 @@ async def test_method_create_plan_version_with_all_params(self, async_client: As "values": ["string"], } ], + "item_id": "item_id", + "per_unit_cost_basis": "per_unit_cost_basis", }, "plan_phase_order": 0, "price": { diff --git a/tests/api_resources/test_beta.py b/tests/api_resources/test_beta.py index 3a683691..37e631fb 100644 --- a/tests/api_resources/test_beta.py +++ b/tests/api_resources/test_beta.py @@ -70,6 +70,8 @@ def test_method_create_plan_version_with_all_params(self, client: Orb) -> None: "values": ["string"], } ], + "item_id": "item_id", + "per_unit_cost_basis": "per_unit_cost_basis", }, "plan_phase_order": 0, "price": { @@ -164,6 +166,8 @@ def test_method_create_plan_version_with_all_params(self, client: Orb) -> None: "values": ["string"], } ], + "item_id": "item_id", + "per_unit_cost_basis": "per_unit_cost_basis", }, "plan_phase_order": 0, "price": { @@ -391,6 +395,8 @@ async def test_method_create_plan_version_with_all_params(self, async_client: As "values": ["string"], } ], + "item_id": "item_id", + "per_unit_cost_basis": "per_unit_cost_basis", }, "plan_phase_order": 0, "price": { @@ -485,6 +491,8 @@ async def test_method_create_plan_version_with_all_params(self, async_client: As "values": ["string"], } ], + "item_id": "item_id", + "per_unit_cost_basis": "per_unit_cost_basis", }, "plan_phase_order": 0, "price": { diff --git a/tests/api_resources/test_plans.py b/tests/api_resources/test_plans.py index 82650993..2a89638b 100644 --- a/tests/api_resources/test_plans.py +++ b/tests/api_resources/test_plans.py @@ -51,6 +51,8 @@ def test_method_create_with_all_params(self, client: Orb) -> None: "values": ["string"], } ], + "item_id": "item_id", + "per_unit_cost_basis": "per_unit_cost_basis", }, "plan_phase_order": 0, "price": { @@ -318,6 +320,8 @@ async def test_method_create_with_all_params(self, async_client: AsyncOrb) -> No "values": ["string"], } ], + "item_id": "item_id", + "per_unit_cost_basis": "per_unit_cost_basis", }, "plan_phase_order": 0, "price": { diff --git a/tests/api_resources/test_subscriptions.py b/tests/api_resources/test_subscriptions.py index ab0b6ad0..47c46c03 100644 --- a/tests/api_resources/test_subscriptions.py +++ b/tests/api_resources/test_subscriptions.py @@ -75,6 +75,8 @@ def test_method_create_with_all_params(self, client: Orb) -> None: "values": ["string"], } ], + "item_id": "item_id", + "per_unit_cost_basis": "per_unit_cost_basis", }, "discounts": [ { @@ -205,6 +207,8 @@ def test_method_create_with_all_params(self, client: Orb) -> None: "values": ["string"], } ], + "item_id": "item_id", + "per_unit_cost_basis": "per_unit_cost_basis", }, "discounts": [ { @@ -657,7 +661,10 @@ def test_method_price_intervals_with_all_params(self, client: Orb) -> None: "values": ["string"], } ], + "item_id": "item_id", + "per_unit_cost_basis": "per_unit_cost_basis", }, + "can_defer_billing": True, "discounts": [ { "amount_discount": 0, @@ -910,6 +917,8 @@ def test_method_schedule_plan_change_with_all_params(self, client: Orb) -> None: "values": ["string"], } ], + "item_id": "item_id", + "per_unit_cost_basis": "per_unit_cost_basis", }, "discounts": [ { @@ -1033,6 +1042,8 @@ def test_method_schedule_plan_change_with_all_params(self, client: Orb) -> None: "values": ["string"], } ], + "item_id": "item_id", + "per_unit_cost_basis": "per_unit_cost_basis", }, "discounts": [ { @@ -1454,6 +1465,8 @@ async def test_method_create_with_all_params(self, async_client: AsyncOrb) -> No "values": ["string"], } ], + "item_id": "item_id", + "per_unit_cost_basis": "per_unit_cost_basis", }, "discounts": [ { @@ -1584,6 +1597,8 @@ async def test_method_create_with_all_params(self, async_client: AsyncOrb) -> No "values": ["string"], } ], + "item_id": "item_id", + "per_unit_cost_basis": "per_unit_cost_basis", }, "discounts": [ { @@ -2036,7 +2051,10 @@ async def test_method_price_intervals_with_all_params(self, async_client: AsyncO "values": ["string"], } ], + "item_id": "item_id", + "per_unit_cost_basis": "per_unit_cost_basis", }, + "can_defer_billing": True, "discounts": [ { "amount_discount": 0, @@ -2289,6 +2307,8 @@ async def test_method_schedule_plan_change_with_all_params(self, async_client: A "values": ["string"], } ], + "item_id": "item_id", + "per_unit_cost_basis": "per_unit_cost_basis", }, "discounts": [ { @@ -2412,6 +2432,8 @@ async def test_method_schedule_plan_change_with_all_params(self, async_client: A "values": ["string"], } ], + "item_id": "item_id", + "per_unit_cost_basis": "per_unit_cost_basis", }, "discounts": [ {