orb-billing 1.22.0 → 1.24.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/CHANGELOG.md +21 -0
- package/core.d.ts.map +1 -1
- package/core.js +8 -10
- package/core.js.map +1 -1
- package/core.mjs +8 -10
- package/core.mjs.map +1 -1
- package/index.d.mts +2 -2
- package/index.d.ts +2 -2
- package/index.d.ts.map +1 -1
- package/index.js +4 -0
- package/index.js.map +1 -1
- package/index.mjs +4 -0
- package/index.mjs.map +1 -1
- package/package.json +3 -1
- package/resources/coupons/coupons.d.ts +60 -2
- package/resources/coupons/coupons.d.ts.map +1 -1
- package/resources/coupons/coupons.js.map +1 -1
- package/resources/coupons/coupons.mjs.map +1 -1
- package/resources/credit-notes.d.ts +57 -5
- package/resources/credit-notes.d.ts.map +1 -1
- package/resources/credit-notes.js.map +1 -1
- package/resources/credit-notes.mjs.map +1 -1
- package/resources/customers/balance-transactions.d.ts +2 -2
- package/resources/customers/balance-transactions.d.ts.map +1 -1
- package/resources/customers/balance-transactions.js.map +1 -1
- package/resources/customers/balance-transactions.mjs.map +1 -1
- package/resources/customers/customers.d.ts +696 -8
- package/resources/customers/customers.d.ts.map +1 -1
- package/resources/customers/customers.js.map +1 -1
- package/resources/customers/customers.mjs.map +1 -1
- package/resources/customers/usage.d.ts +74 -58
- package/resources/customers/usage.d.ts.map +1 -1
- package/resources/customers/usage.js +14 -14
- package/resources/customers/usage.js.map +1 -1
- package/resources/customers/usage.mjs +14 -14
- package/resources/customers/usage.mjs.map +1 -1
- package/resources/events/events.d.ts +40 -40
- package/resources/events/events.js +40 -40
- package/resources/events/events.mjs +40 -40
- package/resources/index.d.ts +4 -3
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +19 -4
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +2 -1
- package/resources/index.mjs.map +1 -1
- package/resources/invoice-line-items.d.ts +2 -2
- package/resources/invoice-line-items.d.ts.map +1 -1
- package/resources/invoices.d.ts +358 -71
- package/resources/invoices.d.ts.map +1 -1
- package/resources/invoices.js.map +1 -1
- package/resources/invoices.mjs.map +1 -1
- package/resources/plans/plans.d.ts +648 -4
- package/resources/plans/plans.d.ts.map +1 -1
- package/resources/plans/plans.js.map +1 -1
- package/resources/plans/plans.mjs.map +1 -1
- package/resources/prices/index.d.ts +1 -1
- package/resources/prices/index.d.ts.map +1 -1
- package/resources/prices/index.js +3 -3
- package/resources/prices/index.js.map +1 -1
- package/resources/prices/index.mjs +1 -1
- package/resources/prices/index.mjs.map +1 -1
- package/resources/prices/prices.d.ts +56 -83
- package/resources/prices/prices.d.ts.map +1 -1
- package/resources/prices/prices.js.map +1 -1
- package/resources/prices/prices.mjs.map +1 -1
- package/resources/shared.d.ts +62 -0
- package/resources/shared.d.ts.map +1 -0
- package/resources/shared.js +4 -0
- package/resources/shared.js.map +1 -0
- package/resources/shared.mjs +3 -0
- package/resources/shared.mjs.map +1 -0
- package/resources/subscriptions.d.ts +1084 -241
- package/resources/subscriptions.d.ts.map +1 -1
- package/resources/subscriptions.js.map +1 -1
- package/resources/subscriptions.mjs.map +1 -1
- package/src/_shims/index.d.ts +1 -1
- package/src/_shims/index.mjs +1 -1
- package/src/core.ts +8 -12
- package/src/index.ts +8 -3
- package/src/resources/coupons/coupons.ts +82 -8
- package/src/resources/coupons/subscriptions.ts +7 -7
- package/src/resources/credit-notes.ts +86 -10
- package/src/resources/customers/balance-transactions.ts +23 -7
- package/src/resources/customers/costs.ts +5 -5
- package/src/resources/customers/credits/credits.ts +6 -6
- package/src/resources/customers/credits/ledger.ts +5 -5
- package/src/resources/customers/customers.ts +1153 -21
- package/src/resources/customers/usage.ts +83 -65
- package/src/resources/events/backfills.ts +5 -5
- package/src/resources/events/events.ts +45 -45
- package/src/resources/index.ts +3 -3
- package/src/resources/invoice-line-items.ts +6 -6
- package/src/resources/invoices.ts +604 -97
- package/src/resources/items.ts +5 -5
- package/src/resources/metrics.ts +5 -5
- package/src/resources/plans/external-plan-id.ts +5 -5
- package/src/resources/plans/plans.ts +817 -11
- package/src/resources/prices/external-price-id.ts +3 -3
- package/src/resources/prices/index.ts +1 -1
- package/src/resources/prices/prices.ts +73 -106
- package/src/resources/shared.ts +84 -0
- package/src/resources/subscriptions.ts +1299 -287
- package/src/resources/top-level.ts +3 -3
- package/src/version.ts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless.
|
|
2
2
|
|
|
3
|
-
import * as Core from "../
|
|
4
|
-
import { APIResource } from "../
|
|
5
|
-
import { isRequestOptions } from "../
|
|
6
|
-
import * as CreditNotesAPI from "
|
|
7
|
-
import { Page, type PageParams } from "../
|
|
3
|
+
import * as Core from "../core";
|
|
4
|
+
import { APIResource } from "../resource";
|
|
5
|
+
import { isRequestOptions } from "../core";
|
|
6
|
+
import * as CreditNotesAPI from "./credit-notes";
|
|
7
|
+
import { Page, type PageParams } from "../pagination";
|
|
8
8
|
|
|
9
9
|
export class CreditNotes extends APIResource {
|
|
10
10
|
/**
|
|
@@ -68,7 +68,7 @@ export interface CreditNote {
|
|
|
68
68
|
/**
|
|
69
69
|
* Any discounts applied on the original invoice.
|
|
70
70
|
*/
|
|
71
|
-
discounts: Array<
|
|
71
|
+
discounts: Array<CreditNote.Discount>;
|
|
72
72
|
|
|
73
73
|
/**
|
|
74
74
|
* The id of the invoice resource that this credit note is applied to.
|
|
@@ -83,7 +83,7 @@ export interface CreditNote {
|
|
|
83
83
|
/**
|
|
84
84
|
* The maximum amount applied on the original invoice
|
|
85
85
|
*/
|
|
86
|
-
maximum_amount_adjustment:
|
|
86
|
+
maximum_amount_adjustment: CreditNote.MaximumAmountAdjustment | null;
|
|
87
87
|
|
|
88
88
|
/**
|
|
89
89
|
* An optional memo supplied on the credit note.
|
|
@@ -95,7 +95,7 @@ export interface CreditNote {
|
|
|
95
95
|
*/
|
|
96
96
|
minimum_amount_refunded: string | null;
|
|
97
97
|
|
|
98
|
-
reason: 'Duplicate' | 'Fraudulent' | 'Order change' | 'Product unsatisfactory';
|
|
98
|
+
reason: 'Duplicate' | 'Fraudulent' | 'Order change' | 'Product unsatisfactory' | null;
|
|
99
99
|
|
|
100
100
|
/**
|
|
101
101
|
* The total prior to any creditable invoice-level discounts or minimums.
|
|
@@ -122,6 +122,26 @@ export namespace CreditNote {
|
|
|
122
122
|
external_customer_id: string | null;
|
|
123
123
|
}
|
|
124
124
|
|
|
125
|
+
export interface Discount {
|
|
126
|
+
amount_applied: string;
|
|
127
|
+
|
|
128
|
+
discount_type: 'percentage';
|
|
129
|
+
|
|
130
|
+
percentage_discount: number;
|
|
131
|
+
|
|
132
|
+
applies_to_prices?: Array<Discount.AppliesToPrice> | null;
|
|
133
|
+
|
|
134
|
+
reason?: string | null;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
export namespace Discount {
|
|
138
|
+
export interface AppliesToPrice {
|
|
139
|
+
id: string;
|
|
140
|
+
|
|
141
|
+
name: string;
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
|
|
125
145
|
export interface LineItem {
|
|
126
146
|
/**
|
|
127
147
|
* The Orb id of this resource.
|
|
@@ -136,7 +156,7 @@ export namespace CreditNote {
|
|
|
136
156
|
/**
|
|
137
157
|
* Any line items discounts from the invoice's line item.
|
|
138
158
|
*/
|
|
139
|
-
discounts: Array<
|
|
159
|
+
discounts: Array<LineItem.Discount>;
|
|
140
160
|
|
|
141
161
|
/**
|
|
142
162
|
* The name of the corresponding invoice line item.
|
|
@@ -161,10 +181,26 @@ export namespace CreditNote {
|
|
|
161
181
|
/**
|
|
162
182
|
* Any tax amounts applied onto the line item.
|
|
163
183
|
*/
|
|
164
|
-
tax_amounts: Array<
|
|
184
|
+
tax_amounts: Array<LineItem.TaxAmount>;
|
|
165
185
|
}
|
|
166
186
|
|
|
167
187
|
export namespace LineItem {
|
|
188
|
+
export interface Discount {
|
|
189
|
+
id: string;
|
|
190
|
+
|
|
191
|
+
amount_applied: string;
|
|
192
|
+
|
|
193
|
+
applies_to_price_ids: Array<string>;
|
|
194
|
+
|
|
195
|
+
discount_type: 'percentage' | 'amount';
|
|
196
|
+
|
|
197
|
+
percentage_discount: number;
|
|
198
|
+
|
|
199
|
+
amount_discount?: string | null;
|
|
200
|
+
|
|
201
|
+
reason?: string | null;
|
|
202
|
+
}
|
|
203
|
+
|
|
168
204
|
export interface SubLineItem {
|
|
169
205
|
amount: string;
|
|
170
206
|
|
|
@@ -172,6 +208,46 @@ export namespace CreditNote {
|
|
|
172
208
|
|
|
173
209
|
quantity: number | null;
|
|
174
210
|
}
|
|
211
|
+
|
|
212
|
+
export interface TaxAmount {
|
|
213
|
+
/**
|
|
214
|
+
* The amount of additional tax incurred by this tax rate.
|
|
215
|
+
*/
|
|
216
|
+
amount: string;
|
|
217
|
+
|
|
218
|
+
/**
|
|
219
|
+
* The human-readable description of the applied tax rate.
|
|
220
|
+
*/
|
|
221
|
+
tax_rate_description: string;
|
|
222
|
+
|
|
223
|
+
/**
|
|
224
|
+
* The tax rate percentage, out of 100.
|
|
225
|
+
*/
|
|
226
|
+
tax_rate_percentage: string | null;
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
/**
|
|
231
|
+
* The maximum amount applied on the original invoice
|
|
232
|
+
*/
|
|
233
|
+
export interface MaximumAmountAdjustment {
|
|
234
|
+
amount_applied: string;
|
|
235
|
+
|
|
236
|
+
discount_type: 'percentage';
|
|
237
|
+
|
|
238
|
+
percentage_discount: number;
|
|
239
|
+
|
|
240
|
+
applies_to_prices?: Array<MaximumAmountAdjustment.AppliesToPrice> | null;
|
|
241
|
+
|
|
242
|
+
reason?: string | null;
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
export namespace MaximumAmountAdjustment {
|
|
246
|
+
export interface AppliesToPrice {
|
|
247
|
+
id: string;
|
|
248
|
+
|
|
249
|
+
name: string;
|
|
250
|
+
}
|
|
175
251
|
}
|
|
176
252
|
}
|
|
177
253
|
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless.
|
|
2
2
|
|
|
3
|
-
import * as Core from "../../
|
|
4
|
-
import { APIResource } from "../../
|
|
5
|
-
import { isRequestOptions } from "../../
|
|
6
|
-
import * as BalanceTransactionsAPI from "
|
|
7
|
-
import { Page, type PageParams } from "../../
|
|
3
|
+
import * as Core from "../../core";
|
|
4
|
+
import { APIResource } from "../../resource";
|
|
5
|
+
import { isRequestOptions } from "../../core";
|
|
6
|
+
import * as BalanceTransactionsAPI from "./balance-transactions";
|
|
7
|
+
import { Page, type PageParams } from "../../pagination";
|
|
8
8
|
|
|
9
9
|
export class BalanceTransactions extends APIResource {
|
|
10
10
|
/**
|
|
@@ -82,7 +82,15 @@ export interface BalanceTransactionCreateResponse {
|
|
|
82
82
|
*/
|
|
83
83
|
id: string;
|
|
84
84
|
|
|
85
|
-
action:
|
|
85
|
+
action:
|
|
86
|
+
| 'applied_to_invoice'
|
|
87
|
+
| 'manual_adjustment'
|
|
88
|
+
| 'prorated_refund'
|
|
89
|
+
| 'revert_prorated_refund'
|
|
90
|
+
| 'return_from_voiding'
|
|
91
|
+
| 'credit_note_applied'
|
|
92
|
+
| 'credit_note_voided'
|
|
93
|
+
| 'overpayment_refund';
|
|
86
94
|
|
|
87
95
|
/**
|
|
88
96
|
* The value of the amount changed in the transaction.
|
|
@@ -140,7 +148,15 @@ export interface BalanceTransactionListResponse {
|
|
|
140
148
|
*/
|
|
141
149
|
id: string;
|
|
142
150
|
|
|
143
|
-
action:
|
|
151
|
+
action:
|
|
152
|
+
| 'applied_to_invoice'
|
|
153
|
+
| 'manual_adjustment'
|
|
154
|
+
| 'prorated_refund'
|
|
155
|
+
| 'revert_prorated_refund'
|
|
156
|
+
| 'return_from_voiding'
|
|
157
|
+
| 'credit_note_applied'
|
|
158
|
+
| 'credit_note_voided'
|
|
159
|
+
| 'overpayment_refund';
|
|
144
160
|
|
|
145
161
|
/**
|
|
146
162
|
* The value of the amount changed in the transaction.
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless.
|
|
2
2
|
|
|
3
|
-
import * as Core from "../../
|
|
4
|
-
import { APIResource } from "../../
|
|
5
|
-
import { isRequestOptions } from "../../
|
|
6
|
-
import * as CostsAPI from "
|
|
7
|
-
import * as PricesAPI from "
|
|
3
|
+
import * as Core from "../../core";
|
|
4
|
+
import { APIResource } from "../../resource";
|
|
5
|
+
import { isRequestOptions } from "../../core";
|
|
6
|
+
import * as CostsAPI from "./costs";
|
|
7
|
+
import * as PricesAPI from "../prices/prices";
|
|
8
8
|
|
|
9
9
|
export class Costs extends APIResource {
|
|
10
10
|
/**
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless.
|
|
2
2
|
|
|
3
|
-
import * as Core from "../../../
|
|
4
|
-
import { APIResource } from "../../../
|
|
5
|
-
import { isRequestOptions } from "../../../
|
|
6
|
-
import * as CreditsAPI from "
|
|
7
|
-
import * as LedgerAPI from "
|
|
8
|
-
import { Page, type PageParams } from "../../../
|
|
3
|
+
import * as Core from "../../../core";
|
|
4
|
+
import { APIResource } from "../../../resource";
|
|
5
|
+
import { isRequestOptions } from "../../../core";
|
|
6
|
+
import * as CreditsAPI from "./credits";
|
|
7
|
+
import * as LedgerAPI from "./ledger";
|
|
8
|
+
import { Page, type PageParams } from "../../../pagination";
|
|
9
9
|
|
|
10
10
|
export class Credits extends APIResource {
|
|
11
11
|
ledger: LedgerAPI.Ledger = new LedgerAPI.Ledger(this.client);
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless.
|
|
2
2
|
|
|
3
|
-
import * as Core from "../../../
|
|
4
|
-
import { APIResource } from "../../../
|
|
5
|
-
import { isRequestOptions } from "../../../
|
|
6
|
-
import * as LedgerAPI from "
|
|
7
|
-
import { Page, type PageParams } from "../../../
|
|
3
|
+
import * as Core from "../../../core";
|
|
4
|
+
import { APIResource } from "../../../resource";
|
|
5
|
+
import { isRequestOptions } from "../../../core";
|
|
6
|
+
import * as LedgerAPI from "./ledger";
|
|
7
|
+
import { Page, type PageParams } from "../../../pagination";
|
|
8
8
|
|
|
9
9
|
export class Ledger extends APIResource {
|
|
10
10
|
/**
|