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.27.0"
".": "4.28.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-2b5eeb4a60cbec92f80b4a54f33c2d17b36cbac4739886f737108f2ad74ff12d.yml
openapi_spec_hash: ebbe8419f5831506de5b4c0b4eb56acf
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-828c91953d2351040fdd4d90a3d9eafd09f9d240c4f6ce0441b7a10c06c1c722.yml
openapi_spec_hash: c82bc88563f80f600e59e22014d4cec4
config_hash: 1f73a949b649ecfe6ec68ba1bb459dc2
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
# Changelog

## 4.28.0 (2025-10-17)

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

### Features

* **api:** api update ([7d3610c](https://github.com/orbcorp/orb-python/commit/7d3610c1cfb01912098febdfce8148e36811fac5))


### Chores

* bump `httpx-aiohttp` version to 0.1.9 ([e5d3c14](https://github.com/orbcorp/orb-python/commit/e5d3c14ead233cb6a49277d20fc1a71123a7a744))

## 4.27.0 (2025-10-15)

Full Changelog: [v4.26.0...v4.27.0](https://github.com/orbcorp/orb-python/compare/v4.26.0...v4.27.0)
Expand Down
1 change: 0 additions & 1 deletion api.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,6 @@ from orb.types import (
TierSubLineItem,
TieredConfig,
TieredConversionRateConfig,
TransformPriceFilter,
TrialDiscount,
UnitConfig,
UnitConversionRateConfig,
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.27.0"
version = "4.28.0"
description = "The official Python library for the orb API"
dynamic = ["readme"]
license = "Apache-2.0"
Expand Down Expand Up @@ -39,7 +39,7 @@ Homepage = "https://github.com/orbcorp/orb-python"
Repository = "https://github.com/orbcorp/orb-python"

[project.optional-dependencies]
aiohttp = ["aiohttp", "httpx_aiohttp>=0.1.8"]
aiohttp = ["aiohttp", "httpx_aiohttp>=0.1.9"]

[tool.rye]
managed = true
Expand Down
2 changes: 1 addition & 1 deletion requirements-dev.lock
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ httpx==0.28.1
# via httpx-aiohttp
# via orb-billing
# via respx
httpx-aiohttp==0.1.8
httpx-aiohttp==0.1.9
# via orb-billing
idna==3.4
# via anyio
Expand Down
2 changes: 1 addition & 1 deletion requirements.lock
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ httpcore==1.0.9
httpx==0.28.1
# via httpx-aiohttp
# via orb-billing
httpx-aiohttp==0.1.8
httpx-aiohttp==0.1.9
# via orb-billing
idna==3.4
# via anyio
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.27.0" # x-release-please-version
__version__ = "4.28.0" # x-release-please-version
1 change: 0 additions & 1 deletion src/orb/types/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@
NewFloatingBulkPrice as NewFloatingBulkPrice,
NewFloatingUnitPrice as NewFloatingUnitPrice,
SubscriptionMinified as SubscriptionMinified,
TransformPriceFilter as TransformPriceFilter,
NewPercentageDiscount as NewPercentageDiscount,
SubscriptionTrialInfo as SubscriptionTrialInfo,
UsageDiscountInterval as UsageDiscountInterval,
Expand Down
14 changes: 14 additions & 0 deletions src/orb/types/beta/external_plan_id_create_plan_version_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -542,6 +542,13 @@ class AddPricePriceNewPlanEventOutputPriceEventOutputConfig(TypedDict, total=Fal
unit_rating_key: Required[str]
"""The key in the event data to extract the unit rate from."""

default_unit_rate: Optional[str]
"""
If provided, this amount will be used as the unit rate when an event does not
have a value for the `unit_rating_key`. If not provided, events missing a unit
rate will be ignored.
"""

grouping_key: Optional[str]
"""An optional key in the event data to group by (e.g., event ID).

Expand Down Expand Up @@ -1121,6 +1128,13 @@ class ReplacePricePriceNewPlanEventOutputPriceEventOutputConfig(TypedDict, total
unit_rating_key: Required[str]
"""The key in the event data to extract the unit rate from."""

default_unit_rate: Optional[str]
"""
If provided, this amount will be used as the unit rate when an event does not
have a value for the `unit_rating_key`. If not provided, events missing a unit
rate will be ignored.
"""

grouping_key: Optional[str]
"""An optional key in the event data to group by (e.g., event ID).

Expand Down
14 changes: 14 additions & 0 deletions src/orb/types/beta_create_plan_version_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -542,6 +542,13 @@ class AddPricePriceNewPlanEventOutputPriceEventOutputConfig(TypedDict, total=Fal
unit_rating_key: Required[str]
"""The key in the event data to extract the unit rate from."""

default_unit_rate: Optional[str]
"""
If provided, this amount will be used as the unit rate when an event does not
have a value for the `unit_rating_key`. If not provided, events missing a unit
rate will be ignored.
"""

grouping_key: Optional[str]
"""An optional key in the event data to group by (e.g., event ID).

Expand Down Expand Up @@ -1121,6 +1128,13 @@ class ReplacePricePriceNewPlanEventOutputPriceEventOutputConfig(TypedDict, total
unit_rating_key: Required[str]
"""The key in the event data to extract the unit rate from."""

default_unit_rate: Optional[str]
"""
If provided, this amount will be used as the unit rate when an event does not
have a value for the `unit_rating_key`. If not provided, events missing a unit
rate will be ignored.
"""

grouping_key: Optional[str]
"""An optional key in the event data to group by (e.g., event ID).

Expand Down
18 changes: 16 additions & 2 deletions src/orb/types/customers/credits/affected_block.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,30 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

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

from ...._models import BaseModel

__all__ = ["AffectedBlock"]
__all__ = ["AffectedBlock", "BlockFilter"]


class BlockFilter(BaseModel):
field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
"""The property of the price to filter on."""

operator: Literal["includes", "excludes"]
"""Should prices that match the filter be included or excluded."""

values: List[str]
"""The IDs or values that match this filter."""


class AffectedBlock(BaseModel):
id: str

block_filters: Optional[List[BlockFilter]] = None

expiry_date: Optional[datetime] = None

per_unit_cost_basis: Optional[str] = None
7 changes: 7 additions & 0 deletions src/orb/types/plan_create_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -535,6 +535,13 @@ class PricePriceNewPlanEventOutputPriceEventOutputConfig(TypedDict, total=False)
unit_rating_key: Required[str]
"""The key in the event data to extract the unit rate from."""

default_unit_rate: Optional[str]
"""
If provided, this amount will be used as the unit rate when an event does not
have a value for the `unit_rating_key`. If not provided, events missing a unit
rate will be ignored.
"""

grouping_key: Optional[str]
"""An optional key in the event data to group by (e.g., event ID).

Expand Down
7 changes: 7 additions & 0 deletions src/orb/types/price_create_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -2862,6 +2862,13 @@ class NewFloatingEventOutputPriceEventOutputConfig(TypedDict, total=False):
unit_rating_key: Required[str]
"""The key in the event data to extract the unit rate from."""

default_unit_rate: Optional[str]
"""
If provided, this amount will be used as the unit rate when an event does not
have a value for the `unit_rating_key`. If not provided, events missing a unit
rate will be ignored.
"""

grouping_key: Optional[str]
"""An optional key in the event data to group by (e.g., event ID).

Expand Down
7 changes: 7 additions & 0 deletions src/orb/types/price_evaluate_multiple_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -365,6 +365,13 @@ class PriceEvaluationPriceNewFloatingEventOutputPriceEventOutputConfig(TypedDict
unit_rating_key: Required[str]
"""The key in the event data to extract the unit rate from."""

default_unit_rate: Optional[str]
"""
If provided, this amount will be used as the unit rate when an event does not
have a value for the `unit_rating_key`. If not provided, events missing a unit
rate will be ignored.
"""

grouping_key: Optional[str]
"""An optional key in the event data to group by (e.g., event ID).

Expand Down
7 changes: 7 additions & 0 deletions src/orb/types/price_evaluate_preview_events_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -397,6 +397,13 @@ class PriceEvaluationPriceNewFloatingEventOutputPriceEventOutputConfig(TypedDict
unit_rating_key: Required[str]
"""The key in the event data to extract the unit rate from."""

default_unit_rate: Optional[str]
"""
If provided, this amount will be used as the unit rate when an event does not
have a value for the `unit_rating_key`. If not provided, events missing a unit
rate will be ignored.
"""

grouping_key: Optional[str]
"""An optional key in the event data to group by (e.g., event ID).

Expand Down
1 change: 0 additions & 1 deletion src/orb/types/shared/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@
from .invoice_level_discount import InvoiceLevelDiscount as InvoiceLevelDiscount
from .new_plan_package_price import NewPlanPackagePrice as NewPlanPackagePrice
from .sub_line_item_grouping import SubLineItemGrouping as SubLineItemGrouping
from .transform_price_filter import TransformPriceFilter as TransformPriceFilter
from .new_floating_bulk_price import NewFloatingBulkPrice as NewFloatingBulkPrice
from .new_floating_unit_price import NewFloatingUnitPrice as NewFloatingUnitPrice
from .new_percentage_discount import NewPercentageDiscount as NewPercentageDiscount
Expand Down
16 changes: 13 additions & 3 deletions src/orb/types/shared/amount_discount.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,19 @@
from typing_extensions import Literal

from ..._models import BaseModel
from .transform_price_filter import TransformPriceFilter

__all__ = ["AmountDiscount"]
__all__ = ["AmountDiscount", "Filter"]


class Filter(BaseModel):
field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
"""The property of the price to filter on."""

operator: Literal["includes", "excludes"]
"""Should prices that match the filter be included or excluded."""

values: List[str]
"""The IDs or values that match this filter."""


class AmountDiscount(BaseModel):
Expand All @@ -21,7 +31,7 @@ class AmountDiscount(BaseModel):
For plan/plan phase discounts, this can be a subset of prices.
"""

filters: Optional[List[TransformPriceFilter]] = None
filters: Optional[List[Filter]] = None
"""The filters that determine which prices to apply this discount to."""

reason: Optional[str] = None
16 changes: 13 additions & 3 deletions src/orb/types/shared/amount_discount_interval.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,19 @@
from typing_extensions import Literal

from ..._models import BaseModel
from .transform_price_filter import TransformPriceFilter

__all__ = ["AmountDiscountInterval"]
__all__ = ["AmountDiscountInterval", "Filter"]


class Filter(BaseModel):
field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
"""The property of the price to filter on."""

operator: Literal["includes", "excludes"]
"""Should prices that match the filter be included or excluded."""

values: List[str]
"""The IDs or values that match this filter."""


class AmountDiscountInterval(BaseModel):
Expand All @@ -22,7 +32,7 @@ class AmountDiscountInterval(BaseModel):
end_date: Optional[datetime] = None
"""The end date of the discount interval."""

filters: List[TransformPriceFilter]
filters: List[Filter]
"""The filters that determine which prices this discount interval applies to."""

start_date: datetime
Expand Down
17 changes: 14 additions & 3 deletions src/orb/types/shared/maximum.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,22 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

from typing import List
from typing_extensions import Literal

from ..._models import BaseModel
from .transform_price_filter import TransformPriceFilter

__all__ = ["Maximum"]
__all__ = ["Maximum", "Filter"]


class Filter(BaseModel):
field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
"""The property of the price to filter on."""

operator: Literal["includes", "excludes"]
"""Should prices that match the filter be included or excluded."""

values: List[str]
"""The IDs or values that match this filter."""


class Maximum(BaseModel):
Expand All @@ -15,7 +26,7 @@ class Maximum(BaseModel):
For plan/plan phase maximums, this can be a subset of prices.
"""

filters: List[TransformPriceFilter]
filters: List[Filter]
"""The filters that determine which prices to apply this maximum to."""

maximum_amount: str
Expand Down
17 changes: 14 additions & 3 deletions src/orb/types/shared/maximum_interval.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,22 @@

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

from ..._models import BaseModel
from .transform_price_filter import TransformPriceFilter

__all__ = ["MaximumInterval"]
__all__ = ["MaximumInterval", "Filter"]


class Filter(BaseModel):
field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
"""The property of the price to filter on."""

operator: Literal["includes", "excludes"]
"""Should prices that match the filter be included or excluded."""

values: List[str]
"""The IDs or values that match this filter."""


class MaximumInterval(BaseModel):
Expand All @@ -16,7 +27,7 @@ class MaximumInterval(BaseModel):
end_date: Optional[datetime] = None
"""The end date of the maximum interval."""

filters: List[TransformPriceFilter]
filters: List[Filter]
"""The filters that determine which prices this maximum interval applies to."""

maximum_amount: str
Expand Down
Loading