Skip to content

Commit 478e200

Browse files
stainless-app[bot]Stainless Bot
authored and
Stainless Bot
committed
feat(api): OpenAPI spec update via Stainless API (#372)
1 parent 4068313 commit 478e200

File tree

6 files changed

+137
-12
lines changed

6 files changed

+137
-12
lines changed

.stats.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
configured_endpoints: 93
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-3a9214e6a8bf5952997fd2a3b6521804ab82d2cff40ed2ecb3b3cb512fe3bf35.yml
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-4df283466fdce46e787565c6480138896b1d7ed98d68a79d5eb3438bed191276.yml

pyproject.toml

-4
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ dependencies = [
1515
"distro>=1.7.0, <2",
1616
"sniffio",
1717
"cached-property; python_version < '3.8'",
18-
1918
]
2019
requires-python = ">= 3.7"
2120
classifiers = [
@@ -36,8 +35,6 @@ classifiers = [
3635
"License :: OSI Approved :: Apache Software License"
3736
]
3837

39-
40-
4138
[project.urls]
4239
Homepage = "https://github.com/orbcorp/orb-python"
4340
Repository = "https://github.com/orbcorp/orb-python"
@@ -59,7 +56,6 @@ dev-dependencies = [
5956
"dirty-equals>=0.6.0",
6057
"importlib-metadata>=6.7.0",
6158
"rich>=13.7.1",
62-
6359
]
6460

6561
[tool.rye.scripts]

src/orb/resources/subscriptions.py

+78-2
Original file line numberDiff line numberDiff line change
@@ -477,13 +477,34 @@ def create(
477477
$10.00 for a subscription that invoices in USD.
478478
479479
Args:
480+
auto_collection: Determines whether issued invoices for this subscription will automatically be
481+
charged with the saved payment method on the due date. If not specified, this
482+
defaults to the behavior configured for this customer.
483+
484+
coupon_redemption_code: Redemption code to be used for this subscription. If the coupon cannot be found
485+
by its redemption code, or cannot be redeemed, an error response will be
486+
returned and the subscription creation or plan change will not be scheduled.
487+
488+
default_invoice_memo: Determines the default memo on this subscription's invoices. Note that if this
489+
is not provided, it is determined by the plan configuration.
490+
480491
external_plan_id: The external_plan_id of the plan that the given subscription should be switched
481492
to. Note that either this property or `plan_id` must be specified.
482493
494+
initial_phase_order: The phase of the plan to start with
495+
496+
invoicing_threshold: When this subscription's accrued usage reaches this threshold, an invoice will
497+
be issued for the subscription. If not specified, invoices will only be issued
498+
at the end of the billing period.
499+
483500
metadata: User-specified key/value pairs for the resource. Individual keys can be removed
484501
by setting the value to `null`, and the entire metadata mapping can be cleared
485502
by setting `metadata` to `null`.
486503
504+
net_terms: The net terms determines the difference between the invoice date and the issue
505+
date for the invoice. If you intend the invoice to be due on issue, set this
506+
to 0. If not provided, this defaults to the value specified in the plan.
507+
487508
plan_id: The plan that the given subscription should be switched to. Note that either
488509
this property or `external_plan_id` must be specified.
489510
@@ -1377,14 +1398,17 @@ def schedule_plan_change(
13771398
*,
13781399
change_option: Literal["requested_date", "end_of_subscription_term", "immediate"],
13791400
align_billing_with_plan_change_date: Optional[bool] | NotGiven = NOT_GIVEN,
1401+
auto_collection: Optional[bool] | NotGiven = NOT_GIVEN,
13801402
billing_cycle_alignment: Optional[Literal["unchanged", "plan_change_date", "start_of_month"]]
13811403
| NotGiven = NOT_GIVEN,
13821404
change_date: Union[str, datetime, None] | NotGiven = NOT_GIVEN,
13831405
coupon_redemption_code: Optional[str] | NotGiven = NOT_GIVEN,
13841406
credits_overage_rate: Optional[float] | NotGiven = NOT_GIVEN,
1407+
default_invoice_memo: Optional[str] | NotGiven = NOT_GIVEN,
13851408
external_plan_id: Optional[str] | NotGiven = NOT_GIVEN,
13861409
initial_phase_order: Optional[int] | NotGiven = NOT_GIVEN,
13871410
invoicing_threshold: Optional[str] | NotGiven = NOT_GIVEN,
1411+
net_terms: Optional[int] | NotGiven = NOT_GIVEN,
13881412
per_credit_overage_amount: Optional[float] | NotGiven = NOT_GIVEN,
13891413
plan_id: Optional[str] | NotGiven = NOT_GIVEN,
13901414
price_overrides: Optional[Iterable[subscription_schedule_plan_change_params.PriceOverride]]
@@ -1448,6 +1472,10 @@ def schedule_plan_change(
14481472
align_billing_with_plan_change_date: [DEPRECATED] Use billing_cycle_alignment instead. Reset billing periods to be
14491473
aligned with the plan change's effective date.
14501474
1475+
auto_collection: Determines whether issued invoices for this subscription will automatically be
1476+
charged with the saved payment method on the due date. If not specified, this
1477+
defaults to the behavior configured for this customer.
1478+
14511479
billing_cycle_alignment: Reset billing periods to be aligned with the plan change's effective date or
14521480
start of the month. Defaults to `unchanged` which keeps subscription's existing
14531481
billing cycle alignment.
@@ -1457,7 +1485,10 @@ def schedule_plan_change(
14571485
14581486
coupon_redemption_code: Redemption code to be used for this subscription. If the coupon cannot be found
14591487
by its redemption code, or cannot be redeemed, an error response will be
1460-
returned and the plan change will not be scheduled.
1488+
returned and the subscription creation or plan change will not be scheduled.
1489+
1490+
default_invoice_memo: Determines the default memo on this subscription's invoices. Note that if this
1491+
is not provided, it is determined by the plan configuration.
14611492
14621493
external_plan_id: The external_plan_id of the plan that the given subscription should be switched
14631494
to. Note that either this property or `plan_id` must be specified.
@@ -1468,6 +1499,10 @@ def schedule_plan_change(
14681499
be issued for the subscription. If not specified, invoices will only be issued
14691500
at the end of the billing period.
14701501
1502+
net_terms: The net terms determines the difference between the invoice date and the issue
1503+
date for the invoice. If you intend the invoice to be due on issue, set this
1504+
to 0. If not provided, this defaults to the value specified in the plan.
1505+
14711506
plan_id: The plan that the given subscription should be switched to. Note that either
14721507
this property or `external_plan_id` must be specified.
14731508
@@ -1491,13 +1526,16 @@ def schedule_plan_change(
14911526
{
14921527
"change_option": change_option,
14931528
"align_billing_with_plan_change_date": align_billing_with_plan_change_date,
1529+
"auto_collection": auto_collection,
14941530
"billing_cycle_alignment": billing_cycle_alignment,
14951531
"change_date": change_date,
14961532
"coupon_redemption_code": coupon_redemption_code,
14971533
"credits_overage_rate": credits_overage_rate,
1534+
"default_invoice_memo": default_invoice_memo,
14981535
"external_plan_id": external_plan_id,
14991536
"initial_phase_order": initial_phase_order,
15001537
"invoicing_threshold": invoicing_threshold,
1538+
"net_terms": net_terms,
15011539
"per_credit_overage_amount": per_credit_overage_amount,
15021540
"plan_id": plan_id,
15031541
"price_overrides": price_overrides,
@@ -2212,13 +2250,34 @@ async def create(
22122250
$10.00 for a subscription that invoices in USD.
22132251
22142252
Args:
2253+
auto_collection: Determines whether issued invoices for this subscription will automatically be
2254+
charged with the saved payment method on the due date. If not specified, this
2255+
defaults to the behavior configured for this customer.
2256+
2257+
coupon_redemption_code: Redemption code to be used for this subscription. If the coupon cannot be found
2258+
by its redemption code, or cannot be redeemed, an error response will be
2259+
returned and the subscription creation or plan change will not be scheduled.
2260+
2261+
default_invoice_memo: Determines the default memo on this subscription's invoices. Note that if this
2262+
is not provided, it is determined by the plan configuration.
2263+
22152264
external_plan_id: The external_plan_id of the plan that the given subscription should be switched
22162265
to. Note that either this property or `plan_id` must be specified.
22172266
2267+
initial_phase_order: The phase of the plan to start with
2268+
2269+
invoicing_threshold: When this subscription's accrued usage reaches this threshold, an invoice will
2270+
be issued for the subscription. If not specified, invoices will only be issued
2271+
at the end of the billing period.
2272+
22182273
metadata: User-specified key/value pairs for the resource. Individual keys can be removed
22192274
by setting the value to `null`, and the entire metadata mapping can be cleared
22202275
by setting `metadata` to `null`.
22212276
2277+
net_terms: The net terms determines the difference between the invoice date and the issue
2278+
date for the invoice. If you intend the invoice to be due on issue, set this
2279+
to 0. If not provided, this defaults to the value specified in the plan.
2280+
22222281
plan_id: The plan that the given subscription should be switched to. Note that either
22232282
this property or `external_plan_id` must be specified.
22242283
@@ -3112,14 +3171,17 @@ async def schedule_plan_change(
31123171
*,
31133172
change_option: Literal["requested_date", "end_of_subscription_term", "immediate"],
31143173
align_billing_with_plan_change_date: Optional[bool] | NotGiven = NOT_GIVEN,
3174+
auto_collection: Optional[bool] | NotGiven = NOT_GIVEN,
31153175
billing_cycle_alignment: Optional[Literal["unchanged", "plan_change_date", "start_of_month"]]
31163176
| NotGiven = NOT_GIVEN,
31173177
change_date: Union[str, datetime, None] | NotGiven = NOT_GIVEN,
31183178
coupon_redemption_code: Optional[str] | NotGiven = NOT_GIVEN,
31193179
credits_overage_rate: Optional[float] | NotGiven = NOT_GIVEN,
3180+
default_invoice_memo: Optional[str] | NotGiven = NOT_GIVEN,
31203181
external_plan_id: Optional[str] | NotGiven = NOT_GIVEN,
31213182
initial_phase_order: Optional[int] | NotGiven = NOT_GIVEN,
31223183
invoicing_threshold: Optional[str] | NotGiven = NOT_GIVEN,
3184+
net_terms: Optional[int] | NotGiven = NOT_GIVEN,
31233185
per_credit_overage_amount: Optional[float] | NotGiven = NOT_GIVEN,
31243186
plan_id: Optional[str] | NotGiven = NOT_GIVEN,
31253187
price_overrides: Optional[Iterable[subscription_schedule_plan_change_params.PriceOverride]]
@@ -3183,6 +3245,10 @@ async def schedule_plan_change(
31833245
align_billing_with_plan_change_date: [DEPRECATED] Use billing_cycle_alignment instead. Reset billing periods to be
31843246
aligned with the plan change's effective date.
31853247
3248+
auto_collection: Determines whether issued invoices for this subscription will automatically be
3249+
charged with the saved payment method on the due date. If not specified, this
3250+
defaults to the behavior configured for this customer.
3251+
31863252
billing_cycle_alignment: Reset billing periods to be aligned with the plan change's effective date or
31873253
start of the month. Defaults to `unchanged` which keeps subscription's existing
31883254
billing cycle alignment.
@@ -3192,7 +3258,10 @@ async def schedule_plan_change(
31923258
31933259
coupon_redemption_code: Redemption code to be used for this subscription. If the coupon cannot be found
31943260
by its redemption code, or cannot be redeemed, an error response will be
3195-
returned and the plan change will not be scheduled.
3261+
returned and the subscription creation or plan change will not be scheduled.
3262+
3263+
default_invoice_memo: Determines the default memo on this subscription's invoices. Note that if this
3264+
is not provided, it is determined by the plan configuration.
31963265
31973266
external_plan_id: The external_plan_id of the plan that the given subscription should be switched
31983267
to. Note that either this property or `plan_id` must be specified.
@@ -3203,6 +3272,10 @@ async def schedule_plan_change(
32033272
be issued for the subscription. If not specified, invoices will only be issued
32043273
at the end of the billing period.
32053274
3275+
net_terms: The net terms determines the difference between the invoice date and the issue
3276+
date for the invoice. If you intend the invoice to be due on issue, set this
3277+
to 0. If not provided, this defaults to the value specified in the plan.
3278+
32063279
plan_id: The plan that the given subscription should be switched to. Note that either
32073280
this property or `external_plan_id` must be specified.
32083281
@@ -3226,13 +3299,16 @@ async def schedule_plan_change(
32263299
{
32273300
"change_option": change_option,
32283301
"align_billing_with_plan_change_date": align_billing_with_plan_change_date,
3302+
"auto_collection": auto_collection,
32293303
"billing_cycle_alignment": billing_cycle_alignment,
32303304
"change_date": change_date,
32313305
"coupon_redemption_code": coupon_redemption_code,
32323306
"credits_overage_rate": credits_overage_rate,
3307+
"default_invoice_memo": default_invoice_memo,
32333308
"external_plan_id": external_plan_id,
32343309
"initial_phase_order": initial_phase_order,
32353310
"invoicing_threshold": invoicing_threshold,
3311+
"net_terms": net_terms,
32363312
"per_credit_overage_amount": per_credit_overage_amount,
32373313
"plan_id": plan_id,
32383314
"price_overrides": price_overrides,

src/orb/types/subscription_create_params.py

+26
Original file line numberDiff line numberDiff line change
@@ -64,18 +64,33 @@ class SubscriptionCreateParams(TypedDict, total=False):
6464
align_billing_with_subscription_start_date: bool
6565

6666
auto_collection: Optional[bool]
67+
"""
68+
Determines whether issued invoices for this subscription will automatically be
69+
charged with the saved payment method on the due date. If not specified, this
70+
defaults to the behavior configured for this customer.
71+
"""
6772

6873
aws_region: Optional[str]
6974

7075
billing_cycle_anchor_configuration: Optional[BillingCycleAnchorConfiguration]
7176

7277
coupon_redemption_code: Optional[str]
78+
"""Redemption code to be used for this subscription.
79+
80+
If the coupon cannot be found by its redemption code, or cannot be redeemed, an
81+
error response will be returned and the subscription creation or plan change
82+
will not be scheduled.
83+
"""
7384

7485
credits_overage_rate: Optional[float]
7586

7687
customer_id: Optional[str]
7788

7889
default_invoice_memo: Optional[str]
90+
"""Determines the default memo on this subscription's invoices.
91+
92+
Note that if this is not provided, it is determined by the plan configuration.
93+
"""
7994

8095
end_date: Annotated[Union[str, datetime, None], PropertyInfo(format="iso8601")]
8196

@@ -92,8 +107,14 @@ class SubscriptionCreateParams(TypedDict, total=False):
92107
"""
93108

94109
initial_phase_order: Optional[int]
110+
"""The phase of the plan to start with"""
95111

96112
invoicing_threshold: Optional[str]
113+
"""
114+
When this subscription's accrued usage reaches this threshold, an invoice will
115+
be issued for the subscription. If not specified, invoices will only be issued
116+
at the end of the billing period.
117+
"""
97118

98119
metadata: Optional[Dict[str, Optional[str]]]
99120
"""User-specified key/value pairs for the resource.
@@ -103,6 +124,11 @@ class SubscriptionCreateParams(TypedDict, total=False):
103124
"""
104125

105126
net_terms: Optional[int]
127+
"""
128+
The net terms determines the difference between the invoice date and the issue
129+
date for the invoice. If you intend the invoice to be due on issue, set this
130+
to 0. If not provided, this defaults to the value specified in the plan.
131+
"""
106132

107133
per_credit_overage_amount: Optional[float]
108134

src/orb/types/subscription_schedule_plan_change_params.py

+22-1
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,13 @@ class SubscriptionSchedulePlanChangeParams(TypedDict, total=False):
6868
Reset billing periods to be aligned with the plan change's effective date.
6969
"""
7070

71+
auto_collection: Optional[bool]
72+
"""
73+
Determines whether issued invoices for this subscription will automatically be
74+
charged with the saved payment method on the due date. If not specified, this
75+
defaults to the behavior configured for this customer.
76+
"""
77+
7178
billing_cycle_alignment: Optional[Literal["unchanged", "plan_change_date", "start_of_month"]]
7279
"""
7380
Reset billing periods to be aligned with the plan change's effective date or
@@ -85,11 +92,18 @@ class SubscriptionSchedulePlanChangeParams(TypedDict, total=False):
8592
"""Redemption code to be used for this subscription.
8693
8794
If the coupon cannot be found by its redemption code, or cannot be redeemed, an
88-
error response will be returned and the plan change will not be scheduled.
95+
error response will be returned and the subscription creation or plan change
96+
will not be scheduled.
8997
"""
9098

9199
credits_overage_rate: Optional[float]
92100

101+
default_invoice_memo: Optional[str]
102+
"""Determines the default memo on this subscription's invoices.
103+
104+
Note that if this is not provided, it is determined by the plan configuration.
105+
"""
106+
93107
external_plan_id: Optional[str]
94108
"""
95109
The external_plan_id of the plan that the given subscription should be switched
@@ -106,6 +120,13 @@ class SubscriptionSchedulePlanChangeParams(TypedDict, total=False):
106120
at the end of the billing period.
107121
"""
108122

123+
net_terms: Optional[int]
124+
"""
125+
The net terms determines the difference between the invoice date and the issue
126+
date for the invoice. If you intend the invoice to be due on issue, set this
127+
to 0. If not provided, this defaults to the value specified in the plan.
128+
"""
129+
109130
per_credit_overage_amount: Optional[float]
110131

111132
plan_id: Optional[str]

0 commit comments

Comments
 (0)