lago-javascript-client 0.26.1-beta → 0.27.0-beta
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/esm/swagger/client.js +18 -0
- package/package.json +1 -1
- package/script/swagger/client.js +18 -0
- package/types/swagger/client.d.ts +409 -109
package/esm/swagger/client.js
CHANGED
|
@@ -664,6 +664,24 @@ export class Api extends HttpClient {
|
|
|
664
664
|
format: "json",
|
|
665
665
|
...params,
|
|
666
666
|
}),
|
|
667
|
+
/**
|
|
668
|
+
* @description Estimate the fees that would be created after reception of an event for a billable metric attached to one or multiple instant charges
|
|
669
|
+
*
|
|
670
|
+
* @tags events
|
|
671
|
+
* @name EventEstimateFees
|
|
672
|
+
* @summary Estimate fees for an instant charge
|
|
673
|
+
* @request POST:/events/estimate_fees
|
|
674
|
+
* @secure
|
|
675
|
+
*/
|
|
676
|
+
eventEstimateFees: (data, params = {}) => this.request({
|
|
677
|
+
path: `/events/estimate_fees`,
|
|
678
|
+
method: "POST",
|
|
679
|
+
body: data,
|
|
680
|
+
secure: true,
|
|
681
|
+
type: ContentType.Json,
|
|
682
|
+
format: "json",
|
|
683
|
+
...params,
|
|
684
|
+
}),
|
|
667
685
|
};
|
|
668
686
|
plans = {
|
|
669
687
|
/**
|
package/package.json
CHANGED
package/script/swagger/client.js
CHANGED
|
@@ -668,6 +668,24 @@ class Api extends HttpClient {
|
|
|
668
668
|
format: "json",
|
|
669
669
|
...params,
|
|
670
670
|
}),
|
|
671
|
+
/**
|
|
672
|
+
* @description Estimate the fees that would be created after reception of an event for a billable metric attached to one or multiple instant charges
|
|
673
|
+
*
|
|
674
|
+
* @tags events
|
|
675
|
+
* @name EventEstimateFees
|
|
676
|
+
* @summary Estimate fees for an instant charge
|
|
677
|
+
* @request POST:/events/estimate_fees
|
|
678
|
+
* @secure
|
|
679
|
+
*/
|
|
680
|
+
eventEstimateFees: (data, params = {}) => this.request({
|
|
681
|
+
path: `/events/estimate_fees`,
|
|
682
|
+
method: "POST",
|
|
683
|
+
body: data,
|
|
684
|
+
secure: true,
|
|
685
|
+
type: ContentType.Json,
|
|
686
|
+
format: "json",
|
|
687
|
+
...params,
|
|
688
|
+
}),
|
|
671
689
|
};
|
|
672
690
|
plans = {
|
|
673
691
|
/**
|
|
@@ -4,7 +4,10 @@ export interface BillableMetricGroup {
|
|
|
4
4
|
values: (string | object)[];
|
|
5
5
|
}
|
|
6
6
|
export interface BillableMetricObject {
|
|
7
|
-
/**
|
|
7
|
+
/**
|
|
8
|
+
* @format uuid
|
|
9
|
+
* @example "183da83c-c007-4fbb-afcd-b00c07c41ffe"
|
|
10
|
+
*/
|
|
8
11
|
lago_id: string;
|
|
9
12
|
/** @example "bm1" */
|
|
10
13
|
name: string;
|
|
@@ -12,7 +15,10 @@ export interface BillableMetricObject {
|
|
|
12
15
|
code: string;
|
|
13
16
|
/** @example "description" */
|
|
14
17
|
description?: string;
|
|
15
|
-
/**
|
|
18
|
+
/**
|
|
19
|
+
* @format date-time
|
|
20
|
+
* @example "2022-09-14T16:35:31Z"
|
|
21
|
+
*/
|
|
16
22
|
created_at: string;
|
|
17
23
|
/** @example "amount" */
|
|
18
24
|
field_name?: string;
|
|
@@ -48,7 +54,10 @@ export interface BillableMetricInput {
|
|
|
48
54
|
};
|
|
49
55
|
}
|
|
50
56
|
export interface GroupObject {
|
|
51
|
-
/**
|
|
57
|
+
/**
|
|
58
|
+
* @format uuid
|
|
59
|
+
* @example "183da83c-c007-4fbb-afcd-b00c07c41ffe"
|
|
60
|
+
*/
|
|
52
61
|
lago_id: string;
|
|
53
62
|
/** @example "region" */
|
|
54
63
|
key: string;
|
|
@@ -59,7 +68,10 @@ export interface Groups {
|
|
|
59
68
|
groups: GroupObject[];
|
|
60
69
|
}
|
|
61
70
|
export interface AddOnObject {
|
|
62
|
-
/**
|
|
71
|
+
/**
|
|
72
|
+
* @format uuid
|
|
73
|
+
* @example "183da83c-c007-4fbb-afcd-b00c07c41ffe"
|
|
74
|
+
*/
|
|
63
75
|
lago_id: string;
|
|
64
76
|
/** @example "example name" */
|
|
65
77
|
name: string;
|
|
@@ -67,7 +79,10 @@ export interface AddOnObject {
|
|
|
67
79
|
code: string;
|
|
68
80
|
/** @example "description" */
|
|
69
81
|
description?: string;
|
|
70
|
-
/**
|
|
82
|
+
/**
|
|
83
|
+
* @format date-time
|
|
84
|
+
* @example "2022-09-14T16:35:31Z"
|
|
85
|
+
*/
|
|
71
86
|
created_at: string;
|
|
72
87
|
/** @example 1200 */
|
|
73
88
|
amount_cents: number;
|
|
@@ -95,13 +110,22 @@ export interface AddOnInput {
|
|
|
95
110
|
};
|
|
96
111
|
}
|
|
97
112
|
export interface AppliedAddOnObject {
|
|
98
|
-
/**
|
|
113
|
+
/**
|
|
114
|
+
* @format uuid
|
|
115
|
+
* @example "183da83c-c007-4fbb-afcd-b00c07c41ffe"
|
|
116
|
+
*/
|
|
99
117
|
lago_id: string;
|
|
100
|
-
/**
|
|
118
|
+
/**
|
|
119
|
+
* @format uuid
|
|
120
|
+
* @example "457uj93c-c007-4fbb-afcd-b00c07c41kki"
|
|
121
|
+
*/
|
|
101
122
|
lago_add_on_id: string;
|
|
102
123
|
/** @example "code" */
|
|
103
124
|
add_on_code: string;
|
|
104
|
-
/**
|
|
125
|
+
/**
|
|
126
|
+
* @format uuid
|
|
127
|
+
* @example "183da83c-c007-4fbb-afcd-b00c07c41ffe"
|
|
128
|
+
*/
|
|
105
129
|
lago_customer_id: string;
|
|
106
130
|
/** @example "1234567" */
|
|
107
131
|
external_customer_id: string;
|
|
@@ -109,7 +133,10 @@ export interface AppliedAddOnObject {
|
|
|
109
133
|
amount_cents: number;
|
|
110
134
|
/** @example "EUR" */
|
|
111
135
|
amount_currency: string;
|
|
112
|
-
/**
|
|
136
|
+
/**
|
|
137
|
+
* @format date-time
|
|
138
|
+
* @example "2022-09-14T16:35:31Z"
|
|
139
|
+
*/
|
|
113
140
|
created_at: string;
|
|
114
141
|
}
|
|
115
142
|
export interface AppliedAddOn {
|
|
@@ -128,7 +155,10 @@ export interface AppliedAddOnInput {
|
|
|
128
155
|
};
|
|
129
156
|
}
|
|
130
157
|
export interface CouponObject {
|
|
131
|
-
/**
|
|
158
|
+
/**
|
|
159
|
+
* @format uuid
|
|
160
|
+
* @example "183da83c-c007-4fbb-afcd-b00c07c41ffe"
|
|
161
|
+
*/
|
|
132
162
|
lago_id: string;
|
|
133
163
|
/** @example "coupon1" */
|
|
134
164
|
name: string;
|
|
@@ -145,7 +175,10 @@ export interface CouponObject {
|
|
|
145
175
|
/** @example true */
|
|
146
176
|
limited_plans?: boolean;
|
|
147
177
|
plan_codes?: string[];
|
|
148
|
-
/**
|
|
178
|
+
/**
|
|
179
|
+
* @format date-time
|
|
180
|
+
* @example "2022-09-14T16:35:31Z"
|
|
181
|
+
*/
|
|
149
182
|
created_at: string;
|
|
150
183
|
/** @example 25 */
|
|
151
184
|
percentage_rate?: number;
|
|
@@ -153,7 +186,10 @@ export interface CouponObject {
|
|
|
153
186
|
frequency: "once" | "recurring";
|
|
154
187
|
/** @example 3 */
|
|
155
188
|
frequency_duration?: number;
|
|
156
|
-
/**
|
|
189
|
+
/**
|
|
190
|
+
* @format date-time
|
|
191
|
+
* @example "2022-09-14T23:59:59Z"
|
|
192
|
+
*/
|
|
157
193
|
expiration_at?: string;
|
|
158
194
|
/** Expiration type */
|
|
159
195
|
expiration: "no_expiration" | "time_limit";
|
|
@@ -184,7 +220,10 @@ export interface CouponInput {
|
|
|
184
220
|
frequency?: "once" | "recurring";
|
|
185
221
|
/** @example 3 */
|
|
186
222
|
frequency_duration?: number;
|
|
187
|
-
/**
|
|
223
|
+
/**
|
|
224
|
+
* @format date-time
|
|
225
|
+
* @example "2022-09-14T23:59:59Z"
|
|
226
|
+
*/
|
|
188
227
|
expiration_at?: string;
|
|
189
228
|
/** Expiration type */
|
|
190
229
|
expiration?: "no_expiration" | "time_limit";
|
|
@@ -194,13 +233,22 @@ export interface CouponInput {
|
|
|
194
233
|
};
|
|
195
234
|
}
|
|
196
235
|
export interface AppliedCouponObject {
|
|
197
|
-
/**
|
|
236
|
+
/**
|
|
237
|
+
* @format uuid
|
|
238
|
+
* @example "183da83c-c007-4fbb-afcd-b00c07c41ffe"
|
|
239
|
+
*/
|
|
198
240
|
lago_id: string;
|
|
199
|
-
/**
|
|
241
|
+
/**
|
|
242
|
+
* @format uuid
|
|
243
|
+
* @example "544da83c-c007-4fbb-afcd-b00c07c41iit"
|
|
244
|
+
*/
|
|
200
245
|
lago_coupon_id: string;
|
|
201
246
|
/** @example "example_code" */
|
|
202
247
|
coupon_code: string;
|
|
203
|
-
/**
|
|
248
|
+
/**
|
|
249
|
+
* @format uuid
|
|
250
|
+
* @example "321da83c-c007-4fbb-afcd-b00c07c41ssd"
|
|
251
|
+
*/
|
|
204
252
|
lago_customer_id: string;
|
|
205
253
|
/** @example "123456" */
|
|
206
254
|
external_customer_id: string;
|
|
@@ -220,11 +268,20 @@ export interface AppliedCouponObject {
|
|
|
220
268
|
frequency_duration?: number;
|
|
221
269
|
/** @example 2 */
|
|
222
270
|
frequency_duration_remaining?: number;
|
|
223
|
-
/**
|
|
271
|
+
/**
|
|
272
|
+
* @format date-time
|
|
273
|
+
* @example "2022-09-14T23:59:59Z"
|
|
274
|
+
*/
|
|
224
275
|
expiration_at?: string;
|
|
225
|
-
/**
|
|
276
|
+
/**
|
|
277
|
+
* @format date-time
|
|
278
|
+
* @example "2022-09-14T16:35:31Z"
|
|
279
|
+
*/
|
|
226
280
|
created_at: string;
|
|
227
|
-
/**
|
|
281
|
+
/**
|
|
282
|
+
* @format date-time
|
|
283
|
+
* @example "2022-09-14T16:35:31Z"
|
|
284
|
+
*/
|
|
228
285
|
terminated_at?: string;
|
|
229
286
|
credits: CreditObject[];
|
|
230
287
|
}
|
|
@@ -263,11 +320,17 @@ export interface BillingConfigurationOrganization {
|
|
|
263
320
|
vat_rate?: number;
|
|
264
321
|
}
|
|
265
322
|
export interface OrganizationObject {
|
|
266
|
-
/**
|
|
323
|
+
/**
|
|
324
|
+
* @format uuid
|
|
325
|
+
* @example "183da83c-c007-4fbb-afcd-b00c07c41ffe"
|
|
326
|
+
*/
|
|
267
327
|
lago_id?: string;
|
|
268
328
|
/** @example "example name" */
|
|
269
329
|
name: string;
|
|
270
|
-
/**
|
|
330
|
+
/**
|
|
331
|
+
* @format date-time
|
|
332
|
+
* @example "2022-09-14T16:35:31Z"
|
|
333
|
+
*/
|
|
271
334
|
created_at: string;
|
|
272
335
|
/** @example "https://example.com" */
|
|
273
336
|
webhook_url?: string;
|
|
@@ -281,7 +344,10 @@ export interface OrganizationObject {
|
|
|
281
344
|
state?: string;
|
|
282
345
|
/** @example "10000" */
|
|
283
346
|
zipcode?: string;
|
|
284
|
-
/**
|
|
347
|
+
/**
|
|
348
|
+
* @format email
|
|
349
|
+
* @example "example@example.com"
|
|
350
|
+
*/
|
|
285
351
|
email?: string;
|
|
286
352
|
/** @example "City" */
|
|
287
353
|
city?: string;
|
|
@@ -310,16 +376,20 @@ export interface OrganizationInput {
|
|
|
310
376
|
state?: string;
|
|
311
377
|
/** @example "10000" */
|
|
312
378
|
zipcode?: string;
|
|
313
|
-
/**
|
|
379
|
+
/**
|
|
380
|
+
* @format email
|
|
381
|
+
* @example "example@example.com"
|
|
382
|
+
*/
|
|
314
383
|
email?: string;
|
|
315
384
|
/** @example "City" */
|
|
316
385
|
city?: string;
|
|
317
386
|
/** @example "name1" */
|
|
318
387
|
legal_name?: string;
|
|
319
|
-
/** @example 10000 */
|
|
388
|
+
/** @example "10000" */
|
|
320
389
|
legal_number?: string;
|
|
321
390
|
/** @example "Europe/Paris" */
|
|
322
391
|
timezone?: string;
|
|
392
|
+
email_settings?: ("invoice.finalized" | "credit_note.created")[];
|
|
323
393
|
billing_configuration?: BillingConfigurationOrganization;
|
|
324
394
|
};
|
|
325
395
|
}
|
|
@@ -339,7 +409,10 @@ export interface BillingConfigurationCustomer {
|
|
|
339
409
|
[key: string]: any;
|
|
340
410
|
}
|
|
341
411
|
export interface CustomerMetadataObject {
|
|
342
|
-
/**
|
|
412
|
+
/**
|
|
413
|
+
* @format uuid
|
|
414
|
+
* @example "183da83c-c007-4fbb-afcd-b00c07c41ffe"
|
|
415
|
+
*/
|
|
343
416
|
lago_id?: string;
|
|
344
417
|
/** @example "name" */
|
|
345
418
|
key?: string;
|
|
@@ -347,13 +420,19 @@ export interface CustomerMetadataObject {
|
|
|
347
420
|
value?: string;
|
|
348
421
|
/** @example false */
|
|
349
422
|
display_in_invoice?: boolean;
|
|
350
|
-
/**
|
|
423
|
+
/**
|
|
424
|
+
* @format date-time
|
|
425
|
+
* @example "2022-09-14T16:35:31Z"
|
|
426
|
+
*/
|
|
351
427
|
created_at?: string;
|
|
352
428
|
}
|
|
353
429
|
export interface CustomerObject {
|
|
354
|
-
/**
|
|
430
|
+
/**
|
|
431
|
+
* @format uuid
|
|
432
|
+
* @example "183da83c-c007-4fbb-afcd-b00c07c41ffe"
|
|
433
|
+
*/
|
|
355
434
|
lago_id: string;
|
|
356
|
-
/** @example "
|
|
435
|
+
/** @example "12345" */
|
|
357
436
|
external_id: string;
|
|
358
437
|
/** @example "John Doe" */
|
|
359
438
|
name?: string;
|
|
@@ -361,7 +440,10 @@ export interface CustomerObject {
|
|
|
361
440
|
sequential_id: number;
|
|
362
441
|
/** @example "slug" */
|
|
363
442
|
slug: string;
|
|
364
|
-
/**
|
|
443
|
+
/**
|
|
444
|
+
* @format date-time
|
|
445
|
+
* @example "2022-09-14T16:35:31Z"
|
|
446
|
+
*/
|
|
365
447
|
created_at?: string;
|
|
366
448
|
/** @example "CZ" */
|
|
367
449
|
country?: string;
|
|
@@ -371,21 +453,24 @@ export interface CustomerObject {
|
|
|
371
453
|
address_line2?: string;
|
|
372
454
|
/** @example "state1" */
|
|
373
455
|
state?: string;
|
|
374
|
-
/** @example 10000 */
|
|
456
|
+
/** @example "10000" */
|
|
375
457
|
zipcode?: string;
|
|
376
|
-
/**
|
|
458
|
+
/**
|
|
459
|
+
* @format email
|
|
460
|
+
* @example "example@example.com"
|
|
461
|
+
*/
|
|
377
462
|
email?: string;
|
|
378
463
|
/** @example "City" */
|
|
379
464
|
city?: string;
|
|
380
465
|
/** @example "https://example.com" */
|
|
381
466
|
url?: string;
|
|
382
|
-
/** @example 3551234567 */
|
|
467
|
+
/** @example "+3551234567" */
|
|
383
468
|
phone?: string;
|
|
384
469
|
/** @example "https://lago.url" */
|
|
385
470
|
lago_url?: string;
|
|
386
471
|
/** @example "name1" */
|
|
387
472
|
legal_name?: string;
|
|
388
|
-
/** @example 10000 */
|
|
473
|
+
/** @example "10000" */
|
|
389
474
|
legal_number?: string;
|
|
390
475
|
/** @example "EUR" */
|
|
391
476
|
currency?: string;
|
|
@@ -404,7 +489,7 @@ export interface Customers {
|
|
|
404
489
|
}
|
|
405
490
|
export interface CustomerInput {
|
|
406
491
|
customer: {
|
|
407
|
-
/** @example "
|
|
492
|
+
/** @example "12345" */
|
|
408
493
|
external_id: string;
|
|
409
494
|
/** @example "John Doe" */
|
|
410
495
|
name?: string;
|
|
@@ -416,21 +501,24 @@ export interface CustomerInput {
|
|
|
416
501
|
address_line2?: string;
|
|
417
502
|
/** @example "state1" */
|
|
418
503
|
state?: string;
|
|
419
|
-
/** @example 10000 */
|
|
504
|
+
/** @example "10000" */
|
|
420
505
|
zipcode?: string;
|
|
421
|
-
/**
|
|
506
|
+
/**
|
|
507
|
+
* @format email
|
|
508
|
+
* @example "example@example.com"
|
|
509
|
+
*/
|
|
422
510
|
email?: string;
|
|
423
511
|
/** @example "City" */
|
|
424
512
|
city?: string;
|
|
425
513
|
/** @example "https://example.com" */
|
|
426
514
|
url?: string;
|
|
427
|
-
/** @example 3551234567 */
|
|
515
|
+
/** @example "+3551234567" */
|
|
428
516
|
phone?: string;
|
|
429
517
|
/** @example "https://lago.url" */
|
|
430
518
|
lago_url?: string;
|
|
431
519
|
/** @example "name1" */
|
|
432
520
|
legal_name?: string;
|
|
433
|
-
/** @example 10000 */
|
|
521
|
+
/** @example "10000" */
|
|
434
522
|
legal_number?: string;
|
|
435
523
|
/** @example "EUR" */
|
|
436
524
|
currency?: string;
|
|
@@ -438,7 +526,10 @@ export interface CustomerInput {
|
|
|
438
526
|
timezone?: string;
|
|
439
527
|
billing_configuration?: BillingConfigurationCustomer;
|
|
440
528
|
metadata?: {
|
|
441
|
-
/**
|
|
529
|
+
/**
|
|
530
|
+
* @format uuid
|
|
531
|
+
* @example "183da83c-c007-4fbb-afcd-b00c07c41ffe"
|
|
532
|
+
*/
|
|
442
533
|
id?: string;
|
|
443
534
|
/** @example "name" */
|
|
444
535
|
key?: string;
|
|
@@ -457,13 +548,19 @@ export interface ChargeUsageObject {
|
|
|
457
548
|
/** @example "EUR" */
|
|
458
549
|
amount_currency: string;
|
|
459
550
|
charge: {
|
|
460
|
-
/**
|
|
551
|
+
/**
|
|
552
|
+
* @format uuid
|
|
553
|
+
* @example "278da83c-c007-4fbb-afcd-b00c07c41utg"
|
|
554
|
+
*/
|
|
461
555
|
lago_id?: string;
|
|
462
556
|
/** Charge model type */
|
|
463
557
|
charge_model?: "standard" | "graduated" | "package" | "percentage" | "volume";
|
|
464
558
|
};
|
|
465
559
|
billable_metric: {
|
|
466
|
-
/**
|
|
560
|
+
/**
|
|
561
|
+
* @format uuid
|
|
562
|
+
* @example "278da83c-c007-4fbb-afcd-b00c07c41utg"
|
|
563
|
+
*/
|
|
467
564
|
lago_id?: string;
|
|
468
565
|
/** @example "Example name" */
|
|
469
566
|
name?: string;
|
|
@@ -473,7 +570,10 @@ export interface ChargeUsageObject {
|
|
|
473
570
|
aggregation_type?: "count_agg" | "sum_agg" | "max_agg" | "unique_count_agg" | "recurring_count_agg";
|
|
474
571
|
};
|
|
475
572
|
groups: {
|
|
476
|
-
/**
|
|
573
|
+
/**
|
|
574
|
+
* @format uuid
|
|
575
|
+
* @example "278da83c-c007-4fbb-afcd-b00c07c41utg"
|
|
576
|
+
*/
|
|
477
577
|
lago_id?: string;
|
|
478
578
|
/** @example "key" */
|
|
479
579
|
key?: string;
|
|
@@ -486,11 +586,20 @@ export interface ChargeUsageObject {
|
|
|
486
586
|
}[];
|
|
487
587
|
}
|
|
488
588
|
export interface CustomerUsageObject {
|
|
489
|
-
/**
|
|
589
|
+
/**
|
|
590
|
+
* @format date-time
|
|
591
|
+
* @example "2022-09-14T00:00:00Z"
|
|
592
|
+
*/
|
|
490
593
|
from_datetime: string;
|
|
491
|
-
/**
|
|
594
|
+
/**
|
|
595
|
+
* @format date-time
|
|
596
|
+
* @example "2022-09-14T00:00:00Z"
|
|
597
|
+
*/
|
|
492
598
|
to_datetime: string;
|
|
493
|
-
/**
|
|
599
|
+
/**
|
|
600
|
+
* @format date-time
|
|
601
|
+
* @example "2022-09-15T00:00:00Z"
|
|
602
|
+
*/
|
|
494
603
|
issuing_date: string;
|
|
495
604
|
/** @example 1200 */
|
|
496
605
|
amount_cents: number;
|
|
@@ -510,24 +619,39 @@ export interface CustomerUsage {
|
|
|
510
619
|
customer_usage: CustomerUsageObject;
|
|
511
620
|
}
|
|
512
621
|
export interface EventObject {
|
|
513
|
-
/**
|
|
622
|
+
/**
|
|
623
|
+
* @format uuid
|
|
624
|
+
* @example "183da83c-c007-4fbb-afcd-b00c07c41ffe"
|
|
625
|
+
*/
|
|
514
626
|
lago_id: string;
|
|
515
627
|
/** @example "987654321" */
|
|
516
628
|
transaction_id: string;
|
|
517
|
-
/**
|
|
629
|
+
/**
|
|
630
|
+
* @format uuid
|
|
631
|
+
* @example "111da83c-c007-4fbb-afcd-b00c07c41iop"
|
|
632
|
+
*/
|
|
518
633
|
lago_customer_id: string;
|
|
519
634
|
/** @example "123456" */
|
|
520
635
|
external_customer_id: string;
|
|
521
636
|
/** @example "code" */
|
|
522
637
|
code: string;
|
|
523
|
-
/**
|
|
638
|
+
/**
|
|
639
|
+
* @format date-time
|
|
640
|
+
* @example "2022-09-14T16:35:31Z"
|
|
641
|
+
*/
|
|
524
642
|
timestamp: string;
|
|
525
643
|
properties?: object;
|
|
526
|
-
/**
|
|
644
|
+
/**
|
|
645
|
+
* @format uuid
|
|
646
|
+
* @example "447da83c-c007-4fbb-afcd-b00c07c41ffe"
|
|
647
|
+
*/
|
|
527
648
|
lago_subscription_id: string;
|
|
528
649
|
/** @example "123456" */
|
|
529
650
|
external_subscription_id: string;
|
|
530
|
-
/**
|
|
651
|
+
/**
|
|
652
|
+
* @format date-time
|
|
653
|
+
* @example "2022-09-14T16:35:31Z"
|
|
654
|
+
*/
|
|
531
655
|
created_at: string;
|
|
532
656
|
}
|
|
533
657
|
export interface Event {
|
|
@@ -548,6 +672,17 @@ export interface EventInput {
|
|
|
548
672
|
properties?: object;
|
|
549
673
|
};
|
|
550
674
|
}
|
|
675
|
+
export interface EventEstimateFeesInput {
|
|
676
|
+
event: {
|
|
677
|
+
/** @example "code" */
|
|
678
|
+
code: string;
|
|
679
|
+
/** @example "654321" */
|
|
680
|
+
external_customer_id?: string;
|
|
681
|
+
/** @example "123456" */
|
|
682
|
+
external_subscription_id?: string;
|
|
683
|
+
properties?: object;
|
|
684
|
+
};
|
|
685
|
+
}
|
|
551
686
|
export interface BatchEventInput {
|
|
552
687
|
event: {
|
|
553
688
|
/** @example "123456" */
|
|
@@ -562,19 +697,31 @@ export interface BatchEventInput {
|
|
|
562
697
|
properties?: object;
|
|
563
698
|
};
|
|
564
699
|
}
|
|
700
|
+
export interface Fees {
|
|
701
|
+
fees: FeeObject[];
|
|
702
|
+
}
|
|
565
703
|
export interface GroupPropertiesObject {
|
|
566
704
|
/** @example "123456" */
|
|
567
705
|
group_id: string;
|
|
568
706
|
values: object;
|
|
569
707
|
}
|
|
570
708
|
export interface ChargeObject {
|
|
571
|
-
/**
|
|
709
|
+
/**
|
|
710
|
+
* @format uuid
|
|
711
|
+
* @example "183da83c-c007-4fbb-afcd-b00c07c41ffe"
|
|
712
|
+
*/
|
|
572
713
|
lago_id: string;
|
|
573
|
-
/**
|
|
714
|
+
/**
|
|
715
|
+
* @format uuid
|
|
716
|
+
* @example "278da83c-c007-4fbb-afcd-b00c07c41utg"
|
|
717
|
+
*/
|
|
574
718
|
lago_billable_metric_id: string;
|
|
575
719
|
/** @example "bm_code" */
|
|
576
720
|
billable_metric_code: string;
|
|
577
|
-
/**
|
|
721
|
+
/**
|
|
722
|
+
* @format date-time
|
|
723
|
+
* @example "2022-09-14T16:35:31Z"
|
|
724
|
+
*/
|
|
578
725
|
created_at: string;
|
|
579
726
|
/** Charge model type */
|
|
580
727
|
charge_model: "standard" | "graduated" | "package" | "percentage" | "volume";
|
|
@@ -582,11 +729,17 @@ export interface ChargeObject {
|
|
|
582
729
|
group_properties?: GroupPropertiesObject[];
|
|
583
730
|
}
|
|
584
731
|
export interface PlanObject {
|
|
585
|
-
/**
|
|
732
|
+
/**
|
|
733
|
+
* @format uuid
|
|
734
|
+
* @example "183da83c-c007-4fbb-afcd-b00c07c41ffe"
|
|
735
|
+
*/
|
|
586
736
|
lago_id: string;
|
|
587
737
|
/** @example "example name" */
|
|
588
738
|
name: string;
|
|
589
|
-
/**
|
|
739
|
+
/**
|
|
740
|
+
* @format date-time
|
|
741
|
+
* @example "2022-09-14T16:35:31Z"
|
|
742
|
+
*/
|
|
590
743
|
created_at: string;
|
|
591
744
|
/** @example "example_code" */
|
|
592
745
|
code: string;
|
|
@@ -637,9 +790,15 @@ export interface PlanInput {
|
|
|
637
790
|
/** @example false */
|
|
638
791
|
bill_charges_monthly?: boolean;
|
|
639
792
|
charges?: {
|
|
640
|
-
/**
|
|
793
|
+
/**
|
|
794
|
+
* @format uuid
|
|
795
|
+
* @example "183da83c-c007-4fbb-afcd-b00c07c41ffe"
|
|
796
|
+
*/
|
|
641
797
|
id?: string;
|
|
642
|
-
/**
|
|
798
|
+
/**
|
|
799
|
+
* @format uuid
|
|
800
|
+
* @example "278da83c-c007-4fbb-afcd-b00c07c41utg"
|
|
801
|
+
*/
|
|
643
802
|
billable_metric_id?: string;
|
|
644
803
|
/** Charge model type */
|
|
645
804
|
charge_model?: "standard" | "graduated" | "package" | "percentage" | "volume";
|
|
@@ -653,13 +812,19 @@ export interface PlanInput {
|
|
|
653
812
|
};
|
|
654
813
|
}
|
|
655
814
|
export interface SubscriptionObject {
|
|
656
|
-
/**
|
|
815
|
+
/**
|
|
816
|
+
* @format uuid
|
|
817
|
+
* @example "183da83c-c007-4fbb-afcd-b00c07c41ffe"
|
|
818
|
+
*/
|
|
657
819
|
lago_id: string;
|
|
658
|
-
/** @example 12345 */
|
|
820
|
+
/** @example "12345" */
|
|
659
821
|
external_id: string;
|
|
660
|
-
/**
|
|
822
|
+
/**
|
|
823
|
+
* @format uuid
|
|
824
|
+
* @example "995da83c-c007-4fbb-afcd-b00c07c41tre"
|
|
825
|
+
*/
|
|
661
826
|
lago_customer_id: string;
|
|
662
|
-
/** @example 54321 */
|
|
827
|
+
/** @example "54321" */
|
|
663
828
|
external_customer_id: string;
|
|
664
829
|
/** @example "Test subscription" */
|
|
665
830
|
name?: string;
|
|
@@ -669,21 +834,39 @@ export interface SubscriptionObject {
|
|
|
669
834
|
status: "active" | "pending" | "terminated" | "canceled";
|
|
670
835
|
/** Billing time */
|
|
671
836
|
billing_time: "calendar" | "anniversary";
|
|
672
|
-
/**
|
|
837
|
+
/**
|
|
838
|
+
* @format date-time
|
|
839
|
+
* @example "2022-09-14T16:35:31Z"
|
|
840
|
+
*/
|
|
673
841
|
subscription_at: string;
|
|
674
|
-
/**
|
|
842
|
+
/**
|
|
843
|
+
* @format date-time
|
|
844
|
+
* @example "2022-09-14T16:35:31Z"
|
|
845
|
+
*/
|
|
675
846
|
started_at: string;
|
|
676
|
-
/**
|
|
847
|
+
/**
|
|
848
|
+
* @format date-time
|
|
849
|
+
* @example "2022-09-14T16:35:31Z"
|
|
850
|
+
*/
|
|
677
851
|
terminated_at?: string;
|
|
678
|
-
/**
|
|
852
|
+
/**
|
|
853
|
+
* @format date-time
|
|
854
|
+
* @example "2022-09-14T16:35:31Z"
|
|
855
|
+
*/
|
|
679
856
|
canceled_at?: string;
|
|
680
|
-
/**
|
|
857
|
+
/**
|
|
858
|
+
* @format date-time
|
|
859
|
+
* @example "2022-09-14T16:35:31Z"
|
|
860
|
+
*/
|
|
681
861
|
created_at: string;
|
|
682
862
|
/** @example "previous_code" */
|
|
683
863
|
previous_plan_code?: string;
|
|
684
864
|
/** @example "next_code" */
|
|
685
865
|
next_plan_code?: string;
|
|
686
|
-
/**
|
|
866
|
+
/**
|
|
867
|
+
* @format date-time
|
|
868
|
+
* @example "2022-09-14T16:35:31Z"
|
|
869
|
+
*/
|
|
687
870
|
downgrade_plan_date?: string;
|
|
688
871
|
}
|
|
689
872
|
export interface Subscription {
|
|
@@ -694,17 +877,20 @@ export interface Subscriptions {
|
|
|
694
877
|
}
|
|
695
878
|
export interface SubscriptionCreateInput {
|
|
696
879
|
subscription: {
|
|
697
|
-
/** @example 12345 */
|
|
880
|
+
/** @example "12345" */
|
|
698
881
|
external_customer_id: string;
|
|
699
882
|
/** @example "example_code" */
|
|
700
883
|
plan_code: string;
|
|
701
884
|
/** @example "Test name" */
|
|
702
885
|
name?: string;
|
|
703
|
-
/** @example 54321 */
|
|
886
|
+
/** @example "54321" */
|
|
704
887
|
external_id: string;
|
|
705
888
|
/** Billing time */
|
|
706
889
|
billing_time?: "calendar" | "anniversary";
|
|
707
|
-
/**
|
|
890
|
+
/**
|
|
891
|
+
* @format date-time
|
|
892
|
+
* @example "2022-08-08T00:00:00Z"
|
|
893
|
+
*/
|
|
708
894
|
subscription_at?: string;
|
|
709
895
|
};
|
|
710
896
|
}
|
|
@@ -712,19 +898,28 @@ export interface SubscriptionUpdateInput {
|
|
|
712
898
|
subscription: {
|
|
713
899
|
/** @example "New name" */
|
|
714
900
|
name?: string;
|
|
715
|
-
/**
|
|
901
|
+
/**
|
|
902
|
+
* @format date-time
|
|
903
|
+
* @example "2022-08-08T00:00:00Z"
|
|
904
|
+
*/
|
|
716
905
|
subscription_at?: string;
|
|
717
906
|
};
|
|
718
907
|
}
|
|
719
908
|
export interface CreditObject {
|
|
720
|
-
/**
|
|
909
|
+
/**
|
|
910
|
+
* @format uuid
|
|
911
|
+
* @example "183da83c-c007-4fbb-afcd-b00c07c41ffe"
|
|
912
|
+
*/
|
|
721
913
|
lago_id: string;
|
|
722
914
|
/** @example 1200 */
|
|
723
915
|
amount_cents: number;
|
|
724
916
|
/** @example "EUR" */
|
|
725
917
|
amount_currency: string;
|
|
726
918
|
item: {
|
|
727
|
-
/**
|
|
919
|
+
/**
|
|
920
|
+
* @format uuid
|
|
921
|
+
* @example "183da83c-c007-4fbb-afcd-b00c07c41ffe"
|
|
922
|
+
*/
|
|
728
923
|
lago_id: string;
|
|
729
924
|
/** @example "coupon" */
|
|
730
925
|
type: string;
|
|
@@ -734,15 +929,24 @@ export interface CreditObject {
|
|
|
734
929
|
name: string;
|
|
735
930
|
};
|
|
736
931
|
invoice: {
|
|
737
|
-
/**
|
|
932
|
+
/**
|
|
933
|
+
* @format uuid
|
|
934
|
+
* @example "183da83c-c007-4fbb-afcd-b00c07c41ffe"
|
|
935
|
+
*/
|
|
738
936
|
lago_id: string;
|
|
739
937
|
payment_status: "pending" | "succeeded" | "failed";
|
|
740
938
|
};
|
|
741
939
|
}
|
|
742
940
|
export interface FeeObject {
|
|
743
|
-
/**
|
|
941
|
+
/**
|
|
942
|
+
* @format uuid
|
|
943
|
+
* @example "183da83c-c007-4fbb-afcd-b00c07c41ffe"
|
|
944
|
+
*/
|
|
744
945
|
lago_id: string;
|
|
745
|
-
/**
|
|
946
|
+
/**
|
|
947
|
+
* @format uuid
|
|
948
|
+
* @example "183da83c-c007-4fbb-afcd-b00c07c41ffe"
|
|
949
|
+
*/
|
|
746
950
|
lago_group_id?: string;
|
|
747
951
|
/** @example 1000 */
|
|
748
952
|
amount_cents: number;
|
|
@@ -770,25 +974,40 @@ export interface FeeObject {
|
|
|
770
974
|
};
|
|
771
975
|
}
|
|
772
976
|
export interface InvoiceMetadataObject {
|
|
773
|
-
/**
|
|
977
|
+
/**
|
|
978
|
+
* @format uuid
|
|
979
|
+
* @example "183da83c-c007-4fbb-afcd-b00c07c41ffe"
|
|
980
|
+
*/
|
|
774
981
|
lago_id?: string;
|
|
775
982
|
/** @example "name" */
|
|
776
983
|
key?: string;
|
|
777
984
|
/** @example "John" */
|
|
778
985
|
value?: string;
|
|
779
|
-
/**
|
|
986
|
+
/**
|
|
987
|
+
* @format date-time
|
|
988
|
+
* @example "2022-09-14T16:35:31Z"
|
|
989
|
+
*/
|
|
780
990
|
created_at?: string;
|
|
781
991
|
}
|
|
782
992
|
export interface InvoiceObject {
|
|
783
|
-
/**
|
|
993
|
+
/**
|
|
994
|
+
* @format uuid
|
|
995
|
+
* @example "183da83c-c007-4fbb-afcd-b00c07c41ffe"
|
|
996
|
+
*/
|
|
784
997
|
lago_id: string;
|
|
785
998
|
/** @example 12345 */
|
|
786
999
|
sequential_id: number;
|
|
787
|
-
/** @example 222345 */
|
|
1000
|
+
/** @example "222345" */
|
|
788
1001
|
number: string;
|
|
789
|
-
/**
|
|
1002
|
+
/**
|
|
1003
|
+
* @format date-time
|
|
1004
|
+
* @example "2022-09-14T16:35:31Z"
|
|
1005
|
+
*/
|
|
790
1006
|
charges_from_date: string;
|
|
791
|
-
/**
|
|
1007
|
+
/**
|
|
1008
|
+
* @format date-time
|
|
1009
|
+
* @example "2022-09-14T16:35:31Z"
|
|
1010
|
+
*/
|
|
792
1011
|
issuing_date: string;
|
|
793
1012
|
invoice_type?: "subscription" | "add_on" | "credit";
|
|
794
1013
|
status: "draft" | "finalized";
|
|
@@ -830,7 +1049,10 @@ export interface InvoiceInput {
|
|
|
830
1049
|
/** Status */
|
|
831
1050
|
payment_status: "pending" | "succeeded" | "failed";
|
|
832
1051
|
metadata?: {
|
|
833
|
-
/**
|
|
1052
|
+
/**
|
|
1053
|
+
* @format uuid
|
|
1054
|
+
* @example "183da83c-c007-4fbb-afcd-b00c07c41ffe"
|
|
1055
|
+
*/
|
|
834
1056
|
id?: string;
|
|
835
1057
|
/** @example "name" */
|
|
836
1058
|
key?: string;
|
|
@@ -840,11 +1062,17 @@ export interface InvoiceInput {
|
|
|
840
1062
|
};
|
|
841
1063
|
}
|
|
842
1064
|
export interface WalletObject {
|
|
843
|
-
/**
|
|
1065
|
+
/**
|
|
1066
|
+
* @format uuid
|
|
1067
|
+
* @example "183da83c-c007-4fbb-afcd-b00c07c41ffe"
|
|
1068
|
+
*/
|
|
844
1069
|
lago_id: string;
|
|
845
|
-
/**
|
|
1070
|
+
/**
|
|
1071
|
+
* @format uuid
|
|
1072
|
+
* @example "254da83c-c007-4fbb-afcd-b00c07c41oit"
|
|
1073
|
+
*/
|
|
846
1074
|
lago_customer_id: string;
|
|
847
|
-
/** @example 12345 */
|
|
1075
|
+
/** @example "12345" */
|
|
848
1076
|
external_customer_id: string;
|
|
849
1077
|
/** Status */
|
|
850
1078
|
status: "active" | "terminated";
|
|
@@ -860,15 +1088,30 @@ export interface WalletObject {
|
|
|
860
1088
|
balance: number;
|
|
861
1089
|
/** @example 100 */
|
|
862
1090
|
consumed_credits: number;
|
|
863
|
-
/**
|
|
1091
|
+
/**
|
|
1092
|
+
* @format date-time
|
|
1093
|
+
* @example "2022-09-14T16:35:31Z"
|
|
1094
|
+
*/
|
|
864
1095
|
created_at: string;
|
|
865
|
-
/**
|
|
1096
|
+
/**
|
|
1097
|
+
* @format date-time
|
|
1098
|
+
* @example "2022-09-14T23:59:59Z"
|
|
1099
|
+
*/
|
|
866
1100
|
expiration_at?: string;
|
|
867
|
-
/**
|
|
1101
|
+
/**
|
|
1102
|
+
* @format date-time
|
|
1103
|
+
* @example "2022-09-14T16:35:31Z"
|
|
1104
|
+
*/
|
|
868
1105
|
last_balance_sync_at?: string;
|
|
869
|
-
/**
|
|
1106
|
+
/**
|
|
1107
|
+
* @format date-time
|
|
1108
|
+
* @example "2022-09-14T16:35:31Z"
|
|
1109
|
+
*/
|
|
870
1110
|
last_consumed_credit_at?: string;
|
|
871
|
-
/**
|
|
1111
|
+
/**
|
|
1112
|
+
* @format date-time
|
|
1113
|
+
* @example "2022-09-14T16:35:31Z"
|
|
1114
|
+
*/
|
|
872
1115
|
terminated_at?: string;
|
|
873
1116
|
}
|
|
874
1117
|
export interface Wallet {
|
|
@@ -889,9 +1132,12 @@ export interface WalletInput {
|
|
|
889
1132
|
paid_credits?: number;
|
|
890
1133
|
/** @example 10 */
|
|
891
1134
|
granted_credits?: number;
|
|
892
|
-
/** @example 12345 */
|
|
1135
|
+
/** @example "12345" */
|
|
893
1136
|
external_customer_id: string;
|
|
894
|
-
/**
|
|
1137
|
+
/**
|
|
1138
|
+
* @format date-time
|
|
1139
|
+
* @example "2022-09-14T23:59:59Z"
|
|
1140
|
+
*/
|
|
895
1141
|
expiration_at?: string;
|
|
896
1142
|
};
|
|
897
1143
|
}
|
|
@@ -899,14 +1145,23 @@ export interface WalletUpdateInput {
|
|
|
899
1145
|
wallet: {
|
|
900
1146
|
/** @example "Wallet name" */
|
|
901
1147
|
name?: string;
|
|
902
|
-
/**
|
|
1148
|
+
/**
|
|
1149
|
+
* @format date-time
|
|
1150
|
+
* @example "2022-09-14T23:59:59Z"
|
|
1151
|
+
*/
|
|
903
1152
|
expiration_at?: string;
|
|
904
1153
|
};
|
|
905
1154
|
}
|
|
906
1155
|
export interface WalletTransactionObject {
|
|
907
|
-
/**
|
|
1156
|
+
/**
|
|
1157
|
+
* @format uuid
|
|
1158
|
+
* @example "183da83c-c007-4fbb-afcd-b00c07c41ffe"
|
|
1159
|
+
*/
|
|
908
1160
|
lago_id: string;
|
|
909
|
-
/**
|
|
1161
|
+
/**
|
|
1162
|
+
* @format uuid
|
|
1163
|
+
* @example "985da83c-c007-4fbb-afcd-b00c07c41ffe"
|
|
1164
|
+
*/
|
|
910
1165
|
lago_wallet_id: string;
|
|
911
1166
|
/** Status */
|
|
912
1167
|
status: "pending" | "settled";
|
|
@@ -916,9 +1171,15 @@ export interface WalletTransactionObject {
|
|
|
916
1171
|
amount: number;
|
|
917
1172
|
/** @example 100 */
|
|
918
1173
|
credit_amount: number;
|
|
919
|
-
/**
|
|
1174
|
+
/**
|
|
1175
|
+
* @format date-time
|
|
1176
|
+
* @example "2022-09-14T16:35:31Z"
|
|
1177
|
+
*/
|
|
920
1178
|
settled_at?: string;
|
|
921
|
-
/**
|
|
1179
|
+
/**
|
|
1180
|
+
* @format date-time
|
|
1181
|
+
* @example "2022-09-14T16:35:31Z"
|
|
1182
|
+
*/
|
|
922
1183
|
created_at: string;
|
|
923
1184
|
}
|
|
924
1185
|
export interface WalletTransaction {
|
|
@@ -929,7 +1190,10 @@ export interface WalletTransactions {
|
|
|
929
1190
|
}
|
|
930
1191
|
export interface WalletTransactionInput {
|
|
931
1192
|
wallet_transaction: {
|
|
932
|
-
/**
|
|
1193
|
+
/**
|
|
1194
|
+
* @format uuid
|
|
1195
|
+
* @example "985da83c-c007-4fbb-afcd-b00c07c41ffe"
|
|
1196
|
+
*/
|
|
933
1197
|
wallet_id: string;
|
|
934
1198
|
/** @example 100 */
|
|
935
1199
|
paid_credits?: number;
|
|
@@ -938,7 +1202,10 @@ export interface WalletTransactionInput {
|
|
|
938
1202
|
};
|
|
939
1203
|
}
|
|
940
1204
|
export interface CreditNoteItemObject {
|
|
941
|
-
/**
|
|
1205
|
+
/**
|
|
1206
|
+
* @format uuid
|
|
1207
|
+
* @example "183da83c-c007-4fbb-afcd-b00c07c41ffe"
|
|
1208
|
+
*/
|
|
942
1209
|
lago_id: string;
|
|
943
1210
|
/** @example 1220 */
|
|
944
1211
|
amount_cents: number;
|
|
@@ -947,17 +1214,26 @@ export interface CreditNoteItemObject {
|
|
|
947
1214
|
fee: FeeObject;
|
|
948
1215
|
}
|
|
949
1216
|
export interface CreditNoteObject {
|
|
950
|
-
/**
|
|
1217
|
+
/**
|
|
1218
|
+
* @format uuid
|
|
1219
|
+
* @example "183da83c-c007-4fbb-afcd-b00c07c41ffe"
|
|
1220
|
+
*/
|
|
951
1221
|
lago_id: string;
|
|
952
1222
|
/** @example 1234 */
|
|
953
1223
|
sequential_id: number;
|
|
954
1224
|
/** @example "123456789" */
|
|
955
1225
|
number: string;
|
|
956
|
-
/**
|
|
1226
|
+
/**
|
|
1227
|
+
* @format uuid
|
|
1228
|
+
* @example "144da83c-c007-4fbb-afcd-b00c07c41ffe"
|
|
1229
|
+
*/
|
|
957
1230
|
lago_invoice_id: string;
|
|
958
1231
|
/** @example "123456789" */
|
|
959
1232
|
invoice_number: string;
|
|
960
|
-
/**
|
|
1233
|
+
/**
|
|
1234
|
+
* @format date-time
|
|
1235
|
+
* @example "2022-09-14T16:35:31Z"
|
|
1236
|
+
*/
|
|
961
1237
|
issuing_date: string;
|
|
962
1238
|
/** Credit status */
|
|
963
1239
|
credit_status?: "available" | "consumed" | "voided";
|
|
@@ -991,9 +1267,15 @@ export interface CreditNoteObject {
|
|
|
991
1267
|
refund_amount_cents: number;
|
|
992
1268
|
/** @example "EUR" */
|
|
993
1269
|
refund_amount_currency: string;
|
|
994
|
-
/**
|
|
1270
|
+
/**
|
|
1271
|
+
* @format date-time
|
|
1272
|
+
* @example "2022-09-14T16:35:31Z"
|
|
1273
|
+
*/
|
|
995
1274
|
created_at: string;
|
|
996
|
-
/**
|
|
1275
|
+
/**
|
|
1276
|
+
* @format date-time
|
|
1277
|
+
* @example "2022-09-14T16:35:31Z"
|
|
1278
|
+
*/
|
|
997
1279
|
updated_at: string;
|
|
998
1280
|
/** @example "https://example.com" */
|
|
999
1281
|
file_url?: string;
|
|
@@ -1008,7 +1290,10 @@ export interface CreditNotes {
|
|
|
1008
1290
|
}
|
|
1009
1291
|
export interface CreditNoteInput {
|
|
1010
1292
|
credit_note: {
|
|
1011
|
-
/**
|
|
1293
|
+
/**
|
|
1294
|
+
* @format uuid
|
|
1295
|
+
* @example "194da83c-c007-4fbb-afcd-b00c07c41fzh"
|
|
1296
|
+
*/
|
|
1012
1297
|
invoice_id: string;
|
|
1013
1298
|
/** Reason */
|
|
1014
1299
|
reason: "duplicated_charge" | "product_unsatisfactory" | "order_change" | "order_cancellation" | "fraudulent_charge" | "other";
|
|
@@ -1019,7 +1304,10 @@ export interface CreditNoteInput {
|
|
|
1019
1304
|
/** @example 20 */
|
|
1020
1305
|
refund_amount_cents: number;
|
|
1021
1306
|
items: {
|
|
1022
|
-
/**
|
|
1307
|
+
/**
|
|
1308
|
+
* @format uuid
|
|
1309
|
+
* @example "144da83c-c007-4fbb-afcd-b00c07c41ffe"
|
|
1310
|
+
*/
|
|
1023
1311
|
fee_id: string;
|
|
1024
1312
|
/** @example 20 */
|
|
1025
1313
|
amount_cents: number;
|
|
@@ -1536,6 +1824,16 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
1536
1824
|
* @secure
|
|
1537
1825
|
*/
|
|
1538
1826
|
findEvent: (id: string, params?: RequestParams) => Promise<HttpResponse<Event, ApiResponseUnauthorized | ApiResponseNotFound>>;
|
|
1827
|
+
/**
|
|
1828
|
+
* @description Estimate the fees that would be created after reception of an event for a billable metric attached to one or multiple instant charges
|
|
1829
|
+
*
|
|
1830
|
+
* @tags events
|
|
1831
|
+
* @name EventEstimateFees
|
|
1832
|
+
* @summary Estimate fees for an instant charge
|
|
1833
|
+
* @request POST:/events/estimate_fees
|
|
1834
|
+
* @secure
|
|
1835
|
+
*/
|
|
1836
|
+
eventEstimateFees: (data: EventEstimateFeesInput, params?: RequestParams) => Promise<HttpResponse<Fees, ApiResponseBadRequest | ApiResponseUnauthorized | ApiResponseUnprocessableEntity | ApiResponseNotFound>>;
|
|
1539
1837
|
};
|
|
1540
1838
|
plans: {
|
|
1541
1839
|
/**
|
|
@@ -1758,12 +2056,14 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
1758
2056
|
external_customer_id?: string;
|
|
1759
2057
|
/**
|
|
1760
2058
|
* Date from
|
|
1761
|
-
* @
|
|
2059
|
+
* @format date
|
|
2060
|
+
* @example "2022-07-08"
|
|
1762
2061
|
*/
|
|
1763
2062
|
issuing_date_from?: string;
|
|
1764
2063
|
/**
|
|
1765
2064
|
* Date to
|
|
1766
|
-
* @
|
|
2065
|
+
* @format date
|
|
2066
|
+
* @example "2022-08-09"
|
|
1767
2067
|
*/
|
|
1768
2068
|
issuing_date_to?: string;
|
|
1769
2069
|
/**
|