@metronome/sdk 0.1.0-beta.9 → 0.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 +179 -0
- package/README.md +30 -46
- package/_shims/index.d.ts +2 -0
- package/_shims/index.js +5 -1
- package/_shims/index.mjs +5 -1
- package/core.d.ts +19 -5
- package/core.d.ts.map +1 -1
- package/core.js +23 -14
- package/core.js.map +1 -1
- package/core.mjs +24 -15
- package/core.mjs.map +1 -1
- package/index.d.mts +3 -2
- package/index.d.ts +3 -2
- package/index.d.ts.map +1 -1
- package/index.js +6 -3
- package/index.js.map +1 -1
- package/index.mjs +6 -3
- package/index.mjs.map +1 -1
- package/package.json +1 -1
- package/pagination.d.ts +1 -0
- package/pagination.d.ts.map +1 -1
- package/pagination.js +3 -0
- package/pagination.js.map +1 -1
- package/pagination.mjs +3 -0
- package/pagination.mjs.map +1 -1
- package/resource.d.ts +1 -1
- package/resource.d.ts.map +1 -1
- package/resource.js.map +1 -1
- package/resource.mjs.map +1 -1
- package/resources/shared.d.ts +473 -37
- package/resources/shared.d.ts.map +1 -1
- package/resources/v1/alerts.d.ts +26 -2
- package/resources/v1/alerts.d.ts.map +1 -1
- package/resources/v1/alerts.js +19 -0
- package/resources/v1/alerts.js.map +1 -1
- package/resources/v1/alerts.mjs +19 -0
- package/resources/v1/alerts.mjs.map +1 -1
- package/resources/v1/audit-logs.d.ts +8 -0
- package/resources/v1/audit-logs.d.ts.map +1 -1
- package/resources/v1/audit-logs.js.map +1 -1
- package/resources/v1/audit-logs.mjs.map +1 -1
- package/resources/v1/billable-metrics.d.ts +58 -3
- package/resources/v1/billable-metrics.d.ts.map +1 -1
- package/resources/v1/billable-metrics.js +41 -0
- package/resources/v1/billable-metrics.js.map +1 -1
- package/resources/v1/billable-metrics.mjs +41 -0
- package/resources/v1/billable-metrics.mjs.map +1 -1
- package/resources/v1/contracts/contracts.d.ts +1478 -102
- package/resources/v1/contracts/contracts.d.ts.map +1 -1
- package/resources/v1/contracts/contracts.js +180 -3
- package/resources/v1/contracts/contracts.js.map +1 -1
- package/resources/v1/contracts/contracts.mjs +180 -3
- package/resources/v1/contracts/contracts.mjs.map +1 -1
- package/resources/v1/contracts/index.d.ts +2 -2
- package/resources/v1/contracts/index.d.ts.map +1 -1
- package/resources/v1/contracts/index.js.map +1 -1
- package/resources/v1/contracts/index.mjs.map +1 -1
- package/resources/v1/contracts/named-schedules.d.ts +21 -0
- package/resources/v1/contracts/named-schedules.d.ts.map +1 -1
- package/resources/v1/contracts/named-schedules.js +21 -0
- package/resources/v1/contracts/named-schedules.js.map +1 -1
- package/resources/v1/contracts/named-schedules.mjs +21 -0
- package/resources/v1/contracts/named-schedules.mjs.map +1 -1
- package/resources/v1/contracts/products.d.ts +51 -3
- package/resources/v1/contracts/products.d.ts.map +1 -1
- package/resources/v1/contracts/products.js +33 -0
- package/resources/v1/contracts/products.js.map +1 -1
- package/resources/v1/contracts/products.mjs +33 -0
- package/resources/v1/contracts/products.mjs.map +1 -1
- package/resources/v1/contracts/rate-cards/index.d.ts +1 -1
- package/resources/v1/contracts/rate-cards/index.d.ts.map +1 -1
- package/resources/v1/contracts/rate-cards/index.js.map +1 -1
- package/resources/v1/contracts/rate-cards/index.mjs.map +1 -1
- package/resources/v1/contracts/rate-cards/named-schedules.d.ts +25 -0
- package/resources/v1/contracts/rate-cards/named-schedules.d.ts.map +1 -1
- package/resources/v1/contracts/rate-cards/named-schedules.js +25 -0
- package/resources/v1/contracts/rate-cards/named-schedules.js.map +1 -1
- package/resources/v1/contracts/rate-cards/named-schedules.mjs +25 -0
- package/resources/v1/contracts/rate-cards/named-schedules.mjs.map +1 -1
- package/resources/v1/contracts/rate-cards/product-orders.d.ts +30 -0
- package/resources/v1/contracts/rate-cards/product-orders.d.ts.map +1 -1
- package/resources/v1/contracts/rate-cards/product-orders.js +30 -0
- package/resources/v1/contracts/rate-cards/product-orders.js.map +1 -1
- package/resources/v1/contracts/rate-cards/product-orders.mjs +30 -0
- package/resources/v1/contracts/rate-cards/product-orders.mjs.map +1 -1
- package/resources/v1/contracts/rate-cards/rate-cards.d.ts +107 -10
- package/resources/v1/contracts/rate-cards/rate-cards.d.ts.map +1 -1
- package/resources/v1/contracts/rate-cards/rate-cards.js +71 -0
- package/resources/v1/contracts/rate-cards/rate-cards.js.map +1 -1
- package/resources/v1/contracts/rate-cards/rate-cards.mjs +71 -0
- package/resources/v1/contracts/rate-cards/rate-cards.mjs.map +1 -1
- package/resources/v1/contracts/rate-cards/rates.d.ts +102 -14
- package/resources/v1/contracts/rate-cards/rates.d.ts.map +1 -1
- package/resources/v1/contracts/rate-cards/rates.js +68 -0
- package/resources/v1/contracts/rate-cards/rates.js.map +1 -1
- package/resources/v1/contracts/rate-cards/rates.mjs +68 -0
- package/resources/v1/contracts/rate-cards/rates.mjs.map +1 -1
- package/resources/v1/credit-grants.d.ts +77 -2
- package/resources/v1/credit-grants.d.ts.map +1 -1
- package/resources/v1/credit-grants.js +39 -2
- package/resources/v1/credit-grants.js.map +1 -1
- package/resources/v1/credit-grants.mjs +39 -2
- package/resources/v1/credit-grants.mjs.map +1 -1
- package/resources/v1/custom-fields.d.ts +51 -7
- package/resources/v1/custom-fields.d.ts.map +1 -1
- package/resources/v1/custom-fields.js +35 -0
- package/resources/v1/custom-fields.js.map +1 -1
- package/resources/v1/custom-fields.mjs +35 -0
- package/resources/v1/custom-fields.mjs.map +1 -1
- package/resources/v1/customers/alerts.d.ts +28 -0
- package/resources/v1/customers/alerts.d.ts.map +1 -1
- package/resources/v1/customers/alerts.js +23 -0
- package/resources/v1/customers/alerts.js.map +1 -1
- package/resources/v1/customers/alerts.mjs +23 -0
- package/resources/v1/customers/alerts.mjs.map +1 -1
- package/resources/v1/customers/billing-config.d.ts +31 -0
- package/resources/v1/customers/billing-config.d.ts.map +1 -1
- package/resources/v1/customers/billing-config.js +27 -0
- package/resources/v1/customers/billing-config.js.map +1 -1
- package/resources/v1/customers/billing-config.mjs +27 -0
- package/resources/v1/customers/billing-config.mjs.map +1 -1
- package/resources/v1/customers/commits.d.ts +94 -7
- package/resources/v1/customers/commits.d.ts.map +1 -1
- package/resources/v1/customers/commits.js +56 -1
- package/resources/v1/customers/commits.js.map +1 -1
- package/resources/v1/customers/commits.mjs +56 -1
- package/resources/v1/customers/commits.mjs.map +1 -1
- package/resources/v1/customers/credits.d.ts +73 -3
- package/resources/v1/customers/credits.d.ts.map +1 -1
- package/resources/v1/customers/credits.js +41 -1
- package/resources/v1/customers/credits.js.map +1 -1
- package/resources/v1/customers/credits.mjs +41 -1
- package/resources/v1/customers/credits.mjs.map +1 -1
- package/resources/v1/customers/customers.d.ts +186 -9
- package/resources/v1/customers/customers.d.ts.map +1 -1
- package/resources/v1/customers/customers.js +106 -1
- package/resources/v1/customers/customers.js.map +1 -1
- package/resources/v1/customers/customers.mjs +106 -1
- package/resources/v1/customers/customers.mjs.map +1 -1
- package/resources/v1/customers/index.d.ts +1 -1
- package/resources/v1/customers/index.d.ts.map +1 -1
- package/resources/v1/customers/index.js.map +1 -1
- package/resources/v1/customers/index.mjs.map +1 -1
- package/resources/v1/customers/invoices.d.ts +144 -52
- package/resources/v1/customers/invoices.d.ts.map +1 -1
- package/resources/v1/customers/invoices.js +49 -0
- package/resources/v1/customers/invoices.js.map +1 -1
- package/resources/v1/customers/invoices.mjs +49 -0
- package/resources/v1/customers/invoices.mjs.map +1 -1
- package/resources/v1/customers/named-schedules.d.ts +21 -0
- package/resources/v1/customers/named-schedules.d.ts.map +1 -1
- package/resources/v1/customers/named-schedules.js +21 -0
- package/resources/v1/customers/named-schedules.js.map +1 -1
- package/resources/v1/customers/named-schedules.mjs +21 -0
- package/resources/v1/customers/named-schedules.mjs.map +1 -1
- package/resources/v1/customers/plans.d.ts +46 -1
- package/resources/v1/customers/plans.d.ts.map +1 -1
- package/resources/v1/customers/plans.js +43 -0
- package/resources/v1/customers/plans.js.map +1 -1
- package/resources/v1/customers/plans.mjs +43 -0
- package/resources/v1/customers/plans.mjs.map +1 -1
- package/resources/v1/dashboards.d.ts +30 -2
- package/resources/v1/dashboards.d.ts.map +1 -1
- package/resources/v1/dashboards.js +26 -0
- package/resources/v1/dashboards.js.map +1 -1
- package/resources/v1/dashboards.mjs +26 -0
- package/resources/v1/dashboards.mjs.map +1 -1
- package/resources/v1/index.d.ts +3 -3
- package/resources/v1/index.d.ts.map +1 -1
- package/resources/v1/index.js.map +1 -1
- package/resources/v1/index.mjs.map +1 -1
- package/resources/v1/invoices.d.ts +14 -0
- package/resources/v1/invoices.d.ts.map +1 -1
- package/resources/v1/invoices.js +14 -0
- package/resources/v1/invoices.js.map +1 -1
- package/resources/v1/invoices.mjs +14 -0
- package/resources/v1/invoices.mjs.map +1 -1
- package/resources/v1/plans.d.ts +47 -4
- package/resources/v1/plans.d.ts.map +1 -1
- package/resources/v1/plans.js +27 -0
- package/resources/v1/plans.js.map +1 -1
- package/resources/v1/plans.mjs +27 -0
- package/resources/v1/plans.mjs.map +1 -1
- package/resources/v1/pricing-units.d.ts +8 -0
- package/resources/v1/pricing-units.d.ts.map +1 -1
- package/resources/v1/pricing-units.js.map +1 -1
- package/resources/v1/pricing-units.mjs.map +1 -1
- package/resources/v1/services.d.ts +5 -0
- package/resources/v1/services.d.ts.map +1 -1
- package/resources/v1/services.js +5 -0
- package/resources/v1/services.js.map +1 -1
- package/resources/v1/services.mjs +5 -0
- package/resources/v1/services.mjs.map +1 -1
- package/resources/v1/usage.d.ts +161 -3
- package/resources/v1/usage.d.ts.map +1 -1
- package/resources/v1/usage.js +46 -0
- package/resources/v1/usage.js.map +1 -1
- package/resources/v1/usage.mjs +46 -0
- package/resources/v1/usage.mjs.map +1 -1
- package/resources/v1/v1.d.ts +6 -6
- package/resources/v1/v1.d.ts.map +1 -1
- package/resources/v1/v1.js.map +1 -1
- package/resources/v1/v1.mjs.map +1 -1
- package/resources/v2/contracts.d.ts +2923 -207
- package/resources/v2/contracts.d.ts.map +1 -1
- package/resources/v2/contracts.js +90 -2
- package/resources/v2/contracts.js.map +1 -1
- package/resources/v2/contracts.mjs +90 -2
- package/resources/v2/contracts.mjs.map +1 -1
- package/resources/webhooks.js +5 -5
- package/resources/webhooks.js.map +1 -1
- package/resources/webhooks.mjs +5 -5
- package/resources/webhooks.mjs.map +1 -1
- package/src/_shims/auto/runtime-bun.ts +1 -1
- package/src/_shims/auto/runtime-node.ts +1 -1
- package/src/_shims/auto/runtime.ts +1 -1
- package/src/_shims/auto/types-node.ts +1 -1
- package/src/_shims/bun-runtime.ts +2 -2
- package/src/_shims/index.d.ts +5 -3
- package/src/_shims/index.js +5 -1
- package/src/_shims/index.mjs +6 -2
- package/src/_shims/node-runtime.ts +3 -3
- package/src/_shims/registry.ts +1 -1
- package/src/_shims/web-runtime.ts +3 -3
- package/src/core.ts +46 -18
- package/src/error.ts +1 -1
- package/src/index.ts +22 -16
- package/src/internal/qs/formats.ts +1 -1
- package/src/internal/qs/index.ts +3 -3
- package/src/internal/qs/stringify.ts +3 -3
- package/src/internal/qs/utils.ts +2 -2
- package/src/pagination.ts +5 -1
- package/src/resource.ts +2 -2
- package/src/resources/index.ts +4 -4
- package/src/resources/shared.ts +539 -40
- package/src/resources/v1/alerts.ts +29 -5
- package/src/resources/v1/audit-logs.ts +12 -4
- package/src/resources/v1/billable-metrics.ts +57 -8
- package/src/resources/v1/contracts/contracts.ts +1643 -124
- package/src/resources/v1/contracts/index.ts +8 -4
- package/src/resources/v1/contracts/named-schedules.ts +23 -2
- package/src/resources/v1/contracts/products.ts +53 -9
- package/src/resources/v1/contracts/rate-cards/index.ts +6 -4
- package/src/resources/v1/contracts/rate-cards/named-schedules.ts +27 -2
- package/src/resources/v1/contracts/rate-cards/product-orders.ts +33 -3
- package/src/resources/v1/contracts/rate-cards/rate-cards.ts +113 -20
- package/src/resources/v1/contracts/rate-cards/rates.ts +86 -18
- package/src/resources/v1/contracts/rate-cards.ts +1 -1
- package/src/resources/v1/contracts.ts +1 -1
- package/src/resources/v1/credit-grants.ts +82 -10
- package/src/resources/v1/custom-fields.ts +57 -9
- package/src/resources/v1/customers/alerts.ts +32 -3
- package/src/resources/v1/customers/billing-config.ts +34 -2
- package/src/resources/v1/customers/commits.ts +97 -10
- package/src/resources/v1/customers/credits.ts +76 -6
- package/src/resources/v1/customers/customers.ts +208 -27
- package/src/resources/v1/customers/index.ts +10 -8
- package/src/resources/v1/customers/invoices.ts +123 -57
- package/src/resources/v1/customers/named-schedules.ts +23 -2
- package/src/resources/v1/customers/plans.ts +48 -5
- package/src/resources/v1/customers.ts +1 -1
- package/src/resources/v1/dashboards.ts +30 -4
- package/src/resources/v1/index.ts +20 -14
- package/src/resources/v1/invoices.ts +16 -2
- package/src/resources/v1/plans.ts +45 -10
- package/src/resources/v1/pricing-units.ts +12 -4
- package/src/resources/v1/services.ts +7 -2
- package/src/resources/v1/usage.ts +187 -6
- package/src/resources/v1/v1.ts +39 -27
- package/src/resources/v1.ts +1 -1
- package/src/resources/v2/contracts.ts +3397 -235
- package/src/resources/v2/index.ts +2 -2
- package/src/resources/v2/v2.ts +3 -3
- package/src/resources/v2.ts +1 -1
- package/src/resources/webhooks.ts +7 -7
- package/src/resources.ts +1 -1
- package/src/shims/node.ts +3 -3
- package/src/shims/web.ts +3 -3
- package/src/uploads.ts +4 -4
- package/src/version.ts +1 -1
- package/version.d.ts +1 -1
- package/version.d.ts.map +1 -1
- package/version.js +1 -1
- package/version.js.map +1 -1
- package/version.mjs +1 -1
- package/version.mjs.map +1 -1
|
@@ -5,15 +5,50 @@ import { CursorPage, type CursorPageParams } from "../../../pagination.js";
|
|
|
5
5
|
export declare class Invoices extends APIResource {
|
|
6
6
|
/**
|
|
7
7
|
* Fetch a specific invoice for a given customer.
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```ts
|
|
11
|
+
* const invoice = await client.v1.customers.invoices.retrieve(
|
|
12
|
+
* {
|
|
13
|
+
* customer_id: 'd7abd0cd-4ae9-4db7-8676-e986a4ebd8dc',
|
|
14
|
+
* invoice_id: '6a37bb88-8538-48c5-b37b-a41c836328bd',
|
|
15
|
+
* },
|
|
16
|
+
* );
|
|
17
|
+
* ```
|
|
8
18
|
*/
|
|
9
19
|
retrieve(params: InvoiceRetrieveParams, options?: Core.RequestOptions): Core.APIPromise<InvoiceRetrieveResponse>;
|
|
10
20
|
/**
|
|
11
21
|
* List all invoices for a given customer, optionally filtered by status, date
|
|
12
22
|
* range, and/or credit type.
|
|
23
|
+
*
|
|
24
|
+
* @example
|
|
25
|
+
* ```ts
|
|
26
|
+
* // Automatically fetches more pages as needed.
|
|
27
|
+
* for await (const invoice of client.v1.customers.invoices.list(
|
|
28
|
+
* { customer_id: 'd7abd0cd-4ae9-4db7-8676-e986a4ebd8dc' },
|
|
29
|
+
* )) {
|
|
30
|
+
* // ...
|
|
31
|
+
* }
|
|
32
|
+
* ```
|
|
13
33
|
*/
|
|
14
34
|
list(params: InvoiceListParams, options?: Core.RequestOptions): Core.PagePromise<InvoicesCursorPage, Invoice>;
|
|
15
35
|
/**
|
|
16
36
|
* Add a one time charge to the specified invoice
|
|
37
|
+
*
|
|
38
|
+
* @example
|
|
39
|
+
* ```ts
|
|
40
|
+
* const response =
|
|
41
|
+
* await client.v1.customers.invoices.addCharge({
|
|
42
|
+
* customer_id: 'd7abd0cd-4ae9-4db7-8676-e986a4ebd8dc',
|
|
43
|
+
* charge_id: '5ae4b726-1ebe-439c-9190-9831760ba195',
|
|
44
|
+
* customer_plan_id:
|
|
45
|
+
* 'a23b3cf4-47fb-4c3f-bb3d-9e64f7704015',
|
|
46
|
+
* description: 'One time charge',
|
|
47
|
+
* invoice_start_timestamp: '2024-01-01T00:00:00Z',
|
|
48
|
+
* price: 250,
|
|
49
|
+
* quantity: 1,
|
|
50
|
+
* });
|
|
51
|
+
* ```
|
|
17
52
|
*/
|
|
18
53
|
addCharge(params: InvoiceAddChargeParams, options?: Core.RequestOptions): Core.APIPromise<InvoiceAddChargeResponse>;
|
|
19
54
|
/**
|
|
@@ -22,6 +57,20 @@ export declare class Invoices extends APIResource {
|
|
|
22
57
|
*
|
|
23
58
|
* - If we receive backdated usage after an invoice has been finalized, the
|
|
24
59
|
* backdated usage will be included in the response and usage numbers may differ.
|
|
60
|
+
*
|
|
61
|
+
* @example
|
|
62
|
+
* ```ts
|
|
63
|
+
* // Automatically fetches more pages as needed.
|
|
64
|
+
* for await (const invoiceListBreakdownsResponse of client.v1.customers.invoices.listBreakdowns(
|
|
65
|
+
* {
|
|
66
|
+
* customer_id: 'd7abd0cd-4ae9-4db7-8676-e986a4ebd8dc',
|
|
67
|
+
* ending_before: '2019-12-27T18:11:19.117Z',
|
|
68
|
+
* starting_on: '2019-12-27T18:11:19.117Z',
|
|
69
|
+
* },
|
|
70
|
+
* )) {
|
|
71
|
+
* // ...
|
|
72
|
+
* }
|
|
73
|
+
* ```
|
|
25
74
|
*/
|
|
26
75
|
listBreakdowns(params: InvoiceListBreakdownsParams, options?: Core.RequestOptions): Core.PagePromise<InvoiceListBreakdownsResponsesCursorPage, InvoiceListBreakdownsResponse>;
|
|
27
76
|
}
|
|
@@ -42,7 +91,9 @@ export interface Invoice {
|
|
|
42
91
|
* This field's availability is dependent on your client's configuration.
|
|
43
92
|
*/
|
|
44
93
|
billable_status?: 'billable' | 'unbillable';
|
|
45
|
-
contract_custom_fields?:
|
|
94
|
+
contract_custom_fields?: {
|
|
95
|
+
[key: string]: string;
|
|
96
|
+
};
|
|
46
97
|
contract_id?: string;
|
|
47
98
|
correction_record?: Invoice.CorrectionRecord;
|
|
48
99
|
/**
|
|
@@ -50,8 +101,12 @@ export interface Invoice {
|
|
|
50
101
|
* invoices only.
|
|
51
102
|
*/
|
|
52
103
|
created_at?: string;
|
|
53
|
-
custom_fields?:
|
|
54
|
-
|
|
104
|
+
custom_fields?: {
|
|
105
|
+
[key: string]: unknown;
|
|
106
|
+
};
|
|
107
|
+
customer_custom_fields?: {
|
|
108
|
+
[key: string]: string;
|
|
109
|
+
};
|
|
55
110
|
/**
|
|
56
111
|
* End of the usage period this invoice covers (UTC)
|
|
57
112
|
*/
|
|
@@ -67,11 +122,13 @@ export interface Invoice {
|
|
|
67
122
|
* This field's availability is dependent on your client's configuration.
|
|
68
123
|
*/
|
|
69
124
|
netsuite_sales_order_id?: string;
|
|
70
|
-
plan_custom_fields?:
|
|
125
|
+
plan_custom_fields?: {
|
|
126
|
+
[key: string]: string;
|
|
127
|
+
};
|
|
71
128
|
plan_id?: string;
|
|
72
129
|
plan_name?: string;
|
|
73
130
|
/**
|
|
74
|
-
*
|
|
131
|
+
* Only present for contract invoices with reseller royalties.
|
|
75
132
|
*/
|
|
76
133
|
reseller_royalty?: Invoice.ResellerRoyalty;
|
|
77
134
|
/**
|
|
@@ -90,48 +147,51 @@ export declare namespace Invoice {
|
|
|
90
147
|
name: string;
|
|
91
148
|
total: number;
|
|
92
149
|
/**
|
|
93
|
-
*
|
|
150
|
+
* Details about the credit or commit that was applied to this line item. Only
|
|
151
|
+
* present on line items with product of `USAGE`, `SUBSCRIPTION` or `COMPOSITE`
|
|
152
|
+
* types.
|
|
94
153
|
*/
|
|
95
154
|
applied_commit_or_credit?: LineItem.AppliedCommitOrCredit;
|
|
155
|
+
commit_custom_fields?: {
|
|
156
|
+
[key: string]: string;
|
|
157
|
+
};
|
|
96
158
|
/**
|
|
97
|
-
*
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
* only present for beta contract invoices
|
|
159
|
+
* For line items with product of `USAGE`, `SUBSCRIPTION`, or `COMPOSITE` types,
|
|
160
|
+
* the ID of the credit or commit that was applied to this line item. For line
|
|
161
|
+
* items with product type of `FIXED`, the ID of the prepaid or postpaid commit
|
|
162
|
+
* that is being paid for.
|
|
102
163
|
*/
|
|
103
164
|
commit_id?: string;
|
|
104
|
-
/**
|
|
105
|
-
* only present for beta contract invoices. This field's availability is dependent
|
|
106
|
-
* on your client's configuration.
|
|
107
|
-
*/
|
|
108
165
|
commit_netsuite_item_id?: string;
|
|
109
|
-
/**
|
|
110
|
-
* only present for beta contract invoices. This field's availability is dependent
|
|
111
|
-
* on your client's configuration.
|
|
112
|
-
*/
|
|
113
166
|
commit_netsuite_sales_order_id?: string;
|
|
114
|
-
/**
|
|
115
|
-
* only present for beta contract invoices
|
|
116
|
-
*/
|
|
117
167
|
commit_segment_id?: string;
|
|
118
168
|
/**
|
|
119
|
-
*
|
|
169
|
+
* `PrepaidCommit` (for commit types `PREPAID` and `CREDIT`) or `PostpaidCommit`
|
|
170
|
+
* (for commit type `POSTPAID`).
|
|
120
171
|
*/
|
|
121
172
|
commit_type?: string;
|
|
122
|
-
custom_fields?:
|
|
173
|
+
custom_fields?: {
|
|
174
|
+
[key: string]: string;
|
|
175
|
+
};
|
|
176
|
+
discount_custom_fields?: {
|
|
177
|
+
[key: string]: string;
|
|
178
|
+
};
|
|
179
|
+
/**
|
|
180
|
+
* ID of the discount applied to this line item.
|
|
181
|
+
*/
|
|
182
|
+
discount_id?: string;
|
|
123
183
|
/**
|
|
124
|
-
*
|
|
184
|
+
* The line item's end date (exclusive).
|
|
125
185
|
*/
|
|
126
186
|
ending_before?: string;
|
|
127
187
|
group_key?: string;
|
|
128
188
|
group_value?: string | null;
|
|
129
189
|
/**
|
|
130
|
-
*
|
|
190
|
+
* Indicates whether the line item is prorated for `SUBSCRIPTION` type product.
|
|
131
191
|
*/
|
|
132
192
|
is_prorated?: boolean;
|
|
133
193
|
/**
|
|
134
|
-
* Only present for contract invoices and when the include_list_prices query
|
|
194
|
+
* Only present for contract invoices and when the `include_list_prices` query
|
|
135
195
|
* parameter is set to true. This will include the list rate for the charge if
|
|
136
196
|
* applicable. Only present for usage and subscription line items.
|
|
137
197
|
*/
|
|
@@ -145,70 +205,97 @@ export declare namespace Invoice {
|
|
|
145
205
|
* The start date for the billing period on the invoice.
|
|
146
206
|
*/
|
|
147
207
|
netsuite_invoice_billing_start?: string;
|
|
148
|
-
/**
|
|
149
|
-
* only present for beta contract invoices. This field's availability is dependent
|
|
150
|
-
* on your client's configuration.
|
|
151
|
-
*/
|
|
152
208
|
netsuite_item_id?: string;
|
|
153
209
|
/**
|
|
154
|
-
*
|
|
210
|
+
* Only present for line items paying for a postpaid commit true-up.
|
|
155
211
|
*/
|
|
156
212
|
postpaid_commit?: LineItem.PostpaidCommit;
|
|
157
213
|
/**
|
|
158
|
-
*
|
|
159
|
-
*
|
|
214
|
+
* Includes the presentation group values associated with this line item if
|
|
215
|
+
* presentation group keys are used.
|
|
160
216
|
*/
|
|
161
|
-
presentation_group_values?:
|
|
217
|
+
presentation_group_values?: {
|
|
218
|
+
[key: string]: string | null;
|
|
219
|
+
};
|
|
162
220
|
/**
|
|
163
|
-
*
|
|
164
|
-
*
|
|
221
|
+
* Includes the pricing group values associated with this line item if dimensional
|
|
222
|
+
* pricing is used.
|
|
223
|
+
*/
|
|
224
|
+
pricing_group_values?: {
|
|
225
|
+
[key: string]: string;
|
|
226
|
+
};
|
|
227
|
+
product_custom_fields?: {
|
|
228
|
+
[key: string]: string;
|
|
229
|
+
};
|
|
230
|
+
/**
|
|
231
|
+
* ID of the product associated with the line item.
|
|
165
232
|
*/
|
|
166
|
-
pricing_group_values?: Record<string, string>;
|
|
167
|
-
product_custom_fields?: Record<string, string>;
|
|
168
233
|
product_id?: string;
|
|
169
|
-
product_type?: string;
|
|
170
234
|
/**
|
|
171
|
-
*
|
|
235
|
+
* The current product tags associated with the line item's `product_id`.
|
|
172
236
|
*/
|
|
173
|
-
|
|
237
|
+
product_tags?: Array<string>;
|
|
174
238
|
/**
|
|
175
|
-
*
|
|
239
|
+
* The type of the line item's product. Possible values are `FixedProductListItem`
|
|
240
|
+
* (for `FIXED` type products), `UsageProductListItem` (for `USAGE` type products),
|
|
241
|
+
* `SubscriptionProductListItem` (for `SUBSCRIPTION` type products) or
|
|
242
|
+
* `CompositeProductListItem` (for `COMPOSITE` type products). For scheduled
|
|
243
|
+
* charges, commit and credit payments, the value is `FixedProductListItem`.
|
|
176
244
|
*/
|
|
245
|
+
product_type?: string;
|
|
246
|
+
professional_service_custom_fields?: {
|
|
247
|
+
[key: string]: string;
|
|
248
|
+
};
|
|
177
249
|
professional_service_id?: string;
|
|
250
|
+
/**
|
|
251
|
+
* The quantity associated with the line item.
|
|
252
|
+
*/
|
|
178
253
|
quantity?: number;
|
|
179
254
|
reseller_type?: 'AWS' | 'AWS_PRO_SERVICE' | 'GCP' | 'GCP_PRO_SERVICE';
|
|
180
|
-
scheduled_charge_custom_fields?:
|
|
255
|
+
scheduled_charge_custom_fields?: {
|
|
256
|
+
[key: string]: string;
|
|
257
|
+
};
|
|
181
258
|
/**
|
|
182
|
-
*
|
|
259
|
+
* ID of scheduled charge.
|
|
183
260
|
*/
|
|
184
261
|
scheduled_charge_id?: string;
|
|
185
262
|
/**
|
|
186
|
-
*
|
|
263
|
+
* The line item's start date (inclusive).
|
|
187
264
|
*/
|
|
188
265
|
starting_at?: string;
|
|
189
266
|
sub_line_items?: Array<LineItem.SubLineItem>;
|
|
267
|
+
subscription_custom_fields?: {
|
|
268
|
+
[key: string]: string;
|
|
269
|
+
};
|
|
270
|
+
/**
|
|
271
|
+
* Populated if the line item has a tiered price.
|
|
272
|
+
*/
|
|
190
273
|
tier?: LineItem.Tier;
|
|
191
274
|
/**
|
|
192
|
-
*
|
|
275
|
+
* The unit price associated with the line item.
|
|
193
276
|
*/
|
|
194
277
|
unit_price?: number;
|
|
195
278
|
}
|
|
196
279
|
namespace LineItem {
|
|
197
280
|
/**
|
|
198
|
-
*
|
|
281
|
+
* Details about the credit or commit that was applied to this line item. Only
|
|
282
|
+
* present on line items with product of `USAGE`, `SUBSCRIPTION` or `COMPOSITE`
|
|
283
|
+
* types.
|
|
199
284
|
*/
|
|
200
285
|
interface AppliedCommitOrCredit {
|
|
201
286
|
id: string;
|
|
202
287
|
type: 'PREPAID' | 'POSTPAID' | 'CREDIT';
|
|
203
288
|
}
|
|
204
289
|
/**
|
|
205
|
-
*
|
|
290
|
+
* Only present for line items paying for a postpaid commit true-up.
|
|
206
291
|
*/
|
|
207
292
|
interface PostpaidCommit {
|
|
208
293
|
id: string;
|
|
209
294
|
}
|
|
210
295
|
interface SubLineItem {
|
|
211
|
-
custom_fields:
|
|
296
|
+
custom_fields: {
|
|
297
|
+
[key: string]: string;
|
|
298
|
+
};
|
|
212
299
|
name: string;
|
|
213
300
|
quantity: number;
|
|
214
301
|
subtotal: number;
|
|
@@ -251,6 +338,9 @@ export declare namespace Invoice {
|
|
|
251
338
|
subtotal: number;
|
|
252
339
|
}
|
|
253
340
|
}
|
|
341
|
+
/**
|
|
342
|
+
* Populated if the line item has a tiered price.
|
|
343
|
+
*/
|
|
254
344
|
interface Tier {
|
|
255
345
|
level: number;
|
|
256
346
|
starting_at: string;
|
|
@@ -281,11 +371,13 @@ export declare namespace Invoice {
|
|
|
281
371
|
credit_type: Shared.CreditTypeData;
|
|
282
372
|
name: string;
|
|
283
373
|
total: number;
|
|
284
|
-
credit_grant_custom_fields?:
|
|
374
|
+
credit_grant_custom_fields?: {
|
|
375
|
+
[key: string]: string;
|
|
376
|
+
};
|
|
285
377
|
credit_grant_id?: string;
|
|
286
378
|
}
|
|
287
379
|
/**
|
|
288
|
-
*
|
|
380
|
+
* Only present for contract invoices with reseller royalties.
|
|
289
381
|
*/
|
|
290
382
|
interface ResellerRoyalty {
|
|
291
383
|
fraction: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"invoices.d.ts","sourceRoot":"","sources":["../../../src/resources/v1/customers/invoices.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,KAAK,IAAI,MAAM,eAAe,CAAC;AACtC,OAAO,KAAK,MAAM,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,UAAU,EAAE,KAAK,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAExE,qBAAa,QAAS,SAAQ,WAAW;IACvC
|
|
1
|
+
{"version":3,"file":"invoices.d.ts","sourceRoot":"","sources":["../../../src/resources/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B,IAAI,sBAAsB,EACrD,KAAK,2BAA2B,IAAI,2BAA2B,GAChE,CAAC;CACH"}
|
|
@@ -7,6 +7,16 @@ const pagination_1 = require("../../../pagination.js");
|
|
|
7
7
|
class Invoices extends resource_1.APIResource {
|
|
8
8
|
/**
|
|
9
9
|
* Fetch a specific invoice for a given customer.
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```ts
|
|
13
|
+
* const invoice = await client.v1.customers.invoices.retrieve(
|
|
14
|
+
* {
|
|
15
|
+
* customer_id: 'd7abd0cd-4ae9-4db7-8676-e986a4ebd8dc',
|
|
16
|
+
* invoice_id: '6a37bb88-8538-48c5-b37b-a41c836328bd',
|
|
17
|
+
* },
|
|
18
|
+
* );
|
|
19
|
+
* ```
|
|
10
20
|
*/
|
|
11
21
|
retrieve(params, options) {
|
|
12
22
|
const { customer_id, invoice_id, ...query } = params;
|
|
@@ -15,6 +25,16 @@ class Invoices extends resource_1.APIResource {
|
|
|
15
25
|
/**
|
|
16
26
|
* List all invoices for a given customer, optionally filtered by status, date
|
|
17
27
|
* range, and/or credit type.
|
|
28
|
+
*
|
|
29
|
+
* @example
|
|
30
|
+
* ```ts
|
|
31
|
+
* // Automatically fetches more pages as needed.
|
|
32
|
+
* for await (const invoice of client.v1.customers.invoices.list(
|
|
33
|
+
* { customer_id: 'd7abd0cd-4ae9-4db7-8676-e986a4ebd8dc' },
|
|
34
|
+
* )) {
|
|
35
|
+
* // ...
|
|
36
|
+
* }
|
|
37
|
+
* ```
|
|
18
38
|
*/
|
|
19
39
|
list(params, options) {
|
|
20
40
|
const { customer_id, ...query } = params;
|
|
@@ -25,6 +45,21 @@ class Invoices extends resource_1.APIResource {
|
|
|
25
45
|
}
|
|
26
46
|
/**
|
|
27
47
|
* Add a one time charge to the specified invoice
|
|
48
|
+
*
|
|
49
|
+
* @example
|
|
50
|
+
* ```ts
|
|
51
|
+
* const response =
|
|
52
|
+
* await client.v1.customers.invoices.addCharge({
|
|
53
|
+
* customer_id: 'd7abd0cd-4ae9-4db7-8676-e986a4ebd8dc',
|
|
54
|
+
* charge_id: '5ae4b726-1ebe-439c-9190-9831760ba195',
|
|
55
|
+
* customer_plan_id:
|
|
56
|
+
* 'a23b3cf4-47fb-4c3f-bb3d-9e64f7704015',
|
|
57
|
+
* description: 'One time charge',
|
|
58
|
+
* invoice_start_timestamp: '2024-01-01T00:00:00Z',
|
|
59
|
+
* price: 250,
|
|
60
|
+
* quantity: 1,
|
|
61
|
+
* });
|
|
62
|
+
* ```
|
|
28
63
|
*/
|
|
29
64
|
addCharge(params, options) {
|
|
30
65
|
const { customer_id, ...body } = params;
|
|
@@ -36,6 +71,20 @@ class Invoices extends resource_1.APIResource {
|
|
|
36
71
|
*
|
|
37
72
|
* - If we receive backdated usage after an invoice has been finalized, the
|
|
38
73
|
* backdated usage will be included in the response and usage numbers may differ.
|
|
74
|
+
*
|
|
75
|
+
* @example
|
|
76
|
+
* ```ts
|
|
77
|
+
* // Automatically fetches more pages as needed.
|
|
78
|
+
* for await (const invoiceListBreakdownsResponse of client.v1.customers.invoices.listBreakdowns(
|
|
79
|
+
* {
|
|
80
|
+
* customer_id: 'd7abd0cd-4ae9-4db7-8676-e986a4ebd8dc',
|
|
81
|
+
* ending_before: '2019-12-27T18:11:19.117Z',
|
|
82
|
+
* starting_on: '2019-12-27T18:11:19.117Z',
|
|
83
|
+
* },
|
|
84
|
+
* )) {
|
|
85
|
+
* // ...
|
|
86
|
+
* }
|
|
87
|
+
* ```
|
|
39
88
|
*/
|
|
40
89
|
listBreakdowns(params, options) {
|
|
41
90
|
const { customer_id, ...query } = params;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"invoices.js","sourceRoot":"","sources":["../../../src/resources/v1/customers/invoices.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,mDAAgD;AAGhD,uDAAwE;AAExE,MAAa,QAAS,SAAQ,sBAAW;IACvC
|
|
1
|
+
{"version":3,"file":"invoices.js","sourceR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AAE,CACtB,CAAC;IACJ,CAAC;CACF;AAzGD,4BAyGC;AAED,MAAa,kBAAmB,SAAQ,uBAAmB;CAAG;AAA9D,gDAA8D;AAE9D,MAAa,wCAAyC,SAAQ,uBAAyC;CAAG;AAA1G,4FAA0G;AA6lB1G,QAAQ,CAAC,kBAAkB,GAAG,kBAAkB,CAAC;AACjD,QAAQ,CAAC,wCAAwC,GAAG,wCAAwC,CAAC"}
|
|
@@ -4,6 +4,16 @@ import { CursorPage } from "../../../pagination.mjs";
|
|
|
4
4
|
export class Invoices extends APIResource {
|
|
5
5
|
/**
|
|
6
6
|
* Fetch a specific invoice for a given customer.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```ts
|
|
10
|
+
* const invoice = await client.v1.customers.invoices.retrieve(
|
|
11
|
+
* {
|
|
12
|
+
* customer_id: 'd7abd0cd-4ae9-4db7-8676-e986a4ebd8dc',
|
|
13
|
+
* invoice_id: '6a37bb88-8538-48c5-b37b-a41c836328bd',
|
|
14
|
+
* },
|
|
15
|
+
* );
|
|
16
|
+
* ```
|
|
7
17
|
*/
|
|
8
18
|
retrieve(params, options) {
|
|
9
19
|
const { customer_id, invoice_id, ...query } = params;
|
|
@@ -12,6 +22,16 @@ export class Invoices extends APIResource {
|
|
|
12
22
|
/**
|
|
13
23
|
* List all invoices for a given customer, optionally filtered by status, date
|
|
14
24
|
* range, and/or credit type.
|
|
25
|
+
*
|
|
26
|
+
* @example
|
|
27
|
+
* ```ts
|
|
28
|
+
* // Automatically fetches more pages as needed.
|
|
29
|
+
* for await (const invoice of client.v1.customers.invoices.list(
|
|
30
|
+
* { customer_id: 'd7abd0cd-4ae9-4db7-8676-e986a4ebd8dc' },
|
|
31
|
+
* )) {
|
|
32
|
+
* // ...
|
|
33
|
+
* }
|
|
34
|
+
* ```
|
|
15
35
|
*/
|
|
16
36
|
list(params, options) {
|
|
17
37
|
const { customer_id, ...query } = params;
|
|
@@ -22,6 +42,21 @@ export class Invoices extends APIResource {
|
|
|
22
42
|
}
|
|
23
43
|
/**
|
|
24
44
|
* Add a one time charge to the specified invoice
|
|
45
|
+
*
|
|
46
|
+
* @example
|
|
47
|
+
* ```ts
|
|
48
|
+
* const response =
|
|
49
|
+
* await client.v1.customers.invoices.addCharge({
|
|
50
|
+
* customer_id: 'd7abd0cd-4ae9-4db7-8676-e986a4ebd8dc',
|
|
51
|
+
* charge_id: '5ae4b726-1ebe-439c-9190-9831760ba195',
|
|
52
|
+
* customer_plan_id:
|
|
53
|
+
* 'a23b3cf4-47fb-4c3f-bb3d-9e64f7704015',
|
|
54
|
+
* description: 'One time charge',
|
|
55
|
+
* invoice_start_timestamp: '2024-01-01T00:00:00Z',
|
|
56
|
+
* price: 250,
|
|
57
|
+
* quantity: 1,
|
|
58
|
+
* });
|
|
59
|
+
* ```
|
|
25
60
|
*/
|
|
26
61
|
addCharge(params, options) {
|
|
27
62
|
const { customer_id, ...body } = params;
|
|
@@ -33,6 +68,20 @@ export class Invoices extends APIResource {
|
|
|
33
68
|
*
|
|
34
69
|
* - If we receive backdated usage after an invoice has been finalized, the
|
|
35
70
|
* backdated usage will be included in the response and usage numbers may differ.
|
|
71
|
+
*
|
|
72
|
+
* @example
|
|
73
|
+
* ```ts
|
|
74
|
+
* // Automatically fetches more pages as needed.
|
|
75
|
+
* for await (const invoiceListBreakdownsResponse of client.v1.customers.invoices.listBreakdowns(
|
|
76
|
+
* {
|
|
77
|
+
* customer_id: 'd7abd0cd-4ae9-4db7-8676-e986a4ebd8dc',
|
|
78
|
+
* ending_before: '2019-12-27T18:11:19.117Z',
|
|
79
|
+
* starting_on: '2019-12-27T18:11:19.117Z',
|
|
80
|
+
* },
|
|
81
|
+
* )) {
|
|
82
|
+
* // ...
|
|
83
|
+
* }
|
|
84
|
+
* ```
|
|
36
85
|
*/
|
|
37
86
|
listBreakdowns(params, options) {
|
|
38
87
|
const { customer_id, ...query } = params;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"invoices.mjs","sourceRoot":"","sources":["../../../src/resources/v1/customers/invoices.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAGf,EAAE,UAAU,EAAyB;AAE5C,MAAM,OAAO,QAAS,SAAQ,WAAW;IACvC
|
|
1
|
+
{"version":3,"file":"invoices.mjs","sourceRoot":"","sources":["../../../src/resources/v1/customers/invoices.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAGf,EAAE,UAAU,EAAyB;AAE5C,MAAM,OAAO,QAAS,SAAQ,WAAW;IACvC;;;;;;;;;;;;OAYG;IACH,QAAQ,CACN,MAA6B,EAC7B,OAA6B;QAE7B,MAAM,EAAE,WAAW,EAAE,UAAU,EAAE,GAAG,KAAK,EAAE,GAAG,MAAM,CAAC;QACrD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,iBAAiB,WAAW,aAAa,UAAU,EAAE,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACxG,CAAC;IAED;;;;;;;;;;;;;OAaG;IACH,IAAI,CACF,MAAyB,EACzB,OAA6B;QAE7B,MAAM,EAAE,WAAW,EAAE,GAAG,KAAK,EAAE,GAAG,MAAM,CAAC;QACzC,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,iBAAiB,WAAW,WAAW,EAAE,kBAAkB,EAAE;YAC1F,KAAK;YACL,GAAG,OAAO;SACX,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;;;;;;;;OAiBG;IACH,SAAS,CACP,MAA8B,EAC9B,OAA6B;QAE7B,MAAM,EAAE,WAAW,EAAE,GAAG,IAAI,EAAE,GAAG,MAAM,CAAC;QACxC,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,iBAAiB,WAAW,YAAY,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC3F,CAAC;IAED;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,cAAc,CACZ,MAAmC,EACnC,OAA6B;QAE7B,MAAM,EAAE,WAAW,EAAE,GAAG,KAAK,EAAE,GAAG,MAAM,CAAC;QACzC,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,CAC5B,iBAAiB,WAAW,sBAAsB,EAClD,wCAAwC,EACxC,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CACtB,CAAC;IACJ,CAAC;CACF;AAED,MAAM,OAAO,kBAAmB,SAAQ,UAAmB;CAAG;AAE9D,MAAM,OAAO,wCAAyC,SAAQ,UAAyC;CAAG;AA6lB1G,QAAQ,CAAC,kBAAkB,GAAG,kBAAkB,CAAC;AACjD,QAAQ,CAAC,wCAAwC,GAAG,wCAAwC,CAAC"}
|
|
@@ -4,11 +4,32 @@ export declare class NamedSchedules extends APIResource {
|
|
|
4
4
|
/**
|
|
5
5
|
* Get a named schedule for the given customer. This endpoint's availability is
|
|
6
6
|
* dependent on your client's configuration.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```ts
|
|
10
|
+
* const namedSchedule =
|
|
11
|
+
* await client.v1.customers.namedSchedules.retrieve({
|
|
12
|
+
* customer_id: '9b85c1c1-5238-4f2a-a409-61412905e1e1',
|
|
13
|
+
* schedule_name: 'my-schedule',
|
|
14
|
+
* covering_date: '2022-02-15T00:00:00Z',
|
|
15
|
+
* });
|
|
16
|
+
* ```
|
|
7
17
|
*/
|
|
8
18
|
retrieve(body: NamedScheduleRetrieveParams, options?: Core.RequestOptions): Core.APIPromise<NamedScheduleRetrieveResponse>;
|
|
9
19
|
/**
|
|
10
20
|
* Update a named schedule for the given customer. This endpoint's availability is
|
|
11
21
|
* dependent on your client's configuration.
|
|
22
|
+
*
|
|
23
|
+
* @example
|
|
24
|
+
* ```ts
|
|
25
|
+
* await client.v1.customers.namedSchedules.update({
|
|
26
|
+
* customer_id: '9b85c1c1-5238-4f2a-a409-61412905e1e1',
|
|
27
|
+
* schedule_name: 'my-schedule',
|
|
28
|
+
* starting_at: '2022-02-01T00:00:00Z',
|
|
29
|
+
* value: { my_key: 'my_value' },
|
|
30
|
+
* ending_before: '2022-02-15T00:00:00Z',
|
|
31
|
+
* });
|
|
32
|
+
* ```
|
|
12
33
|
*/
|
|
13
34
|
update(body: NamedScheduleUpdateParams, options?: Core.RequestOptions): Core.APIPromise<void>;
|
|
14
35
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"named-schedules.d.ts","sourceRoot":"","sources":["../../../src/resources/v1/customers/named-schedules.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,KAAK,IAAI,MAAM,eAAe,CAAC;AAEtC,qBAAa,cAAe,SAAQ,WAAW;IAC7C
|
|
1
|
+
{"version":3,"file":"named-schedules.d.ts","sourceRoot":"","sources":["../../../src/resources/v1/customers/named-schedules.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,KAAK,IAAI,MAAM,eAAe,CAAC;AAEtC,qBAAa,cAAe,SAAQ,WAAW;IAC7C;;;;;;;;;;;;;OAaG;IACH,QAAQ,CACN,IAAI,EAAE,2BAA2B,EACjC,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAC5B,IAAI,CAAC,UAAU,CAAC,6BAA6B,CAAC;IAIjD;;;;;;;;;;;;;;OAcG;IACH,MAAM,CAAC,IAAI,EAAE,yBAAyB,EAAE,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC;CAO9F;AAED,MAAM,WAAW,6BAA6B;IAC5C,IAAI,EAAE,KAAK,CAAC,6BAA6B,CAAC,IAAI,CAAC,CAAC;CACjD;AAED,yBAAiB,6BAA6B,CAAC;IAC7C,UAAiB,IAAI;QACnB,WAAW,EAAE,MAAM,CAAC;QAEpB,KAAK,EAAE,OAAO,CAAC;QAEf,aAAa,CAAC,EAAE,MAAM,CAAC;KACxB;CACF;AAED,MAAM,WAAW,2BAA2B;IAC1C;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,aAAa,EAAE,MAAM,CAAC;IAEtB;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,yBAAyB;IACxC;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,aAAa,EAAE,MAAM,CAAC;IAEtB,WAAW,EAAE,MAAM,CAAC;IAEpB;;;OAGG;IACH,KAAK,EAAE,OAAO,CAAC;IAEf,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,CAAC,OAAO,WAAW,cAAc,CAAC;IACtC,OAAO,EACL,KAAK,6BAA6B,IAAI,6BAA6B,EACnE,KAAK,2BAA2B,IAAI,2BAA2B,EAC/D,KAAK,yBAAyB,IAAI,yBAAyB,GAC5D,CAAC;CACH"}
|
|
@@ -7,6 +7,16 @@ class NamedSchedules extends resource_1.APIResource {
|
|
|
7
7
|
/**
|
|
8
8
|
* Get a named schedule for the given customer. This endpoint's availability is
|
|
9
9
|
* dependent on your client's configuration.
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```ts
|
|
13
|
+
* const namedSchedule =
|
|
14
|
+
* await client.v1.customers.namedSchedules.retrieve({
|
|
15
|
+
* customer_id: '9b85c1c1-5238-4f2a-a409-61412905e1e1',
|
|
16
|
+
* schedule_name: 'my-schedule',
|
|
17
|
+
* covering_date: '2022-02-15T00:00:00Z',
|
|
18
|
+
* });
|
|
19
|
+
* ```
|
|
10
20
|
*/
|
|
11
21
|
retrieve(body, options) {
|
|
12
22
|
return this._client.post('/v1/customers/getNamedSchedule', { body, ...options });
|
|
@@ -14,6 +24,17 @@ class NamedSchedules extends resource_1.APIResource {
|
|
|
14
24
|
/**
|
|
15
25
|
* Update a named schedule for the given customer. This endpoint's availability is
|
|
16
26
|
* dependent on your client's configuration.
|
|
27
|
+
*
|
|
28
|
+
* @example
|
|
29
|
+
* ```ts
|
|
30
|
+
* await client.v1.customers.namedSchedules.update({
|
|
31
|
+
* customer_id: '9b85c1c1-5238-4f2a-a409-61412905e1e1',
|
|
32
|
+
* schedule_name: 'my-schedule',
|
|
33
|
+
* starting_at: '2022-02-01T00:00:00Z',
|
|
34
|
+
* value: { my_key: 'my_value' },
|
|
35
|
+
* ending_before: '2022-02-15T00:00:00Z',
|
|
36
|
+
* });
|
|
37
|
+
* ```
|
|
17
38
|
*/
|
|
18
39
|
update(body, options) {
|
|
19
40
|
return this._client.post('/v1/customers/updateNamedSchedule', {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"named-schedules.js","sourceRoot":"","sources":["../../../src/resources/v1/customers/named-schedules.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,mDAAgD;AAGhD,MAAa,cAAe,SAAQ,sBAAW;IAC7C
|
|
1
|
+
{"version":3,"file":"named-schedules.js","sourceRoot":"","sources":["../../../src/resources/v1/customers/named-schedules.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,mDAAgD;AAGhD,MAAa,cAAe,SAAQ,sBAAW;IAC7C;;;;;;;;;;;;;OAaG;IACH,QAAQ,CACN,IAAiC,EACjC,OAA6B;QAE7B,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,gCAAgC,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACnF,CAAC;IAED;;;;;;;;;;;;;;OAcG;IACH,MAAM,CAAC,IAA+B,EAAE,OAA6B;QACnE,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,mCAAmC,EAAE;YAC5D,IAAI;YACJ,GAAG,OAAO;YACV,OAAO,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,OAAO,EAAE;SAChD,CAAC,CAAC;IACL,CAAC;CACF;AA5CD,wCA4CC"}
|