orb-billing 6.0.2 → 6.1.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 +15 -0
- package/client.d.mts +5 -10
- package/client.d.mts.map +1 -1
- package/client.d.ts +5 -10
- package/client.d.ts.map +1 -1
- package/client.js +140 -149
- package/client.js.map +1 -1
- package/client.mjs +138 -146
- package/client.mjs.map +1 -1
- package/core/api-promise.d.mts +2 -2
- package/core/api-promise.d.mts.map +1 -1
- package/core/api-promise.d.ts +2 -2
- package/core/api-promise.d.ts.map +1 -1
- package/core/api-promise.js.map +1 -1
- package/core/api-promise.mjs.map +1 -1
- package/core/pagination.d.mts +4 -4
- package/core/pagination.d.mts.map +1 -1
- package/core/pagination.d.ts +4 -4
- package/core/pagination.d.ts.map +1 -1
- package/core/pagination.js.map +1 -1
- package/core/pagination.mjs.map +1 -1
- package/core/resource.d.mts +3 -3
- package/core/resource.d.mts.map +1 -1
- package/core/resource.d.ts +3 -3
- package/core/resource.d.ts.map +1 -1
- package/core/resource.js.map +1 -1
- package/core/resource.mjs.map +1 -1
- package/index.d.mts +1 -1
- package/index.d.mts.map +1 -1
- package/index.d.ts +1 -1
- package/index.d.ts.map +1 -1
- package/index.js +1 -2
- package/index.js.map +1 -1
- package/index.mjs +1 -1
- package/index.mjs.map +1 -1
- package/internal/parse.d.mts +2 -2
- package/internal/parse.d.mts.map +1 -1
- package/internal/parse.d.ts +2 -2
- package/internal/parse.d.ts.map +1 -1
- package/internal/parse.js.map +1 -1
- package/internal/parse.mjs.map +1 -1
- package/internal/uploads.d.mts +4 -4
- package/internal/uploads.d.mts.map +1 -1
- package/internal/uploads.d.ts +4 -4
- package/internal/uploads.d.ts.map +1 -1
- package/internal/uploads.js.map +1 -1
- package/internal/uploads.mjs.map +1 -1
- package/internal/utils/log.d.mts +3 -3
- package/internal/utils/log.d.mts.map +1 -1
- package/internal/utils/log.d.ts +3 -3
- package/internal/utils/log.d.ts.map +1 -1
- package/internal/utils/log.js.map +1 -1
- package/internal/utils/log.mjs.map +1 -1
- package/package.json +4 -4
- package/resources/alerts.d.mts +18 -7
- package/resources/alerts.d.mts.map +1 -1
- package/resources/alerts.d.ts +18 -7
- package/resources/alerts.d.ts.map +1 -1
- package/resources/alerts.js +31 -14
- package/resources/alerts.js.map +1 -1
- package/resources/alerts.mjs +31 -14
- package/resources/alerts.mjs.map +1 -1
- package/resources/beta/beta.d.mts +2 -2
- package/resources/beta/beta.d.ts +2 -2
- package/resources/beta/beta.js +6 -6
- package/resources/beta/beta.js.map +1 -1
- package/resources/beta/beta.mjs +6 -6
- package/resources/beta/beta.mjs.map +1 -1
- package/resources/beta/external-plan-id.d.mts +2 -2
- package/resources/beta/external-plan-id.d.ts +2 -2
- package/resources/beta/external-plan-id.js +6 -6
- package/resources/beta/external-plan-id.js.map +1 -1
- package/resources/beta/external-plan-id.mjs +6 -6
- package/resources/beta/external-plan-id.mjs.map +1 -1
- package/resources/coupons/coupons.d.mts +2 -2
- package/resources/coupons/coupons.d.ts +2 -2
- package/resources/coupons/coupons.js +4 -4
- package/resources/coupons/coupons.mjs +4 -4
- package/resources/coupons/subscriptions.d.mts +1 -1
- package/resources/coupons/subscriptions.d.ts +1 -1
- package/resources/coupons/subscriptions.js +2 -2
- package/resources/coupons/subscriptions.mjs +2 -2
- package/resources/credit-blocks.d.mts +3 -3
- package/resources/credit-blocks.d.ts +3 -3
- package/resources/credit-blocks.js +6 -6
- package/resources/credit-blocks.mjs +6 -6
- package/resources/credit-notes.d.mts +1 -1
- package/resources/credit-notes.d.ts +1 -1
- package/resources/credit-notes.js +2 -2
- package/resources/credit-notes.mjs +2 -2
- package/resources/customers/balance-transactions.d.mts +2 -2
- package/resources/customers/balance-transactions.d.ts +2 -2
- package/resources/customers/balance-transactions.js +4 -4
- package/resources/customers/balance-transactions.mjs +4 -4
- package/resources/customers/costs.d.mts +2 -2
- package/resources/customers/costs.d.ts +2 -2
- package/resources/customers/costs.js +4 -4
- package/resources/customers/costs.mjs +4 -4
- package/resources/customers/credits/credits.d.mts +2 -2
- package/resources/customers/credits/credits.d.ts +2 -2
- package/resources/customers/credits/credits.js +4 -4
- package/resources/customers/credits/credits.mjs +4 -4
- package/resources/customers/credits/ledger.d.mts +4 -4
- package/resources/customers/credits/ledger.d.ts +4 -4
- package/resources/customers/credits/ledger.js +8 -8
- package/resources/customers/credits/ledger.mjs +8 -8
- package/resources/customers/credits/top-ups.d.mts +6 -6
- package/resources/customers/credits/top-ups.d.ts +6 -6
- package/resources/customers/credits/top-ups.js +14 -14
- package/resources/customers/credits/top-ups.js.map +1 -1
- package/resources/customers/credits/top-ups.mjs +14 -14
- package/resources/customers/credits/top-ups.mjs.map +1 -1
- package/resources/customers/customers.d.mts +65 -7
- package/resources/customers/customers.d.mts.map +1 -1
- package/resources/customers/customers.d.ts +65 -7
- package/resources/customers/customers.d.ts.map +1 -1
- package/resources/customers/customers.js +35 -12
- package/resources/customers/customers.js.map +1 -1
- package/resources/customers/customers.mjs +35 -12
- package/resources/customers/customers.mjs.map +1 -1
- package/resources/customers/index.d.mts +1 -1
- package/resources/customers/index.d.mts.map +1 -1
- package/resources/customers/index.d.ts +1 -1
- 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.mts +2 -2
- package/resources/dimensional-price-groups/dimensional-price-groups.d.ts +2 -2
- package/resources/dimensional-price-groups/dimensional-price-groups.js +4 -4
- package/resources/dimensional-price-groups/dimensional-price-groups.mjs +4 -4
- package/resources/dimensional-price-groups/external-dimensional-price-group-id.d.mts +2 -2
- package/resources/dimensional-price-groups/external-dimensional-price-group-id.d.ts +2 -2
- package/resources/dimensional-price-groups/external-dimensional-price-group-id.js +4 -4
- package/resources/dimensional-price-groups/external-dimensional-price-group-id.mjs +4 -4
- package/resources/events/backfills.d.mts +3 -3
- package/resources/events/backfills.d.ts +3 -3
- package/resources/events/backfills.js +6 -6
- package/resources/events/backfills.mjs +6 -6
- package/resources/events/events.d.mts +2 -18
- package/resources/events/events.d.mts.map +1 -1
- package/resources/events/events.d.ts +2 -18
- package/resources/events/events.d.ts.map +1 -1
- package/resources/events/events.js +6 -6
- package/resources/events/events.js.map +1 -1
- package/resources/events/events.mjs +6 -6
- package/resources/events/events.mjs.map +1 -1
- package/resources/index.d.mts +1 -1
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +1 -1
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs.map +1 -1
- package/resources/invoices.d.mts +74 -8
- package/resources/invoices.d.mts.map +1 -1
- package/resources/invoices.d.ts +74 -8
- package/resources/invoices.d.ts.map +1 -1
- package/resources/invoices.js +87 -17
- package/resources/invoices.js.map +1 -1
- package/resources/invoices.mjs +87 -17
- package/resources/invoices.mjs.map +1 -1
- package/resources/items.d.mts +3 -3
- package/resources/items.d.ts +3 -3
- package/resources/items.js +6 -6
- package/resources/items.mjs +6 -6
- package/resources/license-types.d.mts +1 -1
- package/resources/license-types.d.ts +1 -1
- package/resources/license-types.js +2 -2
- package/resources/license-types.mjs +2 -2
- package/resources/licenses/external-licenses.d.mts +1 -1
- package/resources/licenses/external-licenses.d.ts +1 -1
- package/resources/licenses/external-licenses.js +2 -2
- package/resources/licenses/external-licenses.mjs +2 -2
- package/resources/licenses/licenses.d.mts +3 -3
- package/resources/licenses/licenses.d.ts +3 -3
- package/resources/licenses/licenses.js +6 -6
- package/resources/licenses/licenses.mjs +6 -6
- package/resources/licenses/usage.d.mts +1 -1
- package/resources/licenses/usage.d.ts +1 -1
- package/resources/licenses/usage.js +2 -2
- package/resources/licenses/usage.mjs +2 -2
- package/resources/metrics.d.mts +2 -2
- package/resources/metrics.d.ts +2 -2
- package/resources/metrics.js +4 -4
- package/resources/metrics.mjs +4 -4
- package/resources/plans/external-plan-id.d.mts +2 -2
- package/resources/plans/external-plan-id.d.ts +2 -2
- package/resources/plans/external-plan-id.js +4 -4
- package/resources/plans/external-plan-id.mjs +4 -4
- package/resources/plans/migrations.d.mts +3 -3
- package/resources/plans/migrations.d.ts +3 -3
- package/resources/plans/migrations.js +8 -8
- package/resources/plans/migrations.js.map +1 -1
- package/resources/plans/migrations.mjs +8 -8
- package/resources/plans/migrations.mjs.map +1 -1
- package/resources/plans/plans.d.mts +2 -2
- package/resources/plans/plans.d.ts +2 -2
- package/resources/plans/plans.js +4 -4
- package/resources/plans/plans.mjs +4 -4
- package/resources/prices/external-price-id.d.mts +2 -2
- package/resources/prices/external-price-id.d.ts +2 -2
- package/resources/prices/external-price-id.js +4 -4
- package/resources/prices/external-price-id.mjs +4 -4
- package/resources/prices/prices.d.mts +3 -3
- package/resources/prices/prices.d.ts +3 -3
- package/resources/prices/prices.js +6 -6
- package/resources/prices/prices.mjs +6 -6
- package/resources/subscription-changes.d.mts +3 -3
- package/resources/subscription-changes.d.ts +3 -3
- package/resources/subscription-changes.js +6 -6
- package/resources/subscription-changes.mjs +6 -6
- package/resources/subscriptions.d.mts +15 -15
- package/resources/subscriptions.d.ts +15 -15
- package/resources/subscriptions.js +30 -30
- package/resources/subscriptions.mjs +30 -30
- package/src/client.ts +11 -8
- package/src/core/api-promise.ts +4 -7
- package/src/core/pagination.ts +5 -5
- package/src/core/resource.ts +3 -3
- package/src/index.ts +1 -1
- package/src/internal/parse.ts +2 -2
- package/src/internal/uploads.ts +5 -5
- package/src/internal/utils/log.ts +3 -3
- package/src/resources/alerts.ts +32 -14
- package/src/resources/beta/beta.ts +6 -6
- package/src/resources/beta/external-plan-id.ts +6 -6
- package/src/resources/coupons/coupons.ts +4 -4
- package/src/resources/coupons/subscriptions.ts +2 -2
- package/src/resources/credit-blocks.ts +6 -6
- package/src/resources/credit-notes.ts +2 -2
- package/src/resources/customers/balance-transactions.ts +4 -4
- package/src/resources/customers/costs.ts +4 -4
- package/src/resources/customers/credits/credits.ts +4 -4
- package/src/resources/customers/credits/ledger.ts +8 -8
- package/src/resources/customers/credits/top-ups.ts +14 -14
- package/src/resources/customers/customers.ts +105 -12
- package/src/resources/customers/index.ts +4 -0
- package/src/resources/dimensional-price-groups/dimensional-price-groups.ts +4 -4
- package/src/resources/dimensional-price-groups/external-dimensional-price-group-id.ts +4 -4
- package/src/resources/events/backfills.ts +6 -6
- package/src/resources/events/events.ts +6 -26
- package/src/resources/index.ts +4 -0
- package/src/resources/invoices.ts +89 -17
- package/src/resources/items.ts +6 -6
- package/src/resources/license-types.ts +2 -2
- package/src/resources/licenses/external-licenses.ts +2 -2
- package/src/resources/licenses/licenses.ts +6 -6
- package/src/resources/licenses/usage.ts +2 -2
- package/src/resources/metrics.ts +4 -4
- package/src/resources/plans/external-plan-id.ts +4 -4
- package/src/resources/plans/migrations.ts +8 -8
- package/src/resources/plans/plans.ts +4 -4
- package/src/resources/prices/external-price-id.ts +4 -4
- package/src/resources/prices/prices.ts +6 -6
- package/src/resources/subscription-changes.ts +6 -6
- package/src/resources/subscriptions.ts +30 -30
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -58,8 +58,8 @@ export class Coupons extends APIResource {
|
|
|
58
58
|
* const coupon = await client.coupons.archive('coupon_id');
|
|
59
59
|
* ```
|
|
60
60
|
*/
|
|
61
|
-
archive(
|
|
62
|
-
return this._client.post(path `/coupons/${
|
|
61
|
+
archive(couponID, options) {
|
|
62
|
+
return this._client.post(path `/coupons/${couponID}/archive`, options);
|
|
63
63
|
}
|
|
64
64
|
/**
|
|
65
65
|
* This endpoint retrieves a coupon by its ID. To fetch coupons by their redemption
|
|
@@ -71,8 +71,8 @@ export class Coupons extends APIResource {
|
|
|
71
71
|
* const coupon = await client.coupons.fetch('coupon_id');
|
|
72
72
|
* ```
|
|
73
73
|
*/
|
|
74
|
-
fetch(
|
|
75
|
-
return this._client.get(path `/coupons/${
|
|
74
|
+
fetch(couponID, options) {
|
|
75
|
+
return this._client.get(path `/coupons/${couponID}`, options);
|
|
76
76
|
}
|
|
77
77
|
}
|
|
78
78
|
Coupons.Subscriptions = Subscriptions;
|
|
@@ -23,7 +23,7 @@ export declare class Subscriptions extends APIResource {
|
|
|
23
23
|
* }
|
|
24
24
|
* ```
|
|
25
25
|
*/
|
|
26
|
-
list(
|
|
26
|
+
list(couponID: string, query?: SubscriptionListParams | null | undefined, options?: RequestOptions): PagePromise<SubscriptionsPage, SubscriptionsAPI.Subscription>;
|
|
27
27
|
}
|
|
28
28
|
export interface SubscriptionListParams extends PageParams {
|
|
29
29
|
}
|
|
@@ -23,7 +23,7 @@ export declare class Subscriptions extends APIResource {
|
|
|
23
23
|
* }
|
|
24
24
|
* ```
|
|
25
25
|
*/
|
|
26
|
-
list(
|
|
26
|
+
list(couponID: string, query?: SubscriptionListParams | null | undefined, options?: RequestOptions): PagePromise<SubscriptionsPage, SubscriptionsAPI.Subscription>;
|
|
27
27
|
}
|
|
28
28
|
export interface SubscriptionListParams extends PageParams {
|
|
29
29
|
}
|
|
@@ -25,8 +25,8 @@ class Subscriptions extends resource_1.APIResource {
|
|
|
25
25
|
* }
|
|
26
26
|
* ```
|
|
27
27
|
*/
|
|
28
|
-
list(
|
|
29
|
-
return this._client.getAPIList((0, path_1.path) `/coupons/${
|
|
28
|
+
list(couponID, query = {}, options) {
|
|
29
|
+
return this._client.getAPIList((0, path_1.path) `/coupons/${couponID}/subscriptions`, (pagination_1.Page), { query, ...options });
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
32
|
exports.Subscriptions = Subscriptions;
|
|
@@ -22,8 +22,8 @@ export class Subscriptions extends APIResource {
|
|
|
22
22
|
* }
|
|
23
23
|
* ```
|
|
24
24
|
*/
|
|
25
|
-
list(
|
|
26
|
-
return this._client.getAPIList(path `/coupons/${
|
|
25
|
+
list(couponID, query = {}, options) {
|
|
26
|
+
return this._client.getAPIList(path `/coupons/${couponID}/subscriptions`, (Page), { query, ...options });
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
29
|
//# sourceMappingURL=subscriptions.mjs.map
|
|
@@ -9,7 +9,7 @@ export declare class CreditBlocks extends APIResource {
|
|
|
9
9
|
/**
|
|
10
10
|
* This endpoint returns a credit block identified by its block_id.
|
|
11
11
|
*/
|
|
12
|
-
retrieve(
|
|
12
|
+
retrieve(blockID: string, options?: RequestOptions): APIPromise<CreditBlockRetrieveResponse>;
|
|
13
13
|
/**
|
|
14
14
|
* This endpoint deletes a credit block by its ID.
|
|
15
15
|
*
|
|
@@ -27,7 +27,7 @@ export declare class CreditBlocks extends APIResource {
|
|
|
27
27
|
* reflect the state as if credits from the deleted block were never applied.
|
|
28
28
|
* </Note>
|
|
29
29
|
*/
|
|
30
|
-
delete(
|
|
30
|
+
delete(blockID: string, options?: RequestOptions): APIPromise<void>;
|
|
31
31
|
/**
|
|
32
32
|
* This endpoint returns the credit block and its associated purchasing invoices.
|
|
33
33
|
*
|
|
@@ -47,7 +47,7 @@ export declare class CreditBlocks extends APIResource {
|
|
|
47
47
|
* future releases. Please contact support before building production integrations
|
|
48
48
|
* against this endpoint.**
|
|
49
49
|
*/
|
|
50
|
-
listInvoices(
|
|
50
|
+
listInvoices(blockID: string, options?: RequestOptions): APIPromise<CreditBlockListInvoicesResponse>;
|
|
51
51
|
}
|
|
52
52
|
/**
|
|
53
53
|
* The Credit Block resource models prepaid credits within Orb.
|
|
@@ -9,7 +9,7 @@ export declare class CreditBlocks extends APIResource {
|
|
|
9
9
|
/**
|
|
10
10
|
* This endpoint returns a credit block identified by its block_id.
|
|
11
11
|
*/
|
|
12
|
-
retrieve(
|
|
12
|
+
retrieve(blockID: string, options?: RequestOptions): APIPromise<CreditBlockRetrieveResponse>;
|
|
13
13
|
/**
|
|
14
14
|
* This endpoint deletes a credit block by its ID.
|
|
15
15
|
*
|
|
@@ -27,7 +27,7 @@ export declare class CreditBlocks extends APIResource {
|
|
|
27
27
|
* reflect the state as if credits from the deleted block were never applied.
|
|
28
28
|
* </Note>
|
|
29
29
|
*/
|
|
30
|
-
delete(
|
|
30
|
+
delete(blockID: string, options?: RequestOptions): APIPromise<void>;
|
|
31
31
|
/**
|
|
32
32
|
* This endpoint returns the credit block and its associated purchasing invoices.
|
|
33
33
|
*
|
|
@@ -47,7 +47,7 @@ export declare class CreditBlocks extends APIResource {
|
|
|
47
47
|
* future releases. Please contact support before building production integrations
|
|
48
48
|
* against this endpoint.**
|
|
49
49
|
*/
|
|
50
|
-
listInvoices(
|
|
50
|
+
listInvoices(blockID: string, options?: RequestOptions): APIPromise<CreditBlockListInvoicesResponse>;
|
|
51
51
|
}
|
|
52
52
|
/**
|
|
53
53
|
* The Credit Block resource models prepaid credits within Orb.
|
|
@@ -12,8 +12,8 @@ class CreditBlocks extends resource_1.APIResource {
|
|
|
12
12
|
/**
|
|
13
13
|
* This endpoint returns a credit block identified by its block_id.
|
|
14
14
|
*/
|
|
15
|
-
retrieve(
|
|
16
|
-
return this._client.get((0, path_1.path) `/credit_blocks/${
|
|
15
|
+
retrieve(blockID, options) {
|
|
16
|
+
return this._client.get((0, path_1.path) `/credit_blocks/${blockID}`, options);
|
|
17
17
|
}
|
|
18
18
|
/**
|
|
19
19
|
* This endpoint deletes a credit block by its ID.
|
|
@@ -32,8 +32,8 @@ class CreditBlocks extends resource_1.APIResource {
|
|
|
32
32
|
* reflect the state as if credits from the deleted block were never applied.
|
|
33
33
|
* </Note>
|
|
34
34
|
*/
|
|
35
|
-
delete(
|
|
36
|
-
return this._client.delete((0, path_1.path) `/credit_blocks/${
|
|
35
|
+
delete(blockID, options) {
|
|
36
|
+
return this._client.delete((0, path_1.path) `/credit_blocks/${blockID}`, {
|
|
37
37
|
...options,
|
|
38
38
|
headers: (0, headers_1.buildHeaders)([{ Accept: '*/*' }, options?.headers]),
|
|
39
39
|
});
|
|
@@ -57,8 +57,8 @@ class CreditBlocks extends resource_1.APIResource {
|
|
|
57
57
|
* future releases. Please contact support before building production integrations
|
|
58
58
|
* against this endpoint.**
|
|
59
59
|
*/
|
|
60
|
-
listInvoices(
|
|
61
|
-
return this._client.get((0, path_1.path) `/credit_blocks/${
|
|
60
|
+
listInvoices(blockID, options) {
|
|
61
|
+
return this._client.get((0, path_1.path) `/credit_blocks/${blockID}/invoices`, options);
|
|
62
62
|
}
|
|
63
63
|
}
|
|
64
64
|
exports.CreditBlocks = CreditBlocks;
|
|
@@ -9,8 +9,8 @@ export class CreditBlocks extends APIResource {
|
|
|
9
9
|
/**
|
|
10
10
|
* This endpoint returns a credit block identified by its block_id.
|
|
11
11
|
*/
|
|
12
|
-
retrieve(
|
|
13
|
-
return this._client.get(path `/credit_blocks/${
|
|
12
|
+
retrieve(blockID, options) {
|
|
13
|
+
return this._client.get(path `/credit_blocks/${blockID}`, options);
|
|
14
14
|
}
|
|
15
15
|
/**
|
|
16
16
|
* This endpoint deletes a credit block by its ID.
|
|
@@ -29,8 +29,8 @@ export class CreditBlocks extends APIResource {
|
|
|
29
29
|
* reflect the state as if credits from the deleted block were never applied.
|
|
30
30
|
* </Note>
|
|
31
31
|
*/
|
|
32
|
-
delete(
|
|
33
|
-
return this._client.delete(path `/credit_blocks/${
|
|
32
|
+
delete(blockID, options) {
|
|
33
|
+
return this._client.delete(path `/credit_blocks/${blockID}`, {
|
|
34
34
|
...options,
|
|
35
35
|
headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
|
|
36
36
|
});
|
|
@@ -54,8 +54,8 @@ export class CreditBlocks extends APIResource {
|
|
|
54
54
|
* future releases. Please contact support before building production integrations
|
|
55
55
|
* against this endpoint.**
|
|
56
56
|
*/
|
|
57
|
-
listInvoices(
|
|
58
|
-
return this._client.get(path `/credit_blocks/${
|
|
57
|
+
listInvoices(blockID, options) {
|
|
58
|
+
return this._client.get(path `/credit_blocks/${blockID}/invoices`, options);
|
|
59
59
|
}
|
|
60
60
|
}
|
|
61
61
|
//# sourceMappingURL=credit-blocks.mjs.map
|
|
@@ -77,7 +77,7 @@ export declare class CreditNotes extends APIResource {
|
|
|
77
77
|
* );
|
|
78
78
|
* ```
|
|
79
79
|
*/
|
|
80
|
-
fetch(
|
|
80
|
+
fetch(creditNoteID: string, options?: RequestOptions): APIPromise<Shared.CreditNote>;
|
|
81
81
|
}
|
|
82
82
|
export interface CreditNoteCreateParams {
|
|
83
83
|
line_items: Array<CreditNoteCreateParams.LineItem>;
|
|
@@ -77,7 +77,7 @@ export declare class CreditNotes extends APIResource {
|
|
|
77
77
|
* );
|
|
78
78
|
* ```
|
|
79
79
|
*/
|
|
80
|
-
fetch(
|
|
80
|
+
fetch(creditNoteID: string, options?: RequestOptions): APIPromise<Shared.CreditNote>;
|
|
81
81
|
}
|
|
82
82
|
export interface CreditNoteCreateParams {
|
|
83
83
|
line_items: Array<CreditNoteCreateParams.LineItem>;
|
|
@@ -82,8 +82,8 @@ class CreditNotes extends resource_1.APIResource {
|
|
|
82
82
|
* );
|
|
83
83
|
* ```
|
|
84
84
|
*/
|
|
85
|
-
fetch(
|
|
86
|
-
return this._client.get((0, path_1.path) `/credit_notes/${
|
|
85
|
+
fetch(creditNoteID, options) {
|
|
86
|
+
return this._client.get((0, path_1.path) `/credit_notes/${creditNoteID}`, options);
|
|
87
87
|
}
|
|
88
88
|
}
|
|
89
89
|
exports.CreditNotes = CreditNotes;
|
|
@@ -79,8 +79,8 @@ export class CreditNotes extends APIResource {
|
|
|
79
79
|
* );
|
|
80
80
|
* ```
|
|
81
81
|
*/
|
|
82
|
-
fetch(
|
|
83
|
-
return this._client.get(path `/credit_notes/${
|
|
82
|
+
fetch(creditNoteID, options) {
|
|
83
|
+
return this._client.get(path `/credit_notes/${creditNoteID}`, options);
|
|
84
84
|
}
|
|
85
85
|
}
|
|
86
86
|
//# sourceMappingURL=credit-notes.mjs.map
|
|
@@ -24,7 +24,7 @@ export declare class BalanceTransactions extends APIResource {
|
|
|
24
24
|
* Creates an immutable balance transaction that updates the customer's balance and
|
|
25
25
|
* returns back the newly created transaction.
|
|
26
26
|
*/
|
|
27
|
-
create(
|
|
27
|
+
create(customerID: string, body: BalanceTransactionCreateParams, options?: RequestOptions): APIPromise<BalanceTransactionCreateResponse>;
|
|
28
28
|
/**
|
|
29
29
|
* ## The customer balance
|
|
30
30
|
*
|
|
@@ -48,7 +48,7 @@ export declare class BalanceTransactions extends APIResource {
|
|
|
48
48
|
* chronological order for a single customer, providing a complete audit trail of
|
|
49
49
|
* all adjustments and invoice applications.
|
|
50
50
|
*/
|
|
51
|
-
list(
|
|
51
|
+
list(customerID: string, query?: BalanceTransactionListParams | null | undefined, options?: RequestOptions): PagePromise<BalanceTransactionListResponsesPage, BalanceTransactionListResponse>;
|
|
52
52
|
}
|
|
53
53
|
export type BalanceTransactionListResponsesPage = Page<BalanceTransactionListResponse>;
|
|
54
54
|
export interface BalanceTransactionCreateResponse {
|
|
@@ -24,7 +24,7 @@ export declare class BalanceTransactions extends APIResource {
|
|
|
24
24
|
* Creates an immutable balance transaction that updates the customer's balance and
|
|
25
25
|
* returns back the newly created transaction.
|
|
26
26
|
*/
|
|
27
|
-
create(
|
|
27
|
+
create(customerID: string, body: BalanceTransactionCreateParams, options?: RequestOptions): APIPromise<BalanceTransactionCreateResponse>;
|
|
28
28
|
/**
|
|
29
29
|
* ## The customer balance
|
|
30
30
|
*
|
|
@@ -48,7 +48,7 @@ export declare class BalanceTransactions extends APIResource {
|
|
|
48
48
|
* chronological order for a single customer, providing a complete audit trail of
|
|
49
49
|
* all adjustments and invoice applications.
|
|
50
50
|
*/
|
|
51
|
-
list(
|
|
51
|
+
list(customerID: string, query?: BalanceTransactionListParams | null | undefined, options?: RequestOptions): PagePromise<BalanceTransactionListResponsesPage, BalanceTransactionListResponse>;
|
|
52
52
|
}
|
|
53
53
|
export type BalanceTransactionListResponsesPage = Page<BalanceTransactionListResponse>;
|
|
54
54
|
export interface BalanceTransactionCreateResponse {
|
|
@@ -26,8 +26,8 @@ class BalanceTransactions extends resource_1.APIResource {
|
|
|
26
26
|
* Creates an immutable balance transaction that updates the customer's balance and
|
|
27
27
|
* returns back the newly created transaction.
|
|
28
28
|
*/
|
|
29
|
-
create(
|
|
30
|
-
return this._client.post((0, path_1.path) `/customers/${
|
|
29
|
+
create(customerID, body, options) {
|
|
30
|
+
return this._client.post((0, path_1.path) `/customers/${customerID}/balance_transactions`, { body, ...options });
|
|
31
31
|
}
|
|
32
32
|
/**
|
|
33
33
|
* ## The customer balance
|
|
@@ -52,8 +52,8 @@ class BalanceTransactions extends resource_1.APIResource {
|
|
|
52
52
|
* chronological order for a single customer, providing a complete audit trail of
|
|
53
53
|
* all adjustments and invoice applications.
|
|
54
54
|
*/
|
|
55
|
-
list(
|
|
56
|
-
return this._client.getAPIList((0, path_1.path) `/customers/${
|
|
55
|
+
list(customerID, query = {}, options) {
|
|
56
|
+
return this._client.getAPIList((0, path_1.path) `/customers/${customerID}/balance_transactions`, (pagination_1.Page), { query, ...options });
|
|
57
57
|
}
|
|
58
58
|
}
|
|
59
59
|
exports.BalanceTransactions = BalanceTransactions;
|
|
@@ -23,8 +23,8 @@ export class BalanceTransactions extends APIResource {
|
|
|
23
23
|
* Creates an immutable balance transaction that updates the customer's balance and
|
|
24
24
|
* returns back the newly created transaction.
|
|
25
25
|
*/
|
|
26
|
-
create(
|
|
27
|
-
return this._client.post(path `/customers/${
|
|
26
|
+
create(customerID, body, options) {
|
|
27
|
+
return this._client.post(path `/customers/${customerID}/balance_transactions`, { body, ...options });
|
|
28
28
|
}
|
|
29
29
|
/**
|
|
30
30
|
* ## The customer balance
|
|
@@ -49,8 +49,8 @@ export class BalanceTransactions extends APIResource {
|
|
|
49
49
|
* chronological order for a single customer, providing a complete audit trail of
|
|
50
50
|
* all adjustments and invoice applications.
|
|
51
51
|
*/
|
|
52
|
-
list(
|
|
53
|
-
return this._client.getAPIList(path `/customers/${
|
|
52
|
+
list(customerID, query = {}, options) {
|
|
53
|
+
return this._client.getAPIList(path `/customers/${customerID}/balance_transactions`, (Page), { query, ...options });
|
|
54
54
|
}
|
|
55
55
|
}
|
|
56
56
|
//# sourceMappingURL=balance-transactions.mjs.map
|
|
@@ -138,7 +138,7 @@ export declare class Costs extends APIResource {
|
|
|
138
138
|
* `secondary_grouping_key` based on the matrix price definition, for each
|
|
139
139
|
* `grouping_value` and `secondary_grouping_value` available.
|
|
140
140
|
*/
|
|
141
|
-
list(
|
|
141
|
+
list(customerID: string, query?: CostListParams | null | undefined, options?: RequestOptions): APIPromise<CostListResponse>;
|
|
142
142
|
/**
|
|
143
143
|
* This endpoint is used to fetch a day-by-day snapshot of a customer's costs in
|
|
144
144
|
* Orb, calculated by applying pricing information to the underlying usage (see the
|
|
@@ -258,7 +258,7 @@ export declare class Costs extends APIResource {
|
|
|
258
258
|
* `secondary_grouping_key` based on the matrix price definition, for each
|
|
259
259
|
* `grouping_value` and `secondary_grouping_value` available.
|
|
260
260
|
*/
|
|
261
|
-
listByExternalID(
|
|
261
|
+
listByExternalID(externalCustomerID: string, query?: CostListByExternalIDParams | null | undefined, options?: RequestOptions): APIPromise<CostListByExternalIDResponse>;
|
|
262
262
|
}
|
|
263
263
|
export interface CostListResponse {
|
|
264
264
|
data: Array<Shared.AggregatedCost>;
|
|
@@ -138,7 +138,7 @@ export declare class Costs extends APIResource {
|
|
|
138
138
|
* `secondary_grouping_key` based on the matrix price definition, for each
|
|
139
139
|
* `grouping_value` and `secondary_grouping_value` available.
|
|
140
140
|
*/
|
|
141
|
-
list(
|
|
141
|
+
list(customerID: string, query?: CostListParams | null | undefined, options?: RequestOptions): APIPromise<CostListResponse>;
|
|
142
142
|
/**
|
|
143
143
|
* This endpoint is used to fetch a day-by-day snapshot of a customer's costs in
|
|
144
144
|
* Orb, calculated by applying pricing information to the underlying usage (see the
|
|
@@ -258,7 +258,7 @@ export declare class Costs extends APIResource {
|
|
|
258
258
|
* `secondary_grouping_key` based on the matrix price definition, for each
|
|
259
259
|
* `grouping_value` and `secondary_grouping_value` available.
|
|
260
260
|
*/
|
|
261
|
-
listByExternalID(
|
|
261
|
+
listByExternalID(externalCustomerID: string, query?: CostListByExternalIDParams | null | undefined, options?: RequestOptions): APIPromise<CostListByExternalIDResponse>;
|
|
262
262
|
}
|
|
263
263
|
export interface CostListResponse {
|
|
264
264
|
data: Array<Shared.AggregatedCost>;
|
|
@@ -140,8 +140,8 @@ class Costs extends resource_1.APIResource {
|
|
|
140
140
|
* `secondary_grouping_key` based on the matrix price definition, for each
|
|
141
141
|
* `grouping_value` and `secondary_grouping_value` available.
|
|
142
142
|
*/
|
|
143
|
-
list(
|
|
144
|
-
return this._client.get((0, path_1.path) `/customers/${
|
|
143
|
+
list(customerID, query = {}, options) {
|
|
144
|
+
return this._client.get((0, path_1.path) `/customers/${customerID}/costs`, { query, ...options });
|
|
145
145
|
}
|
|
146
146
|
/**
|
|
147
147
|
* This endpoint is used to fetch a day-by-day snapshot of a customer's costs in
|
|
@@ -262,8 +262,8 @@ class Costs extends resource_1.APIResource {
|
|
|
262
262
|
* `secondary_grouping_key` based on the matrix price definition, for each
|
|
263
263
|
* `grouping_value` and `secondary_grouping_value` available.
|
|
264
264
|
*/
|
|
265
|
-
listByExternalID(
|
|
266
|
-
return this._client.get((0, path_1.path) `/customers/external_customer_id/${
|
|
265
|
+
listByExternalID(externalCustomerID, query = {}, options) {
|
|
266
|
+
return this._client.get((0, path_1.path) `/customers/external_customer_id/${externalCustomerID}/costs`, {
|
|
267
267
|
query,
|
|
268
268
|
...options,
|
|
269
269
|
});
|
|
@@ -137,8 +137,8 @@ export class Costs extends APIResource {
|
|
|
137
137
|
* `secondary_grouping_key` based on the matrix price definition, for each
|
|
138
138
|
* `grouping_value` and `secondary_grouping_value` available.
|
|
139
139
|
*/
|
|
140
|
-
list(
|
|
141
|
-
return this._client.get(path `/customers/${
|
|
140
|
+
list(customerID, query = {}, options) {
|
|
141
|
+
return this._client.get(path `/customers/${customerID}/costs`, { query, ...options });
|
|
142
142
|
}
|
|
143
143
|
/**
|
|
144
144
|
* This endpoint is used to fetch a day-by-day snapshot of a customer's costs in
|
|
@@ -259,8 +259,8 @@ export class Costs extends APIResource {
|
|
|
259
259
|
* `secondary_grouping_key` based on the matrix price definition, for each
|
|
260
260
|
* `grouping_value` and `secondary_grouping_value` available.
|
|
261
261
|
*/
|
|
262
|
-
listByExternalID(
|
|
263
|
-
return this._client.get(path `/customers/external_customer_id/${
|
|
262
|
+
listByExternalID(externalCustomerID, query = {}, options) {
|
|
263
|
+
return this._client.get(path `/customers/external_customer_id/${externalCustomerID}/costs`, {
|
|
264
264
|
query,
|
|
265
265
|
...options,
|
|
266
266
|
});
|
|
@@ -26,7 +26,7 @@ export declare class Credits extends APIResource {
|
|
|
26
26
|
* `effective_date[lte]` query parameters. This filters on when the credit block
|
|
27
27
|
* becomes effective, which may differ from creation time for backdated credits.
|
|
28
28
|
*/
|
|
29
|
-
list(
|
|
29
|
+
list(customerID: string, query?: CreditListParams | null | undefined, options?: RequestOptions): PagePromise<CreditListResponsesPage, CreditListResponse>;
|
|
30
30
|
/**
|
|
31
31
|
* Returns a paginated list of unexpired, non-zero credit blocks for a customer.
|
|
32
32
|
*
|
|
@@ -41,7 +41,7 @@ export declare class Credits extends APIResource {
|
|
|
41
41
|
* `effective_date[lte]` query parameters. This filters on when the credit block
|
|
42
42
|
* becomes effective, which may differ from creation time for backdated credits.
|
|
43
43
|
*/
|
|
44
|
-
listByExternalID(
|
|
44
|
+
listByExternalID(externalCustomerID: string, query?: CreditListByExternalIDParams | null | undefined, options?: RequestOptions): PagePromise<CreditListByExternalIDResponsesPage, CreditListByExternalIDResponse>;
|
|
45
45
|
}
|
|
46
46
|
export type CreditListResponsesPage = Page<CreditListResponse>;
|
|
47
47
|
export type CreditListByExternalIDResponsesPage = Page<CreditListByExternalIDResponse>;
|
|
@@ -26,7 +26,7 @@ export declare class Credits extends APIResource {
|
|
|
26
26
|
* `effective_date[lte]` query parameters. This filters on when the credit block
|
|
27
27
|
* becomes effective, which may differ from creation time for backdated credits.
|
|
28
28
|
*/
|
|
29
|
-
list(
|
|
29
|
+
list(customerID: string, query?: CreditListParams | null | undefined, options?: RequestOptions): PagePromise<CreditListResponsesPage, CreditListResponse>;
|
|
30
30
|
/**
|
|
31
31
|
* Returns a paginated list of unexpired, non-zero credit blocks for a customer.
|
|
32
32
|
*
|
|
@@ -41,7 +41,7 @@ export declare class Credits extends APIResource {
|
|
|
41
41
|
* `effective_date[lte]` query parameters. This filters on when the credit block
|
|
42
42
|
* becomes effective, which may differ from creation time for backdated credits.
|
|
43
43
|
*/
|
|
44
|
-
listByExternalID(
|
|
44
|
+
listByExternalID(externalCustomerID: string, query?: CreditListByExternalIDParams | null | undefined, options?: RequestOptions): PagePromise<CreditListByExternalIDResponsesPage, CreditListByExternalIDResponse>;
|
|
45
45
|
}
|
|
46
46
|
export type CreditListResponsesPage = Page<CreditListResponse>;
|
|
47
47
|
export type CreditListByExternalIDResponsesPage = Page<CreditListByExternalIDResponse>;
|
|
@@ -33,8 +33,8 @@ class Credits extends resource_1.APIResource {
|
|
|
33
33
|
* `effective_date[lte]` query parameters. This filters on when the credit block
|
|
34
34
|
* becomes effective, which may differ from creation time for backdated credits.
|
|
35
35
|
*/
|
|
36
|
-
list(
|
|
37
|
-
return this._client.getAPIList((0, path_1.path) `/customers/${
|
|
36
|
+
list(customerID, query = {}, options) {
|
|
37
|
+
return this._client.getAPIList((0, path_1.path) `/customers/${customerID}/credits`, (pagination_1.Page), {
|
|
38
38
|
query,
|
|
39
39
|
...options,
|
|
40
40
|
});
|
|
@@ -53,8 +53,8 @@ class Credits extends resource_1.APIResource {
|
|
|
53
53
|
* `effective_date[lte]` query parameters. This filters on when the credit block
|
|
54
54
|
* becomes effective, which may differ from creation time for backdated credits.
|
|
55
55
|
*/
|
|
56
|
-
listByExternalID(
|
|
57
|
-
return this._client.getAPIList((0, path_1.path) `/customers/external_customer_id/${
|
|
56
|
+
listByExternalID(externalCustomerID, query = {}, options) {
|
|
57
|
+
return this._client.getAPIList((0, path_1.path) `/customers/external_customer_id/${externalCustomerID}/credits`, (pagination_1.Page), { query, ...options });
|
|
58
58
|
}
|
|
59
59
|
}
|
|
60
60
|
exports.Credits = Credits;
|
|
@@ -29,8 +29,8 @@ export class Credits extends APIResource {
|
|
|
29
29
|
* `effective_date[lte]` query parameters. This filters on when the credit block
|
|
30
30
|
* becomes effective, which may differ from creation time for backdated credits.
|
|
31
31
|
*/
|
|
32
|
-
list(
|
|
33
|
-
return this._client.getAPIList(path `/customers/${
|
|
32
|
+
list(customerID, query = {}, options) {
|
|
33
|
+
return this._client.getAPIList(path `/customers/${customerID}/credits`, (Page), {
|
|
34
34
|
query,
|
|
35
35
|
...options,
|
|
36
36
|
});
|
|
@@ -49,8 +49,8 @@ export class Credits extends APIResource {
|
|
|
49
49
|
* `effective_date[lte]` query parameters. This filters on when the credit block
|
|
50
50
|
* becomes effective, which may differ from creation time for backdated credits.
|
|
51
51
|
*/
|
|
52
|
-
listByExternalID(
|
|
53
|
-
return this._client.getAPIList(path `/customers/external_customer_id/${
|
|
52
|
+
listByExternalID(externalCustomerID, query = {}, options) {
|
|
53
|
+
return this._client.getAPIList(path `/customers/external_customer_id/${externalCustomerID}/credits`, (Page), { query, ...options });
|
|
54
54
|
}
|
|
55
55
|
}
|
|
56
56
|
Credits.Ledger = Ledger;
|
|
@@ -88,7 +88,7 @@ export declare class Ledger extends APIResource {
|
|
|
88
88
|
* When credits are added to a customer's balance as a result of a correction, this
|
|
89
89
|
* entry will be added to the ledger to indicate the adjustment of credits.
|
|
90
90
|
*/
|
|
91
|
-
list(
|
|
91
|
+
list(customerID: string, query?: LedgerListParams | null | undefined, options?: RequestOptions): PagePromise<LedgerListResponsesPage, LedgerListResponse>;
|
|
92
92
|
/**
|
|
93
93
|
* This endpoint allows you to create a new ledger entry for a specified customer's
|
|
94
94
|
* balance. This can be used to increment balance, deduct credits, and change the
|
|
@@ -215,7 +215,7 @@ export declare class Ledger extends APIResource {
|
|
|
215
215
|
* that was originally decremented from, and `amount` indicates how many credits to
|
|
216
216
|
* return to the customer, up to the block's initial balance.
|
|
217
217
|
*/
|
|
218
|
-
createEntry(
|
|
218
|
+
createEntry(customerID: string, body: LedgerCreateEntryParams, options?: RequestOptions): APIPromise<LedgerCreateEntryResponse>;
|
|
219
219
|
/**
|
|
220
220
|
* This endpoint allows you to create a new ledger entry for a specified customer's
|
|
221
221
|
* balance. This can be used to increment balance, deduct credits, and change the
|
|
@@ -342,7 +342,7 @@ export declare class Ledger extends APIResource {
|
|
|
342
342
|
* that was originally decremented from, and `amount` indicates how many credits to
|
|
343
343
|
* return to the customer, up to the block's initial balance.
|
|
344
344
|
*/
|
|
345
|
-
createEntryByExternalID(
|
|
345
|
+
createEntryByExternalID(externalCustomerID: string, body: LedgerCreateEntryByExternalIDParams, options?: RequestOptions): APIPromise<LedgerCreateEntryByExternalIDResponse>;
|
|
346
346
|
/**
|
|
347
347
|
* The credits ledger provides _auditing_ functionality over Orb's credits system
|
|
348
348
|
* with a list of actions that have taken place to modify a customer's credit
|
|
@@ -424,7 +424,7 @@ export declare class Ledger extends APIResource {
|
|
|
424
424
|
* When credits are added to a customer's balance as a result of a correction, this
|
|
425
425
|
* entry will be added to the ledger to indicate the adjustment of credits.
|
|
426
426
|
*/
|
|
427
|
-
listByExternalID(
|
|
427
|
+
listByExternalID(externalCustomerID: string, query?: LedgerListByExternalIDParams | null | undefined, options?: RequestOptions): PagePromise<LedgerListByExternalIDResponsesPage, LedgerListByExternalIDResponse>;
|
|
428
428
|
}
|
|
429
429
|
export type LedgerListResponsesPage = Page<LedgerListResponse>;
|
|
430
430
|
export type LedgerListByExternalIDResponsesPage = Page<LedgerListByExternalIDResponse>;
|
|
@@ -88,7 +88,7 @@ export declare class Ledger extends APIResource {
|
|
|
88
88
|
* When credits are added to a customer's balance as a result of a correction, this
|
|
89
89
|
* entry will be added to the ledger to indicate the adjustment of credits.
|
|
90
90
|
*/
|
|
91
|
-
list(
|
|
91
|
+
list(customerID: string, query?: LedgerListParams | null | undefined, options?: RequestOptions): PagePromise<LedgerListResponsesPage, LedgerListResponse>;
|
|
92
92
|
/**
|
|
93
93
|
* This endpoint allows you to create a new ledger entry for a specified customer's
|
|
94
94
|
* balance. This can be used to increment balance, deduct credits, and change the
|
|
@@ -215,7 +215,7 @@ export declare class Ledger extends APIResource {
|
|
|
215
215
|
* that was originally decremented from, and `amount` indicates how many credits to
|
|
216
216
|
* return to the customer, up to the block's initial balance.
|
|
217
217
|
*/
|
|
218
|
-
createEntry(
|
|
218
|
+
createEntry(customerID: string, body: LedgerCreateEntryParams, options?: RequestOptions): APIPromise<LedgerCreateEntryResponse>;
|
|
219
219
|
/**
|
|
220
220
|
* This endpoint allows you to create a new ledger entry for a specified customer's
|
|
221
221
|
* balance. This can be used to increment balance, deduct credits, and change the
|
|
@@ -342,7 +342,7 @@ export declare class Ledger extends APIResource {
|
|
|
342
342
|
* that was originally decremented from, and `amount` indicates how many credits to
|
|
343
343
|
* return to the customer, up to the block's initial balance.
|
|
344
344
|
*/
|
|
345
|
-
createEntryByExternalID(
|
|
345
|
+
createEntryByExternalID(externalCustomerID: string, body: LedgerCreateEntryByExternalIDParams, options?: RequestOptions): APIPromise<LedgerCreateEntryByExternalIDResponse>;
|
|
346
346
|
/**
|
|
347
347
|
* The credits ledger provides _auditing_ functionality over Orb's credits system
|
|
348
348
|
* with a list of actions that have taken place to modify a customer's credit
|
|
@@ -424,7 +424,7 @@ export declare class Ledger extends APIResource {
|
|
|
424
424
|
* When credits are added to a customer's balance as a result of a correction, this
|
|
425
425
|
* entry will be added to the ledger to indicate the adjustment of credits.
|
|
426
426
|
*/
|
|
427
|
-
listByExternalID(
|
|
427
|
+
listByExternalID(externalCustomerID: string, query?: LedgerListByExternalIDParams | null | undefined, options?: RequestOptions): PagePromise<LedgerListByExternalIDResponsesPage, LedgerListByExternalIDResponse>;
|
|
428
428
|
}
|
|
429
429
|
export type LedgerListResponsesPage = Page<LedgerListResponse>;
|
|
430
430
|
export type LedgerListByExternalIDResponsesPage = Page<LedgerListByExternalIDResponse>;
|
|
@@ -90,8 +90,8 @@ class Ledger extends resource_1.APIResource {
|
|
|
90
90
|
* When credits are added to a customer's balance as a result of a correction, this
|
|
91
91
|
* entry will be added to the ledger to indicate the adjustment of credits.
|
|
92
92
|
*/
|
|
93
|
-
list(
|
|
94
|
-
return this._client.getAPIList((0, path_1.path) `/customers/${
|
|
93
|
+
list(customerID, query = {}, options) {
|
|
94
|
+
return this._client.getAPIList((0, path_1.path) `/customers/${customerID}/credits/ledger`, (pagination_1.Page), {
|
|
95
95
|
query,
|
|
96
96
|
...options,
|
|
97
97
|
});
|
|
@@ -222,8 +222,8 @@ class Ledger extends resource_1.APIResource {
|
|
|
222
222
|
* that was originally decremented from, and `amount` indicates how many credits to
|
|
223
223
|
* return to the customer, up to the block's initial balance.
|
|
224
224
|
*/
|
|
225
|
-
createEntry(
|
|
226
|
-
return this._client.post((0, path_1.path) `/customers/${
|
|
225
|
+
createEntry(customerID, body, options) {
|
|
226
|
+
return this._client.post((0, path_1.path) `/customers/${customerID}/credits/ledger_entry`, { body, ...options });
|
|
227
227
|
}
|
|
228
228
|
/**
|
|
229
229
|
* This endpoint allows you to create a new ledger entry for a specified customer's
|
|
@@ -351,8 +351,8 @@ class Ledger extends resource_1.APIResource {
|
|
|
351
351
|
* that was originally decremented from, and `amount` indicates how many credits to
|
|
352
352
|
* return to the customer, up to the block's initial balance.
|
|
353
353
|
*/
|
|
354
|
-
createEntryByExternalID(
|
|
355
|
-
return this._client.post((0, path_1.path) `/customers/external_customer_id/${
|
|
354
|
+
createEntryByExternalID(externalCustomerID, body, options) {
|
|
355
|
+
return this._client.post((0, path_1.path) `/customers/external_customer_id/${externalCustomerID}/credits/ledger_entry`, { body, ...options });
|
|
356
356
|
}
|
|
357
357
|
/**
|
|
358
358
|
* The credits ledger provides _auditing_ functionality over Orb's credits system
|
|
@@ -435,8 +435,8 @@ class Ledger extends resource_1.APIResource {
|
|
|
435
435
|
* When credits are added to a customer's balance as a result of a correction, this
|
|
436
436
|
* entry will be added to the ledger to indicate the adjustment of credits.
|
|
437
437
|
*/
|
|
438
|
-
listByExternalID(
|
|
439
|
-
return this._client.getAPIList((0, path_1.path) `/customers/external_customer_id/${
|
|
438
|
+
listByExternalID(externalCustomerID, query = {}, options) {
|
|
439
|
+
return this._client.getAPIList((0, path_1.path) `/customers/external_customer_id/${externalCustomerID}/credits/ledger`, (pagination_1.Page), { query, ...options });
|
|
440
440
|
}
|
|
441
441
|
}
|
|
442
442
|
exports.Ledger = Ledger;
|