orb-billing 4.33.0 → 4.47.2
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 +188 -0
- package/LICENSE +1 -1
- package/README.md +10 -1
- package/core.d.ts +4 -5
- package/core.d.ts.map +1 -1
- package/core.js +16 -11
- package/core.js.map +1 -1
- package/core.mjs +16 -11
- package/core.mjs.map +1 -1
- package/error.d.ts +30 -36
- package/error.d.ts.map +1 -1
- package/error.js +24 -43
- package/error.js.map +1 -1
- package/error.mjs +24 -43
- package/error.mjs.map +1 -1
- package/index.d.mts +43 -109
- package/index.d.ts +43 -109
- package/index.d.ts.map +1 -1
- package/index.js +71 -33
- package/index.js.map +1 -1
- package/index.mjs +43 -32
- package/index.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/alerts.d.ts +58 -19
- package/resources/alerts.d.ts.map +1 -1
- package/resources/alerts.js +19 -37
- package/resources/alerts.js.map +1 -1
- package/resources/alerts.mjs +19 -14
- package/resources/alerts.mjs.map +1 -1
- package/resources/coupons/coupons.d.ts +3 -7
- package/resources/coupons/coupons.d.ts.map +1 -1
- package/resources/coupons/coupons.js +3 -5
- package/resources/coupons/coupons.js.map +1 -1
- package/resources/coupons/coupons.mjs +3 -5
- package/resources/coupons/coupons.mjs.map +1 -1
- package/resources/coupons/index.d.ts +2 -2
- package/resources/coupons/index.d.ts.map +1 -1
- package/resources/coupons/index.js.map +1 -1
- package/resources/coupons/index.mjs.map +1 -1
- package/resources/coupons/subscriptions.d.ts +1 -2
- package/resources/coupons/subscriptions.d.ts.map +1 -1
- package/resources/coupons/subscriptions.js +0 -2
- package/resources/coupons/subscriptions.js.map +1 -1
- package/resources/coupons/subscriptions.mjs +0 -2
- package/resources/coupons/subscriptions.mjs.map +1 -1
- package/resources/credit-notes.d.ts +29 -4
- package/resources/credit-notes.d.ts.map +1 -1
- package/resources/credit-notes.js +8 -27
- package/resources/credit-notes.js.map +1 -1
- package/resources/credit-notes.mjs +8 -4
- package/resources/credit-notes.mjs.map +1 -1
- package/resources/customers/balance-transactions.d.ts +1 -6
- package/resources/customers/balance-transactions.d.ts.map +1 -1
- package/resources/customers/balance-transactions.js +1 -27
- package/resources/customers/balance-transactions.js.map +1 -1
- package/resources/customers/balance-transactions.mjs +1 -4
- package/resources/customers/balance-transactions.mjs.map +1 -1
- package/resources/customers/costs.d.ts +1 -5
- package/resources/customers/costs.d.ts.map +1 -1
- package/resources/customers/costs.js +0 -2
- package/resources/customers/costs.js.map +1 -1
- package/resources/customers/costs.mjs +0 -2
- package/resources/customers/costs.mjs.map +1 -1
- package/resources/customers/credits/credits.d.ts +15 -31
- package/resources/customers/credits/credits.d.ts.map +1 -1
- package/resources/customers/credits/credits.js +10 -11
- package/resources/customers/credits/credits.js.map +1 -1
- package/resources/customers/credits/credits.mjs +10 -11
- package/resources/customers/credits/credits.mjs.map +1 -1
- package/resources/customers/credits/index.d.ts +3 -3
- package/resources/customers/credits/index.d.ts.map +1 -1
- package/resources/customers/credits/index.js.map +1 -1
- package/resources/customers/credits/index.mjs.map +1 -1
- package/resources/customers/credits/ledger.d.ts +15 -23
- package/resources/customers/credits/ledger.d.ts.map +1 -1
- package/resources/customers/credits/ledger.js +12 -36
- package/resources/customers/credits/ledger.js.map +1 -1
- package/resources/customers/credits/ledger.mjs +12 -13
- package/resources/customers/credits/ledger.mjs.map +1 -1
- package/resources/customers/credits/top-ups.d.ts +1 -11
- package/resources/customers/credits/top-ups.d.ts.map +1 -1
- package/resources/customers/credits/top-ups.js +2 -28
- package/resources/customers/credits/top-ups.js.map +1 -1
- package/resources/customers/credits/top-ups.mjs +2 -5
- package/resources/customers/credits/top-ups.mjs.map +1 -1
- package/resources/customers/customers.d.ts +7 -25
- package/resources/customers/customers.d.ts.map +1 -1
- package/resources/customers/customers.js +10 -10
- package/resources/customers/customers.js.map +1 -1
- package/resources/customers/customers.mjs +10 -10
- package/resources/customers/customers.mjs.map +1 -1
- package/resources/customers/index.d.ts +4 -4
- package/resources/customers/index.d.ts.map +1 -1
- package/resources/customers/index.js.map +1 -1
- package/resources/customers/index.mjs.map +1 -1
- package/resources/dimensional-price-groups/dimensional-price-groups.d.ts +90 -0
- package/resources/dimensional-price-groups/dimensional-price-groups.d.ts.map +1 -0
- package/resources/dimensional-price-groups/dimensional-price-groups.js +73 -0
- package/resources/dimensional-price-groups/dimensional-price-groups.js.map +1 -0
- package/resources/dimensional-price-groups/dimensional-price-groups.mjs +45 -0
- package/resources/dimensional-price-groups/dimensional-price-groups.mjs.map +1 -0
- package/resources/dimensional-price-groups/external-dimensional-price-group-id.d.ts +10 -0
- package/resources/dimensional-price-groups/external-dimensional-price-group-id.d.ts.map +1 -0
- package/resources/dimensional-price-groups/external-dimensional-price-group-id.js +15 -0
- package/resources/dimensional-price-groups/external-dimensional-price-group-id.js.map +1 -0
- package/resources/dimensional-price-groups/external-dimensional-price-group-id.mjs +11 -0
- package/resources/dimensional-price-groups/external-dimensional-price-group-id.mjs.map +1 -0
- package/resources/dimensional-price-groups/index.d.ts +3 -0
- package/resources/dimensional-price-groups/index.d.ts.map +1 -0
- package/resources/dimensional-price-groups/index.js +9 -0
- package/resources/dimensional-price-groups/index.js.map +1 -0
- package/resources/dimensional-price-groups/index.mjs +4 -0
- package/resources/dimensional-price-groups/index.mjs.map +1 -0
- package/resources/events/backfills.d.ts +5 -11
- package/resources/events/backfills.d.ts.map +1 -1
- package/resources/events/backfills.js +5 -29
- package/resources/events/backfills.js.map +1 -1
- package/resources/events/backfills.mjs +5 -6
- package/resources/events/backfills.mjs.map +1 -1
- package/resources/events/events.d.ts +7 -22
- package/resources/events/events.d.ts.map +1 -1
- package/resources/events/events.js +7 -7
- package/resources/events/events.js.map +1 -1
- package/resources/events/events.mjs +7 -7
- package/resources/events/events.mjs.map +1 -1
- package/resources/events/index.d.ts +3 -3
- package/resources/events/index.d.ts.map +1 -1
- package/resources/events/index.js.map +1 -1
- package/resources/events/index.mjs.map +1 -1
- package/resources/events/volume.d.ts +1 -3
- package/resources/events/volume.d.ts.map +1 -1
- package/resources/events/volume.js +0 -2
- package/resources/events/volume.js.map +1 -1
- package/resources/events/volume.mjs +0 -2
- package/resources/events/volume.mjs.map +1 -1
- package/resources/index.d.ts +14 -13
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +10 -7
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +8 -7
- package/resources/index.mjs.map +1 -1
- package/resources/invoice-line-items.d.ts +1 -3
- package/resources/invoice-line-items.d.ts.map +1 -1
- package/resources/invoice-line-items.js +0 -2
- package/resources/invoice-line-items.js.map +1 -1
- package/resources/invoice-line-items.mjs +0 -2
- package/resources/invoice-line-items.mjs.map +1 -1
- package/resources/invoices.d.ts +78 -13
- package/resources/invoices.d.ts.map +1 -1
- package/resources/invoices.js +8 -27
- package/resources/invoices.js.map +1 -1
- package/resources/invoices.mjs +8 -4
- package/resources/invoices.mjs.map +1 -1
- package/resources/items.d.ts +1 -6
- package/resources/items.d.ts.map +1 -1
- package/resources/items.js +1 -27
- package/resources/items.js.map +1 -1
- package/resources/items.mjs +1 -4
- package/resources/items.mjs.map +1 -1
- package/resources/metrics.d.ts +1 -6
- package/resources/metrics.d.ts.map +1 -1
- package/resources/metrics.js +1 -27
- package/resources/metrics.js.map +1 -1
- package/resources/metrics.mjs +1 -4
- package/resources/metrics.mjs.map +1 -1
- package/resources/plans/external-plan-id.d.ts +1 -2
- package/resources/plans/external-plan-id.d.ts.map +1 -1
- package/resources/plans/external-plan-id.js +0 -2
- package/resources/plans/external-plan-id.js.map +1 -1
- package/resources/plans/external-plan-id.mjs +0 -2
- package/resources/plans/external-plan-id.mjs.map +1 -1
- package/resources/plans/index.d.ts +2 -2
- package/resources/plans/index.d.ts.map +1 -1
- package/resources/plans/index.js.map +1 -1
- package/resources/plans/index.mjs +1 -1
- package/resources/plans/index.mjs.map +1 -1
- package/resources/plans/plans.d.ts +331 -9
- package/resources/plans/plans.d.ts.map +1 -1
- package/resources/plans/plans.js +3 -5
- package/resources/plans/plans.js.map +1 -1
- package/resources/plans/plans.mjs +3 -5
- package/resources/plans/plans.mjs.map +1 -1
- package/resources/prices/external-price-id.d.ts +1 -2
- package/resources/prices/external-price-id.d.ts.map +1 -1
- package/resources/prices/external-price-id.js +0 -2
- package/resources/prices/external-price-id.js.map +1 -1
- package/resources/prices/external-price-id.mjs +0 -2
- package/resources/prices/external-price-id.mjs.map +1 -1
- package/resources/prices/index.d.ts +2 -2
- 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 +339 -13
- package/resources/prices/prices.d.ts.map +1 -1
- package/resources/prices/prices.js +3 -5
- package/resources/prices/prices.js.map +1 -1
- package/resources/prices/prices.mjs +3 -5
- package/resources/prices/prices.mjs.map +1 -1
- package/resources/shared.d.ts +14 -16
- package/resources/shared.d.ts.map +1 -1
- package/resources/subscriptions.d.ts +7629 -191
- package/resources/subscriptions.d.ts.map +1 -1
- package/resources/subscriptions.js +2 -29
- package/resources/subscriptions.js.map +1 -1
- package/resources/subscriptions.mjs +2 -6
- package/resources/subscriptions.mjs.map +1 -1
- package/resources/top-level.d.ts +1 -2
- package/resources/top-level.d.ts.map +1 -1
- package/resources/top-level.js +0 -2
- package/resources/top-level.js.map +1 -1
- package/resources/top-level.mjs +0 -2
- package/resources/top-level.mjs.map +1 -1
- package/src/core.ts +23 -19
- package/src/error.ts +82 -125
- package/src/index.ts +334 -130
- package/src/resources/alerts.ts +117 -24
- package/src/resources/coupons/coupons.ts +13 -8
- package/src/resources/coupons/index.ts +2 -2
- package/src/resources/coupons/subscriptions.ts +2 -3
- package/src/resources/credit-notes.ts +45 -5
- package/src/resources/customers/balance-transactions.ts +10 -7
- package/src/resources/customers/costs.ts +7 -6
- package/src/resources/customers/credits/credits.ts +82 -32
- package/src/resources/customers/credits/index.ts +20 -20
- package/src/resources/customers/credits/ledger.ts +32 -26
- package/src/resources/customers/credits/top-ups.ts +16 -12
- package/src/resources/customers/customers.ts +68 -26
- package/src/resources/customers/index.ts +17 -17
- package/src/resources/dimensional-price-groups/dimensional-price-groups.ts +146 -0
- package/src/resources/dimensional-price-groups/external-dimensional-price-group-id.ts +20 -0
- package/src/resources/dimensional-price-groups/index.ts +10 -0
- package/src/resources/events/backfills.ts +17 -12
- package/src/resources/events/events.ts +42 -23
- package/src/resources/events/index.ts +15 -15
- package/src/resources/events/volume.ts +2 -4
- package/src/resources/index.ts +113 -67
- package/src/resources/invoice-line-items.ts +5 -4
- package/src/resources/invoices.ts +108 -14
- package/src/resources/items.ts +10 -7
- package/src/resources/metrics.ts +10 -7
- package/src/resources/plans/external-plan-id.ts +2 -3
- package/src/resources/plans/index.ts +9 -2
- package/src/resources/plans/plans.ts +424 -9
- package/src/resources/prices/external-price-id.ts +2 -3
- package/src/resources/prices/index.ts +8 -8
- package/src/resources/prices/prices.ts +471 -15
- package/src/resources/shared.ts +18 -20
- package/src/resources/subscriptions.ts +9231 -400
- package/src/resources/top-level.ts +2 -3
- package/src/version.ts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
import { APIResource } from '../../resource';
|
|
4
4
|
import { isRequestOptions } from '../../core';
|
|
5
5
|
import * as Core from '../../core';
|
|
6
|
-
import * as CouponsAPI from './coupons';
|
|
7
6
|
import * as Shared from '../shared';
|
|
8
7
|
import * as SubscriptionsAPI from './subscriptions';
|
|
8
|
+
import { SubscriptionListParams, Subscriptions } from './subscriptions';
|
|
9
9
|
import { Page, type PageParams } from '../../pagination';
|
|
10
10
|
|
|
11
11
|
export class Coupons extends APIResource {
|
|
@@ -186,11 +186,16 @@ export interface CouponListParams extends PageParams {
|
|
|
186
186
|
show_archived?: boolean | null;
|
|
187
187
|
}
|
|
188
188
|
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
export
|
|
194
|
-
|
|
195
|
-
|
|
189
|
+
Coupons.CouponsPage = CouponsPage;
|
|
190
|
+
Coupons.Subscriptions = Subscriptions;
|
|
191
|
+
|
|
192
|
+
export declare namespace Coupons {
|
|
193
|
+
export {
|
|
194
|
+
type Coupon as Coupon,
|
|
195
|
+
CouponsPage as CouponsPage,
|
|
196
|
+
type CouponCreateParams as CouponCreateParams,
|
|
197
|
+
type CouponListParams as CouponListParams,
|
|
198
|
+
};
|
|
199
|
+
|
|
200
|
+
export { Subscriptions as Subscriptions, type SubscriptionListParams as SubscriptionListParams };
|
|
196
201
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
|
-
export {
|
|
4
|
-
export {
|
|
3
|
+
export { CouponsPage, Coupons, type Coupon, type CouponCreateParams, type CouponListParams } from './coupons';
|
|
4
|
+
export { Subscriptions, type SubscriptionListParams } from './subscriptions';
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
import { APIResource } from '../../resource';
|
|
4
4
|
import { isRequestOptions } from '../../core';
|
|
5
5
|
import * as Core from '../../core';
|
|
6
|
-
import * as CouponsSubscriptionsAPI from './subscriptions';
|
|
7
6
|
import * as SubscriptionsAPI from '../subscriptions';
|
|
8
7
|
import { SubscriptionsPage } from '../subscriptions';
|
|
9
8
|
import { type PageParams } from '../../pagination';
|
|
@@ -41,8 +40,8 @@ export class Subscriptions extends APIResource {
|
|
|
41
40
|
|
|
42
41
|
export interface SubscriptionListParams extends PageParams {}
|
|
43
42
|
|
|
44
|
-
export namespace Subscriptions {
|
|
45
|
-
export
|
|
43
|
+
export declare namespace Subscriptions {
|
|
44
|
+
export { type SubscriptionListParams as SubscriptionListParams };
|
|
46
45
|
}
|
|
47
46
|
|
|
48
47
|
export { SubscriptionsPage };
|
|
@@ -3,10 +3,17 @@
|
|
|
3
3
|
import { APIResource } from '../resource';
|
|
4
4
|
import { isRequestOptions } from '../core';
|
|
5
5
|
import * as Core from '../core';
|
|
6
|
-
import * as CreditNotesAPI from './credit-notes';
|
|
7
6
|
import { Page, type PageParams } from '../pagination';
|
|
8
7
|
|
|
9
8
|
export class CreditNotes extends APIResource {
|
|
9
|
+
/**
|
|
10
|
+
* This endpoint is used to create a single
|
|
11
|
+
* [`Credit Note`](../guides/invoicing/credit-notes).
|
|
12
|
+
*/
|
|
13
|
+
create(body: CreditNoteCreateParams, options?: Core.RequestOptions): Core.APIPromise<CreditNote> {
|
|
14
|
+
return this._client.post('/credit_notes', { body, ...options });
|
|
15
|
+
}
|
|
16
|
+
|
|
10
17
|
/**
|
|
11
18
|
* Get a paginated list of CreditNotes. Users can also filter by customer_id,
|
|
12
19
|
* subscription_id, or external_customer_id. The credit notes will be returned in
|
|
@@ -238,10 +245,43 @@ export namespace CreditNote {
|
|
|
238
245
|
}
|
|
239
246
|
}
|
|
240
247
|
|
|
248
|
+
export interface CreditNoteCreateParams {
|
|
249
|
+
line_items: Array<CreditNoteCreateParams.LineItem>;
|
|
250
|
+
|
|
251
|
+
/**
|
|
252
|
+
* An optional memo to attach to the credit note.
|
|
253
|
+
*/
|
|
254
|
+
memo?: string | null;
|
|
255
|
+
|
|
256
|
+
/**
|
|
257
|
+
* An optional reason for the credit note.
|
|
258
|
+
*/
|
|
259
|
+
reason?: 'duplicate' | 'fraudulent' | 'order_change' | 'product_unsatisfactory' | null;
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
export namespace CreditNoteCreateParams {
|
|
263
|
+
export interface LineItem {
|
|
264
|
+
/**
|
|
265
|
+
* The total amount in the invoice's currency to credit this line item.
|
|
266
|
+
*/
|
|
267
|
+
amount: string;
|
|
268
|
+
|
|
269
|
+
/**
|
|
270
|
+
* The ID of the line item to credit.
|
|
271
|
+
*/
|
|
272
|
+
invoice_line_item_id: string;
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
|
|
241
276
|
export interface CreditNoteListParams extends PageParams {}
|
|
242
277
|
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
export
|
|
278
|
+
CreditNotes.CreditNotesPage = CreditNotesPage;
|
|
279
|
+
|
|
280
|
+
export declare namespace CreditNotes {
|
|
281
|
+
export {
|
|
282
|
+
type CreditNote as CreditNote,
|
|
283
|
+
CreditNotesPage as CreditNotesPage,
|
|
284
|
+
type CreditNoteCreateParams as CreditNoteCreateParams,
|
|
285
|
+
type CreditNoteListParams as CreditNoteListParams,
|
|
286
|
+
};
|
|
247
287
|
}
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
import { APIResource } from '../../resource';
|
|
4
4
|
import { isRequestOptions } from '../../core';
|
|
5
5
|
import * as Core from '../../core';
|
|
6
|
-
import * as BalanceTransactionsAPI from './balance-transactions';
|
|
7
6
|
import { Page, type PageParams } from '../../pagination';
|
|
8
7
|
|
|
9
8
|
export class BalanceTransactions extends APIResource {
|
|
@@ -229,10 +228,14 @@ export interface BalanceTransactionListParams extends PageParams {
|
|
|
229
228
|
'operation_time[lte]'?: string | null;
|
|
230
229
|
}
|
|
231
230
|
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
export
|
|
236
|
-
|
|
237
|
-
|
|
231
|
+
BalanceTransactions.BalanceTransactionListResponsesPage = BalanceTransactionListResponsesPage;
|
|
232
|
+
|
|
233
|
+
export declare namespace BalanceTransactions {
|
|
234
|
+
export {
|
|
235
|
+
type BalanceTransactionCreateResponse as BalanceTransactionCreateResponse,
|
|
236
|
+
type BalanceTransactionListResponse as BalanceTransactionListResponse,
|
|
237
|
+
BalanceTransactionListResponsesPage as BalanceTransactionListResponsesPage,
|
|
238
|
+
type BalanceTransactionCreateParams as BalanceTransactionCreateParams,
|
|
239
|
+
type BalanceTransactionListParams as BalanceTransactionListParams,
|
|
240
|
+
};
|
|
238
241
|
}
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
import { APIResource } from '../../resource';
|
|
4
4
|
import { isRequestOptions } from '../../core';
|
|
5
5
|
import * as Core from '../../core';
|
|
6
|
-
import * as CostsAPI from './costs';
|
|
7
6
|
import * as PricesAPI from '../prices/prices';
|
|
8
7
|
|
|
9
8
|
export class Costs extends APIResource {
|
|
@@ -892,9 +891,11 @@ export interface CostListByExternalIDParams {
|
|
|
892
891
|
view_mode?: 'periodic' | 'cumulative' | null;
|
|
893
892
|
}
|
|
894
893
|
|
|
895
|
-
export namespace Costs {
|
|
896
|
-
export
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
894
|
+
export declare namespace Costs {
|
|
895
|
+
export {
|
|
896
|
+
type CostListResponse as CostListResponse,
|
|
897
|
+
type CostListByExternalIDResponse as CostListByExternalIDResponse,
|
|
898
|
+
type CostListParams as CostListParams,
|
|
899
|
+
type CostListByExternalIDParams as CostListByExternalIDParams,
|
|
900
|
+
};
|
|
900
901
|
}
|
|
@@ -3,9 +3,34 @@
|
|
|
3
3
|
import { APIResource } from '../../../resource';
|
|
4
4
|
import { isRequestOptions } from '../../../core';
|
|
5
5
|
import * as Core from '../../../core';
|
|
6
|
-
import * as CreditsAPI from './credits';
|
|
7
6
|
import * as LedgerAPI from './ledger';
|
|
7
|
+
import {
|
|
8
|
+
Ledger,
|
|
9
|
+
LedgerCreateEntryByExternalIDParams,
|
|
10
|
+
LedgerCreateEntryByExternalIDResponse,
|
|
11
|
+
LedgerCreateEntryParams,
|
|
12
|
+
LedgerCreateEntryResponse,
|
|
13
|
+
LedgerListByExternalIDParams,
|
|
14
|
+
LedgerListByExternalIDResponse,
|
|
15
|
+
LedgerListByExternalIDResponsesPage,
|
|
16
|
+
LedgerListParams,
|
|
17
|
+
LedgerListResponse,
|
|
18
|
+
LedgerListResponsesPage,
|
|
19
|
+
} from './ledger';
|
|
8
20
|
import * as TopUpsAPI from './top-ups';
|
|
21
|
+
import {
|
|
22
|
+
TopUpCreateByExternalIDParams,
|
|
23
|
+
TopUpCreateByExternalIDResponse,
|
|
24
|
+
TopUpCreateParams,
|
|
25
|
+
TopUpCreateResponse,
|
|
26
|
+
TopUpListByExternalIDParams,
|
|
27
|
+
TopUpListByExternalIDResponse,
|
|
28
|
+
TopUpListByExternalIDResponsesPage,
|
|
29
|
+
TopUpListParams,
|
|
30
|
+
TopUpListResponse,
|
|
31
|
+
TopUpListResponsesPage,
|
|
32
|
+
TopUps,
|
|
33
|
+
} from './top-ups';
|
|
9
34
|
import { Page, type PageParams } from '../../../pagination';
|
|
10
35
|
|
|
11
36
|
export class Credits extends APIResource {
|
|
@@ -15,6 +40,9 @@ export class Credits extends APIResource {
|
|
|
15
40
|
/**
|
|
16
41
|
* Returns a paginated list of unexpired, non-zero credit blocks for a customer.
|
|
17
42
|
*
|
|
43
|
+
* If `include_all_blocks` is set to `true`, all credit blocks (including expired
|
|
44
|
+
* and depleted blocks) will be included in the response.
|
|
45
|
+
*
|
|
18
46
|
* Note that `currency` defaults to credits if not specified. To use a real world
|
|
19
47
|
* currency, set `currency` to an ISO 4217 string.
|
|
20
48
|
*/
|
|
@@ -44,6 +72,9 @@ export class Credits extends APIResource {
|
|
|
44
72
|
/**
|
|
45
73
|
* Returns a paginated list of unexpired, non-zero credit blocks for a customer.
|
|
46
74
|
*
|
|
75
|
+
* If `include_all_blocks` is set to `true`, all credit blocks (including expired
|
|
76
|
+
* and depleted blocks) will be included in the response.
|
|
77
|
+
*
|
|
47
78
|
* Note that `currency` defaults to credits if not specified. To use a real world
|
|
48
79
|
* currency, set `currency` to an ISO 4217 string.
|
|
49
80
|
*/
|
|
@@ -115,7 +146,8 @@ export interface CreditListParams extends PageParams {
|
|
|
115
146
|
currency?: string | null;
|
|
116
147
|
|
|
117
148
|
/**
|
|
118
|
-
*
|
|
149
|
+
* If set to True, all expired and depleted blocks, as well as active block will be
|
|
150
|
+
* returned.
|
|
119
151
|
*/
|
|
120
152
|
include_all_blocks?: boolean;
|
|
121
153
|
}
|
|
@@ -127,38 +159,56 @@ export interface CreditListByExternalIDParams extends PageParams {
|
|
|
127
159
|
currency?: string | null;
|
|
128
160
|
|
|
129
161
|
/**
|
|
130
|
-
*
|
|
162
|
+
* If set to True, all expired and depleted blocks, as well as active block will be
|
|
163
|
+
* returned.
|
|
131
164
|
*/
|
|
132
165
|
include_all_blocks?: boolean;
|
|
133
166
|
}
|
|
134
167
|
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
export
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
export
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
168
|
+
Credits.CreditListResponsesPage = CreditListResponsesPage;
|
|
169
|
+
Credits.CreditListByExternalIDResponsesPage = CreditListByExternalIDResponsesPage;
|
|
170
|
+
Credits.Ledger = Ledger;
|
|
171
|
+
Credits.LedgerListResponsesPage = LedgerListResponsesPage;
|
|
172
|
+
Credits.LedgerListByExternalIDResponsesPage = LedgerListByExternalIDResponsesPage;
|
|
173
|
+
Credits.TopUps = TopUps;
|
|
174
|
+
Credits.TopUpListResponsesPage = TopUpListResponsesPage;
|
|
175
|
+
Credits.TopUpListByExternalIDResponsesPage = TopUpListByExternalIDResponsesPage;
|
|
176
|
+
|
|
177
|
+
export declare namespace Credits {
|
|
178
|
+
export {
|
|
179
|
+
type CreditListResponse as CreditListResponse,
|
|
180
|
+
type CreditListByExternalIDResponse as CreditListByExternalIDResponse,
|
|
181
|
+
CreditListResponsesPage as CreditListResponsesPage,
|
|
182
|
+
CreditListByExternalIDResponsesPage as CreditListByExternalIDResponsesPage,
|
|
183
|
+
type CreditListParams as CreditListParams,
|
|
184
|
+
type CreditListByExternalIDParams as CreditListByExternalIDParams,
|
|
185
|
+
};
|
|
186
|
+
|
|
187
|
+
export {
|
|
188
|
+
Ledger as Ledger,
|
|
189
|
+
type LedgerListResponse as LedgerListResponse,
|
|
190
|
+
type LedgerCreateEntryResponse as LedgerCreateEntryResponse,
|
|
191
|
+
type LedgerCreateEntryByExternalIDResponse as LedgerCreateEntryByExternalIDResponse,
|
|
192
|
+
type LedgerListByExternalIDResponse as LedgerListByExternalIDResponse,
|
|
193
|
+
LedgerListResponsesPage as LedgerListResponsesPage,
|
|
194
|
+
LedgerListByExternalIDResponsesPage as LedgerListByExternalIDResponsesPage,
|
|
195
|
+
type LedgerListParams as LedgerListParams,
|
|
196
|
+
type LedgerCreateEntryParams as LedgerCreateEntryParams,
|
|
197
|
+
type LedgerCreateEntryByExternalIDParams as LedgerCreateEntryByExternalIDParams,
|
|
198
|
+
type LedgerListByExternalIDParams as LedgerListByExternalIDParams,
|
|
199
|
+
};
|
|
200
|
+
|
|
201
|
+
export {
|
|
202
|
+
TopUps as TopUps,
|
|
203
|
+
type TopUpCreateResponse as TopUpCreateResponse,
|
|
204
|
+
type TopUpListResponse as TopUpListResponse,
|
|
205
|
+
type TopUpCreateByExternalIDResponse as TopUpCreateByExternalIDResponse,
|
|
206
|
+
type TopUpListByExternalIDResponse as TopUpListByExternalIDResponse,
|
|
207
|
+
TopUpListResponsesPage as TopUpListResponsesPage,
|
|
208
|
+
TopUpListByExternalIDResponsesPage as TopUpListByExternalIDResponsesPage,
|
|
209
|
+
type TopUpCreateParams as TopUpCreateParams,
|
|
210
|
+
type TopUpListParams as TopUpListParams,
|
|
211
|
+
type TopUpCreateByExternalIDParams as TopUpCreateByExternalIDParams,
|
|
212
|
+
type TopUpListByExternalIDParams as TopUpListByExternalIDParams,
|
|
213
|
+
};
|
|
164
214
|
}
|
|
@@ -1,37 +1,37 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
3
|
export {
|
|
4
|
-
CreditListResponse,
|
|
5
|
-
CreditListByExternalIDResponse,
|
|
6
|
-
CreditListParams,
|
|
7
|
-
CreditListByExternalIDParams,
|
|
8
4
|
CreditListResponsesPage,
|
|
9
5
|
CreditListByExternalIDResponsesPage,
|
|
10
6
|
Credits,
|
|
7
|
+
type CreditListResponse,
|
|
8
|
+
type CreditListByExternalIDResponse,
|
|
9
|
+
type CreditListParams,
|
|
10
|
+
type CreditListByExternalIDParams,
|
|
11
11
|
} from './credits';
|
|
12
12
|
export {
|
|
13
|
-
LedgerListResponse,
|
|
14
|
-
LedgerCreateEntryResponse,
|
|
15
|
-
LedgerCreateEntryByExternalIDResponse,
|
|
16
|
-
LedgerListByExternalIDResponse,
|
|
17
|
-
LedgerListParams,
|
|
18
|
-
LedgerCreateEntryParams,
|
|
19
|
-
LedgerCreateEntryByExternalIDParams,
|
|
20
|
-
LedgerListByExternalIDParams,
|
|
21
13
|
LedgerListResponsesPage,
|
|
22
14
|
LedgerListByExternalIDResponsesPage,
|
|
23
15
|
Ledger,
|
|
16
|
+
type LedgerListResponse,
|
|
17
|
+
type LedgerCreateEntryResponse,
|
|
18
|
+
type LedgerCreateEntryByExternalIDResponse,
|
|
19
|
+
type LedgerListByExternalIDResponse,
|
|
20
|
+
type LedgerListParams,
|
|
21
|
+
type LedgerCreateEntryParams,
|
|
22
|
+
type LedgerCreateEntryByExternalIDParams,
|
|
23
|
+
type LedgerListByExternalIDParams,
|
|
24
24
|
} from './ledger';
|
|
25
25
|
export {
|
|
26
|
-
TopUpCreateResponse,
|
|
27
|
-
TopUpListResponse,
|
|
28
|
-
TopUpCreateByExternalIDResponse,
|
|
29
|
-
TopUpListByExternalIDResponse,
|
|
30
|
-
TopUpCreateParams,
|
|
31
|
-
TopUpListParams,
|
|
32
|
-
TopUpCreateByExternalIDParams,
|
|
33
|
-
TopUpListByExternalIDParams,
|
|
34
26
|
TopUpListResponsesPage,
|
|
35
27
|
TopUpListByExternalIDResponsesPage,
|
|
36
28
|
TopUps,
|
|
29
|
+
type TopUpCreateResponse,
|
|
30
|
+
type TopUpListResponse,
|
|
31
|
+
type TopUpCreateByExternalIDResponse,
|
|
32
|
+
type TopUpListByExternalIDResponse,
|
|
33
|
+
type TopUpCreateParams,
|
|
34
|
+
type TopUpListParams,
|
|
35
|
+
type TopUpCreateByExternalIDParams,
|
|
36
|
+
type TopUpListByExternalIDParams,
|
|
37
37
|
} from './top-ups';
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
import { APIResource } from '../../../resource';
|
|
4
4
|
import { isRequestOptions } from '../../../core';
|
|
5
5
|
import * as Core from '../../../core';
|
|
6
|
-
import * as LedgerAPI from './ledger';
|
|
7
6
|
import { Page, type PageParams } from '../../../pagination';
|
|
8
7
|
|
|
9
8
|
export class Ledger extends APIResource {
|
|
@@ -124,10 +123,11 @@ export class Ledger extends APIResource {
|
|
|
124
123
|
* will return a credit block that represents the changes (i.e. balance changes
|
|
125
124
|
* or transfers).
|
|
126
125
|
* 2. A ledger entry will be added to the credits ledger for this customer, and
|
|
127
|
-
* therefore returned in the
|
|
128
|
-
* response as well as
|
|
129
|
-
*
|
|
130
|
-
* created if the deduction
|
|
126
|
+
* therefore returned in the
|
|
127
|
+
* [View Credits Ledger](fetch-customer-credits-ledger) response as well as
|
|
128
|
+
* serialized in the response to this request. In the case of deductions without
|
|
129
|
+
* a specified block, multiple ledger entries may be created if the deduction
|
|
130
|
+
* spans credit blocks.
|
|
131
131
|
* 3. If `invoice_settings` is specified, an invoice will be created that reflects
|
|
132
132
|
* the cost of the credits (based on `amount` and `per_unit_cost_basis`).
|
|
133
133
|
*
|
|
@@ -243,10 +243,11 @@ export class Ledger extends APIResource {
|
|
|
243
243
|
* will return a credit block that represents the changes (i.e. balance changes
|
|
244
244
|
* or transfers).
|
|
245
245
|
* 2. A ledger entry will be added to the credits ledger for this customer, and
|
|
246
|
-
* therefore returned in the
|
|
247
|
-
* response as well as
|
|
248
|
-
*
|
|
249
|
-
* created if the deduction
|
|
246
|
+
* therefore returned in the
|
|
247
|
+
* [View Credits Ledger](fetch-customer-credits-ledger) response as well as
|
|
248
|
+
* serialized in the response to this request. In the case of deductions without
|
|
249
|
+
* a specified block, multiple ledger entries may be created if the deduction
|
|
250
|
+
* spans credit blocks.
|
|
250
251
|
* 3. If `invoice_settings` is specified, an invoice will be created that reflects
|
|
251
252
|
* the cost of the credits (based on `amount` and `per_unit_cost_basis`).
|
|
252
253
|
*
|
|
@@ -617,7 +618,7 @@ export namespace LedgerListResponse {
|
|
|
617
618
|
*/
|
|
618
619
|
metadata: Record<string, string>;
|
|
619
620
|
|
|
620
|
-
new_block_expiry_date: string;
|
|
621
|
+
new_block_expiry_date: string | null;
|
|
621
622
|
|
|
622
623
|
starting_balance: number;
|
|
623
624
|
}
|
|
@@ -1000,7 +1001,7 @@ export namespace LedgerCreateEntryResponse {
|
|
|
1000
1001
|
*/
|
|
1001
1002
|
metadata: Record<string, string>;
|
|
1002
1003
|
|
|
1003
|
-
new_block_expiry_date: string;
|
|
1004
|
+
new_block_expiry_date: string | null;
|
|
1004
1005
|
|
|
1005
1006
|
starting_balance: number;
|
|
1006
1007
|
}
|
|
@@ -1383,7 +1384,7 @@ export namespace LedgerCreateEntryByExternalIDResponse {
|
|
|
1383
1384
|
*/
|
|
1384
1385
|
metadata: Record<string, string>;
|
|
1385
1386
|
|
|
1386
|
-
new_block_expiry_date: string;
|
|
1387
|
+
new_block_expiry_date: string | null;
|
|
1387
1388
|
|
|
1388
1389
|
starting_balance: number;
|
|
1389
1390
|
}
|
|
@@ -1766,7 +1767,7 @@ export namespace LedgerListByExternalIDResponse {
|
|
|
1766
1767
|
*/
|
|
1767
1768
|
metadata: Record<string, string>;
|
|
1768
1769
|
|
|
1769
|
-
new_block_expiry_date: string;
|
|
1770
|
+
new_block_expiry_date: string | null;
|
|
1770
1771
|
|
|
1771
1772
|
starting_balance: number;
|
|
1772
1773
|
}
|
|
@@ -2034,7 +2035,7 @@ export type LedgerCreateEntryParams =
|
|
|
2034
2035
|
| LedgerCreateEntryParams.AddVoidCreditLedgerEntryRequestParams
|
|
2035
2036
|
| LedgerCreateEntryParams.AddAmendmentCreditLedgerEntryRequestParams;
|
|
2036
2037
|
|
|
2037
|
-
export namespace LedgerCreateEntryParams {
|
|
2038
|
+
export declare namespace LedgerCreateEntryParams {
|
|
2038
2039
|
export interface AddIncrementCreditLedgerEntryRequestParams {
|
|
2039
2040
|
/**
|
|
2040
2041
|
* The number of credits to effect. Note that this is required for increment,
|
|
@@ -2285,7 +2286,7 @@ export type LedgerCreateEntryByExternalIDParams =
|
|
|
2285
2286
|
| LedgerCreateEntryByExternalIDParams.AddVoidCreditLedgerEntryRequestParams
|
|
2286
2287
|
| LedgerCreateEntryByExternalIDParams.AddAmendmentCreditLedgerEntryRequestParams;
|
|
2287
2288
|
|
|
2288
|
-
export namespace LedgerCreateEntryByExternalIDParams {
|
|
2289
|
+
export declare namespace LedgerCreateEntryByExternalIDParams {
|
|
2289
2290
|
export interface AddIncrementCreditLedgerEntryRequestParams {
|
|
2290
2291
|
/**
|
|
2291
2292
|
* The number of credits to effect. Note that this is required for increment,
|
|
@@ -2558,15 +2559,20 @@ export interface LedgerListByExternalIDParams extends PageParams {
|
|
|
2558
2559
|
minimum_amount?: string | null;
|
|
2559
2560
|
}
|
|
2560
2561
|
|
|
2561
|
-
|
|
2562
|
-
|
|
2563
|
-
|
|
2564
|
-
|
|
2565
|
-
export
|
|
2566
|
-
|
|
2567
|
-
|
|
2568
|
-
|
|
2569
|
-
|
|
2570
|
-
|
|
2571
|
-
|
|
2562
|
+
Ledger.LedgerListResponsesPage = LedgerListResponsesPage;
|
|
2563
|
+
Ledger.LedgerListByExternalIDResponsesPage = LedgerListByExternalIDResponsesPage;
|
|
2564
|
+
|
|
2565
|
+
export declare namespace Ledger {
|
|
2566
|
+
export {
|
|
2567
|
+
type LedgerListResponse as LedgerListResponse,
|
|
2568
|
+
type LedgerCreateEntryResponse as LedgerCreateEntryResponse,
|
|
2569
|
+
type LedgerCreateEntryByExternalIDResponse as LedgerCreateEntryByExternalIDResponse,
|
|
2570
|
+
type LedgerListByExternalIDResponse as LedgerListByExternalIDResponse,
|
|
2571
|
+
LedgerListResponsesPage as LedgerListResponsesPage,
|
|
2572
|
+
LedgerListByExternalIDResponsesPage as LedgerListByExternalIDResponsesPage,
|
|
2573
|
+
type LedgerListParams as LedgerListParams,
|
|
2574
|
+
type LedgerCreateEntryParams as LedgerCreateEntryParams,
|
|
2575
|
+
type LedgerCreateEntryByExternalIDParams as LedgerCreateEntryByExternalIDParams,
|
|
2576
|
+
type LedgerListByExternalIDParams as LedgerListByExternalIDParams,
|
|
2577
|
+
};
|
|
2572
2578
|
}
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
import { APIResource } from '../../../resource';
|
|
4
4
|
import { isRequestOptions } from '../../../core';
|
|
5
5
|
import * as Core from '../../../core';
|
|
6
|
-
import * as TopUpsAPI from './top-ups';
|
|
7
6
|
import { Page, type PageParams } from '../../../pagination';
|
|
8
7
|
|
|
9
8
|
export class TopUps extends APIResource {
|
|
@@ -564,15 +563,20 @@ export namespace TopUpCreateByExternalIDParams {
|
|
|
564
563
|
|
|
565
564
|
export interface TopUpListByExternalIDParams extends PageParams {}
|
|
566
565
|
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
export
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
566
|
+
TopUps.TopUpListResponsesPage = TopUpListResponsesPage;
|
|
567
|
+
TopUps.TopUpListByExternalIDResponsesPage = TopUpListByExternalIDResponsesPage;
|
|
568
|
+
|
|
569
|
+
export declare namespace TopUps {
|
|
570
|
+
export {
|
|
571
|
+
type TopUpCreateResponse as TopUpCreateResponse,
|
|
572
|
+
type TopUpListResponse as TopUpListResponse,
|
|
573
|
+
type TopUpCreateByExternalIDResponse as TopUpCreateByExternalIDResponse,
|
|
574
|
+
type TopUpListByExternalIDResponse as TopUpListByExternalIDResponse,
|
|
575
|
+
TopUpListResponsesPage as TopUpListResponsesPage,
|
|
576
|
+
TopUpListByExternalIDResponsesPage as TopUpListByExternalIDResponsesPage,
|
|
577
|
+
type TopUpCreateParams as TopUpCreateParams,
|
|
578
|
+
type TopUpListParams as TopUpListParams,
|
|
579
|
+
type TopUpCreateByExternalIDParams as TopUpCreateByExternalIDParams,
|
|
580
|
+
type TopUpListByExternalIDParams as TopUpListByExternalIDParams,
|
|
581
|
+
};
|
|
578
582
|
}
|