orb-billing 6.18.0 → 6.19.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/src/client.ts CHANGED
@@ -46,6 +46,7 @@ import {
46
46
  import {
47
47
  InvoiceCreateParams,
48
48
  InvoiceDeleteLineItemParams,
49
+ InvoiceFetchParams,
49
50
  InvoiceFetchUpcomingParams,
50
51
  InvoiceFetchUpcomingResponse,
51
52
  InvoiceIssueParams,
@@ -1201,6 +1202,7 @@ export declare namespace Orb {
1201
1202
  type InvoiceUpdateParams as InvoiceUpdateParams,
1202
1203
  type InvoiceListParams as InvoiceListParams,
1203
1204
  type InvoiceDeleteLineItemParams as InvoiceDeleteLineItemParams,
1205
+ type InvoiceFetchParams as InvoiceFetchParams,
1204
1206
  type InvoiceFetchUpcomingParams as InvoiceFetchUpcomingParams,
1205
1207
  type InvoiceIssueParams as InvoiceIssueParams,
1206
1208
  type InvoiceIssueSummaryParams as InvoiceIssueSummaryParams,
@@ -88,6 +88,7 @@ export {
88
88
  type InvoiceUpdateParams,
89
89
  type InvoiceListParams,
90
90
  type InvoiceDeleteLineItemParams,
91
+ type InvoiceFetchParams,
91
92
  type InvoiceFetchUpcomingParams,
92
93
  type InvoiceIssueParams,
93
94
  type InvoiceIssueSummaryParams,
@@ -130,8 +130,12 @@ export class Invoices extends APIResource {
130
130
  * const invoice = await client.invoices.fetch('invoice_id');
131
131
  * ```
132
132
  */
133
- fetch(invoiceID: string, options?: RequestOptions): APIPromise<Shared.Invoice> {
134
- return this._client.get(path`/invoices/${invoiceID}`, options);
133
+ fetch(
134
+ invoiceID: string,
135
+ query: InvoiceFetchParams | null | undefined = {},
136
+ options?: RequestOptions,
137
+ ): APIPromise<Shared.Invoice> {
138
+ return this._client.get(path`/invoices/${invoiceID}`, { query, ...options });
135
139
  }
136
140
 
137
141
  /**
@@ -578,6 +582,14 @@ export interface InvoiceFetchUpcomingResponse {
578
582
  */
579
583
  eligible_to_issue_at: string | null;
580
584
 
585
+ /**
586
+ * The number of line items omitted from `line_items` because they have zero
587
+ * quantity. Amounts such as `subtotal` and `total` are computed over every line
588
+ * item on the invoice, including the omitted ones. In rare circumstances, hidden
589
+ * line items may still contribute to these amounts.
590
+ */
591
+ hidden_line_item_count: number;
592
+
581
593
  /**
582
594
  * A URL for the customer-facing invoice portal. This URL expires 60 days after the
583
595
  * link is generated, or 30 days after the invoice's due date — whichever is later.
@@ -2143,6 +2155,13 @@ export interface InvoiceListParams extends PageParams {
2143
2155
 
2144
2156
  external_customer_id?: string | null;
2145
2157
 
2158
+ /**
2159
+ * Whether to return line items with a quantity of zero. When omitted, Orb returns
2160
+ * every line item. A line item that is grouped as part of a line item minimum is
2161
+ * always returned; an invoice-level minimum does not exempt it.
2162
+ */
2163
+ include_zero_quantity_line_items?: boolean | null;
2164
+
2146
2165
  'invoice_date[gt]'?: string | null;
2147
2166
 
2148
2167
  'invoice_date[gte]'?: string | null;
@@ -2162,8 +2181,24 @@ export interface InvoiceDeleteLineItemParams {
2162
2181
  invoice_id: string;
2163
2182
  }
2164
2183
 
2184
+ export interface InvoiceFetchParams {
2185
+ /**
2186
+ * Whether to return line items with a quantity of zero. When omitted, Orb returns
2187
+ * every line item. A line item that is grouped as part of a line item minimum is
2188
+ * always returned; an invoice-level minimum does not exempt it.
2189
+ */
2190
+ include_zero_quantity_line_items?: boolean | null;
2191
+ }
2192
+
2165
2193
  export interface InvoiceFetchUpcomingParams {
2166
2194
  subscription_id: string;
2195
+
2196
+ /**
2197
+ * Whether to return line items with a quantity of zero. When omitted, Orb returns
2198
+ * every line item. A line item that is grouped as part of a line item minimum is
2199
+ * always returned; an invoice-level minimum does not exempt it.
2200
+ */
2201
+ include_zero_quantity_line_items?: boolean | null;
2167
2202
  }
2168
2203
 
2169
2204
  export interface InvoiceIssueParams {
@@ -2264,6 +2299,7 @@ export declare namespace Invoices {
2264
2299
  type InvoiceUpdateParams as InvoiceUpdateParams,
2265
2300
  type InvoiceListParams as InvoiceListParams,
2266
2301
  type InvoiceDeleteLineItemParams as InvoiceDeleteLineItemParams,
2302
+ type InvoiceFetchParams as InvoiceFetchParams,
2267
2303
  type InvoiceFetchUpcomingParams as InvoiceFetchUpcomingParams,
2268
2304
  type InvoiceIssueParams as InvoiceIssueParams,
2269
2305
  type InvoiceIssueSummaryParams as InvoiceIssueSummaryParams,
@@ -564,6 +564,14 @@ export namespace ChangedSubscriptionResources {
564
564
  */
565
565
  eligible_to_issue_at: string | null;
566
566
 
567
+ /**
568
+ * The number of line items omitted from `line_items` because they have zero
569
+ * quantity. Amounts such as `subtotal` and `total` are computed over every line
570
+ * item on the invoice, including the omitted ones. In rare circumstances, hidden
571
+ * line items may still contribute to these amounts.
572
+ */
573
+ hidden_line_item_count: number;
574
+
567
575
  /**
568
576
  * A URL for the customer-facing invoice portal. This URL expires 60 days after the
569
577
  * link is generated, or 30 days after the invoice's due date — whichever is later.
@@ -2004,6 +2012,14 @@ export interface Invoice {
2004
2012
  */
2005
2013
  eligible_to_issue_at: string | null;
2006
2014
 
2015
+ /**
2016
+ * The number of line items omitted from `line_items` because they have zero
2017
+ * quantity. Amounts such as `subtotal` and `total` are computed over every line
2018
+ * item on the invoice, including the omitted ones. In rare circumstances, hidden
2019
+ * line items may still contribute to these amounts.
2020
+ */
2021
+ hidden_line_item_count: number;
2022
+
2007
2023
  /**
2008
2024
  * A URL for the customer-facing invoice portal. This URL expires 60 days after the
2009
2025
  * link is generated, or 30 days after the invoice's due date — whichever is later.
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '6.18.0'; // x-release-please-version
1
+ export const VERSION = '6.19.0'; // x-release-please-version
package/version.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "6.18.0";
1
+ export declare const VERSION = "6.19.0";
2
2
  //# sourceMappingURL=version.d.mts.map
package/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "6.18.0";
1
+ export declare const VERSION = "6.19.0";
2
2
  //# sourceMappingURL=version.d.ts.map
package/version.js CHANGED
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.VERSION = void 0;
4
- exports.VERSION = '6.18.0'; // x-release-please-version
4
+ exports.VERSION = '6.19.0'; // x-release-please-version
5
5
  //# sourceMappingURL=version.js.map
package/version.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = '6.18.0'; // x-release-please-version
1
+ export const VERSION = '6.19.0'; // x-release-please-version
2
2
  //# sourceMappingURL=version.mjs.map