Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "4.42.0"
".": "4.43.0"
}
4 changes: 2 additions & 2 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -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
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -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"
Expand All @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion src/orb/_version.py
Original file line number Diff line number Diff line change
@@ -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
10 changes: 4 additions & 6 deletions src/orb/resources/subscriptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down Expand Up @@ -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.

Expand Down
14 changes: 14 additions & 0 deletions src/orb/types/shared/new_allocation_price.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
"""
14 changes: 14 additions & 0 deletions src/orb/types/shared_params/new_allocation_price.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
"""
16 changes: 11 additions & 5 deletions src/orb/types/subscription_price_intervals_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down Expand Up @@ -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."""

Expand Down Expand Up @@ -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")]
Expand Down
8 changes: 8 additions & 0 deletions tests/api_resources/beta/test_external_plan_id.py
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down Expand Up @@ -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": {
Expand Down Expand Up @@ -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": {
Expand Down Expand Up @@ -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": {
Expand Down
8 changes: 8 additions & 0 deletions tests/api_resources/test_beta.py
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down Expand Up @@ -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": {
Expand Down Expand Up @@ -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": {
Expand Down Expand Up @@ -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": {
Expand Down
4 changes: 4 additions & 0 deletions tests/api_resources/test_plans.py
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down Expand Up @@ -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": {
Expand Down
22 changes: 22 additions & 0 deletions tests/api_resources/test_subscriptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -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": [
{
Expand Down Expand Up @@ -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": [
{
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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": [
{
Expand Down Expand Up @@ -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": [
{
Expand Down Expand Up @@ -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": [
{
Expand Down Expand Up @@ -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": [
{
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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": [
{
Expand Down Expand Up @@ -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": [
{
Expand Down