diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 999cfc01..e99be4da 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "4.49.0" + ".": "4.50.0" } diff --git a/.stats.yml b/.stats.yml index eeba5cf5..f878d0a8 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 101 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-11f40c15fa889d9752019e8a35b82d2e7a3d42f2b42c850b469f120a5b2c47ba.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-e480186cdd0e2cc631befa7e2c6ba5f2d7ae52052f0e79a748214f3ade8a98ee.yml diff --git a/CHANGELOG.md b/CHANGELOG.md index 5873a476..bfcc3e15 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 4.50.0 (2025-01-18) + +Full Changelog: [v4.49.0...v4.50.0](https://github.com/orbcorp/orb-node/compare/v4.49.0...v4.50.0) + +### Features + +* **api:** api update ([#471](https://github.com/orbcorp/orb-node/issues/471)) ([cf59d6c](https://github.com/orbcorp/orb-node/commit/cf59d6cee157745b4c0b5808f23ed2c7a8f056ee)) + ## 4.49.0 (2025-01-16) Full Changelog: [v4.48.0...v4.49.0](https://github.com/orbcorp/orb-node/compare/v4.48.0...v4.49.0) diff --git a/package.json b/package.json index e872b349..1cf78c99 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "orb-billing", - "version": "4.49.0", + "version": "4.50.0", "description": "The official TypeScript library for the Orb API", "author": "Orb ", "types": "dist/index.d.ts", diff --git a/src/resources/alerts.ts b/src/resources/alerts.ts index eda44eed..e92cc43a 100644 --- a/src/resources/alerts.ts +++ b/src/resources/alerts.ts @@ -35,7 +35,7 @@ export class Alerts extends APIResource { * * The list of alerts is ordered starting from the most recently created alert. * This endpoint follows Orb's - * [standardized pagination format](../reference/pagination). + * [standardized pagination format](/api-reference/pagination). */ list(query?: AlertListParams, options?: Core.RequestOptions): Core.PagePromise; list(options?: Core.RequestOptions): Core.PagePromise; @@ -54,8 +54,7 @@ export class Alerts extends APIResource { * are three types of alerts that can be scoped to customers: * `credit_balance_depleted`, `credit_balance_dropped`, and * `credit_balance_recovered`. Customers can have a maximum of one of each type of - * alert per - * [credit balance currency](https://docs.withorb.com/guides/product-catalog/prepurchase). + * alert per [credit balance currency](/product-catalog/prepurchase). * `credit_balance_dropped` alerts require a list of thresholds to be provided * while `credit_balance_depleted` and `credit_balance_recovered` alerts do not * require thresholds. @@ -73,8 +72,7 @@ export class Alerts extends APIResource { * are three types of alerts that can be scoped to customers: * `credit_balance_depleted`, `credit_balance_dropped`, and * `credit_balance_recovered`. Customers can have a maximum of one of each type of - * alert per - * [credit balance currency](https://docs.withorb.com/guides/product-catalog/prepurchase). + * alert per [credit balance currency](/product-catalog/prepurchase). * `credit_balance_dropped` alerts require a list of thresholds to be provided * while `credit_balance_depleted` and `credit_balance_recovered` alerts do not * require thresholds. @@ -164,9 +162,8 @@ export class Alerts extends APIResource { export class AlertsPage extends Page {} /** - * [Alerts within Orb](https://docs.withorb.com/guides/product-catalog/configuring-alerts) - * monitor spending, usage, or credit balance and trigger webhooks when a threshold - * is exceeded. + * [Alerts within Orb](/product-catalog/configuring-alerts) monitor spending, + * usage, or credit balance and trigger webhooks when a threshold is exceeded. * * Alerts created through the API can be scoped to either customers or * subscriptions. diff --git a/src/resources/coupons/coupons.ts b/src/resources/coupons/coupons.ts index efa17aa6..98d9bf38 100644 --- a/src/resources/coupons/coupons.ts +++ b/src/resources/coupons/coupons.ts @@ -66,40 +66,6 @@ export class CouponsPage extends Page {} * activated using a redemption code, which applies the discount to a subscription * or invoice. The duration of a coupon determines how long it remains available * for use by end users. - * - * ## How to use coupons - * - * Coupons can be created using the Orb dashboard or programmatically through the - * API. Once a coupon is created, it can be managed and applied programmatically - * via the API. To redeem a coupon, use the `redemption_code` property when - * [creating a subscription](create-subscription.api.mdx) or when scheduling a - * [plan change](schedule-plan-change.api.mdx). - * - * ## When to use coupons - * - * A common use case for coupons is through self-serve signup or upgrade flows in - * your checkout experience or billing portal. Coupons can also be used as one-off - * to incentivize use for custom agreements. - * - * Coupons are effective when launching new features and encouraging existing users - * to upgrade to a higher tier. For example, you could create a coupon code - * "UPGRADE20" that offers a 20% discount on the first month of the new plan. This - * code can be applied during the upgrade process in your billing portal, making it - * straightforward for users to benefit from the new features at a reduced cost. - * - * ## Coupon scoping - * - * When a coupon is applied on a subscription, it creates a discount adjustment - * that applies to all of the prices on the subscription at the time of the coupon - * application. Notably, coupons do not scope in new price additions to a - * subscription automatically — if a new price is added to the subscription with a - * subscription edit or plan version migration, the discount created with the - * coupon will not apply to it automatically. If you'd like the coupon to apply to - * newly added prices, you can - * [edit the adjustment intervals](add-edit-price-intervals.api.mdx) to end the - * discount interval created by the coupon at the time of the migration and add a - * new one starting at the time of the migration that includes the newly added - * prices you'd like the coupon to apply to. */ export interface Coupon { /** diff --git a/src/resources/coupons/subscriptions.ts b/src/resources/coupons/subscriptions.ts index d0a95f66..cdb02554 100644 --- a/src/resources/coupons/subscriptions.ts +++ b/src/resources/coupons/subscriptions.ts @@ -10,9 +10,9 @@ import { type PageParams } from '../../pagination'; export class Subscriptions extends APIResource { /** * This endpoint returns a list of all subscriptions that have redeemed a given - * coupon as a [paginated](../reference/pagination) list, ordered starting from the - * most recently created subscription. For a full discussion of the subscription - * resource, see [Subscription](../guides/concepts#subscription). + * coupon as a [paginated](/api-reference/pagination) list, ordered starting from + * the most recently created subscription. For a full discussion of the + * subscription resource, see [Subscription](/core-concepts#subscription). */ list( couponId: string, diff --git a/src/resources/credit-notes.ts b/src/resources/credit-notes.ts index 9fa10f1a..5778dd32 100644 --- a/src/resources/credit-notes.ts +++ b/src/resources/credit-notes.ts @@ -8,7 +8,7 @@ import { Page, type PageParams } from '../pagination'; export class CreditNotes extends APIResource { /** * This endpoint is used to create a single - * [`Credit Note`](../guides/invoicing/credit-notes). + * [`Credit Note`](/invoicing/credit-notes). */ create(body: CreditNoteCreateParams, options?: Core.RequestOptions): Core.APIPromise { return this._client.post('/credit_notes', { body, ...options }); @@ -35,8 +35,8 @@ export class CreditNotes extends APIResource { } /** - * This endpoint is used to fetch a single - * [`Credit Note`](../guides/invoicing/credit-notes) given an identifier. + * This endpoint is used to fetch a single [`Credit Note`](/invoicing/credit-notes) + * given an identifier. */ fetch(creditNoteId: string, options?: Core.RequestOptions): Core.APIPromise { return this._client.get(`/credit_notes/${creditNoteId}`, options); @@ -46,8 +46,8 @@ export class CreditNotes extends APIResource { export class CreditNotesPage extends Page {} /** - * The [Credit Note](/guides/invoicing/credit-notes) resource represents a credit - * that has been applied to a particular invoice. + * The [Credit Note](/invoicing/credit-notes) resource represents a credit that has + * been applied to a particular invoice. */ export interface CreditNote { /** diff --git a/src/resources/customers/costs.ts b/src/resources/customers/costs.ts index 8d4b4462..6ab48c5f 100644 --- a/src/resources/customers/costs.ts +++ b/src/resources/customers/costs.ts @@ -9,8 +9,8 @@ export class Costs extends APIResource { /** * This endpoint is used to fetch a day-by-day snapshot of a customer's costs in * Orb, calculated by applying pricing information to the underlying usage (see the - * [subscription usage endpoint](fetch-subscription-usage.api.mdx) to fetch usage - * per metric, in usage units rather than a currency). + * [subscription usage endpoint](/api-reference/subscription/fetch-subscription-usage) + * to fetch usage per metric, in usage units rather than a currency). * * This endpoint can be leveraged for internal tooling and to provide a more * transparent billing experience for your end users: @@ -19,8 +19,8 @@ export class Costs extends APIResource { * the current billing period. * 2. Provide customer visibility into how different services are contributing to * the overall invoice with a per-day timeseries (as compared to the - * [upcoming invoice](fetch-upcoming-invoice) resource, which represents a - * snapshot for the current period). + * [upcoming invoice](/api-reference/invoice/fetch-upcoming-invoice) resource, + * which represents a snapshot for the current period). * 3. Assess how minimums and discounts affect your customers by teasing apart * costs directly as a result of usage, as opposed to minimums and discounts at * the plan and price level. @@ -145,8 +145,8 @@ export class Costs extends APIResource { /** * This endpoint is used to fetch a day-by-day snapshot of a customer's costs in * Orb, calculated by applying pricing information to the underlying usage (see the - * [subscription usage endpoint](fetch-subscription-usage.api.mdx) to fetch usage - * per metric, in usage units rather than a currency). + * [subscription usage endpoint](/api-reference/subscription/fetch-subscription-usage) + * to fetch usage per metric, in usage units rather than a currency). * * This endpoint can be leveraged for internal tooling and to provide a more * transparent billing experience for your end users: @@ -155,8 +155,8 @@ export class Costs extends APIResource { * the current billing period. * 2. Provide customer visibility into how different services are contributing to * the overall invoice with a per-day timeseries (as compared to the - * [upcoming invoice](fetch-upcoming-invoice) resource, which represents a - * snapshot for the current period). + * [upcoming invoice](/api-reference/invoice/fetch-upcoming-invoice) resource, + * which represents a snapshot for the current period). * 3. Assess how minimums and discounts affect your customers by teasing apart * costs directly as a result of usage, as opposed to minimums and discounts at * the plan and price level. @@ -319,229 +319,8 @@ export namespace CostListResponse { * is serialized differently in a given Price object. The model_type field * determines the key for the configuration object that is present. * - * ## Unit pricing - * - * With unit pricing, each unit costs a fixed amount. - * - * ```json - * { - * ... - * "model_type": "unit", - * "unit_config": { - * "unit_amount": "0.50" - * } - * ... - * } - * ``` - * - * ## Tiered pricing - * - * In tiered pricing, the cost of a given unit depends on the tier range that it - * falls into, where each tier range is defined by an upper and lower bound. For - * example, the first ten units may cost $0.50 each and all units thereafter may - * cost $0.10 each. - * - * ```json - * { - * ... - * "model_type": "tiered", - * "tiered_config": { - * "tiers": [ - * { - * "first_unit": 1, - * "last_unit": 10, - * "unit_amount": "0.50" - * }, - * { - * "first_unit": 11, - * "last_unit": null, - * "unit_amount": "0.10" - * } - * ] - * } - * ... - * ``` - * - * ## Bulk pricing - * - * Bulk pricing applies when the number of units determine the cost of all units. - * For example, if you've bought less than 10 units, they may each be $0.50 for a - * total of $5.00. Once you've bought more than 10 units, all units may now be - * priced at $0.40 (i.e. 101 units total would be $40.40). - * - * ```json - * { - * ... - * "model_type": "bulk", - * "bulk_config": { - * "tiers": [ - * { - * "maximum_units": 10, - * "unit_amount": "0.50" - * }, - * { - * "maximum_units": 1000, - * "unit_amount": "0.40" - * } - * ] - * } - * ... - * } - * ``` - * - * ## Package pricing - * - * Package pricing defines the size or granularity of a unit for billing purposes. - * For example, if the package size is set to 5, then 4 units will be billed as 5 - * and 6 units will be billed at 10. - * - * ```json - * { - * ... - * "model_type": "package", - * "package_config": { - * "package_amount": "0.80", - * "package_size": 10 - * } - * ... - * } - * ``` - * - * ## BPS pricing - * - * BPS pricing specifies a per-event (e.g. per-payment) rate in one hundredth of a - * percent (the number of basis points to charge), as well as a cap per event to - * assess. For example, this would allow you to assess a fee of 0.25% on every - * payment you process, with a maximum charge of $25 per payment. - * - * ```json - * { - * ... - * "model_type": "bps", - * "bps_config": { - * "bps": 125, - * "per_unit_maximum": "11.00" - * } - * ... - * } - * ``` - * - * ## Bulk BPS pricing - * - * Bulk BPS pricing specifies BPS parameters in a tiered manner, dependent on the - * total quantity across all events. Similar to bulk pricing, the BPS parameters of - * a given event depends on the tier range that the billing period falls into. Each - * tier range is defined by an upper bound. For example, after $1.5M of payment - * volume is reached, each individual payment may have a lower cap or a smaller - * take-rate. - * - * ```json - * ... - * "model_type": "bulk_bps", - * "bulk_bps_config": { - * "tiers": [ - * { - * "maximum_amount": "1000000.00", - * "bps": 125, - * "per_unit_maximum": "19.00" - * }, - * { - * "maximum_amount": null, - * "bps": 115, - * "per_unit_maximum": "4.00" - * } - * ] - * } - * ... - * } - * ``` - * - * ## Tiered BPS pricing - * - * Tiered BPS pricing specifies BPS parameters in a graduated manner, where an - * event's applicable parameter is a function of its marginal addition to the - * period total. Similar to tiered pricing, the BPS parameters of a given event - * depends on the tier range that it falls into, where each tier range is defined - * by an upper and lower bound. For example, the first few payments may have a 0.8 - * BPS take-rate and all payments after a specific volume may incur a take-rate of - * 0.5 BPS each. - * - * ```json - * ... - * "model_type": "tiered_bps", - * "tiered_bps_config": { - * "tiers": [ - * { - * "minimum_amount": "0", - * "maximum_amount": "1000000.00", - * "bps": 125, - * "per_unit_maximum": "19.00" - * }, - * { - * "minimum_amount": "1000000.00", - * "maximum_amount": null, - * "bps": 115, - * "per_unit_maximum": "4.00" - * } - * ] - * } - * ... - * } - * ``` - * - * ## Matrix pricing - * - * Matrix pricing defines a set of unit prices in a one or two-dimensional matrix. - * `dimensions` defines the two event property values evaluated in this pricing - * model. In a one-dimensional matrix, the second value is `null`. Every - * configuration has a list of `matrix_values` which give the unit prices for - * specified property values. In a one-dimensional matrix, the matrix values will - * have `dimension_values` where the second value of the pair is null. If an event - * does not match any of the dimension values in the matrix, it will resort to the - * `default_unit_amount`. - * - * ```json - * { - * "model_type": "matrix" - * "matrix_config": { - * "default_unit_amount": "3.00", - * "dimensions": [ - * "cluster_name", - * "region" - * ], - * "matrix_values": [ - * { - * "dimension_values": [ - * "alpha", - * "west" - * ], - * "unit_amount": "2.00" - * }, - * ... - * ] - * } - * } - * ``` - * - * ## Fixed fees - * - * Fixed fees are prices that are applied independent of usage quantities, and - * follow unit pricing. They also have an additional parameter - * `fixed_price_quantity`. If the Price represents a fixed cost, this represents - * the quantity of units applied. - * - * ```json - * { - * ... - * "id": "price_id", - * "model_type": "unit", - * "unit_config": { - * "unit_amount": "2.00" - * }, - * "fixed_price_quantity": 3.0 - * ... - * } - * ``` + * For more on the types of prices, see + * [the core concepts documentation](/core-concepts#plan-and-price) */ price: PricesAPI.Price; @@ -597,229 +376,8 @@ export namespace CostListByExternalIDResponse { * is serialized differently in a given Price object. The model_type field * determines the key for the configuration object that is present. * - * ## Unit pricing - * - * With unit pricing, each unit costs a fixed amount. - * - * ```json - * { - * ... - * "model_type": "unit", - * "unit_config": { - * "unit_amount": "0.50" - * } - * ... - * } - * ``` - * - * ## Tiered pricing - * - * In tiered pricing, the cost of a given unit depends on the tier range that it - * falls into, where each tier range is defined by an upper and lower bound. For - * example, the first ten units may cost $0.50 each and all units thereafter may - * cost $0.10 each. - * - * ```json - * { - * ... - * "model_type": "tiered", - * "tiered_config": { - * "tiers": [ - * { - * "first_unit": 1, - * "last_unit": 10, - * "unit_amount": "0.50" - * }, - * { - * "first_unit": 11, - * "last_unit": null, - * "unit_amount": "0.10" - * } - * ] - * } - * ... - * ``` - * - * ## Bulk pricing - * - * Bulk pricing applies when the number of units determine the cost of all units. - * For example, if you've bought less than 10 units, they may each be $0.50 for a - * total of $5.00. Once you've bought more than 10 units, all units may now be - * priced at $0.40 (i.e. 101 units total would be $40.40). - * - * ```json - * { - * ... - * "model_type": "bulk", - * "bulk_config": { - * "tiers": [ - * { - * "maximum_units": 10, - * "unit_amount": "0.50" - * }, - * { - * "maximum_units": 1000, - * "unit_amount": "0.40" - * } - * ] - * } - * ... - * } - * ``` - * - * ## Package pricing - * - * Package pricing defines the size or granularity of a unit for billing purposes. - * For example, if the package size is set to 5, then 4 units will be billed as 5 - * and 6 units will be billed at 10. - * - * ```json - * { - * ... - * "model_type": "package", - * "package_config": { - * "package_amount": "0.80", - * "package_size": 10 - * } - * ... - * } - * ``` - * - * ## BPS pricing - * - * BPS pricing specifies a per-event (e.g. per-payment) rate in one hundredth of a - * percent (the number of basis points to charge), as well as a cap per event to - * assess. For example, this would allow you to assess a fee of 0.25% on every - * payment you process, with a maximum charge of $25 per payment. - * - * ```json - * { - * ... - * "model_type": "bps", - * "bps_config": { - * "bps": 125, - * "per_unit_maximum": "11.00" - * } - * ... - * } - * ``` - * - * ## Bulk BPS pricing - * - * Bulk BPS pricing specifies BPS parameters in a tiered manner, dependent on the - * total quantity across all events. Similar to bulk pricing, the BPS parameters of - * a given event depends on the tier range that the billing period falls into. Each - * tier range is defined by an upper bound. For example, after $1.5M of payment - * volume is reached, each individual payment may have a lower cap or a smaller - * take-rate. - * - * ```json - * ... - * "model_type": "bulk_bps", - * "bulk_bps_config": { - * "tiers": [ - * { - * "maximum_amount": "1000000.00", - * "bps": 125, - * "per_unit_maximum": "19.00" - * }, - * { - * "maximum_amount": null, - * "bps": 115, - * "per_unit_maximum": "4.00" - * } - * ] - * } - * ... - * } - * ``` - * - * ## Tiered BPS pricing - * - * Tiered BPS pricing specifies BPS parameters in a graduated manner, where an - * event's applicable parameter is a function of its marginal addition to the - * period total. Similar to tiered pricing, the BPS parameters of a given event - * depends on the tier range that it falls into, where each tier range is defined - * by an upper and lower bound. For example, the first few payments may have a 0.8 - * BPS take-rate and all payments after a specific volume may incur a take-rate of - * 0.5 BPS each. - * - * ```json - * ... - * "model_type": "tiered_bps", - * "tiered_bps_config": { - * "tiers": [ - * { - * "minimum_amount": "0", - * "maximum_amount": "1000000.00", - * "bps": 125, - * "per_unit_maximum": "19.00" - * }, - * { - * "minimum_amount": "1000000.00", - * "maximum_amount": null, - * "bps": 115, - * "per_unit_maximum": "4.00" - * } - * ] - * } - * ... - * } - * ``` - * - * ## Matrix pricing - * - * Matrix pricing defines a set of unit prices in a one or two-dimensional matrix. - * `dimensions` defines the two event property values evaluated in this pricing - * model. In a one-dimensional matrix, the second value is `null`. Every - * configuration has a list of `matrix_values` which give the unit prices for - * specified property values. In a one-dimensional matrix, the matrix values will - * have `dimension_values` where the second value of the pair is null. If an event - * does not match any of the dimension values in the matrix, it will resort to the - * `default_unit_amount`. - * - * ```json - * { - * "model_type": "matrix" - * "matrix_config": { - * "default_unit_amount": "3.00", - * "dimensions": [ - * "cluster_name", - * "region" - * ], - * "matrix_values": [ - * { - * "dimension_values": [ - * "alpha", - * "west" - * ], - * "unit_amount": "2.00" - * }, - * ... - * ] - * } - * } - * ``` - * - * ## Fixed fees - * - * Fixed fees are prices that are applied independent of usage quantities, and - * follow unit pricing. They also have an additional parameter - * `fixed_price_quantity`. If the Price represents a fixed cost, this represents - * the quantity of units applied. - * - * ```json - * { - * ... - * "id": "price_id", - * "model_type": "unit", - * "unit_config": { - * "unit_amount": "2.00" - * }, - * "fixed_price_quantity": 3.0 - * ... - * } - * ``` + * For more on the types of prices, see + * [the core concepts documentation](/core-concepts#plan-and-price) */ price: PricesAPI.Price; diff --git a/src/resources/customers/credits/ledger.ts b/src/resources/customers/credits/ledger.ts index 7353a7a4..f6fba10f 100644 --- a/src/resources/customers/credits/ledger.ts +++ b/src/resources/customers/credits/ledger.ts @@ -9,11 +9,11 @@ export class Ledger extends APIResource { /** * The credits ledger provides _auditing_ functionality over Orb's credits system * with a list of actions that have taken place to modify a customer's credit - * balance. This [paginated endpoint](../reference/pagination) lists these entries, - * starting from the most recent ledger entry. + * balance. This [paginated endpoint](/api-reference/pagination) lists these + * entries, starting from the most recent ledger entry. * * More details on using Orb's real-time credit feature are - * [here](../guides/product-catalog/prepurchase.md). + * [here](/product-catalog/prepurchase). * * There are four major types of modifications to credit balance, detailed below. * @@ -358,11 +358,11 @@ export class Ledger extends APIResource { /** * The credits ledger provides _auditing_ functionality over Orb's credits system * with a list of actions that have taken place to modify a customer's credit - * balance. This [paginated endpoint](../reference/pagination) lists these entries, - * starting from the most recent ledger entry. + * balance. This [paginated endpoint](/api-reference/pagination) lists these + * entries, starting from the most recent ledger entry. * * More details on using Orb's real-time credit feature are - * [here](../guides/product-catalog/prepurchase.md). + * [here](/product-catalog/prepurchase). * * There are four major types of modifications to credit balance, detailed below. * @@ -468,8 +468,8 @@ export class LedgerListResponsesPage extends Page {} export class LedgerListByExternalIDResponsesPage extends Page {} /** - * The [Credit Ledger Entry resource](/guides/product-catalog/prepurchase) models - * prepaid credits within Orb. + * The [Credit Ledger Entry resource](/product-catalog/prepurchase) models prepaid + * credits within Orb. */ export type LedgerListResponse = | LedgerListResponse.IncrementLedgerEntry @@ -851,8 +851,8 @@ export namespace LedgerListResponse { } /** - * The [Credit Ledger Entry resource](/guides/product-catalog/prepurchase) models - * prepaid credits within Orb. + * The [Credit Ledger Entry resource](/product-catalog/prepurchase) models prepaid + * credits within Orb. */ export type LedgerCreateEntryResponse = | LedgerCreateEntryResponse.IncrementLedgerEntry @@ -1234,8 +1234,8 @@ export namespace LedgerCreateEntryResponse { } /** - * The [Credit Ledger Entry resource](/guides/product-catalog/prepurchase) models - * prepaid credits within Orb. + * The [Credit Ledger Entry resource](/product-catalog/prepurchase) models prepaid + * credits within Orb. */ export type LedgerCreateEntryByExternalIDResponse = | LedgerCreateEntryByExternalIDResponse.IncrementLedgerEntry @@ -1617,8 +1617,8 @@ export namespace LedgerCreateEntryByExternalIDResponse { } /** - * The [Credit Ledger Entry resource](/guides/product-catalog/prepurchase) models - * prepaid credits within Orb. + * The [Credit Ledger Entry resource](/product-catalog/prepurchase) models prepaid + * credits within Orb. */ export type LedgerListByExternalIDResponse = | LedgerListByExternalIDResponse.IncrementLedgerEntry diff --git a/src/resources/customers/customers.ts b/src/resources/customers/customers.ts index 91ba871c..c9990570 100644 --- a/src/resources/customers/customers.ts +++ b/src/resources/customers/customers.ts @@ -40,17 +40,17 @@ export class Customers extends APIResource { /** * This operation is used to create an Orb customer, who is party to the core - * billing relationship. See [Customer](../guides/concepts#customer) for an - * overview of the customer resource. + * billing relationship. See [Customer](/core-concepts##customer) for an overview + * of the customer resource. * * This endpoint is critical in the following Orb functionality: * * - Automated charges can be configured by setting `payment_provider` and * `payment_provider_id` to automatically issue invoices - * - [Customer ID Aliases](../guides/events-and-metrics/customer-aliases) can be - * configured by setting `external_customer_id` - * - [Timezone localization](../guides/product-catalog/timezones.md) can be - * configured on a per-customer basis by setting the `timezone` parameter + * - [Customer ID Aliases](/events-and-metrics/customer-aliases) can be configured + * by setting `external_customer_id` + * - [Timezone localization](/essentials/timezones) can be configured on a + * per-customer basis by setting the `timezone` parameter */ create(body: CustomerCreateParams, options?: Core.RequestOptions): Core.APIPromise { return this._client.post('/customers', { body, ...options }); @@ -75,10 +75,9 @@ export class Customers extends APIResource { * This endpoint returns a list of all customers for an account. The list of * customers is ordered starting from the most recently created customer. This * endpoint follows Orb's - * [standardized pagination format](../reference/pagination). + * [standardized pagination format](/api-reference/pagination). * - * See [Customer](../guides/concepts#customer) for an overview of the customer - * model. + * See [Customer](/core-concepts##customer) for an overview of the customer model. */ list(query?: CustomerListParams, options?: Core.RequestOptions): Core.PagePromise; list(options?: Core.RequestOptions): Core.PagePromise; @@ -119,8 +118,8 @@ export class Customers extends APIResource { * `Customer` is in the process of being deleted, only the properties `id` and * `deleted: true` will be returned. * - * See the [Customer resource](../guides/core-concepts.mdx#customer) for a full - * discussion of the Customer model. + * See the [Customer resource](/core-concepts#customer) for a full discussion of + * the Customer model. */ fetch(customerId: string, options?: Core.RequestOptions): Core.APIPromise { return this._client.get(`/customers/${customerId}`, options); @@ -128,7 +127,7 @@ export class Customers extends APIResource { /** * This endpoint is used to fetch customer details given an `external_customer_id` - * (see [Customer ID Aliases](../guides/events-and-metrics/customer-aliases)). + * (see [Customer ID Aliases](/events-and-metrics/customer-aliases)). * * Note that the resource and semantics of this endpoint exactly mirror * [Get Customer](fetch-customer). @@ -139,8 +138,8 @@ export class Customers extends APIResource { /** * This endpoint is used to update customer details given an `external_customer_id` - * (see [Customer ID Aliases](../guides/events-and-metrics/customer-aliases)). Note - * that the resource and semantics of this endpoint exactly mirror + * (see [Customer ID Aliases](/events-and-metrics/customer-aliases)). Note that the + * resource and semantics of this endpoint exactly mirror * [Update Customer](update-customer). */ updateByExternalId( @@ -162,7 +161,7 @@ export class CustomersPage extends Page {} * it's often desirable to have these match existing identifiers in your system. To * avoid having to denormalize Orb ID information, you can pass in an * `external_customer_id` with your own identifier. See - * [Customer ID Aliases](../guides/events-and-metrics/customer-aliases) for further + * [Customer ID Aliases](/events-and-metrics/customer-aliases) for further * information about how these aliases work in Orb. * * In addition to having an identifier in your system, a customer may exist in a @@ -171,9 +170,8 @@ export class CustomersPage extends Page {} * * A customer also has a timezone (from the standard * [IANA timezone database](https://www.iana.org/time-zones)), which defaults to - * your account's timezone. See - * [Timezone localization](../guides/product-catalog/timezones.md) for information - * on what this timezone parameter influences within Orb. + * your account's timezone. See [Timezone localization](/essentials/timezones) for + * information on what this timezone parameter influences within Orb. */ export interface Customer { id: string; diff --git a/src/resources/events/backfills.ts b/src/resources/events/backfills.ts index 34ced3ac..e81dd1cf 100644 --- a/src/resources/events/backfills.ts +++ b/src/resources/events/backfills.ts @@ -38,12 +38,12 @@ export class Backfills extends APIResource { * affect all customers. * * When `replace_existing_events` is `true`, this indicates that existing events in - * the timeframe should no longer be counted towards invoiced usage. In this + * the timeframe should no longer be counter towards invoiced usage. In this * scenario, the parameter `filter` can be optionally added which enables filtering * using - * [computed properties](../guides/extensibility/advanced-metrics#computed-properties). - * The expressiveness of computed properties allows you to deprecate existing - * events based on both a period of time and specific property values. + * [computed properties](/extensibility/advanced-metrics#computed-properties). The + * expressiveness of computed properties allows you to deprecate existing events + * based on both a period of time and specific property values. */ create(body: BackfillCreateParams, options?: Core.RequestOptions): Core.APIPromise { return this._client.post('/events/backfills', { body, ...options }); @@ -54,9 +54,9 @@ export class Backfills extends APIResource { * * The list of backfills is ordered starting from the most recently created * backfill. The response also includes - * [`pagination_metadata`](../reference/pagination), which lets the caller retrieve - * the next page of results if they exist. More information about pagination can be - * found in the [Pagination-metadata schema](pagination). + * [`pagination_metadata`](/api-reference/pagination), which lets the caller + * retrieve the next page of results if they exist. More information about + * pagination can be found in the [Pagination-metadata schema](pagination). */ list( query?: BackfillListParams, @@ -148,8 +148,8 @@ export interface BackfillCreateResponse { /** * A boolean - * [computed property](../guides/extensibility/advanced-metrics#computed-properties) - * used to filter the set of events to deprecate + * [computed property](/extensibility/advanced-metrics#computed-properties) used to + * filter the set of events to deprecate */ deprecation_filter?: string | null; } @@ -196,8 +196,8 @@ export interface BackfillListResponse { /** * A boolean - * [computed property](../guides/extensibility/advanced-metrics#computed-properties) - * used to filter the set of events to deprecate + * [computed property](/extensibility/advanced-metrics#computed-properties) used to + * filter the set of events to deprecate */ deprecation_filter?: string | null; } @@ -244,8 +244,8 @@ export interface BackfillCloseResponse { /** * A boolean - * [computed property](../guides/extensibility/advanced-metrics#computed-properties) - * used to filter the set of events to deprecate + * [computed property](/extensibility/advanced-metrics#computed-properties) used to + * filter the set of events to deprecate */ deprecation_filter?: string | null; } @@ -292,8 +292,8 @@ export interface BackfillFetchResponse { /** * A boolean - * [computed property](../guides/extensibility/advanced-metrics#computed-properties) - * used to filter the set of events to deprecate + * [computed property](/extensibility/advanced-metrics#computed-properties) used to + * filter the set of events to deprecate */ deprecation_filter?: string | null; } @@ -340,8 +340,8 @@ export interface BackfillRevertResponse { /** * A boolean - * [computed property](../guides/extensibility/advanced-metrics#computed-properties) - * used to filter the set of events to deprecate + * [computed property](/extensibility/advanced-metrics#computed-properties) used to + * filter the set of events to deprecate */ deprecation_filter?: string | null; } @@ -372,8 +372,8 @@ export interface BackfillCreateParams { /** * A boolean - * [computed property](../guides/extensibility/advanced-metrics#computed-properties) - * used to filter the set of events to deprecate + * [computed property](/extensibility/advanced-metrics#computed-properties) used to + * filter the set of events to deprecate */ deprecation_filter?: string | null; diff --git a/src/resources/events/events.ts b/src/resources/events/events.ts index fbb49731..e31552a8 100644 --- a/src/resources/events/events.ts +++ b/src/resources/events/events.ts @@ -299,8 +299,8 @@ export class Events extends APIResource { * * If `debug=true` is not specified, the response will only contain * `validation_failed`. Orb will still honor the idempotency guarantees set - * [here](../guides/events-and-metrics/event-ingestion#event-volume-and-concurrency) - * in all cases. + * [here](/events-and-metrics/event-ingestion#event-volume-and-concurrency) in all + * cases. * * We strongly recommend that you only use debug mode as part of testing your * initial Orb integration. Once you're ready to switch to production, disable @@ -333,7 +333,7 @@ export class Events extends APIResource { /** * This endpoint returns a filtered set of events for an account in a - * [paginated list format](../reference/pagination). + * [paginated list format](/api-reference/pagination). * * Note that this is a `POST` endpoint rather than a `GET` endpoint because it * employs a JSON body for search criteria rather than query parameters, allowing @@ -412,10 +412,9 @@ export interface EventSearchResponse { export namespace EventSearchResponse { /** - * The [Event](../guides/core-concepts.mdx#event) resource represents a usage event - * that has been created for a customer. Events are the core of Orb's usage-based - * billing model, and are used to calculate the usage charges for a given billing - * period. + * The [Event](/core-concepts#event) resource represents a usage event that has + * been created for a customer. Events are the core of Orb's usage-based billing + * model, and are used to calculate the usage charges for a given billing period. */ export interface Data { /** diff --git a/src/resources/events/volume.ts b/src/resources/events/volume.ts index f7644e20..6440ca6e 100644 --- a/src/resources/events/volume.ts +++ b/src/resources/events/volume.ts @@ -6,13 +6,13 @@ import * as Core from '../../core'; export class Volume extends APIResource { /** * This endpoint returns the event volume for an account in a - * [paginated list format](../reference/pagination). + * [paginated list format](/api-reference/pagination). * * The event volume is aggregated by the hour and the - * [timestamp](../reference/ingest#determining-event-timestamp) field is used to - * determine which hour an event is associated with. Note, this means that - * late-arriving events increment the volume count for the hour window the - * timestamp is in, not the latest hour window. + * [timestamp](/api-reference/event/ingest-events) field is used to determine which + * hour an event is associated with. Note, this means that late-arriving events + * increment the volume count for the hour window the timestamp is in, not the + * latest hour window. * * Each item in the response contains the count of events aggregated by the hour * where the start and end time are hour-aligned and in UTC. When a specific diff --git a/src/resources/invoice-line-items.ts b/src/resources/invoice-line-items.ts index f5be7120..9823c92f 100644 --- a/src/resources/invoice-line-items.ts +++ b/src/resources/invoice-line-items.ts @@ -65,229 +65,8 @@ export interface InvoiceLineItemCreateResponse { * is serialized differently in a given Price object. The model_type field * determines the key for the configuration object that is present. * - * ## Unit pricing - * - * With unit pricing, each unit costs a fixed amount. - * - * ```json - * { - * ... - * "model_type": "unit", - * "unit_config": { - * "unit_amount": "0.50" - * } - * ... - * } - * ``` - * - * ## Tiered pricing - * - * In tiered pricing, the cost of a given unit depends on the tier range that it - * falls into, where each tier range is defined by an upper and lower bound. For - * example, the first ten units may cost $0.50 each and all units thereafter may - * cost $0.10 each. - * - * ```json - * { - * ... - * "model_type": "tiered", - * "tiered_config": { - * "tiers": [ - * { - * "first_unit": 1, - * "last_unit": 10, - * "unit_amount": "0.50" - * }, - * { - * "first_unit": 11, - * "last_unit": null, - * "unit_amount": "0.10" - * } - * ] - * } - * ... - * ``` - * - * ## Bulk pricing - * - * Bulk pricing applies when the number of units determine the cost of all units. - * For example, if you've bought less than 10 units, they may each be $0.50 for a - * total of $5.00. Once you've bought more than 10 units, all units may now be - * priced at $0.40 (i.e. 101 units total would be $40.40). - * - * ```json - * { - * ... - * "model_type": "bulk", - * "bulk_config": { - * "tiers": [ - * { - * "maximum_units": 10, - * "unit_amount": "0.50" - * }, - * { - * "maximum_units": 1000, - * "unit_amount": "0.40" - * } - * ] - * } - * ... - * } - * ``` - * - * ## Package pricing - * - * Package pricing defines the size or granularity of a unit for billing purposes. - * For example, if the package size is set to 5, then 4 units will be billed as 5 - * and 6 units will be billed at 10. - * - * ```json - * { - * ... - * "model_type": "package", - * "package_config": { - * "package_amount": "0.80", - * "package_size": 10 - * } - * ... - * } - * ``` - * - * ## BPS pricing - * - * BPS pricing specifies a per-event (e.g. per-payment) rate in one hundredth of a - * percent (the number of basis points to charge), as well as a cap per event to - * assess. For example, this would allow you to assess a fee of 0.25% on every - * payment you process, with a maximum charge of $25 per payment. - * - * ```json - * { - * ... - * "model_type": "bps", - * "bps_config": { - * "bps": 125, - * "per_unit_maximum": "11.00" - * } - * ... - * } - * ``` - * - * ## Bulk BPS pricing - * - * Bulk BPS pricing specifies BPS parameters in a tiered manner, dependent on the - * total quantity across all events. Similar to bulk pricing, the BPS parameters of - * a given event depends on the tier range that the billing period falls into. Each - * tier range is defined by an upper bound. For example, after $1.5M of payment - * volume is reached, each individual payment may have a lower cap or a smaller - * take-rate. - * - * ```json - * ... - * "model_type": "bulk_bps", - * "bulk_bps_config": { - * "tiers": [ - * { - * "maximum_amount": "1000000.00", - * "bps": 125, - * "per_unit_maximum": "19.00" - * }, - * { - * "maximum_amount": null, - * "bps": 115, - * "per_unit_maximum": "4.00" - * } - * ] - * } - * ... - * } - * ``` - * - * ## Tiered BPS pricing - * - * Tiered BPS pricing specifies BPS parameters in a graduated manner, where an - * event's applicable parameter is a function of its marginal addition to the - * period total. Similar to tiered pricing, the BPS parameters of a given event - * depends on the tier range that it falls into, where each tier range is defined - * by an upper and lower bound. For example, the first few payments may have a 0.8 - * BPS take-rate and all payments after a specific volume may incur a take-rate of - * 0.5 BPS each. - * - * ```json - * ... - * "model_type": "tiered_bps", - * "tiered_bps_config": { - * "tiers": [ - * { - * "minimum_amount": "0", - * "maximum_amount": "1000000.00", - * "bps": 125, - * "per_unit_maximum": "19.00" - * }, - * { - * "minimum_amount": "1000000.00", - * "maximum_amount": null, - * "bps": 115, - * "per_unit_maximum": "4.00" - * } - * ] - * } - * ... - * } - * ``` - * - * ## Matrix pricing - * - * Matrix pricing defines a set of unit prices in a one or two-dimensional matrix. - * `dimensions` defines the two event property values evaluated in this pricing - * model. In a one-dimensional matrix, the second value is `null`. Every - * configuration has a list of `matrix_values` which give the unit prices for - * specified property values. In a one-dimensional matrix, the matrix values will - * have `dimension_values` where the second value of the pair is null. If an event - * does not match any of the dimension values in the matrix, it will resort to the - * `default_unit_amount`. - * - * ```json - * { - * "model_type": "matrix" - * "matrix_config": { - * "default_unit_amount": "3.00", - * "dimensions": [ - * "cluster_name", - * "region" - * ], - * "matrix_values": [ - * { - * "dimension_values": [ - * "alpha", - * "west" - * ], - * "unit_amount": "2.00" - * }, - * ... - * ] - * } - * } - * ``` - * - * ## Fixed fees - * - * Fixed fees are prices that are applied independent of usage quantities, and - * follow unit pricing. They also have an additional parameter - * `fixed_price_quantity`. If the Price represents a fixed cost, this represents - * the quantity of units applied. - * - * ```json - * { - * ... - * "id": "price_id", - * "model_type": "unit", - * "unit_config": { - * "unit_amount": "2.00" - * }, - * "fixed_price_quantity": 3.0 - * ... - * } - * ``` + * For more on the types of prices, see + * [the core concepts documentation](/core-concepts#plan-and-price) */ price: PricesAPI.Price | null; diff --git a/src/resources/invoices.ts b/src/resources/invoices.ts index a04b6230..a1a22ec0 100644 --- a/src/resources/invoices.ts +++ b/src/resources/invoices.ts @@ -31,13 +31,13 @@ export class Invoices extends APIResource { } /** - * This endpoint returns a list of all [`Invoice`](../guides/concepts#invoice)s for - * an account in a list format. + * This endpoint returns a list of all [`Invoice`](/core-concepts#invoice)s for an + * account in a list format. * * The list of invoices is ordered starting from the most recently issued invoice * date. The response also includes - * [`pagination_metadata`](../reference/pagination), which lets the caller retrieve - * the next page of results if they exist. + * [`pagination_metadata`](/api-reference/pagination), which lets the caller + * retrieve the next page of results if they exist. * * By default, this only returns invoices that are `issued`, `paid`, or `synced`. * @@ -58,8 +58,8 @@ export class Invoices extends APIResource { } /** - * This endpoint is used to fetch an [`Invoice`](../guides/concepts#invoice) given - * an identifier. + * This endpoint is used to fetch an [`Invoice`](/core-concepts#invoice) given an + * identifier. */ fetch(invoiceId: string, options?: Core.RequestOptions): Core.APIPromise { return this._client.get(`/invoices/${invoiceId}`, options); @@ -67,7 +67,7 @@ export class Invoices extends APIResource { /** * This endpoint can be used to fetch the upcoming - * [invoice](../guides/concepts#invoice) for the current billing period given a + * [invoice](/core-concepts#invoice) for the current billing period given a * subscription. */ fetchUpcoming( @@ -139,7 +139,7 @@ export class Invoices extends APIResource { export class InvoicesPage extends Page {} /** - * An [`Invoice`](../guides/concepts#invoice) is a fundamental billing entity, + * An [`Invoice`](/core-concepts#invoice) is a fundamental billing entity, * representing the request for payment for a single subscription. This includes a * set of line items, which correspond to prices in the subscription's plan and can * represent fixed recurring fees or usage-based fees. They are generated at the @@ -886,229 +886,8 @@ export namespace Invoice { * is serialized differently in a given Price object. The model_type field * determines the key for the configuration object that is present. * - * ## Unit pricing - * - * With unit pricing, each unit costs a fixed amount. - * - * ```json - * { - * ... - * "model_type": "unit", - * "unit_config": { - * "unit_amount": "0.50" - * } - * ... - * } - * ``` - * - * ## Tiered pricing - * - * In tiered pricing, the cost of a given unit depends on the tier range that it - * falls into, where each tier range is defined by an upper and lower bound. For - * example, the first ten units may cost $0.50 each and all units thereafter may - * cost $0.10 each. - * - * ```json - * { - * ... - * "model_type": "tiered", - * "tiered_config": { - * "tiers": [ - * { - * "first_unit": 1, - * "last_unit": 10, - * "unit_amount": "0.50" - * }, - * { - * "first_unit": 11, - * "last_unit": null, - * "unit_amount": "0.10" - * } - * ] - * } - * ... - * ``` - * - * ## Bulk pricing - * - * Bulk pricing applies when the number of units determine the cost of all units. - * For example, if you've bought less than 10 units, they may each be $0.50 for a - * total of $5.00. Once you've bought more than 10 units, all units may now be - * priced at $0.40 (i.e. 101 units total would be $40.40). - * - * ```json - * { - * ... - * "model_type": "bulk", - * "bulk_config": { - * "tiers": [ - * { - * "maximum_units": 10, - * "unit_amount": "0.50" - * }, - * { - * "maximum_units": 1000, - * "unit_amount": "0.40" - * } - * ] - * } - * ... - * } - * ``` - * - * ## Package pricing - * - * Package pricing defines the size or granularity of a unit for billing purposes. - * For example, if the package size is set to 5, then 4 units will be billed as 5 - * and 6 units will be billed at 10. - * - * ```json - * { - * ... - * "model_type": "package", - * "package_config": { - * "package_amount": "0.80", - * "package_size": 10 - * } - * ... - * } - * ``` - * - * ## BPS pricing - * - * BPS pricing specifies a per-event (e.g. per-payment) rate in one hundredth of a - * percent (the number of basis points to charge), as well as a cap per event to - * assess. For example, this would allow you to assess a fee of 0.25% on every - * payment you process, with a maximum charge of $25 per payment. - * - * ```json - * { - * ... - * "model_type": "bps", - * "bps_config": { - * "bps": 125, - * "per_unit_maximum": "11.00" - * } - * ... - * } - * ``` - * - * ## Bulk BPS pricing - * - * Bulk BPS pricing specifies BPS parameters in a tiered manner, dependent on the - * total quantity across all events. Similar to bulk pricing, the BPS parameters of - * a given event depends on the tier range that the billing period falls into. Each - * tier range is defined by an upper bound. For example, after $1.5M of payment - * volume is reached, each individual payment may have a lower cap or a smaller - * take-rate. - * - * ```json - * ... - * "model_type": "bulk_bps", - * "bulk_bps_config": { - * "tiers": [ - * { - * "maximum_amount": "1000000.00", - * "bps": 125, - * "per_unit_maximum": "19.00" - * }, - * { - * "maximum_amount": null, - * "bps": 115, - * "per_unit_maximum": "4.00" - * } - * ] - * } - * ... - * } - * ``` - * - * ## Tiered BPS pricing - * - * Tiered BPS pricing specifies BPS parameters in a graduated manner, where an - * event's applicable parameter is a function of its marginal addition to the - * period total. Similar to tiered pricing, the BPS parameters of a given event - * depends on the tier range that it falls into, where each tier range is defined - * by an upper and lower bound. For example, the first few payments may have a 0.8 - * BPS take-rate and all payments after a specific volume may incur a take-rate of - * 0.5 BPS each. - * - * ```json - * ... - * "model_type": "tiered_bps", - * "tiered_bps_config": { - * "tiers": [ - * { - * "minimum_amount": "0", - * "maximum_amount": "1000000.00", - * "bps": 125, - * "per_unit_maximum": "19.00" - * }, - * { - * "minimum_amount": "1000000.00", - * "maximum_amount": null, - * "bps": 115, - * "per_unit_maximum": "4.00" - * } - * ] - * } - * ... - * } - * ``` - * - * ## Matrix pricing - * - * Matrix pricing defines a set of unit prices in a one or two-dimensional matrix. - * `dimensions` defines the two event property values evaluated in this pricing - * model. In a one-dimensional matrix, the second value is `null`. Every - * configuration has a list of `matrix_values` which give the unit prices for - * specified property values. In a one-dimensional matrix, the matrix values will - * have `dimension_values` where the second value of the pair is null. If an event - * does not match any of the dimension values in the matrix, it will resort to the - * `default_unit_amount`. - * - * ```json - * { - * "model_type": "matrix" - * "matrix_config": { - * "default_unit_amount": "3.00", - * "dimensions": [ - * "cluster_name", - * "region" - * ], - * "matrix_values": [ - * { - * "dimension_values": [ - * "alpha", - * "west" - * ], - * "unit_amount": "2.00" - * }, - * ... - * ] - * } - * } - * ``` - * - * ## Fixed fees - * - * Fixed fees are prices that are applied independent of usage quantities, and - * follow unit pricing. They also have an additional parameter - * `fixed_price_quantity`. If the Price represents a fixed cost, this represents - * the quantity of units applied. - * - * ```json - * { - * ... - * "id": "price_id", - * "model_type": "unit", - * "unit_config": { - * "unit_amount": "2.00" - * }, - * "fixed_price_quantity": 3.0 - * ... - * } - * ``` + * For more on the types of prices, see + * [the core concepts documentation](/core-concepts#plan-and-price) */ price: PricesAPI.Price | null; @@ -2097,229 +1876,8 @@ export namespace InvoiceFetchUpcomingResponse { * is serialized differently in a given Price object. The model_type field * determines the key for the configuration object that is present. * - * ## Unit pricing - * - * With unit pricing, each unit costs a fixed amount. - * - * ```json - * { - * ... - * "model_type": "unit", - * "unit_config": { - * "unit_amount": "0.50" - * } - * ... - * } - * ``` - * - * ## Tiered pricing - * - * In tiered pricing, the cost of a given unit depends on the tier range that it - * falls into, where each tier range is defined by an upper and lower bound. For - * example, the first ten units may cost $0.50 each and all units thereafter may - * cost $0.10 each. - * - * ```json - * { - * ... - * "model_type": "tiered", - * "tiered_config": { - * "tiers": [ - * { - * "first_unit": 1, - * "last_unit": 10, - * "unit_amount": "0.50" - * }, - * { - * "first_unit": 11, - * "last_unit": null, - * "unit_amount": "0.10" - * } - * ] - * } - * ... - * ``` - * - * ## Bulk pricing - * - * Bulk pricing applies when the number of units determine the cost of all units. - * For example, if you've bought less than 10 units, they may each be $0.50 for a - * total of $5.00. Once you've bought more than 10 units, all units may now be - * priced at $0.40 (i.e. 101 units total would be $40.40). - * - * ```json - * { - * ... - * "model_type": "bulk", - * "bulk_config": { - * "tiers": [ - * { - * "maximum_units": 10, - * "unit_amount": "0.50" - * }, - * { - * "maximum_units": 1000, - * "unit_amount": "0.40" - * } - * ] - * } - * ... - * } - * ``` - * - * ## Package pricing - * - * Package pricing defines the size or granularity of a unit for billing purposes. - * For example, if the package size is set to 5, then 4 units will be billed as 5 - * and 6 units will be billed at 10. - * - * ```json - * { - * ... - * "model_type": "package", - * "package_config": { - * "package_amount": "0.80", - * "package_size": 10 - * } - * ... - * } - * ``` - * - * ## BPS pricing - * - * BPS pricing specifies a per-event (e.g. per-payment) rate in one hundredth of a - * percent (the number of basis points to charge), as well as a cap per event to - * assess. For example, this would allow you to assess a fee of 0.25% on every - * payment you process, with a maximum charge of $25 per payment. - * - * ```json - * { - * ... - * "model_type": "bps", - * "bps_config": { - * "bps": 125, - * "per_unit_maximum": "11.00" - * } - * ... - * } - * ``` - * - * ## Bulk BPS pricing - * - * Bulk BPS pricing specifies BPS parameters in a tiered manner, dependent on the - * total quantity across all events. Similar to bulk pricing, the BPS parameters of - * a given event depends on the tier range that the billing period falls into. Each - * tier range is defined by an upper bound. For example, after $1.5M of payment - * volume is reached, each individual payment may have a lower cap or a smaller - * take-rate. - * - * ```json - * ... - * "model_type": "bulk_bps", - * "bulk_bps_config": { - * "tiers": [ - * { - * "maximum_amount": "1000000.00", - * "bps": 125, - * "per_unit_maximum": "19.00" - * }, - * { - * "maximum_amount": null, - * "bps": 115, - * "per_unit_maximum": "4.00" - * } - * ] - * } - * ... - * } - * ``` - * - * ## Tiered BPS pricing - * - * Tiered BPS pricing specifies BPS parameters in a graduated manner, where an - * event's applicable parameter is a function of its marginal addition to the - * period total. Similar to tiered pricing, the BPS parameters of a given event - * depends on the tier range that it falls into, where each tier range is defined - * by an upper and lower bound. For example, the first few payments may have a 0.8 - * BPS take-rate and all payments after a specific volume may incur a take-rate of - * 0.5 BPS each. - * - * ```json - * ... - * "model_type": "tiered_bps", - * "tiered_bps_config": { - * "tiers": [ - * { - * "minimum_amount": "0", - * "maximum_amount": "1000000.00", - * "bps": 125, - * "per_unit_maximum": "19.00" - * }, - * { - * "minimum_amount": "1000000.00", - * "maximum_amount": null, - * "bps": 115, - * "per_unit_maximum": "4.00" - * } - * ] - * } - * ... - * } - * ``` - * - * ## Matrix pricing - * - * Matrix pricing defines a set of unit prices in a one or two-dimensional matrix. - * `dimensions` defines the two event property values evaluated in this pricing - * model. In a one-dimensional matrix, the second value is `null`. Every - * configuration has a list of `matrix_values` which give the unit prices for - * specified property values. In a one-dimensional matrix, the matrix values will - * have `dimension_values` where the second value of the pair is null. If an event - * does not match any of the dimension values in the matrix, it will resort to the - * `default_unit_amount`. - * - * ```json - * { - * "model_type": "matrix" - * "matrix_config": { - * "default_unit_amount": "3.00", - * "dimensions": [ - * "cluster_name", - * "region" - * ], - * "matrix_values": [ - * { - * "dimension_values": [ - * "alpha", - * "west" - * ], - * "unit_amount": "2.00" - * }, - * ... - * ] - * } - * } - * ``` - * - * ## Fixed fees - * - * Fixed fees are prices that are applied independent of usage quantities, and - * follow unit pricing. They also have an additional parameter - * `fixed_price_quantity`. If the Price represents a fixed cost, this represents - * the quantity of units applied. - * - * ```json - * { - * ... - * "id": "price_id", - * "model_type": "unit", - * "unit_config": { - * "unit_amount": "2.00" - * }, - * "fixed_price_quantity": 3.0 - * ... - * } - * ``` + * For more on the types of prices, see + * [the core concepts documentation](/core-concepts#plan-and-price) */ price: PricesAPI.Price | null; diff --git a/src/resources/items.ts b/src/resources/items.ts index 7a8160f4..eb351563 100644 --- a/src/resources/items.ts +++ b/src/resources/items.ts @@ -7,7 +7,7 @@ import { Page, type PageParams } from '../pagination'; export class Items extends APIResource { /** - * This endpoint is used to create an [Item](../guides/concepts#item). + * This endpoint is used to create an [Item](/core-concepts#item). */ create(body: ItemCreateParams, options?: Core.RequestOptions): Core.APIPromise { return this._client.post('/items', { body, ...options }); diff --git a/src/resources/metrics.ts b/src/resources/metrics.ts index 787f6763..dae7856d 100644 --- a/src/resources/metrics.ts +++ b/src/resources/metrics.ts @@ -8,9 +8,8 @@ import { Page, type PageParams } from '../pagination'; export class Metrics extends APIResource { /** - * This endpoint is used to create a [metric](../guides/concepts##metric) using a - * SQL string. See - * [SQL support](../guides/extensibility/advanced-metrics#sql-support) for a + * This endpoint is used to create a [metric](/core-concepts###metric) using a SQL + * string. See [SQL support](/extensibility/advanced-metrics#sql-support) for a * description of constructing SQL queries with examples. */ create(body: MetricCreateParams, options?: Core.RequestOptions): Core.APIPromise { @@ -31,9 +30,9 @@ export class Metrics extends APIResource { } /** - * This endpoint is used to fetch [metric](../guides/concepts#metric) details given - * a metric identifier. It returns information about the metrics including its - * name, description, and item. + * This endpoint is used to fetch [metric](/core-concepts##metric) details given a + * metric identifier. It returns information about the metrics including its name, + * description, and item. */ list( query?: MetricListParams, @@ -51,7 +50,7 @@ export class Metrics extends APIResource { } /** - * This endpoint is used to list [metrics](../guides/concepts##metric). It returns + * This endpoint is used to list [metrics](/core-concepts#metric). It returns * information about the metrics including its name, description, and item. */ fetch(metricId: string, options?: Core.RequestOptions): Core.APIPromise { diff --git a/src/resources/plans/external-plan-id.ts b/src/resources/plans/external-plan-id.ts index b2ef425f..53a4671e 100644 --- a/src/resources/plans/external-plan-id.ts +++ b/src/resources/plans/external-plan-id.ts @@ -20,10 +20,10 @@ export class ExternalPlanID extends APIResource { } /** - * This endpoint is used to fetch [plan](../guides/concepts##plan-and-price) - * details given an external_plan_id identifier. It returns information about the - * prices included in the plan and their configuration, as well as the product that - * the plan is attached to. + * This endpoint is used to fetch [plan](/core-concepts##plan-and-price) details + * given an external_plan_id identifier. It returns information about the prices + * included in the plan and their configuration, as well as the product that the + * plan is attached to. * * If multiple plans are found to contain the specified external_plan_id, the * active plans will take priority over archived ones, and among those, the @@ -32,10 +32,10 @@ export class ExternalPlanID extends APIResource { * ## Serialized prices * * Orb supports a few different pricing models out of the box. Each of these models - * is serialized differently in a given [Price](../guides/concepts#plan-and-price) + * is serialized differently in a given [Price](/core-concepts#plan-and-price) * object. The `model_type` field determines the key for the configuration object * that is present. A detailed explanation of price types can be found in the - * [Price schema](../guides/concepts#plan-and-price). " + * [Price schema](/core-concepts#plan-and-price). " */ fetch(externalPlanId: string, options?: Core.RequestOptions): Core.APIPromise { return this._client.get(`/plans/external_plan_id/${externalPlanId}`, options); diff --git a/src/resources/plans/plans.ts b/src/resources/plans/plans.ts index 0711ff18..e57b26a7 100644 --- a/src/resources/plans/plans.ts +++ b/src/resources/plans/plans.ts @@ -30,11 +30,11 @@ export class Plans extends APIResource { } /** - * This endpoint returns a list of all [plans](../guides/concepts##plan-and-price) - * for an account in a list format. The list of plans is ordered starting from the - * most recently created plan. The response also includes - * [`pagination_metadata`](../reference/pagination), which lets the caller retrieve - * the next page of results if they exist. + * This endpoint returns a list of all [plans](/core-concepts#plan-and-price) for + * an account in a list format. The list of plans is ordered starting from the most + * recently created plan. The response also includes + * [`pagination_metadata`](/api-reference/pagination), which lets the caller + * retrieve the next page of results if they exist. */ list(query?: PlanListParams, options?: Core.RequestOptions): Core.PagePromise; list(options?: Core.RequestOptions): Core.PagePromise; @@ -49,18 +49,18 @@ export class Plans extends APIResource { } /** - * This endpoint is used to fetch [plan](../guides/concepts##plan-and-price) - * details given a plan identifier. It returns information about the prices - * included in the plan and their configuration, as well as the product that the - * plan is attached to. + * This endpoint is used to fetch [plan](/core-concepts#plan-and-price) details + * given a plan identifier. It returns information about the prices included in the + * plan and their configuration, as well as the product that the plan is attached + * to. * * ## Serialized prices * * Orb supports a few different pricing models out of the box. Each of these models - * is serialized differently in a given [Price](../guides/concepts#plan-and-price) + * is serialized differently in a given [Price](/core-concepts#plan-and-price) * object. The `model_type` field determines the key for the configuration object * that is present. A detailed explanation of price types can be found in the - * [Price schema](../guides/concepts#plan-and-price). + * [Price schema](/core-concepts#plan-and-price). * * ## Phases * @@ -75,9 +75,9 @@ export class Plans extends APIResource { export class PlansPage extends Page {} /** - * The [Plan](../guides/core-concepts.mdx#plan-and-price) resource represents a - * plan that can be subscribed to by a customer. Plans define the billing behavior - * of the subscription. You can see more about how to configure prices in the + * The [Plan](/core-concepts#plan-and-price) resource represents a plan that can be + * subscribed to by a customer. Plans define the billing behavior of the + * subscription. You can see more about how to configure prices in the * [Price resource](/reference/price). */ export interface Plan { @@ -497,7 +497,6 @@ export interface PlanCreateParams { | PlanCreateParams.NewPlanMatrixWithDisplayNamePrice | PlanCreateParams.NewPlanBulkWithProrationPrice | PlanCreateParams.NewPlanGroupedTieredPackagePrice - | PlanCreateParams.NewPlanMaxGroupTieredPrice >; /** @@ -3072,119 +3071,6 @@ export namespace PlanCreateParams { duration_unit: 'day' | 'month'; } } - - export interface NewPlanMaxGroupTieredPrice { - /** - * 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; - - max_group_tiered_config: Record; - - model_type: 'max_group_tiered'; - - /** - * The name of the price. - */ - name: string; - - /** - * 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?: NewPlanMaxGroupTieredPrice.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?: NewPlanMaxGroupTieredPrice.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 NewPlanMaxGroupTieredPrice { - /** - * 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/external-price-id.ts b/src/resources/prices/external-price-id.ts index ba99ba1f..65b2d7b6 100644 --- a/src/resources/prices/external-price-id.ts +++ b/src/resources/prices/external-price-id.ts @@ -20,8 +20,8 @@ export class ExternalPriceID extends APIResource { /** * This endpoint returns a price given an external price id. See the - * [price creation API](../reference/create-price) for more information about - * external price aliases. + * [price creation API](/api-reference/price/create-price) for more information + * about external price aliases. */ fetch(externalPriceId: string, options?: Core.RequestOptions): Core.APIPromise { return this._client.get(`/prices/external_price_id/${externalPriceId}`, options); diff --git a/src/resources/prices/prices.ts b/src/resources/prices/prices.ts index d69f459f..9de9c182 100644 --- a/src/resources/prices/prices.ts +++ b/src/resources/prices/prices.ts @@ -12,16 +12,16 @@ export class Prices extends APIResource { externalPriceId: ExternalPriceIDAPI.ExternalPriceID = new ExternalPriceIDAPI.ExternalPriceID(this._client); /** - * This endpoint is used to create a [price](../reference/price). A price created - * using this endpoint is always an add-on, meaning that it’s not associated with a - * specific plan and can instead be individually added to subscriptions, including - * subscriptions on different plans. + * This endpoint is used to create a [price](/product-catalog/price-configuration). + * A price created using this endpoint is always an add-on, meaning that it’s not + * associated with a specific plan and can instead be individually added to + * subscriptions, including subscriptions on different plans. * * An `external_price_id` can be optionally specified as an alias to allow * ergonomic interaction with prices in the Orb API. * - * See the [Price resource](../reference/price) for the specification of different - * price model configurations possible in this endpoint. + * See the [Price resource](/product-catalog/price-configuration) for the + * specification of different price model configurations possible in this endpoint. */ create(body: PriceCreateParams, options?: Core.RequestOptions): Core.APIPromise { return this._client.post('/prices', { body, ...options }); @@ -38,7 +38,7 @@ export class Prices extends APIResource { /** * This endpoint is used to list all add-on prices created using the - * [price creation endpoint](../reference/create-price). + * [price creation endpoint](/api-reference/price/create-price). */ list(query?: PriceListParams, options?: Core.RequestOptions): Core.PagePromise; list(options?: Core.RequestOptions): Core.PagePromise; @@ -55,7 +55,7 @@ export class Prices extends APIResource { /** * This endpoint is used to evaluate the output of a price for a given customer and * time range. It enables filtering and grouping the output using - * [computed properties](../guides/extensibility/advanced-metrics#computed-properties), + * [computed properties](/extensibility/advanced-metrics#computed-properties), * supporting the following workflows: * * 1. Showing detailed usage and costs to the end customer. @@ -119,229 +119,8 @@ export interface EvaluatePriceGroup { * is serialized differently in a given Price object. The model_type field * determines the key for the configuration object that is present. * - * ## Unit pricing - * - * With unit pricing, each unit costs a fixed amount. - * - * ```json - * { - * ... - * "model_type": "unit", - * "unit_config": { - * "unit_amount": "0.50" - * } - * ... - * } - * ``` - * - * ## Tiered pricing - * - * In tiered pricing, the cost of a given unit depends on the tier range that it - * falls into, where each tier range is defined by an upper and lower bound. For - * example, the first ten units may cost $0.50 each and all units thereafter may - * cost $0.10 each. - * - * ```json - * { - * ... - * "model_type": "tiered", - * "tiered_config": { - * "tiers": [ - * { - * "first_unit": 1, - * "last_unit": 10, - * "unit_amount": "0.50" - * }, - * { - * "first_unit": 11, - * "last_unit": null, - * "unit_amount": "0.10" - * } - * ] - * } - * ... - * ``` - * - * ## Bulk pricing - * - * Bulk pricing applies when the number of units determine the cost of all units. - * For example, if you've bought less than 10 units, they may each be $0.50 for a - * total of $5.00. Once you've bought more than 10 units, all units may now be - * priced at $0.40 (i.e. 101 units total would be $40.40). - * - * ```json - * { - * ... - * "model_type": "bulk", - * "bulk_config": { - * "tiers": [ - * { - * "maximum_units": 10, - * "unit_amount": "0.50" - * }, - * { - * "maximum_units": 1000, - * "unit_amount": "0.40" - * } - * ] - * } - * ... - * } - * ``` - * - * ## Package pricing - * - * Package pricing defines the size or granularity of a unit for billing purposes. - * For example, if the package size is set to 5, then 4 units will be billed as 5 - * and 6 units will be billed at 10. - * - * ```json - * { - * ... - * "model_type": "package", - * "package_config": { - * "package_amount": "0.80", - * "package_size": 10 - * } - * ... - * } - * ``` - * - * ## BPS pricing - * - * BPS pricing specifies a per-event (e.g. per-payment) rate in one hundredth of a - * percent (the number of basis points to charge), as well as a cap per event to - * assess. For example, this would allow you to assess a fee of 0.25% on every - * payment you process, with a maximum charge of $25 per payment. - * - * ```json - * { - * ... - * "model_type": "bps", - * "bps_config": { - * "bps": 125, - * "per_unit_maximum": "11.00" - * } - * ... - * } - * ``` - * - * ## Bulk BPS pricing - * - * Bulk BPS pricing specifies BPS parameters in a tiered manner, dependent on the - * total quantity across all events. Similar to bulk pricing, the BPS parameters of - * a given event depends on the tier range that the billing period falls into. Each - * tier range is defined by an upper bound. For example, after $1.5M of payment - * volume is reached, each individual payment may have a lower cap or a smaller - * take-rate. - * - * ```json - * ... - * "model_type": "bulk_bps", - * "bulk_bps_config": { - * "tiers": [ - * { - * "maximum_amount": "1000000.00", - * "bps": 125, - * "per_unit_maximum": "19.00" - * }, - * { - * "maximum_amount": null, - * "bps": 115, - * "per_unit_maximum": "4.00" - * } - * ] - * } - * ... - * } - * ``` - * - * ## Tiered BPS pricing - * - * Tiered BPS pricing specifies BPS parameters in a graduated manner, where an - * event's applicable parameter is a function of its marginal addition to the - * period total. Similar to tiered pricing, the BPS parameters of a given event - * depends on the tier range that it falls into, where each tier range is defined - * by an upper and lower bound. For example, the first few payments may have a 0.8 - * BPS take-rate and all payments after a specific volume may incur a take-rate of - * 0.5 BPS each. - * - * ```json - * ... - * "model_type": "tiered_bps", - * "tiered_bps_config": { - * "tiers": [ - * { - * "minimum_amount": "0", - * "maximum_amount": "1000000.00", - * "bps": 125, - * "per_unit_maximum": "19.00" - * }, - * { - * "minimum_amount": "1000000.00", - * "maximum_amount": null, - * "bps": 115, - * "per_unit_maximum": "4.00" - * } - * ] - * } - * ... - * } - * ``` - * - * ## Matrix pricing - * - * Matrix pricing defines a set of unit prices in a one or two-dimensional matrix. - * `dimensions` defines the two event property values evaluated in this pricing - * model. In a one-dimensional matrix, the second value is `null`. Every - * configuration has a list of `matrix_values` which give the unit prices for - * specified property values. In a one-dimensional matrix, the matrix values will - * have `dimension_values` where the second value of the pair is null. If an event - * does not match any of the dimension values in the matrix, it will resort to the - * `default_unit_amount`. - * - * ```json - * { - * "model_type": "matrix" - * "matrix_config": { - * "default_unit_amount": "3.00", - * "dimensions": [ - * "cluster_name", - * "region" - * ], - * "matrix_values": [ - * { - * "dimension_values": [ - * "alpha", - * "west" - * ], - * "unit_amount": "2.00" - * }, - * ... - * ] - * } - * } - * ``` - * - * ## Fixed fees - * - * Fixed fees are prices that are applied independent of usage quantities, and - * follow unit pricing. They also have an additional parameter - * `fixed_price_quantity`. If the Price represents a fixed cost, this represents - * the quantity of units applied. - * - * ```json - * { - * ... - * "id": "price_id", - * "model_type": "unit", - * "unit_config": { - * "unit_amount": "2.00" - * }, - * "fixed_price_quantity": 3.0 - * ... - * } - * ``` + * For more on the types of prices, see + * [the core concepts documentation](/core-concepts#plan-and-price) */ export type Price = | Price.UnitPrice @@ -367,8 +146,7 @@ export type Price = | Price.GroupedWithMeteredMinimumPrice | Price.MatrixWithDisplayNamePrice | Price.BulkWithProrationPrice - | Price.GroupedTieredPackagePrice - | Price.MaxGroupTieredPrice; + | Price.GroupedTieredPackagePrice; export namespace Price { export interface UnitPrice { @@ -3219,116 +2997,6 @@ export namespace Price { minimum_amount: string; } } - - export interface MaxGroupTieredPrice { - id: string; - - billable_metric: MaxGroupTieredPrice.BillableMetric | null; - - billing_cycle_configuration: MaxGroupTieredPrice.BillingCycleConfiguration; - - cadence: 'one_time' | 'monthly' | 'quarterly' | 'semi_annual' | 'annual' | 'custom'; - - conversion_rate: number | null; - - created_at: string; - - credit_allocation: MaxGroupTieredPrice.CreditAllocation | null; - - currency: string; - - discount: Shared.Discount | null; - - external_price_id: string | null; - - fixed_price_quantity: number | null; - - invoicing_cycle_configuration: MaxGroupTieredPrice.InvoicingCycleConfiguration | null; - - item: MaxGroupTieredPrice.Item; - - max_group_tiered_config: Record; - - maximum: MaxGroupTieredPrice.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: MaxGroupTieredPrice.Minimum | null; - - minimum_amount: string | null; - - model_type: 'max_group_tiered'; - - name: string; - - plan_phase_order: number | null; - - price_type: 'usage_price' | 'fixed_price'; - } - - export namespace MaxGroupTieredPrice { - 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 PriceEvaluateResponse { @@ -3348,7 +3016,6 @@ export type PriceCreateParams = | PriceCreateParams.NewFloatingThresholdTotalAmountPrice | PriceCreateParams.NewFloatingTieredPackagePrice | PriceCreateParams.NewFloatingGroupedTieredPrice - | PriceCreateParams.NewFloatingMaxGroupTieredPrice | PriceCreateParams.NewFloatingTieredWithMinimumPrice | PriceCreateParams.NewFloatingPackageWithAllocationPrice | PriceCreateParams.NewFloatingTieredPackageWithMinimumPrice @@ -4916,118 +4583,6 @@ export declare namespace PriceCreateParams { } } - export interface NewFloatingMaxGroupTieredPrice { - /** - * 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; - - max_group_tiered_config: Record; - - model_type: 'max_group_tiered'; - - /** - * The name of the price. - */ - name: string; - - /** - * 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?: PriceCreateParams.NewFloatingMaxGroupTieredPrice.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?: PriceCreateParams.NewFloatingMaxGroupTieredPrice.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 NewFloatingMaxGroupTieredPrice { - /** - * 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 NewFloatingTieredWithMinimumPrice { /** * The cadence to bill for this price on. @@ -6407,15 +5962,15 @@ export interface PriceEvaluateParams { /** * A boolean - * [computed property](../guides/extensibility/advanced-metrics#computed-properties) - * used to filter the underlying billable metric + * [computed property](/extensibility/advanced-metrics#computed-properties) used to + * filter the underlying billable metric */ filter?: string | null; /** * Properties (or - * [computed properties](../guides/extensibility/advanced-metrics#computed-properties)) - * used to group the underlying billable metric + * [computed properties](/extensibility/advanced-metrics#computed-properties)) used + * to group the underlying billable metric */ grouping_keys?: Array; } diff --git a/src/resources/subscriptions.ts b/src/resources/subscriptions.ts index b2f10dd4..67a4cc57 100644 --- a/src/resources/subscriptions.ts +++ b/src/resources/subscriptions.ts @@ -21,7 +21,7 @@ export class Subscriptions extends APIResource { * * The default configuration for subscriptions in Orb is **In-advance billing** and * **Beginning of month alignment** (see - * [Subscription](../guides/concepts#subscription) for more details). + * [Subscription](/core-concepts##subscription) for more details). * * In order to change the alignment behavior, Orb also supports billing * subscriptions on the day of the month they are created. If @@ -46,9 +46,10 @@ export class Subscriptions extends APIResource { * subscription being created. This is useful when a customer has prices that * differ from the default prices for a specific plan. * - * :::info This feature is only available for accounts that have migrated to - * Subscription Overrides Version 2. You can find your Subscription Overrides - * Version at the bottom of your [Plans page](https://app.withorb.com/plans) ::: + * + * This feature is only available for accounts that have migrated to Subscription Overrides Version 2. You can find your + * Subscription Overrides Version at the bottom of your [Plans page](https://app.withorb.com/plans) + * * * ### Adding Prices * @@ -56,17 +57,17 @@ export class Subscriptions extends APIResource { * the list must specify an existing add-on price with a `price_id` or * `external_price_id` field, or create a new add-on price by including an object * with the key `price`, identical to what would be used in the request body for - * the [create price endpoint](../reference/create-price). See the - * [Price resource](../reference/price) for the specification of different price - * model configurations possible in this object. + * the [create price endpoint](/api-reference/price/create-price). See the + * [Price resource](/product-catalog/price-configuration) for the specification of + * different price model configurations possible in this object. * * If the plan has phases, each object in the list must include a number with * `plan_phase_order` key to indicate which phase the price should be added to. * * An object in the list can specify an optional `start_date` and optional * `end_date`. This is equivalent to creating a price interval with the - * [add/edit price intervals endpoint](../reference/add-edit-price-intervals). If - * unspecified, the start or end date of the phase or subscription will be used. + * [add/edit price intervals endpoint](/api-reference/price-interval/add-or-edit-price-intervals). + * If unspecified, the start or end date of the phase or subscription will be used. * * An object in the list can specify an optional `minimum_amount`, * `maximum_amount`, or `discounts`. This will create adjustments which apply only @@ -91,14 +92,15 @@ export class Subscriptions extends APIResource { * either referencing an existing add-on price with a `price_id` or * `external_price_id` field, or by creating a new add-on price by including an * object with the key `price`, identical to what would be used in the request body - * for the [create price endpoint](../reference/create-price). See the - * [Price resource](../reference/price) for the specification of different price - * model configurations possible in this object. + * for the [create price endpoint](/api-reference/price/create-price). See the + * [Price resource](/product-catalog/price-configuration) for the specification of + * different price model configurations possible in this object. * * For fixed fees, an object in the list can supply a `fixed_price_quantity` * instead of a `price`, `price_id`, or `external_price_id` field. This will update * only the quantity for the price, similar to the - * [Update price quantity](../reference/update-fixed-fee-quantity) endpoint. + * [Update price quantity](/api-reference/subscription/update-price-quantity) + * endpoint. * * The replacement price will have the same phase, if applicable, and the same * start and end dates as the price it replaces. @@ -117,7 +119,7 @@ export class Subscriptions extends APIResource { * To add adjustments, provide a list of objects with the key `add_adjustments`. An * object in the list must include an object with the key `adjustment`, identical * to the adjustment object in the - * [add/edit price intervals endpoint](../reference/add-edit-price-intervals). + * [add/edit price intervals endpoint](/api-reference/price-interval/add-or-edit-price-intervals). * * If the plan has phases, each object in the list must include a number with * `plan_phase_order` key to indicate which phase the adjustment should be added @@ -140,17 +142,17 @@ export class Subscriptions extends APIResource { * replace with the `replaces_adjustment_id` key, and it must specify an adjustment * to replace it with by including an object with the key `adjustment`, identical * to the adjustment object in the - * [add/edit price intervals endpoint](../reference/add-edit-price-intervals). + * [add/edit price intervals endpoint](/api-reference/price-interval/add-or-edit-price-intervals). * * The replacement adjustment will have the same phase, if applicable, and the same * start and end dates as the adjustment it replaces. * * ## Price overrides (DEPRECATED) * - * :::info Price overrides are being phased out in favor adding/removing/replacing - * prices. (See - * [Customize your customer's subscriptions](../reference/create-subscription#customize-your-customers-subscriptions)) - * ::: + * + * Price overrides are being phased out in favor adding/removing/replacing prices. (See + * [Customize your customer's subscriptions](/api-reference/subscription/create-subscription)) + * * * Price overrides are used to update some or all prices in a plan for the specific * subscription being created. This is useful when a new customer has negotiated a @@ -159,9 +161,9 @@ export class Subscriptions extends APIResource { * To override prices, provide a list of objects with the key `price_overrides`. * The price object in the list of overrides is expected to contain the existing * price id, the `model_type` and configuration. (See the - * [Price resource](../reference/price) for the specification of different price - * model configurations.) The numerical values can be updated, but the billable - * metric, cadence, type, and name of a price can not be overridden. + * [Price resource](/product-catalog/price-configuration) for the specification of + * different price model configurations.) The numerical values can be updated, but + * the billable metric, cadence, type, and name of a price can not be overridden. * * ### Maximums and Minimums * @@ -288,9 +290,9 @@ export class Subscriptions extends APIResource { /** * This endpoint returns a list of all subscriptions for an account as a - * [paginated](../reference/pagination) list, ordered starting from the most + * [paginated](/api-reference/pagination) list, ordered starting from the most * recently created subscription. For a full discussion of the subscription - * resource, see [Subscription](../guides/concepts#subscription). + * resource, see [Subscription](/core-concepts##subscription). * * Subscriptions can be filtered for a specific customer by using either the * customer_id or external_customer_id query parameters. To filter subscriptions @@ -373,7 +375,7 @@ export class Subscriptions extends APIResource { * current period. If the cancellation is before the most recently issued invoice, * Orb will void the intervening invoice and generate a new one based on the new * dates for the subscription. See the section on - * [cancellation behaviors](../guides/product-catalog/creating-subscriptions.md#cancellation-behaviors). + * [cancellation behaviors](/product-catalog/creating-subscriptions#cancellation-behaviors). */ cancel( subscriptionId: string, @@ -384,7 +386,7 @@ export class Subscriptions extends APIResource { } /** - * This endpoint is used to fetch a [Subscription](../guides/concepts#subscription) + * This endpoint is used to fetch a [Subscription](/core-concepts##subscription) * given an identifier. */ fetch(subscriptionId: string, options?: Core.RequestOptions): Core.APIPromise { @@ -424,7 +426,7 @@ export class Subscriptions extends APIResource { } /** - * This endpoint returns a [paginated](../reference/pagination) list of all plans + * This endpoint returns a [paginated](/api-reference/pagination) list of all plans * associated with a subscription along with their start and end dates. This list * contains the subscription's initial plan along with past and future plan * changes. @@ -668,9 +670,9 @@ export class Subscriptions extends APIResource { /** * This endpoint is used to add and edit subscription - * [price intervals](../reference/price-interval). By making modifications to a - * subscription’s price intervals, you can - * [flexibly and atomically control the billing behavior of a subscription](../guides/product-catalog/modifying-subscriptions). + * [price intervals](/api-reference/price-interval/add-or-edit-price-intervals). By + * making modifications to a subscription’s price intervals, you can + * [flexibly and atomically control the billing behavior of a subscription](/product-catalog/modifying-subscriptions). * * ## Adding price intervals * @@ -793,9 +795,10 @@ export class Subscriptions extends APIResource { * subscription when you schedule the plan change. This is useful when a customer * has prices that differ from the default prices for a specific plan. * - * :::info This feature is only available for accounts that have migrated to - * Subscription Overrides Version 2. You can find your Subscription Overrides - * Version at the bottom of your [Plans page](https://app.withorb.com/plans) ::: + * + * This feature is only available for accounts that have migrated to Subscription Overrides Version 2. You can find your + * Subscription Overrides Version at the bottom of your [Plans page](https://app.withorb.com/plans) + * * * ### Adding Prices * @@ -803,17 +806,17 @@ export class Subscriptions extends APIResource { * the list must specify an existing add-on price with a `price_id` or * `external_price_id` field, or create a new add-on price by including an object * with the key `price`, identical to what would be used in the request body for - * the [create price endpoint](../reference/create-price). See the - * [Price resource](../reference/price) for the specification of different price - * model configurations possible in this object. + * the [create price endpoint](/api-reference/price/create-price). See the + * [Price resource](/product-catalog/price-configuration) for the specification of + * different price model configurations possible in this object. * * If the plan has phases, each object in the list must include a number with * `plan_phase_order` key to indicate which phase the price should be added to. * * An object in the list can specify an optional `start_date` and optional * `end_date`. This is equivalent to creating a price interval with the - * [add/edit price intervals endpoint](../reference/add-edit-price-intervals). If - * unspecified, the start or end date of the phase or subscription will be used. + * [add/edit price intervals endpoint](/api-reference/price-interval/add-or-edit-price-intervals). + * If unspecified, the start or end date of the phase or subscription will be used. * * An object in the list can specify an optional `minimum_amount`, * `maximum_amount`, or `discounts`. This will create adjustments which apply only @@ -838,14 +841,15 @@ export class Subscriptions extends APIResource { * either referencing an existing add-on price with a `price_id` or * `external_price_id` field, or by creating a new add-on price by including an * object with the key `price`, identical to what would be used in the request body - * for the [create price endpoint](../reference/create-price). See the - * [Price resource](../reference/price) for the specification of different price - * model configurations possible in this object. + * for the [create price endpoint](/api-reference/price/create-price). See the + * [Price resource](/product-catalog/price-configuration) for the specification of + * different price model configurations possible in this object. * * For fixed fees, an object in the list can supply a `fixed_price_quantity` * instead of a `price`, `price_id`, or `external_price_id` field. This will update * only the quantity for the price, similar to the - * [Update price quantity](../reference/update-fixed-fee-quantity) endpoint. + * [Update price quantity](/api-reference/subscription/update-price-quantity) + * endpoint. * * The replacement price will have the same phase, if applicable, and the same * start and end dates as the price it replaces. @@ -864,7 +868,7 @@ export class Subscriptions extends APIResource { * To add adjustments, provide a list of objects with the key `add_adjustments`. An * object in the list must include an object with the key `adjustment`, identical * to the adjustment object in the - * [add/edit price intervals endpoint](../reference/add-edit-price-intervals). + * [add/edit price intervals endpoint](/api-reference/price-interval/add-or-edit-price-intervals). * * If the plan has phases, each object in the list must include a number with * `plan_phase_order` key to indicate which phase the adjustment should be added @@ -887,17 +891,17 @@ export class Subscriptions extends APIResource { * replace with the `replaces_adjustment_id` key, and it must specify an adjustment * to replace it with by including an object with the key `adjustment`, identical * to the adjustment object in the - * [add/edit price intervals endpoint](../reference/add-edit-price-intervals). + * [add/edit price intervals endpoint](/api-reference/price-interval/add-or-edit-price-intervals). * * The replacement adjustment will have the same phase, if applicable, and the same * start and end dates as the adjustment it replaces. * * ## Price overrides (DEPRECATED) * - * :::info Price overrides are being phased out in favor adding/removing/replacing - * prices. (See - * [Customize your customer's subscriptions](../reference/schedule-plan-change#customize-your-customers-subscriptions)) - * ::: + * + * Price overrides are being phased out in favor adding/removing/replacing prices. (See + * [Customize your customer's subscriptions](/api-reference/subscription/schedule-plan-change)) + * * * Price overrides are used to update some or all prices in a plan for the specific * subscription being created. This is useful when a new customer has negotiated a @@ -906,9 +910,9 @@ export class Subscriptions extends APIResource { * To override prices, provide a list of objects with the key `price_overrides`. * The price object in the list of overrides is expected to contain the existing * price id, the `model_type` and configuration. (See the - * [Price resource](../reference/price) for the specification of different price - * model configurations.) The numerical values can be updated, but the billable - * metric, cadence, type, and name of a price can not be overridden. + * [Price resource](/product-catalog/price-configuration) for the specification of + * different price model configurations.) The numerical values can be updated, but + * the billable metric, cadence, type, and name of a price can not be overridden. * * ### Maximums, and minimums * @@ -928,7 +932,7 @@ export class Subscriptions extends APIResource { * By default, Orb calculates the prorated difference in any fixed fees when making * a plan change, adjusting the customer balance as needed. For details on this * behavior, see - * [Modifying subscriptions](../guides/product-catalog/modifying-subscriptions.md#prorations-for-in-advance-fees). + * [Modifying subscriptions](/product-catalog/modifying-subscriptions#prorations-for-in-advance-fees). */ schedulePlanChange( subscriptionId: string, @@ -1055,8 +1059,8 @@ export class SubscriptionsPage extends Page {} export class SubscriptionFetchScheduleResponsesPage extends Page {} /** - * A [subscription](../guides/core-concepts.mdx#subscription) represents the - * purchase of a plan by a customer. + * A [subscription](/core-concepts#subscription) represents the purchase of a plan + * by a customer. * * By default, subscriptions begin on the day that they're created and renew * automatically for each billing cycle at the cadence that's configured in the @@ -1130,7 +1134,7 @@ export interface Subscription { * it's often desirable to have these match existing identifiers in your system. To * avoid having to denormalize Orb ID information, you can pass in an * `external_customer_id` with your own identifier. See - * [Customer ID Aliases](../guides/events-and-metrics/customer-aliases) for further + * [Customer ID Aliases](/events-and-metrics/customer-aliases) for further * information about how these aliases work in Orb. * * In addition to having an identifier in your system, a customer may exist in a @@ -1139,9 +1143,8 @@ export interface Subscription { * * A customer also has a timezone (from the standard * [IANA timezone database](https://www.iana.org/time-zones)), which defaults to - * your account's timezone. See - * [Timezone localization](../guides/product-catalog/timezones.md) for information - * on what this timezone parameter influences within Orb. + * your account's timezone. See [Timezone localization](/essentials/timezones) for + * information on what this timezone parameter influences within Orb. */ customer: CustomersAPI.Customer; @@ -1196,9 +1199,9 @@ export interface Subscription { net_terms: number; /** - * The [Plan](../guides/core-concepts.mdx#plan-and-price) resource represents a - * plan that can be subscribed to by a customer. Plans define the billing behavior - * of the subscription. You can see more about how to configure prices in the + * The [Plan](/core-concepts#plan-and-price) resource represents a plan that can be + * subscribed to by a customer. Plans define the billing behavior of the + * subscription. You can see more about how to configure prices in the * [Price resource](/reference/price). */ plan: PlansAPI.Plan; @@ -1645,229 +1648,8 @@ export namespace Subscription { * is serialized differently in a given Price object. The model_type field * determines the key for the configuration object that is present. * - * ## Unit pricing - * - * With unit pricing, each unit costs a fixed amount. - * - * ```json - * { - * ... - * "model_type": "unit", - * "unit_config": { - * "unit_amount": "0.50" - * } - * ... - * } - * ``` - * - * ## Tiered pricing - * - * In tiered pricing, the cost of a given unit depends on the tier range that it - * falls into, where each tier range is defined by an upper and lower bound. For - * example, the first ten units may cost $0.50 each and all units thereafter may - * cost $0.10 each. - * - * ```json - * { - * ... - * "model_type": "tiered", - * "tiered_config": { - * "tiers": [ - * { - * "first_unit": 1, - * "last_unit": 10, - * "unit_amount": "0.50" - * }, - * { - * "first_unit": 11, - * "last_unit": null, - * "unit_amount": "0.10" - * } - * ] - * } - * ... - * ``` - * - * ## Bulk pricing - * - * Bulk pricing applies when the number of units determine the cost of all units. - * For example, if you've bought less than 10 units, they may each be $0.50 for a - * total of $5.00. Once you've bought more than 10 units, all units may now be - * priced at $0.40 (i.e. 101 units total would be $40.40). - * - * ```json - * { - * ... - * "model_type": "bulk", - * "bulk_config": { - * "tiers": [ - * { - * "maximum_units": 10, - * "unit_amount": "0.50" - * }, - * { - * "maximum_units": 1000, - * "unit_amount": "0.40" - * } - * ] - * } - * ... - * } - * ``` - * - * ## Package pricing - * - * Package pricing defines the size or granularity of a unit for billing purposes. - * For example, if the package size is set to 5, then 4 units will be billed as 5 - * and 6 units will be billed at 10. - * - * ```json - * { - * ... - * "model_type": "package", - * "package_config": { - * "package_amount": "0.80", - * "package_size": 10 - * } - * ... - * } - * ``` - * - * ## BPS pricing - * - * BPS pricing specifies a per-event (e.g. per-payment) rate in one hundredth of a - * percent (the number of basis points to charge), as well as a cap per event to - * assess. For example, this would allow you to assess a fee of 0.25% on every - * payment you process, with a maximum charge of $25 per payment. - * - * ```json - * { - * ... - * "model_type": "bps", - * "bps_config": { - * "bps": 125, - * "per_unit_maximum": "11.00" - * } - * ... - * } - * ``` - * - * ## Bulk BPS pricing - * - * Bulk BPS pricing specifies BPS parameters in a tiered manner, dependent on the - * total quantity across all events. Similar to bulk pricing, the BPS parameters of - * a given event depends on the tier range that the billing period falls into. Each - * tier range is defined by an upper bound. For example, after $1.5M of payment - * volume is reached, each individual payment may have a lower cap or a smaller - * take-rate. - * - * ```json - * ... - * "model_type": "bulk_bps", - * "bulk_bps_config": { - * "tiers": [ - * { - * "maximum_amount": "1000000.00", - * "bps": 125, - * "per_unit_maximum": "19.00" - * }, - * { - * "maximum_amount": null, - * "bps": 115, - * "per_unit_maximum": "4.00" - * } - * ] - * } - * ... - * } - * ``` - * - * ## Tiered BPS pricing - * - * Tiered BPS pricing specifies BPS parameters in a graduated manner, where an - * event's applicable parameter is a function of its marginal addition to the - * period total. Similar to tiered pricing, the BPS parameters of a given event - * depends on the tier range that it falls into, where each tier range is defined - * by an upper and lower bound. For example, the first few payments may have a 0.8 - * BPS take-rate and all payments after a specific volume may incur a take-rate of - * 0.5 BPS each. - * - * ```json - * ... - * "model_type": "tiered_bps", - * "tiered_bps_config": { - * "tiers": [ - * { - * "minimum_amount": "0", - * "maximum_amount": "1000000.00", - * "bps": 125, - * "per_unit_maximum": "19.00" - * }, - * { - * "minimum_amount": "1000000.00", - * "maximum_amount": null, - * "bps": 115, - * "per_unit_maximum": "4.00" - * } - * ] - * } - * ... - * } - * ``` - * - * ## Matrix pricing - * - * Matrix pricing defines a set of unit prices in a one or two-dimensional matrix. - * `dimensions` defines the two event property values evaluated in this pricing - * model. In a one-dimensional matrix, the second value is `null`. Every - * configuration has a list of `matrix_values` which give the unit prices for - * specified property values. In a one-dimensional matrix, the matrix values will - * have `dimension_values` where the second value of the pair is null. If an event - * does not match any of the dimension values in the matrix, it will resort to the - * `default_unit_amount`. - * - * ```json - * { - * "model_type": "matrix" - * "matrix_config": { - * "default_unit_amount": "3.00", - * "dimensions": [ - * "cluster_name", - * "region" - * ], - * "matrix_values": [ - * { - * "dimension_values": [ - * "alpha", - * "west" - * ], - * "unit_amount": "2.00" - * }, - * ... - * ] - * } - * } - * ``` - * - * ## Fixed fees - * - * Fixed fees are prices that are applied independent of usage quantities, and - * follow unit pricing. They also have an additional parameter - * `fixed_price_quantity`. If the Price represents a fixed cost, this represents - * the quantity of units applied. - * - * ```json - * { - * ... - * "id": "price_id", - * "model_type": "unit", - * "unit_config": { - * "unit_amount": "2.00" - * }, - * "fixed_price_quantity": 3.0 - * ... - * } - * ``` + * For more on the types of prices, see + * [the core concepts documentation](/core-concepts#plan-and-price) */ price: PricesAPI.Price; @@ -2038,7 +1820,7 @@ export interface SubscriptionCreateResponse { * it's often desirable to have these match existing identifiers in your system. To * avoid having to denormalize Orb ID information, you can pass in an * `external_customer_id` with your own identifier. See - * [Customer ID Aliases](../guides/events-and-metrics/customer-aliases) for further + * [Customer ID Aliases](/events-and-metrics/customer-aliases) for further * information about how these aliases work in Orb. * * In addition to having an identifier in your system, a customer may exist in a @@ -2047,9 +1829,8 @@ export interface SubscriptionCreateResponse { * * A customer also has a timezone (from the standard * [IANA timezone database](https://www.iana.org/time-zones)), which defaults to - * your account's timezone. See - * [Timezone localization](../guides/product-catalog/timezones.md) for information - * on what this timezone parameter influences within Orb. + * your account's timezone. See [Timezone localization](/essentials/timezones) for + * information on what this timezone parameter influences within Orb. */ customer: CustomersAPI.Customer; @@ -2104,9 +1885,9 @@ export interface SubscriptionCreateResponse { net_terms: number; /** - * The [Plan](../guides/core-concepts.mdx#plan-and-price) resource represents a - * plan that can be subscribed to by a customer. Plans define the billing behavior - * of the subscription. You can see more about how to configure prices in the + * The [Plan](/core-concepts#plan-and-price) resource represents a plan that can be + * subscribed to by a customer. Plans define the billing behavior of the + * subscription. You can see more about how to configure prices in the * [Price resource](/reference/price). */ plan: PlansAPI.Plan; @@ -2553,229 +2334,8 @@ export namespace SubscriptionCreateResponse { * is serialized differently in a given Price object. The model_type field * determines the key for the configuration object that is present. * - * ## Unit pricing - * - * With unit pricing, each unit costs a fixed amount. - * - * ```json - * { - * ... - * "model_type": "unit", - * "unit_config": { - * "unit_amount": "0.50" - * } - * ... - * } - * ``` - * - * ## Tiered pricing - * - * In tiered pricing, the cost of a given unit depends on the tier range that it - * falls into, where each tier range is defined by an upper and lower bound. For - * example, the first ten units may cost $0.50 each and all units thereafter may - * cost $0.10 each. - * - * ```json - * { - * ... - * "model_type": "tiered", - * "tiered_config": { - * "tiers": [ - * { - * "first_unit": 1, - * "last_unit": 10, - * "unit_amount": "0.50" - * }, - * { - * "first_unit": 11, - * "last_unit": null, - * "unit_amount": "0.10" - * } - * ] - * } - * ... - * ``` - * - * ## Bulk pricing - * - * Bulk pricing applies when the number of units determine the cost of all units. - * For example, if you've bought less than 10 units, they may each be $0.50 for a - * total of $5.00. Once you've bought more than 10 units, all units may now be - * priced at $0.40 (i.e. 101 units total would be $40.40). - * - * ```json - * { - * ... - * "model_type": "bulk", - * "bulk_config": { - * "tiers": [ - * { - * "maximum_units": 10, - * "unit_amount": "0.50" - * }, - * { - * "maximum_units": 1000, - * "unit_amount": "0.40" - * } - * ] - * } - * ... - * } - * ``` - * - * ## Package pricing - * - * Package pricing defines the size or granularity of a unit for billing purposes. - * For example, if the package size is set to 5, then 4 units will be billed as 5 - * and 6 units will be billed at 10. - * - * ```json - * { - * ... - * "model_type": "package", - * "package_config": { - * "package_amount": "0.80", - * "package_size": 10 - * } - * ... - * } - * ``` - * - * ## BPS pricing - * - * BPS pricing specifies a per-event (e.g. per-payment) rate in one hundredth of a - * percent (the number of basis points to charge), as well as a cap per event to - * assess. For example, this would allow you to assess a fee of 0.25% on every - * payment you process, with a maximum charge of $25 per payment. - * - * ```json - * { - * ... - * "model_type": "bps", - * "bps_config": { - * "bps": 125, - * "per_unit_maximum": "11.00" - * } - * ... - * } - * ``` - * - * ## Bulk BPS pricing - * - * Bulk BPS pricing specifies BPS parameters in a tiered manner, dependent on the - * total quantity across all events. Similar to bulk pricing, the BPS parameters of - * a given event depends on the tier range that the billing period falls into. Each - * tier range is defined by an upper bound. For example, after $1.5M of payment - * volume is reached, each individual payment may have a lower cap or a smaller - * take-rate. - * - * ```json - * ... - * "model_type": "bulk_bps", - * "bulk_bps_config": { - * "tiers": [ - * { - * "maximum_amount": "1000000.00", - * "bps": 125, - * "per_unit_maximum": "19.00" - * }, - * { - * "maximum_amount": null, - * "bps": 115, - * "per_unit_maximum": "4.00" - * } - * ] - * } - * ... - * } - * ``` - * - * ## Tiered BPS pricing - * - * Tiered BPS pricing specifies BPS parameters in a graduated manner, where an - * event's applicable parameter is a function of its marginal addition to the - * period total. Similar to tiered pricing, the BPS parameters of a given event - * depends on the tier range that it falls into, where each tier range is defined - * by an upper and lower bound. For example, the first few payments may have a 0.8 - * BPS take-rate and all payments after a specific volume may incur a take-rate of - * 0.5 BPS each. - * - * ```json - * ... - * "model_type": "tiered_bps", - * "tiered_bps_config": { - * "tiers": [ - * { - * "minimum_amount": "0", - * "maximum_amount": "1000000.00", - * "bps": 125, - * "per_unit_maximum": "19.00" - * }, - * { - * "minimum_amount": "1000000.00", - * "maximum_amount": null, - * "bps": 115, - * "per_unit_maximum": "4.00" - * } - * ] - * } - * ... - * } - * ``` - * - * ## Matrix pricing - * - * Matrix pricing defines a set of unit prices in a one or two-dimensional matrix. - * `dimensions` defines the two event property values evaluated in this pricing - * model. In a one-dimensional matrix, the second value is `null`. Every - * configuration has a list of `matrix_values` which give the unit prices for - * specified property values. In a one-dimensional matrix, the matrix values will - * have `dimension_values` where the second value of the pair is null. If an event - * does not match any of the dimension values in the matrix, it will resort to the - * `default_unit_amount`. - * - * ```json - * { - * "model_type": "matrix" - * "matrix_config": { - * "default_unit_amount": "3.00", - * "dimensions": [ - * "cluster_name", - * "region" - * ], - * "matrix_values": [ - * { - * "dimension_values": [ - * "alpha", - * "west" - * ], - * "unit_amount": "2.00" - * }, - * ... - * ] - * } - * } - * ``` - * - * ## Fixed fees - * - * Fixed fees are prices that are applied independent of usage quantities, and - * follow unit pricing. They also have an additional parameter - * `fixed_price_quantity`. If the Price represents a fixed cost, this represents - * the quantity of units applied. - * - * ```json - * { - * ... - * "id": "price_id", - * "model_type": "unit", - * "unit_config": { - * "unit_amount": "2.00" - * }, - * "fixed_price_quantity": 3.0 - * ... - * } - * ``` + * For more on the types of prices, see + * [the core concepts documentation](/core-concepts#plan-and-price) */ price: PricesAPI.Price; @@ -2864,7 +2424,7 @@ export interface SubscriptionCancelResponse { * it's often desirable to have these match existing identifiers in your system. To * avoid having to denormalize Orb ID information, you can pass in an * `external_customer_id` with your own identifier. See - * [Customer ID Aliases](../guides/events-and-metrics/customer-aliases) for further + * [Customer ID Aliases](/events-and-metrics/customer-aliases) for further * information about how these aliases work in Orb. * * In addition to having an identifier in your system, a customer may exist in a @@ -2873,9 +2433,8 @@ export interface SubscriptionCancelResponse { * * A customer also has a timezone (from the standard * [IANA timezone database](https://www.iana.org/time-zones)), which defaults to - * your account's timezone. See - * [Timezone localization](../guides/product-catalog/timezones.md) for information - * on what this timezone parameter influences within Orb. + * your account's timezone. See [Timezone localization](/essentials/timezones) for + * information on what this timezone parameter influences within Orb. */ customer: CustomersAPI.Customer; @@ -2930,9 +2489,9 @@ export interface SubscriptionCancelResponse { net_terms: number; /** - * The [Plan](../guides/core-concepts.mdx#plan-and-price) resource represents a - * plan that can be subscribed to by a customer. Plans define the billing behavior - * of the subscription. You can see more about how to configure prices in the + * The [Plan](/core-concepts#plan-and-price) resource represents a plan that can be + * subscribed to by a customer. Plans define the billing behavior of the + * subscription. You can see more about how to configure prices in the * [Price resource](/reference/price). */ plan: PlansAPI.Plan; @@ -3379,229 +2938,8 @@ export namespace SubscriptionCancelResponse { * is serialized differently in a given Price object. The model_type field * determines the key for the configuration object that is present. * - * ## Unit pricing - * - * With unit pricing, each unit costs a fixed amount. - * - * ```json - * { - * ... - * "model_type": "unit", - * "unit_config": { - * "unit_amount": "0.50" - * } - * ... - * } - * ``` - * - * ## Tiered pricing - * - * In tiered pricing, the cost of a given unit depends on the tier range that it - * falls into, where each tier range is defined by an upper and lower bound. For - * example, the first ten units may cost $0.50 each and all units thereafter may - * cost $0.10 each. - * - * ```json - * { - * ... - * "model_type": "tiered", - * "tiered_config": { - * "tiers": [ - * { - * "first_unit": 1, - * "last_unit": 10, - * "unit_amount": "0.50" - * }, - * { - * "first_unit": 11, - * "last_unit": null, - * "unit_amount": "0.10" - * } - * ] - * } - * ... - * ``` - * - * ## Bulk pricing - * - * Bulk pricing applies when the number of units determine the cost of all units. - * For example, if you've bought less than 10 units, they may each be $0.50 for a - * total of $5.00. Once you've bought more than 10 units, all units may now be - * priced at $0.40 (i.e. 101 units total would be $40.40). - * - * ```json - * { - * ... - * "model_type": "bulk", - * "bulk_config": { - * "tiers": [ - * { - * "maximum_units": 10, - * "unit_amount": "0.50" - * }, - * { - * "maximum_units": 1000, - * "unit_amount": "0.40" - * } - * ] - * } - * ... - * } - * ``` - * - * ## Package pricing - * - * Package pricing defines the size or granularity of a unit for billing purposes. - * For example, if the package size is set to 5, then 4 units will be billed as 5 - * and 6 units will be billed at 10. - * - * ```json - * { - * ... - * "model_type": "package", - * "package_config": { - * "package_amount": "0.80", - * "package_size": 10 - * } - * ... - * } - * ``` - * - * ## BPS pricing - * - * BPS pricing specifies a per-event (e.g. per-payment) rate in one hundredth of a - * percent (the number of basis points to charge), as well as a cap per event to - * assess. For example, this would allow you to assess a fee of 0.25% on every - * payment you process, with a maximum charge of $25 per payment. - * - * ```json - * { - * ... - * "model_type": "bps", - * "bps_config": { - * "bps": 125, - * "per_unit_maximum": "11.00" - * } - * ... - * } - * ``` - * - * ## Bulk BPS pricing - * - * Bulk BPS pricing specifies BPS parameters in a tiered manner, dependent on the - * total quantity across all events. Similar to bulk pricing, the BPS parameters of - * a given event depends on the tier range that the billing period falls into. Each - * tier range is defined by an upper bound. For example, after $1.5M of payment - * volume is reached, each individual payment may have a lower cap or a smaller - * take-rate. - * - * ```json - * ... - * "model_type": "bulk_bps", - * "bulk_bps_config": { - * "tiers": [ - * { - * "maximum_amount": "1000000.00", - * "bps": 125, - * "per_unit_maximum": "19.00" - * }, - * { - * "maximum_amount": null, - * "bps": 115, - * "per_unit_maximum": "4.00" - * } - * ] - * } - * ... - * } - * ``` - * - * ## Tiered BPS pricing - * - * Tiered BPS pricing specifies BPS parameters in a graduated manner, where an - * event's applicable parameter is a function of its marginal addition to the - * period total. Similar to tiered pricing, the BPS parameters of a given event - * depends on the tier range that it falls into, where each tier range is defined - * by an upper and lower bound. For example, the first few payments may have a 0.8 - * BPS take-rate and all payments after a specific volume may incur a take-rate of - * 0.5 BPS each. - * - * ```json - * ... - * "model_type": "tiered_bps", - * "tiered_bps_config": { - * "tiers": [ - * { - * "minimum_amount": "0", - * "maximum_amount": "1000000.00", - * "bps": 125, - * "per_unit_maximum": "19.00" - * }, - * { - * "minimum_amount": "1000000.00", - * "maximum_amount": null, - * "bps": 115, - * "per_unit_maximum": "4.00" - * } - * ] - * } - * ... - * } - * ``` - * - * ## Matrix pricing - * - * Matrix pricing defines a set of unit prices in a one or two-dimensional matrix. - * `dimensions` defines the two event property values evaluated in this pricing - * model. In a one-dimensional matrix, the second value is `null`. Every - * configuration has a list of `matrix_values` which give the unit prices for - * specified property values. In a one-dimensional matrix, the matrix values will - * have `dimension_values` where the second value of the pair is null. If an event - * does not match any of the dimension values in the matrix, it will resort to the - * `default_unit_amount`. - * - * ```json - * { - * "model_type": "matrix" - * "matrix_config": { - * "default_unit_amount": "3.00", - * "dimensions": [ - * "cluster_name", - * "region" - * ], - * "matrix_values": [ - * { - * "dimension_values": [ - * "alpha", - * "west" - * ], - * "unit_amount": "2.00" - * }, - * ... - * ] - * } - * } - * ``` - * - * ## Fixed fees - * - * Fixed fees are prices that are applied independent of usage quantities, and - * follow unit pricing. They also have an additional parameter - * `fixed_price_quantity`. If the Price represents a fixed cost, this represents - * the quantity of units applied. - * - * ```json - * { - * ... - * "id": "price_id", - * "model_type": "unit", - * "unit_config": { - * "unit_amount": "2.00" - * }, - * "fixed_price_quantity": 3.0 - * ... - * } - * ``` + * For more on the types of prices, see + * [the core concepts documentation](/core-concepts#plan-and-price) */ price: PricesAPI.Price; @@ -3669,229 +3007,8 @@ export namespace SubscriptionFetchCostsResponse { * is serialized differently in a given Price object. The model_type field * determines the key for the configuration object that is present. * - * ## Unit pricing - * - * With unit pricing, each unit costs a fixed amount. - * - * ```json - * { - * ... - * "model_type": "unit", - * "unit_config": { - * "unit_amount": "0.50" - * } - * ... - * } - * ``` - * - * ## Tiered pricing - * - * In tiered pricing, the cost of a given unit depends on the tier range that it - * falls into, where each tier range is defined by an upper and lower bound. For - * example, the first ten units may cost $0.50 each and all units thereafter may - * cost $0.10 each. - * - * ```json - * { - * ... - * "model_type": "tiered", - * "tiered_config": { - * "tiers": [ - * { - * "first_unit": 1, - * "last_unit": 10, - * "unit_amount": "0.50" - * }, - * { - * "first_unit": 11, - * "last_unit": null, - * "unit_amount": "0.10" - * } - * ] - * } - * ... - * ``` - * - * ## Bulk pricing - * - * Bulk pricing applies when the number of units determine the cost of all units. - * For example, if you've bought less than 10 units, they may each be $0.50 for a - * total of $5.00. Once you've bought more than 10 units, all units may now be - * priced at $0.40 (i.e. 101 units total would be $40.40). - * - * ```json - * { - * ... - * "model_type": "bulk", - * "bulk_config": { - * "tiers": [ - * { - * "maximum_units": 10, - * "unit_amount": "0.50" - * }, - * { - * "maximum_units": 1000, - * "unit_amount": "0.40" - * } - * ] - * } - * ... - * } - * ``` - * - * ## Package pricing - * - * Package pricing defines the size or granularity of a unit for billing purposes. - * For example, if the package size is set to 5, then 4 units will be billed as 5 - * and 6 units will be billed at 10. - * - * ```json - * { - * ... - * "model_type": "package", - * "package_config": { - * "package_amount": "0.80", - * "package_size": 10 - * } - * ... - * } - * ``` - * - * ## BPS pricing - * - * BPS pricing specifies a per-event (e.g. per-payment) rate in one hundredth of a - * percent (the number of basis points to charge), as well as a cap per event to - * assess. For example, this would allow you to assess a fee of 0.25% on every - * payment you process, with a maximum charge of $25 per payment. - * - * ```json - * { - * ... - * "model_type": "bps", - * "bps_config": { - * "bps": 125, - * "per_unit_maximum": "11.00" - * } - * ... - * } - * ``` - * - * ## Bulk BPS pricing - * - * Bulk BPS pricing specifies BPS parameters in a tiered manner, dependent on the - * total quantity across all events. Similar to bulk pricing, the BPS parameters of - * a given event depends on the tier range that the billing period falls into. Each - * tier range is defined by an upper bound. For example, after $1.5M of payment - * volume is reached, each individual payment may have a lower cap or a smaller - * take-rate. - * - * ```json - * ... - * "model_type": "bulk_bps", - * "bulk_bps_config": { - * "tiers": [ - * { - * "maximum_amount": "1000000.00", - * "bps": 125, - * "per_unit_maximum": "19.00" - * }, - * { - * "maximum_amount": null, - * "bps": 115, - * "per_unit_maximum": "4.00" - * } - * ] - * } - * ... - * } - * ``` - * - * ## Tiered BPS pricing - * - * Tiered BPS pricing specifies BPS parameters in a graduated manner, where an - * event's applicable parameter is a function of its marginal addition to the - * period total. Similar to tiered pricing, the BPS parameters of a given event - * depends on the tier range that it falls into, where each tier range is defined - * by an upper and lower bound. For example, the first few payments may have a 0.8 - * BPS take-rate and all payments after a specific volume may incur a take-rate of - * 0.5 BPS each. - * - * ```json - * ... - * "model_type": "tiered_bps", - * "tiered_bps_config": { - * "tiers": [ - * { - * "minimum_amount": "0", - * "maximum_amount": "1000000.00", - * "bps": 125, - * "per_unit_maximum": "19.00" - * }, - * { - * "minimum_amount": "1000000.00", - * "maximum_amount": null, - * "bps": 115, - * "per_unit_maximum": "4.00" - * } - * ] - * } - * ... - * } - * ``` - * - * ## Matrix pricing - * - * Matrix pricing defines a set of unit prices in a one or two-dimensional matrix. - * `dimensions` defines the two event property values evaluated in this pricing - * model. In a one-dimensional matrix, the second value is `null`. Every - * configuration has a list of `matrix_values` which give the unit prices for - * specified property values. In a one-dimensional matrix, the matrix values will - * have `dimension_values` where the second value of the pair is null. If an event - * does not match any of the dimension values in the matrix, it will resort to the - * `default_unit_amount`. - * - * ```json - * { - * "model_type": "matrix" - * "matrix_config": { - * "default_unit_amount": "3.00", - * "dimensions": [ - * "cluster_name", - * "region" - * ], - * "matrix_values": [ - * { - * "dimension_values": [ - * "alpha", - * "west" - * ], - * "unit_amount": "2.00" - * }, - * ... - * ] - * } - * } - * ``` - * - * ## Fixed fees - * - * Fixed fees are prices that are applied independent of usage quantities, and - * follow unit pricing. They also have an additional parameter - * `fixed_price_quantity`. If the Price represents a fixed cost, this represents - * the quantity of units applied. - * - * ```json - * { - * ... - * "id": "price_id", - * "model_type": "unit", - * "unit_config": { - * "unit_amount": "2.00" - * }, - * "fixed_price_quantity": 3.0 - * ... - * } - * ``` + * For more on the types of prices, see + * [the core concepts documentation](/core-concepts#plan-and-price) */ price: PricesAPI.Price; @@ -3993,7 +3110,7 @@ export interface SubscriptionPriceIntervalsResponse { * it's often desirable to have these match existing identifiers in your system. To * avoid having to denormalize Orb ID information, you can pass in an * `external_customer_id` with your own identifier. See - * [Customer ID Aliases](../guides/events-and-metrics/customer-aliases) for further + * [Customer ID Aliases](/events-and-metrics/customer-aliases) for further * information about how these aliases work in Orb. * * In addition to having an identifier in your system, a customer may exist in a @@ -4002,9 +3119,8 @@ export interface SubscriptionPriceIntervalsResponse { * * A customer also has a timezone (from the standard * [IANA timezone database](https://www.iana.org/time-zones)), which defaults to - * your account's timezone. See - * [Timezone localization](../guides/product-catalog/timezones.md) for information - * on what this timezone parameter influences within Orb. + * your account's timezone. See [Timezone localization](/essentials/timezones) for + * information on what this timezone parameter influences within Orb. */ customer: CustomersAPI.Customer; @@ -4059,9 +3175,9 @@ export interface SubscriptionPriceIntervalsResponse { net_terms: number; /** - * The [Plan](../guides/core-concepts.mdx#plan-and-price) resource represents a - * plan that can be subscribed to by a customer. Plans define the billing behavior - * of the subscription. You can see more about how to configure prices in the + * The [Plan](/core-concepts#plan-and-price) resource represents a plan that can be + * subscribed to by a customer. Plans define the billing behavior of the + * subscription. You can see more about how to configure prices in the * [Price resource](/reference/price). */ plan: PlansAPI.Plan; @@ -4508,229 +3624,8 @@ export namespace SubscriptionPriceIntervalsResponse { * is serialized differently in a given Price object. The model_type field * determines the key for the configuration object that is present. * - * ## Unit pricing - * - * With unit pricing, each unit costs a fixed amount. - * - * ```json - * { - * ... - * "model_type": "unit", - * "unit_config": { - * "unit_amount": "0.50" - * } - * ... - * } - * ``` - * - * ## Tiered pricing - * - * In tiered pricing, the cost of a given unit depends on the tier range that it - * falls into, where each tier range is defined by an upper and lower bound. For - * example, the first ten units may cost $0.50 each and all units thereafter may - * cost $0.10 each. - * - * ```json - * { - * ... - * "model_type": "tiered", - * "tiered_config": { - * "tiers": [ - * { - * "first_unit": 1, - * "last_unit": 10, - * "unit_amount": "0.50" - * }, - * { - * "first_unit": 11, - * "last_unit": null, - * "unit_amount": "0.10" - * } - * ] - * } - * ... - * ``` - * - * ## Bulk pricing - * - * Bulk pricing applies when the number of units determine the cost of all units. - * For example, if you've bought less than 10 units, they may each be $0.50 for a - * total of $5.00. Once you've bought more than 10 units, all units may now be - * priced at $0.40 (i.e. 101 units total would be $40.40). - * - * ```json - * { - * ... - * "model_type": "bulk", - * "bulk_config": { - * "tiers": [ - * { - * "maximum_units": 10, - * "unit_amount": "0.50" - * }, - * { - * "maximum_units": 1000, - * "unit_amount": "0.40" - * } - * ] - * } - * ... - * } - * ``` - * - * ## Package pricing - * - * Package pricing defines the size or granularity of a unit for billing purposes. - * For example, if the package size is set to 5, then 4 units will be billed as 5 - * and 6 units will be billed at 10. - * - * ```json - * { - * ... - * "model_type": "package", - * "package_config": { - * "package_amount": "0.80", - * "package_size": 10 - * } - * ... - * } - * ``` - * - * ## BPS pricing - * - * BPS pricing specifies a per-event (e.g. per-payment) rate in one hundredth of a - * percent (the number of basis points to charge), as well as a cap per event to - * assess. For example, this would allow you to assess a fee of 0.25% on every - * payment you process, with a maximum charge of $25 per payment. - * - * ```json - * { - * ... - * "model_type": "bps", - * "bps_config": { - * "bps": 125, - * "per_unit_maximum": "11.00" - * } - * ... - * } - * ``` - * - * ## Bulk BPS pricing - * - * Bulk BPS pricing specifies BPS parameters in a tiered manner, dependent on the - * total quantity across all events. Similar to bulk pricing, the BPS parameters of - * a given event depends on the tier range that the billing period falls into. Each - * tier range is defined by an upper bound. For example, after $1.5M of payment - * volume is reached, each individual payment may have a lower cap or a smaller - * take-rate. - * - * ```json - * ... - * "model_type": "bulk_bps", - * "bulk_bps_config": { - * "tiers": [ - * { - * "maximum_amount": "1000000.00", - * "bps": 125, - * "per_unit_maximum": "19.00" - * }, - * { - * "maximum_amount": null, - * "bps": 115, - * "per_unit_maximum": "4.00" - * } - * ] - * } - * ... - * } - * ``` - * - * ## Tiered BPS pricing - * - * Tiered BPS pricing specifies BPS parameters in a graduated manner, where an - * event's applicable parameter is a function of its marginal addition to the - * period total. Similar to tiered pricing, the BPS parameters of a given event - * depends on the tier range that it falls into, where each tier range is defined - * by an upper and lower bound. For example, the first few payments may have a 0.8 - * BPS take-rate and all payments after a specific volume may incur a take-rate of - * 0.5 BPS each. - * - * ```json - * ... - * "model_type": "tiered_bps", - * "tiered_bps_config": { - * "tiers": [ - * { - * "minimum_amount": "0", - * "maximum_amount": "1000000.00", - * "bps": 125, - * "per_unit_maximum": "19.00" - * }, - * { - * "minimum_amount": "1000000.00", - * "maximum_amount": null, - * "bps": 115, - * "per_unit_maximum": "4.00" - * } - * ] - * } - * ... - * } - * ``` - * - * ## Matrix pricing - * - * Matrix pricing defines a set of unit prices in a one or two-dimensional matrix. - * `dimensions` defines the two event property values evaluated in this pricing - * model. In a one-dimensional matrix, the second value is `null`. Every - * configuration has a list of `matrix_values` which give the unit prices for - * specified property values. In a one-dimensional matrix, the matrix values will - * have `dimension_values` where the second value of the pair is null. If an event - * does not match any of the dimension values in the matrix, it will resort to the - * `default_unit_amount`. - * - * ```json - * { - * "model_type": "matrix" - * "matrix_config": { - * "default_unit_amount": "3.00", - * "dimensions": [ - * "cluster_name", - * "region" - * ], - * "matrix_values": [ - * { - * "dimension_values": [ - * "alpha", - * "west" - * ], - * "unit_amount": "2.00" - * }, - * ... - * ] - * } - * } - * ``` - * - * ## Fixed fees - * - * Fixed fees are prices that are applied independent of usage quantities, and - * follow unit pricing. They also have an additional parameter - * `fixed_price_quantity`. If the Price represents a fixed cost, this represents - * the quantity of units applied. - * - * ```json - * { - * ... - * "id": "price_id", - * "model_type": "unit", - * "unit_config": { - * "unit_amount": "2.00" - * }, - * "fixed_price_quantity": 3.0 - * ... - * } - * ``` + * For more on the types of prices, see + * [the core concepts documentation](/core-concepts#plan-and-price) */ price: PricesAPI.Price; @@ -4819,7 +3714,7 @@ export interface SubscriptionSchedulePlanChangeResponse { * it's often desirable to have these match existing identifiers in your system. To * avoid having to denormalize Orb ID information, you can pass in an * `external_customer_id` with your own identifier. See - * [Customer ID Aliases](../guides/events-and-metrics/customer-aliases) for further + * [Customer ID Aliases](/events-and-metrics/customer-aliases) for further * information about how these aliases work in Orb. * * In addition to having an identifier in your system, a customer may exist in a @@ -4828,9 +3723,8 @@ export interface SubscriptionSchedulePlanChangeResponse { * * A customer also has a timezone (from the standard * [IANA timezone database](https://www.iana.org/time-zones)), which defaults to - * your account's timezone. See - * [Timezone localization](../guides/product-catalog/timezones.md) for information - * on what this timezone parameter influences within Orb. + * your account's timezone. See [Timezone localization](/essentials/timezones) for + * information on what this timezone parameter influences within Orb. */ customer: CustomersAPI.Customer; @@ -4885,9 +3779,9 @@ export interface SubscriptionSchedulePlanChangeResponse { net_terms: number; /** - * The [Plan](../guides/core-concepts.mdx#plan-and-price) resource represents a - * plan that can be subscribed to by a customer. Plans define the billing behavior - * of the subscription. You can see more about how to configure prices in the + * The [Plan](/core-concepts#plan-and-price) resource represents a plan that can be + * subscribed to by a customer. Plans define the billing behavior of the + * subscription. You can see more about how to configure prices in the * [Price resource](/reference/price). */ plan: PlansAPI.Plan; @@ -5334,229 +4228,8 @@ export namespace SubscriptionSchedulePlanChangeResponse { * is serialized differently in a given Price object. The model_type field * determines the key for the configuration object that is present. * - * ## Unit pricing - * - * With unit pricing, each unit costs a fixed amount. - * - * ```json - * { - * ... - * "model_type": "unit", - * "unit_config": { - * "unit_amount": "0.50" - * } - * ... - * } - * ``` - * - * ## Tiered pricing - * - * In tiered pricing, the cost of a given unit depends on the tier range that it - * falls into, where each tier range is defined by an upper and lower bound. For - * example, the first ten units may cost $0.50 each and all units thereafter may - * cost $0.10 each. - * - * ```json - * { - * ... - * "model_type": "tiered", - * "tiered_config": { - * "tiers": [ - * { - * "first_unit": 1, - * "last_unit": 10, - * "unit_amount": "0.50" - * }, - * { - * "first_unit": 11, - * "last_unit": null, - * "unit_amount": "0.10" - * } - * ] - * } - * ... - * ``` - * - * ## Bulk pricing - * - * Bulk pricing applies when the number of units determine the cost of all units. - * For example, if you've bought less than 10 units, they may each be $0.50 for a - * total of $5.00. Once you've bought more than 10 units, all units may now be - * priced at $0.40 (i.e. 101 units total would be $40.40). - * - * ```json - * { - * ... - * "model_type": "bulk", - * "bulk_config": { - * "tiers": [ - * { - * "maximum_units": 10, - * "unit_amount": "0.50" - * }, - * { - * "maximum_units": 1000, - * "unit_amount": "0.40" - * } - * ] - * } - * ... - * } - * ``` - * - * ## Package pricing - * - * Package pricing defines the size or granularity of a unit for billing purposes. - * For example, if the package size is set to 5, then 4 units will be billed as 5 - * and 6 units will be billed at 10. - * - * ```json - * { - * ... - * "model_type": "package", - * "package_config": { - * "package_amount": "0.80", - * "package_size": 10 - * } - * ... - * } - * ``` - * - * ## BPS pricing - * - * BPS pricing specifies a per-event (e.g. per-payment) rate in one hundredth of a - * percent (the number of basis points to charge), as well as a cap per event to - * assess. For example, this would allow you to assess a fee of 0.25% on every - * payment you process, with a maximum charge of $25 per payment. - * - * ```json - * { - * ... - * "model_type": "bps", - * "bps_config": { - * "bps": 125, - * "per_unit_maximum": "11.00" - * } - * ... - * } - * ``` - * - * ## Bulk BPS pricing - * - * Bulk BPS pricing specifies BPS parameters in a tiered manner, dependent on the - * total quantity across all events. Similar to bulk pricing, the BPS parameters of - * a given event depends on the tier range that the billing period falls into. Each - * tier range is defined by an upper bound. For example, after $1.5M of payment - * volume is reached, each individual payment may have a lower cap or a smaller - * take-rate. - * - * ```json - * ... - * "model_type": "bulk_bps", - * "bulk_bps_config": { - * "tiers": [ - * { - * "maximum_amount": "1000000.00", - * "bps": 125, - * "per_unit_maximum": "19.00" - * }, - * { - * "maximum_amount": null, - * "bps": 115, - * "per_unit_maximum": "4.00" - * } - * ] - * } - * ... - * } - * ``` - * - * ## Tiered BPS pricing - * - * Tiered BPS pricing specifies BPS parameters in a graduated manner, where an - * event's applicable parameter is a function of its marginal addition to the - * period total. Similar to tiered pricing, the BPS parameters of a given event - * depends on the tier range that it falls into, where each tier range is defined - * by an upper and lower bound. For example, the first few payments may have a 0.8 - * BPS take-rate and all payments after a specific volume may incur a take-rate of - * 0.5 BPS each. - * - * ```json - * ... - * "model_type": "tiered_bps", - * "tiered_bps_config": { - * "tiers": [ - * { - * "minimum_amount": "0", - * "maximum_amount": "1000000.00", - * "bps": 125, - * "per_unit_maximum": "19.00" - * }, - * { - * "minimum_amount": "1000000.00", - * "maximum_amount": null, - * "bps": 115, - * "per_unit_maximum": "4.00" - * } - * ] - * } - * ... - * } - * ``` - * - * ## Matrix pricing - * - * Matrix pricing defines a set of unit prices in a one or two-dimensional matrix. - * `dimensions` defines the two event property values evaluated in this pricing - * model. In a one-dimensional matrix, the second value is `null`. Every - * configuration has a list of `matrix_values` which give the unit prices for - * specified property values. In a one-dimensional matrix, the matrix values will - * have `dimension_values` where the second value of the pair is null. If an event - * does not match any of the dimension values in the matrix, it will resort to the - * `default_unit_amount`. - * - * ```json - * { - * "model_type": "matrix" - * "matrix_config": { - * "default_unit_amount": "3.00", - * "dimensions": [ - * "cluster_name", - * "region" - * ], - * "matrix_values": [ - * { - * "dimension_values": [ - * "alpha", - * "west" - * ], - * "unit_amount": "2.00" - * }, - * ... - * ] - * } - * } - * ``` - * - * ## Fixed fees - * - * Fixed fees are prices that are applied independent of usage quantities, and - * follow unit pricing. They also have an additional parameter - * `fixed_price_quantity`. If the Price represents a fixed cost, this represents - * the quantity of units applied. - * - * ```json - * { - * ... - * "id": "price_id", - * "model_type": "unit", - * "unit_config": { - * "unit_amount": "2.00" - * }, - * "fixed_price_quantity": 3.0 - * ... - * } - * ``` + * For more on the types of prices, see + * [the core concepts documentation](/core-concepts#plan-and-price) */ price: PricesAPI.Price; @@ -5645,7 +4318,7 @@ export interface SubscriptionTriggerPhaseResponse { * it's often desirable to have these match existing identifiers in your system. To * avoid having to denormalize Orb ID information, you can pass in an * `external_customer_id` with your own identifier. See - * [Customer ID Aliases](../guides/events-and-metrics/customer-aliases) for further + * [Customer ID Aliases](/events-and-metrics/customer-aliases) for further * information about how these aliases work in Orb. * * In addition to having an identifier in your system, a customer may exist in a @@ -5654,9 +4327,8 @@ export interface SubscriptionTriggerPhaseResponse { * * A customer also has a timezone (from the standard * [IANA timezone database](https://www.iana.org/time-zones)), which defaults to - * your account's timezone. See - * [Timezone localization](../guides/product-catalog/timezones.md) for information - * on what this timezone parameter influences within Orb. + * your account's timezone. See [Timezone localization](/essentials/timezones) for + * information on what this timezone parameter influences within Orb. */ customer: CustomersAPI.Customer; @@ -5711,9 +4383,9 @@ export interface SubscriptionTriggerPhaseResponse { net_terms: number; /** - * The [Plan](../guides/core-concepts.mdx#plan-and-price) resource represents a - * plan that can be subscribed to by a customer. Plans define the billing behavior - * of the subscription. You can see more about how to configure prices in the + * The [Plan](/core-concepts#plan-and-price) resource represents a plan that can be + * subscribed to by a customer. Plans define the billing behavior of the + * subscription. You can see more about how to configure prices in the * [Price resource](/reference/price). */ plan: PlansAPI.Plan; @@ -6160,229 +4832,8 @@ export namespace SubscriptionTriggerPhaseResponse { * is serialized differently in a given Price object. The model_type field * determines the key for the configuration object that is present. * - * ## Unit pricing - * - * With unit pricing, each unit costs a fixed amount. - * - * ```json - * { - * ... - * "model_type": "unit", - * "unit_config": { - * "unit_amount": "0.50" - * } - * ... - * } - * ``` - * - * ## Tiered pricing - * - * In tiered pricing, the cost of a given unit depends on the tier range that it - * falls into, where each tier range is defined by an upper and lower bound. For - * example, the first ten units may cost $0.50 each and all units thereafter may - * cost $0.10 each. - * - * ```json - * { - * ... - * "model_type": "tiered", - * "tiered_config": { - * "tiers": [ - * { - * "first_unit": 1, - * "last_unit": 10, - * "unit_amount": "0.50" - * }, - * { - * "first_unit": 11, - * "last_unit": null, - * "unit_amount": "0.10" - * } - * ] - * } - * ... - * ``` - * - * ## Bulk pricing - * - * Bulk pricing applies when the number of units determine the cost of all units. - * For example, if you've bought less than 10 units, they may each be $0.50 for a - * total of $5.00. Once you've bought more than 10 units, all units may now be - * priced at $0.40 (i.e. 101 units total would be $40.40). - * - * ```json - * { - * ... - * "model_type": "bulk", - * "bulk_config": { - * "tiers": [ - * { - * "maximum_units": 10, - * "unit_amount": "0.50" - * }, - * { - * "maximum_units": 1000, - * "unit_amount": "0.40" - * } - * ] - * } - * ... - * } - * ``` - * - * ## Package pricing - * - * Package pricing defines the size or granularity of a unit for billing purposes. - * For example, if the package size is set to 5, then 4 units will be billed as 5 - * and 6 units will be billed at 10. - * - * ```json - * { - * ... - * "model_type": "package", - * "package_config": { - * "package_amount": "0.80", - * "package_size": 10 - * } - * ... - * } - * ``` - * - * ## BPS pricing - * - * BPS pricing specifies a per-event (e.g. per-payment) rate in one hundredth of a - * percent (the number of basis points to charge), as well as a cap per event to - * assess. For example, this would allow you to assess a fee of 0.25% on every - * payment you process, with a maximum charge of $25 per payment. - * - * ```json - * { - * ... - * "model_type": "bps", - * "bps_config": { - * "bps": 125, - * "per_unit_maximum": "11.00" - * } - * ... - * } - * ``` - * - * ## Bulk BPS pricing - * - * Bulk BPS pricing specifies BPS parameters in a tiered manner, dependent on the - * total quantity across all events. Similar to bulk pricing, the BPS parameters of - * a given event depends on the tier range that the billing period falls into. Each - * tier range is defined by an upper bound. For example, after $1.5M of payment - * volume is reached, each individual payment may have a lower cap or a smaller - * take-rate. - * - * ```json - * ... - * "model_type": "bulk_bps", - * "bulk_bps_config": { - * "tiers": [ - * { - * "maximum_amount": "1000000.00", - * "bps": 125, - * "per_unit_maximum": "19.00" - * }, - * { - * "maximum_amount": null, - * "bps": 115, - * "per_unit_maximum": "4.00" - * } - * ] - * } - * ... - * } - * ``` - * - * ## Tiered BPS pricing - * - * Tiered BPS pricing specifies BPS parameters in a graduated manner, where an - * event's applicable parameter is a function of its marginal addition to the - * period total. Similar to tiered pricing, the BPS parameters of a given event - * depends on the tier range that it falls into, where each tier range is defined - * by an upper and lower bound. For example, the first few payments may have a 0.8 - * BPS take-rate and all payments after a specific volume may incur a take-rate of - * 0.5 BPS each. - * - * ```json - * ... - * "model_type": "tiered_bps", - * "tiered_bps_config": { - * "tiers": [ - * { - * "minimum_amount": "0", - * "maximum_amount": "1000000.00", - * "bps": 125, - * "per_unit_maximum": "19.00" - * }, - * { - * "minimum_amount": "1000000.00", - * "maximum_amount": null, - * "bps": 115, - * "per_unit_maximum": "4.00" - * } - * ] - * } - * ... - * } - * ``` - * - * ## Matrix pricing - * - * Matrix pricing defines a set of unit prices in a one or two-dimensional matrix. - * `dimensions` defines the two event property values evaluated in this pricing - * model. In a one-dimensional matrix, the second value is `null`. Every - * configuration has a list of `matrix_values` which give the unit prices for - * specified property values. In a one-dimensional matrix, the matrix values will - * have `dimension_values` where the second value of the pair is null. If an event - * does not match any of the dimension values in the matrix, it will resort to the - * `default_unit_amount`. - * - * ```json - * { - * "model_type": "matrix" - * "matrix_config": { - * "default_unit_amount": "3.00", - * "dimensions": [ - * "cluster_name", - * "region" - * ], - * "matrix_values": [ - * { - * "dimension_values": [ - * "alpha", - * "west" - * ], - * "unit_amount": "2.00" - * }, - * ... - * ] - * } - * } - * ``` - * - * ## Fixed fees - * - * Fixed fees are prices that are applied independent of usage quantities, and - * follow unit pricing. They also have an additional parameter - * `fixed_price_quantity`. If the Price represents a fixed cost, this represents - * the quantity of units applied. - * - * ```json - * { - * ... - * "id": "price_id", - * "model_type": "unit", - * "unit_config": { - * "unit_amount": "2.00" - * }, - * "fixed_price_quantity": 3.0 - * ... - * } - * ``` + * For more on the types of prices, see + * [the core concepts documentation](/core-concepts#plan-and-price) */ price: PricesAPI.Price; @@ -6471,7 +4922,7 @@ export interface SubscriptionUnscheduleCancellationResponse { * it's often desirable to have these match existing identifiers in your system. To * avoid having to denormalize Orb ID information, you can pass in an * `external_customer_id` with your own identifier. See - * [Customer ID Aliases](../guides/events-and-metrics/customer-aliases) for further + * [Customer ID Aliases](/events-and-metrics/customer-aliases) for further * information about how these aliases work in Orb. * * In addition to having an identifier in your system, a customer may exist in a @@ -6480,9 +4931,8 @@ export interface SubscriptionUnscheduleCancellationResponse { * * A customer also has a timezone (from the standard * [IANA timezone database](https://www.iana.org/time-zones)), which defaults to - * your account's timezone. See - * [Timezone localization](../guides/product-catalog/timezones.md) for information - * on what this timezone parameter influences within Orb. + * your account's timezone. See [Timezone localization](/essentials/timezones) for + * information on what this timezone parameter influences within Orb. */ customer: CustomersAPI.Customer; @@ -6537,9 +4987,9 @@ export interface SubscriptionUnscheduleCancellationResponse { net_terms: number; /** - * The [Plan](../guides/core-concepts.mdx#plan-and-price) resource represents a - * plan that can be subscribed to by a customer. Plans define the billing behavior - * of the subscription. You can see more about how to configure prices in the + * The [Plan](/core-concepts#plan-and-price) resource represents a plan that can be + * subscribed to by a customer. Plans define the billing behavior of the + * subscription. You can see more about how to configure prices in the * [Price resource](/reference/price). */ plan: PlansAPI.Plan; @@ -6986,229 +5436,8 @@ export namespace SubscriptionUnscheduleCancellationResponse { * is serialized differently in a given Price object. The model_type field * determines the key for the configuration object that is present. * - * ## Unit pricing - * - * With unit pricing, each unit costs a fixed amount. - * - * ```json - * { - * ... - * "model_type": "unit", - * "unit_config": { - * "unit_amount": "0.50" - * } - * ... - * } - * ``` - * - * ## Tiered pricing - * - * In tiered pricing, the cost of a given unit depends on the tier range that it - * falls into, where each tier range is defined by an upper and lower bound. For - * example, the first ten units may cost $0.50 each and all units thereafter may - * cost $0.10 each. - * - * ```json - * { - * ... - * "model_type": "tiered", - * "tiered_config": { - * "tiers": [ - * { - * "first_unit": 1, - * "last_unit": 10, - * "unit_amount": "0.50" - * }, - * { - * "first_unit": 11, - * "last_unit": null, - * "unit_amount": "0.10" - * } - * ] - * } - * ... - * ``` - * - * ## Bulk pricing - * - * Bulk pricing applies when the number of units determine the cost of all units. - * For example, if you've bought less than 10 units, they may each be $0.50 for a - * total of $5.00. Once you've bought more than 10 units, all units may now be - * priced at $0.40 (i.e. 101 units total would be $40.40). - * - * ```json - * { - * ... - * "model_type": "bulk", - * "bulk_config": { - * "tiers": [ - * { - * "maximum_units": 10, - * "unit_amount": "0.50" - * }, - * { - * "maximum_units": 1000, - * "unit_amount": "0.40" - * } - * ] - * } - * ... - * } - * ``` - * - * ## Package pricing - * - * Package pricing defines the size or granularity of a unit for billing purposes. - * For example, if the package size is set to 5, then 4 units will be billed as 5 - * and 6 units will be billed at 10. - * - * ```json - * { - * ... - * "model_type": "package", - * "package_config": { - * "package_amount": "0.80", - * "package_size": 10 - * } - * ... - * } - * ``` - * - * ## BPS pricing - * - * BPS pricing specifies a per-event (e.g. per-payment) rate in one hundredth of a - * percent (the number of basis points to charge), as well as a cap per event to - * assess. For example, this would allow you to assess a fee of 0.25% on every - * payment you process, with a maximum charge of $25 per payment. - * - * ```json - * { - * ... - * "model_type": "bps", - * "bps_config": { - * "bps": 125, - * "per_unit_maximum": "11.00" - * } - * ... - * } - * ``` - * - * ## Bulk BPS pricing - * - * Bulk BPS pricing specifies BPS parameters in a tiered manner, dependent on the - * total quantity across all events. Similar to bulk pricing, the BPS parameters of - * a given event depends on the tier range that the billing period falls into. Each - * tier range is defined by an upper bound. For example, after $1.5M of payment - * volume is reached, each individual payment may have a lower cap or a smaller - * take-rate. - * - * ```json - * ... - * "model_type": "bulk_bps", - * "bulk_bps_config": { - * "tiers": [ - * { - * "maximum_amount": "1000000.00", - * "bps": 125, - * "per_unit_maximum": "19.00" - * }, - * { - * "maximum_amount": null, - * "bps": 115, - * "per_unit_maximum": "4.00" - * } - * ] - * } - * ... - * } - * ``` - * - * ## Tiered BPS pricing - * - * Tiered BPS pricing specifies BPS parameters in a graduated manner, where an - * event's applicable parameter is a function of its marginal addition to the - * period total. Similar to tiered pricing, the BPS parameters of a given event - * depends on the tier range that it falls into, where each tier range is defined - * by an upper and lower bound. For example, the first few payments may have a 0.8 - * BPS take-rate and all payments after a specific volume may incur a take-rate of - * 0.5 BPS each. - * - * ```json - * ... - * "model_type": "tiered_bps", - * "tiered_bps_config": { - * "tiers": [ - * { - * "minimum_amount": "0", - * "maximum_amount": "1000000.00", - * "bps": 125, - * "per_unit_maximum": "19.00" - * }, - * { - * "minimum_amount": "1000000.00", - * "maximum_amount": null, - * "bps": 115, - * "per_unit_maximum": "4.00" - * } - * ] - * } - * ... - * } - * ``` - * - * ## Matrix pricing - * - * Matrix pricing defines a set of unit prices in a one or two-dimensional matrix. - * `dimensions` defines the two event property values evaluated in this pricing - * model. In a one-dimensional matrix, the second value is `null`. Every - * configuration has a list of `matrix_values` which give the unit prices for - * specified property values. In a one-dimensional matrix, the matrix values will - * have `dimension_values` where the second value of the pair is null. If an event - * does not match any of the dimension values in the matrix, it will resort to the - * `default_unit_amount`. - * - * ```json - * { - * "model_type": "matrix" - * "matrix_config": { - * "default_unit_amount": "3.00", - * "dimensions": [ - * "cluster_name", - * "region" - * ], - * "matrix_values": [ - * { - * "dimension_values": [ - * "alpha", - * "west" - * ], - * "unit_amount": "2.00" - * }, - * ... - * ] - * } - * } - * ``` - * - * ## Fixed fees - * - * Fixed fees are prices that are applied independent of usage quantities, and - * follow unit pricing. They also have an additional parameter - * `fixed_price_quantity`. If the Price represents a fixed cost, this represents - * the quantity of units applied. - * - * ```json - * { - * ... - * "id": "price_id", - * "model_type": "unit", - * "unit_config": { - * "unit_amount": "2.00" - * }, - * "fixed_price_quantity": 3.0 - * ... - * } - * ``` + * For more on the types of prices, see + * [the core concepts documentation](/core-concepts#plan-and-price) */ price: PricesAPI.Price; @@ -7297,7 +5526,7 @@ export interface SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse { * it's often desirable to have these match existing identifiers in your system. To * avoid having to denormalize Orb ID information, you can pass in an * `external_customer_id` with your own identifier. See - * [Customer ID Aliases](../guides/events-and-metrics/customer-aliases) for further + * [Customer ID Aliases](/events-and-metrics/customer-aliases) for further * information about how these aliases work in Orb. * * In addition to having an identifier in your system, a customer may exist in a @@ -7306,9 +5535,8 @@ export interface SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse { * * A customer also has a timezone (from the standard * [IANA timezone database](https://www.iana.org/time-zones)), which defaults to - * your account's timezone. See - * [Timezone localization](../guides/product-catalog/timezones.md) for information - * on what this timezone parameter influences within Orb. + * your account's timezone. See [Timezone localization](/essentials/timezones) for + * information on what this timezone parameter influences within Orb. */ customer: CustomersAPI.Customer; @@ -7363,9 +5591,9 @@ export interface SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse { net_terms: number; /** - * The [Plan](../guides/core-concepts.mdx#plan-and-price) resource represents a - * plan that can be subscribed to by a customer. Plans define the billing behavior - * of the subscription. You can see more about how to configure prices in the + * The [Plan](/core-concepts#plan-and-price) resource represents a plan that can be + * subscribed to by a customer. Plans define the billing behavior of the + * subscription. You can see more about how to configure prices in the * [Price resource](/reference/price). */ plan: PlansAPI.Plan; @@ -7812,229 +6040,8 @@ export namespace SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse { * is serialized differently in a given Price object. The model_type field * determines the key for the configuration object that is present. * - * ## Unit pricing - * - * With unit pricing, each unit costs a fixed amount. - * - * ```json - * { - * ... - * "model_type": "unit", - * "unit_config": { - * "unit_amount": "0.50" - * } - * ... - * } - * ``` - * - * ## Tiered pricing - * - * In tiered pricing, the cost of a given unit depends on the tier range that it - * falls into, where each tier range is defined by an upper and lower bound. For - * example, the first ten units may cost $0.50 each and all units thereafter may - * cost $0.10 each. - * - * ```json - * { - * ... - * "model_type": "tiered", - * "tiered_config": { - * "tiers": [ - * { - * "first_unit": 1, - * "last_unit": 10, - * "unit_amount": "0.50" - * }, - * { - * "first_unit": 11, - * "last_unit": null, - * "unit_amount": "0.10" - * } - * ] - * } - * ... - * ``` - * - * ## Bulk pricing - * - * Bulk pricing applies when the number of units determine the cost of all units. - * For example, if you've bought less than 10 units, they may each be $0.50 for a - * total of $5.00. Once you've bought more than 10 units, all units may now be - * priced at $0.40 (i.e. 101 units total would be $40.40). - * - * ```json - * { - * ... - * "model_type": "bulk", - * "bulk_config": { - * "tiers": [ - * { - * "maximum_units": 10, - * "unit_amount": "0.50" - * }, - * { - * "maximum_units": 1000, - * "unit_amount": "0.40" - * } - * ] - * } - * ... - * } - * ``` - * - * ## Package pricing - * - * Package pricing defines the size or granularity of a unit for billing purposes. - * For example, if the package size is set to 5, then 4 units will be billed as 5 - * and 6 units will be billed at 10. - * - * ```json - * { - * ... - * "model_type": "package", - * "package_config": { - * "package_amount": "0.80", - * "package_size": 10 - * } - * ... - * } - * ``` - * - * ## BPS pricing - * - * BPS pricing specifies a per-event (e.g. per-payment) rate in one hundredth of a - * percent (the number of basis points to charge), as well as a cap per event to - * assess. For example, this would allow you to assess a fee of 0.25% on every - * payment you process, with a maximum charge of $25 per payment. - * - * ```json - * { - * ... - * "model_type": "bps", - * "bps_config": { - * "bps": 125, - * "per_unit_maximum": "11.00" - * } - * ... - * } - * ``` - * - * ## Bulk BPS pricing - * - * Bulk BPS pricing specifies BPS parameters in a tiered manner, dependent on the - * total quantity across all events. Similar to bulk pricing, the BPS parameters of - * a given event depends on the tier range that the billing period falls into. Each - * tier range is defined by an upper bound. For example, after $1.5M of payment - * volume is reached, each individual payment may have a lower cap or a smaller - * take-rate. - * - * ```json - * ... - * "model_type": "bulk_bps", - * "bulk_bps_config": { - * "tiers": [ - * { - * "maximum_amount": "1000000.00", - * "bps": 125, - * "per_unit_maximum": "19.00" - * }, - * { - * "maximum_amount": null, - * "bps": 115, - * "per_unit_maximum": "4.00" - * } - * ] - * } - * ... - * } - * ``` - * - * ## Tiered BPS pricing - * - * Tiered BPS pricing specifies BPS parameters in a graduated manner, where an - * event's applicable parameter is a function of its marginal addition to the - * period total. Similar to tiered pricing, the BPS parameters of a given event - * depends on the tier range that it falls into, where each tier range is defined - * by an upper and lower bound. For example, the first few payments may have a 0.8 - * BPS take-rate and all payments after a specific volume may incur a take-rate of - * 0.5 BPS each. - * - * ```json - * ... - * "model_type": "tiered_bps", - * "tiered_bps_config": { - * "tiers": [ - * { - * "minimum_amount": "0", - * "maximum_amount": "1000000.00", - * "bps": 125, - * "per_unit_maximum": "19.00" - * }, - * { - * "minimum_amount": "1000000.00", - * "maximum_amount": null, - * "bps": 115, - * "per_unit_maximum": "4.00" - * } - * ] - * } - * ... - * } - * ``` - * - * ## Matrix pricing - * - * Matrix pricing defines a set of unit prices in a one or two-dimensional matrix. - * `dimensions` defines the two event property values evaluated in this pricing - * model. In a one-dimensional matrix, the second value is `null`. Every - * configuration has a list of `matrix_values` which give the unit prices for - * specified property values. In a one-dimensional matrix, the matrix values will - * have `dimension_values` where the second value of the pair is null. If an event - * does not match any of the dimension values in the matrix, it will resort to the - * `default_unit_amount`. - * - * ```json - * { - * "model_type": "matrix" - * "matrix_config": { - * "default_unit_amount": "3.00", - * "dimensions": [ - * "cluster_name", - * "region" - * ], - * "matrix_values": [ - * { - * "dimension_values": [ - * "alpha", - * "west" - * ], - * "unit_amount": "2.00" - * }, - * ... - * ] - * } - * } - * ``` - * - * ## Fixed fees - * - * Fixed fees are prices that are applied independent of usage quantities, and - * follow unit pricing. They also have an additional parameter - * `fixed_price_quantity`. If the Price represents a fixed cost, this represents - * the quantity of units applied. - * - * ```json - * { - * ... - * "id": "price_id", - * "model_type": "unit", - * "unit_config": { - * "unit_amount": "2.00" - * }, - * "fixed_price_quantity": 3.0 - * ... - * } - * ``` + * For more on the types of prices, see + * [the core concepts documentation](/core-concepts#plan-and-price) */ price: PricesAPI.Price; @@ -8123,7 +6130,7 @@ export interface SubscriptionUnschedulePendingPlanChangesResponse { * it's often desirable to have these match existing identifiers in your system. To * avoid having to denormalize Orb ID information, you can pass in an * `external_customer_id` with your own identifier. See - * [Customer ID Aliases](../guides/events-and-metrics/customer-aliases) for further + * [Customer ID Aliases](/events-and-metrics/customer-aliases) for further * information about how these aliases work in Orb. * * In addition to having an identifier in your system, a customer may exist in a @@ -8132,9 +6139,8 @@ export interface SubscriptionUnschedulePendingPlanChangesResponse { * * A customer also has a timezone (from the standard * [IANA timezone database](https://www.iana.org/time-zones)), which defaults to - * your account's timezone. See - * [Timezone localization](../guides/product-catalog/timezones.md) for information - * on what this timezone parameter influences within Orb. + * your account's timezone. See [Timezone localization](/essentials/timezones) for + * information on what this timezone parameter influences within Orb. */ customer: CustomersAPI.Customer; @@ -8189,9 +6195,9 @@ export interface SubscriptionUnschedulePendingPlanChangesResponse { net_terms: number; /** - * The [Plan](../guides/core-concepts.mdx#plan-and-price) resource represents a - * plan that can be subscribed to by a customer. Plans define the billing behavior - * of the subscription. You can see more about how to configure prices in the + * The [Plan](/core-concepts#plan-and-price) resource represents a plan that can be + * subscribed to by a customer. Plans define the billing behavior of the + * subscription. You can see more about how to configure prices in the * [Price resource](/reference/price). */ plan: PlansAPI.Plan; @@ -8638,229 +6644,8 @@ export namespace SubscriptionUnschedulePendingPlanChangesResponse { * is serialized differently in a given Price object. The model_type field * determines the key for the configuration object that is present. * - * ## Unit pricing - * - * With unit pricing, each unit costs a fixed amount. - * - * ```json - * { - * ... - * "model_type": "unit", - * "unit_config": { - * "unit_amount": "0.50" - * } - * ... - * } - * ``` - * - * ## Tiered pricing - * - * In tiered pricing, the cost of a given unit depends on the tier range that it - * falls into, where each tier range is defined by an upper and lower bound. For - * example, the first ten units may cost $0.50 each and all units thereafter may - * cost $0.10 each. - * - * ```json - * { - * ... - * "model_type": "tiered", - * "tiered_config": { - * "tiers": [ - * { - * "first_unit": 1, - * "last_unit": 10, - * "unit_amount": "0.50" - * }, - * { - * "first_unit": 11, - * "last_unit": null, - * "unit_amount": "0.10" - * } - * ] - * } - * ... - * ``` - * - * ## Bulk pricing - * - * Bulk pricing applies when the number of units determine the cost of all units. - * For example, if you've bought less than 10 units, they may each be $0.50 for a - * total of $5.00. Once you've bought more than 10 units, all units may now be - * priced at $0.40 (i.e. 101 units total would be $40.40). - * - * ```json - * { - * ... - * "model_type": "bulk", - * "bulk_config": { - * "tiers": [ - * { - * "maximum_units": 10, - * "unit_amount": "0.50" - * }, - * { - * "maximum_units": 1000, - * "unit_amount": "0.40" - * } - * ] - * } - * ... - * } - * ``` - * - * ## Package pricing - * - * Package pricing defines the size or granularity of a unit for billing purposes. - * For example, if the package size is set to 5, then 4 units will be billed as 5 - * and 6 units will be billed at 10. - * - * ```json - * { - * ... - * "model_type": "package", - * "package_config": { - * "package_amount": "0.80", - * "package_size": 10 - * } - * ... - * } - * ``` - * - * ## BPS pricing - * - * BPS pricing specifies a per-event (e.g. per-payment) rate in one hundredth of a - * percent (the number of basis points to charge), as well as a cap per event to - * assess. For example, this would allow you to assess a fee of 0.25% on every - * payment you process, with a maximum charge of $25 per payment. - * - * ```json - * { - * ... - * "model_type": "bps", - * "bps_config": { - * "bps": 125, - * "per_unit_maximum": "11.00" - * } - * ... - * } - * ``` - * - * ## Bulk BPS pricing - * - * Bulk BPS pricing specifies BPS parameters in a tiered manner, dependent on the - * total quantity across all events. Similar to bulk pricing, the BPS parameters of - * a given event depends on the tier range that the billing period falls into. Each - * tier range is defined by an upper bound. For example, after $1.5M of payment - * volume is reached, each individual payment may have a lower cap or a smaller - * take-rate. - * - * ```json - * ... - * "model_type": "bulk_bps", - * "bulk_bps_config": { - * "tiers": [ - * { - * "maximum_amount": "1000000.00", - * "bps": 125, - * "per_unit_maximum": "19.00" - * }, - * { - * "maximum_amount": null, - * "bps": 115, - * "per_unit_maximum": "4.00" - * } - * ] - * } - * ... - * } - * ``` - * - * ## Tiered BPS pricing - * - * Tiered BPS pricing specifies BPS parameters in a graduated manner, where an - * event's applicable parameter is a function of its marginal addition to the - * period total. Similar to tiered pricing, the BPS parameters of a given event - * depends on the tier range that it falls into, where each tier range is defined - * by an upper and lower bound. For example, the first few payments may have a 0.8 - * BPS take-rate and all payments after a specific volume may incur a take-rate of - * 0.5 BPS each. - * - * ```json - * ... - * "model_type": "tiered_bps", - * "tiered_bps_config": { - * "tiers": [ - * { - * "minimum_amount": "0", - * "maximum_amount": "1000000.00", - * "bps": 125, - * "per_unit_maximum": "19.00" - * }, - * { - * "minimum_amount": "1000000.00", - * "maximum_amount": null, - * "bps": 115, - * "per_unit_maximum": "4.00" - * } - * ] - * } - * ... - * } - * ``` - * - * ## Matrix pricing - * - * Matrix pricing defines a set of unit prices in a one or two-dimensional matrix. - * `dimensions` defines the two event property values evaluated in this pricing - * model. In a one-dimensional matrix, the second value is `null`. Every - * configuration has a list of `matrix_values` which give the unit prices for - * specified property values. In a one-dimensional matrix, the matrix values will - * have `dimension_values` where the second value of the pair is null. If an event - * does not match any of the dimension values in the matrix, it will resort to the - * `default_unit_amount`. - * - * ```json - * { - * "model_type": "matrix" - * "matrix_config": { - * "default_unit_amount": "3.00", - * "dimensions": [ - * "cluster_name", - * "region" - * ], - * "matrix_values": [ - * { - * "dimension_values": [ - * "alpha", - * "west" - * ], - * "unit_amount": "2.00" - * }, - * ... - * ] - * } - * } - * ``` - * - * ## Fixed fees - * - * Fixed fees are prices that are applied independent of usage quantities, and - * follow unit pricing. They also have an additional parameter - * `fixed_price_quantity`. If the Price represents a fixed cost, this represents - * the quantity of units applied. - * - * ```json - * { - * ... - * "id": "price_id", - * "model_type": "unit", - * "unit_config": { - * "unit_amount": "2.00" - * }, - * "fixed_price_quantity": 3.0 - * ... - * } - * ``` + * For more on the types of prices, see + * [the core concepts documentation](/core-concepts#plan-and-price) */ price: PricesAPI.Price; @@ -8949,7 +6734,7 @@ export interface SubscriptionUpdateFixedFeeQuantityResponse { * it's often desirable to have these match existing identifiers in your system. To * avoid having to denormalize Orb ID information, you can pass in an * `external_customer_id` with your own identifier. See - * [Customer ID Aliases](../guides/events-and-metrics/customer-aliases) for further + * [Customer ID Aliases](/events-and-metrics/customer-aliases) for further * information about how these aliases work in Orb. * * In addition to having an identifier in your system, a customer may exist in a @@ -8958,9 +6743,8 @@ export interface SubscriptionUpdateFixedFeeQuantityResponse { * * A customer also has a timezone (from the standard * [IANA timezone database](https://www.iana.org/time-zones)), which defaults to - * your account's timezone. See - * [Timezone localization](../guides/product-catalog/timezones.md) for information - * on what this timezone parameter influences within Orb. + * your account's timezone. See [Timezone localization](/essentials/timezones) for + * information on what this timezone parameter influences within Orb. */ customer: CustomersAPI.Customer; @@ -9015,9 +6799,9 @@ export interface SubscriptionUpdateFixedFeeQuantityResponse { net_terms: number; /** - * The [Plan](../guides/core-concepts.mdx#plan-and-price) resource represents a - * plan that can be subscribed to by a customer. Plans define the billing behavior - * of the subscription. You can see more about how to configure prices in the + * The [Plan](/core-concepts#plan-and-price) resource represents a plan that can be + * subscribed to by a customer. Plans define the billing behavior of the + * subscription. You can see more about how to configure prices in the * [Price resource](/reference/price). */ plan: PlansAPI.Plan; @@ -9464,229 +7248,8 @@ export namespace SubscriptionUpdateFixedFeeQuantityResponse { * is serialized differently in a given Price object. The model_type field * determines the key for the configuration object that is present. * - * ## Unit pricing - * - * With unit pricing, each unit costs a fixed amount. - * - * ```json - * { - * ... - * "model_type": "unit", - * "unit_config": { - * "unit_amount": "0.50" - * } - * ... - * } - * ``` - * - * ## Tiered pricing - * - * In tiered pricing, the cost of a given unit depends on the tier range that it - * falls into, where each tier range is defined by an upper and lower bound. For - * example, the first ten units may cost $0.50 each and all units thereafter may - * cost $0.10 each. - * - * ```json - * { - * ... - * "model_type": "tiered", - * "tiered_config": { - * "tiers": [ - * { - * "first_unit": 1, - * "last_unit": 10, - * "unit_amount": "0.50" - * }, - * { - * "first_unit": 11, - * "last_unit": null, - * "unit_amount": "0.10" - * } - * ] - * } - * ... - * ``` - * - * ## Bulk pricing - * - * Bulk pricing applies when the number of units determine the cost of all units. - * For example, if you've bought less than 10 units, they may each be $0.50 for a - * total of $5.00. Once you've bought more than 10 units, all units may now be - * priced at $0.40 (i.e. 101 units total would be $40.40). - * - * ```json - * { - * ... - * "model_type": "bulk", - * "bulk_config": { - * "tiers": [ - * { - * "maximum_units": 10, - * "unit_amount": "0.50" - * }, - * { - * "maximum_units": 1000, - * "unit_amount": "0.40" - * } - * ] - * } - * ... - * } - * ``` - * - * ## Package pricing - * - * Package pricing defines the size or granularity of a unit for billing purposes. - * For example, if the package size is set to 5, then 4 units will be billed as 5 - * and 6 units will be billed at 10. - * - * ```json - * { - * ... - * "model_type": "package", - * "package_config": { - * "package_amount": "0.80", - * "package_size": 10 - * } - * ... - * } - * ``` - * - * ## BPS pricing - * - * BPS pricing specifies a per-event (e.g. per-payment) rate in one hundredth of a - * percent (the number of basis points to charge), as well as a cap per event to - * assess. For example, this would allow you to assess a fee of 0.25% on every - * payment you process, with a maximum charge of $25 per payment. - * - * ```json - * { - * ... - * "model_type": "bps", - * "bps_config": { - * "bps": 125, - * "per_unit_maximum": "11.00" - * } - * ... - * } - * ``` - * - * ## Bulk BPS pricing - * - * Bulk BPS pricing specifies BPS parameters in a tiered manner, dependent on the - * total quantity across all events. Similar to bulk pricing, the BPS parameters of - * a given event depends on the tier range that the billing period falls into. Each - * tier range is defined by an upper bound. For example, after $1.5M of payment - * volume is reached, each individual payment may have a lower cap or a smaller - * take-rate. - * - * ```json - * ... - * "model_type": "bulk_bps", - * "bulk_bps_config": { - * "tiers": [ - * { - * "maximum_amount": "1000000.00", - * "bps": 125, - * "per_unit_maximum": "19.00" - * }, - * { - * "maximum_amount": null, - * "bps": 115, - * "per_unit_maximum": "4.00" - * } - * ] - * } - * ... - * } - * ``` - * - * ## Tiered BPS pricing - * - * Tiered BPS pricing specifies BPS parameters in a graduated manner, where an - * event's applicable parameter is a function of its marginal addition to the - * period total. Similar to tiered pricing, the BPS parameters of a given event - * depends on the tier range that it falls into, where each tier range is defined - * by an upper and lower bound. For example, the first few payments may have a 0.8 - * BPS take-rate and all payments after a specific volume may incur a take-rate of - * 0.5 BPS each. - * - * ```json - * ... - * "model_type": "tiered_bps", - * "tiered_bps_config": { - * "tiers": [ - * { - * "minimum_amount": "0", - * "maximum_amount": "1000000.00", - * "bps": 125, - * "per_unit_maximum": "19.00" - * }, - * { - * "minimum_amount": "1000000.00", - * "maximum_amount": null, - * "bps": 115, - * "per_unit_maximum": "4.00" - * } - * ] - * } - * ... - * } - * ``` - * - * ## Matrix pricing - * - * Matrix pricing defines a set of unit prices in a one or two-dimensional matrix. - * `dimensions` defines the two event property values evaluated in this pricing - * model. In a one-dimensional matrix, the second value is `null`. Every - * configuration has a list of `matrix_values` which give the unit prices for - * specified property values. In a one-dimensional matrix, the matrix values will - * have `dimension_values` where the second value of the pair is null. If an event - * does not match any of the dimension values in the matrix, it will resort to the - * `default_unit_amount`. - * - * ```json - * { - * "model_type": "matrix" - * "matrix_config": { - * "default_unit_amount": "3.00", - * "dimensions": [ - * "cluster_name", - * "region" - * ], - * "matrix_values": [ - * { - * "dimension_values": [ - * "alpha", - * "west" - * ], - * "unit_amount": "2.00" - * }, - * ... - * ] - * } - * } - * ``` - * - * ## Fixed fees - * - * Fixed fees are prices that are applied independent of usage quantities, and - * follow unit pricing. They also have an additional parameter - * `fixed_price_quantity`. If the Price represents a fixed cost, this represents - * the quantity of units applied. - * - * ```json - * { - * ... - * "id": "price_id", - * "model_type": "unit", - * "unit_config": { - * "unit_amount": "2.00" - * }, - * "fixed_price_quantity": 3.0 - * ... - * } - * ``` + * For more on the types of prices, see + * [the core concepts documentation](/core-concepts#plan-and-price) */ price: PricesAPI.Price; @@ -9775,7 +7338,7 @@ export interface SubscriptionUpdateTrialResponse { * it's often desirable to have these match existing identifiers in your system. To * avoid having to denormalize Orb ID information, you can pass in an * `external_customer_id` with your own identifier. See - * [Customer ID Aliases](../guides/events-and-metrics/customer-aliases) for further + * [Customer ID Aliases](/events-and-metrics/customer-aliases) for further * information about how these aliases work in Orb. * * In addition to having an identifier in your system, a customer may exist in a @@ -9784,9 +7347,8 @@ export interface SubscriptionUpdateTrialResponse { * * A customer also has a timezone (from the standard * [IANA timezone database](https://www.iana.org/time-zones)), which defaults to - * your account's timezone. See - * [Timezone localization](../guides/product-catalog/timezones.md) for information - * on what this timezone parameter influences within Orb. + * your account's timezone. See [Timezone localization](/essentials/timezones) for + * information on what this timezone parameter influences within Orb. */ customer: CustomersAPI.Customer; @@ -9841,9 +7403,9 @@ export interface SubscriptionUpdateTrialResponse { net_terms: number; /** - * The [Plan](../guides/core-concepts.mdx#plan-and-price) resource represents a - * plan that can be subscribed to by a customer. Plans define the billing behavior - * of the subscription. You can see more about how to configure prices in the + * The [Plan](/core-concepts#plan-and-price) resource represents a plan that can be + * subscribed to by a customer. Plans define the billing behavior of the + * subscription. You can see more about how to configure prices in the * [Price resource](/reference/price). */ plan: PlansAPI.Plan; @@ -10290,229 +7852,8 @@ export namespace SubscriptionUpdateTrialResponse { * is serialized differently in a given Price object. The model_type field * determines the key for the configuration object that is present. * - * ## Unit pricing - * - * With unit pricing, each unit costs a fixed amount. - * - * ```json - * { - * ... - * "model_type": "unit", - * "unit_config": { - * "unit_amount": "0.50" - * } - * ... - * } - * ``` - * - * ## Tiered pricing - * - * In tiered pricing, the cost of a given unit depends on the tier range that it - * falls into, where each tier range is defined by an upper and lower bound. For - * example, the first ten units may cost $0.50 each and all units thereafter may - * cost $0.10 each. - * - * ```json - * { - * ... - * "model_type": "tiered", - * "tiered_config": { - * "tiers": [ - * { - * "first_unit": 1, - * "last_unit": 10, - * "unit_amount": "0.50" - * }, - * { - * "first_unit": 11, - * "last_unit": null, - * "unit_amount": "0.10" - * } - * ] - * } - * ... - * ``` - * - * ## Bulk pricing - * - * Bulk pricing applies when the number of units determine the cost of all units. - * For example, if you've bought less than 10 units, they may each be $0.50 for a - * total of $5.00. Once you've bought more than 10 units, all units may now be - * priced at $0.40 (i.e. 101 units total would be $40.40). - * - * ```json - * { - * ... - * "model_type": "bulk", - * "bulk_config": { - * "tiers": [ - * { - * "maximum_units": 10, - * "unit_amount": "0.50" - * }, - * { - * "maximum_units": 1000, - * "unit_amount": "0.40" - * } - * ] - * } - * ... - * } - * ``` - * - * ## Package pricing - * - * Package pricing defines the size or granularity of a unit for billing purposes. - * For example, if the package size is set to 5, then 4 units will be billed as 5 - * and 6 units will be billed at 10. - * - * ```json - * { - * ... - * "model_type": "package", - * "package_config": { - * "package_amount": "0.80", - * "package_size": 10 - * } - * ... - * } - * ``` - * - * ## BPS pricing - * - * BPS pricing specifies a per-event (e.g. per-payment) rate in one hundredth of a - * percent (the number of basis points to charge), as well as a cap per event to - * assess. For example, this would allow you to assess a fee of 0.25% on every - * payment you process, with a maximum charge of $25 per payment. - * - * ```json - * { - * ... - * "model_type": "bps", - * "bps_config": { - * "bps": 125, - * "per_unit_maximum": "11.00" - * } - * ... - * } - * ``` - * - * ## Bulk BPS pricing - * - * Bulk BPS pricing specifies BPS parameters in a tiered manner, dependent on the - * total quantity across all events. Similar to bulk pricing, the BPS parameters of - * a given event depends on the tier range that the billing period falls into. Each - * tier range is defined by an upper bound. For example, after $1.5M of payment - * volume is reached, each individual payment may have a lower cap or a smaller - * take-rate. - * - * ```json - * ... - * "model_type": "bulk_bps", - * "bulk_bps_config": { - * "tiers": [ - * { - * "maximum_amount": "1000000.00", - * "bps": 125, - * "per_unit_maximum": "19.00" - * }, - * { - * "maximum_amount": null, - * "bps": 115, - * "per_unit_maximum": "4.00" - * } - * ] - * } - * ... - * } - * ``` - * - * ## Tiered BPS pricing - * - * Tiered BPS pricing specifies BPS parameters in a graduated manner, where an - * event's applicable parameter is a function of its marginal addition to the - * period total. Similar to tiered pricing, the BPS parameters of a given event - * depends on the tier range that it falls into, where each tier range is defined - * by an upper and lower bound. For example, the first few payments may have a 0.8 - * BPS take-rate and all payments after a specific volume may incur a take-rate of - * 0.5 BPS each. - * - * ```json - * ... - * "model_type": "tiered_bps", - * "tiered_bps_config": { - * "tiers": [ - * { - * "minimum_amount": "0", - * "maximum_amount": "1000000.00", - * "bps": 125, - * "per_unit_maximum": "19.00" - * }, - * { - * "minimum_amount": "1000000.00", - * "maximum_amount": null, - * "bps": 115, - * "per_unit_maximum": "4.00" - * } - * ] - * } - * ... - * } - * ``` - * - * ## Matrix pricing - * - * Matrix pricing defines a set of unit prices in a one or two-dimensional matrix. - * `dimensions` defines the two event property values evaluated in this pricing - * model. In a one-dimensional matrix, the second value is `null`. Every - * configuration has a list of `matrix_values` which give the unit prices for - * specified property values. In a one-dimensional matrix, the matrix values will - * have `dimension_values` where the second value of the pair is null. If an event - * does not match any of the dimension values in the matrix, it will resort to the - * `default_unit_amount`. - * - * ```json - * { - * "model_type": "matrix" - * "matrix_config": { - * "default_unit_amount": "3.00", - * "dimensions": [ - * "cluster_name", - * "region" - * ], - * "matrix_values": [ - * { - * "dimension_values": [ - * "alpha", - * "west" - * ], - * "unit_amount": "2.00" - * }, - * ... - * ] - * } - * } - * ``` - * - * ## Fixed fees - * - * Fixed fees are prices that are applied independent of usage quantities, and - * follow unit pricing. They also have an additional parameter - * `fixed_price_quantity`. If the Price represents a fixed cost, this represents - * the quantity of units applied. - * - * ```json - * { - * ... - * "id": "price_id", - * "model_type": "unit", - * "unit_config": { - * "unit_amount": "2.00" - * }, - * "fixed_price_quantity": 3.0 - * ... - * } - * ``` + * For more on the types of prices, see + * [the core concepts documentation](/core-concepts#plan-and-price) */ price: PricesAPI.Price; @@ -10606,8 +7947,8 @@ export interface SubscriptionCreateParams { /** * An additional filter to apply to usage queries. This filter must be expressed as * a boolean - * [computed property](../guides/extensibility/advanced-metrics#computed-properties). - * If null, usage queries will not include any additional filter. + * [computed property](/extensibility/advanced-metrics#computed-properties). If + * null, usage queries will not include any additional filter. */ filter?: string | null; @@ -16010,7 +13351,6 @@ export namespace SubscriptionPriceIntervalsParams { | Add.NewFloatingThresholdTotalAmountPrice | Add.NewFloatingTieredPackagePrice | Add.NewFloatingGroupedTieredPrice - | Add.NewFloatingMaxGroupTieredPrice | Add.NewFloatingTieredWithMinimumPrice | Add.NewFloatingPackageWithAllocationPrice | Add.NewFloatingTieredPackageWithMinimumPrice @@ -17653,118 +14993,6 @@ export namespace SubscriptionPriceIntervalsParams { } } - export interface NewFloatingMaxGroupTieredPrice { - /** - * 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; - - max_group_tiered_config: Record; - - model_type: 'max_group_tiered'; - - /** - * The name of the price. - */ - name: string; - - /** - * 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?: NewFloatingMaxGroupTieredPrice.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?: NewFloatingMaxGroupTieredPrice.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 NewFloatingMaxGroupTieredPrice { - /** - * 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 NewFloatingTieredWithMinimumPrice { /** * The cadence to bill for this price on. @@ -19332,8 +16560,7 @@ export interface SubscriptionSchedulePlanChangeParams { /** * The date that the plan change should take effect. This parameter can only be - * passed if the `change_option` is `requested_date`. If a date with no time is - * passed, the plan change will happen at midnight in the customer's timezone. + * passed if the `change_option` is `requested_date`. */ change_date?: string | null; @@ -19361,8 +16588,8 @@ export interface SubscriptionSchedulePlanChangeParams { /** * An additional filter to apply to usage queries. This filter must be expressed as * a boolean - * [computed property](../guides/extensibility/advanced-metrics#computed-properties). - * If null, usage queries will not include any additional filter. + * [computed property](/extensibility/advanced-metrics#computed-properties). If + * null, usage queries will not include any additional filter. */ filter?: string | null; diff --git a/src/version.ts b/src/version.ts index bb12aad4..44f8e47e 100644 --- a/src/version.ts +++ b/src/version.ts @@ -1 +1 @@ -export const VERSION = '4.49.0'; // x-release-please-version +export const VERSION = '4.50.0'; // x-release-please-version