lago-javascript-client 0.26.1-beta → 0.27.1-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 +224 -155
- package/package.json +1 -1
- package/script/swagger/client.js +224 -155
- package/types/swagger/client.d.ts +817 -315
|
@@ -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 "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
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 "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
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 "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
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 "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
116
|
+
*/
|
|
99
117
|
lago_id: string;
|
|
100
|
-
/**
|
|
118
|
+
/**
|
|
119
|
+
* @format uuid
|
|
120
|
+
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
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 "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
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 "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
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 "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
239
|
+
*/
|
|
198
240
|
lago_id: string;
|
|
199
|
-
/**
|
|
241
|
+
/**
|
|
242
|
+
* @format uuid
|
|
243
|
+
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
244
|
+
*/
|
|
200
245
|
lago_coupon_id: string;
|
|
201
246
|
/** @example "example_code" */
|
|
202
247
|
coupon_code: string;
|
|
203
|
-
/**
|
|
248
|
+
/**
|
|
249
|
+
* @format uuid
|
|
250
|
+
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
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 "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
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 "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
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 "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
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 "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
532
|
+
*/
|
|
442
533
|
id?: string;
|
|
443
534
|
/** @example "name" */
|
|
444
535
|
key?: string;
|
|
@@ -457,13 +548,20 @@ export interface ChargeUsageObject {
|
|
|
457
548
|
/** @example "EUR" */
|
|
458
549
|
amount_currency: string;
|
|
459
550
|
charge: {
|
|
460
|
-
/**
|
|
551
|
+
/**
|
|
552
|
+
* @format uuid
|
|
553
|
+
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
554
|
+
*/
|
|
461
555
|
lago_id?: string;
|
|
462
556
|
/** Charge model type */
|
|
463
557
|
charge_model?: "standard" | "graduated" | "package" | "percentage" | "volume";
|
|
558
|
+
instant?: boolean;
|
|
464
559
|
};
|
|
465
560
|
billable_metric: {
|
|
466
|
-
/**
|
|
561
|
+
/**
|
|
562
|
+
* @format uuid
|
|
563
|
+
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
564
|
+
*/
|
|
467
565
|
lago_id?: string;
|
|
468
566
|
/** @example "Example name" */
|
|
469
567
|
name?: string;
|
|
@@ -473,7 +571,10 @@ export interface ChargeUsageObject {
|
|
|
473
571
|
aggregation_type?: "count_agg" | "sum_agg" | "max_agg" | "unique_count_agg" | "recurring_count_agg";
|
|
474
572
|
};
|
|
475
573
|
groups: {
|
|
476
|
-
/**
|
|
574
|
+
/**
|
|
575
|
+
* @format uuid
|
|
576
|
+
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
577
|
+
*/
|
|
477
578
|
lago_id?: string;
|
|
478
579
|
/** @example "key" */
|
|
479
580
|
key?: string;
|
|
@@ -486,11 +587,20 @@ export interface ChargeUsageObject {
|
|
|
486
587
|
}[];
|
|
487
588
|
}
|
|
488
589
|
export interface CustomerUsageObject {
|
|
489
|
-
/**
|
|
590
|
+
/**
|
|
591
|
+
* @format date-time
|
|
592
|
+
* @example "2022-09-14T00:00:00Z"
|
|
593
|
+
*/
|
|
490
594
|
from_datetime: string;
|
|
491
|
-
/**
|
|
595
|
+
/**
|
|
596
|
+
* @format date-time
|
|
597
|
+
* @example "2022-09-14T00:00:00Z"
|
|
598
|
+
*/
|
|
492
599
|
to_datetime: string;
|
|
493
|
-
/**
|
|
600
|
+
/**
|
|
601
|
+
* @format date-time
|
|
602
|
+
* @example "2022-09-15T00:00:00Z"
|
|
603
|
+
*/
|
|
494
604
|
issuing_date: string;
|
|
495
605
|
/** @example 1200 */
|
|
496
606
|
amount_cents: number;
|
|
@@ -510,24 +620,39 @@ export interface CustomerUsage {
|
|
|
510
620
|
customer_usage: CustomerUsageObject;
|
|
511
621
|
}
|
|
512
622
|
export interface EventObject {
|
|
513
|
-
/**
|
|
623
|
+
/**
|
|
624
|
+
* @format uuid
|
|
625
|
+
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
626
|
+
*/
|
|
514
627
|
lago_id: string;
|
|
515
628
|
/** @example "987654321" */
|
|
516
629
|
transaction_id: string;
|
|
517
|
-
/**
|
|
630
|
+
/**
|
|
631
|
+
* @format uuid
|
|
632
|
+
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
633
|
+
*/
|
|
518
634
|
lago_customer_id: string;
|
|
519
635
|
/** @example "123456" */
|
|
520
636
|
external_customer_id: string;
|
|
521
637
|
/** @example "code" */
|
|
522
638
|
code: string;
|
|
523
|
-
/**
|
|
639
|
+
/**
|
|
640
|
+
* @format date-time
|
|
641
|
+
* @example "2022-09-14T16:35:31Z"
|
|
642
|
+
*/
|
|
524
643
|
timestamp: string;
|
|
525
644
|
properties?: object;
|
|
526
|
-
/**
|
|
645
|
+
/**
|
|
646
|
+
* @format uuid
|
|
647
|
+
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
648
|
+
*/
|
|
527
649
|
lago_subscription_id: string;
|
|
528
650
|
/** @example "123456" */
|
|
529
651
|
external_subscription_id: string;
|
|
530
|
-
/**
|
|
652
|
+
/**
|
|
653
|
+
* @format date-time
|
|
654
|
+
* @example "2022-09-14T16:35:31Z"
|
|
655
|
+
*/
|
|
531
656
|
created_at: string;
|
|
532
657
|
}
|
|
533
658
|
export interface Event {
|
|
@@ -548,6 +673,17 @@ export interface EventInput {
|
|
|
548
673
|
properties?: object;
|
|
549
674
|
};
|
|
550
675
|
}
|
|
676
|
+
export interface EventEstimateFeesInput {
|
|
677
|
+
event: {
|
|
678
|
+
/** @example "code" */
|
|
679
|
+
code: string;
|
|
680
|
+
/** @example "654321" */
|
|
681
|
+
external_customer_id?: string;
|
|
682
|
+
/** @example "123456" */
|
|
683
|
+
external_subscription_id?: string;
|
|
684
|
+
properties?: object;
|
|
685
|
+
};
|
|
686
|
+
}
|
|
551
687
|
export interface BatchEventInput {
|
|
552
688
|
event: {
|
|
553
689
|
/** @example "123456" */
|
|
@@ -562,31 +698,61 @@ export interface BatchEventInput {
|
|
|
562
698
|
properties?: object;
|
|
563
699
|
};
|
|
564
700
|
}
|
|
701
|
+
export interface Fees {
|
|
702
|
+
fees: FeeObject[];
|
|
703
|
+
}
|
|
704
|
+
export interface FeesPaginated {
|
|
705
|
+
fees: FeeObject[];
|
|
706
|
+
meta: PaginationMeta;
|
|
707
|
+
}
|
|
708
|
+
export interface FeeUpdateInput {
|
|
709
|
+
invoice: {
|
|
710
|
+
/** Status */
|
|
711
|
+
payment_status: "pending" | "succeeded" | "failed" | "refunded";
|
|
712
|
+
};
|
|
713
|
+
}
|
|
565
714
|
export interface GroupPropertiesObject {
|
|
566
715
|
/** @example "123456" */
|
|
567
716
|
group_id: string;
|
|
568
717
|
values: object;
|
|
569
718
|
}
|
|
570
719
|
export interface ChargeObject {
|
|
571
|
-
/**
|
|
720
|
+
/**
|
|
721
|
+
* @format uuid
|
|
722
|
+
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
723
|
+
*/
|
|
572
724
|
lago_id: string;
|
|
573
|
-
/**
|
|
725
|
+
/**
|
|
726
|
+
* @format uuid
|
|
727
|
+
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
728
|
+
*/
|
|
574
729
|
lago_billable_metric_id: string;
|
|
575
730
|
/** @example "bm_code" */
|
|
576
731
|
billable_metric_code: string;
|
|
577
|
-
/**
|
|
732
|
+
/**
|
|
733
|
+
* @format date-time
|
|
734
|
+
* @example "2022-09-14T16:35:31Z"
|
|
735
|
+
*/
|
|
578
736
|
created_at: string;
|
|
579
737
|
/** Charge model type */
|
|
580
738
|
charge_model: "standard" | "graduated" | "package" | "percentage" | "volume";
|
|
739
|
+
/** @example true */
|
|
740
|
+
instant?: boolean;
|
|
581
741
|
properties?: object;
|
|
582
742
|
group_properties?: GroupPropertiesObject[];
|
|
583
743
|
}
|
|
584
744
|
export interface PlanObject {
|
|
585
|
-
/**
|
|
745
|
+
/**
|
|
746
|
+
* @format uuid
|
|
747
|
+
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
748
|
+
*/
|
|
586
749
|
lago_id: string;
|
|
587
750
|
/** @example "example name" */
|
|
588
751
|
name: string;
|
|
589
|
-
/**
|
|
752
|
+
/**
|
|
753
|
+
* @format date-time
|
|
754
|
+
* @example "2022-09-14T16:35:31Z"
|
|
755
|
+
*/
|
|
590
756
|
created_at: string;
|
|
591
757
|
/** @example "example_code" */
|
|
592
758
|
code: string;
|
|
@@ -637,12 +803,19 @@ export interface PlanInput {
|
|
|
637
803
|
/** @example false */
|
|
638
804
|
bill_charges_monthly?: boolean;
|
|
639
805
|
charges?: {
|
|
640
|
-
/**
|
|
806
|
+
/**
|
|
807
|
+
* @format uuid
|
|
808
|
+
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
809
|
+
*/
|
|
641
810
|
id?: string;
|
|
642
|
-
/**
|
|
811
|
+
/**
|
|
812
|
+
* @format uuid
|
|
813
|
+
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
814
|
+
*/
|
|
643
815
|
billable_metric_id?: string;
|
|
644
816
|
/** Charge model type */
|
|
645
817
|
charge_model?: "standard" | "graduated" | "package" | "percentage" | "volume";
|
|
818
|
+
instant?: boolean;
|
|
646
819
|
properties?: object;
|
|
647
820
|
group_properties?: {
|
|
648
821
|
/** @example "123456" */
|
|
@@ -653,13 +826,19 @@ export interface PlanInput {
|
|
|
653
826
|
};
|
|
654
827
|
}
|
|
655
828
|
export interface SubscriptionObject {
|
|
656
|
-
/**
|
|
829
|
+
/**
|
|
830
|
+
* @format uuid
|
|
831
|
+
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
832
|
+
*/
|
|
657
833
|
lago_id: string;
|
|
658
|
-
/** @example 12345 */
|
|
834
|
+
/** @example "12345" */
|
|
659
835
|
external_id: string;
|
|
660
|
-
/**
|
|
836
|
+
/**
|
|
837
|
+
* @format uuid
|
|
838
|
+
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
839
|
+
*/
|
|
661
840
|
lago_customer_id: string;
|
|
662
|
-
/** @example 54321 */
|
|
841
|
+
/** @example "54321" */
|
|
663
842
|
external_customer_id: string;
|
|
664
843
|
/** @example "Test subscription" */
|
|
665
844
|
name?: string;
|
|
@@ -669,21 +848,39 @@ export interface SubscriptionObject {
|
|
|
669
848
|
status: "active" | "pending" | "terminated" | "canceled";
|
|
670
849
|
/** Billing time */
|
|
671
850
|
billing_time: "calendar" | "anniversary";
|
|
672
|
-
/**
|
|
851
|
+
/**
|
|
852
|
+
* @format date-time
|
|
853
|
+
* @example "2022-09-14T16:35:31Z"
|
|
854
|
+
*/
|
|
673
855
|
subscription_at: string;
|
|
674
|
-
/**
|
|
856
|
+
/**
|
|
857
|
+
* @format date-time
|
|
858
|
+
* @example "2022-09-14T16:35:31Z"
|
|
859
|
+
*/
|
|
675
860
|
started_at: string;
|
|
676
|
-
/**
|
|
861
|
+
/**
|
|
862
|
+
* @format date-time
|
|
863
|
+
* @example "2022-09-14T16:35:31Z"
|
|
864
|
+
*/
|
|
677
865
|
terminated_at?: string;
|
|
678
|
-
/**
|
|
866
|
+
/**
|
|
867
|
+
* @format date-time
|
|
868
|
+
* @example "2022-09-14T16:35:31Z"
|
|
869
|
+
*/
|
|
679
870
|
canceled_at?: string;
|
|
680
|
-
/**
|
|
871
|
+
/**
|
|
872
|
+
* @format date-time
|
|
873
|
+
* @example "2022-09-14T16:35:31Z"
|
|
874
|
+
*/
|
|
681
875
|
created_at: string;
|
|
682
876
|
/** @example "previous_code" */
|
|
683
877
|
previous_plan_code?: string;
|
|
684
878
|
/** @example "next_code" */
|
|
685
879
|
next_plan_code?: string;
|
|
686
|
-
/**
|
|
880
|
+
/**
|
|
881
|
+
* @format date-time
|
|
882
|
+
* @example "2022-09-14T16:35:31Z"
|
|
883
|
+
*/
|
|
687
884
|
downgrade_plan_date?: string;
|
|
688
885
|
}
|
|
689
886
|
export interface Subscription {
|
|
@@ -694,17 +891,20 @@ export interface Subscriptions {
|
|
|
694
891
|
}
|
|
695
892
|
export interface SubscriptionCreateInput {
|
|
696
893
|
subscription: {
|
|
697
|
-
/** @example 12345 */
|
|
894
|
+
/** @example "12345" */
|
|
698
895
|
external_customer_id: string;
|
|
699
896
|
/** @example "example_code" */
|
|
700
897
|
plan_code: string;
|
|
701
898
|
/** @example "Test name" */
|
|
702
899
|
name?: string;
|
|
703
|
-
/** @example 54321 */
|
|
900
|
+
/** @example "54321" */
|
|
704
901
|
external_id: string;
|
|
705
902
|
/** Billing time */
|
|
706
903
|
billing_time?: "calendar" | "anniversary";
|
|
707
|
-
/**
|
|
904
|
+
/**
|
|
905
|
+
* @format date-time
|
|
906
|
+
* @example "2022-08-08T00:00:00Z"
|
|
907
|
+
*/
|
|
708
908
|
subscription_at?: string;
|
|
709
909
|
};
|
|
710
910
|
}
|
|
@@ -712,19 +912,28 @@ export interface SubscriptionUpdateInput {
|
|
|
712
912
|
subscription: {
|
|
713
913
|
/** @example "New name" */
|
|
714
914
|
name?: string;
|
|
715
|
-
/**
|
|
915
|
+
/**
|
|
916
|
+
* @format date-time
|
|
917
|
+
* @example "2022-08-08T00:00:00Z"
|
|
918
|
+
*/
|
|
716
919
|
subscription_at?: string;
|
|
717
920
|
};
|
|
718
921
|
}
|
|
719
922
|
export interface CreditObject {
|
|
720
|
-
/**
|
|
923
|
+
/**
|
|
924
|
+
* @format uuid
|
|
925
|
+
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
926
|
+
*/
|
|
721
927
|
lago_id: string;
|
|
722
928
|
/** @example 1200 */
|
|
723
929
|
amount_cents: number;
|
|
724
930
|
/** @example "EUR" */
|
|
725
931
|
amount_currency: string;
|
|
726
932
|
item: {
|
|
727
|
-
/**
|
|
933
|
+
/**
|
|
934
|
+
* @format uuid
|
|
935
|
+
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
936
|
+
*/
|
|
728
937
|
lago_id: string;
|
|
729
938
|
/** @example "coupon" */
|
|
730
939
|
type: string;
|
|
@@ -734,16 +943,32 @@ export interface CreditObject {
|
|
|
734
943
|
name: string;
|
|
735
944
|
};
|
|
736
945
|
invoice: {
|
|
737
|
-
/**
|
|
946
|
+
/**
|
|
947
|
+
* @format uuid
|
|
948
|
+
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
949
|
+
*/
|
|
738
950
|
lago_id: string;
|
|
739
951
|
payment_status: "pending" | "succeeded" | "failed";
|
|
740
952
|
};
|
|
741
953
|
}
|
|
742
954
|
export interface FeeObject {
|
|
743
|
-
/**
|
|
955
|
+
/**
|
|
956
|
+
* @format uuid
|
|
957
|
+
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
958
|
+
*/
|
|
744
959
|
lago_id: string;
|
|
745
|
-
/**
|
|
960
|
+
/**
|
|
961
|
+
* @format uuid
|
|
962
|
+
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
963
|
+
*/
|
|
746
964
|
lago_group_id?: string;
|
|
965
|
+
/**
|
|
966
|
+
* @format uuid
|
|
967
|
+
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
968
|
+
*/
|
|
969
|
+
lago_invoice_id?: string;
|
|
970
|
+
/** @example "54321" */
|
|
971
|
+
external_subscription_id?: string;
|
|
747
972
|
/** @example 1000 */
|
|
748
973
|
amount_cents: number;
|
|
749
974
|
/** @example "EUR" */
|
|
@@ -760,6 +985,37 @@ export interface FeeObject {
|
|
|
760
985
|
total_amount_currency?: string;
|
|
761
986
|
/** @example 5 */
|
|
762
987
|
events_count?: number;
|
|
988
|
+
/**
|
|
989
|
+
* @format date-time
|
|
990
|
+
* @example "2022-08-08T00:00:00Z"
|
|
991
|
+
*/
|
|
992
|
+
from_date?: string;
|
|
993
|
+
/**
|
|
994
|
+
* @format date-time
|
|
995
|
+
* @example "2022-08-08T00:00:00Z"
|
|
996
|
+
*/
|
|
997
|
+
to_date?: string;
|
|
998
|
+
payment_status: "pending" | "succeeded" | "failed" | "refunded";
|
|
999
|
+
/**
|
|
1000
|
+
* @format date-time
|
|
1001
|
+
* @example "2022-09-14T16:35:31Z"
|
|
1002
|
+
*/
|
|
1003
|
+
created_at: string;
|
|
1004
|
+
/**
|
|
1005
|
+
* @format date-time
|
|
1006
|
+
* @example "2022-09-14T16:35:31Z"
|
|
1007
|
+
*/
|
|
1008
|
+
succeeded_at?: string;
|
|
1009
|
+
/**
|
|
1010
|
+
* @format date-time
|
|
1011
|
+
* @example "2022-09-14T16:35:31Z"
|
|
1012
|
+
*/
|
|
1013
|
+
failed_at?: string;
|
|
1014
|
+
/**
|
|
1015
|
+
* @format date-time
|
|
1016
|
+
* @example "2022-09-14T16:35:31Z"
|
|
1017
|
+
*/
|
|
1018
|
+
refunded_at?: string;
|
|
763
1019
|
item: {
|
|
764
1020
|
/** Billing time */
|
|
765
1021
|
type: "charge" | "add_on" | "subscription" | "credit";
|
|
@@ -767,28 +1023,49 @@ export interface FeeObject {
|
|
|
767
1023
|
code: string;
|
|
768
1024
|
/** @example "name" */
|
|
769
1025
|
name: string;
|
|
1026
|
+
/**
|
|
1027
|
+
* @format uuid
|
|
1028
|
+
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
1029
|
+
*/
|
|
1030
|
+
lago_item_id: string;
|
|
1031
|
+
item_type: "AddOn" | "BillableMetric" | "Subscription" | "WalletTransaction";
|
|
770
1032
|
};
|
|
771
1033
|
}
|
|
772
1034
|
export interface InvoiceMetadataObject {
|
|
773
|
-
/**
|
|
1035
|
+
/**
|
|
1036
|
+
* @format uuid
|
|
1037
|
+
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
1038
|
+
*/
|
|
774
1039
|
lago_id?: string;
|
|
775
1040
|
/** @example "name" */
|
|
776
1041
|
key?: string;
|
|
777
1042
|
/** @example "John" */
|
|
778
1043
|
value?: string;
|
|
779
|
-
/**
|
|
1044
|
+
/**
|
|
1045
|
+
* @format date-time
|
|
1046
|
+
* @example "2022-09-14T16:35:31Z"
|
|
1047
|
+
*/
|
|
780
1048
|
created_at?: string;
|
|
781
1049
|
}
|
|
782
1050
|
export interface InvoiceObject {
|
|
783
|
-
/**
|
|
1051
|
+
/**
|
|
1052
|
+
* @format uuid
|
|
1053
|
+
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
1054
|
+
*/
|
|
784
1055
|
lago_id: string;
|
|
785
1056
|
/** @example 12345 */
|
|
786
1057
|
sequential_id: number;
|
|
787
|
-
/** @example 222345 */
|
|
1058
|
+
/** @example "222345" */
|
|
788
1059
|
number: string;
|
|
789
|
-
/**
|
|
1060
|
+
/**
|
|
1061
|
+
* @format date-time
|
|
1062
|
+
* @example "2022-09-14T16:35:31Z"
|
|
1063
|
+
*/
|
|
790
1064
|
charges_from_date: string;
|
|
791
|
-
/**
|
|
1065
|
+
/**
|
|
1066
|
+
* @format date-time
|
|
1067
|
+
* @example "2022-09-14T16:35:31Z"
|
|
1068
|
+
*/
|
|
792
1069
|
issuing_date: string;
|
|
793
1070
|
invoice_type?: "subscription" | "add_on" | "credit";
|
|
794
1071
|
status: "draft" | "finalized";
|
|
@@ -830,7 +1107,10 @@ export interface InvoiceInput {
|
|
|
830
1107
|
/** Status */
|
|
831
1108
|
payment_status: "pending" | "succeeded" | "failed";
|
|
832
1109
|
metadata?: {
|
|
833
|
-
/**
|
|
1110
|
+
/**
|
|
1111
|
+
* @format uuid
|
|
1112
|
+
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
1113
|
+
*/
|
|
834
1114
|
id?: string;
|
|
835
1115
|
/** @example "name" */
|
|
836
1116
|
key?: string;
|
|
@@ -840,11 +1120,17 @@ export interface InvoiceInput {
|
|
|
840
1120
|
};
|
|
841
1121
|
}
|
|
842
1122
|
export interface WalletObject {
|
|
843
|
-
/**
|
|
1123
|
+
/**
|
|
1124
|
+
* @format uuid
|
|
1125
|
+
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
1126
|
+
*/
|
|
844
1127
|
lago_id: string;
|
|
845
|
-
/**
|
|
1128
|
+
/**
|
|
1129
|
+
* @format uuid
|
|
1130
|
+
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
1131
|
+
*/
|
|
846
1132
|
lago_customer_id: string;
|
|
847
|
-
/** @example 12345 */
|
|
1133
|
+
/** @example "12345" */
|
|
848
1134
|
external_customer_id: string;
|
|
849
1135
|
/** Status */
|
|
850
1136
|
status: "active" | "terminated";
|
|
@@ -860,15 +1146,30 @@ export interface WalletObject {
|
|
|
860
1146
|
balance: number;
|
|
861
1147
|
/** @example 100 */
|
|
862
1148
|
consumed_credits: number;
|
|
863
|
-
/**
|
|
1149
|
+
/**
|
|
1150
|
+
* @format date-time
|
|
1151
|
+
* @example "2022-09-14T16:35:31Z"
|
|
1152
|
+
*/
|
|
864
1153
|
created_at: string;
|
|
865
|
-
/**
|
|
1154
|
+
/**
|
|
1155
|
+
* @format date-time
|
|
1156
|
+
* @example "2022-09-14T23:59:59Z"
|
|
1157
|
+
*/
|
|
866
1158
|
expiration_at?: string;
|
|
867
|
-
/**
|
|
1159
|
+
/**
|
|
1160
|
+
* @format date-time
|
|
1161
|
+
* @example "2022-09-14T16:35:31Z"
|
|
1162
|
+
*/
|
|
868
1163
|
last_balance_sync_at?: string;
|
|
869
|
-
/**
|
|
1164
|
+
/**
|
|
1165
|
+
* @format date-time
|
|
1166
|
+
* @example "2022-09-14T16:35:31Z"
|
|
1167
|
+
*/
|
|
870
1168
|
last_consumed_credit_at?: string;
|
|
871
|
-
/**
|
|
1169
|
+
/**
|
|
1170
|
+
* @format date-time
|
|
1171
|
+
* @example "2022-09-14T16:35:31Z"
|
|
1172
|
+
*/
|
|
872
1173
|
terminated_at?: string;
|
|
873
1174
|
}
|
|
874
1175
|
export interface Wallet {
|
|
@@ -889,9 +1190,12 @@ export interface WalletInput {
|
|
|
889
1190
|
paid_credits?: number;
|
|
890
1191
|
/** @example 10 */
|
|
891
1192
|
granted_credits?: number;
|
|
892
|
-
/** @example 12345 */
|
|
1193
|
+
/** @example "12345" */
|
|
893
1194
|
external_customer_id: string;
|
|
894
|
-
/**
|
|
1195
|
+
/**
|
|
1196
|
+
* @format date-time
|
|
1197
|
+
* @example "2022-09-14T23:59:59Z"
|
|
1198
|
+
*/
|
|
895
1199
|
expiration_at?: string;
|
|
896
1200
|
};
|
|
897
1201
|
}
|
|
@@ -899,14 +1203,23 @@ export interface WalletUpdateInput {
|
|
|
899
1203
|
wallet: {
|
|
900
1204
|
/** @example "Wallet name" */
|
|
901
1205
|
name?: string;
|
|
902
|
-
/**
|
|
1206
|
+
/**
|
|
1207
|
+
* @format date-time
|
|
1208
|
+
* @example "2022-09-14T23:59:59Z"
|
|
1209
|
+
*/
|
|
903
1210
|
expiration_at?: string;
|
|
904
1211
|
};
|
|
905
1212
|
}
|
|
906
1213
|
export interface WalletTransactionObject {
|
|
907
|
-
/**
|
|
1214
|
+
/**
|
|
1215
|
+
* @format uuid
|
|
1216
|
+
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
1217
|
+
*/
|
|
908
1218
|
lago_id: string;
|
|
909
|
-
/**
|
|
1219
|
+
/**
|
|
1220
|
+
* @format uuid
|
|
1221
|
+
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
1222
|
+
*/
|
|
910
1223
|
lago_wallet_id: string;
|
|
911
1224
|
/** Status */
|
|
912
1225
|
status: "pending" | "settled";
|
|
@@ -916,9 +1229,15 @@ export interface WalletTransactionObject {
|
|
|
916
1229
|
amount: number;
|
|
917
1230
|
/** @example 100 */
|
|
918
1231
|
credit_amount: number;
|
|
919
|
-
/**
|
|
1232
|
+
/**
|
|
1233
|
+
* @format date-time
|
|
1234
|
+
* @example "2022-09-14T16:35:31Z"
|
|
1235
|
+
*/
|
|
920
1236
|
settled_at?: string;
|
|
921
|
-
/**
|
|
1237
|
+
/**
|
|
1238
|
+
* @format date-time
|
|
1239
|
+
* @example "2022-09-14T16:35:31Z"
|
|
1240
|
+
*/
|
|
922
1241
|
created_at: string;
|
|
923
1242
|
}
|
|
924
1243
|
export interface WalletTransaction {
|
|
@@ -929,7 +1248,10 @@ export interface WalletTransactions {
|
|
|
929
1248
|
}
|
|
930
1249
|
export interface WalletTransactionInput {
|
|
931
1250
|
wallet_transaction: {
|
|
932
|
-
/**
|
|
1251
|
+
/**
|
|
1252
|
+
* @format uuid
|
|
1253
|
+
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
1254
|
+
*/
|
|
933
1255
|
wallet_id: string;
|
|
934
1256
|
/** @example 100 */
|
|
935
1257
|
paid_credits?: number;
|
|
@@ -938,7 +1260,10 @@ export interface WalletTransactionInput {
|
|
|
938
1260
|
};
|
|
939
1261
|
}
|
|
940
1262
|
export interface CreditNoteItemObject {
|
|
941
|
-
/**
|
|
1263
|
+
/**
|
|
1264
|
+
* @format uuid
|
|
1265
|
+
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
1266
|
+
*/
|
|
942
1267
|
lago_id: string;
|
|
943
1268
|
/** @example 1220 */
|
|
944
1269
|
amount_cents: number;
|
|
@@ -947,17 +1272,26 @@ export interface CreditNoteItemObject {
|
|
|
947
1272
|
fee: FeeObject;
|
|
948
1273
|
}
|
|
949
1274
|
export interface CreditNoteObject {
|
|
950
|
-
/**
|
|
1275
|
+
/**
|
|
1276
|
+
* @format uuid
|
|
1277
|
+
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
1278
|
+
*/
|
|
951
1279
|
lago_id: string;
|
|
952
1280
|
/** @example 1234 */
|
|
953
1281
|
sequential_id: number;
|
|
954
1282
|
/** @example "123456789" */
|
|
955
1283
|
number: string;
|
|
956
|
-
/**
|
|
1284
|
+
/**
|
|
1285
|
+
* @format uuid
|
|
1286
|
+
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
1287
|
+
*/
|
|
957
1288
|
lago_invoice_id: string;
|
|
958
1289
|
/** @example "123456789" */
|
|
959
1290
|
invoice_number: string;
|
|
960
|
-
/**
|
|
1291
|
+
/**
|
|
1292
|
+
* @format date-time
|
|
1293
|
+
* @example "2022-09-14T16:35:31Z"
|
|
1294
|
+
*/
|
|
961
1295
|
issuing_date: string;
|
|
962
1296
|
/** Credit status */
|
|
963
1297
|
credit_status?: "available" | "consumed" | "voided";
|
|
@@ -991,9 +1325,15 @@ export interface CreditNoteObject {
|
|
|
991
1325
|
refund_amount_cents: number;
|
|
992
1326
|
/** @example "EUR" */
|
|
993
1327
|
refund_amount_currency: string;
|
|
994
|
-
/**
|
|
1328
|
+
/**
|
|
1329
|
+
* @format date-time
|
|
1330
|
+
* @example "2022-09-14T16:35:31Z"
|
|
1331
|
+
*/
|
|
995
1332
|
created_at: string;
|
|
996
|
-
/**
|
|
1333
|
+
/**
|
|
1334
|
+
* @format date-time
|
|
1335
|
+
* @example "2022-09-14T16:35:31Z"
|
|
1336
|
+
*/
|
|
997
1337
|
updated_at: string;
|
|
998
1338
|
/** @example "https://example.com" */
|
|
999
1339
|
file_url?: string;
|
|
@@ -1008,7 +1348,10 @@ export interface CreditNotes {
|
|
|
1008
1348
|
}
|
|
1009
1349
|
export interface CreditNoteInput {
|
|
1010
1350
|
credit_note: {
|
|
1011
|
-
/**
|
|
1351
|
+
/**
|
|
1352
|
+
* @format uuid
|
|
1353
|
+
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
1354
|
+
*/
|
|
1012
1355
|
invoice_id: string;
|
|
1013
1356
|
/** Reason */
|
|
1014
1357
|
reason: "duplicated_charge" | "product_unsatisfactory" | "order_change" | "order_cancellation" | "fraudulent_charge" | "other";
|
|
@@ -1019,7 +1362,10 @@ export interface CreditNoteInput {
|
|
|
1019
1362
|
/** @example 20 */
|
|
1020
1363
|
refund_amount_cents: number;
|
|
1021
1364
|
items: {
|
|
1022
|
-
/**
|
|
1365
|
+
/**
|
|
1366
|
+
* @format uuid
|
|
1367
|
+
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
1368
|
+
*/
|
|
1023
1369
|
fee_id: string;
|
|
1024
1370
|
/** @example 20 */
|
|
1025
1371
|
amount_cents: number;
|
|
@@ -1032,6 +1378,18 @@ export interface CreditNoteUpdateInput {
|
|
|
1032
1378
|
refund_status: "pending" | "succeeded" | "failed";
|
|
1033
1379
|
};
|
|
1034
1380
|
}
|
|
1381
|
+
export interface PaginationMeta {
|
|
1382
|
+
/** Current page */
|
|
1383
|
+
current_page: number;
|
|
1384
|
+
/** Next page */
|
|
1385
|
+
next_page?: number;
|
|
1386
|
+
/** Previous page */
|
|
1387
|
+
prev_page?: number;
|
|
1388
|
+
/** Total number of pages */
|
|
1389
|
+
total_pages: number;
|
|
1390
|
+
/** Total number of records */
|
|
1391
|
+
total_count: number;
|
|
1392
|
+
}
|
|
1035
1393
|
export interface ApiResponseBadRequest {
|
|
1036
1394
|
/**
|
|
1037
1395
|
* @format int32
|
|
@@ -1073,6 +1431,17 @@ export interface ApiResponseNotFound {
|
|
|
1073
1431
|
/** @example "object_not_found" */
|
|
1074
1432
|
code: string;
|
|
1075
1433
|
}
|
|
1434
|
+
export interface ApiResponseForbidden {
|
|
1435
|
+
/**
|
|
1436
|
+
* @format int32
|
|
1437
|
+
* @example 403
|
|
1438
|
+
*/
|
|
1439
|
+
status: number;
|
|
1440
|
+
/** @example "Forbidden" */
|
|
1441
|
+
error: string;
|
|
1442
|
+
/** @example "feature_unavailable" */
|
|
1443
|
+
code: string;
|
|
1444
|
+
}
|
|
1076
1445
|
export interface ApiResponseNotAllowed {
|
|
1077
1446
|
/**
|
|
1078
1447
|
* @format int32
|
|
@@ -1163,6 +1532,27 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
1163
1532
|
* @secure
|
|
1164
1533
|
*/
|
|
1165
1534
|
createBillableMetric: (data: BillableMetricInput, params?: RequestParams) => Promise<HttpResponse<BillableMetric, ApiResponseBadRequest | ApiResponseUnauthorized | ApiResponseUnprocessableEntity>>;
|
|
1535
|
+
/**
|
|
1536
|
+
* @description Find all billable metrics in certain organisation
|
|
1537
|
+
*
|
|
1538
|
+
* @tags billable_metrics
|
|
1539
|
+
* @name FindAllBillableMetrics
|
|
1540
|
+
* @summary Find Billable metrics
|
|
1541
|
+
* @request GET:/billable_metrics
|
|
1542
|
+
* @secure
|
|
1543
|
+
*/
|
|
1544
|
+
findAllBillableMetrics: (query?: {
|
|
1545
|
+
/**
|
|
1546
|
+
* Number of page
|
|
1547
|
+
* @example 2
|
|
1548
|
+
*/
|
|
1549
|
+
page?: number;
|
|
1550
|
+
/**
|
|
1551
|
+
* Number of records per page
|
|
1552
|
+
* @example 20
|
|
1553
|
+
*/
|
|
1554
|
+
per_page?: number;
|
|
1555
|
+
}, params?: RequestParams) => Promise<HttpResponse<BillableMetrics, ApiResponseUnauthorized>>;
|
|
1166
1556
|
/**
|
|
1167
1557
|
* @description Update an existing billable metric by code
|
|
1168
1558
|
*
|
|
@@ -1194,28 +1584,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
1194
1584
|
*/
|
|
1195
1585
|
destroyBillableMetric: (code: string, params?: RequestParams) => Promise<HttpResponse<BillableMetric, ApiResponseUnauthorized | ApiResponseNotFound>>;
|
|
1196
1586
|
/**
|
|
1197
|
-
* @description Find all billable
|
|
1198
|
-
*
|
|
1199
|
-
* @tags billable_metrics
|
|
1200
|
-
* @name FindAllBillableMetrics
|
|
1201
|
-
* @summary Find Billable metrics
|
|
1202
|
-
* @request GET:/billable_metrics/
|
|
1203
|
-
* @secure
|
|
1204
|
-
*/
|
|
1205
|
-
findAllBillableMetrics: (query?: {
|
|
1206
|
-
/**
|
|
1207
|
-
* Number of page
|
|
1208
|
-
* @example 2
|
|
1209
|
-
*/
|
|
1210
|
-
page?: number;
|
|
1211
|
-
/**
|
|
1212
|
-
* Number of records per page
|
|
1213
|
-
* @example 20
|
|
1214
|
-
*/
|
|
1215
|
-
per_page?: number;
|
|
1216
|
-
}, params?: RequestParams) => Promise<HttpResponse<BillableMetrics, ApiResponseUnauthorized>>;
|
|
1217
|
-
/**
|
|
1218
|
-
* @description Find all billable metric groups in certain organisation
|
|
1587
|
+
* @description Find all billable metric groups in certain organisation
|
|
1219
1588
|
*
|
|
1220
1589
|
* @tags billable_metrics
|
|
1221
1590
|
* @name FindAllBillableMetricGroups
|
|
@@ -1247,6 +1616,27 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
1247
1616
|
* @secure
|
|
1248
1617
|
*/
|
|
1249
1618
|
createAddOn: (data: AddOnInput, params?: RequestParams) => Promise<HttpResponse<AddOn, ApiResponseBadRequest | ApiResponseUnauthorized | ApiResponseUnprocessableEntity>>;
|
|
1619
|
+
/**
|
|
1620
|
+
* @description Find all add-ons in certain organisation
|
|
1621
|
+
*
|
|
1622
|
+
* @tags add_ons
|
|
1623
|
+
* @name FindAllAddOns
|
|
1624
|
+
* @summary Find add-ons
|
|
1625
|
+
* @request GET:/add_ons
|
|
1626
|
+
* @secure
|
|
1627
|
+
*/
|
|
1628
|
+
findAllAddOns: (query?: {
|
|
1629
|
+
/**
|
|
1630
|
+
* Number of page
|
|
1631
|
+
* @example 2
|
|
1632
|
+
*/
|
|
1633
|
+
page?: number;
|
|
1634
|
+
/**
|
|
1635
|
+
* Number of records per page
|
|
1636
|
+
* @example 20
|
|
1637
|
+
*/
|
|
1638
|
+
per_page?: number;
|
|
1639
|
+
}, params?: RequestParams) => Promise<HttpResponse<AddOns, ApiResponseUnauthorized>>;
|
|
1250
1640
|
/**
|
|
1251
1641
|
* @description Update an existing add-on by code
|
|
1252
1642
|
*
|
|
@@ -1277,27 +1667,6 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
1277
1667
|
* @secure
|
|
1278
1668
|
*/
|
|
1279
1669
|
destroyAddOn: (code: string, params?: RequestParams) => Promise<HttpResponse<AddOn, ApiResponseUnauthorized | ApiResponseNotFound>>;
|
|
1280
|
-
/**
|
|
1281
|
-
* @description Find all add-ons in certain organisation
|
|
1282
|
-
*
|
|
1283
|
-
* @tags add_ons
|
|
1284
|
-
* @name FindAllAddOns
|
|
1285
|
-
* @summary Find add-ons
|
|
1286
|
-
* @request GET:/add_ons/
|
|
1287
|
-
* @secure
|
|
1288
|
-
*/
|
|
1289
|
-
findAllAddOns: (query?: {
|
|
1290
|
-
/**
|
|
1291
|
-
* Number of page
|
|
1292
|
-
* @example 2
|
|
1293
|
-
*/
|
|
1294
|
-
page?: number;
|
|
1295
|
-
/**
|
|
1296
|
-
* Number of records per page
|
|
1297
|
-
* @example 20
|
|
1298
|
-
*/
|
|
1299
|
-
per_page?: number;
|
|
1300
|
-
}, params?: RequestParams) => Promise<HttpResponse<AddOns, ApiResponseUnauthorized>>;
|
|
1301
1670
|
};
|
|
1302
1671
|
appliedAddOns: {
|
|
1303
1672
|
/**
|
|
@@ -1322,6 +1691,27 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
1322
1691
|
* @secure
|
|
1323
1692
|
*/
|
|
1324
1693
|
createCoupon: (data: CouponInput, params?: RequestParams) => Promise<HttpResponse<Coupon, ApiResponseBadRequest | ApiResponseUnauthorized | ApiResponseUnprocessableEntity>>;
|
|
1694
|
+
/**
|
|
1695
|
+
* @description Find all coupons in certain organisation
|
|
1696
|
+
*
|
|
1697
|
+
* @tags coupons
|
|
1698
|
+
* @name FindAllCoupons
|
|
1699
|
+
* @summary Find Coupons
|
|
1700
|
+
* @request GET:/coupons
|
|
1701
|
+
* @secure
|
|
1702
|
+
*/
|
|
1703
|
+
findAllCoupons: (query?: {
|
|
1704
|
+
/**
|
|
1705
|
+
* Number of page
|
|
1706
|
+
* @example 2
|
|
1707
|
+
*/
|
|
1708
|
+
page?: number;
|
|
1709
|
+
/**
|
|
1710
|
+
* Number of records per page
|
|
1711
|
+
* @example 20
|
|
1712
|
+
*/
|
|
1713
|
+
per_page?: number;
|
|
1714
|
+
}, params?: RequestParams) => Promise<HttpResponse<Coupons, ApiResponseUnauthorized>>;
|
|
1325
1715
|
/**
|
|
1326
1716
|
* @description Update an existing coupon by code
|
|
1327
1717
|
*
|
|
@@ -1352,27 +1742,6 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
1352
1742
|
* @secure
|
|
1353
1743
|
*/
|
|
1354
1744
|
destroyCoupon: (code: string, params?: RequestParams) => Promise<HttpResponse<Coupon, ApiResponseUnauthorized | ApiResponseNotFound>>;
|
|
1355
|
-
/**
|
|
1356
|
-
* @description Find all coupons in certain organisation
|
|
1357
|
-
*
|
|
1358
|
-
* @tags coupons
|
|
1359
|
-
* @name FindAllCoupons
|
|
1360
|
-
* @summary Find Coupons
|
|
1361
|
-
* @request GET:/coupons/
|
|
1362
|
-
* @secure
|
|
1363
|
-
*/
|
|
1364
|
-
findAllCoupons: (query?: {
|
|
1365
|
-
/**
|
|
1366
|
-
* Number of page
|
|
1367
|
-
* @example 2
|
|
1368
|
-
*/
|
|
1369
|
-
page?: number;
|
|
1370
|
-
/**
|
|
1371
|
-
* Number of records per page
|
|
1372
|
-
* @example 20
|
|
1373
|
-
*/
|
|
1374
|
-
per_page?: number;
|
|
1375
|
-
}, params?: RequestParams) => Promise<HttpResponse<Coupons, ApiResponseUnauthorized>>;
|
|
1376
1745
|
};
|
|
1377
1746
|
appliedCoupons: {
|
|
1378
1747
|
/**
|
|
@@ -1391,7 +1760,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
1391
1760
|
* @tags coupons
|
|
1392
1761
|
* @name FindAllAppliedCoupons
|
|
1393
1762
|
* @summary Find Applied Coupons
|
|
1394
|
-
* @request GET:/applied_coupons
|
|
1763
|
+
* @request GET:/applied_coupons
|
|
1395
1764
|
* @secure
|
|
1396
1765
|
*/
|
|
1397
1766
|
findAllAppliedCoupons: (query?: {
|
|
@@ -1421,7 +1790,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
1421
1790
|
* @tags organizations
|
|
1422
1791
|
* @name UpdateOrganization
|
|
1423
1792
|
* @summary Update an existing Organization
|
|
1424
|
-
* @request PUT:/organizations
|
|
1793
|
+
* @request PUT:/organizations
|
|
1425
1794
|
* @secure
|
|
1426
1795
|
*/
|
|
1427
1796
|
updateOrganization: (data: OrganizationInput, params?: RequestParams) => Promise<HttpResponse<Organization, ApiResponseBadRequest | ApiResponseUnauthorized | ApiResponseUnprocessableEntity>>;
|
|
@@ -1437,6 +1806,27 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
1437
1806
|
* @secure
|
|
1438
1807
|
*/
|
|
1439
1808
|
createCustomer: (data: CustomerInput, params?: RequestParams) => Promise<HttpResponse<Customer, ApiResponseBadRequest | ApiResponseUnauthorized | ApiResponseUnprocessableEntity>>;
|
|
1809
|
+
/**
|
|
1810
|
+
* @description Find all customers in certain organisation
|
|
1811
|
+
*
|
|
1812
|
+
* @tags customers
|
|
1813
|
+
* @name FindAllCustomers
|
|
1814
|
+
* @summary Find customers
|
|
1815
|
+
* @request GET:/customers
|
|
1816
|
+
* @secure
|
|
1817
|
+
*/
|
|
1818
|
+
findAllCustomers: (query?: {
|
|
1819
|
+
/**
|
|
1820
|
+
* Number of page
|
|
1821
|
+
* @example 2
|
|
1822
|
+
*/
|
|
1823
|
+
page?: number;
|
|
1824
|
+
/**
|
|
1825
|
+
* Number of records per page
|
|
1826
|
+
* @example 20
|
|
1827
|
+
*/
|
|
1828
|
+
per_page?: number;
|
|
1829
|
+
}, params?: RequestParams) => Promise<HttpResponse<Customers, ApiResponseUnauthorized>>;
|
|
1440
1830
|
/**
|
|
1441
1831
|
* @description Return a single customer
|
|
1442
1832
|
*
|
|
@@ -1474,36 +1864,30 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
1474
1864
|
external_subscription_id: string;
|
|
1475
1865
|
}, params?: RequestParams) => Promise<HttpResponse<CustomerUsage, ApiResponseUnauthorized | ApiResponseNotFound>>;
|
|
1476
1866
|
/**
|
|
1477
|
-
* @description
|
|
1867
|
+
* @description Get customer portal URL
|
|
1478
1868
|
*
|
|
1479
1869
|
* @tags customers
|
|
1480
|
-
* @name
|
|
1481
|
-
* @summary
|
|
1482
|
-
* @request
|
|
1870
|
+
* @name GetCustomerPortalUrl
|
|
1871
|
+
* @summary Get customer portal URL
|
|
1872
|
+
* @request GET:/customers/{customer_external_id}/portal_url
|
|
1483
1873
|
* @secure
|
|
1484
1874
|
*/
|
|
1485
|
-
|
|
1875
|
+
getCustomerPortalUrl: (customerExternalId: string, params?: RequestParams) => Promise<HttpResponse<{
|
|
1876
|
+
customer: {
|
|
1877
|
+
/** @example "https://app.lago.com/customer-portal/abc/" */
|
|
1878
|
+
portal_url: string;
|
|
1879
|
+
};
|
|
1880
|
+
}, ApiResponseUnauthorized | ApiResponseNotFound | ApiResponseForbidden>>;
|
|
1486
1881
|
/**
|
|
1487
|
-
* @description
|
|
1882
|
+
* @description Delete customer's appplied coupon
|
|
1488
1883
|
*
|
|
1489
1884
|
* @tags customers
|
|
1490
|
-
* @name
|
|
1491
|
-
* @summary
|
|
1492
|
-
* @request
|
|
1885
|
+
* @name DeleteAppliedCoupon
|
|
1886
|
+
* @summary Delete customer's appplied coupon
|
|
1887
|
+
* @request DELETE:/customers/{customer_external_id}/applied_coupons/{applied_coupon_id}
|
|
1493
1888
|
* @secure
|
|
1494
1889
|
*/
|
|
1495
|
-
|
|
1496
|
-
/**
|
|
1497
|
-
* Number of page
|
|
1498
|
-
* @example 2
|
|
1499
|
-
*/
|
|
1500
|
-
page?: number;
|
|
1501
|
-
/**
|
|
1502
|
-
* Number of records per page
|
|
1503
|
-
* @example 20
|
|
1504
|
-
*/
|
|
1505
|
-
per_page?: number;
|
|
1506
|
-
}, params?: RequestParams) => Promise<HttpResponse<Customers, ApiResponseUnauthorized>>;
|
|
1890
|
+
deleteAppliedCoupon: (customerExternalId: string, appliedCouponId: string, params?: RequestParams) => Promise<HttpResponse<AppliedCoupon, ApiResponseUnauthorized | ApiResponseNotFound>>;
|
|
1507
1891
|
};
|
|
1508
1892
|
events: {
|
|
1509
1893
|
/**
|
|
@@ -1536,6 +1920,16 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
1536
1920
|
* @secure
|
|
1537
1921
|
*/
|
|
1538
1922
|
findEvent: (id: string, params?: RequestParams) => Promise<HttpResponse<Event, ApiResponseUnauthorized | ApiResponseNotFound>>;
|
|
1923
|
+
/**
|
|
1924
|
+
* @description Estimate the fees that would be created after reception of an event for a billable metric attached to one or multiple instant charges
|
|
1925
|
+
*
|
|
1926
|
+
* @tags events
|
|
1927
|
+
* @name EventEstimateFees
|
|
1928
|
+
* @summary Estimate fees for an instant charge
|
|
1929
|
+
* @request POST:/events/estimate_fees
|
|
1930
|
+
* @secure
|
|
1931
|
+
*/
|
|
1932
|
+
eventEstimateFees: (data: EventEstimateFeesInput, params?: RequestParams) => Promise<HttpResponse<Fees, ApiResponseBadRequest | ApiResponseUnauthorized | ApiResponseUnprocessableEntity | ApiResponseNotFound>>;
|
|
1539
1933
|
};
|
|
1540
1934
|
plans: {
|
|
1541
1935
|
/**
|
|
@@ -1548,6 +1942,27 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
1548
1942
|
* @secure
|
|
1549
1943
|
*/
|
|
1550
1944
|
createPlan: (data: PlanInput, params?: RequestParams) => Promise<HttpResponse<Plan, ApiResponseBadRequest | ApiResponseUnauthorized | ApiResponseUnprocessableEntity | ApiResponseNotFound>>;
|
|
1945
|
+
/**
|
|
1946
|
+
* @description Find all plans in certain organisation
|
|
1947
|
+
*
|
|
1948
|
+
* @tags plans
|
|
1949
|
+
* @name FindAllPlans
|
|
1950
|
+
* @summary Find plans
|
|
1951
|
+
* @request GET:/plans
|
|
1952
|
+
* @secure
|
|
1953
|
+
*/
|
|
1954
|
+
findAllPlans: (query?: {
|
|
1955
|
+
/**
|
|
1956
|
+
* Number of page
|
|
1957
|
+
* @example 2
|
|
1958
|
+
*/
|
|
1959
|
+
page?: number;
|
|
1960
|
+
/**
|
|
1961
|
+
* Number of records per page
|
|
1962
|
+
* @example 20
|
|
1963
|
+
*/
|
|
1964
|
+
per_page?: number;
|
|
1965
|
+
}, params?: RequestParams) => Promise<HttpResponse<Plans, ApiResponseUnauthorized>>;
|
|
1551
1966
|
/**
|
|
1552
1967
|
* @description Update an existing plan by code
|
|
1553
1968
|
*
|
|
@@ -1578,16 +1993,28 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
1578
1993
|
* @secure
|
|
1579
1994
|
*/
|
|
1580
1995
|
destroyPlan: (code: string, params?: RequestParams) => Promise<HttpResponse<Plan, ApiResponseUnauthorized | ApiResponseNotFound>>;
|
|
1996
|
+
};
|
|
1997
|
+
subscriptions: {
|
|
1581
1998
|
/**
|
|
1582
|
-
* @description
|
|
1999
|
+
* @description Assign a plan to a customer
|
|
1583
2000
|
*
|
|
1584
|
-
* @tags
|
|
1585
|
-
* @name
|
|
1586
|
-
* @summary
|
|
1587
|
-
* @request
|
|
2001
|
+
* @tags subscriptions
|
|
2002
|
+
* @name CreateSubscription
|
|
2003
|
+
* @summary Assign a plan to a customer
|
|
2004
|
+
* @request POST:/subscriptions
|
|
1588
2005
|
* @secure
|
|
1589
2006
|
*/
|
|
1590
|
-
|
|
2007
|
+
createSubscription: (data: SubscriptionCreateInput, params?: RequestParams) => Promise<HttpResponse<Subscription, ApiResponseBadRequest | ApiResponseUnauthorized | ApiResponseUnprocessableEntity | ApiResponseNotFound>>;
|
|
2008
|
+
/**
|
|
2009
|
+
* @description Find all suscriptions for certain customer
|
|
2010
|
+
*
|
|
2011
|
+
* @tags subscriptions
|
|
2012
|
+
* @name FindAllSubscriptions
|
|
2013
|
+
* @summary Find subscriptions
|
|
2014
|
+
* @request GET:/subscriptions
|
|
2015
|
+
* @secure
|
|
2016
|
+
*/
|
|
2017
|
+
findAllSubscriptions: (query: {
|
|
1591
2018
|
/**
|
|
1592
2019
|
* Number of page
|
|
1593
2020
|
* @example 2
|
|
@@ -1598,19 +2025,12 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
1598
2025
|
* @example 20
|
|
1599
2026
|
*/
|
|
1600
2027
|
per_page?: number;
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
* @tags subscriptions
|
|
1608
|
-
* @name CreateSubscription
|
|
1609
|
-
* @summary Assign a plan to a customer
|
|
1610
|
-
* @request POST:/subscriptions
|
|
1611
|
-
* @secure
|
|
1612
|
-
*/
|
|
1613
|
-
createSubscription: (data: SubscriptionCreateInput, params?: RequestParams) => Promise<HttpResponse<Subscription, ApiResponseBadRequest | ApiResponseUnauthorized | ApiResponseUnprocessableEntity | ApiResponseNotFound>>;
|
|
2028
|
+
/**
|
|
2029
|
+
* External customer ID
|
|
2030
|
+
* @example "12345"
|
|
2031
|
+
*/
|
|
2032
|
+
external_customer_id: string;
|
|
2033
|
+
}, params?: RequestParams) => Promise<HttpResponse<Subscriptions, ApiResponseUnauthorized | ApiResponseNotFound>>;
|
|
1614
2034
|
/**
|
|
1615
2035
|
* @description Update an existing subscription by external ID
|
|
1616
2036
|
*
|
|
@@ -1631,16 +2051,30 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
1631
2051
|
* @secure
|
|
1632
2052
|
*/
|
|
1633
2053
|
destroySubscription: (externalId: string, params?: RequestParams) => Promise<HttpResponse<Subscription, ApiResponseUnauthorized | ApiResponseNotFound | ApiResponseNotAllowed>>;
|
|
2054
|
+
};
|
|
2055
|
+
webhooks: {
|
|
1634
2056
|
/**
|
|
1635
|
-
* @description
|
|
2057
|
+
* @description Webhook public key
|
|
1636
2058
|
*
|
|
1637
|
-
* @tags
|
|
1638
|
-
* @name
|
|
1639
|
-
* @summary
|
|
1640
|
-
* @request GET:/
|
|
2059
|
+
* @tags webhooks
|
|
2060
|
+
* @name FetchPublicKey
|
|
2061
|
+
* @summary Fetch webhook public key
|
|
2062
|
+
* @request GET:/webhooks/public_key
|
|
1641
2063
|
* @secure
|
|
1642
2064
|
*/
|
|
1643
|
-
|
|
2065
|
+
fetchPublicKey: (params?: RequestParams) => Promise<HttpResponse<string, ApiResponseUnauthorized>>;
|
|
2066
|
+
};
|
|
2067
|
+
invoices: {
|
|
2068
|
+
/**
|
|
2069
|
+
* @description Find all invoices in certain organisation
|
|
2070
|
+
*
|
|
2071
|
+
* @tags invoices
|
|
2072
|
+
* @name FindAllInvoices
|
|
2073
|
+
* @summary Find all invoices
|
|
2074
|
+
* @request GET:/invoices
|
|
2075
|
+
* @secure
|
|
2076
|
+
*/
|
|
2077
|
+
findAllInvoices: (query?: {
|
|
1644
2078
|
/**
|
|
1645
2079
|
* Number of page
|
|
1646
2080
|
* @example 2
|
|
@@ -1655,22 +2089,22 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
1655
2089
|
* External customer ID
|
|
1656
2090
|
* @example "12345"
|
|
1657
2091
|
*/
|
|
1658
|
-
external_customer_id
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
|
|
2092
|
+
external_customer_id?: string;
|
|
2093
|
+
/**
|
|
2094
|
+
* Date from
|
|
2095
|
+
* @format date
|
|
2096
|
+
* @example "2022-07-08"
|
|
2097
|
+
*/
|
|
2098
|
+
issuing_date_from?: string;
|
|
2099
|
+
/**
|
|
2100
|
+
* Date to
|
|
2101
|
+
* @format date
|
|
2102
|
+
* @example "2022-08-09"
|
|
2103
|
+
*/
|
|
2104
|
+
issuing_date_to?: string;
|
|
2105
|
+
/** Status */
|
|
2106
|
+
status?: "draft" | "finalized";
|
|
2107
|
+
}, params?: RequestParams) => Promise<HttpResponse<Invoices, ApiResponseUnauthorized>>;
|
|
1674
2108
|
/**
|
|
1675
2109
|
* @description Update an existing invoice
|
|
1676
2110
|
*
|
|
@@ -1731,16 +2165,38 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
1731
2165
|
* @secure
|
|
1732
2166
|
*/
|
|
1733
2167
|
finalizeInvoice: (id: string, params?: RequestParams) => Promise<HttpResponse<Invoice, ApiResponseUnauthorized | ApiResponseNotFound>>;
|
|
2168
|
+
};
|
|
2169
|
+
fees: {
|
|
1734
2170
|
/**
|
|
1735
|
-
* @description
|
|
2171
|
+
* @description Return a single fee
|
|
1736
2172
|
*
|
|
1737
|
-
* @tags
|
|
1738
|
-
* @name
|
|
1739
|
-
* @summary Find
|
|
1740
|
-
* @request GET:/
|
|
2173
|
+
* @tags fees
|
|
2174
|
+
* @name FindFee
|
|
2175
|
+
* @summary Find fee by ID
|
|
2176
|
+
* @request GET:/fees/{id}
|
|
1741
2177
|
* @secure
|
|
1742
2178
|
*/
|
|
1743
|
-
|
|
2179
|
+
findFee: (id: string, params?: RequestParams) => Promise<HttpResponse<FeeObject, ApiResponseUnauthorized | ApiResponseNotFound>>;
|
|
2180
|
+
/**
|
|
2181
|
+
* @description Update an existing fee
|
|
2182
|
+
*
|
|
2183
|
+
* @tags fees
|
|
2184
|
+
* @name UpdateFee
|
|
2185
|
+
* @summary Update an existing fee
|
|
2186
|
+
* @request PUT:/fees/{id}
|
|
2187
|
+
* @secure
|
|
2188
|
+
*/
|
|
2189
|
+
updateFee: (id: string, data: FeeUpdateInput, params?: RequestParams) => Promise<HttpResponse<FeeObject, ApiResponseBadRequest | ApiResponseUnauthorized | ApiResponseUnprocessableEntity | ApiResponseNotFound>>;
|
|
2190
|
+
/**
|
|
2191
|
+
* @description Find all fees of an organization and filter them
|
|
2192
|
+
*
|
|
2193
|
+
* @tags fees
|
|
2194
|
+
* @name FindAllFees
|
|
2195
|
+
* @summary Find all fees
|
|
2196
|
+
* @request GET:/fees
|
|
2197
|
+
* @secure
|
|
2198
|
+
*/
|
|
2199
|
+
findAllFees: (query?: {
|
|
1744
2200
|
/**
|
|
1745
2201
|
* Number of page
|
|
1746
2202
|
* @example 2
|
|
@@ -1757,33 +2213,79 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
1757
2213
|
*/
|
|
1758
2214
|
external_customer_id?: string;
|
|
1759
2215
|
/**
|
|
1760
|
-
*
|
|
1761
|
-
* @example "
|
|
2216
|
+
* External subscription ID
|
|
2217
|
+
* @example "12345"
|
|
1762
2218
|
*/
|
|
1763
|
-
|
|
2219
|
+
external_subscription_id?: string;
|
|
1764
2220
|
/**
|
|
1765
|
-
*
|
|
1766
|
-
* @example "
|
|
2221
|
+
* Amount currency
|
|
2222
|
+
* @example "EUR"
|
|
1767
2223
|
*/
|
|
1768
|
-
|
|
2224
|
+
currency?: string;
|
|
1769
2225
|
/**
|
|
1770
|
-
*
|
|
1771
|
-
* @example "
|
|
2226
|
+
* Fee type
|
|
2227
|
+
* @example "charge"
|
|
1772
2228
|
*/
|
|
1773
|
-
|
|
1774
|
-
|
|
1775
|
-
|
|
1776
|
-
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
|
|
1781
|
-
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
|
|
2229
|
+
fee_type?: "charge" | "add_on" | "subscription" | "credit" | "instant_charge";
|
|
2230
|
+
/**
|
|
2231
|
+
* Code of the source billable metric
|
|
2232
|
+
* @example "bm_code"
|
|
2233
|
+
*/
|
|
2234
|
+
billable_metric_code?: string;
|
|
2235
|
+
/**
|
|
2236
|
+
* Payment status
|
|
2237
|
+
* @example "succeeded"
|
|
2238
|
+
*/
|
|
2239
|
+
payment_status?: "pending" | "succeeded" | "failed" | "refunded";
|
|
2240
|
+
/**
|
|
2241
|
+
* Creation datetime from
|
|
2242
|
+
* @format date-time
|
|
2243
|
+
* @example "2023-03-28T12:21:51Z"
|
|
2244
|
+
*/
|
|
2245
|
+
created_at_from?: string;
|
|
2246
|
+
/**
|
|
2247
|
+
* Creation date to
|
|
2248
|
+
* @format date-time
|
|
2249
|
+
* @example "2023-03-28T12:21:51Z"
|
|
2250
|
+
*/
|
|
2251
|
+
created_at_to?: string;
|
|
2252
|
+
/**
|
|
2253
|
+
* Payment succees date from
|
|
2254
|
+
* @format date-time
|
|
2255
|
+
* @example "2023-03-28T12:21:51Z"
|
|
2256
|
+
*/
|
|
2257
|
+
succeeded_at_from?: string;
|
|
2258
|
+
/**
|
|
2259
|
+
* Payment succees date to
|
|
2260
|
+
* @format date-time
|
|
2261
|
+
* @example "2023-03-28T12:21:51Z"
|
|
2262
|
+
*/
|
|
2263
|
+
succeeded_at_to?: string;
|
|
2264
|
+
/**
|
|
2265
|
+
* Payment failed date from
|
|
2266
|
+
* @format date-time
|
|
2267
|
+
* @example "2023-03-28T12:21:51Z"
|
|
2268
|
+
*/
|
|
2269
|
+
failed_at_from?: string;
|
|
2270
|
+
/**
|
|
2271
|
+
* Payment failed date to
|
|
2272
|
+
* @format date-time
|
|
2273
|
+
* @example "2023-03-28T12:21:51Z"
|
|
2274
|
+
*/
|
|
2275
|
+
failed_at_to?: string;
|
|
2276
|
+
/**
|
|
2277
|
+
* Payment refund date from
|
|
2278
|
+
* @format date-time
|
|
2279
|
+
* @example "2023-03-28T12:21:51Z"
|
|
2280
|
+
*/
|
|
2281
|
+
refunded_at_from?: string;
|
|
2282
|
+
/**
|
|
2283
|
+
* Payment refund date to
|
|
2284
|
+
* @format date-time
|
|
2285
|
+
* @example "2023-03-28T12:21:51Z"
|
|
2286
|
+
*/
|
|
2287
|
+
refunded_at_to?: string;
|
|
2288
|
+
}, params?: RequestParams) => Promise<HttpResponse<FeesPaginated, ApiResponseUnauthorized | ApiResponseUnprocessableEntity>>;
|
|
1787
2289
|
};
|
|
1788
2290
|
wallets: {
|
|
1789
2291
|
/**
|
|
@@ -1796,6 +2298,32 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
1796
2298
|
* @secure
|
|
1797
2299
|
*/
|
|
1798
2300
|
createWallet: (data: WalletInput, params?: RequestParams) => Promise<HttpResponse<Wallet, ApiResponseBadRequest | ApiResponseUnauthorized | ApiResponseUnprocessableEntity>>;
|
|
2301
|
+
/**
|
|
2302
|
+
* @description Find all wallets for certain customer
|
|
2303
|
+
*
|
|
2304
|
+
* @tags wallets
|
|
2305
|
+
* @name FindAllWallets
|
|
2306
|
+
* @summary Find wallets
|
|
2307
|
+
* @request GET:/wallets
|
|
2308
|
+
* @secure
|
|
2309
|
+
*/
|
|
2310
|
+
findAllWallets: (query: {
|
|
2311
|
+
/**
|
|
2312
|
+
* Number of page
|
|
2313
|
+
* @example 2
|
|
2314
|
+
*/
|
|
2315
|
+
page?: number;
|
|
2316
|
+
/**
|
|
2317
|
+
* Number of records per page
|
|
2318
|
+
* @example 20
|
|
2319
|
+
*/
|
|
2320
|
+
per_page?: number;
|
|
2321
|
+
/**
|
|
2322
|
+
* External customer ID
|
|
2323
|
+
* @example "12345"
|
|
2324
|
+
*/
|
|
2325
|
+
external_customer_id: string;
|
|
2326
|
+
}, params?: RequestParams) => Promise<HttpResponse<Wallets, ApiResponseUnauthorized>>;
|
|
1799
2327
|
/**
|
|
1800
2328
|
* @description Update an existing wallet
|
|
1801
2329
|
*
|
|
@@ -1826,32 +2354,6 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
1826
2354
|
* @secure
|
|
1827
2355
|
*/
|
|
1828
2356
|
destroyWallet: (id: string, params?: RequestParams) => Promise<HttpResponse<Wallet, ApiResponseUnauthorized | ApiResponseNotFound | ApiResponseNotAllowed>>;
|
|
1829
|
-
/**
|
|
1830
|
-
* @description Find all wallets for certain customer
|
|
1831
|
-
*
|
|
1832
|
-
* @tags wallets
|
|
1833
|
-
* @name FindAllWallets
|
|
1834
|
-
* @summary Find wallets
|
|
1835
|
-
* @request GET:/wallets/
|
|
1836
|
-
* @secure
|
|
1837
|
-
*/
|
|
1838
|
-
findAllWallets: (query: {
|
|
1839
|
-
/**
|
|
1840
|
-
* Number of page
|
|
1841
|
-
* @example 2
|
|
1842
|
-
*/
|
|
1843
|
-
page?: number;
|
|
1844
|
-
/**
|
|
1845
|
-
* Number of records per page
|
|
1846
|
-
* @example 20
|
|
1847
|
-
*/
|
|
1848
|
-
per_page?: number;
|
|
1849
|
-
/**
|
|
1850
|
-
* External customer ID
|
|
1851
|
-
* @example "12345"
|
|
1852
|
-
*/
|
|
1853
|
-
external_customer_id: string;
|
|
1854
|
-
}, params?: RequestParams) => Promise<HttpResponse<Wallets, ApiResponseUnauthorized>>;
|
|
1855
2357
|
/**
|
|
1856
2358
|
* @description Find all wallet transactions for certain wallet
|
|
1857
2359
|
*
|
|
@@ -1907,6 +2409,32 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
1907
2409
|
* @secure
|
|
1908
2410
|
*/
|
|
1909
2411
|
createCreditNote: (data: CreditNoteInput, params?: RequestParams) => Promise<HttpResponse<CreditNote, ApiResponseBadRequest | ApiResponseUnauthorized | ApiResponseUnprocessableEntity>>;
|
|
2412
|
+
/**
|
|
2413
|
+
* @description Find all credit notes in certain organisation
|
|
2414
|
+
*
|
|
2415
|
+
* @tags credit_notes
|
|
2416
|
+
* @name FindAllCreditNotes
|
|
2417
|
+
* @summary Find Credit notes
|
|
2418
|
+
* @request GET:/credit_notes
|
|
2419
|
+
* @secure
|
|
2420
|
+
*/
|
|
2421
|
+
findAllCreditNotes: (query?: {
|
|
2422
|
+
/**
|
|
2423
|
+
* Number of page
|
|
2424
|
+
* @example 2
|
|
2425
|
+
*/
|
|
2426
|
+
page?: number;
|
|
2427
|
+
/**
|
|
2428
|
+
* Number of records per page
|
|
2429
|
+
* @example 20
|
|
2430
|
+
*/
|
|
2431
|
+
per_page?: number;
|
|
2432
|
+
/**
|
|
2433
|
+
* External customer ID
|
|
2434
|
+
* @example "12345"
|
|
2435
|
+
*/
|
|
2436
|
+
external_customer_id?: string;
|
|
2437
|
+
}, params?: RequestParams) => Promise<HttpResponse<CreditNotes, ApiResponseUnauthorized>>;
|
|
1910
2438
|
/**
|
|
1911
2439
|
* @description Update an existing credit note
|
|
1912
2440
|
*
|
|
@@ -1947,32 +2475,6 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
1947
2475
|
* @secure
|
|
1948
2476
|
*/
|
|
1949
2477
|
voidCreditNote: (id: string, params?: RequestParams) => Promise<HttpResponse<CreditNote, ApiResponseUnauthorized | ApiResponseNotFound | ApiResponseNotAllowed>>;
|
|
1950
|
-
/**
|
|
1951
|
-
* @description Find all credit notes in certain organisation
|
|
1952
|
-
*
|
|
1953
|
-
* @tags credit_notes
|
|
1954
|
-
* @name FindAllCreditNotes
|
|
1955
|
-
* @summary Find Credit notes
|
|
1956
|
-
* @request GET:/credit_notes/
|
|
1957
|
-
* @secure
|
|
1958
|
-
*/
|
|
1959
|
-
findAllCreditNotes: (query?: {
|
|
1960
|
-
/**
|
|
1961
|
-
* Number of page
|
|
1962
|
-
* @example 2
|
|
1963
|
-
*/
|
|
1964
|
-
page?: number;
|
|
1965
|
-
/**
|
|
1966
|
-
* Number of records per page
|
|
1967
|
-
* @example 20
|
|
1968
|
-
*/
|
|
1969
|
-
per_page?: number;
|
|
1970
|
-
/**
|
|
1971
|
-
* External customer ID
|
|
1972
|
-
* @example "12345"
|
|
1973
|
-
*/
|
|
1974
|
-
external_customer_id?: string;
|
|
1975
|
-
}, params?: RequestParams) => Promise<HttpResponse<CreditNotes, ApiResponseUnauthorized>>;
|
|
1976
2478
|
};
|
|
1977
2479
|
}
|
|
1978
2480
|
export {};
|