diff --git a/.release-please-manifest.json b/.release-please-manifest.json index a0c8c3e1..7443ba28 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "5.16.0" + ".": "5.17.0" } diff --git a/.stats.yml b/.stats.yml index 3407ffd1..32f63a30 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-b070c1d97a6e3b400f43d2bce36c22ed89d432345b26374728c55dd0a20f0afa.yml -openapi_spec_hash: dba4ff52c381cda6159fc56d8b77eb32 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/orb%2Forb-15e42bc01739abea4a925894a1a7de447de40b003a3433461952e8e06919588b.yml +openapi_spec_hash: 8a0bc5b6ab417f7256cbf83d70c459a3 config_hash: 1f73a949b649ecfe6ec68ba1bb459dc2 diff --git a/CHANGELOG.md b/CHANGELOG.md index fb24fe39..59bf8e04 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 5.17.0 (2025-10-10) + +Full Changelog: [v5.16.0...v5.17.0](https://github.com/orbcorp/orb-node/compare/v5.16.0...v5.17.0) + +### Features + +* **api:** api update ([e8f7516](https://github.com/orbcorp/orb-node/commit/e8f7516e596c23f8d54b36bdc646e25860ce14c2)) + ## 5.16.0 (2025-10-07) Full Changelog: [v5.15.0...v5.16.0](https://github.com/orbcorp/orb-node/compare/v5.15.0...v5.16.0) diff --git a/package.json b/package.json index 03cae95d..5321f9ea 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "orb-billing", - "version": "5.16.0", + "version": "5.17.0", "description": "The official TypeScript library for the Orb API", "author": "Orb ", "types": "dist/index.d.ts", diff --git a/src/resources/invoice-line-items.ts b/src/resources/invoice-line-items.ts index d4eec3c9..4f7b4ea7 100644 --- a/src/resources/invoice-line-items.ts +++ b/src/resources/invoice-line-items.ts @@ -8,6 +8,17 @@ export class InvoiceLineItems extends APIResource { /** * This creates a one-off fixed fee invoice line item on an Invoice. This can only * be done for invoices that are in a `draft` status. + * + * The behavior depends on which parameters are provided: + * + * - If `item_id` is provided without `name`: The item is looked up by ID, and the + * item's name is used for the line item. + * - If `name` is provided without `item_id`: An item with the given name is + * searched for in the account. If found, that item is used. If not found, a new + * item is created with that name. The new item's name is used for the line item. + * - If both `item_id` and `name` are provided: The item is looked up by ID for + * association, but the provided `name` is used for the line item (not the item's + * name). */ create( body: InvoiceLineItemCreateParams, @@ -168,12 +179,6 @@ export interface InvoiceLineItemCreateParams { */ invoice_id: string; - /** - * The item name associated with this line item. If an item with the same name - * exists in Orb, that item will be associated with the line item. - */ - name: string; - /** * The number of units on the line item */ @@ -183,6 +188,24 @@ export interface InvoiceLineItemCreateParams { * A date string to specify the line item's start date in the customer's timezone. */ start_date: string; + + /** + * The id of the item to associate with this line item. If provided without `name`, + * the item's name will be used for the price/line item. If provided with `name`, + * the item will be associated but `name` will be used for the line item. At least + * one of `name` or `item_id` must be provided. + */ + item_id?: string | null; + + /** + * The name to use for the line item. If `item_id` is not provided, Orb will search + * for an item with this name. If found, that item will be associated with the line + * item. If not found, a new item will be created with this name. If `item_id` is + * provided, this name will be used for the line item, but the item association + * will be based on `item_id`. At least one of `name` or `item_id` must be + * provided. + */ + name?: string | null; } export declare namespace InvoiceLineItems { diff --git a/src/version.ts b/src/version.ts index cf8aa541..02ab094c 100644 --- a/src/version.ts +++ b/src/version.ts @@ -1 +1 @@ -export const VERSION = '5.16.0'; // x-release-please-version +export const VERSION = '5.17.0'; // x-release-please-version diff --git a/tests/api-resources/invoice-line-items.test.ts b/tests/api-resources/invoice-line-items.test.ts index fbc09e3d..93b87792 100644 --- a/tests/api-resources/invoice-line-items.test.ts +++ b/tests/api-resources/invoice-line-items.test.ts @@ -14,7 +14,6 @@ describe('resource invoiceLineItems', () => { amount: '12.00', end_date: '2023-09-22', invoice_id: '4khy3nwzktxv7', - name: 'Item Name', quantity: 1, start_date: '2023-09-22', }); @@ -32,9 +31,10 @@ describe('resource invoiceLineItems', () => { amount: '12.00', end_date: '2023-09-22', invoice_id: '4khy3nwzktxv7', - name: 'Item Name', quantity: 1, start_date: '2023-09-22', + item_id: '4khy3nwzktxv7', + name: 'Item Name', }); }); });