diff --git a/src/resources/customers/costs.ts b/src/resources/customers/costs.ts index 2ea5b530..0b81cfd0 100644 --- a/src/resources/customers/costs.ts +++ b/src/resources/customers/costs.ts @@ -558,7 +558,7 @@ export namespace CostListResponse { * } * ``` * - * ### Fixed fees + * ## Fixed fees * * Fixed fees are prices that are applied independent of usage quantities, and * follow unit pricing. They also have an additional parameter @@ -836,7 +836,7 @@ export namespace CostListByExternalIDResponse { * } * ``` * - * ### Fixed fees + * ## Fixed fees * * Fixed fees are prices that are applied independent of usage quantities, and * follow unit pricing. They also have an additional parameter diff --git a/src/resources/customers/credits/credits.ts b/src/resources/customers/credits/credits.ts index 2431a2d0..98d16bcb 100644 --- a/src/resources/customers/credits/credits.ts +++ b/src/resources/customers/credits/credits.ts @@ -78,6 +78,8 @@ export interface CreditListResponse { expiry_date: string | null; per_unit_cost_basis: string | null; + + status: 'active' | 'pending_payment'; } export interface CreditListByExternalIDResponse { @@ -88,6 +90,8 @@ export interface CreditListByExternalIDResponse { expiry_date: string | null; per_unit_cost_basis: string | null; + + status: 'active' | 'pending_payment'; } export interface CreditListParams extends PageParams { diff --git a/src/resources/invoice-line-items.ts b/src/resources/invoice-line-items.ts index 076423e1..502c0046 100644 --- a/src/resources/invoice-line-items.ts +++ b/src/resources/invoice-line-items.ts @@ -270,7 +270,7 @@ export interface InvoiceLineItemCreateResponse { * } * ``` * - * ### Fixed fees + * ## Fixed fees * * Fixed fees are prices that are applied independent of usage quantities, and * follow unit pricing. They also have an additional parameter diff --git a/src/resources/invoices.ts b/src/resources/invoices.ts index 589171ef..0789d3ec 100644 --- a/src/resources/invoices.ts +++ b/src/resources/invoices.ts @@ -965,7 +965,7 @@ export namespace Invoice { * } * ``` * - * ### Fixed fees + * ## Fixed fees * * Fixed fees are prices that are applied independent of usage quantities, and * follow unit pricing. They also have an additional parameter @@ -2050,7 +2050,7 @@ export namespace InvoiceFetchUpcomingResponse { * } * ``` * - * ### Fixed fees + * ## Fixed fees * * Fixed fees are prices that are applied independent of usage quantities, and * follow unit pricing. They also have an additional parameter @@ -2373,11 +2373,6 @@ export namespace InvoiceCreateParams { * Rate per unit of usage */ unit_amount: string; - - /** - * Multiplier to scale rated quantity by - */ - scaling_factor?: number | null; } } } @@ -2424,19 +2419,19 @@ export interface InvoiceFetchUpcomingParams { export interface InvoiceMarkPaidParams { /** - * An optional external ID to associate with the payment. + * A date string to specify the date of the payment. */ - external_id: string | null; + payment_received_date: string; /** - * An optional note to associate with the payment. + * An optional external ID to associate with the payment. */ - notes: string | null; + external_id?: string | null; /** - * A date string to specify the date of the payment. + * An optional note to associate with the payment. */ - payment_received_date: string; + notes?: string | null; } export namespace Invoices { diff --git a/src/resources/plans/plans.ts b/src/resources/plans/plans.ts index e3d7d82a..52099355 100644 --- a/src/resources/plans/plans.ts +++ b/src/resources/plans/plans.ts @@ -396,11 +396,6 @@ export namespace PlanCreateParams { * Rate per unit of usage */ unit_amount: string; - - /** - * Multiplier to scale rated quantity by - */ - scaling_factor?: number | null; } } @@ -533,12 +528,6 @@ export namespace PlanCreateParams { * Matrix values for specified matrix grouping keys */ matrix_values: Array; - - /** - * Default optional multiplier to scale rated quantities that fall into the default - * bucket by - */ - scaling_factor?: number | null; } export namespace MatrixConfig { @@ -554,11 +543,6 @@ export namespace PlanCreateParams { * Unit price for the specified dimension_values */ unit_amount: string; - - /** - * Optional multiplier to scale rated quantities by - */ - scaling_factor?: number | null; } } } diff --git a/src/resources/prices/prices.ts b/src/resources/prices/prices.ts index a0b1bfd8..b06f0d07 100644 --- a/src/resources/prices/prices.ts +++ b/src/resources/prices/prices.ts @@ -266,7 +266,7 @@ export class PricesPage extends Page {} * } * ``` * - * ### Fixed fees + * ## Fixed fees * * Fixed fees are prices that are applied independent of usage quantities, and * follow unit pricing. They also have an additional parameter @@ -383,11 +383,6 @@ export namespace Price { * Rate per unit of usage */ unit_amount: string; - - /** - * Multiplier to scale rated quantity by - */ - scaling_factor?: number | null; } } @@ -544,12 +539,6 @@ export namespace Price { * Matrix values for specified matrix grouping keys */ matrix_values: Array; - - /** - * Default optional multiplier to scale rated quantities that fall into the default - * bucket by - */ - scaling_factor?: number | null; } export namespace MatrixConfig { @@ -565,11 +554,6 @@ export namespace Price { * Unit price for the specified dimension_values */ unit_amount: string; - - /** - * Optional multiplier to scale rated quantities by - */ - scaling_factor?: number | null; } } @@ -1547,12 +1531,6 @@ export namespace Price { * Matrix values for specified matrix grouping keys */ matrix_values: Array; - - /** - * Default optional multiplier to scale rated quantities that fall into the default - * bucket by - */ - scaling_factor?: number | null; } export namespace MatrixWithAllocationConfig { @@ -1568,11 +1546,6 @@ export namespace Price { * Unit price for the specified dimension_values */ unit_amount: string; - - /** - * Optional multiplier to scale rated quantities by - */ - scaling_factor?: number | null; } } @@ -1682,11 +1655,6 @@ export namespace PriceCreateParams { * Rate per unit of usage */ unit_amount: string; - - /** - * Multiplier to scale rated quantity by - */ - scaling_factor?: number | null; } } @@ -1829,12 +1797,6 @@ export namespace PriceCreateParams { * Matrix values for specified matrix grouping keys */ matrix_values: Array; - - /** - * Default optional multiplier to scale rated quantities that fall into the default - * bucket by - */ - scaling_factor?: number | null; } export namespace MatrixConfig { @@ -1850,11 +1812,6 @@ export namespace PriceCreateParams { * Unit price for the specified dimension_values */ unit_amount: string; - - /** - * Optional multiplier to scale rated quantities by - */ - scaling_factor?: number | null; } } } @@ -1934,12 +1891,6 @@ export namespace PriceCreateParams { * Matrix values for specified matrix grouping keys */ matrix_values: Array; - - /** - * Default optional multiplier to scale rated quantities that fall into the default - * bucket by - */ - scaling_factor?: number | null; } export namespace MatrixWithAllocationConfig { @@ -1955,11 +1906,6 @@ export namespace PriceCreateParams { * Unit price for the specified dimension_values */ unit_amount: string; - - /** - * Optional multiplier to scale rated quantities by - */ - scaling_factor?: number | null; } } } diff --git a/src/resources/subscriptions.ts b/src/resources/subscriptions.ts index e3664a6a..0e4d9c8e 100644 --- a/src/resources/subscriptions.ts +++ b/src/resources/subscriptions.ts @@ -1580,7 +1580,7 @@ export namespace Subscription { * } * ``` * - * ### Fixed fees + * ## Fixed fees * * Fixed fees are prices that are applied independent of usage quantities, and * follow unit pricing. They also have an additional parameter @@ -1966,7 +1966,7 @@ export namespace SubscriptionFetchCostsResponse { * } * ``` * - * ### Fixed fees + * ## Fixed fees * * Fixed fees are prices that are applied independent of usage quantities, and * follow unit pricing. They also have an additional parameter @@ -2138,11 +2138,6 @@ export namespace SubscriptionCreateParams { * Rate per unit of usage */ unit_amount: string; - - /** - * Multiplier to scale rated quantity by - */ - scaling_factor?: number | null; } /** @@ -2303,12 +2298,6 @@ export namespace SubscriptionCreateParams { * Matrix values for specified matrix grouping keys */ matrix_values: Array; - - /** - * Default optional multiplier to scale rated quantities that fall into the default - * bucket by - */ - scaling_factor?: number | null; } export namespace MatrixConfig { @@ -2324,11 +2313,6 @@ export namespace SubscriptionCreateParams { * Unit price for the specified dimension_values */ unit_amount: string; - - /** - * Optional multiplier to scale rated quantities by - */ - scaling_factor?: number | null; } } @@ -3439,11 +3423,6 @@ export namespace SubscriptionPriceIntervalsParams { * Rate per unit of usage */ unit_amount: string; - - /** - * Multiplier to scale rated quantity by - */ - scaling_factor?: number | null; } } @@ -3586,12 +3565,6 @@ export namespace SubscriptionPriceIntervalsParams { * Matrix values for specified matrix grouping keys */ matrix_values: Array; - - /** - * Default optional multiplier to scale rated quantities that fall into the default - * bucket by - */ - scaling_factor?: number | null; } export namespace MatrixConfig { @@ -3607,11 +3580,6 @@ export namespace SubscriptionPriceIntervalsParams { * Unit price for the specified dimension_values */ unit_amount: string; - - /** - * Optional multiplier to scale rated quantities by - */ - scaling_factor?: number | null; } } } @@ -3691,12 +3659,6 @@ export namespace SubscriptionPriceIntervalsParams { * Matrix values for specified matrix grouping keys */ matrix_values: Array; - - /** - * Default optional multiplier to scale rated quantities that fall into the default - * bucket by - */ - scaling_factor?: number | null; } export namespace MatrixWithAllocationConfig { @@ -3712,11 +3674,6 @@ export namespace SubscriptionPriceIntervalsParams { * Unit price for the specified dimension_values */ unit_amount: string; - - /** - * Optional multiplier to scale rated quantities by - */ - scaling_factor?: number | null; } } } @@ -4604,11 +4561,6 @@ export namespace SubscriptionSchedulePlanChangeParams { * Rate per unit of usage */ unit_amount: string; - - /** - * Multiplier to scale rated quantity by - */ - scaling_factor?: number | null; } /** @@ -4769,12 +4721,6 @@ export namespace SubscriptionSchedulePlanChangeParams { * Matrix values for specified matrix grouping keys */ matrix_values: Array; - - /** - * Default optional multiplier to scale rated quantities that fall into the default - * bucket by - */ - scaling_factor?: number | null; } export namespace MatrixConfig { @@ -4790,11 +4736,6 @@ export namespace SubscriptionSchedulePlanChangeParams { * Unit price for the specified dimension_values */ unit_amount: string; - - /** - * Optional multiplier to scale rated quantities by - */ - scaling_factor?: number | null; } } diff --git a/tests/api-resources/invoices.test.ts b/tests/api-resources/invoices.test.ts index 98e95abe..bd02a9e9 100644 --- a/tests/api-resources/invoices.test.ts +++ b/tests/api-resources/invoices.test.ts @@ -65,7 +65,7 @@ describe('resource invoices', () => { name: 'Line Item Name', item_id: '4khy3nwzktxv7', model_type: 'unit', - unit_config: { unit_amount: 'string', scaling_factor: 0 }, + unit_config: { unit_amount: 'string' }, }, { start_date: '2023-09-22', @@ -74,7 +74,7 @@ describe('resource invoices', () => { name: 'Line Item Name', item_id: '4khy3nwzktxv7', model_type: 'unit', - unit_config: { unit_amount: 'string', scaling_factor: 0 }, + unit_config: { unit_amount: 'string' }, }, { start_date: '2023-09-22', @@ -83,7 +83,7 @@ describe('resource invoices', () => { name: 'Line Item Name', item_id: '4khy3nwzktxv7', model_type: 'unit', - unit_config: { unit_amount: 'string', scaling_factor: 0 }, + unit_config: { unit_amount: 'string' }, }, ], net_terms: 0, @@ -203,11 +203,7 @@ describe('resource invoices', () => { }); test('markPaid: only required params', async () => { - const responsePromise = orb.invoices.markPaid('string', { - external_id: 'external_payment_id_123', - notes: 'string', - payment_received_date: '2023-09-22', - }); + const responsePromise = orb.invoices.markPaid('string', { payment_received_date: '2023-09-22' }); const rawResponse = await responsePromise.asResponse(); expect(rawResponse).toBeInstanceOf(Response); const response = await responsePromise; @@ -219,9 +215,9 @@ describe('resource invoices', () => { test('markPaid: required and optional params', async () => { const response = await orb.invoices.markPaid('string', { + payment_received_date: '2023-09-22', external_id: 'external_payment_id_123', notes: 'string', - payment_received_date: '2023-09-22', }); }); diff --git a/tests/api-resources/plans/plans.test.ts b/tests/api-resources/plans/plans.test.ts index b0afdbbe..dfe2f5a9 100644 --- a/tests/api-resources/plans/plans.test.ts +++ b/tests/api-resources/plans/plans.test.ts @@ -47,7 +47,7 @@ describe('resource plans', () => { invoice_grouping_key: 'string', cadence: 'annual', model_type: 'unit', - unit_config: { unit_amount: 'string', scaling_factor: 0 }, + unit_config: { unit_amount: 'string' }, }, ], default_invoice_memo: 'string', diff --git a/tests/api-resources/prices/prices.test.ts b/tests/api-resources/prices/prices.test.ts index 903d3b66..def9f882 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: 'string', model_type: 'unit', name: 'Annual fee', - unit_config: { unit_amount: 'string', scaling_factor: 0 }, + unit_config: { unit_amount: 'string' }, billable_metric_id: 'string', billed_in_advance: true, external_price_id: 'string', diff --git a/tests/api-resources/subscriptions.test.ts b/tests/api-resources/subscriptions.test.ts index 72a94a77..dfc98a3d 100644 --- a/tests/api-resources/subscriptions.test.ts +++ b/tests/api-resources/subscriptions.test.ts @@ -65,7 +65,7 @@ describe('resource subscriptions', () => { applies_to_price_ids: ['h74gfhdjvn7ujokd', '7hfgtgjnbvc3ujkl'], }, fixed_price_quantity: 2, - unit_config: { unit_amount: 'string', scaling_factor: 0 }, + unit_config: { unit_amount: 'string' }, }, { id: 'string', @@ -81,7 +81,7 @@ describe('resource subscriptions', () => { applies_to_price_ids: ['h74gfhdjvn7ujokd', '7hfgtgjnbvc3ujkl'], }, fixed_price_quantity: 2, - unit_config: { unit_amount: 'string', scaling_factor: 0 }, + unit_config: { unit_amount: 'string' }, }, { id: 'string', @@ -97,7 +97,7 @@ describe('resource subscriptions', () => { applies_to_price_ids: ['h74gfhdjvn7ujokd', '7hfgtgjnbvc3ujkl'], }, fixed_price_quantity: 2, - unit_config: { unit_amount: 'string', scaling_factor: 0 }, + unit_config: { unit_amount: 'string' }, }, ], start_date: '2019-12-27T18:11:19.117Z', @@ -336,7 +336,7 @@ describe('resource subscriptions', () => { invoice_grouping_key: 'string', cadence: 'annual', model_type: 'unit', - unit_config: { unit_amount: 'string', scaling_factor: 0 }, + unit_config: { unit_amount: 'string' }, currency: 'string', }, start_date: '2019-12-27T18:11:19.117Z', @@ -367,7 +367,7 @@ describe('resource subscriptions', () => { invoice_grouping_key: 'string', cadence: 'annual', model_type: 'unit', - unit_config: { unit_amount: 'string', scaling_factor: 0 }, + unit_config: { unit_amount: 'string' }, currency: 'string', }, start_date: '2019-12-27T18:11:19.117Z', @@ -398,7 +398,7 @@ describe('resource subscriptions', () => { invoice_grouping_key: 'string', cadence: 'annual', model_type: 'unit', - unit_config: { unit_amount: 'string', scaling_factor: 0 }, + unit_config: { unit_amount: 'string' }, currency: 'string', }, start_date: '2019-12-27T18:11:19.117Z', @@ -499,7 +499,7 @@ describe('resource subscriptions', () => { applies_to_price_ids: ['h74gfhdjvn7ujokd', '7hfgtgjnbvc3ujkl'], }, fixed_price_quantity: 2, - unit_config: { unit_amount: 'string', scaling_factor: 0 }, + unit_config: { unit_amount: 'string' }, }, { id: 'string', @@ -515,7 +515,7 @@ describe('resource subscriptions', () => { applies_to_price_ids: ['h74gfhdjvn7ujokd', '7hfgtgjnbvc3ujkl'], }, fixed_price_quantity: 2, - unit_config: { unit_amount: 'string', scaling_factor: 0 }, + unit_config: { unit_amount: 'string' }, }, { id: 'string', @@ -531,7 +531,7 @@ describe('resource subscriptions', () => { applies_to_price_ids: ['h74gfhdjvn7ujokd', '7hfgtgjnbvc3ujkl'], }, fixed_price_quantity: 2, - unit_config: { unit_amount: 'string', scaling_factor: 0 }, + unit_config: { unit_amount: 'string' }, }, ], });