diff --git a/.stats.yml b/.stats.yml index e670c77..6a74fe0 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 97 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-bf3e71b33372f4a9307f4b6cb689ea46b3cf583ecc5d79eee9601cd0b0467c9a.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-0f43f737c6520ed2a2407628511350362959997f89a868c50aa38d47d5791171.yml diff --git a/src/resources/subscriptions.ts b/src/resources/subscriptions.ts index 95c807f..4978ecb 100644 --- a/src/resources/subscriptions.ts +++ b/src/resources/subscriptions.ts @@ -18360,6 +18360,8 @@ export interface SubscriptionSchedulePlanChangeParams { */ billing_cycle_alignment?: 'unchanged' | 'plan_change_date' | 'start_of_month' | null; + billing_cycle_anchor_configuration?: SubscriptionSchedulePlanChangeParams.BillingCycleAnchorConfiguration | null; + /** * The date that the plan change should take effect. This parameter can only be * passed if the `change_option` is `requested_date`. @@ -20946,6 +20948,29 @@ export namespace SubscriptionSchedulePlanChangeParams { } } + export interface BillingCycleAnchorConfiguration { + /** + * The day of the month on which the billing cycle is anchored. If the maximum + * number of days in a month is greater than this value, the last day of the month + * is the billing cycle day (e.g. billing_cycle_day=31 for April means the billing + * period begins on the 30th. + */ + day: number; + + /** + * The month on which the billing cycle is anchored (e.g. a quarterly price + * anchored in February would have cycles starting February, May, August, and + * November). + */ + month?: number | null; + + /** + * The year on which the billing cycle is anchored (e.g. a 2 year billing cycle + * anchored on 2021 would have cycles starting on 2021, 2023, 2025, etc.). + */ + year?: number | null; + } + export interface RemoveAdjustment { /** * The id of the adjustment to remove on the subscription. diff --git a/tests/api-resources/subscriptions.test.ts b/tests/api-resources/subscriptions.test.ts index bc260de..796d8b3 100644 --- a/tests/api-resources/subscriptions.test.ts +++ b/tests/api-resources/subscriptions.test.ts @@ -300,6 +300,7 @@ describe('resource subscriptions', () => { align_billing_with_plan_change_date: true, auto_collection: true, billing_cycle_alignment: 'unchanged', + billing_cycle_anchor_configuration: { day: 1, month: 1, year: 0 }, change_date: '2017-07-21T17:32:28Z', coupon_redemption_code: 'coupon_redemption_code', credits_overage_rate: 0,