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.53.0"
".": "4.54.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: 126
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-6aa83a816c15600a3d6d378d7804a345505c76726059c19369db4e7766a71cbd.yml
openapi_spec_hash: f283d730e5320f9595c3c0a5902f5cbb
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-c92fb451e13f157b3735f188acc8d57aa3adfbaac1683645e1ba4f432dd7a4f8.yml
openapi_spec_hash: dbcd87ecfbd3976eb3b99ec6f9fbc606
config_hash: bcf82bddb691f6be773ac6cae8c03b9a
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,20 @@
# Changelog

## 4.54.0 (2026-02-12)

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

### Features

* **api:** api update ([e19d0dd](https://github.com/orbcorp/orb-python/commit/e19d0dd64cbdd35e4df9a865863f27f4dbbaa947))


### Chores

* format all `api.md` files ([814eda2](https://github.com/orbcorp/orb-python/commit/814eda22555fe97fe641823f61389c2a673e913d))
* **internal:** codegen related update ([98c5208](https://github.com/orbcorp/orb-python/commit/98c5208b72deeb740f0e548fb89c61239f4b7492))
* **internal:** fix lint error on Python 3.14 ([ca05c35](https://github.com/orbcorp/orb-python/commit/ca05c357163d78a443aadc1648bf848ab7e6b9f0))

## 4.53.0 (2026-02-10)

Full Changelog: [v4.52.0...v4.53.0](https://github.com/orbcorp/orb-python/compare/v4.52.0...v4.53.0)
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "orb-billing"
version = "4.53.0"
version = "4.54.0"
description = "The official Python library for the orb API"
dynamic = ["readme"]
license = "Apache-2.0"
Expand Down Expand Up @@ -69,7 +69,7 @@ format = { chain = [
# run formatting again to fix any inconsistencies when imports are stripped
"format:ruff",
]}
"format:docs" = "python scripts/utils/ruffen-docs.py README.md api.md"
"format:docs" = "bash -c 'python scripts/utils/ruffen-docs.py README.md $(find . -type f -name api.md)'"
"format:ruff" = "ruff format"

"lint" = { chain = [
Expand Down
2 changes: 1 addition & 1 deletion src/orb/_utils/_compat.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def is_union(tp: Optional[Type[Any]]) -> bool:
else:
import types

return tp is Union or tp is types.UnionType
return tp is Union or tp is types.UnionType # type: ignore[comparison-overlap]


def is_typeddict(tp: Type[Any]) -> bool:
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.53.0" # x-release-please-version
__version__ = "4.54.0" # x-release-please-version
55 changes: 54 additions & 1 deletion src/orb/resources/customers/credits/credits.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

from __future__ import annotations

from typing import Optional
from typing import Union, Optional
from datetime import datetime

import httpx

Expand Down Expand Up @@ -71,6 +72,10 @@ def list(
*,
currency: Optional[str] | Omit = omit,
cursor: Optional[str] | Omit = omit,
effective_date_gt: Union[str, datetime, None] | Omit = omit,
effective_date_gte: Union[str, datetime, None] | Omit = omit,
effective_date_lt: Union[str, datetime, None] | Omit = omit,
effective_date_lte: Union[str, datetime, None] | Omit = omit,
include_all_blocks: bool | Omit = omit,
limit: 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 @@ -89,6 +94,11 @@ def list(
Note that `currency` defaults to credits if not specified. To use a real world
currency, set `currency` to an ISO 4217 string.

Results can be filtered by the block's `effective_date` using the
`effective_date[gte]`, `effective_date[gt]`, `effective_date[lt]`, and
`effective_date[lte]` query parameters. This filters on when the credit block
becomes effective, which may differ from creation time for backdated credits.

Args:
currency: The ledger currency or custom pricing unit to use.

Expand Down Expand Up @@ -122,6 +132,10 @@ def list(
{
"currency": currency,
"cursor": cursor,
"effective_date_gt": effective_date_gt,
"effective_date_gte": effective_date_gte,
"effective_date_lt": effective_date_lt,
"effective_date_lte": effective_date_lte,
"include_all_blocks": include_all_blocks,
"limit": limit,
},
Expand All @@ -137,6 +151,10 @@ def list_by_external_id(
*,
currency: Optional[str] | Omit = omit,
cursor: Optional[str] | Omit = omit,
effective_date_gt: Union[str, datetime, None] | Omit = omit,
effective_date_gte: Union[str, datetime, None] | Omit = omit,
effective_date_lt: Union[str, datetime, None] | Omit = omit,
effective_date_lte: Union[str, datetime, None] | Omit = omit,
include_all_blocks: bool | Omit = omit,
limit: 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 @@ -155,6 +173,11 @@ def list_by_external_id(
Note that `currency` defaults to credits if not specified. To use a real world
currency, set `currency` to an ISO 4217 string.

Results can be filtered by the block's `effective_date` using the
`effective_date[gte]`, `effective_date[gt]`, `effective_date[lt]`, and
`effective_date[lte]` query parameters. This filters on when the credit block
becomes effective, which may differ from creation time for backdated credits.

Args:
currency: The ledger currency or custom pricing unit to use.

Expand Down Expand Up @@ -190,6 +213,10 @@ def list_by_external_id(
{
"currency": currency,
"cursor": cursor,
"effective_date_gt": effective_date_gt,
"effective_date_gte": effective_date_gte,
"effective_date_lt": effective_date_lt,
"effective_date_lte": effective_date_lte,
"include_all_blocks": include_all_blocks,
"limit": limit,
},
Expand Down Expand Up @@ -234,6 +261,10 @@ def list(
*,
currency: Optional[str] | Omit = omit,
cursor: Optional[str] | Omit = omit,
effective_date_gt: Union[str, datetime, None] | Omit = omit,
effective_date_gte: Union[str, datetime, None] | Omit = omit,
effective_date_lt: Union[str, datetime, None] | Omit = omit,
effective_date_lte: Union[str, datetime, None] | Omit = omit,
include_all_blocks: bool | Omit = omit,
limit: 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 @@ -252,6 +283,11 @@ def list(
Note that `currency` defaults to credits if not specified. To use a real world
currency, set `currency` to an ISO 4217 string.

Results can be filtered by the block's `effective_date` using the
`effective_date[gte]`, `effective_date[gt]`, `effective_date[lt]`, and
`effective_date[lte]` query parameters. This filters on when the credit block
becomes effective, which may differ from creation time for backdated credits.

Args:
currency: The ledger currency or custom pricing unit to use.

Expand Down Expand Up @@ -285,6 +321,10 @@ def list(
{
"currency": currency,
"cursor": cursor,
"effective_date_gt": effective_date_gt,
"effective_date_gte": effective_date_gte,
"effective_date_lt": effective_date_lt,
"effective_date_lte": effective_date_lte,
"include_all_blocks": include_all_blocks,
"limit": limit,
},
Expand All @@ -300,6 +340,10 @@ def list_by_external_id(
*,
currency: Optional[str] | Omit = omit,
cursor: Optional[str] | Omit = omit,
effective_date_gt: Union[str, datetime, None] | Omit = omit,
effective_date_gte: Union[str, datetime, None] | Omit = omit,
effective_date_lt: Union[str, datetime, None] | Omit = omit,
effective_date_lte: Union[str, datetime, None] | Omit = omit,
include_all_blocks: bool | Omit = omit,
limit: 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 @@ -318,6 +362,11 @@ def list_by_external_id(
Note that `currency` defaults to credits if not specified. To use a real world
currency, set `currency` to an ISO 4217 string.

Results can be filtered by the block's `effective_date` using the
`effective_date[gte]`, `effective_date[gt]`, `effective_date[lt]`, and
`effective_date[lte]` query parameters. This filters on when the credit block
becomes effective, which may differ from creation time for backdated credits.

Args:
currency: The ledger currency or custom pricing unit to use.

Expand Down Expand Up @@ -353,6 +402,10 @@ def list_by_external_id(
{
"currency": currency,
"cursor": cursor,
"effective_date_gt": effective_date_gt,
"effective_date_gte": effective_date_gte,
"effective_date_lt": effective_date_lt,
"effective_date_lte": effective_date_lte,
"include_all_blocks": include_all_blocks,
"limit": limit,
},
Expand Down
4 changes: 2 additions & 2 deletions src/orb/resources/invoices.py
Original file line number Diff line number Diff line change
Expand Up @@ -519,7 +519,7 @@ def list_summary(
invoice_date_lte: Union[str, datetime, None] | Omit = omit,
is_recurring: Optional[bool] | Omit = omit,
limit: int | Omit = omit,
status: Optional[List[Literal["draft", "issued", "paid", "synced", "void"]]] | Omit = omit,
status: Optional[Literal["draft", "issued", "paid", "synced", "void"]] | Omit = omit,
subscription_id: Optional[str] | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
Expand Down Expand Up @@ -1239,7 +1239,7 @@ def list_summary(
invoice_date_lte: Union[str, datetime, None] | Omit = omit,
is_recurring: Optional[bool] | Omit = omit,
limit: int | Omit = omit,
status: Optional[List[Literal["draft", "issued", "paid", "synced", "void"]]] | Omit = omit,
status: Optional[Literal["draft", "issued", "paid", "synced", "void"]] | Omit = omit,
subscription_id: Optional[str] | Omit = omit,
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
Expand Down
10 changes: 9 additions & 1 deletion src/orb/types/credit_block_retrieve_response.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

from typing import List, Optional
from typing import Dict, List, Optional
from datetime import datetime
from typing_extensions import Literal

Expand Down Expand Up @@ -35,6 +35,14 @@ class CreditBlockRetrieveResponse(BaseModel):

maximum_initial_balance: Optional[float] = None

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

If not present, this defaults to an empty dictionary. Individual keys can be
removed by setting the value to `null`, and the entire metadata mapping can be
cleared by setting `metadata` to `null`.
"""

per_unit_cost_basis: Optional[str] = None

status: Literal["active", "pending_payment"]
19 changes: 17 additions & 2 deletions src/orb/types/customers/credit_list_by_external_id_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,11 @@

from __future__ import annotations

from typing import Optional
from typing_extensions import TypedDict
from typing import Union, Optional
from datetime import datetime
from typing_extensions import Annotated, TypedDict

from ..._utils import PropertyInfo

__all__ = ["CreditListByExternalIDParams"]

Expand All @@ -19,6 +22,18 @@ class CreditListByExternalIDParams(TypedDict, total=False):
request.
"""

effective_date_gt: Annotated[Union[str, datetime, None], PropertyInfo(alias="effective_date[gt]", format="iso8601")]

effective_date_gte: Annotated[
Union[str, datetime, None], PropertyInfo(alias="effective_date[gte]", format="iso8601")
]

effective_date_lt: Annotated[Union[str, datetime, None], PropertyInfo(alias="effective_date[lt]", format="iso8601")]

effective_date_lte: Annotated[
Union[str, datetime, None], PropertyInfo(alias="effective_date[lte]", format="iso8601")
]

include_all_blocks: bool
"""
If set to True, all expired and depleted blocks, as well as active block will be
Expand Down
10 changes: 9 additions & 1 deletion src/orb/types/customers/credit_list_by_external_id_response.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

from typing import List, Optional
from typing import Dict, List, Optional
from datetime import datetime
from typing_extensions import Literal

Expand Down Expand Up @@ -35,6 +35,14 @@ class CreditListByExternalIDResponse(BaseModel):

maximum_initial_balance: Optional[float] = None

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

If not present, this defaults to an empty dictionary. Individual keys can be
removed by setting the value to `null`, and the entire metadata mapping can be
cleared by setting `metadata` to `null`.
"""

per_unit_cost_basis: Optional[str] = None

status: Literal["active", "pending_payment"]
19 changes: 17 additions & 2 deletions src/orb/types/customers/credit_list_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,11 @@

from __future__ import annotations

from typing import Optional
from typing_extensions import TypedDict
from typing import Union, Optional
from datetime import datetime
from typing_extensions import Annotated, TypedDict

from ..._utils import PropertyInfo

__all__ = ["CreditListParams"]

Expand All @@ -19,6 +22,18 @@ class CreditListParams(TypedDict, total=False):
request.
"""

effective_date_gt: Annotated[Union[str, datetime, None], PropertyInfo(alias="effective_date[gt]", format="iso8601")]

effective_date_gte: Annotated[
Union[str, datetime, None], PropertyInfo(alias="effective_date[gte]", format="iso8601")
]

effective_date_lt: Annotated[Union[str, datetime, None], PropertyInfo(alias="effective_date[lt]", format="iso8601")]

effective_date_lte: Annotated[
Union[str, datetime, None], PropertyInfo(alias="effective_date[lte]", format="iso8601")
]

include_all_blocks: bool
"""
If set to True, all expired and depleted blocks, as well as active block will be
Expand Down
10 changes: 9 additions & 1 deletion src/orb/types/customers/credit_list_response.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

from typing import List, Optional
from typing import Dict, List, Optional
from datetime import datetime
from typing_extensions import Literal

Expand Down Expand Up @@ -35,6 +35,14 @@ class CreditListResponse(BaseModel):

maximum_initial_balance: Optional[float] = None

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

If not present, this defaults to an empty dictionary. Individual keys can be
removed by setting the value to `null`, and the entire metadata mapping can be
cleared by setting `metadata` to `null`.
"""

per_unit_cost_basis: Optional[str] = None

status: Literal["active", "pending_payment"]
4 changes: 2 additions & 2 deletions src/orb/types/invoice_list_summary_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from __future__ import annotations

from typing import List, Union, Optional
from typing import Union, Optional
from datetime import date, datetime
from typing_extensions import Literal, Annotated, TypedDict

Expand Down Expand Up @@ -58,6 +58,6 @@ class InvoiceListSummaryParams(TypedDict, total=False):
limit: int
"""The number of items to fetch. Defaults to 20."""

status: Optional[List[Literal["draft", "issued", "paid", "synced", "void"]]]
status: Optional[Literal["draft", "issued", "paid", "synced", "void"]]

subscription_id: Optional[str]
Loading