lark-billing 0.6.0 → 0.7.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 +17 -0
- package/LICENSE +1 -1
- package/README.md +9 -0
- package/client.d.mts +3 -0
- package/client.d.mts.map +1 -1
- package/client.d.ts +3 -0
- package/client.d.ts.map +1 -1
- package/client.js +3 -0
- package/client.js.map +1 -1
- package/client.mjs +3 -0
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/index.d.mts +1 -0
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +1 -0
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +3 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +1 -0
- package/resources/index.mjs.map +1 -1
- package/resources/rate-cards.d.mts +9 -0
- package/resources/rate-cards.d.mts.map +1 -1
- package/resources/rate-cards.d.ts +9 -0
- package/resources/rate-cards.d.ts.map +1 -1
- package/resources/rate-catalogs.d.mts +416 -0
- package/resources/rate-catalogs.d.mts.map +1 -0
- package/resources/rate-catalogs.d.ts +416 -0
- package/resources/rate-catalogs.d.ts.map +1 -0
- package/resources/rate-catalogs.js +75 -0
- package/resources/rate-catalogs.js.map +1 -0
- package/resources/rate-catalogs.mjs +71 -0
- package/resources/rate-catalogs.mjs.map +1 -0
- package/resources/usage-events.d.mts +2 -2
- package/resources/usage-events.d.ts +2 -2
- package/resources/usage-events.js +2 -2
- package/resources/usage-events.mjs +2 -2
- package/src/client.ts +27 -0
- package/src/resources/index.ts +12 -0
- package/src/resources/rate-cards.ts +11 -0
- package/src/resources/rate-catalogs.ts +597 -0
- package/src/resources/usage-events.ts +2 -2
- 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
package/src/client.ts
CHANGED
|
@@ -45,6 +45,18 @@ import {
|
|
|
45
45
|
RateCardResource,
|
|
46
46
|
RateCards,
|
|
47
47
|
} from './resources/rate-cards';
|
|
48
|
+
import {
|
|
49
|
+
RateCatalogAddRatesParams,
|
|
50
|
+
RateCatalogAddRatesResponse,
|
|
51
|
+
RateCatalogCreateParams,
|
|
52
|
+
RateCatalogCreateResponse,
|
|
53
|
+
RateCatalogListParams,
|
|
54
|
+
RateCatalogListRatesParams,
|
|
55
|
+
RateCatalogListRatesResponse,
|
|
56
|
+
RateCatalogListResponse,
|
|
57
|
+
RateCatalogRetrieveResponse,
|
|
58
|
+
RateCatalogs,
|
|
59
|
+
} from './resources/rate-catalogs';
|
|
48
60
|
import {
|
|
49
61
|
SubjectCreateParams,
|
|
50
62
|
SubjectCreateResponse,
|
|
@@ -773,6 +785,7 @@ export class Lark {
|
|
|
773
785
|
pricingMetrics: API.PricingMetrics = new API.PricingMetrics(this);
|
|
774
786
|
customerAccess: API.CustomerAccess = new API.CustomerAccess(this);
|
|
775
787
|
invoices: API.Invoices = new API.Invoices(this);
|
|
788
|
+
rateCatalogs: API.RateCatalogs = new API.RateCatalogs(this);
|
|
776
789
|
}
|
|
777
790
|
|
|
778
791
|
Lark.CustomerPortal = CustomerPortal;
|
|
@@ -783,6 +796,7 @@ Lark.Subjects = Subjects;
|
|
|
783
796
|
Lark.PricingMetrics = PricingMetrics;
|
|
784
797
|
Lark.CustomerAccess = CustomerAccess;
|
|
785
798
|
Lark.Invoices = Invoices;
|
|
799
|
+
Lark.RateCatalogs = RateCatalogs;
|
|
786
800
|
|
|
787
801
|
export declare namespace Lark {
|
|
788
802
|
export type RequestOptions = Opts.RequestOptions;
|
|
@@ -858,4 +872,17 @@ export declare namespace Lark {
|
|
|
858
872
|
type InvoiceListResponse as InvoiceListResponse,
|
|
859
873
|
type InvoiceListParams as InvoiceListParams,
|
|
860
874
|
};
|
|
875
|
+
|
|
876
|
+
export {
|
|
877
|
+
RateCatalogs as RateCatalogs,
|
|
878
|
+
type RateCatalogCreateResponse as RateCatalogCreateResponse,
|
|
879
|
+
type RateCatalogRetrieveResponse as RateCatalogRetrieveResponse,
|
|
880
|
+
type RateCatalogListResponse as RateCatalogListResponse,
|
|
881
|
+
type RateCatalogAddRatesResponse as RateCatalogAddRatesResponse,
|
|
882
|
+
type RateCatalogListRatesResponse as RateCatalogListRatesResponse,
|
|
883
|
+
type RateCatalogCreateParams as RateCatalogCreateParams,
|
|
884
|
+
type RateCatalogListParams as RateCatalogListParams,
|
|
885
|
+
type RateCatalogAddRatesParams as RateCatalogAddRatesParams,
|
|
886
|
+
type RateCatalogListRatesParams as RateCatalogListRatesParams,
|
|
887
|
+
};
|
|
861
888
|
}
|
package/src/resources/index.ts
CHANGED
|
@@ -29,6 +29,18 @@ export {
|
|
|
29
29
|
type RateCardCreateParams,
|
|
30
30
|
type RateCardListParams,
|
|
31
31
|
} from './rate-cards';
|
|
32
|
+
export {
|
|
33
|
+
RateCatalogs,
|
|
34
|
+
type RateCatalogCreateResponse,
|
|
35
|
+
type RateCatalogRetrieveResponse,
|
|
36
|
+
type RateCatalogListResponse,
|
|
37
|
+
type RateCatalogAddRatesResponse,
|
|
38
|
+
type RateCatalogListRatesResponse,
|
|
39
|
+
type RateCatalogCreateParams,
|
|
40
|
+
type RateCatalogListParams,
|
|
41
|
+
type RateCatalogAddRatesParams,
|
|
42
|
+
type RateCatalogListRatesParams,
|
|
43
|
+
} from './rate-catalogs';
|
|
32
44
|
export {
|
|
33
45
|
Subjects,
|
|
34
46
|
type SubjectResource,
|
|
@@ -187,6 +187,11 @@ export interface RateCardResource {
|
|
|
187
187
|
* The description of the rate card.
|
|
188
188
|
*/
|
|
189
189
|
description?: string | null;
|
|
190
|
+
|
|
191
|
+
/**
|
|
192
|
+
* The ID of the rate catalog associated with this rate card.
|
|
193
|
+
*/
|
|
194
|
+
rate_catalog_id?: string | null;
|
|
190
195
|
}
|
|
191
196
|
|
|
192
197
|
export namespace RateCardResource {
|
|
@@ -302,6 +307,12 @@ export interface RateCardCreateParams {
|
|
|
302
307
|
|
|
303
308
|
metadata?: { [key: string]: string };
|
|
304
309
|
|
|
310
|
+
/**
|
|
311
|
+
* The ID of the rate catalog to pull rates from. If set, rates from the catalog
|
|
312
|
+
* with quantity > 1 will be included.
|
|
313
|
+
*/
|
|
314
|
+
rate_catalog_id?: string | null;
|
|
315
|
+
|
|
305
316
|
/**
|
|
306
317
|
* The usage based rates of the rate card. These are billed at the end of each
|
|
307
318
|
* billing cycle.
|
|
@@ -0,0 +1,597 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../core/resource';
|
|
4
|
+
import * as InvoicesAPI from './invoices';
|
|
5
|
+
import * as RateCardsAPI from './rate-cards';
|
|
6
|
+
import { APIPromise } from '../core/api-promise';
|
|
7
|
+
import { RequestOptions } from '../internal/request-options';
|
|
8
|
+
import { path } from '../internal/utils/path';
|
|
9
|
+
|
|
10
|
+
export class RateCatalogs extends APIResource {
|
|
11
|
+
/**
|
|
12
|
+
* Create Rate Catalog
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```ts
|
|
16
|
+
* const rateCatalog = await client.rateCatalogs.create({
|
|
17
|
+
* description: 'My Catalog Description',
|
|
18
|
+
* name: 'My Catalog',
|
|
19
|
+
* });
|
|
20
|
+
* ```
|
|
21
|
+
*/
|
|
22
|
+
create(body: RateCatalogCreateParams, options?: RequestOptions): APIPromise<RateCatalogCreateResponse> {
|
|
23
|
+
return this._client.post('/rate-catalogs', { body, ...options });
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Get Rate Catalog
|
|
28
|
+
*
|
|
29
|
+
* @example
|
|
30
|
+
* ```ts
|
|
31
|
+
* const rateCatalog = await client.rateCatalogs.retrieve(
|
|
32
|
+
* 'rate_catalog_id',
|
|
33
|
+
* );
|
|
34
|
+
* ```
|
|
35
|
+
*/
|
|
36
|
+
retrieve(rateCatalogID: string, options?: RequestOptions): APIPromise<RateCatalogRetrieveResponse> {
|
|
37
|
+
return this._client.get(path`/rate-catalogs/${rateCatalogID}`, options);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* List Rate Catalogs
|
|
42
|
+
*
|
|
43
|
+
* @example
|
|
44
|
+
* ```ts
|
|
45
|
+
* const rateCatalogs = await client.rateCatalogs.list();
|
|
46
|
+
* ```
|
|
47
|
+
*/
|
|
48
|
+
list(
|
|
49
|
+
query: RateCatalogListParams | null | undefined = {},
|
|
50
|
+
options?: RequestOptions,
|
|
51
|
+
): APIPromise<RateCatalogListResponse> {
|
|
52
|
+
return this._client.get('/rate-catalogs', { query, ...options });
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Add Rates To Rate Catalog
|
|
57
|
+
*
|
|
58
|
+
* @example
|
|
59
|
+
* ```ts
|
|
60
|
+
* const response = await client.rateCatalogs.addRates(
|
|
61
|
+
* 'rate_catalog_id',
|
|
62
|
+
* { billing_interval: 'monthly' },
|
|
63
|
+
* );
|
|
64
|
+
* ```
|
|
65
|
+
*/
|
|
66
|
+
addRates(
|
|
67
|
+
rateCatalogID: string,
|
|
68
|
+
body: RateCatalogAddRatesParams,
|
|
69
|
+
options?: RequestOptions,
|
|
70
|
+
): APIPromise<RateCatalogAddRatesResponse> {
|
|
71
|
+
return this._client.post(path`/rate-catalogs/${rateCatalogID}/add_rates`, { body, ...options });
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* List Rates In Catalog
|
|
76
|
+
*
|
|
77
|
+
* @example
|
|
78
|
+
* ```ts
|
|
79
|
+
* const response = await client.rateCatalogs.listRates(
|
|
80
|
+
* 'rate_catalog_id',
|
|
81
|
+
* );
|
|
82
|
+
* ```
|
|
83
|
+
*/
|
|
84
|
+
listRates(
|
|
85
|
+
rateCatalogID: string,
|
|
86
|
+
query: RateCatalogListRatesParams | null | undefined = {},
|
|
87
|
+
options?: RequestOptions,
|
|
88
|
+
): APIPromise<RateCatalogListRatesResponse> {
|
|
89
|
+
return this._client.get(path`/rate-catalogs/${rateCatalogID}/rates`, { query, ...options });
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
export interface RateCatalogCreateResponse {
|
|
94
|
+
id: string;
|
|
95
|
+
|
|
96
|
+
description: string;
|
|
97
|
+
|
|
98
|
+
name: string;
|
|
99
|
+
|
|
100
|
+
rate_count: number;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
export interface RateCatalogRetrieveResponse {
|
|
104
|
+
id: string;
|
|
105
|
+
|
|
106
|
+
description: string;
|
|
107
|
+
|
|
108
|
+
name: string;
|
|
109
|
+
|
|
110
|
+
rate_count: number;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
export interface RateCatalogListResponse {
|
|
114
|
+
has_more: boolean;
|
|
115
|
+
|
|
116
|
+
rate_catalogs: Array<RateCatalogListResponse.RateCatalog>;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
export namespace RateCatalogListResponse {
|
|
120
|
+
export interface RateCatalog {
|
|
121
|
+
id: string;
|
|
122
|
+
|
|
123
|
+
description: string;
|
|
124
|
+
|
|
125
|
+
name: string;
|
|
126
|
+
|
|
127
|
+
rate_count: number;
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
export interface RateCatalogAddRatesResponse {
|
|
132
|
+
id: string;
|
|
133
|
+
|
|
134
|
+
description: string;
|
|
135
|
+
|
|
136
|
+
name: string;
|
|
137
|
+
|
|
138
|
+
rate_count: number;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
export interface RateCatalogListRatesResponse {
|
|
142
|
+
has_more: boolean;
|
|
143
|
+
|
|
144
|
+
rates: Array<RateCatalogListRatesResponse.Rate>;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
export namespace RateCatalogListRatesResponse {
|
|
148
|
+
export interface Rate {
|
|
149
|
+
id: string;
|
|
150
|
+
|
|
151
|
+
interval: 'monthly' | 'yearly';
|
|
152
|
+
|
|
153
|
+
rate_catalog_id: string;
|
|
154
|
+
|
|
155
|
+
type: 'fixed' | 'usage_based';
|
|
156
|
+
|
|
157
|
+
fixed?: Rate.Fixed | null;
|
|
158
|
+
|
|
159
|
+
usage_based?: Rate.SimpleUsageBasedRateTypedDict | Rate.DimensionalUsageBasedRateTypedDict | null;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
export namespace Rate {
|
|
163
|
+
export interface Fixed {
|
|
164
|
+
id: string;
|
|
165
|
+
|
|
166
|
+
code: string | null;
|
|
167
|
+
|
|
168
|
+
credit_grants: Array<Fixed.CreditGrant>;
|
|
169
|
+
|
|
170
|
+
description: string | null;
|
|
171
|
+
|
|
172
|
+
name: string;
|
|
173
|
+
|
|
174
|
+
price: Fixed.FlatPriceTypedDict | Fixed.PackagePriceTypedDict;
|
|
175
|
+
|
|
176
|
+
quantity_code: string | null;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
export namespace Fixed {
|
|
180
|
+
export interface CreditGrant {
|
|
181
|
+
amount: InvoicesAPI.AmountOutput;
|
|
182
|
+
|
|
183
|
+
expiration:
|
|
184
|
+
| CreditGrant.CreditGrantDurationExpirationModel
|
|
185
|
+
| CreditGrant.CreditGrantDateTimeExpirationModel
|
|
186
|
+
| null;
|
|
187
|
+
|
|
188
|
+
metadata: { [key: string]: string };
|
|
189
|
+
|
|
190
|
+
name: string;
|
|
191
|
+
|
|
192
|
+
schedule:
|
|
193
|
+
| CreditGrant.CreditGrantScheduleOneTimeModel
|
|
194
|
+
| CreditGrant.CreditGrantScheduleRateCycleStartModel
|
|
195
|
+
| null;
|
|
196
|
+
|
|
197
|
+
subject_granting_config: CreditGrant.SubjectGrantingConfig | null;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
export namespace CreditGrant {
|
|
201
|
+
export interface CreditGrantDurationExpirationModel {
|
|
202
|
+
duration: number;
|
|
203
|
+
|
|
204
|
+
unit: 'hours' | 'days' | 'weeks' | 'months' | 'years';
|
|
205
|
+
|
|
206
|
+
expiration_type?: 'duration';
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
export interface CreditGrantDateTimeExpirationModel {
|
|
210
|
+
date: string;
|
|
211
|
+
|
|
212
|
+
expiration_type?: 'date';
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
export interface CreditGrantScheduleOneTimeModel {
|
|
216
|
+
scheduled_at: string;
|
|
217
|
+
|
|
218
|
+
schedule_type?: 'one_time';
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
export interface CreditGrantScheduleRateCycleStartModel {
|
|
222
|
+
rate_cycle_start_at: string;
|
|
223
|
+
|
|
224
|
+
schedule_type?: 'rate_cycle_start';
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
export interface SubjectGrantingConfig {
|
|
228
|
+
apply_to_children: boolean;
|
|
229
|
+
|
|
230
|
+
apply_to_self: boolean;
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
export interface FlatPriceTypedDict {
|
|
235
|
+
amount: FlatPriceTypedDict.Amount;
|
|
236
|
+
|
|
237
|
+
price_type: 'flat';
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
export namespace FlatPriceTypedDict {
|
|
241
|
+
export interface Amount {
|
|
242
|
+
currency_code: string;
|
|
243
|
+
|
|
244
|
+
value: string;
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
export interface PackagePriceTypedDict {
|
|
249
|
+
amount: PackagePriceTypedDict.Amount;
|
|
250
|
+
|
|
251
|
+
package_units: number;
|
|
252
|
+
|
|
253
|
+
price_type: 'package';
|
|
254
|
+
|
|
255
|
+
rounding_behavior: 'round_up' | 'round_down';
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
export namespace PackagePriceTypedDict {
|
|
259
|
+
export interface Amount {
|
|
260
|
+
currency_code: string;
|
|
261
|
+
|
|
262
|
+
value: string;
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
export interface SimpleUsageBasedRateTypedDict {
|
|
268
|
+
id: string;
|
|
269
|
+
|
|
270
|
+
code: string;
|
|
271
|
+
|
|
272
|
+
description: string | null;
|
|
273
|
+
|
|
274
|
+
included_units: number;
|
|
275
|
+
|
|
276
|
+
name: string;
|
|
277
|
+
|
|
278
|
+
price:
|
|
279
|
+
| SimpleUsageBasedRateTypedDict.FlatPriceTypedDict
|
|
280
|
+
| SimpleUsageBasedRateTypedDict.PackagePriceTypedDict;
|
|
281
|
+
|
|
282
|
+
pricing_metric_id: string;
|
|
283
|
+
|
|
284
|
+
usage_based_rate_type: 'simple';
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
export namespace SimpleUsageBasedRateTypedDict {
|
|
288
|
+
export interface FlatPriceTypedDict {
|
|
289
|
+
amount: FlatPriceTypedDict.Amount;
|
|
290
|
+
|
|
291
|
+
price_type: 'flat';
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
export namespace FlatPriceTypedDict {
|
|
295
|
+
export interface Amount {
|
|
296
|
+
currency_code: string;
|
|
297
|
+
|
|
298
|
+
value: string;
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
export interface PackagePriceTypedDict {
|
|
303
|
+
amount: PackagePriceTypedDict.Amount;
|
|
304
|
+
|
|
305
|
+
package_units: number;
|
|
306
|
+
|
|
307
|
+
price_type: 'package';
|
|
308
|
+
|
|
309
|
+
rounding_behavior: 'round_up' | 'round_down';
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
export namespace PackagePriceTypedDict {
|
|
313
|
+
export interface Amount {
|
|
314
|
+
currency_code: string;
|
|
315
|
+
|
|
316
|
+
value: string;
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
export interface DimensionalUsageBasedRateTypedDict {
|
|
322
|
+
id: string;
|
|
323
|
+
|
|
324
|
+
code: string;
|
|
325
|
+
|
|
326
|
+
description: string | null;
|
|
327
|
+
|
|
328
|
+
dimensions: Array<DimensionalUsageBasedRateTypedDict.Dimension>;
|
|
329
|
+
|
|
330
|
+
included_units: number;
|
|
331
|
+
|
|
332
|
+
name: string;
|
|
333
|
+
|
|
334
|
+
pricing_matrix: DimensionalUsageBasedRateTypedDict.PricingMatrix;
|
|
335
|
+
|
|
336
|
+
pricing_metric_id: string;
|
|
337
|
+
|
|
338
|
+
usage_based_rate_type: 'dimensional';
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
export namespace DimensionalUsageBasedRateTypedDict {
|
|
342
|
+
export interface Dimension {
|
|
343
|
+
description: string | null;
|
|
344
|
+
|
|
345
|
+
key: string;
|
|
346
|
+
|
|
347
|
+
values: Array<string>;
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
export interface PricingMatrix {
|
|
351
|
+
cells: Array<PricingMatrix.Cell>;
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
export namespace PricingMatrix {
|
|
355
|
+
export interface Cell {
|
|
356
|
+
dimension_coordinates: { [key: string]: string };
|
|
357
|
+
|
|
358
|
+
price: Cell.FlatPriceTypedDict | Cell.PackagePriceTypedDict;
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
export namespace Cell {
|
|
362
|
+
export interface FlatPriceTypedDict {
|
|
363
|
+
amount: FlatPriceTypedDict.Amount;
|
|
364
|
+
|
|
365
|
+
price_type: 'flat';
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
export namespace FlatPriceTypedDict {
|
|
369
|
+
export interface Amount {
|
|
370
|
+
currency_code: string;
|
|
371
|
+
|
|
372
|
+
value: string;
|
|
373
|
+
}
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
export interface PackagePriceTypedDict {
|
|
377
|
+
amount: PackagePriceTypedDict.Amount;
|
|
378
|
+
|
|
379
|
+
package_units: number;
|
|
380
|
+
|
|
381
|
+
price_type: 'package';
|
|
382
|
+
|
|
383
|
+
rounding_behavior: 'round_up' | 'round_down';
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
export namespace PackagePriceTypedDict {
|
|
387
|
+
export interface Amount {
|
|
388
|
+
currency_code: string;
|
|
389
|
+
|
|
390
|
+
value: string;
|
|
391
|
+
}
|
|
392
|
+
}
|
|
393
|
+
}
|
|
394
|
+
}
|
|
395
|
+
}
|
|
396
|
+
}
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
export interface RateCatalogCreateParams {
|
|
400
|
+
/**
|
|
401
|
+
* The description of the catalog.
|
|
402
|
+
*/
|
|
403
|
+
description: string;
|
|
404
|
+
|
|
405
|
+
/**
|
|
406
|
+
* The name of the catalog.
|
|
407
|
+
*/
|
|
408
|
+
name: string;
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
export interface RateCatalogListParams {
|
|
412
|
+
limit?: number;
|
|
413
|
+
|
|
414
|
+
offset?: number;
|
|
415
|
+
}
|
|
416
|
+
|
|
417
|
+
export interface RateCatalogAddRatesParams {
|
|
418
|
+
/**
|
|
419
|
+
* How often the customer will be billed for these rates.
|
|
420
|
+
*/
|
|
421
|
+
billing_interval: 'monthly' | 'yearly';
|
|
422
|
+
|
|
423
|
+
/**
|
|
424
|
+
* The fixed rate to create in the catalog.
|
|
425
|
+
*/
|
|
426
|
+
fixed_rates?: Array<RateCatalogAddRatesParams.FixedRate>;
|
|
427
|
+
|
|
428
|
+
/**
|
|
429
|
+
* The usage based rates to create in the catalog.
|
|
430
|
+
*/
|
|
431
|
+
usage_based_rates?: Array<
|
|
432
|
+
| RateCatalogAddRatesParams.CreateSimpleUsageBasedRateRequest
|
|
433
|
+
| RateCatalogAddRatesParams.CreateDimensionalUsageBasedRateRequest
|
|
434
|
+
>;
|
|
435
|
+
}
|
|
436
|
+
|
|
437
|
+
export namespace RateCatalogAddRatesParams {
|
|
438
|
+
export interface FixedRate {
|
|
439
|
+
/**
|
|
440
|
+
* Code of this rate to be used for setting quantity and price multipliers. This
|
|
441
|
+
* code must be unique within the rate card.
|
|
442
|
+
*/
|
|
443
|
+
code: string;
|
|
444
|
+
|
|
445
|
+
/**
|
|
446
|
+
* The name of the rate displayed to the customer.
|
|
447
|
+
*/
|
|
448
|
+
name: string;
|
|
449
|
+
|
|
450
|
+
/**
|
|
451
|
+
* Flat price is a price that linearly scales with the quantity.
|
|
452
|
+
*/
|
|
453
|
+
price: RateCardsAPI.FlatPriceInput | RateCardsAPI.PackagePriceInput;
|
|
454
|
+
|
|
455
|
+
/**
|
|
456
|
+
* The description of the rate displayed to the customer.
|
|
457
|
+
*/
|
|
458
|
+
description?: string | null;
|
|
459
|
+
}
|
|
460
|
+
|
|
461
|
+
export interface CreateSimpleUsageBasedRateRequest {
|
|
462
|
+
/**
|
|
463
|
+
* Code of this rate to be used for price multipliers. This code must be unique
|
|
464
|
+
* within the rate card.
|
|
465
|
+
*/
|
|
466
|
+
code: string;
|
|
467
|
+
|
|
468
|
+
/**
|
|
469
|
+
* The name of the rate displayed to the customer.
|
|
470
|
+
*/
|
|
471
|
+
name: string;
|
|
472
|
+
|
|
473
|
+
/**
|
|
474
|
+
* Flat price is a price that linearly scales with the quantity.
|
|
475
|
+
*/
|
|
476
|
+
price: RateCardsAPI.FlatPriceInput | RateCardsAPI.PackagePriceInput;
|
|
477
|
+
|
|
478
|
+
/**
|
|
479
|
+
* The ID of the pricing metric to use for this rate.
|
|
480
|
+
*/
|
|
481
|
+
pricing_metric_id: string;
|
|
482
|
+
|
|
483
|
+
usage_based_rate_type: 'simple';
|
|
484
|
+
|
|
485
|
+
/**
|
|
486
|
+
* The description of the rate displayed to the customer.
|
|
487
|
+
*/
|
|
488
|
+
description?: string | null;
|
|
489
|
+
|
|
490
|
+
/**
|
|
491
|
+
* The number of units included in the rate before the price is applied.
|
|
492
|
+
*/
|
|
493
|
+
included_units?: number;
|
|
494
|
+
}
|
|
495
|
+
|
|
496
|
+
export interface CreateDimensionalUsageBasedRateRequest {
|
|
497
|
+
/**
|
|
498
|
+
* Code of this rate to be used for price multipliers. This code must be unique
|
|
499
|
+
* within the rate card.
|
|
500
|
+
*/
|
|
501
|
+
code: string;
|
|
502
|
+
|
|
503
|
+
/**
|
|
504
|
+
* The dimensions of the rate.
|
|
505
|
+
*/
|
|
506
|
+
dimensions: Array<CreateDimensionalUsageBasedRateRequest.Dimension>;
|
|
507
|
+
|
|
508
|
+
/**
|
|
509
|
+
* The name of the rate displayed to the customer.
|
|
510
|
+
*/
|
|
511
|
+
name: string;
|
|
512
|
+
|
|
513
|
+
/**
|
|
514
|
+
* The pricing matrix of the rate.
|
|
515
|
+
*/
|
|
516
|
+
pricing_matrix: CreateDimensionalUsageBasedRateRequest.PricingMatrix;
|
|
517
|
+
|
|
518
|
+
/**
|
|
519
|
+
* The ID of the pricing metric to use for this rate.
|
|
520
|
+
*/
|
|
521
|
+
pricing_metric_id: string;
|
|
522
|
+
|
|
523
|
+
usage_based_rate_type: 'dimensional';
|
|
524
|
+
|
|
525
|
+
/**
|
|
526
|
+
* The description of the rate displayed to the customer.
|
|
527
|
+
*/
|
|
528
|
+
description?: string | null;
|
|
529
|
+
|
|
530
|
+
/**
|
|
531
|
+
* The number of units included in the rate before the price is applied.
|
|
532
|
+
*/
|
|
533
|
+
included_units?: number;
|
|
534
|
+
}
|
|
535
|
+
|
|
536
|
+
export namespace CreateDimensionalUsageBasedRateRequest {
|
|
537
|
+
export interface Dimension {
|
|
538
|
+
/**
|
|
539
|
+
* The name of the dimension. This is used to identify the dimension in the pricing
|
|
540
|
+
* matrix.
|
|
541
|
+
*/
|
|
542
|
+
key: string;
|
|
543
|
+
|
|
544
|
+
/**
|
|
545
|
+
* A list of possible values for the dimension.
|
|
546
|
+
*/
|
|
547
|
+
values: Array<string>;
|
|
548
|
+
|
|
549
|
+
/**
|
|
550
|
+
* The description of the dimension.
|
|
551
|
+
*/
|
|
552
|
+
description?: string | null;
|
|
553
|
+
}
|
|
554
|
+
|
|
555
|
+
/**
|
|
556
|
+
* The pricing matrix of the rate.
|
|
557
|
+
*/
|
|
558
|
+
export interface PricingMatrix {
|
|
559
|
+
cells: Array<PricingMatrix.Cell>;
|
|
560
|
+
}
|
|
561
|
+
|
|
562
|
+
export namespace PricingMatrix {
|
|
563
|
+
export interface Cell {
|
|
564
|
+
/**
|
|
565
|
+
* A key-value mapping of dimension keys and values to identify the price for a
|
|
566
|
+
* given set of dimension values.
|
|
567
|
+
*/
|
|
568
|
+
dimension_coordinates: { [key: string]: string };
|
|
569
|
+
|
|
570
|
+
/**
|
|
571
|
+
* The price for the cell.
|
|
572
|
+
*/
|
|
573
|
+
price: RateCardsAPI.FlatPriceInput | RateCardsAPI.PackagePriceInput;
|
|
574
|
+
}
|
|
575
|
+
}
|
|
576
|
+
}
|
|
577
|
+
}
|
|
578
|
+
|
|
579
|
+
export interface RateCatalogListRatesParams {
|
|
580
|
+
limit?: number;
|
|
581
|
+
|
|
582
|
+
offset?: number;
|
|
583
|
+
}
|
|
584
|
+
|
|
585
|
+
export declare namespace RateCatalogs {
|
|
586
|
+
export {
|
|
587
|
+
type RateCatalogCreateResponse as RateCatalogCreateResponse,
|
|
588
|
+
type RateCatalogRetrieveResponse as RateCatalogRetrieveResponse,
|
|
589
|
+
type RateCatalogListResponse as RateCatalogListResponse,
|
|
590
|
+
type RateCatalogAddRatesResponse as RateCatalogAddRatesResponse,
|
|
591
|
+
type RateCatalogListRatesResponse as RateCatalogListRatesResponse,
|
|
592
|
+
type RateCatalogCreateParams as RateCatalogCreateParams,
|
|
593
|
+
type RateCatalogListParams as RateCatalogListParams,
|
|
594
|
+
type RateCatalogAddRatesParams as RateCatalogAddRatesParams,
|
|
595
|
+
type RateCatalogListRatesParams as RateCatalogListRatesParams,
|
|
596
|
+
};
|
|
597
|
+
}
|
|
@@ -17,9 +17,9 @@ export class UsageEvents extends APIResource {
|
|
|
17
17
|
* region: 'us-east-1',
|
|
18
18
|
* },
|
|
19
19
|
* event_name: 'job_completed',
|
|
20
|
-
* idempotency_key: '
|
|
20
|
+
* idempotency_key: '5ee29f5a-ff4d-4265-8029-bf29e465f5dc',
|
|
21
21
|
* subject_id: 'subj_VyX6Q96h5avMho8O7QWlKeXE',
|
|
22
|
-
* timestamp: '
|
|
22
|
+
* timestamp: '2026-01-13T22:50:12.390246+00:00',
|
|
23
23
|
* });
|
|
24
24
|
* ```
|
|
25
25
|
*/
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '0.
|
|
1
|
+
export const VERSION = '0.7.0'; // x-release-please-version
|
package/version.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.
|
|
1
|
+
export declare const VERSION = "0.7.0";
|
|
2
2
|
//# sourceMappingURL=version.d.mts.map
|
package/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.
|
|
1
|
+
export declare const VERSION = "0.7.0";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|