From f31aeecc1618a721d3840250abc4676a3c30e660 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 29 Oct 2025 17:31:25 +0000 Subject: [PATCH 1/2] feat(api): api update --- .stats.yml | 4 +-- src/orb/resources/customers/customers.py | 24 +++++++++++++ src/orb/types/customer.py | 7 ++++ src/orb/types/customer_create_params.py | 28 ++++++++++++++- .../customer_update_by_external_id_params.py | 35 ++++++++++++++++++- src/orb/types/customer_update_params.py | 35 ++++++++++++++++++- .../types/customers/credits/affected_block.py | 8 ++--- .../new_avalara_tax_configuration_param.py | 7 ++++ .../types/new_sphere_configuration_param.py | 8 +++++ .../types/new_tax_jar_configuration_param.py | 8 +++++ src/orb/types/shared/allocation.py | 18 ++++++++-- tests/api_resources/test_customers.py | 10 ++++++ 12 files changed, 181 insertions(+), 11 deletions(-) diff --git a/.stats.yml b/.stats.yml index 4594d63a..33d3b469 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-cbce25283cb9c3282e03e08b7ee81395436af7d0eb480ffcbab307b5bf1c92a0.yml -openapi_spec_hash: c286edf46db95dee05eb6f180ac24ab0 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-ef726ad139fa29757029206ee08150434fc6c52005fec6d42c7d2bcd3aa7ab47.yml +openapi_spec_hash: e622beb7c26f9b0dd641bd5c92735a5b config_hash: dd4343ce95871032ef6e0735a4ca038c diff --git a/src/orb/resources/customers/customers.py b/src/orb/resources/customers/customers.py index 4c82a67f..c897b7c9 100644 --- a/src/orb/resources/customers/customers.py +++ b/src/orb/resources/customers/customers.py @@ -376,6 +376,7 @@ def update( additional_emails: Optional[SequenceNotStr[str]] | Omit = omit, auto_collection: Optional[bool] | Omit = omit, auto_issuance: Optional[bool] | Omit = omit, + automatic_tax_enabled: Optional[bool] | Omit = omit, billing_address: Optional[AddressInputParam] | Omit = omit, currency: Optional[str] | Omit = omit, email: Optional[str] | Omit = omit, @@ -420,6 +421,10 @@ def update( manual approval.If `null` is specified, the customer's auto issuance setting will be inherited from the account-level setting. + automatic_tax_enabled: Whether automatic tax calculation is enabled for this customer. When null, + inherits from account-level setting. When true or false, overrides the account + setting. + currency: An ISO 4217 currency string used for the customer's invoices and balance. If not set at creation time, will be set at subscription creation time. @@ -615,6 +620,7 @@ def update( "additional_emails": additional_emails, "auto_collection": auto_collection, "auto_issuance": auto_issuance, + "automatic_tax_enabled": automatic_tax_enabled, "billing_address": billing_address, "currency": currency, "email": email, @@ -936,6 +942,7 @@ def update_by_external_id( additional_emails: Optional[SequenceNotStr[str]] | Omit = omit, auto_collection: Optional[bool] | Omit = omit, auto_issuance: Optional[bool] | Omit = omit, + automatic_tax_enabled: Optional[bool] | Omit = omit, billing_address: Optional[AddressInputParam] | Omit = omit, currency: Optional[str] | Omit = omit, email: Optional[str] | Omit = omit, @@ -979,6 +986,10 @@ def update_by_external_id( manual approval.If `null` is specified, the customer's auto issuance setting will be inherited from the account-level setting. + automatic_tax_enabled: Whether automatic tax calculation is enabled for this customer. When null, + inherits from account-level setting. When true or false, overrides the account + setting. + currency: An ISO 4217 currency string used for the customer's invoices and balance. If not set at creation time, will be set at subscription creation time. @@ -1174,6 +1185,7 @@ def update_by_external_id( "additional_emails": additional_emails, "auto_collection": auto_collection, "auto_issuance": auto_issuance, + "automatic_tax_enabled": automatic_tax_enabled, "billing_address": billing_address, "currency": currency, "email": email, @@ -1522,6 +1534,7 @@ async def update( additional_emails: Optional[SequenceNotStr[str]] | Omit = omit, auto_collection: Optional[bool] | Omit = omit, auto_issuance: Optional[bool] | Omit = omit, + automatic_tax_enabled: Optional[bool] | Omit = omit, billing_address: Optional[AddressInputParam] | Omit = omit, currency: Optional[str] | Omit = omit, email: Optional[str] | Omit = omit, @@ -1566,6 +1579,10 @@ async def update( manual approval.If `null` is specified, the customer's auto issuance setting will be inherited from the account-level setting. + automatic_tax_enabled: Whether automatic tax calculation is enabled for this customer. When null, + inherits from account-level setting. When true or false, overrides the account + setting. + currency: An ISO 4217 currency string used for the customer's invoices and balance. If not set at creation time, will be set at subscription creation time. @@ -1761,6 +1778,7 @@ async def update( "additional_emails": additional_emails, "auto_collection": auto_collection, "auto_issuance": auto_issuance, + "automatic_tax_enabled": automatic_tax_enabled, "billing_address": billing_address, "currency": currency, "email": email, @@ -2082,6 +2100,7 @@ async def update_by_external_id( additional_emails: Optional[SequenceNotStr[str]] | Omit = omit, auto_collection: Optional[bool] | Omit = omit, auto_issuance: Optional[bool] | Omit = omit, + automatic_tax_enabled: Optional[bool] | Omit = omit, billing_address: Optional[AddressInputParam] | Omit = omit, currency: Optional[str] | Omit = omit, email: Optional[str] | Omit = omit, @@ -2125,6 +2144,10 @@ async def update_by_external_id( manual approval.If `null` is specified, the customer's auto issuance setting will be inherited from the account-level setting. + automatic_tax_enabled: Whether automatic tax calculation is enabled for this customer. When null, + inherits from account-level setting. When true or false, overrides the account + setting. + currency: An ISO 4217 currency string used for the customer's invoices and balance. If not set at creation time, will be set at subscription creation time. @@ -2320,6 +2343,7 @@ async def update_by_external_id( "additional_emails": additional_emails, "auto_collection": auto_collection, "auto_issuance": auto_issuance, + "automatic_tax_enabled": automatic_tax_enabled, "billing_address": billing_address, "currency": currency, "email": email, diff --git a/src/orb/types/customer.py b/src/orb/types/customer.py index d50e2b54..af140d3b 100644 --- a/src/orb/types/customer.py +++ b/src/orb/types/customer.py @@ -269,4 +269,11 @@ class Customer(BaseModel): accounting_sync_configuration: Optional[AccountingSyncConfiguration] = None + automatic_tax_enabled: Optional[bool] = None + """Whether automatic tax calculation is enabled for this customer. + + This field is nullable for backwards compatibility but will always return a + boolean value. + """ + reporting_configuration: Optional[ReportingConfiguration] = None diff --git a/src/orb/types/customer_create_params.py b/src/orb/types/customer_create_params.py index fe8decbd..586a8491 100644 --- a/src/orb/types/customer_create_params.py +++ b/src/orb/types/customer_create_params.py @@ -15,7 +15,12 @@ from .new_avalara_tax_configuration_param import NewAvalaraTaxConfigurationParam from .new_accounting_sync_configuration_param import NewAccountingSyncConfigurationParam -__all__ = ["CustomerCreateParams", "TaxConfiguration", "TaxConfigurationNewNumeralConfiguration"] +__all__ = [ + "CustomerCreateParams", + "TaxConfiguration", + "TaxConfigurationNewNumeralConfiguration", + "TaxConfigurationNewAnrokConfiguration", +] class CustomerCreateParams(TypedDict, total=False): @@ -261,10 +266,31 @@ class TaxConfigurationNewNumeralConfiguration(TypedDict, total=False): tax_provider: Required[Literal["numeral"]] + automatic_tax_enabled: Optional[bool] + """Whether to automatically calculate tax for this customer. + + When null, inherits from account-level setting. When true or false, overrides + the account setting. + """ + + +class TaxConfigurationNewAnrokConfiguration(TypedDict, total=False): + tax_exempt: Required[bool] + + tax_provider: Required[Literal["anrok"]] + + automatic_tax_enabled: Optional[bool] + """Whether to automatically calculate tax for this customer. + + When null, inherits from account-level setting. When true or false, overrides + the account setting. + """ + TaxConfiguration: TypeAlias = Union[ NewAvalaraTaxConfigurationParam, NewTaxJarConfigurationParam, NewSphereConfigurationParam, TaxConfigurationNewNumeralConfiguration, + TaxConfigurationNewAnrokConfiguration, ] diff --git a/src/orb/types/customer_update_by_external_id_params.py b/src/orb/types/customer_update_by_external_id_params.py index 6681db58..70133a09 100644 --- a/src/orb/types/customer_update_by_external_id_params.py +++ b/src/orb/types/customer_update_by_external_id_params.py @@ -15,7 +15,12 @@ from .new_avalara_tax_configuration_param import NewAvalaraTaxConfigurationParam from .new_accounting_sync_configuration_param import NewAccountingSyncConfigurationParam -__all__ = ["CustomerUpdateByExternalIDParams", "TaxConfiguration", "TaxConfigurationNewNumeralConfiguration"] +__all__ = [ + "CustomerUpdateByExternalIDParams", + "TaxConfiguration", + "TaxConfigurationNewNumeralConfiguration", + "TaxConfigurationNewAnrokConfiguration", +] class CustomerUpdateByExternalIDParams(TypedDict, total=False): @@ -44,6 +49,13 @@ class CustomerUpdateByExternalIDParams(TypedDict, total=False): will be inherited from the account-level setting. """ + automatic_tax_enabled: Optional[bool] + """Whether automatic tax calculation is enabled for this customer. + + When null, inherits from account-level setting. When true or false, overrides + the account setting. + """ + billing_address: Optional[AddressInputParam] currency: Optional[str] @@ -256,10 +268,31 @@ class TaxConfigurationNewNumeralConfiguration(TypedDict, total=False): tax_provider: Required[Literal["numeral"]] + automatic_tax_enabled: Optional[bool] + """Whether to automatically calculate tax for this customer. + + When null, inherits from account-level setting. When true or false, overrides + the account setting. + """ + + +class TaxConfigurationNewAnrokConfiguration(TypedDict, total=False): + tax_exempt: Required[bool] + + tax_provider: Required[Literal["anrok"]] + + automatic_tax_enabled: Optional[bool] + """Whether to automatically calculate tax for this customer. + + When null, inherits from account-level setting. When true or false, overrides + the account setting. + """ + TaxConfiguration: TypeAlias = Union[ NewAvalaraTaxConfigurationParam, NewTaxJarConfigurationParam, NewSphereConfigurationParam, TaxConfigurationNewNumeralConfiguration, + TaxConfigurationNewAnrokConfiguration, ] diff --git a/src/orb/types/customer_update_params.py b/src/orb/types/customer_update_params.py index 0dff5b64..d18a0689 100644 --- a/src/orb/types/customer_update_params.py +++ b/src/orb/types/customer_update_params.py @@ -15,7 +15,12 @@ from .new_avalara_tax_configuration_param import NewAvalaraTaxConfigurationParam from .new_accounting_sync_configuration_param import NewAccountingSyncConfigurationParam -__all__ = ["CustomerUpdateParams", "TaxConfiguration", "TaxConfigurationNewNumeralConfiguration"] +__all__ = [ + "CustomerUpdateParams", + "TaxConfiguration", + "TaxConfigurationNewNumeralConfiguration", + "TaxConfigurationNewAnrokConfiguration", +] class CustomerUpdateParams(TypedDict, total=False): @@ -44,6 +49,13 @@ class CustomerUpdateParams(TypedDict, total=False): will be inherited from the account-level setting. """ + automatic_tax_enabled: Optional[bool] + """Whether automatic tax calculation is enabled for this customer. + + When null, inherits from account-level setting. When true or false, overrides + the account setting. + """ + billing_address: Optional[AddressInputParam] currency: Optional[str] @@ -256,10 +268,31 @@ class TaxConfigurationNewNumeralConfiguration(TypedDict, total=False): tax_provider: Required[Literal["numeral"]] + automatic_tax_enabled: Optional[bool] + """Whether to automatically calculate tax for this customer. + + When null, inherits from account-level setting. When true or false, overrides + the account setting. + """ + + +class TaxConfigurationNewAnrokConfiguration(TypedDict, total=False): + tax_exempt: Required[bool] + + tax_provider: Required[Literal["anrok"]] + + automatic_tax_enabled: Optional[bool] + """Whether to automatically calculate tax for this customer. + + When null, inherits from account-level setting. When true or false, overrides + the account setting. + """ + TaxConfiguration: TypeAlias = Union[ NewAvalaraTaxConfigurationParam, NewTaxJarConfigurationParam, NewSphereConfigurationParam, TaxConfigurationNewNumeralConfiguration, + TaxConfigurationNewAnrokConfiguration, ] diff --git a/src/orb/types/customers/credits/affected_block.py b/src/orb/types/customers/credits/affected_block.py index 3bf8428d..74b2b925 100644 --- a/src/orb/types/customers/credits/affected_block.py +++ b/src/orb/types/customers/credits/affected_block.py @@ -6,10 +6,10 @@ from ...._models import BaseModel -__all__ = ["AffectedBlock", "BlockFilter"] +__all__ = ["AffectedBlock", "Filter"] -class BlockFilter(BaseModel): +class Filter(BaseModel): field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"] """The property of the price to filter on.""" @@ -23,8 +23,8 @@ class BlockFilter(BaseModel): class AffectedBlock(BaseModel): id: str - block_filters: Optional[List[BlockFilter]] = None - expiry_date: Optional[datetime] = None + filters: List[Filter] + per_unit_cost_basis: Optional[str] = None diff --git a/src/orb/types/new_avalara_tax_configuration_param.py b/src/orb/types/new_avalara_tax_configuration_param.py index 63266557..14bd2994 100644 --- a/src/orb/types/new_avalara_tax_configuration_param.py +++ b/src/orb/types/new_avalara_tax_configuration_param.py @@ -13,4 +13,11 @@ class NewAvalaraTaxConfigurationParam(TypedDict, total=False): tax_provider: Required[Literal["avalara"]] + automatic_tax_enabled: Optional[bool] + """Whether to automatically calculate tax for this customer. + + When null, inherits from account-level setting. When true or false, overrides + the account setting. + """ + tax_exemption_code: Optional[str] diff --git a/src/orb/types/new_sphere_configuration_param.py b/src/orb/types/new_sphere_configuration_param.py index 87ccc88b..ca4050d0 100644 --- a/src/orb/types/new_sphere_configuration_param.py +++ b/src/orb/types/new_sphere_configuration_param.py @@ -2,6 +2,7 @@ from __future__ import annotations +from typing import Optional from typing_extensions import Literal, Required, TypedDict __all__ = ["NewSphereConfigurationParam"] @@ -11,3 +12,10 @@ class NewSphereConfigurationParam(TypedDict, total=False): tax_exempt: Required[bool] tax_provider: Required[Literal["sphere"]] + + automatic_tax_enabled: Optional[bool] + """Whether to automatically calculate tax for this customer. + + When null, inherits from account-level setting. When true or false, overrides + the account setting. + """ diff --git a/src/orb/types/new_tax_jar_configuration_param.py b/src/orb/types/new_tax_jar_configuration_param.py index 8198161b..bf1849bc 100644 --- a/src/orb/types/new_tax_jar_configuration_param.py +++ b/src/orb/types/new_tax_jar_configuration_param.py @@ -2,6 +2,7 @@ from __future__ import annotations +from typing import Optional from typing_extensions import Literal, Required, TypedDict __all__ = ["NewTaxJarConfigurationParam"] @@ -11,3 +12,10 @@ class NewTaxJarConfigurationParam(TypedDict, total=False): tax_exempt: Required[bool] tax_provider: Required[Literal["taxjar"]] + + automatic_tax_enabled: Optional[bool] + """Whether to automatically calculate tax for this customer. + + When null, inherits from account-level setting. When true or false, overrides + the account setting. + """ diff --git a/src/orb/types/shared/allocation.py b/src/orb/types/shared/allocation.py index 05479b68..a7f05254 100644 --- a/src/orb/types/shared/allocation.py +++ b/src/orb/types/shared/allocation.py @@ -1,11 +1,23 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import Optional +from typing import List, Optional +from typing_extensions import Literal from ..._models import BaseModel from .custom_expiration import CustomExpiration -__all__ = ["Allocation"] +__all__ = ["Allocation", "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 Allocation(BaseModel): @@ -14,3 +26,5 @@ class Allocation(BaseModel): currency: str custom_expiration: Optional[CustomExpiration] = None + + filters: Optional[List[Filter]] = None diff --git a/tests/api_resources/test_customers.py b/tests/api_resources/test_customers.py index 13ef949e..558973dd 100644 --- a/tests/api_resources/test_customers.py +++ b/tests/api_resources/test_customers.py @@ -76,6 +76,7 @@ def test_method_create_with_all_params(self, client: Orb) -> None: tax_configuration={ "tax_exempt": True, "tax_provider": "avalara", + "automatic_tax_enabled": True, "tax_exemption_code": "tax_exemption_code", }, tax_id={ @@ -136,6 +137,7 @@ def test_method_update_with_all_params(self, client: Orb) -> None: additional_emails=["string"], auto_collection=True, auto_issuance=True, + automatic_tax_enabled=True, billing_address={ "city": "city", "country": "country", @@ -168,6 +170,7 @@ def test_method_update_with_all_params(self, client: Orb) -> None: tax_configuration={ "tax_exempt": True, "tax_provider": "avalara", + "automatic_tax_enabled": True, "tax_exemption_code": "tax_exemption_code", }, tax_id={ @@ -459,6 +462,7 @@ def test_method_update_by_external_id_with_all_params(self, client: Orb) -> None additional_emails=["string"], auto_collection=True, auto_issuance=True, + automatic_tax_enabled=True, billing_address={ "city": "city", "country": "country", @@ -491,6 +495,7 @@ def test_method_update_by_external_id_with_all_params(self, client: Orb) -> None tax_configuration={ "tax_exempt": True, "tax_provider": "avalara", + "automatic_tax_enabled": True, "tax_exemption_code": "tax_exemption_code", }, tax_id={ @@ -593,6 +598,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncOrb) -> No tax_configuration={ "tax_exempt": True, "tax_provider": "avalara", + "automatic_tax_enabled": True, "tax_exemption_code": "tax_exemption_code", }, tax_id={ @@ -653,6 +659,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncOrb) -> No additional_emails=["string"], auto_collection=True, auto_issuance=True, + automatic_tax_enabled=True, billing_address={ "city": "city", "country": "country", @@ -685,6 +692,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncOrb) -> No tax_configuration={ "tax_exempt": True, "tax_provider": "avalara", + "automatic_tax_enabled": True, "tax_exemption_code": "tax_exemption_code", }, tax_id={ @@ -988,6 +996,7 @@ async def test_method_update_by_external_id_with_all_params(self, async_client: additional_emails=["string"], auto_collection=True, auto_issuance=True, + automatic_tax_enabled=True, billing_address={ "city": "city", "country": "country", @@ -1020,6 +1029,7 @@ async def test_method_update_by_external_id_with_all_params(self, async_client: tax_configuration={ "tax_exempt": True, "tax_provider": "avalara", + "automatic_tax_enabled": True, "tax_exemption_code": "tax_exemption_code", }, tax_id={ From 644e3460c38d380caf37901076f7ee54fba7bf44 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 29 Oct 2025 17:31:47 +0000 Subject: [PATCH 2/2] release: 4.30.0 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 8 ++++++++ pyproject.toml | 2 +- src/orb/_version.py | 2 +- 4 files changed, 11 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index b85eea74..ba2c94bf 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "4.29.1" + ".": "4.30.0" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 469ae871..d27f92c4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 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) + +### Features + +* **api:** api update ([f31aeec](https://github.com/orbcorp/orb-python/commit/f31aeecc1618a721d3840250abc4676a3c30e660)) + ## 4.29.1 (2025-10-29) Full Changelog: [v4.29.0...v4.29.1](https://github.com/orbcorp/orb-python/compare/v4.29.0...v4.29.1) diff --git a/pyproject.toml b/pyproject.toml index 7122bab6..6962aa98 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "orb-billing" -version = "4.29.1" +version = "4.30.0" description = "The official Python library for the orb API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/orb/_version.py b/src/orb/_version.py index 95141b68..215311e4 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.29.1" # x-release-please-version +__version__ = "4.30.0" # x-release-please-version