diff --git a/.release-please-manifest.json b/.release-please-manifest.json index cee13033..337f0cda 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "5.27.0" + ".": "5.28.0" } diff --git a/.stats.yml b/.stats.yml index 467b7cc3..5d845f55 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 118 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-5b9152241ebdd0d2f3fd536784f33721d24a5c4a59e75cab366a3dcb36552d3d.yml -openapi_spec_hash: b40061d10bbe1ebab8998bddd1827cf8 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-f2b97a2c3e41f618dc8955ed325092320ff2170a7d7a9a26a31dc235c969b657.yml +openapi_spec_hash: 64548564dc8ce80ef3ad38fc8cb56b30 config_hash: dd4343ce95871032ef6e0735a4ca038c diff --git a/CHANGELOG.md b/CHANGELOG.md index 72231b7c..1b01261d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 5.28.0 (2025-11-05) + +Full Changelog: [v5.27.0...v5.28.0](https://github.com/orbcorp/orb-node/compare/v5.27.0...v5.28.0) + +### Features + +* **api:** api update ([c6adfcd](https://github.com/orbcorp/orb-node/commit/c6adfcddb900c27adf353be1ef0cbd932cb68da3)) + ## 5.27.0 (2025-11-04) Full Changelog: [v5.26.0...v5.27.0](https://github.com/orbcorp/orb-node/compare/v5.26.0...v5.27.0) diff --git a/package.json b/package.json index 70e558d2..231658a3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "orb-billing", - "version": "5.27.0", + "version": "5.28.0", "description": "The official TypeScript library for the Orb API", "author": "Orb ", "types": "dist/index.d.ts", diff --git a/src/resources/shared.ts b/src/resources/shared.ts index 443db1f3..e4b39cd2 100644 --- a/src/resources/shared.ts +++ b/src/resources/shared.ts @@ -14182,6 +14182,13 @@ export interface PriceInterval { */ billing_cycle_day: number; + /** + * For in-arrears prices. If true, and the price interval ends mid-cycle, the final + * line item will be deferred to the next scheduled invoice instead of being billed + * mid-cycle. + */ + can_defer_billing: boolean; + /** * The end of the current billing period. This is an exclusive timestamp, such that * the instant returned is exactly the end of the billing period. Set to null if @@ -14341,6 +14348,11 @@ export interface TieredConfig { * Tiers for rating based on total usage quantities into the specified tier */ tiers: Array; + + /** + * If true, subtotals from this price are prorated based on the service period + */ + prorated?: boolean; } export interface TieredConversionRateConfig { @@ -14403,6 +14415,11 @@ export interface UnitConfig { * Rate per unit of usage */ unit_amount: string; + + /** + * If true, subtotals from this price are prorated based on the service period + */ + prorated?: boolean; } export interface UnitConversionRateConfig { diff --git a/src/resources/subscriptions.ts b/src/resources/subscriptions.ts index 86ca4b30..37ff53b6 100644 --- a/src/resources/subscriptions.ts +++ b/src/resources/subscriptions.ts @@ -6480,6 +6480,13 @@ export interface SubscriptionPriceIntervalsParams { */ allow_invoice_credit_or_void?: boolean | null; + /** + * If true, ending an in-arrears price interval mid-cycle will defer billing the + * final line itemuntil the next scheduled invoice. If false, it will be billed on + * its end date. If not provided, behaviorwill follow account default. + */ + can_defer_billing?: boolean | null; + /** * A list of price intervals to edit on the subscription. */ @@ -7182,6 +7189,13 @@ export namespace SubscriptionPriceIntervalsParams { */ billing_cycle_day?: number | null; + /** + * If true, ending an in-arrears price interval mid-cycle will defer billing the + * final line itemuntil the next scheduled invoice. If false, it will be billed on + * its end date. If not provided, behaviorwill follow account default. + */ + can_defer_billing?: boolean | null; + /** * The updated end date of this price interval. If not specified, the end date will * not be updated. diff --git a/src/version.ts b/src/version.ts index 77ee9e8c..fa20f6b6 100644 --- a/src/version.ts +++ b/src/version.ts @@ -1 +1 @@ -export const VERSION = '5.27.0'; // x-release-please-version +export const VERSION = '5.28.0'; // x-release-please-version diff --git a/tests/api-resources/beta/beta.test.ts b/tests/api-resources/beta/beta.test.ts index 3a607c25..f1a95a14 100644 --- a/tests/api-resources/beta/beta.test.ts +++ b/tests/api-resources/beta/beta.test.ts @@ -55,7 +55,7 @@ describe('resource beta', () => { item_id: 'item_id', model_type: 'unit', name: 'Annual fee', - unit_config: { unit_amount: 'unit_amount' }, + unit_config: { unit_amount: 'unit_amount', prorated: true }, billable_metric_id: 'billable_metric_id', billed_in_advance: true, billing_cycle_configuration: { duration: 0, duration_unit: 'day' }, @@ -115,7 +115,7 @@ describe('resource beta', () => { item_id: 'item_id', model_type: 'unit', name: 'Annual fee', - unit_config: { unit_amount: 'unit_amount' }, + unit_config: { unit_amount: 'unit_amount', prorated: true }, billable_metric_id: 'billable_metric_id', billed_in_advance: true, billing_cycle_configuration: { duration: 0, duration_unit: 'day' }, diff --git a/tests/api-resources/beta/external-plan-id.test.ts b/tests/api-resources/beta/external-plan-id.test.ts index ef868138..c4c0d3f2 100644 --- a/tests/api-resources/beta/external-plan-id.test.ts +++ b/tests/api-resources/beta/external-plan-id.test.ts @@ -55,7 +55,7 @@ describe('resource externalPlanId', () => { item_id: 'item_id', model_type: 'unit', name: 'Annual fee', - unit_config: { unit_amount: 'unit_amount' }, + unit_config: { unit_amount: 'unit_amount', prorated: true }, billable_metric_id: 'billable_metric_id', billed_in_advance: true, billing_cycle_configuration: { duration: 0, duration_unit: 'day' }, @@ -115,7 +115,7 @@ describe('resource externalPlanId', () => { item_id: 'item_id', model_type: 'unit', name: 'Annual fee', - unit_config: { unit_amount: 'unit_amount' }, + unit_config: { unit_amount: 'unit_amount', prorated: true }, billable_metric_id: 'billable_metric_id', billed_in_advance: true, billing_cycle_configuration: { duration: 0, duration_unit: 'day' }, diff --git a/tests/api-resources/invoices.test.ts b/tests/api-resources/invoices.test.ts index f6e88c6c..0a5755e9 100644 --- a/tests/api-resources/invoices.test.ts +++ b/tests/api-resources/invoices.test.ts @@ -46,7 +46,7 @@ describe('resource invoices', () => { name: 'Line Item Name', quantity: 1, start_date: '2023-09-22', - unit_config: { unit_amount: 'unit_amount' }, + unit_config: { unit_amount: 'unit_amount', prorated: true }, }, ], customer_id: '4khy3nwzktxv7', diff --git a/tests/api-resources/plans/plans.test.ts b/tests/api-resources/plans/plans.test.ts index 1fd86e31..32374d9a 100644 --- a/tests/api-resources/plans/plans.test.ts +++ b/tests/api-resources/plans/plans.test.ts @@ -40,7 +40,7 @@ describe('resource plans', () => { item_id: 'item_id', model_type: 'unit', name: 'Annual fee', - unit_config: { unit_amount: 'unit_amount' }, + unit_config: { unit_amount: 'unit_amount', prorated: true }, billable_metric_id: 'billable_metric_id', billed_in_advance: true, billing_cycle_configuration: { duration: 0, duration_unit: 'day' }, diff --git a/tests/api-resources/prices/prices.test.ts b/tests/api-resources/prices/prices.test.ts index 1b457bc9..0ad171cc 100644 --- a/tests/api-resources/prices/prices.test.ts +++ b/tests/api-resources/prices/prices.test.ts @@ -34,7 +34,7 @@ describe('resource prices', () => { item_id: 'item_id', model_type: 'unit', name: 'Annual fee', - unit_config: { unit_amount: 'unit_amount' }, + unit_config: { unit_amount: 'unit_amount', prorated: true }, billable_metric_id: 'billable_metric_id', billed_in_advance: true, billing_cycle_configuration: { duration: 0, duration_unit: 'day' }, @@ -143,7 +143,7 @@ describe('resource prices', () => { item_id: 'item_id', model_type: 'unit', name: 'Annual fee', - unit_config: { unit_amount: 'unit_amount' }, + unit_config: { unit_amount: 'unit_amount', prorated: true }, billable_metric_id: 'billable_metric_id', billed_in_advance: true, billing_cycle_configuration: { duration: 0, duration_unit: 'day' }, @@ -209,7 +209,7 @@ describe('resource prices', () => { item_id: 'item_id', model_type: 'unit', name: 'Annual fee', - unit_config: { unit_amount: 'unit_amount' }, + unit_config: { unit_amount: 'unit_amount', prorated: true }, billable_metric_id: 'billable_metric_id', billed_in_advance: true, billing_cycle_configuration: { duration: 0, duration_unit: 'day' }, diff --git a/tests/api-resources/subscriptions.test.ts b/tests/api-resources/subscriptions.test.ts index f6b96c57..e2e5fa41 100644 --- a/tests/api-resources/subscriptions.test.ts +++ b/tests/api-resources/subscriptions.test.ts @@ -320,7 +320,7 @@ describe('resource subscriptions', () => { item_id: 'item_id', model_type: 'unit', name: 'Annual fee', - unit_config: { unit_amount: 'unit_amount' }, + unit_config: { unit_amount: 'unit_amount', prorated: true }, billable_metric_id: 'billable_metric_id', billed_in_advance: true, billing_cycle_configuration: { duration: 0, duration_unit: 'day' }, @@ -409,7 +409,7 @@ describe('resource subscriptions', () => { item_id: 'item_id', model_type: 'unit', name: 'Annual fee', - unit_config: { unit_amount: 'unit_amount' }, + unit_config: { unit_amount: 'unit_amount', prorated: true }, billable_metric_id: 'billable_metric_id', billed_in_advance: true, billing_cycle_configuration: { duration: 0, duration_unit: 'day' },