Skip to content

Commit 644ce25

Browse files
feat(api): api update
1 parent 32117ac commit 644ce25

File tree

12 files changed

+181
-11
lines changed

12 files changed

+181
-11
lines changed

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 118
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-cbce25283cb9c3282e03e08b7ee81395436af7d0eb480ffcbab307b5bf1c92a0.yml
3-
openapi_spec_hash: c286edf46db95dee05eb6f180ac24ab0
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-ef726ad139fa29757029206ee08150434fc6c52005fec6d42c7d2bcd3aa7ab47.yml
3+
openapi_spec_hash: e622beb7c26f9b0dd641bd5c92735a5b
44
config_hash: dd4343ce95871032ef6e0735a4ca038c

src/orb/resources/customers/customers.py

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -376,6 +376,7 @@ def update(
376376
additional_emails: Optional[SequenceNotStr[str]] | Omit = omit,
377377
auto_collection: Optional[bool] | Omit = omit,
378378
auto_issuance: Optional[bool] | Omit = omit,
379+
automatic_tax_enabled: Optional[bool] | Omit = omit,
379380
billing_address: Optional[AddressInputParam] | Omit = omit,
380381
currency: Optional[str] | Omit = omit,
381382
email: Optional[str] | Omit = omit,
@@ -420,6 +421,10 @@ def update(
420421
manual approval.If `null` is specified, the customer's auto issuance setting
421422
will be inherited from the account-level setting.
422423
424+
automatic_tax_enabled: Whether automatic tax calculation is enabled for this customer. When null,
425+
inherits from account-level setting. When true or false, overrides the account
426+
setting.
427+
423428
currency: An ISO 4217 currency string used for the customer's invoices and balance. If not
424429
set at creation time, will be set at subscription creation time.
425430
@@ -615,6 +620,7 @@ def update(
615620
"additional_emails": additional_emails,
616621
"auto_collection": auto_collection,
617622
"auto_issuance": auto_issuance,
623+
"automatic_tax_enabled": automatic_tax_enabled,
618624
"billing_address": billing_address,
619625
"currency": currency,
620626
"email": email,
@@ -936,6 +942,7 @@ def update_by_external_id(
936942
additional_emails: Optional[SequenceNotStr[str]] | Omit = omit,
937943
auto_collection: Optional[bool] | Omit = omit,
938944
auto_issuance: Optional[bool] | Omit = omit,
945+
automatic_tax_enabled: Optional[bool] | Omit = omit,
939946
billing_address: Optional[AddressInputParam] | Omit = omit,
940947
currency: Optional[str] | Omit = omit,
941948
email: Optional[str] | Omit = omit,
@@ -979,6 +986,10 @@ def update_by_external_id(
979986
manual approval.If `null` is specified, the customer's auto issuance setting
980987
will be inherited from the account-level setting.
981988
989+
automatic_tax_enabled: Whether automatic tax calculation is enabled for this customer. When null,
990+
inherits from account-level setting. When true or false, overrides the account
991+
setting.
992+
982993
currency: An ISO 4217 currency string used for the customer's invoices and balance. If not
983994
set at creation time, will be set at subscription creation time.
984995
@@ -1174,6 +1185,7 @@ def update_by_external_id(
11741185
"additional_emails": additional_emails,
11751186
"auto_collection": auto_collection,
11761187
"auto_issuance": auto_issuance,
1188+
"automatic_tax_enabled": automatic_tax_enabled,
11771189
"billing_address": billing_address,
11781190
"currency": currency,
11791191
"email": email,
@@ -1522,6 +1534,7 @@ async def update(
15221534
additional_emails: Optional[SequenceNotStr[str]] | Omit = omit,
15231535
auto_collection: Optional[bool] | Omit = omit,
15241536
auto_issuance: Optional[bool] | Omit = omit,
1537+
automatic_tax_enabled: Optional[bool] | Omit = omit,
15251538
billing_address: Optional[AddressInputParam] | Omit = omit,
15261539
currency: Optional[str] | Omit = omit,
15271540
email: Optional[str] | Omit = omit,
@@ -1566,6 +1579,10 @@ async def update(
15661579
manual approval.If `null` is specified, the customer's auto issuance setting
15671580
will be inherited from the account-level setting.
15681581
1582+
automatic_tax_enabled: Whether automatic tax calculation is enabled for this customer. When null,
1583+
inherits from account-level setting. When true or false, overrides the account
1584+
setting.
1585+
15691586
currency: An ISO 4217 currency string used for the customer's invoices and balance. If not
15701587
set at creation time, will be set at subscription creation time.
15711588
@@ -1761,6 +1778,7 @@ async def update(
17611778
"additional_emails": additional_emails,
17621779
"auto_collection": auto_collection,
17631780
"auto_issuance": auto_issuance,
1781+
"automatic_tax_enabled": automatic_tax_enabled,
17641782
"billing_address": billing_address,
17651783
"currency": currency,
17661784
"email": email,
@@ -2082,6 +2100,7 @@ async def update_by_external_id(
20822100
additional_emails: Optional[SequenceNotStr[str]] | Omit = omit,
20832101
auto_collection: Optional[bool] | Omit = omit,
20842102
auto_issuance: Optional[bool] | Omit = omit,
2103+
automatic_tax_enabled: Optional[bool] | Omit = omit,
20852104
billing_address: Optional[AddressInputParam] | Omit = omit,
20862105
currency: Optional[str] | Omit = omit,
20872106
email: Optional[str] | Omit = omit,
@@ -2125,6 +2144,10 @@ async def update_by_external_id(
21252144
manual approval.If `null` is specified, the customer's auto issuance setting
21262145
will be inherited from the account-level setting.
21272146
2147+
automatic_tax_enabled: Whether automatic tax calculation is enabled for this customer. When null,
2148+
inherits from account-level setting. When true or false, overrides the account
2149+
setting.
2150+
21282151
currency: An ISO 4217 currency string used for the customer's invoices and balance. If not
21292152
set at creation time, will be set at subscription creation time.
21302153
@@ -2320,6 +2343,7 @@ async def update_by_external_id(
23202343
"additional_emails": additional_emails,
23212344
"auto_collection": auto_collection,
23222345
"auto_issuance": auto_issuance,
2346+
"automatic_tax_enabled": automatic_tax_enabled,
23232347
"billing_address": billing_address,
23242348
"currency": currency,
23252349
"email": email,

src/orb/types/customer.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -269,4 +269,11 @@ class Customer(BaseModel):
269269

270270
accounting_sync_configuration: Optional[AccountingSyncConfiguration] = None
271271

272+
automatic_tax_enabled: Optional[bool] = None
273+
"""Whether automatic tax calculation is enabled for this customer.
274+
275+
This field is nullable for backwards compatibility but will always return a
276+
boolean value.
277+
"""
278+
272279
reporting_configuration: Optional[ReportingConfiguration] = None

src/orb/types/customer_create_params.py

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,12 @@
1515
from .new_avalara_tax_configuration_param import NewAvalaraTaxConfigurationParam
1616
from .new_accounting_sync_configuration_param import NewAccountingSyncConfigurationParam
1717

18-
__all__ = ["CustomerCreateParams", "TaxConfiguration", "TaxConfigurationNewNumeralConfiguration"]
18+
__all__ = [
19+
"CustomerCreateParams",
20+
"TaxConfiguration",
21+
"TaxConfigurationNewNumeralConfiguration",
22+
"TaxConfigurationNewAnrokConfiguration",
23+
]
1924

2025

2126
class CustomerCreateParams(TypedDict, total=False):
@@ -261,10 +266,31 @@ class TaxConfigurationNewNumeralConfiguration(TypedDict, total=False):
261266

262267
tax_provider: Required[Literal["numeral"]]
263268

269+
automatic_tax_enabled: Optional[bool]
270+
"""Whether to automatically calculate tax for this customer.
271+
272+
When null, inherits from account-level setting. When true or false, overrides
273+
the account setting.
274+
"""
275+
276+
277+
class TaxConfigurationNewAnrokConfiguration(TypedDict, total=False):
278+
tax_exempt: Required[bool]
279+
280+
tax_provider: Required[Literal["anrok"]]
281+
282+
automatic_tax_enabled: Optional[bool]
283+
"""Whether to automatically calculate tax for this customer.
284+
285+
When null, inherits from account-level setting. When true or false, overrides
286+
the account setting.
287+
"""
288+
264289

265290
TaxConfiguration: TypeAlias = Union[
266291
NewAvalaraTaxConfigurationParam,
267292
NewTaxJarConfigurationParam,
268293
NewSphereConfigurationParam,
269294
TaxConfigurationNewNumeralConfiguration,
295+
TaxConfigurationNewAnrokConfiguration,
270296
]

src/orb/types/customer_update_by_external_id_params.py

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,12 @@
1515
from .new_avalara_tax_configuration_param import NewAvalaraTaxConfigurationParam
1616
from .new_accounting_sync_configuration_param import NewAccountingSyncConfigurationParam
1717

18-
__all__ = ["CustomerUpdateByExternalIDParams", "TaxConfiguration", "TaxConfigurationNewNumeralConfiguration"]
18+
__all__ = [
19+
"CustomerUpdateByExternalIDParams",
20+
"TaxConfiguration",
21+
"TaxConfigurationNewNumeralConfiguration",
22+
"TaxConfigurationNewAnrokConfiguration",
23+
]
1924

2025

2126
class CustomerUpdateByExternalIDParams(TypedDict, total=False):
@@ -44,6 +49,13 @@ class CustomerUpdateByExternalIDParams(TypedDict, total=False):
4449
will be inherited from the account-level setting.
4550
"""
4651

52+
automatic_tax_enabled: Optional[bool]
53+
"""Whether automatic tax calculation is enabled for this customer.
54+
55+
When null, inherits from account-level setting. When true or false, overrides
56+
the account setting.
57+
"""
58+
4759
billing_address: Optional[AddressInputParam]
4860

4961
currency: Optional[str]
@@ -256,10 +268,31 @@ class TaxConfigurationNewNumeralConfiguration(TypedDict, total=False):
256268

257269
tax_provider: Required[Literal["numeral"]]
258270

271+
automatic_tax_enabled: Optional[bool]
272+
"""Whether to automatically calculate tax for this customer.
273+
274+
When null, inherits from account-level setting. When true or false, overrides
275+
the account setting.
276+
"""
277+
278+
279+
class TaxConfigurationNewAnrokConfiguration(TypedDict, total=False):
280+
tax_exempt: Required[bool]
281+
282+
tax_provider: Required[Literal["anrok"]]
283+
284+
automatic_tax_enabled: Optional[bool]
285+
"""Whether to automatically calculate tax for this customer.
286+
287+
When null, inherits from account-level setting. When true or false, overrides
288+
the account setting.
289+
"""
290+
259291

260292
TaxConfiguration: TypeAlias = Union[
261293
NewAvalaraTaxConfigurationParam,
262294
NewTaxJarConfigurationParam,
263295
NewSphereConfigurationParam,
264296
TaxConfigurationNewNumeralConfiguration,
297+
TaxConfigurationNewAnrokConfiguration,
265298
]

src/orb/types/customer_update_params.py

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,12 @@
1515
from .new_avalara_tax_configuration_param import NewAvalaraTaxConfigurationParam
1616
from .new_accounting_sync_configuration_param import NewAccountingSyncConfigurationParam
1717

18-
__all__ = ["CustomerUpdateParams", "TaxConfiguration", "TaxConfigurationNewNumeralConfiguration"]
18+
__all__ = [
19+
"CustomerUpdateParams",
20+
"TaxConfiguration",
21+
"TaxConfigurationNewNumeralConfiguration",
22+
"TaxConfigurationNewAnrokConfiguration",
23+
]
1924

2025

2126
class CustomerUpdateParams(TypedDict, total=False):
@@ -44,6 +49,13 @@ class CustomerUpdateParams(TypedDict, total=False):
4449
will be inherited from the account-level setting.
4550
"""
4651

52+
automatic_tax_enabled: Optional[bool]
53+
"""Whether automatic tax calculation is enabled for this customer.
54+
55+
When null, inherits from account-level setting. When true or false, overrides
56+
the account setting.
57+
"""
58+
4759
billing_address: Optional[AddressInputParam]
4860

4961
currency: Optional[str]
@@ -256,10 +268,31 @@ class TaxConfigurationNewNumeralConfiguration(TypedDict, total=False):
256268

257269
tax_provider: Required[Literal["numeral"]]
258270

271+
automatic_tax_enabled: Optional[bool]
272+
"""Whether to automatically calculate tax for this customer.
273+
274+
When null, inherits from account-level setting. When true or false, overrides
275+
the account setting.
276+
"""
277+
278+
279+
class TaxConfigurationNewAnrokConfiguration(TypedDict, total=False):
280+
tax_exempt: Required[bool]
281+
282+
tax_provider: Required[Literal["anrok"]]
283+
284+
automatic_tax_enabled: Optional[bool]
285+
"""Whether to automatically calculate tax for this customer.
286+
287+
When null, inherits from account-level setting. When true or false, overrides
288+
the account setting.
289+
"""
290+
259291

260292
TaxConfiguration: TypeAlias = Union[
261293
NewAvalaraTaxConfigurationParam,
262294
NewTaxJarConfigurationParam,
263295
NewSphereConfigurationParam,
264296
TaxConfigurationNewNumeralConfiguration,
297+
TaxConfigurationNewAnrokConfiguration,
265298
]

src/orb/types/customers/credits/affected_block.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@
66

77
from ...._models import BaseModel
88

9-
__all__ = ["AffectedBlock", "BlockFilter"]
9+
__all__ = ["AffectedBlock", "Filter"]
1010

1111

12-
class BlockFilter(BaseModel):
12+
class Filter(BaseModel):
1313
field: Literal["price_id", "item_id", "price_type", "currency", "pricing_unit_id"]
1414
"""The property of the price to filter on."""
1515

@@ -23,8 +23,8 @@ class BlockFilter(BaseModel):
2323
class AffectedBlock(BaseModel):
2424
id: str
2525

26-
block_filters: Optional[List[BlockFilter]] = None
27-
2826
expiry_date: Optional[datetime] = None
2927

28+
filters: List[Filter]
29+
3030
per_unit_cost_basis: Optional[str] = None

src/orb/types/new_avalara_tax_configuration_param.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,11 @@ class NewAvalaraTaxConfigurationParam(TypedDict, total=False):
1313

1414
tax_provider: Required[Literal["avalara"]]
1515

16+
automatic_tax_enabled: Optional[bool]
17+
"""Whether to automatically calculate tax for this customer.
18+
19+
When null, inherits from account-level setting. When true or false, overrides
20+
the account setting.
21+
"""
22+
1623
tax_exemption_code: Optional[str]

src/orb/types/new_sphere_configuration_param.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
from __future__ import annotations
44

5+
from typing import Optional
56
from typing_extensions import Literal, Required, TypedDict
67

78
__all__ = ["NewSphereConfigurationParam"]
@@ -11,3 +12,10 @@ class NewSphereConfigurationParam(TypedDict, total=False):
1112
tax_exempt: Required[bool]
1213

1314
tax_provider: Required[Literal["sphere"]]
15+
16+
automatic_tax_enabled: Optional[bool]
17+
"""Whether to automatically calculate tax for this customer.
18+
19+
When null, inherits from account-level setting. When true or false, overrides
20+
the account setting.
21+
"""

src/orb/types/new_tax_jar_configuration_param.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
from __future__ import annotations
44

5+
from typing import Optional
56
from typing_extensions import Literal, Required, TypedDict
67

78
__all__ = ["NewTaxJarConfigurationParam"]
@@ -11,3 +12,10 @@ class NewTaxJarConfigurationParam(TypedDict, total=False):
1112
tax_exempt: Required[bool]
1213

1314
tax_provider: Required[Literal["taxjar"]]
15+
16+
automatic_tax_enabled: Optional[bool]
17+
"""Whether to automatically calculate tax for this customer.
18+
19+
When null, inherits from account-level setting. When true or false, overrides
20+
the account setting.
21+
"""

0 commit comments

Comments
 (0)