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.30.0"
".": "4.31.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-ef726ad139fa29757029206ee08150434fc6c52005fec6d42c7d2bcd3aa7ab47.yml
openapi_spec_hash: e622beb7c26f9b0dd641bd5c92735a5b
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-faf1f7c723d2762f09e9690ef2ceda58cb0a6ddacf1a79c3754871b90e7db0dc.yml
openapi_spec_hash: 22269f85fae1ec920bdb0b32435a7aa8
config_hash: dd4343ce95871032ef6e0735a4ca038c
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
# Changelog

## 4.31.0 (2025-10-30)

Full Changelog: [v4.30.0...v4.31.0](https://github.com/orbcorp/orb-python/compare/v4.30.0...v4.31.0)

### Features

* **api:** api update ([2e76c33](https://github.com/orbcorp/orb-python/commit/2e76c33df34aee39ee5481aab71b9dfbbf697c68))


### Chores

* **internal/tests:** avoid race condition with implicit client cleanup ([d97e48e](https://github.com/orbcorp/orb-python/commit/d97e48edcb33561eb7fc2d8a307ea94be8ac3d9d))

## 4.30.0 (2025-10-29)

Full Changelog: [v4.29.1...v4.30.0](https://github.com/orbcorp/orb-python/compare/v4.29.1...v4.30.0)
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "orb-billing"
version = "4.30.0"
version = "4.31.0"
description = "The official Python library for the orb API"
dynamic = ["readme"]
license = "Apache-2.0"
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.30.0" # x-release-please-version
__version__ = "4.31.0" # x-release-please-version
30 changes: 20 additions & 10 deletions src/orb/resources/invoices.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ def update(
invoice_id: str,
*,
due_date: Union[Union[str, date], Union[str, datetime], None] | Omit = omit,
invoice_date: Union[Union[str, date], Union[str, datetime], None] | Omit = omit,
metadata: Optional[Dict[str, Optional[str]]] | Omit = omit,
net_terms: Optional[int] | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
Expand All @@ -165,17 +166,20 @@ def update(
idempotency_key: str | None = None,
) -> Invoice:
"""
This endpoint allows you to update the `metadata`, `net_terms`, and `due_date`
properties on an invoice. If you pass null for the metadata value, it will clear
any existing metadata for that invoice.
This endpoint allows you to update the `metadata`, `net_terms`, `due_date`, and
`invoice_date` properties on an invoice. If you pass null for the metadata
value, it will clear any existing metadata for that invoice.

`metadata` can be modified regardless of invoice state. `net_terms` and
`due_date` can only be modified if the invoice is in a `draft` state.
`metadata` can be modified regardless of invoice state. `net_terms`, `due_date`,
and `invoice_date` can only be modified if the invoice is in a `draft` state.
`invoice_date` can only be modified for non-subscription invoices.

Args:
due_date: An optional custom due date for the invoice. If not set, the due date will be
calculated based on the `net_terms` value.

invoice_date: The date of the invoice. Can only be modified for one-off draft invoices.

metadata: User-specified key/value pairs for the resource. Individual keys can be removed
by setting the value to `null`, and the entire metadata mapping can be cleared
by setting `metadata` to `null`.
Expand Down Expand Up @@ -203,6 +207,7 @@ def update(
body=maybe_transform(
{
"due_date": due_date,
"invoice_date": invoice_date,
"metadata": metadata,
"net_terms": net_terms,
},
Expand Down Expand Up @@ -719,6 +724,7 @@ async def update(
invoice_id: str,
*,
due_date: Union[Union[str, date], Union[str, datetime], None] | Omit = omit,
invoice_date: Union[Union[str, date], Union[str, datetime], None] | Omit = omit,
metadata: Optional[Dict[str, Optional[str]]] | Omit = omit,
net_terms: Optional[int] | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
Expand All @@ -730,17 +736,20 @@ async def update(
idempotency_key: str | None = None,
) -> Invoice:
"""
This endpoint allows you to update the `metadata`, `net_terms`, and `due_date`
properties on an invoice. If you pass null for the metadata value, it will clear
any existing metadata for that invoice.
This endpoint allows you to update the `metadata`, `net_terms`, `due_date`, and
`invoice_date` properties on an invoice. If you pass null for the metadata
value, it will clear any existing metadata for that invoice.

`metadata` can be modified regardless of invoice state. `net_terms` and
`due_date` can only be modified if the invoice is in a `draft` state.
`metadata` can be modified regardless of invoice state. `net_terms`, `due_date`,
and `invoice_date` can only be modified if the invoice is in a `draft` state.
`invoice_date` can only be modified for non-subscription invoices.

Args:
due_date: An optional custom due date for the invoice. If not set, the due date will be
calculated based on the `net_terms` value.

invoice_date: The date of the invoice. Can only be modified for one-off draft invoices.

metadata: User-specified key/value pairs for the resource. Individual keys can be removed
by setting the value to `null`, and the entire metadata mapping can be cleared
by setting `metadata` to `null`.
Expand Down Expand Up @@ -768,6 +777,7 @@ async def update(
body=await async_maybe_transform(
{
"due_date": due_date,
"invoice_date": invoice_date,
"metadata": metadata,
"net_terms": net_terms,
},
Expand Down
3 changes: 3 additions & 0 deletions src/orb/types/invoice_update_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ class InvoiceUpdateParams(TypedDict, total=False):
If not set, the due date will be calculated based on the `net_terms` value.
"""

invoice_date: Annotated[Union[Union[str, date], Union[str, datetime], None], PropertyInfo(format="iso8601")]
"""The date of the invoice. Can only be modified for one-off draft invoices."""

metadata: Optional[Dict[str, Optional[str]]]
"""User-specified key/value pairs for the resource.

Expand Down
2 changes: 2 additions & 0 deletions tests/api_resources/test_invoices.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ def test_method_update_with_all_params(self, client: Orb) -> None:
invoice = client.invoices.update(
invoice_id="invoice_id",
due_date=parse_date("2023-09-22"),
invoice_date=parse_date("2023-09-22"),
metadata={"foo": "string"},
net_terms=0,
)
Expand Down Expand Up @@ -593,6 +594,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncOrb) -> No
invoice = await async_client.invoices.update(
invoice_id="invoice_id",
due_date=parse_date("2023-09-22"),
invoice_date=parse_date("2023-09-22"),
metadata={"foo": "string"},
net_terms=0,
)
Expand Down
Loading