Skip to content
Merged
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 @@
{
".": "5.24.0"
".": "5.25.0"
}
4 changes: 2 additions & 2 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 118
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-79664fa0b4ea00c978ae2516087d0ee591b0ef92ca8db29557a0424bde520e10.yml
openapi_spec_hash: 1ff6eee9184312a3a0fd21eb589132f9
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-d1abf71a1a70a43bdcc4da7104dabcbd67aa7e2d3e6cf21e33f50904b6997bb2.yml
openapi_spec_hash: 28b0b31a997588cf3692458889321e1b
config_hash: dd4343ce95871032ef6e0735a4ca038c
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## 5.25.0 (2025-10-31)

Full Changelog: [v5.24.0...v5.25.0](https://github.com/orbcorp/orb-node/compare/v5.24.0...v5.25.0)

### Features

* **api:** api update ([cb99ad1](https://github.com/orbcorp/orb-node/commit/cb99ad188b75c2396fba7fdcbf69d56273d47e16))

## 5.24.0 (2025-10-31)

Full Changelog: [v5.23.0...v5.24.0](https://github.com/orbcorp/orb-node/compare/v5.23.0...v5.24.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": "5.24.0",
"version": "5.25.0",
"description": "The official TypeScript library for the Orb API",
"author": "Orb <[email protected]>",
"types": "dist/index.d.ts",
Expand Down
52 changes: 52 additions & 0 deletions src/resources/customers/credits/ledger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -880,6 +880,12 @@ export declare namespace LedgerCreateEntryParams {
*/
expiry_date?: string | null;

/**
* Optional filter to specify which items this credit block applies to. If not
* specified, the block will apply to all items for the pricing unit.
*/
filters?: Array<AddIncrementCreditLedgerEntryRequestParams.Filter> | null;

/**
* Passing `invoice_settings` automatically generates an invoice for the newly
* added credits. If `invoice_settings` is passed, you must specify
Expand All @@ -903,6 +909,26 @@ export declare namespace LedgerCreateEntryParams {
}

export namespace AddIncrementCreditLedgerEntryRequestParams {
/**
* A PriceFilter that only allows item_id field for block filters.
*/
export interface Filter {
/**
* The property of the price the block applies to. Only item_id is supported.
*/
field: 'item_id';

/**
* Should prices that match the filter be included or excluded.
*/
operator: 'includes' | 'excludes';

/**
* The IDs or values that match this filter.
*/
values: Array<string>;
}

/**
* Passing `invoice_settings` automatically generates an invoice for the newly
* added credits. If `invoice_settings` is passed, you must specify
Expand Down Expand Up @@ -1152,6 +1178,12 @@ export declare namespace LedgerCreateEntryByExternalIDParams {
*/
expiry_date?: string | null;

/**
* Optional filter to specify which items this credit block applies to. If not
* specified, the block will apply to all items for the pricing unit.
*/
filters?: Array<AddIncrementCreditLedgerEntryRequestParams.Filter> | null;

/**
* Passing `invoice_settings` automatically generates an invoice for the newly
* added credits. If `invoice_settings` is passed, you must specify
Expand All @@ -1175,6 +1207,26 @@ export declare namespace LedgerCreateEntryByExternalIDParams {
}

export namespace AddIncrementCreditLedgerEntryRequestParams {
/**
* A PriceFilter that only allows item_id field for block filters.
*/
export interface Filter {
/**
* The property of the price the block applies to. Only item_id is supported.
*/
field: 'item_id';

/**
* Should prices that match the filter be included or excluded.
*/
operator: 'includes' | 'excludes';

/**
* The IDs or values that match this filter.
*/
values: Array<string>;
}

/**
* Passing `invoice_settings` automatically generates an invoice for the newly
* added credits. If `invoice_settings` is passed, you must specify
Expand Down
27 changes: 27 additions & 0 deletions src/resources/shared.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2788,6 +2788,33 @@ export interface NewAllocationPrice {
* over to the next period. Set to null if using custom_expiration.
*/
expires_at_end_of_cadence?: boolean | null;

/**
* The filters that determine which items the allocation applies to.
*/
filters?: Array<NewAllocationPrice.Filter> | null;
}

export namespace NewAllocationPrice {
/**
* A PriceFilter that only allows item_id field for block filters.
*/
export interface Filter {
/**
* The property of the price the block applies to. Only item_id is supported.
*/
field: 'item_id';

/**
* Should prices that match the filter be included or excluded.
*/
operator: 'includes' | 'excludes';

/**
* The IDs or values that match this filter.
*/
values: Array<string>;
}
}

export interface NewAmountDiscount {
Expand Down
2 changes: 1 addition & 1 deletion src/version.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export const VERSION = '5.24.0'; // x-release-please-version
export const VERSION = '5.25.0'; // x-release-please-version
2 changes: 2 additions & 0 deletions tests/api-resources/beta/beta.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ describe('resource beta', () => {
currency: 'USD',
custom_expiration: { duration: 0, duration_unit: 'day' },
expires_at_end_of_cadence: true,
filters: [{ field: 'item_id', operator: 'includes', values: ['string'] }],
},
plan_phase_order: 0,
price: {
Expand Down Expand Up @@ -106,6 +107,7 @@ describe('resource beta', () => {
currency: 'USD',
custom_expiration: { duration: 0, duration_unit: 'day' },
expires_at_end_of_cadence: true,
filters: [{ field: 'item_id', operator: 'includes', values: ['string'] }],
},
plan_phase_order: 0,
price: {
Expand Down
2 changes: 2 additions & 0 deletions tests/api-resources/beta/external-plan-id.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ describe('resource externalPlanId', () => {
currency: 'USD',
custom_expiration: { duration: 0, duration_unit: 'day' },
expires_at_end_of_cadence: true,
filters: [{ field: 'item_id', operator: 'includes', values: ['string'] }],
},
plan_phase_order: 0,
price: {
Expand Down Expand Up @@ -106,6 +107,7 @@ describe('resource externalPlanId', () => {
currency: 'USD',
custom_expiration: { duration: 0, duration_unit: 'day' },
expires_at_end_of_cadence: true,
filters: [{ field: 'item_id', operator: 'includes', values: ['string'] }],
},
plan_phase_order: 0,
price: {
Expand Down
2 changes: 2 additions & 0 deletions tests/api-resources/customers/credits/ledger.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ describe('resource ledger', () => {
description: 'description',
effective_date: '2019-12-27T18:11:19.117Z',
expiry_date: '2019-12-27T18:11:19.117Z',
filters: [{ field: 'item_id', operator: 'includes', values: ['string'] }],
invoice_settings: {
auto_collection: true,
net_terms: 0,
Expand Down Expand Up @@ -107,6 +108,7 @@ describe('resource ledger', () => {
description: 'description',
effective_date: '2019-12-27T18:11:19.117Z',
expiry_date: '2019-12-27T18:11:19.117Z',
filters: [{ field: 'item_id', operator: 'includes', values: ['string'] }],
invoice_settings: {
auto_collection: true,
net_terms: 0,
Expand Down
1 change: 1 addition & 0 deletions tests/api-resources/plans/plans.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ describe('resource plans', () => {
currency: 'USD',
custom_expiration: { duration: 0, duration_unit: 'day' },
expires_at_end_of_cadence: true,
filters: [{ field: 'item_id', operator: 'includes', values: ['string'] }],
},
plan_phase_order: 0,
price: {
Expand Down
2 changes: 2 additions & 0 deletions tests/api-resources/subscriptions.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,7 @@ describe('resource subscriptions', () => {
currency: 'USD',
custom_expiration: { duration: 0, duration_unit: 'day' },
expires_at_end_of_cadence: true,
filters: [{ field: 'item_id', operator: 'includes', values: ['string'] }],
},
discounts: [
{
Expand Down Expand Up @@ -389,6 +390,7 @@ describe('resource subscriptions', () => {
currency: 'USD',
custom_expiration: { duration: 0, duration_unit: 'day' },
expires_at_end_of_cadence: true,
filters: [{ field: 'item_id', operator: 'includes', values: ['string'] }],
},
discounts: [
{
Expand Down