Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "4.50.0"
".": "4.51.0"
}
2 changes: 1 addition & 1 deletion .stats.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
configured_endpoints: 101
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-e480186cdd0e2cc631befa7e2c6ba5f2d7ae52052f0e79a748214f3ade8a98ee.yml
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-7fca89ba5a0b4997358c25e6cdfb616a1d8b93a6820e25078f3fa5f61110bfe6.yml
18 changes: 18 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,23 @@
# Changelog

## 4.51.0 (2025-01-21)

Full Changelog: [v4.50.0...v4.51.0](https://github.com/orbcorp/orb-node/compare/v4.50.0...v4.51.0)

### Features

* **api:** api update ([#480](https://github.com/orbcorp/orb-node/issues/480)) ([fe6e3a7](https://github.com/orbcorp/orb-node/commit/fe6e3a706654bda3b1e8688c9d3a3cd6dc880a62))


### Chores

* **internal:** add test ([#475](https://github.com/orbcorp/orb-node/issues/475)) ([3654805](https://github.com/orbcorp/orb-node/commit/3654805e3427da36e0b1bf0c0cb08548a70ab8ee))


### Documentation

* update deprecation messages ([#478](https://github.com/orbcorp/orb-node/issues/478)) ([2e2382e](https://github.com/orbcorp/orb-node/commit/2e2382ee0ced57e41f44c83474dd0ac802e85d23))

## 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)
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "orb-billing",
"version": "4.50.0",
"version": "4.51.0",
"description": "The official TypeScript library for the Orb API",
"author": "Orb <team@withorb.com>",
"types": "dist/index.d.ts",
Expand Down
4 changes: 3 additions & 1 deletion src/resources/customers/customers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,9 @@ export class Customers extends APIResource {
* provided the customer does not have any issued invoices. Customers with issued
* invoices cannot be deleted. This operation is irreversible. Note that this is a
* _soft_ deletion, but the data will be inaccessible through the API and Orb
* dashboard. For a hard-deletion, please reach out to the Orb team directly.
* dashboard.
*
* For a hard-deletion, please reach out to the Orb team directly.
*
* **Note**: This operation happens asynchronously and can be expected to take a
* few minutes to propagate to related resources. However, querying for the
Expand Down
2 changes: 1 addition & 1 deletion src/resources/events/backfills.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ 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 counter towards invoiced usage. In this
* the timeframe should no longer be counted towards invoiced usage. In this
* scenario, the parameter `filter` can be optionally added which enables filtering
* using
* [computed properties](/extensibility/advanced-metrics#computed-properties). The
Expand Down
4 changes: 2 additions & 2 deletions src/resources/invoices.ts
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ export interface Invoice {
customer_tax_id: Invoice.CustomerTaxID | null;

/**
* @deprecated: This field is deprecated in favor of `discounts`. If a `discounts`
* @deprecated This field is deprecated in favor of `discounts`. If a `discounts`
* list is provided, the first discount in the list will be returned. If the list
* is empty, `None` will be returned.
*/
Expand Down Expand Up @@ -1277,7 +1277,7 @@ export interface InvoiceFetchUpcomingResponse {
customer_tax_id: InvoiceFetchUpcomingResponse.CustomerTaxID | null;

/**
* @deprecated: This field is deprecated in favor of `discounts`. If a `discounts`
* @deprecated This field is deprecated in favor of `discounts`. If a `discounts`
* list is provided, the first discount in the list will be returned. If the list
* is empty, `None` will be returned.
*/
Expand Down
116 changes: 115 additions & 1 deletion src/resources/plans/plans.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ export interface Plan {
created_at: string;

/**
* @deprecated: An ISO 4217 currency string or custom pricing unit (`credits`) for
* @deprecated An ISO 4217 currency string or custom pricing unit (`credits`) for
* this plan's prices.
*/
currency: string;
Expand Down Expand Up @@ -497,6 +497,7 @@ export interface PlanCreateParams {
| PlanCreateParams.NewPlanMatrixWithDisplayNamePrice
| PlanCreateParams.NewPlanBulkWithProrationPrice
| PlanCreateParams.NewPlanGroupedTieredPackagePrice
| PlanCreateParams.NewPlanMaxGroupTieredPrice
>;

/**
Expand Down Expand Up @@ -3071,6 +3072,119 @@ 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<string, unknown>;

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<string, string | null> | 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 {
Expand Down
Loading
Loading