From c0847275be95bddf7408ab85d89474b632991c83 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 3 Feb 2025 17:01:35 +0000 Subject: [PATCH 1/3] chore: fix references to nested types (#495) --- src/resources/customers/credits/ledger.ts | 4 +- src/resources/prices/prices.ts | 118 +++++++++++----------- 2 files changed, 61 insertions(+), 61 deletions(-) diff --git a/src/resources/customers/credits/ledger.ts b/src/resources/customers/credits/ledger.ts index f6fba10f..6a4483e6 100644 --- a/src/resources/customers/credits/ledger.ts +++ b/src/resources/customers/credits/ledger.ts @@ -2075,7 +2075,7 @@ export declare namespace LedgerCreateEntryParams { * per_unit_cost_basis, as the calculation of the invoice total is done on that * basis. */ - invoice_settings?: LedgerCreateEntryParams.AddIncrementCreditLedgerEntryRequestParams.InvoiceSettings | null; + invoice_settings?: AddIncrementCreditLedgerEntryRequestParams.InvoiceSettings | null; /** * User-specified key/value pairs for the resource. Individual keys can be removed @@ -2326,7 +2326,7 @@ export declare namespace LedgerCreateEntryByExternalIDParams { * per_unit_cost_basis, as the calculation of the invoice total is done on that * basis. */ - invoice_settings?: LedgerCreateEntryByExternalIDParams.AddIncrementCreditLedgerEntryRequestParams.InvoiceSettings | null; + invoice_settings?: AddIncrementCreditLedgerEntryRequestParams.InvoiceSettings | null; /** * User-specified key/value pairs for the resource. Individual keys can be removed diff --git a/src/resources/prices/prices.ts b/src/resources/prices/prices.ts index 59e9c7a3..0fff3c56 100644 --- a/src/resources/prices/prices.ts +++ b/src/resources/prices/prices.ts @@ -3165,7 +3165,7 @@ export declare namespace PriceCreateParams { */ name: string; - unit_config: PriceCreateParams.NewFloatingUnitPrice.UnitConfig; + unit_config: NewFloatingUnitPrice.UnitConfig; /** * The id of the billable metric for the price. Only needed if the price is @@ -3183,7 +3183,7 @@ export declare namespace PriceCreateParams { * For custom cadence: specifies the duration of the billing period in days or * months. */ - billing_cycle_configuration?: PriceCreateParams.NewFloatingUnitPrice.BillingCycleConfiguration | null; + billing_cycle_configuration?: NewFloatingUnitPrice.BillingCycleConfiguration | null; /** * The per unit conversion rate of the price currency to the invoicing currency. @@ -3210,7 +3210,7 @@ export declare namespace PriceCreateParams { * Within each billing cycle, specifies the cadence at which invoices are produced. * If unspecified, a single invoice is produced per billing cycle. */ - invoicing_cycle_configuration?: PriceCreateParams.NewFloatingUnitPrice.InvoicingCycleConfiguration | null; + invoicing_cycle_configuration?: NewFloatingUnitPrice.InvoicingCycleConfiguration | null; /** * User-specified key/value pairs for the resource. Individual keys can be removed @@ -3284,7 +3284,7 @@ export declare namespace PriceCreateParams { */ name: string; - package_config: PriceCreateParams.NewFloatingPackagePrice.PackageConfig; + package_config: NewFloatingPackagePrice.PackageConfig; /** * The id of the billable metric for the price. Only needed if the price is @@ -3302,7 +3302,7 @@ export declare namespace PriceCreateParams { * For custom cadence: specifies the duration of the billing period in days or * months. */ - billing_cycle_configuration?: PriceCreateParams.NewFloatingPackagePrice.BillingCycleConfiguration | null; + billing_cycle_configuration?: NewFloatingPackagePrice.BillingCycleConfiguration | null; /** * The per unit conversion rate of the price currency to the invoicing currency. @@ -3329,7 +3329,7 @@ export declare namespace PriceCreateParams { * Within each billing cycle, specifies the cadence at which invoices are produced. * If unspecified, a single invoice is produced per billing cycle. */ - invoicing_cycle_configuration?: PriceCreateParams.NewFloatingPackagePrice.InvoicingCycleConfiguration | null; + invoicing_cycle_configuration?: NewFloatingPackagePrice.InvoicingCycleConfiguration | null; /** * User-specified key/value pairs for the resource. Individual keys can be removed @@ -3402,7 +3402,7 @@ export declare namespace PriceCreateParams { */ item_id: string; - matrix_config: PriceCreateParams.NewFloatingMatrixPrice.MatrixConfig; + matrix_config: NewFloatingMatrixPrice.MatrixConfig; model_type: 'matrix'; @@ -3427,7 +3427,7 @@ export declare namespace PriceCreateParams { * For custom cadence: specifies the duration of the billing period in days or * months. */ - billing_cycle_configuration?: PriceCreateParams.NewFloatingMatrixPrice.BillingCycleConfiguration | null; + billing_cycle_configuration?: NewFloatingMatrixPrice.BillingCycleConfiguration | null; /** * The per unit conversion rate of the price currency to the invoicing currency. @@ -3454,7 +3454,7 @@ export declare namespace PriceCreateParams { * Within each billing cycle, specifies the cadence at which invoices are produced. * If unspecified, a single invoice is produced per billing cycle. */ - invoicing_cycle_configuration?: PriceCreateParams.NewFloatingMatrixPrice.InvoicingCycleConfiguration | null; + invoicing_cycle_configuration?: NewFloatingMatrixPrice.InvoicingCycleConfiguration | null; /** * User-specified key/value pairs for the resource. Individual keys can be removed @@ -3547,7 +3547,7 @@ export declare namespace PriceCreateParams { */ item_id: string; - matrix_with_allocation_config: PriceCreateParams.NewFloatingMatrixWithAllocationPrice.MatrixWithAllocationConfig; + matrix_with_allocation_config: NewFloatingMatrixWithAllocationPrice.MatrixWithAllocationConfig; model_type: 'matrix_with_allocation'; @@ -3572,7 +3572,7 @@ export declare namespace PriceCreateParams { * For custom cadence: specifies the duration of the billing period in days or * months. */ - billing_cycle_configuration?: PriceCreateParams.NewFloatingMatrixWithAllocationPrice.BillingCycleConfiguration | null; + billing_cycle_configuration?: NewFloatingMatrixWithAllocationPrice.BillingCycleConfiguration | null; /** * The per unit conversion rate of the price currency to the invoicing currency. @@ -3599,7 +3599,7 @@ export declare namespace PriceCreateParams { * Within each billing cycle, specifies the cadence at which invoices are produced. * If unspecified, a single invoice is produced per billing cycle. */ - invoicing_cycle_configuration?: PriceCreateParams.NewFloatingMatrixWithAllocationPrice.InvoicingCycleConfiguration | null; + invoicing_cycle_configuration?: NewFloatingMatrixWithAllocationPrice.InvoicingCycleConfiguration | null; /** * User-specified key/value pairs for the resource. Individual keys can be removed @@ -3704,7 +3704,7 @@ export declare namespace PriceCreateParams { */ name: string; - tiered_config: PriceCreateParams.NewFloatingTieredPrice.TieredConfig; + tiered_config: NewFloatingTieredPrice.TieredConfig; /** * The id of the billable metric for the price. Only needed if the price is @@ -3722,7 +3722,7 @@ export declare namespace PriceCreateParams { * For custom cadence: specifies the duration of the billing period in days or * months. */ - billing_cycle_configuration?: PriceCreateParams.NewFloatingTieredPrice.BillingCycleConfiguration | null; + billing_cycle_configuration?: NewFloatingTieredPrice.BillingCycleConfiguration | null; /** * The per unit conversion rate of the price currency to the invoicing currency. @@ -3749,7 +3749,7 @@ export declare namespace PriceCreateParams { * Within each billing cycle, specifies the cadence at which invoices are produced. * If unspecified, a single invoice is produced per billing cycle. */ - invoicing_cycle_configuration?: PriceCreateParams.NewFloatingTieredPrice.InvoicingCycleConfiguration | null; + invoicing_cycle_configuration?: NewFloatingTieredPrice.InvoicingCycleConfiguration | null; /** * User-specified key/value pairs for the resource. Individual keys can be removed @@ -3842,7 +3842,7 @@ export declare namespace PriceCreateParams { */ name: string; - tiered_bps_config: PriceCreateParams.NewFloatingTieredBpsPrice.TieredBpsConfig; + tiered_bps_config: NewFloatingTieredBpsPrice.TieredBpsConfig; /** * The id of the billable metric for the price. Only needed if the price is @@ -3860,7 +3860,7 @@ export declare namespace PriceCreateParams { * For custom cadence: specifies the duration of the billing period in days or * months. */ - billing_cycle_configuration?: PriceCreateParams.NewFloatingTieredBpsPrice.BillingCycleConfiguration | null; + billing_cycle_configuration?: NewFloatingTieredBpsPrice.BillingCycleConfiguration | null; /** * The per unit conversion rate of the price currency to the invoicing currency. @@ -3887,7 +3887,7 @@ export declare namespace PriceCreateParams { * Within each billing cycle, specifies the cadence at which invoices are produced. * If unspecified, a single invoice is produced per billing cycle. */ - invoicing_cycle_configuration?: PriceCreateParams.NewFloatingTieredBpsPrice.InvoicingCycleConfiguration | null; + invoicing_cycle_configuration?: NewFloatingTieredBpsPrice.InvoicingCycleConfiguration | null; /** * User-specified key/value pairs for the resource. Individual keys can be removed @@ -3964,7 +3964,7 @@ export declare namespace PriceCreateParams { } export interface NewFloatingBpsPrice { - bps_config: PriceCreateParams.NewFloatingBpsPrice.BpsConfig; + bps_config: NewFloatingBpsPrice.BpsConfig; /** * The cadence to bill for this price on. @@ -4004,7 +4004,7 @@ export declare namespace PriceCreateParams { * For custom cadence: specifies the duration of the billing period in days or * months. */ - billing_cycle_configuration?: PriceCreateParams.NewFloatingBpsPrice.BillingCycleConfiguration | null; + billing_cycle_configuration?: NewFloatingBpsPrice.BillingCycleConfiguration | null; /** * The per unit conversion rate of the price currency to the invoicing currency. @@ -4031,7 +4031,7 @@ export declare namespace PriceCreateParams { * Within each billing cycle, specifies the cadence at which invoices are produced. * If unspecified, a single invoice is produced per billing cycle. */ - invoicing_cycle_configuration?: PriceCreateParams.NewFloatingBpsPrice.InvoicingCycleConfiguration | null; + invoicing_cycle_configuration?: NewFloatingBpsPrice.InvoicingCycleConfiguration | null; /** * User-specified key/value pairs for the resource. Individual keys can be removed @@ -4088,7 +4088,7 @@ export declare namespace PriceCreateParams { } export interface NewFloatingBulkBpsPrice { - bulk_bps_config: PriceCreateParams.NewFloatingBulkBpsPrice.BulkBpsConfig; + bulk_bps_config: NewFloatingBulkBpsPrice.BulkBpsConfig; /** * The cadence to bill for this price on. @@ -4128,7 +4128,7 @@ export declare namespace PriceCreateParams { * For custom cadence: specifies the duration of the billing period in days or * months. */ - billing_cycle_configuration?: PriceCreateParams.NewFloatingBulkBpsPrice.BillingCycleConfiguration | null; + billing_cycle_configuration?: NewFloatingBulkBpsPrice.BillingCycleConfiguration | null; /** * The per unit conversion rate of the price currency to the invoicing currency. @@ -4155,7 +4155,7 @@ export declare namespace PriceCreateParams { * Within each billing cycle, specifies the cadence at which invoices are produced. * If unspecified, a single invoice is produced per billing cycle. */ - invoicing_cycle_configuration?: PriceCreateParams.NewFloatingBulkBpsPrice.InvoicingCycleConfiguration | null; + invoicing_cycle_configuration?: NewFloatingBulkBpsPrice.InvoicingCycleConfiguration | null; /** * User-specified key/value pairs for the resource. Individual keys can be removed @@ -4227,7 +4227,7 @@ export declare namespace PriceCreateParams { } export interface NewFloatingBulkPrice { - bulk_config: PriceCreateParams.NewFloatingBulkPrice.BulkConfig; + bulk_config: NewFloatingBulkPrice.BulkConfig; /** * The cadence to bill for this price on. @@ -4267,7 +4267,7 @@ export declare namespace PriceCreateParams { * For custom cadence: specifies the duration of the billing period in days or * months. */ - billing_cycle_configuration?: PriceCreateParams.NewFloatingBulkPrice.BillingCycleConfiguration | null; + billing_cycle_configuration?: NewFloatingBulkPrice.BillingCycleConfiguration | null; /** * The per unit conversion rate of the price currency to the invoicing currency. @@ -4294,7 +4294,7 @@ export declare namespace PriceCreateParams { * Within each billing cycle, specifies the cadence at which invoices are produced. * If unspecified, a single invoice is produced per billing cycle. */ - invoicing_cycle_configuration?: PriceCreateParams.NewFloatingBulkPrice.InvoicingCycleConfiguration | null; + invoicing_cycle_configuration?: NewFloatingBulkPrice.InvoicingCycleConfiguration | null; /** * User-specified key/value pairs for the resource. Individual keys can be removed @@ -4400,7 +4400,7 @@ export declare namespace PriceCreateParams { * For custom cadence: specifies the duration of the billing period in days or * months. */ - billing_cycle_configuration?: PriceCreateParams.NewFloatingThresholdTotalAmountPrice.BillingCycleConfiguration | null; + billing_cycle_configuration?: NewFloatingThresholdTotalAmountPrice.BillingCycleConfiguration | null; /** * The per unit conversion rate of the price currency to the invoicing currency. @@ -4427,7 +4427,7 @@ export declare namespace PriceCreateParams { * Within each billing cycle, specifies the cadence at which invoices are produced. * If unspecified, a single invoice is produced per billing cycle. */ - invoicing_cycle_configuration?: PriceCreateParams.NewFloatingThresholdTotalAmountPrice.InvoicingCycleConfiguration | null; + invoicing_cycle_configuration?: NewFloatingThresholdTotalAmountPrice.InvoicingCycleConfiguration | null; /** * User-specified key/value pairs for the resource. Individual keys can be removed @@ -4512,7 +4512,7 @@ export declare namespace PriceCreateParams { * For custom cadence: specifies the duration of the billing period in days or * months. */ - billing_cycle_configuration?: PriceCreateParams.NewFloatingTieredPackagePrice.BillingCycleConfiguration | null; + billing_cycle_configuration?: NewFloatingTieredPackagePrice.BillingCycleConfiguration | null; /** * The per unit conversion rate of the price currency to the invoicing currency. @@ -4539,7 +4539,7 @@ export declare namespace PriceCreateParams { * Within each billing cycle, specifies the cadence at which invoices are produced. * If unspecified, a single invoice is produced per billing cycle. */ - invoicing_cycle_configuration?: PriceCreateParams.NewFloatingTieredPackagePrice.InvoicingCycleConfiguration | null; + invoicing_cycle_configuration?: NewFloatingTieredPackagePrice.InvoicingCycleConfiguration | null; /** * User-specified key/value pairs for the resource. Individual keys can be removed @@ -4624,7 +4624,7 @@ export declare namespace PriceCreateParams { * For custom cadence: specifies the duration of the billing period in days or * months. */ - billing_cycle_configuration?: PriceCreateParams.NewFloatingGroupedTieredPrice.BillingCycleConfiguration | null; + billing_cycle_configuration?: NewFloatingGroupedTieredPrice.BillingCycleConfiguration | null; /** * The per unit conversion rate of the price currency to the invoicing currency. @@ -4651,7 +4651,7 @@ export declare namespace PriceCreateParams { * Within each billing cycle, specifies the cadence at which invoices are produced. * If unspecified, a single invoice is produced per billing cycle. */ - invoicing_cycle_configuration?: PriceCreateParams.NewFloatingGroupedTieredPrice.InvoicingCycleConfiguration | null; + invoicing_cycle_configuration?: NewFloatingGroupedTieredPrice.InvoicingCycleConfiguration | null; /** * User-specified key/value pairs for the resource. Individual keys can be removed @@ -4736,7 +4736,7 @@ export declare namespace PriceCreateParams { * For custom cadence: specifies the duration of the billing period in days or * months. */ - billing_cycle_configuration?: PriceCreateParams.NewFloatingMaxGroupTieredPackagePrice.BillingCycleConfiguration | null; + billing_cycle_configuration?: NewFloatingMaxGroupTieredPackagePrice.BillingCycleConfiguration | null; /** * The per unit conversion rate of the price currency to the invoicing currency. @@ -4763,7 +4763,7 @@ export declare namespace PriceCreateParams { * Within each billing cycle, specifies the cadence at which invoices are produced. * If unspecified, a single invoice is produced per billing cycle. */ - invoicing_cycle_configuration?: PriceCreateParams.NewFloatingMaxGroupTieredPackagePrice.InvoicingCycleConfiguration | null; + invoicing_cycle_configuration?: NewFloatingMaxGroupTieredPackagePrice.InvoicingCycleConfiguration | null; /** * User-specified key/value pairs for the resource. Individual keys can be removed @@ -4848,7 +4848,7 @@ export declare namespace PriceCreateParams { * For custom cadence: specifies the duration of the billing period in days or * months. */ - billing_cycle_configuration?: PriceCreateParams.NewFloatingTieredWithMinimumPrice.BillingCycleConfiguration | null; + billing_cycle_configuration?: NewFloatingTieredWithMinimumPrice.BillingCycleConfiguration | null; /** * The per unit conversion rate of the price currency to the invoicing currency. @@ -4875,7 +4875,7 @@ export declare namespace PriceCreateParams { * Within each billing cycle, specifies the cadence at which invoices are produced. * If unspecified, a single invoice is produced per billing cycle. */ - invoicing_cycle_configuration?: PriceCreateParams.NewFloatingTieredWithMinimumPrice.InvoicingCycleConfiguration | null; + invoicing_cycle_configuration?: NewFloatingTieredWithMinimumPrice.InvoicingCycleConfiguration | null; /** * User-specified key/value pairs for the resource. Individual keys can be removed @@ -4960,7 +4960,7 @@ export declare namespace PriceCreateParams { * For custom cadence: specifies the duration of the billing period in days or * months. */ - billing_cycle_configuration?: PriceCreateParams.NewFloatingPackageWithAllocationPrice.BillingCycleConfiguration | null; + billing_cycle_configuration?: NewFloatingPackageWithAllocationPrice.BillingCycleConfiguration | null; /** * The per unit conversion rate of the price currency to the invoicing currency. @@ -4987,7 +4987,7 @@ export declare namespace PriceCreateParams { * Within each billing cycle, specifies the cadence at which invoices are produced. * If unspecified, a single invoice is produced per billing cycle. */ - invoicing_cycle_configuration?: PriceCreateParams.NewFloatingPackageWithAllocationPrice.InvoicingCycleConfiguration | null; + invoicing_cycle_configuration?: NewFloatingPackageWithAllocationPrice.InvoicingCycleConfiguration | null; /** * User-specified key/value pairs for the resource. Individual keys can be removed @@ -5072,7 +5072,7 @@ export declare namespace PriceCreateParams { * For custom cadence: specifies the duration of the billing period in days or * months. */ - billing_cycle_configuration?: PriceCreateParams.NewFloatingTieredPackageWithMinimumPrice.BillingCycleConfiguration | null; + billing_cycle_configuration?: NewFloatingTieredPackageWithMinimumPrice.BillingCycleConfiguration | null; /** * The per unit conversion rate of the price currency to the invoicing currency. @@ -5099,7 +5099,7 @@ export declare namespace PriceCreateParams { * Within each billing cycle, specifies the cadence at which invoices are produced. * If unspecified, a single invoice is produced per billing cycle. */ - invoicing_cycle_configuration?: PriceCreateParams.NewFloatingTieredPackageWithMinimumPrice.InvoicingCycleConfiguration | null; + invoicing_cycle_configuration?: NewFloatingTieredPackageWithMinimumPrice.InvoicingCycleConfiguration | null; /** * User-specified key/value pairs for the resource. Individual keys can be removed @@ -5184,7 +5184,7 @@ export declare namespace PriceCreateParams { * For custom cadence: specifies the duration of the billing period in days or * months. */ - billing_cycle_configuration?: PriceCreateParams.NewFloatingUnitWithPercentPrice.BillingCycleConfiguration | null; + billing_cycle_configuration?: NewFloatingUnitWithPercentPrice.BillingCycleConfiguration | null; /** * The per unit conversion rate of the price currency to the invoicing currency. @@ -5211,7 +5211,7 @@ export declare namespace PriceCreateParams { * Within each billing cycle, specifies the cadence at which invoices are produced. * If unspecified, a single invoice is produced per billing cycle. */ - invoicing_cycle_configuration?: PriceCreateParams.NewFloatingUnitWithPercentPrice.InvoicingCycleConfiguration | null; + invoicing_cycle_configuration?: NewFloatingUnitWithPercentPrice.InvoicingCycleConfiguration | null; /** * User-specified key/value pairs for the resource. Individual keys can be removed @@ -5296,7 +5296,7 @@ export declare namespace PriceCreateParams { * For custom cadence: specifies the duration of the billing period in days or * months. */ - billing_cycle_configuration?: PriceCreateParams.NewFloatingTieredWithProrationPrice.BillingCycleConfiguration | null; + billing_cycle_configuration?: NewFloatingTieredWithProrationPrice.BillingCycleConfiguration | null; /** * The per unit conversion rate of the price currency to the invoicing currency. @@ -5323,7 +5323,7 @@ export declare namespace PriceCreateParams { * Within each billing cycle, specifies the cadence at which invoices are produced. * If unspecified, a single invoice is produced per billing cycle. */ - invoicing_cycle_configuration?: PriceCreateParams.NewFloatingTieredWithProrationPrice.InvoicingCycleConfiguration | null; + invoicing_cycle_configuration?: NewFloatingTieredWithProrationPrice.InvoicingCycleConfiguration | null; /** * User-specified key/value pairs for the resource. Individual keys can be removed @@ -5408,7 +5408,7 @@ export declare namespace PriceCreateParams { * For custom cadence: specifies the duration of the billing period in days or * months. */ - billing_cycle_configuration?: PriceCreateParams.NewFloatingUnitWithProrationPrice.BillingCycleConfiguration | null; + billing_cycle_configuration?: NewFloatingUnitWithProrationPrice.BillingCycleConfiguration | null; /** * The per unit conversion rate of the price currency to the invoicing currency. @@ -5435,7 +5435,7 @@ export declare namespace PriceCreateParams { * Within each billing cycle, specifies the cadence at which invoices are produced. * If unspecified, a single invoice is produced per billing cycle. */ - invoicing_cycle_configuration?: PriceCreateParams.NewFloatingUnitWithProrationPrice.InvoicingCycleConfiguration | null; + invoicing_cycle_configuration?: NewFloatingUnitWithProrationPrice.InvoicingCycleConfiguration | null; /** * User-specified key/value pairs for the resource. Individual keys can be removed @@ -5520,7 +5520,7 @@ export declare namespace PriceCreateParams { * For custom cadence: specifies the duration of the billing period in days or * months. */ - billing_cycle_configuration?: PriceCreateParams.NewFloatingGroupedAllocationPrice.BillingCycleConfiguration | null; + billing_cycle_configuration?: NewFloatingGroupedAllocationPrice.BillingCycleConfiguration | null; /** * The per unit conversion rate of the price currency to the invoicing currency. @@ -5547,7 +5547,7 @@ export declare namespace PriceCreateParams { * Within each billing cycle, specifies the cadence at which invoices are produced. * If unspecified, a single invoice is produced per billing cycle. */ - invoicing_cycle_configuration?: PriceCreateParams.NewFloatingGroupedAllocationPrice.InvoicingCycleConfiguration | null; + invoicing_cycle_configuration?: NewFloatingGroupedAllocationPrice.InvoicingCycleConfiguration | null; /** * User-specified key/value pairs for the resource. Individual keys can be removed @@ -5632,7 +5632,7 @@ export declare namespace PriceCreateParams { * For custom cadence: specifies the duration of the billing period in days or * months. */ - billing_cycle_configuration?: PriceCreateParams.NewFloatingGroupedWithProratedMinimumPrice.BillingCycleConfiguration | null; + billing_cycle_configuration?: NewFloatingGroupedWithProratedMinimumPrice.BillingCycleConfiguration | null; /** * The per unit conversion rate of the price currency to the invoicing currency. @@ -5659,7 +5659,7 @@ export declare namespace PriceCreateParams { * Within each billing cycle, specifies the cadence at which invoices are produced. * If unspecified, a single invoice is produced per billing cycle. */ - invoicing_cycle_configuration?: PriceCreateParams.NewFloatingGroupedWithProratedMinimumPrice.InvoicingCycleConfiguration | null; + invoicing_cycle_configuration?: NewFloatingGroupedWithProratedMinimumPrice.InvoicingCycleConfiguration | null; /** * User-specified key/value pairs for the resource. Individual keys can be removed @@ -5744,7 +5744,7 @@ export declare namespace PriceCreateParams { * For custom cadence: specifies the duration of the billing period in days or * months. */ - billing_cycle_configuration?: PriceCreateParams.NewFloatingGroupedWithMeteredMinimumPrice.BillingCycleConfiguration | null; + billing_cycle_configuration?: NewFloatingGroupedWithMeteredMinimumPrice.BillingCycleConfiguration | null; /** * The per unit conversion rate of the price currency to the invoicing currency. @@ -5771,7 +5771,7 @@ export declare namespace PriceCreateParams { * Within each billing cycle, specifies the cadence at which invoices are produced. * If unspecified, a single invoice is produced per billing cycle. */ - invoicing_cycle_configuration?: PriceCreateParams.NewFloatingGroupedWithMeteredMinimumPrice.InvoicingCycleConfiguration | null; + invoicing_cycle_configuration?: NewFloatingGroupedWithMeteredMinimumPrice.InvoicingCycleConfiguration | null; /** * User-specified key/value pairs for the resource. Individual keys can be removed @@ -5856,7 +5856,7 @@ export declare namespace PriceCreateParams { * For custom cadence: specifies the duration of the billing period in days or * months. */ - billing_cycle_configuration?: PriceCreateParams.NewFloatingMatrixWithDisplayNamePrice.BillingCycleConfiguration | null; + billing_cycle_configuration?: NewFloatingMatrixWithDisplayNamePrice.BillingCycleConfiguration | null; /** * The per unit conversion rate of the price currency to the invoicing currency. @@ -5883,7 +5883,7 @@ export declare namespace PriceCreateParams { * Within each billing cycle, specifies the cadence at which invoices are produced. * If unspecified, a single invoice is produced per billing cycle. */ - invoicing_cycle_configuration?: PriceCreateParams.NewFloatingMatrixWithDisplayNamePrice.InvoicingCycleConfiguration | null; + invoicing_cycle_configuration?: NewFloatingMatrixWithDisplayNamePrice.InvoicingCycleConfiguration | null; /** * User-specified key/value pairs for the resource. Individual keys can be removed @@ -5968,7 +5968,7 @@ export declare namespace PriceCreateParams { * For custom cadence: specifies the duration of the billing period in days or * months. */ - billing_cycle_configuration?: PriceCreateParams.NewFloatingBulkWithProrationPrice.BillingCycleConfiguration | null; + billing_cycle_configuration?: NewFloatingBulkWithProrationPrice.BillingCycleConfiguration | null; /** * The per unit conversion rate of the price currency to the invoicing currency. @@ -5995,7 +5995,7 @@ export declare namespace PriceCreateParams { * Within each billing cycle, specifies the cadence at which invoices are produced. * If unspecified, a single invoice is produced per billing cycle. */ - invoicing_cycle_configuration?: PriceCreateParams.NewFloatingBulkWithProrationPrice.InvoicingCycleConfiguration | null; + invoicing_cycle_configuration?: NewFloatingBulkWithProrationPrice.InvoicingCycleConfiguration | null; /** * User-specified key/value pairs for the resource. Individual keys can be removed @@ -6080,7 +6080,7 @@ export declare namespace PriceCreateParams { * For custom cadence: specifies the duration of the billing period in days or * months. */ - billing_cycle_configuration?: PriceCreateParams.NewFloatingGroupedTieredPackagePrice.BillingCycleConfiguration | null; + billing_cycle_configuration?: NewFloatingGroupedTieredPackagePrice.BillingCycleConfiguration | null; /** * The per unit conversion rate of the price currency to the invoicing currency. @@ -6107,7 +6107,7 @@ export declare namespace PriceCreateParams { * Within each billing cycle, specifies the cadence at which invoices are produced. * If unspecified, a single invoice is produced per billing cycle. */ - invoicing_cycle_configuration?: PriceCreateParams.NewFloatingGroupedTieredPackagePrice.InvoicingCycleConfiguration | null; + invoicing_cycle_configuration?: NewFloatingGroupedTieredPackagePrice.InvoicingCycleConfiguration | null; /** * User-specified key/value pairs for the resource. Individual keys can be removed From 9e9495bdf7a15da462953cfbf01a21388f258f60 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 4 Feb 2025 01:16:11 +0000 Subject: [PATCH 2/3] feat(api): api update (#497) --- .stats.yml | 2 +- src/resources/invoice-line-items.ts | 215 +++++++++ src/resources/invoices.ts | 430 +++++++++++++++++ src/resources/plans/plans.ts | 228 +++++++++ src/resources/prices/prices.ts | 722 ++++++++++++++++++++++++++-- src/resources/subscriptions.ts | 226 +++++++++ 6 files changed, 1793 insertions(+), 30 deletions(-) diff --git a/.stats.yml b/.stats.yml index 0c16dd10..ae59be0a 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 103 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-8663e8fc543041d9694eddcd2f7e9784611369606700f99340e6dc80607b2dfa.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-0dbb8ba730f755468357ebda41332664e8396faf29a6a6a64ad37cf35cf70d0c.yml diff --git a/src/resources/invoice-line-items.ts b/src/resources/invoice-line-items.ts index 9823c92f..58d03972 100644 --- a/src/resources/invoice-line-items.ts +++ b/src/resources/invoice-line-items.ts @@ -24,11 +24,33 @@ export interface InvoiceLineItemCreateResponse { */ id: string; + /** + * The line amount after any adjustments, before overage conversion, credits and + * partial invoicing. + */ + adjusted_subtotal: string; + + /** + * All adjustments applied to the line item. + */ + adjustments: Array< + | InvoiceLineItemCreateResponse.AmountDiscountAdjustment + | InvoiceLineItemCreateResponse.PercentageDiscountAdjustment + | InvoiceLineItemCreateResponse.UsageDiscountAdjustment + | InvoiceLineItemCreateResponse.MinimumAdjustment + | InvoiceLineItemCreateResponse.MaximumAdjustment + >; + /** * The final amount after any discounts or minimums. */ amount: string; + /** + * The number of credits used + */ + credits_applied: string; + discount: Shared.Discount | null; /** @@ -43,12 +65,24 @@ export interface InvoiceLineItemCreateResponse { */ grouping: string | null; + /** + * @deprecated This field is deprecated in favor of `adjustments`. + */ maximum: InvoiceLineItemCreateResponse.Maximum | null; + /** + * @deprecated This field is deprecated in favor of `adjustments`. + */ maximum_amount: string | null; + /** + * @deprecated This field is deprecated in favor of `adjustments`. + */ minimum: InvoiceLineItemCreateResponse.Minimum | null; + /** + * @deprecated This field is deprecated in favor of `adjustments`. + */ minimum_amount: string | null; /** @@ -56,6 +90,11 @@ export interface InvoiceLineItemCreateResponse { */ name: string; + /** + * Any amount applied from a partial invoice + */ + partially_invoiced_amount: string; + /** * The Price resource represents a price that can be billed on a subscription, * resulting in a charge on an invoice in the form of an invoice line item. Prices @@ -100,6 +139,179 @@ export interface InvoiceLineItemCreateResponse { } export namespace InvoiceLineItemCreateResponse { + export interface AmountDiscountAdjustment { + id: string; + + adjustment_type: 'amount_discount'; + + /** + * The amount by which to discount the prices this adjustment applies to in a given + * billing period. + */ + amount_discount: string; + + /** + * The price IDs that this adjustment applies to. + */ + applies_to_price_ids: Array; + + /** + * True for adjustments that apply to an entire invocice, false for adjustments + * that apply to only one price. + */ + is_invoice_level: boolean; + + /** + * The plan phase in which this adjustment is active. + */ + plan_phase_order: number | null; + + /** + * The reason for the adjustment. + */ + reason: string | null; + } + + export interface PercentageDiscountAdjustment { + id: string; + + adjustment_type: 'percentage_discount'; + + /** + * The price IDs that this adjustment applies to. + */ + applies_to_price_ids: Array; + + /** + * True for adjustments that apply to an entire invocice, false for adjustments + * that apply to only one price. + */ + is_invoice_level: boolean; + + /** + * The percentage (as a value between 0 and 1) by which to discount the price + * intervals this adjustment applies to in a given billing period. + */ + percentage_discount: number; + + /** + * The plan phase in which this adjustment is active. + */ + plan_phase_order: number | null; + + /** + * The reason for the adjustment. + */ + reason: string | null; + } + + export interface UsageDiscountAdjustment { + id: string; + + adjustment_type: 'usage_discount'; + + /** + * The price IDs that this adjustment applies to. + */ + applies_to_price_ids: Array; + + /** + * True for adjustments that apply to an entire invocice, false for adjustments + * that apply to only one price. + */ + is_invoice_level: boolean; + + /** + * The plan phase in which this adjustment is active. + */ + plan_phase_order: number | null; + + /** + * The reason for the adjustment. + */ + reason: string | null; + + /** + * The number of usage units by which to discount the price this adjustment applies + * to in a given billing period. + */ + usage_discount: number; + } + + export interface MinimumAdjustment { + id: string; + + adjustment_type: 'minimum'; + + /** + * The price IDs that this adjustment applies to. + */ + applies_to_price_ids: Array; + + /** + * True for adjustments that apply to an entire invocice, false for adjustments + * that apply to only one price. + */ + is_invoice_level: boolean; + + /** + * The item ID that revenue from this minimum will be attributed to. + */ + item_id: string; + + /** + * The minimum amount to charge in a given billing period for the prices this + * adjustment applies to. + */ + minimum_amount: string; + + /** + * The plan phase in which this adjustment is active. + */ + plan_phase_order: number | null; + + /** + * The reason for the adjustment. + */ + reason: string | null; + } + + export interface MaximumAdjustment { + id: string; + + adjustment_type: 'maximum'; + + /** + * The price IDs that this adjustment applies to. + */ + applies_to_price_ids: Array; + + /** + * True for adjustments that apply to an entire invocice, false for adjustments + * that apply to only one price. + */ + is_invoice_level: boolean; + + /** + * The maximum amount to charge in a given billing period for the prices this + * adjustment applies to. + */ + maximum_amount: string; + + /** + * The plan phase in which this adjustment is active. + */ + plan_phase_order: number | null; + + /** + * The reason for the adjustment. + */ + reason: string | null; + } + + /** + * @deprecated This field is deprecated in favor of `adjustments`. + */ export interface Maximum { /** * List of price_ids that this maximum amount applies to. For plan/plan phase @@ -113,6 +325,9 @@ export namespace InvoiceLineItemCreateResponse { maximum_amount: string; } + /** + * @deprecated This field is deprecated in favor of `adjustments`. + */ export interface Minimum { /** * List of price_ids that this minimum amount applies to. For plan/plan phase diff --git a/src/resources/invoices.ts b/src/resources/invoices.ts index fb708667..2c1d23d2 100644 --- a/src/resources/invoices.ts +++ b/src/resources/invoices.ts @@ -846,11 +846,33 @@ export namespace Invoice { */ id: string; + /** + * The line amount after any adjustments, before overage conversion, credits and + * partial invoicing. + */ + adjusted_subtotal: string; + + /** + * All adjustments applied to the line item. + */ + adjustments: Array< + | LineItem.AmountDiscountAdjustment + | LineItem.PercentageDiscountAdjustment + | LineItem.UsageDiscountAdjustment + | LineItem.MinimumAdjustment + | LineItem.MaximumAdjustment + >; + /** * The final amount after any discounts or minimums. */ amount: string; + /** + * The number of credits used + */ + credits_applied: string; + discount: Shared.Discount | null; /** @@ -865,12 +887,24 @@ export namespace Invoice { */ grouping: string | null; + /** + * @deprecated This field is deprecated in favor of `adjustments`. + */ maximum: LineItem.Maximum | null; + /** + * @deprecated This field is deprecated in favor of `adjustments`. + */ maximum_amount: string | null; + /** + * @deprecated This field is deprecated in favor of `adjustments`. + */ minimum: LineItem.Minimum | null; + /** + * @deprecated This field is deprecated in favor of `adjustments`. + */ minimum_amount: string | null; /** @@ -878,6 +912,11 @@ export namespace Invoice { */ name: string; + /** + * Any amount applied from a partial invoice + */ + partially_invoiced_amount: string; + /** * The Price resource represents a price that can be billed on a subscription, * resulting in a charge on an invoice in the form of an invoice line item. Prices @@ -918,6 +957,179 @@ export namespace Invoice { } export namespace LineItem { + export interface AmountDiscountAdjustment { + id: string; + + adjustment_type: 'amount_discount'; + + /** + * The amount by which to discount the prices this adjustment applies to in a given + * billing period. + */ + amount_discount: string; + + /** + * The price IDs that this adjustment applies to. + */ + applies_to_price_ids: Array; + + /** + * True for adjustments that apply to an entire invocice, false for adjustments + * that apply to only one price. + */ + is_invoice_level: boolean; + + /** + * The plan phase in which this adjustment is active. + */ + plan_phase_order: number | null; + + /** + * The reason for the adjustment. + */ + reason: string | null; + } + + export interface PercentageDiscountAdjustment { + id: string; + + adjustment_type: 'percentage_discount'; + + /** + * The price IDs that this adjustment applies to. + */ + applies_to_price_ids: Array; + + /** + * True for adjustments that apply to an entire invocice, false for adjustments + * that apply to only one price. + */ + is_invoice_level: boolean; + + /** + * The percentage (as a value between 0 and 1) by which to discount the price + * intervals this adjustment applies to in a given billing period. + */ + percentage_discount: number; + + /** + * The plan phase in which this adjustment is active. + */ + plan_phase_order: number | null; + + /** + * The reason for the adjustment. + */ + reason: string | null; + } + + export interface UsageDiscountAdjustment { + id: string; + + adjustment_type: 'usage_discount'; + + /** + * The price IDs that this adjustment applies to. + */ + applies_to_price_ids: Array; + + /** + * True for adjustments that apply to an entire invocice, false for adjustments + * that apply to only one price. + */ + is_invoice_level: boolean; + + /** + * The plan phase in which this adjustment is active. + */ + plan_phase_order: number | null; + + /** + * The reason for the adjustment. + */ + reason: string | null; + + /** + * The number of usage units by which to discount the price this adjustment applies + * to in a given billing period. + */ + usage_discount: number; + } + + export interface MinimumAdjustment { + id: string; + + adjustment_type: 'minimum'; + + /** + * The price IDs that this adjustment applies to. + */ + applies_to_price_ids: Array; + + /** + * True for adjustments that apply to an entire invocice, false for adjustments + * that apply to only one price. + */ + is_invoice_level: boolean; + + /** + * The item ID that revenue from this minimum will be attributed to. + */ + item_id: string; + + /** + * The minimum amount to charge in a given billing period for the prices this + * adjustment applies to. + */ + minimum_amount: string; + + /** + * The plan phase in which this adjustment is active. + */ + plan_phase_order: number | null; + + /** + * The reason for the adjustment. + */ + reason: string | null; + } + + export interface MaximumAdjustment { + id: string; + + adjustment_type: 'maximum'; + + /** + * The price IDs that this adjustment applies to. + */ + applies_to_price_ids: Array; + + /** + * True for adjustments that apply to an entire invocice, false for adjustments + * that apply to only one price. + */ + is_invoice_level: boolean; + + /** + * The maximum amount to charge in a given billing period for the prices this + * adjustment applies to. + */ + maximum_amount: string; + + /** + * The plan phase in which this adjustment is active. + */ + plan_phase_order: number | null; + + /** + * The reason for the adjustment. + */ + reason: string | null; + } + + /** + * @deprecated This field is deprecated in favor of `adjustments`. + */ export interface Maximum { /** * List of price_ids that this maximum amount applies to. For plan/plan phase @@ -931,6 +1143,9 @@ export namespace Invoice { maximum_amount: string; } + /** + * @deprecated This field is deprecated in favor of `adjustments`. + */ export interface Minimum { /** * List of price_ids that this minimum amount applies to. For plan/plan phase @@ -1837,11 +2052,33 @@ export namespace InvoiceFetchUpcomingResponse { */ id: string; + /** + * The line amount after any adjustments, before overage conversion, credits and + * partial invoicing. + */ + adjusted_subtotal: string; + + /** + * All adjustments applied to the line item. + */ + adjustments: Array< + | LineItem.AmountDiscountAdjustment + | LineItem.PercentageDiscountAdjustment + | LineItem.UsageDiscountAdjustment + | LineItem.MinimumAdjustment + | LineItem.MaximumAdjustment + >; + /** * The final amount after any discounts or minimums. */ amount: string; + /** + * The number of credits used + */ + credits_applied: string; + discount: Shared.Discount | null; /** @@ -1856,12 +2093,24 @@ export namespace InvoiceFetchUpcomingResponse { */ grouping: string | null; + /** + * @deprecated This field is deprecated in favor of `adjustments`. + */ maximum: LineItem.Maximum | null; + /** + * @deprecated This field is deprecated in favor of `adjustments`. + */ maximum_amount: string | null; + /** + * @deprecated This field is deprecated in favor of `adjustments`. + */ minimum: LineItem.Minimum | null; + /** + * @deprecated This field is deprecated in favor of `adjustments`. + */ minimum_amount: string | null; /** @@ -1869,6 +2118,11 @@ export namespace InvoiceFetchUpcomingResponse { */ name: string; + /** + * Any amount applied from a partial invoice + */ + partially_invoiced_amount: string; + /** * The Price resource represents a price that can be billed on a subscription, * resulting in a charge on an invoice in the form of an invoice line item. Prices @@ -1909,6 +2163,179 @@ export namespace InvoiceFetchUpcomingResponse { } export namespace LineItem { + export interface AmountDiscountAdjustment { + id: string; + + adjustment_type: 'amount_discount'; + + /** + * The amount by which to discount the prices this adjustment applies to in a given + * billing period. + */ + amount_discount: string; + + /** + * The price IDs that this adjustment applies to. + */ + applies_to_price_ids: Array; + + /** + * True for adjustments that apply to an entire invocice, false for adjustments + * that apply to only one price. + */ + is_invoice_level: boolean; + + /** + * The plan phase in which this adjustment is active. + */ + plan_phase_order: number | null; + + /** + * The reason for the adjustment. + */ + reason: string | null; + } + + export interface PercentageDiscountAdjustment { + id: string; + + adjustment_type: 'percentage_discount'; + + /** + * The price IDs that this adjustment applies to. + */ + applies_to_price_ids: Array; + + /** + * True for adjustments that apply to an entire invocice, false for adjustments + * that apply to only one price. + */ + is_invoice_level: boolean; + + /** + * The percentage (as a value between 0 and 1) by which to discount the price + * intervals this adjustment applies to in a given billing period. + */ + percentage_discount: number; + + /** + * The plan phase in which this adjustment is active. + */ + plan_phase_order: number | null; + + /** + * The reason for the adjustment. + */ + reason: string | null; + } + + export interface UsageDiscountAdjustment { + id: string; + + adjustment_type: 'usage_discount'; + + /** + * The price IDs that this adjustment applies to. + */ + applies_to_price_ids: Array; + + /** + * True for adjustments that apply to an entire invocice, false for adjustments + * that apply to only one price. + */ + is_invoice_level: boolean; + + /** + * The plan phase in which this adjustment is active. + */ + plan_phase_order: number | null; + + /** + * The reason for the adjustment. + */ + reason: string | null; + + /** + * The number of usage units by which to discount the price this adjustment applies + * to in a given billing period. + */ + usage_discount: number; + } + + export interface MinimumAdjustment { + id: string; + + adjustment_type: 'minimum'; + + /** + * The price IDs that this adjustment applies to. + */ + applies_to_price_ids: Array; + + /** + * True for adjustments that apply to an entire invocice, false for adjustments + * that apply to only one price. + */ + is_invoice_level: boolean; + + /** + * The item ID that revenue from this minimum will be attributed to. + */ + item_id: string; + + /** + * The minimum amount to charge in a given billing period for the prices this + * adjustment applies to. + */ + minimum_amount: string; + + /** + * The plan phase in which this adjustment is active. + */ + plan_phase_order: number | null; + + /** + * The reason for the adjustment. + */ + reason: string | null; + } + + export interface MaximumAdjustment { + id: string; + + adjustment_type: 'maximum'; + + /** + * The price IDs that this adjustment applies to. + */ + applies_to_price_ids: Array; + + /** + * True for adjustments that apply to an entire invocice, false for adjustments + * that apply to only one price. + */ + is_invoice_level: boolean; + + /** + * The maximum amount to charge in a given billing period for the prices this + * adjustment applies to. + */ + maximum_amount: string; + + /** + * The plan phase in which this adjustment is active. + */ + plan_phase_order: number | null; + + /** + * The reason for the adjustment. + */ + reason: string | null; + } + + /** + * @deprecated This field is deprecated in favor of `adjustments`. + */ export interface Maximum { /** * List of price_ids that this maximum amount applies to. For plan/plan phase @@ -1922,6 +2349,9 @@ export namespace InvoiceFetchUpcomingResponse { maximum_amount: string; } + /** + * @deprecated This field is deprecated in favor of `adjustments`. + */ export interface Minimum { /** * List of price_ids that this minimum amount applies to. For plan/plan phase diff --git a/src/resources/plans/plans.ts b/src/resources/plans/plans.ts index aab4db69..91dc134e 100644 --- a/src/resources/plans/plans.ts +++ b/src/resources/plans/plans.ts @@ -498,6 +498,8 @@ export interface PlanCreateParams { | PlanCreateParams.NewPlanBulkWithProrationPrice | PlanCreateParams.NewPlanGroupedTieredPackagePrice | PlanCreateParams.NewPlanMaxGroupTieredPackagePrice + | PlanCreateParams.NewPlanScalableMatrixWithUnitPricingPrice + | PlanCreateParams.NewPlanScalableMatrixWithTieredPricingPrice >; /** @@ -3185,6 +3187,232 @@ export namespace PlanCreateParams { duration_unit: 'day' | 'month'; } } + + export interface NewPlanScalableMatrixWithUnitPricingPrice { + /** + * The cadence to bill for this price on. + */ + cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom'; + + /** + * The id of the item the plan will be associated with. + */ + item_id: string; + + model_type: 'scalable_matrix_with_unit_pricing'; + + /** + * The name of the price. + */ + name: string; + + scalable_matrix_with_unit_pricing_config: Record; + + /** + * The id of the billable metric for the price. Only needed if the price is + * usage-based. + */ + billable_metric_id?: string | null; + + /** + * If the Price represents a fixed cost, the price will be billed in-advance if + * this is true, and in-arrears if this is false. + */ + billed_in_advance?: boolean | null; + + /** + * For custom cadence: specifies the duration of the billing period in days or + * months. + */ + billing_cycle_configuration?: NewPlanScalableMatrixWithUnitPricingPrice.BillingCycleConfiguration | null; + + /** + * The per unit conversion rate of the price currency to the invoicing currency. + */ + conversion_rate?: number | null; + + /** + * An ISO 4217 currency string, or custom pricing unit identifier, in which this + * price is billed. + */ + currency?: string | null; + + /** + * An alias for the price. + */ + external_price_id?: string | null; + + /** + * If the Price represents a fixed cost, this represents the quantity of units + * applied. + */ + fixed_price_quantity?: number | null; + + /** + * The property used to group this price on an invoice + */ + invoice_grouping_key?: string | null; + + /** + * Within each billing cycle, specifies the cadence at which invoices are produced. + * If unspecified, a single invoice is produced per billing cycle. + */ + invoicing_cycle_configuration?: NewPlanScalableMatrixWithUnitPricingPrice.InvoicingCycleConfiguration | null; + + /** + * User-specified key/value pairs for the resource. Individual keys can be removed + * by setting the value to `null`, and the entire metadata mapping can be cleared + * by setting `metadata` to `null`. + */ + metadata?: Record | null; + } + + export namespace NewPlanScalableMatrixWithUnitPricingPrice { + /** + * For custom cadence: specifies the duration of the billing period in days or + * months. + */ + export interface BillingCycleConfiguration { + /** + * The duration of the billing period. + */ + duration: number; + + /** + * The unit of billing period duration. + */ + duration_unit: 'day' | 'month'; + } + + /** + * Within each billing cycle, specifies the cadence at which invoices are produced. + * If unspecified, a single invoice is produced per billing cycle. + */ + export interface InvoicingCycleConfiguration { + /** + * The duration of the billing period. + */ + duration: number; + + /** + * The unit of billing period duration. + */ + duration_unit: 'day' | 'month'; + } + } + + export interface NewPlanScalableMatrixWithTieredPricingPrice { + /** + * The cadence to bill for this price on. + */ + cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom'; + + /** + * The id of the item the plan will be associated with. + */ + item_id: string; + + model_type: 'scalable_matrix_with_tiered_pricing'; + + /** + * The name of the price. + */ + name: string; + + scalable_matrix_with_tiered_pricing_config: Record; + + /** + * The id of the billable metric for the price. Only needed if the price is + * usage-based. + */ + billable_metric_id?: string | null; + + /** + * If the Price represents a fixed cost, the price will be billed in-advance if + * this is true, and in-arrears if this is false. + */ + billed_in_advance?: boolean | null; + + /** + * For custom cadence: specifies the duration of the billing period in days or + * months. + */ + billing_cycle_configuration?: NewPlanScalableMatrixWithTieredPricingPrice.BillingCycleConfiguration | null; + + /** + * The per unit conversion rate of the price currency to the invoicing currency. + */ + conversion_rate?: number | null; + + /** + * An ISO 4217 currency string, or custom pricing unit identifier, in which this + * price is billed. + */ + currency?: string | null; + + /** + * An alias for the price. + */ + external_price_id?: string | null; + + /** + * If the Price represents a fixed cost, this represents the quantity of units + * applied. + */ + fixed_price_quantity?: number | null; + + /** + * The property used to group this price on an invoice + */ + invoice_grouping_key?: string | null; + + /** + * Within each billing cycle, specifies the cadence at which invoices are produced. + * If unspecified, a single invoice is produced per billing cycle. + */ + invoicing_cycle_configuration?: NewPlanScalableMatrixWithTieredPricingPrice.InvoicingCycleConfiguration | null; + + /** + * User-specified key/value pairs for the resource. Individual keys can be removed + * by setting the value to `null`, and the entire metadata mapping can be cleared + * by setting `metadata` to `null`. + */ + metadata?: Record | null; + } + + export namespace NewPlanScalableMatrixWithTieredPricingPrice { + /** + * For custom cadence: specifies the duration of the billing period in days or + * months. + */ + export interface BillingCycleConfiguration { + /** + * The duration of the billing period. + */ + duration: number; + + /** + * The unit of billing period duration. + */ + duration_unit: 'day' | 'month'; + } + + /** + * Within each billing cycle, specifies the cadence at which invoices are produced. + * If unspecified, a single invoice is produced per billing cycle. + */ + export interface InvoicingCycleConfiguration { + /** + * The duration of the billing period. + */ + duration: number; + + /** + * The unit of billing period duration. + */ + duration_unit: 'day' | 'month'; + } + } } export interface PlanUpdateParams { diff --git a/src/resources/prices/prices.ts b/src/resources/prices/prices.ts index 0fff3c56..6e64babb 100644 --- a/src/resources/prices/prices.ts +++ b/src/resources/prices/prices.ts @@ -147,7 +147,9 @@ export type Price = | Price.MatrixWithDisplayNamePrice | Price.BulkWithProrationPrice | Price.GroupedTieredPackagePrice - | Price.MaxGroupTieredPackagePrice; + | Price.MaxGroupTieredPackagePrice + | Price.ScalableMatrixWithUnitPricingPrice + | Price.ScalableMatrixWithTieredPricingPrice; export namespace Price { export interface UnitPrice { @@ -202,6 +204,8 @@ export namespace Price { price_type: 'usage_price' | 'fixed_price'; unit_config: UnitPrice.UnitConfig; + + dimensional_price_configuration?: UnitPrice.DimensionalPriceConfiguration | null; } export namespace UnitPrice { @@ -265,6 +269,12 @@ export namespace Price { */ unit_amount: string; } + + export interface DimensionalPriceConfiguration { + dimension_values: Array; + + dimensional_price_group_id: string; + } } export interface PackagePrice { @@ -319,6 +329,8 @@ export namespace Price { plan_phase_order: number | null; price_type: 'usage_price' | 'fixed_price'; + + dimensional_price_configuration?: PackagePrice.DimensionalPriceConfiguration | null; } export namespace PackagePrice { @@ -388,6 +400,12 @@ export namespace Price { */ package_size: number; } + + export interface DimensionalPriceConfiguration { + dimension_values: Array; + + dimensional_price_group_id: string; + } } export interface MatrixPrice { @@ -442,6 +460,8 @@ export namespace Price { plan_phase_order: number | null; price_type: 'usage_price' | 'fixed_price'; + + dimensional_price_configuration?: MatrixPrice.DimensionalPriceConfiguration | null; } export namespace MatrixPrice { @@ -531,6 +551,12 @@ export namespace Price { */ minimum_amount: string; } + + export interface DimensionalPriceConfiguration { + dimension_values: Array; + + dimensional_price_group_id: string; + } } export interface TieredPrice { @@ -585,6 +611,8 @@ export namespace Price { price_type: 'usage_price' | 'fixed_price'; tiered_config: TieredPrice.TieredConfig; + + dimensional_price_configuration?: TieredPrice.DimensionalPriceConfiguration | null; } export namespace TieredPrice { @@ -667,6 +695,12 @@ export namespace Price { last_unit?: number | null; } } + + export interface DimensionalPriceConfiguration { + dimension_values: Array; + + dimensional_price_group_id: string; + } } export interface TieredBpsPrice { @@ -721,6 +755,8 @@ export namespace Price { price_type: 'usage_price' | 'fixed_price'; tiered_bps_config: TieredBpsPrice.TieredBpsConfig; + + dimensional_price_configuration?: TieredBpsPrice.DimensionalPriceConfiguration | null; } export namespace TieredBpsPrice { @@ -809,6 +845,12 @@ export namespace Price { per_unit_maximum?: string | null; } } + + export interface DimensionalPriceConfiguration { + dimension_values: Array; + + dimensional_price_group_id: string; + } } export interface BpsPrice { @@ -863,6 +905,8 @@ export namespace Price { plan_phase_order: number | null; price_type: 'usage_price' | 'fixed_price'; + + dimensional_price_configuration?: BpsPrice.DimensionalPriceConfiguration | null; } export namespace BpsPrice { @@ -931,6 +975,12 @@ export namespace Price { */ minimum_amount: string; } + + export interface DimensionalPriceConfiguration { + dimension_values: Array; + + dimensional_price_group_id: string; + } } export interface BulkBpsPrice { @@ -985,6 +1035,8 @@ export namespace Price { plan_phase_order: number | null; price_type: 'usage_price' | 'fixed_price'; + + dimensional_price_configuration?: BulkBpsPrice.DimensionalPriceConfiguration | null; } export namespace BulkBpsPrice { @@ -1068,6 +1120,12 @@ export namespace Price { */ minimum_amount: string; } + + export interface DimensionalPriceConfiguration { + dimension_values: Array; + + dimensional_price_group_id: string; + } } export interface BulkPrice { @@ -1122,6 +1180,8 @@ export namespace Price { plan_phase_order: number | null; price_type: 'usage_price' | 'fixed_price'; + + dimensional_price_configuration?: BulkPrice.DimensionalPriceConfiguration | null; } export namespace BulkPrice { @@ -1199,6 +1259,12 @@ export namespace Price { */ minimum_amount: string; } + + export interface DimensionalPriceConfiguration { + dimension_values: Array; + + dimensional_price_group_id: string; + } } export interface ThresholdTotalAmountPrice { @@ -1253,6 +1319,8 @@ export namespace Price { price_type: 'usage_price' | 'fixed_price'; threshold_total_amount_config: Record; + + dimensional_price_configuration?: ThresholdTotalAmountPrice.DimensionalPriceConfiguration | null; } export namespace ThresholdTotalAmountPrice { @@ -1309,6 +1377,12 @@ export namespace Price { */ minimum_amount: string; } + + export interface DimensionalPriceConfiguration { + dimension_values: Array; + + dimensional_price_group_id: string; + } } export interface TieredPackagePrice { @@ -1363,6 +1437,8 @@ export namespace Price { price_type: 'usage_price' | 'fixed_price'; tiered_package_config: Record; + + dimensional_price_configuration?: TieredPackagePrice.DimensionalPriceConfiguration | null; } export namespace TieredPackagePrice { @@ -1419,6 +1495,12 @@ export namespace Price { */ minimum_amount: string; } + + export interface DimensionalPriceConfiguration { + dimension_values: Array; + + dimensional_price_group_id: string; + } } export interface GroupedTieredPrice { @@ -1473,6 +1555,8 @@ export namespace Price { plan_phase_order: number | null; price_type: 'usage_price' | 'fixed_price'; + + dimensional_price_configuration?: GroupedTieredPrice.DimensionalPriceConfiguration | null; } export namespace GroupedTieredPrice { @@ -1529,6 +1613,12 @@ export namespace Price { */ minimum_amount: string; } + + export interface DimensionalPriceConfiguration { + dimension_values: Array; + + dimensional_price_group_id: string; + } } export interface TieredWithMinimumPrice { @@ -1583,6 +1673,8 @@ export namespace Price { price_type: 'usage_price' | 'fixed_price'; tiered_with_minimum_config: Record; + + dimensional_price_configuration?: TieredWithMinimumPrice.DimensionalPriceConfiguration | null; } export namespace TieredWithMinimumPrice { @@ -1639,6 +1731,12 @@ export namespace Price { */ minimum_amount: string; } + + export interface DimensionalPriceConfiguration { + dimension_values: Array; + + dimensional_price_group_id: string; + } } export interface TieredPackageWithMinimumPrice { @@ -1693,6 +1791,8 @@ export namespace Price { price_type: 'usage_price' | 'fixed_price'; tiered_package_with_minimum_config: Record; + + dimensional_price_configuration?: TieredPackageWithMinimumPrice.DimensionalPriceConfiguration | null; } export namespace TieredPackageWithMinimumPrice { @@ -1749,6 +1849,12 @@ export namespace Price { */ minimum_amount: string; } + + export interface DimensionalPriceConfiguration { + dimension_values: Array; + + dimensional_price_group_id: string; + } } export interface PackageWithAllocationPrice { @@ -1803,6 +1909,8 @@ export namespace Price { plan_phase_order: number | null; price_type: 'usage_price' | 'fixed_price'; + + dimensional_price_configuration?: PackageWithAllocationPrice.DimensionalPriceConfiguration | null; } export namespace PackageWithAllocationPrice { @@ -1859,6 +1967,12 @@ export namespace Price { */ minimum_amount: string; } + + export interface DimensionalPriceConfiguration { + dimension_values: Array; + + dimensional_price_group_id: string; + } } export interface UnitWithPercentPrice { @@ -1913,6 +2027,8 @@ export namespace Price { price_type: 'usage_price' | 'fixed_price'; unit_with_percent_config: Record; + + dimensional_price_configuration?: UnitWithPercentPrice.DimensionalPriceConfiguration | null; } export namespace UnitWithPercentPrice { @@ -1969,6 +2085,12 @@ export namespace Price { */ minimum_amount: string; } + + export interface DimensionalPriceConfiguration { + dimension_values: Array; + + dimensional_price_group_id: string; + } } export interface MatrixWithAllocationPrice { @@ -2023,6 +2145,8 @@ export namespace Price { plan_phase_order: number | null; price_type: 'usage_price' | 'fixed_price'; + + dimensional_price_configuration?: MatrixWithAllocationPrice.DimensionalPriceConfiguration | null; } export namespace MatrixWithAllocationPrice { @@ -2117,6 +2241,12 @@ export namespace Price { */ minimum_amount: string; } + + export interface DimensionalPriceConfiguration { + dimension_values: Array; + + dimensional_price_group_id: string; + } } export interface TieredWithProrationPrice { @@ -2171,6 +2301,8 @@ export namespace Price { price_type: 'usage_price' | 'fixed_price'; tiered_with_proration_config: Record; + + dimensional_price_configuration?: TieredWithProrationPrice.DimensionalPriceConfiguration | null; } export namespace TieredWithProrationPrice { @@ -2227,6 +2359,12 @@ export namespace Price { */ minimum_amount: string; } + + export interface DimensionalPriceConfiguration { + dimension_values: Array; + + dimensional_price_group_id: string; + } } export interface UnitWithProrationPrice { @@ -2281,6 +2419,8 @@ export namespace Price { price_type: 'usage_price' | 'fixed_price'; unit_with_proration_config: Record; + + dimensional_price_configuration?: UnitWithProrationPrice.DimensionalPriceConfiguration | null; } export namespace UnitWithProrationPrice { @@ -2337,6 +2477,12 @@ export namespace Price { */ minimum_amount: string; } + + export interface DimensionalPriceConfiguration { + dimension_values: Array; + + dimensional_price_group_id: string; + } } export interface GroupedAllocationPrice { @@ -2391,6 +2537,8 @@ export namespace Price { plan_phase_order: number | null; price_type: 'usage_price' | 'fixed_price'; + + dimensional_price_configuration?: GroupedAllocationPrice.DimensionalPriceConfiguration | null; } export namespace GroupedAllocationPrice { @@ -2447,6 +2595,12 @@ export namespace Price { */ minimum_amount: string; } + + export interface DimensionalPriceConfiguration { + dimension_values: Array; + + dimensional_price_group_id: string; + } } export interface GroupedWithProratedMinimumPrice { @@ -2501,6 +2655,8 @@ export namespace Price { plan_phase_order: number | null; price_type: 'usage_price' | 'fixed_price'; + + dimensional_price_configuration?: GroupedWithProratedMinimumPrice.DimensionalPriceConfiguration | null; } export namespace GroupedWithProratedMinimumPrice { @@ -2557,6 +2713,12 @@ export namespace Price { */ minimum_amount: string; } + + export interface DimensionalPriceConfiguration { + dimension_values: Array; + + dimensional_price_group_id: string; + } } export interface GroupedWithMeteredMinimumPrice { @@ -2611,6 +2773,8 @@ export namespace Price { plan_phase_order: number | null; price_type: 'usage_price' | 'fixed_price'; + + dimensional_price_configuration?: GroupedWithMeteredMinimumPrice.DimensionalPriceConfiguration | null; } export namespace GroupedWithMeteredMinimumPrice { @@ -2667,6 +2831,12 @@ export namespace Price { */ minimum_amount: string; } + + export interface DimensionalPriceConfiguration { + dimension_values: Array; + + dimensional_price_group_id: string; + } } export interface MatrixWithDisplayNamePrice { @@ -2721,6 +2891,8 @@ export namespace Price { plan_phase_order: number | null; price_type: 'usage_price' | 'fixed_price'; + + dimensional_price_configuration?: MatrixWithDisplayNamePrice.DimensionalPriceConfiguration | null; } export namespace MatrixWithDisplayNamePrice { @@ -2777,6 +2949,12 @@ export namespace Price { */ minimum_amount: string; } + + export interface DimensionalPriceConfiguration { + dimension_values: Array; + + dimensional_price_group_id: string; + } } export interface BulkWithProrationPrice { @@ -2820,20 +2998,258 @@ export namespace Price { */ metadata: Record; - minimum: BulkWithProrationPrice.Minimum | null; + minimum: BulkWithProrationPrice.Minimum | null; + + minimum_amount: string | null; + + model_type: 'bulk_with_proration'; + + name: string; + + plan_phase_order: number | null; + + price_type: 'usage_price' | 'fixed_price'; + + dimensional_price_configuration?: BulkWithProrationPrice.DimensionalPriceConfiguration | null; + } + + export namespace BulkWithProrationPrice { + export interface BillableMetric { + id: string; + } + + export interface BillingCycleConfiguration { + duration: number; + + duration_unit: 'day' | 'month'; + } + + export interface CreditAllocation { + allows_rollover: boolean; + + currency: string; + } + + export interface InvoicingCycleConfiguration { + duration: number; + + duration_unit: 'day' | 'month'; + } + + export interface Item { + id: string; + + name: string; + } + + export interface Maximum { + /** + * List of price_ids that this maximum amount applies to. For plan/plan phase + * maximums, this can be a subset of prices. + */ + applies_to_price_ids: Array; + + /** + * Maximum amount applied + */ + maximum_amount: string; + } + + export interface Minimum { + /** + * List of price_ids that this minimum amount applies to. For plan/plan phase + * minimums, this can be a subset of prices. + */ + applies_to_price_ids: Array; + + /** + * Minimum amount applied + */ + minimum_amount: string; + } + + export interface DimensionalPriceConfiguration { + dimension_values: Array; + + dimensional_price_group_id: string; + } + } + + export interface GroupedTieredPackagePrice { + id: string; + + billable_metric: GroupedTieredPackagePrice.BillableMetric | null; + + billing_cycle_configuration: GroupedTieredPackagePrice.BillingCycleConfiguration; + + cadence: 'one_time' | 'monthly' | 'quarterly' | 'semi_annual' | 'annual' | 'custom'; + + conversion_rate: number | null; + + created_at: string; + + credit_allocation: GroupedTieredPackagePrice.CreditAllocation | null; + + currency: string; + + discount: Shared.Discount | null; + + external_price_id: string | null; + + fixed_price_quantity: number | null; + + grouped_tiered_package_config: Record; + + invoicing_cycle_configuration: GroupedTieredPackagePrice.InvoicingCycleConfiguration | null; + + item: GroupedTieredPackagePrice.Item; + + maximum: GroupedTieredPackagePrice.Maximum | null; + + maximum_amount: string | null; + + /** + * User specified key-value pairs for the resource. If not present, this defaults + * to an empty dictionary. Individual keys can be removed by setting the value to + * `null`, and the entire metadata mapping can be cleared by setting `metadata` to + * `null`. + */ + metadata: Record; + + minimum: GroupedTieredPackagePrice.Minimum | null; + + minimum_amount: string | null; + + model_type: 'grouped_tiered_package'; + + name: string; + + plan_phase_order: number | null; + + price_type: 'usage_price' | 'fixed_price'; + + dimensional_price_configuration?: GroupedTieredPackagePrice.DimensionalPriceConfiguration | null; + } + + export namespace GroupedTieredPackagePrice { + export interface BillableMetric { + id: string; + } + + export interface BillingCycleConfiguration { + duration: number; + + duration_unit: 'day' | 'month'; + } + + export interface CreditAllocation { + allows_rollover: boolean; + + currency: string; + } + + export interface InvoicingCycleConfiguration { + duration: number; + + duration_unit: 'day' | 'month'; + } + + export interface Item { + id: string; + + name: string; + } + + export interface Maximum { + /** + * List of price_ids that this maximum amount applies to. For plan/plan phase + * maximums, this can be a subset of prices. + */ + applies_to_price_ids: Array; + + /** + * Maximum amount applied + */ + maximum_amount: string; + } + + export interface Minimum { + /** + * List of price_ids that this minimum amount applies to. For plan/plan phase + * minimums, this can be a subset of prices. + */ + applies_to_price_ids: Array; + + /** + * Minimum amount applied + */ + minimum_amount: string; + } + + export interface DimensionalPriceConfiguration { + dimension_values: Array; + + dimensional_price_group_id: string; + } + } + + export interface MaxGroupTieredPackagePrice { + id: string; + + billable_metric: MaxGroupTieredPackagePrice.BillableMetric | null; + + billing_cycle_configuration: MaxGroupTieredPackagePrice.BillingCycleConfiguration; + + cadence: 'one_time' | 'monthly' | 'quarterly' | 'semi_annual' | 'annual' | 'custom'; + + conversion_rate: number | null; + + created_at: string; + + credit_allocation: MaxGroupTieredPackagePrice.CreditAllocation | null; + + currency: string; + + discount: Shared.Discount | null; + + external_price_id: string | null; + + fixed_price_quantity: number | null; + + invoicing_cycle_configuration: MaxGroupTieredPackagePrice.InvoicingCycleConfiguration | null; + + item: MaxGroupTieredPackagePrice.Item; + + max_group_tiered_package_config: Record; + + maximum: MaxGroupTieredPackagePrice.Maximum | null; + + maximum_amount: string | null; + + /** + * User specified key-value pairs for the resource. If not present, this defaults + * to an empty dictionary. Individual keys can be removed by setting the value to + * `null`, and the entire metadata mapping can be cleared by setting `metadata` to + * `null`. + */ + metadata: Record; + + minimum: MaxGroupTieredPackagePrice.Minimum | null; minimum_amount: string | null; - model_type: 'bulk_with_proration'; + model_type: 'max_group_tiered_package'; name: string; plan_phase_order: number | null; price_type: 'usage_price' | 'fixed_price'; + + dimensional_price_configuration?: MaxGroupTieredPackagePrice.DimensionalPriceConfiguration | null; } - export namespace BulkWithProrationPrice { + export namespace MaxGroupTieredPackagePrice { export interface BillableMetric { id: string; } @@ -2887,14 +3303,20 @@ export namespace Price { */ minimum_amount: string; } + + export interface DimensionalPriceConfiguration { + dimension_values: Array; + + dimensional_price_group_id: string; + } } - export interface GroupedTieredPackagePrice { + export interface ScalableMatrixWithUnitPricingPrice { id: string; - billable_metric: GroupedTieredPackagePrice.BillableMetric | null; + billable_metric: ScalableMatrixWithUnitPricingPrice.BillableMetric | null; - billing_cycle_configuration: GroupedTieredPackagePrice.BillingCycleConfiguration; + billing_cycle_configuration: ScalableMatrixWithUnitPricingPrice.BillingCycleConfiguration; cadence: 'one_time' | 'monthly' | 'quarterly' | 'semi_annual' | 'annual' | 'custom'; @@ -2902,7 +3324,7 @@ export namespace Price { created_at: string; - credit_allocation: GroupedTieredPackagePrice.CreditAllocation | null; + credit_allocation: ScalableMatrixWithUnitPricingPrice.CreditAllocation | null; currency: string; @@ -2912,13 +3334,11 @@ export namespace Price { fixed_price_quantity: number | null; - grouped_tiered_package_config: Record; - - invoicing_cycle_configuration: GroupedTieredPackagePrice.InvoicingCycleConfiguration | null; + invoicing_cycle_configuration: ScalableMatrixWithUnitPricingPrice.InvoicingCycleConfiguration | null; - item: GroupedTieredPackagePrice.Item; + item: ScalableMatrixWithUnitPricingPrice.Item; - maximum: GroupedTieredPackagePrice.Maximum | null; + maximum: ScalableMatrixWithUnitPricingPrice.Maximum | null; maximum_amount: string | null; @@ -2930,20 +3350,24 @@ export namespace Price { */ metadata: Record; - minimum: GroupedTieredPackagePrice.Minimum | null; + minimum: ScalableMatrixWithUnitPricingPrice.Minimum | null; minimum_amount: string | null; - model_type: 'grouped_tiered_package'; + model_type: 'scalable_matrix_with_unit_pricing'; name: string; plan_phase_order: number | null; price_type: 'usage_price' | 'fixed_price'; + + scalable_matrix_with_unit_pricing_config: Record; + + dimensional_price_configuration?: ScalableMatrixWithUnitPricingPrice.DimensionalPriceConfiguration | null; } - export namespace GroupedTieredPackagePrice { + export namespace ScalableMatrixWithUnitPricingPrice { export interface BillableMetric { id: string; } @@ -2997,14 +3421,20 @@ export namespace Price { */ minimum_amount: string; } + + export interface DimensionalPriceConfiguration { + dimension_values: Array; + + dimensional_price_group_id: string; + } } - export interface MaxGroupTieredPackagePrice { + export interface ScalableMatrixWithTieredPricingPrice { id: string; - billable_metric: MaxGroupTieredPackagePrice.BillableMetric | null; + billable_metric: ScalableMatrixWithTieredPricingPrice.BillableMetric | null; - billing_cycle_configuration: MaxGroupTieredPackagePrice.BillingCycleConfiguration; + billing_cycle_configuration: ScalableMatrixWithTieredPricingPrice.BillingCycleConfiguration; cadence: 'one_time' | 'monthly' | 'quarterly' | 'semi_annual' | 'annual' | 'custom'; @@ -3012,7 +3442,7 @@ export namespace Price { created_at: string; - credit_allocation: MaxGroupTieredPackagePrice.CreditAllocation | null; + credit_allocation: ScalableMatrixWithTieredPricingPrice.CreditAllocation | null; currency: string; @@ -3022,13 +3452,11 @@ export namespace Price { fixed_price_quantity: number | null; - invoicing_cycle_configuration: MaxGroupTieredPackagePrice.InvoicingCycleConfiguration | null; - - item: MaxGroupTieredPackagePrice.Item; + invoicing_cycle_configuration: ScalableMatrixWithTieredPricingPrice.InvoicingCycleConfiguration | null; - max_group_tiered_package_config: Record; + item: ScalableMatrixWithTieredPricingPrice.Item; - maximum: MaxGroupTieredPackagePrice.Maximum | null; + maximum: ScalableMatrixWithTieredPricingPrice.Maximum | null; maximum_amount: string | null; @@ -3040,20 +3468,24 @@ export namespace Price { */ metadata: Record; - minimum: MaxGroupTieredPackagePrice.Minimum | null; + minimum: ScalableMatrixWithTieredPricingPrice.Minimum | null; minimum_amount: string | null; - model_type: 'max_group_tiered_package'; + model_type: 'scalable_matrix_with_tiered_pricing'; name: string; plan_phase_order: number | null; price_type: 'usage_price' | 'fixed_price'; + + scalable_matrix_with_tiered_pricing_config: Record; + + dimensional_price_configuration?: ScalableMatrixWithTieredPricingPrice.DimensionalPriceConfiguration | null; } - export namespace MaxGroupTieredPackagePrice { + export namespace ScalableMatrixWithTieredPricingPrice { export interface BillableMetric { id: string; } @@ -3107,6 +3539,12 @@ export namespace Price { */ minimum_amount: string; } + + export interface DimensionalPriceConfiguration { + dimension_values: Array; + + dimensional_price_group_id: string; + } } } @@ -3139,7 +3577,9 @@ export type PriceCreateParams = | PriceCreateParams.NewFloatingGroupedWithMeteredMinimumPrice | PriceCreateParams.NewFloatingMatrixWithDisplayNamePrice | PriceCreateParams.NewFloatingBulkWithProrationPrice - | PriceCreateParams.NewFloatingGroupedTieredPackagePrice; + | PriceCreateParams.NewFloatingGroupedTieredPackagePrice + | PriceCreateParams.NewFloatingScalableMatrixWithUnitPricingPrice + | PriceCreateParams.NewFloatingScalableMatrixWithTieredPricingPrice; export declare namespace PriceCreateParams { export interface NewFloatingUnitPrice { @@ -6150,6 +6590,230 @@ export declare namespace PriceCreateParams { duration_unit: 'day' | 'month'; } } + + export interface NewFloatingScalableMatrixWithUnitPricingPrice { + /** + * The cadence to bill for this price on. + */ + cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom'; + + /** + * An ISO 4217 currency string for which this price is billed in. + */ + currency: string; + + /** + * The id of the item the plan will be associated with. + */ + item_id: string; + + model_type: 'scalable_matrix_with_unit_pricing'; + + /** + * The name of the price. + */ + name: string; + + scalable_matrix_with_unit_pricing_config: Record; + + /** + * The id of the billable metric for the price. Only needed if the price is + * usage-based. + */ + billable_metric_id?: string | null; + + /** + * If the Price represents a fixed cost, the price will be billed in-advance if + * this is true, and in-arrears if this is false. + */ + billed_in_advance?: boolean | null; + + /** + * For custom cadence: specifies the duration of the billing period in days or + * months. + */ + billing_cycle_configuration?: NewFloatingScalableMatrixWithUnitPricingPrice.BillingCycleConfiguration | null; + + /** + * The per unit conversion rate of the price currency to the invoicing currency. + */ + conversion_rate?: number | null; + + /** + * An alias for the price. + */ + external_price_id?: string | null; + + /** + * If the Price represents a fixed cost, this represents the quantity of units + * applied. + */ + fixed_price_quantity?: number | null; + + /** + * The property used to group this price on an invoice + */ + invoice_grouping_key?: string | null; + + /** + * Within each billing cycle, specifies the cadence at which invoices are produced. + * If unspecified, a single invoice is produced per billing cycle. + */ + invoicing_cycle_configuration?: NewFloatingScalableMatrixWithUnitPricingPrice.InvoicingCycleConfiguration | null; + + /** + * User-specified key/value pairs for the resource. Individual keys can be removed + * by setting the value to `null`, and the entire metadata mapping can be cleared + * by setting `metadata` to `null`. + */ + metadata?: Record | null; + } + + export namespace NewFloatingScalableMatrixWithUnitPricingPrice { + /** + * For custom cadence: specifies the duration of the billing period in days or + * months. + */ + export interface BillingCycleConfiguration { + /** + * The duration of the billing period. + */ + duration: number; + + /** + * The unit of billing period duration. + */ + duration_unit: 'day' | 'month'; + } + + /** + * Within each billing cycle, specifies the cadence at which invoices are produced. + * If unspecified, a single invoice is produced per billing cycle. + */ + export interface InvoicingCycleConfiguration { + /** + * The duration of the billing period. + */ + duration: number; + + /** + * The unit of billing period duration. + */ + duration_unit: 'day' | 'month'; + } + } + + export interface NewFloatingScalableMatrixWithTieredPricingPrice { + /** + * The cadence to bill for this price on. + */ + cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom'; + + /** + * An ISO 4217 currency string for which this price is billed in. + */ + currency: string; + + /** + * The id of the item the plan will be associated with. + */ + item_id: string; + + model_type: 'scalable_matrix_with_tiered_pricing'; + + /** + * The name of the price. + */ + name: string; + + scalable_matrix_with_tiered_pricing_config: Record; + + /** + * The id of the billable metric for the price. Only needed if the price is + * usage-based. + */ + billable_metric_id?: string | null; + + /** + * If the Price represents a fixed cost, the price will be billed in-advance if + * this is true, and in-arrears if this is false. + */ + billed_in_advance?: boolean | null; + + /** + * For custom cadence: specifies the duration of the billing period in days or + * months. + */ + billing_cycle_configuration?: NewFloatingScalableMatrixWithTieredPricingPrice.BillingCycleConfiguration | null; + + /** + * The per unit conversion rate of the price currency to the invoicing currency. + */ + conversion_rate?: number | null; + + /** + * An alias for the price. + */ + external_price_id?: string | null; + + /** + * If the Price represents a fixed cost, this represents the quantity of units + * applied. + */ + fixed_price_quantity?: number | null; + + /** + * The property used to group this price on an invoice + */ + invoice_grouping_key?: string | null; + + /** + * Within each billing cycle, specifies the cadence at which invoices are produced. + * If unspecified, a single invoice is produced per billing cycle. + */ + invoicing_cycle_configuration?: NewFloatingScalableMatrixWithTieredPricingPrice.InvoicingCycleConfiguration | null; + + /** + * User-specified key/value pairs for the resource. Individual keys can be removed + * by setting the value to `null`, and the entire metadata mapping can be cleared + * by setting `metadata` to `null`. + */ + metadata?: Record | null; + } + + export namespace NewFloatingScalableMatrixWithTieredPricingPrice { + /** + * For custom cadence: specifies the duration of the billing period in days or + * months. + */ + export interface BillingCycleConfiguration { + /** + * The duration of the billing period. + */ + duration: number; + + /** + * The unit of billing period duration. + */ + duration_unit: 'day' | 'month'; + } + + /** + * Within each billing cycle, specifies the cadence at which invoices are produced. + * If unspecified, a single invoice is produced per billing cycle. + */ + export interface InvoicingCycleConfiguration { + /** + * The duration of the billing period. + */ + duration: number; + + /** + * The unit of billing period duration. + */ + duration_unit: 'day' | 'month'; + } + } } export interface PriceUpdateParams { diff --git a/src/resources/subscriptions.ts b/src/resources/subscriptions.ts index a2f41b61..650cd98d 100644 --- a/src/resources/subscriptions.ts +++ b/src/resources/subscriptions.ts @@ -13364,6 +13364,8 @@ export namespace SubscriptionPriceIntervalsParams { | Add.NewFloatingMatrixWithDisplayNamePrice | Add.NewFloatingBulkWithProrationPrice | Add.NewFloatingGroupedTieredPackagePrice + | Add.NewFloatingScalableMatrixWithUnitPricingPrice + | Add.NewFloatingScalableMatrixWithTieredPricingPrice | null; /** @@ -16449,6 +16451,230 @@ export namespace SubscriptionPriceIntervalsParams { duration_unit: 'day' | 'month'; } } + + export interface NewFloatingScalableMatrixWithUnitPricingPrice { + /** + * The cadence to bill for this price on. + */ + cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom'; + + /** + * An ISO 4217 currency string for which this price is billed in. + */ + currency: string; + + /** + * The id of the item the plan will be associated with. + */ + item_id: string; + + model_type: 'scalable_matrix_with_unit_pricing'; + + /** + * The name of the price. + */ + name: string; + + scalable_matrix_with_unit_pricing_config: Record; + + /** + * The id of the billable metric for the price. Only needed if the price is + * usage-based. + */ + billable_metric_id?: string | null; + + /** + * If the Price represents a fixed cost, the price will be billed in-advance if + * this is true, and in-arrears if this is false. + */ + billed_in_advance?: boolean | null; + + /** + * For custom cadence: specifies the duration of the billing period in days or + * months. + */ + billing_cycle_configuration?: NewFloatingScalableMatrixWithUnitPricingPrice.BillingCycleConfiguration | null; + + /** + * The per unit conversion rate of the price currency to the invoicing currency. + */ + conversion_rate?: number | null; + + /** + * An alias for the price. + */ + external_price_id?: string | null; + + /** + * If the Price represents a fixed cost, this represents the quantity of units + * applied. + */ + fixed_price_quantity?: number | null; + + /** + * The property used to group this price on an invoice + */ + invoice_grouping_key?: string | null; + + /** + * Within each billing cycle, specifies the cadence at which invoices are produced. + * If unspecified, a single invoice is produced per billing cycle. + */ + invoicing_cycle_configuration?: NewFloatingScalableMatrixWithUnitPricingPrice.InvoicingCycleConfiguration | null; + + /** + * User-specified key/value pairs for the resource. Individual keys can be removed + * by setting the value to `null`, and the entire metadata mapping can be cleared + * by setting `metadata` to `null`. + */ + metadata?: Record | null; + } + + export namespace NewFloatingScalableMatrixWithUnitPricingPrice { + /** + * For custom cadence: specifies the duration of the billing period in days or + * months. + */ + export interface BillingCycleConfiguration { + /** + * The duration of the billing period. + */ + duration: number; + + /** + * The unit of billing period duration. + */ + duration_unit: 'day' | 'month'; + } + + /** + * Within each billing cycle, specifies the cadence at which invoices are produced. + * If unspecified, a single invoice is produced per billing cycle. + */ + export interface InvoicingCycleConfiguration { + /** + * The duration of the billing period. + */ + duration: number; + + /** + * The unit of billing period duration. + */ + duration_unit: 'day' | 'month'; + } + } + + export interface NewFloatingScalableMatrixWithTieredPricingPrice { + /** + * The cadence to bill for this price on. + */ + cadence: 'annual' | 'semi_annual' | 'monthly' | 'quarterly' | 'one_time' | 'custom'; + + /** + * An ISO 4217 currency string for which this price is billed in. + */ + currency: string; + + /** + * The id of the item the plan will be associated with. + */ + item_id: string; + + model_type: 'scalable_matrix_with_tiered_pricing'; + + /** + * The name of the price. + */ + name: string; + + scalable_matrix_with_tiered_pricing_config: Record; + + /** + * The id of the billable metric for the price. Only needed if the price is + * usage-based. + */ + billable_metric_id?: string | null; + + /** + * If the Price represents a fixed cost, the price will be billed in-advance if + * this is true, and in-arrears if this is false. + */ + billed_in_advance?: boolean | null; + + /** + * For custom cadence: specifies the duration of the billing period in days or + * months. + */ + billing_cycle_configuration?: NewFloatingScalableMatrixWithTieredPricingPrice.BillingCycleConfiguration | null; + + /** + * The per unit conversion rate of the price currency to the invoicing currency. + */ + conversion_rate?: number | null; + + /** + * An alias for the price. + */ + external_price_id?: string | null; + + /** + * If the Price represents a fixed cost, this represents the quantity of units + * applied. + */ + fixed_price_quantity?: number | null; + + /** + * The property used to group this price on an invoice + */ + invoice_grouping_key?: string | null; + + /** + * Within each billing cycle, specifies the cadence at which invoices are produced. + * If unspecified, a single invoice is produced per billing cycle. + */ + invoicing_cycle_configuration?: NewFloatingScalableMatrixWithTieredPricingPrice.InvoicingCycleConfiguration | null; + + /** + * User-specified key/value pairs for the resource. Individual keys can be removed + * by setting the value to `null`, and the entire metadata mapping can be cleared + * by setting `metadata` to `null`. + */ + metadata?: Record | null; + } + + export namespace NewFloatingScalableMatrixWithTieredPricingPrice { + /** + * For custom cadence: specifies the duration of the billing period in days or + * months. + */ + export interface BillingCycleConfiguration { + /** + * The duration of the billing period. + */ + duration: number; + + /** + * The unit of billing period duration. + */ + duration_unit: 'day' | 'month'; + } + + /** + * Within each billing cycle, specifies the cadence at which invoices are produced. + * If unspecified, a single invoice is produced per billing cycle. + */ + export interface InvoicingCycleConfiguration { + /** + * The duration of the billing period. + */ + duration: number; + + /** + * The unit of billing period duration. + */ + duration_unit: 'day' | 'month'; + } + } } export interface AddAdjustment { From 1dd7268b8d458507a1ca052c99db8d9566b3ab63 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 4 Feb 2025 01:16:33 +0000 Subject: [PATCH 3/3] release: 4.54.0 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 13 +++++++++++++ package.json | 2 +- src/version.ts | 2 +- 4 files changed, 16 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index bdcacbf6..402862bf 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "4.53.0" + ".": "4.54.0" } diff --git a/CHANGELOG.md b/CHANGELOG.md index 5358ce2d..6f10379c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,18 @@ # Changelog +## 4.54.0 (2025-02-04) + +Full Changelog: [v4.53.0...v4.54.0](https://github.com/orbcorp/orb-node/compare/v4.53.0...v4.54.0) + +### Features + +* **api:** api update ([#497](https://github.com/orbcorp/orb-node/issues/497)) ([9e9495b](https://github.com/orbcorp/orb-node/commit/9e9495bdf7a15da462953cfbf01a21388f258f60)) + + +### Chores + +* fix references to nested types ([#495](https://github.com/orbcorp/orb-node/issues/495)) ([c084727](https://github.com/orbcorp/orb-node/commit/c0847275be95bddf7408ab85d89474b632991c83)) + ## 4.53.0 (2025-01-30) Full Changelog: [v4.52.0...v4.53.0](https://github.com/orbcorp/orb-node/compare/v4.52.0...v4.53.0) diff --git a/package.json b/package.json index 41f1f269..6cf2c5a1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "orb-billing", - "version": "4.53.0", + "version": "4.54.0", "description": "The official TypeScript library for the Orb API", "author": "Orb ", "types": "dist/index.d.ts", diff --git a/src/version.ts b/src/version.ts index 0f53607f..bca401fd 100644 --- a/src/version.ts +++ b/src/version.ts @@ -1 +1 @@ -export const VERSION = '4.53.0'; // x-release-please-version +export const VERSION = '4.54.0'; // x-release-please-version