Skip to content

Commit

Permalink
feat(api): api update (#400)
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-app[bot] committed Nov 25, 2024
1 parent 86d8441 commit 8d68277
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .stats.yml
Original file line number Diff line number Diff line change
@@ -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
25 changes: 25 additions & 0 deletions src/resources/subscriptions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
Expand Down Expand Up @@ -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.
Expand Down
1 change: 1 addition & 0 deletions tests/api-resources/subscriptions.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 8d68277

Please sign in to comment.