orb-billing
Version:
The official TypeScript library for the Orb API
27 lines • 1.32 kB
JavaScript
;
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
Object.defineProperty(exports, "__esModule", { value: true });
exports.InvoiceLineItems = void 0;
const resource_1 = require("../resource.js");
class InvoiceLineItems extends resource_1.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, options) {
return this._client.post('/invoice_line_items', { body, ...options });
}
}
exports.InvoiceLineItems = InvoiceLineItems;
//# sourceMappingURL=invoice-line-items.js.map