Skip to content

Commit 3959281

Browse files
feat(api): api update
1 parent 5527cac commit 3959281

File tree

7 files changed

+191
-5
lines changed

7 files changed

+191
-5
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-033643979990e894363554df06218fabe4493feaa569a013dbdf9a72aa21c45f.yml
3-
openapi_spec_hash: dd9d320ad178bafa06f1eac2977e2ca7
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-7936e3f73bbe1d59d27fd7a8a226985927b38fdec1c936c77577381699fb6140.yml
3+
openapi_spec_hash: 1d3f9ed5fbdb0e40d56d6acd9d1736e2
44
config_hash: e6db17547fe854b1c240407cf4c6dc9e

src/orb/resources/customers/customers.py

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ def create(
103103
external_customer_id: Optional[str] | Omit = omit,
104104
hierarchy: Optional[CustomerHierarchyConfigParam] | Omit = omit,
105105
metadata: Optional[Dict[str, Optional[str]]] | Omit = omit,
106+
payment_configuration: Optional[customer_create_params.PaymentConfiguration] | Omit = omit,
106107
payment_provider: Optional[Literal["quickbooks", "bill.com", "stripe_charge", "stripe_invoice", "netsuite"]]
107108
| Omit = omit,
108109
payment_provider_id: Optional[str] | Omit = omit,
@@ -166,6 +167,9 @@ def create(
166167
by setting the value to `null`, and the entire metadata mapping can be cleared
167168
by setting `metadata` to `null`.
168169
170+
payment_configuration: Payment configuration for the customer, applicable when using Orb Invoicing with
171+
a supported payment provider such as Stripe.
172+
169173
payment_provider: This is used for creating charges or invoices in an external system via Orb.
170174
When not in test mode, the connection must first be configured in the Orb
171175
webapp.
@@ -348,6 +352,7 @@ def create(
348352
"external_customer_id": external_customer_id,
349353
"hierarchy": hierarchy,
350354
"metadata": metadata,
355+
"payment_configuration": payment_configuration,
351356
"payment_provider": payment_provider,
352357
"payment_provider_id": payment_provider_id,
353358
"reporting_configuration": reporting_configuration,
@@ -384,6 +389,7 @@ def update(
384389
hierarchy: Optional[CustomerHierarchyConfigParam] | Omit = omit,
385390
metadata: Optional[Dict[str, Optional[str]]] | Omit = omit,
386391
name: Optional[str] | Omit = omit,
392+
payment_configuration: Optional[customer_update_params.PaymentConfiguration] | Omit = omit,
387393
payment_provider: Optional[Literal["quickbooks", "bill.com", "stripe_charge", "stripe_invoice", "netsuite"]]
388394
| Omit = omit,
389395
payment_provider_id: Optional[str] | Omit = omit,
@@ -439,6 +445,9 @@ def update(
439445
440446
name: The full name of the customer
441447
448+
payment_configuration: Payment configuration for the customer, applicable when using Orb Invoicing with
449+
a supported payment provider such as Stripe.
450+
442451
payment_provider: This is used for creating charges or invoices in an external system via Orb.
443452
When not in test mode:
444453
@@ -623,6 +632,7 @@ def update(
623632
"hierarchy": hierarchy,
624633
"metadata": metadata,
625634
"name": name,
635+
"payment_configuration": payment_configuration,
626636
"payment_provider": payment_provider,
627637
"payment_provider_id": payment_provider_id,
628638
"reporting_configuration": reporting_configuration,
@@ -944,6 +954,7 @@ def update_by_external_id(
944954
hierarchy: Optional[CustomerHierarchyConfigParam] | Omit = omit,
945955
metadata: Optional[Dict[str, Optional[str]]] | Omit = omit,
946956
name: Optional[str] | Omit = omit,
957+
payment_configuration: Optional[customer_update_by_external_id_params.PaymentConfiguration] | Omit = omit,
947958
payment_provider: Optional[Literal["quickbooks", "bill.com", "stripe_charge", "stripe_invoice", "netsuite"]]
948959
| Omit = omit,
949960
payment_provider_id: Optional[str] | Omit = omit,
@@ -998,6 +1009,9 @@ def update_by_external_id(
9981009
9991010
name: The full name of the customer
10001011
1012+
payment_configuration: Payment configuration for the customer, applicable when using Orb Invoicing with
1013+
a supported payment provider such as Stripe.
1014+
10011015
payment_provider: This is used for creating charges or invoices in an external system via Orb.
10021016
When not in test mode:
10031017
@@ -1182,6 +1196,7 @@ def update_by_external_id(
11821196
"hierarchy": hierarchy,
11831197
"metadata": metadata,
11841198
"name": name,
1199+
"payment_configuration": payment_configuration,
11851200
"payment_provider": payment_provider,
11861201
"payment_provider_id": payment_provider_id,
11871202
"reporting_configuration": reporting_configuration,
@@ -1249,6 +1264,7 @@ async def create(
12491264
external_customer_id: Optional[str] | Omit = omit,
12501265
hierarchy: Optional[CustomerHierarchyConfigParam] | Omit = omit,
12511266
metadata: Optional[Dict[str, Optional[str]]] | Omit = omit,
1267+
payment_configuration: Optional[customer_create_params.PaymentConfiguration] | Omit = omit,
12521268
payment_provider: Optional[Literal["quickbooks", "bill.com", "stripe_charge", "stripe_invoice", "netsuite"]]
12531269
| Omit = omit,
12541270
payment_provider_id: Optional[str] | Omit = omit,
@@ -1312,6 +1328,9 @@ async def create(
13121328
by setting the value to `null`, and the entire metadata mapping can be cleared
13131329
by setting `metadata` to `null`.
13141330
1331+
payment_configuration: Payment configuration for the customer, applicable when using Orb Invoicing with
1332+
a supported payment provider such as Stripe.
1333+
13151334
payment_provider: This is used for creating charges or invoices in an external system via Orb.
13161335
When not in test mode, the connection must first be configured in the Orb
13171336
webapp.
@@ -1494,6 +1513,7 @@ async def create(
14941513
"external_customer_id": external_customer_id,
14951514
"hierarchy": hierarchy,
14961515
"metadata": metadata,
1516+
"payment_configuration": payment_configuration,
14971517
"payment_provider": payment_provider,
14981518
"payment_provider_id": payment_provider_id,
14991519
"reporting_configuration": reporting_configuration,
@@ -1530,6 +1550,7 @@ async def update(
15301550
hierarchy: Optional[CustomerHierarchyConfigParam] | Omit = omit,
15311551
metadata: Optional[Dict[str, Optional[str]]] | Omit = omit,
15321552
name: Optional[str] | Omit = omit,
1553+
payment_configuration: Optional[customer_update_params.PaymentConfiguration] | Omit = omit,
15331554
payment_provider: Optional[Literal["quickbooks", "bill.com", "stripe_charge", "stripe_invoice", "netsuite"]]
15341555
| Omit = omit,
15351556
payment_provider_id: Optional[str] | Omit = omit,
@@ -1585,6 +1606,9 @@ async def update(
15851606
15861607
name: The full name of the customer
15871608
1609+
payment_configuration: Payment configuration for the customer, applicable when using Orb Invoicing with
1610+
a supported payment provider such as Stripe.
1611+
15881612
payment_provider: This is used for creating charges or invoices in an external system via Orb.
15891613
When not in test mode:
15901614
@@ -1769,6 +1793,7 @@ async def update(
17691793
"hierarchy": hierarchy,
17701794
"metadata": metadata,
17711795
"name": name,
1796+
"payment_configuration": payment_configuration,
17721797
"payment_provider": payment_provider,
17731798
"payment_provider_id": payment_provider_id,
17741799
"reporting_configuration": reporting_configuration,
@@ -2090,6 +2115,7 @@ async def update_by_external_id(
20902115
hierarchy: Optional[CustomerHierarchyConfigParam] | Omit = omit,
20912116
metadata: Optional[Dict[str, Optional[str]]] | Omit = omit,
20922117
name: Optional[str] | Omit = omit,
2118+
payment_configuration: Optional[customer_update_by_external_id_params.PaymentConfiguration] | Omit = omit,
20932119
payment_provider: Optional[Literal["quickbooks", "bill.com", "stripe_charge", "stripe_invoice", "netsuite"]]
20942120
| Omit = omit,
20952121
payment_provider_id: Optional[str] | Omit = omit,
@@ -2144,6 +2170,9 @@ async def update_by_external_id(
21442170
21452171
name: The full name of the customer
21462172
2173+
payment_configuration: Payment configuration for the customer, applicable when using Orb Invoicing with
2174+
a supported payment provider such as Stripe.
2175+
21472176
payment_provider: This is used for creating charges or invoices in an external system via Orb.
21482177
When not in test mode:
21492178
@@ -2328,6 +2357,7 @@ async def update_by_external_id(
23282357
"hierarchy": hierarchy,
23292358
"metadata": metadata,
23302359
"name": name,
2360+
"payment_configuration": payment_configuration,
23312361
"payment_provider": payment_provider,
23322362
"payment_provider_id": payment_provider_id,
23332363
"reporting_configuration": reporting_configuration,

src/orb/types/customer.py

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
"Hierarchy",
1515
"AccountingSyncConfiguration",
1616
"AccountingSyncConfigurationAccountingProvider",
17+
"PaymentConfiguration",
18+
"PaymentConfigurationPaymentProvider",
1719
"ReportingConfiguration",
1820
]
1921

@@ -36,6 +38,25 @@ class AccountingSyncConfiguration(BaseModel):
3638
excluded: bool
3739

3840

41+
class PaymentConfigurationPaymentProvider(BaseModel):
42+
provider_type: Literal["stripe"]
43+
"""The payment provider to configure."""
44+
45+
excluded_payment_method_types: Optional[List[str]] = None
46+
"""List of Stripe payment method types to exclude for this customer.
47+
48+
Excluded payment methods will not be available for the customer to select during
49+
payment, and will not be used for auto-collection. If a customer's default
50+
payment method becomes excluded, Orb will attempt to use the next available
51+
compatible payment method for auto-collection.
52+
"""
53+
54+
55+
class PaymentConfiguration(BaseModel):
56+
payment_providers: Optional[List[PaymentConfigurationPaymentProvider]] = None
57+
"""Provider-specific payment configuration."""
58+
59+
3960
class ReportingConfiguration(BaseModel):
4061
exempt: bool
4162

@@ -276,4 +297,10 @@ class Customer(BaseModel):
276297
boolean value.
277298
"""
278299

300+
payment_configuration: Optional[PaymentConfiguration] = None
301+
"""
302+
Payment configuration for the customer, applicable when using Orb Invoicing with
303+
a supported payment provider such as Stripe.
304+
"""
305+
279306
reporting_configuration: Optional[ReportingConfiguration] = None

src/orb/types/customer_create_params.py

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
from __future__ import annotations
44

5-
from typing import Dict, Union, Optional
5+
from typing import Dict, Union, Iterable, Optional
66
from typing_extensions import Literal, Required, TypeAlias, TypedDict
77

88
from .._types import SequenceNotStr
@@ -17,6 +17,8 @@
1717

1818
__all__ = [
1919
"CustomerCreateParams",
20+
"PaymentConfiguration",
21+
"PaymentConfigurationPaymentProvider",
2022
"TaxConfiguration",
2123
"TaxConfigurationNewNumeralConfiguration",
2224
"TaxConfigurationNewAnrokConfiguration",
@@ -87,6 +89,12 @@ class CustomerCreateParams(TypedDict, total=False):
8789
metadata mapping can be cleared by setting `metadata` to `null`.
8890
"""
8991

92+
payment_configuration: Optional[PaymentConfiguration]
93+
"""
94+
Payment configuration for the customer, applicable when using Orb Invoicing with
95+
a supported payment provider such as Stripe.
96+
"""
97+
9098
payment_provider: Optional[Literal["quickbooks", "bill.com", "stripe_charge", "stripe_invoice", "netsuite"]]
9199
"""This is used for creating charges or invoices in an external system via Orb.
92100
@@ -262,6 +270,25 @@ class CustomerCreateParams(TypedDict, total=False):
262270
"""
263271

264272

273+
class PaymentConfigurationPaymentProvider(TypedDict, total=False):
274+
provider_type: Required[Literal["stripe"]]
275+
"""The payment provider to configure."""
276+
277+
excluded_payment_method_types: SequenceNotStr[str]
278+
"""List of Stripe payment method types to exclude for this customer.
279+
280+
Excluded payment methods will not be available for the customer to select during
281+
payment, and will not be used for auto-collection. If a customer's default
282+
payment method becomes excluded, Orb will attempt to use the next available
283+
compatible payment method for auto-collection.
284+
"""
285+
286+
287+
class PaymentConfiguration(TypedDict, total=False):
288+
payment_providers: Iterable[PaymentConfigurationPaymentProvider]
289+
"""Provider-specific payment configuration."""
290+
291+
265292
class TaxConfigurationNewNumeralConfiguration(TypedDict, total=False):
266293
tax_exempt: Required[bool]
267294

src/orb/types/customer_update_by_external_id_params.py

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
from __future__ import annotations
44

5-
from typing import Dict, Union, Optional
5+
from typing import Dict, Union, Iterable, Optional
66
from typing_extensions import Literal, Required, TypeAlias, TypedDict
77

88
from .._types import SequenceNotStr
@@ -17,6 +17,8 @@
1717

1818
__all__ = [
1919
"CustomerUpdateByExternalIDParams",
20+
"PaymentConfiguration",
21+
"PaymentConfigurationPaymentProvider",
2022
"TaxConfiguration",
2123
"TaxConfigurationNewNumeralConfiguration",
2224
"TaxConfigurationNewAnrokConfiguration",
@@ -85,6 +87,12 @@ class CustomerUpdateByExternalIDParams(TypedDict, total=False):
8587
name: Optional[str]
8688
"""The full name of the customer"""
8789

90+
payment_configuration: Optional[PaymentConfiguration]
91+
"""
92+
Payment configuration for the customer, applicable when using Orb Invoicing with
93+
a supported payment provider such as Stripe.
94+
"""
95+
8896
payment_provider: Optional[Literal["quickbooks", "bill.com", "stripe_charge", "stripe_invoice", "netsuite"]]
8997
"""This is used for creating charges or invoices in an external system via Orb.
9098
@@ -257,6 +265,25 @@ class CustomerUpdateByExternalIDParams(TypedDict, total=False):
257265
"""
258266

259267

268+
class PaymentConfigurationPaymentProvider(TypedDict, total=False):
269+
provider_type: Required[Literal["stripe"]]
270+
"""The payment provider to configure."""
271+
272+
excluded_payment_method_types: SequenceNotStr[str]
273+
"""List of Stripe payment method types to exclude for this customer.
274+
275+
Excluded payment methods will not be available for the customer to select during
276+
payment, and will not be used for auto-collection. If a customer's default
277+
payment method becomes excluded, Orb will attempt to use the next available
278+
compatible payment method for auto-collection.
279+
"""
280+
281+
282+
class PaymentConfiguration(TypedDict, total=False):
283+
payment_providers: Iterable[PaymentConfigurationPaymentProvider]
284+
"""Provider-specific payment configuration."""
285+
286+
260287
class TaxConfigurationNewNumeralConfiguration(TypedDict, total=False):
261288
tax_exempt: Required[bool]
262289

src/orb/types/customer_update_params.py

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
from __future__ import annotations
44

5-
from typing import Dict, Union, Optional
5+
from typing import Dict, Union, Iterable, Optional
66
from typing_extensions import Literal, Required, TypeAlias, TypedDict
77

88
from .._types import SequenceNotStr
@@ -17,6 +17,8 @@
1717

1818
__all__ = [
1919
"CustomerUpdateParams",
20+
"PaymentConfiguration",
21+
"PaymentConfigurationPaymentProvider",
2022
"TaxConfiguration",
2123
"TaxConfigurationNewNumeralConfiguration",
2224
"TaxConfigurationNewAnrokConfiguration",
@@ -85,6 +87,12 @@ class CustomerUpdateParams(TypedDict, total=False):
8587
name: Optional[str]
8688
"""The full name of the customer"""
8789

90+
payment_configuration: Optional[PaymentConfiguration]
91+
"""
92+
Payment configuration for the customer, applicable when using Orb Invoicing with
93+
a supported payment provider such as Stripe.
94+
"""
95+
8896
payment_provider: Optional[Literal["quickbooks", "bill.com", "stripe_charge", "stripe_invoice", "netsuite"]]
8997
"""This is used for creating charges or invoices in an external system via Orb.
9098
@@ -257,6 +265,25 @@ class CustomerUpdateParams(TypedDict, total=False):
257265
"""
258266

259267

268+
class PaymentConfigurationPaymentProvider(TypedDict, total=False):
269+
provider_type: Required[Literal["stripe"]]
270+
"""The payment provider to configure."""
271+
272+
excluded_payment_method_types: SequenceNotStr[str]
273+
"""List of Stripe payment method types to exclude for this customer.
274+
275+
Excluded payment methods will not be available for the customer to select during
276+
payment, and will not be used for auto-collection. If a customer's default
277+
payment method becomes excluded, Orb will attempt to use the next available
278+
compatible payment method for auto-collection.
279+
"""
280+
281+
282+
class PaymentConfiguration(TypedDict, total=False):
283+
payment_providers: Iterable[PaymentConfigurationPaymentProvider]
284+
"""Provider-specific payment configuration."""
285+
286+
260287
class TaxConfigurationNewNumeralConfiguration(TypedDict, total=False):
261288
tax_exempt: Required[bool]
262289

0 commit comments

Comments
 (0)