diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 54f0a682..373d4290 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "5.24.0" + ".": "5.25.0" } diff --git a/.stats.yml b/.stats.yml index 3fc5d44c..62604532 100644 --- a/.stats.yml +++ b/.stats.yml @@ -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 diff --git a/CHANGELOG.md b/CHANGELOG.md index a6889ca7..c2d5b6a6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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) diff --git a/package.json b/package.json index a333f8fa..d0a28bbf 100644 --- a/package.json +++ b/package.json @@ -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 ", "types": "dist/index.d.ts", diff --git a/src/resources/customers/credits/ledger.ts b/src/resources/customers/credits/ledger.ts index fe4bb637..cb69125d 100644 --- a/src/resources/customers/credits/ledger.ts +++ b/src/resources/customers/credits/ledger.ts @@ -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 | null; + /** * Passing `invoice_settings` automatically generates an invoice for the newly * added credits. If `invoice_settings` is passed, you must specify @@ -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; + } + /** * Passing `invoice_settings` automatically generates an invoice for the newly * added credits. If `invoice_settings` is passed, you must specify @@ -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 | null; + /** * Passing `invoice_settings` automatically generates an invoice for the newly * added credits. If `invoice_settings` is passed, you must specify @@ -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; + } + /** * Passing `invoice_settings` automatically generates an invoice for the newly * added credits. If `invoice_settings` is passed, you must specify diff --git a/src/resources/shared.ts b/src/resources/shared.ts index a0582422..443db1f3 100644 --- a/src/resources/shared.ts +++ b/src/resources/shared.ts @@ -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 | 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; + } } export interface NewAmountDiscount { diff --git a/src/version.ts b/src/version.ts index f7a5ea65..55bc07f5 100644 --- a/src/version.ts +++ b/src/version.ts @@ -1 +1 @@ -export const VERSION = '5.24.0'; // x-release-please-version +export const VERSION = '5.25.0'; // x-release-please-version diff --git a/tests/api-resources/beta/beta.test.ts b/tests/api-resources/beta/beta.test.ts index d4a8c772..3a607c25 100644 --- a/tests/api-resources/beta/beta.test.ts +++ b/tests/api-resources/beta/beta.test.ts @@ -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: { @@ -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: { diff --git a/tests/api-resources/beta/external-plan-id.test.ts b/tests/api-resources/beta/external-plan-id.test.ts index a24646de..ef868138 100644 --- a/tests/api-resources/beta/external-plan-id.test.ts +++ b/tests/api-resources/beta/external-plan-id.test.ts @@ -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: { @@ -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: { diff --git a/tests/api-resources/customers/credits/ledger.test.ts b/tests/api-resources/customers/credits/ledger.test.ts index 8d687106..b886f527 100644 --- a/tests/api-resources/customers/credits/ledger.test.ts +++ b/tests/api-resources/customers/credits/ledger.test.ts @@ -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, @@ -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, diff --git a/tests/api-resources/plans/plans.test.ts b/tests/api-resources/plans/plans.test.ts index 8e0a1d9e..1fd86e31 100644 --- a/tests/api-resources/plans/plans.test.ts +++ b/tests/api-resources/plans/plans.test.ts @@ -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: { diff --git a/tests/api-resources/subscriptions.test.ts b/tests/api-resources/subscriptions.test.ts index 064add2e..f6b96c57 100644 --- a/tests/api-resources/subscriptions.test.ts +++ b/tests/api-resources/subscriptions.test.ts @@ -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: [ { @@ -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: [ {