lago-javascript-client 1.15.0 → 1.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm/openapi/client.d.ts +278 -55
- package/esm/openapi/client.js +19 -1
- package/package.json +1 -1
- package/script/openapi/client.d.ts +278 -55
- package/script/openapi/client.js +19 -1
|
@@ -19,7 +19,10 @@ export interface AddOnBaseInput {
|
|
|
19
19
|
* @example 50000
|
|
20
20
|
*/
|
|
21
21
|
amount_cents?: number;
|
|
22
|
-
/**
|
|
22
|
+
/**
|
|
23
|
+
* The currency of the add-on.
|
|
24
|
+
* @example "USD"
|
|
25
|
+
*/
|
|
23
26
|
amount_currency?: Currency;
|
|
24
27
|
/**
|
|
25
28
|
* The description of the add-on.
|
|
@@ -62,7 +65,10 @@ export interface AddOnObject {
|
|
|
62
65
|
* @example 50000
|
|
63
66
|
*/
|
|
64
67
|
amount_cents: number;
|
|
65
|
-
/**
|
|
68
|
+
/**
|
|
69
|
+
* The currency of the add-on.
|
|
70
|
+
* @example "USD"
|
|
71
|
+
*/
|
|
66
72
|
amount_currency: Currency;
|
|
67
73
|
/**
|
|
68
74
|
* The description of the add-on.
|
|
@@ -185,8 +191,11 @@ export interface AppliedCouponInput {
|
|
|
185
191
|
* @example 2000
|
|
186
192
|
*/
|
|
187
193
|
amount_cents?: number | null;
|
|
188
|
-
/**
|
|
189
|
-
|
|
194
|
+
/**
|
|
195
|
+
* The currency of the coupon. This field is required only for coupon with `fixed_amount` type.
|
|
196
|
+
* @example "EUR"
|
|
197
|
+
*/
|
|
198
|
+
amount_currency?: Currency | null;
|
|
190
199
|
/**
|
|
191
200
|
* The percentage rate of the coupon. This field is required only for coupons with a `percentage` coupon type.
|
|
192
201
|
* @pattern ^[0-9]+.?[0-9]*$
|
|
@@ -244,8 +253,11 @@ export interface AppliedCouponObject {
|
|
|
244
253
|
* @example 50
|
|
245
254
|
*/
|
|
246
255
|
amount_cents_remaining?: number | null;
|
|
247
|
-
/**
|
|
248
|
-
|
|
256
|
+
/**
|
|
257
|
+
* The currency of the coupon. This field is required only for coupon with `fixed_amount` type.
|
|
258
|
+
* @example "EUR"
|
|
259
|
+
*/
|
|
260
|
+
amount_currency?: Currency | null;
|
|
249
261
|
/**
|
|
250
262
|
* The percentage rate of the coupon. This field is required only for coupons with a `percentage` coupon type.
|
|
251
263
|
* @pattern ^[0-9]+.?[0-9]*$
|
|
@@ -348,7 +360,10 @@ export interface BaseAppliedTax {
|
|
|
348
360
|
* @example 2000
|
|
349
361
|
*/
|
|
350
362
|
amount_cents?: number;
|
|
351
|
-
/**
|
|
363
|
+
/**
|
|
364
|
+
* Currency of the tax
|
|
365
|
+
* @example "USD"
|
|
366
|
+
*/
|
|
352
367
|
amount_currency?: Currency;
|
|
353
368
|
/**
|
|
354
369
|
* The date and time when the applied tax was created. It is expressed in UTC format according to the ISO 8601 datetime standard. This field provides the timestamp for the exact moment when the applied tax was initially created.
|
|
@@ -358,7 +373,7 @@ export interface BaseAppliedTax {
|
|
|
358
373
|
created_at?: string;
|
|
359
374
|
}
|
|
360
375
|
export interface BillableMetric {
|
|
361
|
-
billable_metric:
|
|
376
|
+
billable_metric: BillableMetricObjectExtended;
|
|
362
377
|
}
|
|
363
378
|
export interface BillableMetricObject {
|
|
364
379
|
/**
|
|
@@ -391,12 +406,27 @@ export interface BillableMetricObject {
|
|
|
391
406
|
* @example false
|
|
392
407
|
*/
|
|
393
408
|
recurring: boolean;
|
|
409
|
+
/**
|
|
410
|
+
* Refers to the numeric value or mathematical expression that will be rounded based on the calculated number of billing units. Possible values are `round`, `ceil` and `floor`.
|
|
411
|
+
* @example "round"
|
|
412
|
+
*/
|
|
413
|
+
rounding_function?: "ceil" | "floor" | "round" | null;
|
|
414
|
+
/**
|
|
415
|
+
* Specifies the number of decimal places to which the `rounding_function` will be rounded. It can be a positive or negative value.
|
|
416
|
+
* @example 2
|
|
417
|
+
*/
|
|
418
|
+
rounding_precision?: number | null;
|
|
394
419
|
/**
|
|
395
420
|
* Creation date of the billable metric.
|
|
396
421
|
* @format date-time
|
|
397
422
|
* @example "2022-09-14T16:35:31Z"
|
|
398
423
|
*/
|
|
399
424
|
created_at: string;
|
|
425
|
+
/**
|
|
426
|
+
* Expression used to calculate the event units. The expression is evalutated for each event and the result is then used to calculate the total aggregated units.
|
|
427
|
+
* @example "round((ended_at - started_at) * units)"
|
|
428
|
+
*/
|
|
429
|
+
expression?: string;
|
|
400
430
|
/**
|
|
401
431
|
* Property of the billable metric used for aggregating usage data. This field is not required for `count_agg`.
|
|
402
432
|
* @example "gb"
|
|
@@ -415,20 +445,40 @@ export interface BillableMetricObject {
|
|
|
415
445
|
filters?: BillableMetricFilterObject[];
|
|
416
446
|
/**
|
|
417
447
|
* Number of active subscriptions using this billable metric.
|
|
448
|
+
* @deprecated
|
|
418
449
|
* @example 4
|
|
419
450
|
*/
|
|
420
451
|
active_subscriptions_count: number;
|
|
421
452
|
/**
|
|
422
453
|
* Number of draft invoices for which this billable metric is listed as an invoice item.
|
|
454
|
+
* @deprecated
|
|
423
455
|
* @example 10
|
|
424
456
|
*/
|
|
425
457
|
draft_invoices_count: number;
|
|
426
458
|
/**
|
|
427
459
|
* Number of plans using this billable metric.
|
|
460
|
+
* @deprecated
|
|
428
461
|
* @example 4
|
|
429
462
|
*/
|
|
430
463
|
plans_count: number;
|
|
431
464
|
}
|
|
465
|
+
export type BillableMetricObjectExtended = BillableMetricObject & {
|
|
466
|
+
/**
|
|
467
|
+
* Number of active subscriptions using this billable metric.
|
|
468
|
+
* @example 4
|
|
469
|
+
*/
|
|
470
|
+
active_subscriptions_count?: number;
|
|
471
|
+
/**
|
|
472
|
+
* Number of draft invoices for which this billable metric is listed as an invoice item.
|
|
473
|
+
* @example 10
|
|
474
|
+
*/
|
|
475
|
+
draft_invoices_count?: number;
|
|
476
|
+
/**
|
|
477
|
+
* Number of plans using this billable metric.
|
|
478
|
+
* @example 4
|
|
479
|
+
*/
|
|
480
|
+
plans_count?: number;
|
|
481
|
+
};
|
|
432
482
|
export interface BillableMetricBaseInput {
|
|
433
483
|
/**
|
|
434
484
|
* Name of the billable metric.
|
|
@@ -454,6 +504,23 @@ export interface BillableMetricBaseInput {
|
|
|
454
504
|
* @example false
|
|
455
505
|
*/
|
|
456
506
|
recurring?: boolean;
|
|
507
|
+
/**
|
|
508
|
+
* Expression used to calculate the event units. The expression is evalutated for each event and the result is then used to calculate the total aggregated units.
|
|
509
|
+
* Accepted function are `ceil`, `concat` and `round` as well as `+`, `-`, `\` and `*` operations.
|
|
510
|
+
* Round is accepting an optional second parameter to specify the number of decimal.
|
|
511
|
+
* @example "round((ended_at - started_at) * units)"
|
|
512
|
+
*/
|
|
513
|
+
expression?: string | null;
|
|
514
|
+
/**
|
|
515
|
+
* Refers to the numeric value or mathematical expression that will be rounded based on the calculated number of billing units. Possible values are `round`, `ceil` and `floor`.
|
|
516
|
+
* @example "round"
|
|
517
|
+
*/
|
|
518
|
+
rounding_function?: "ceil" | "floor" | "round" | null;
|
|
519
|
+
/**
|
|
520
|
+
* Specifies the number of decimal places to which the `rounding_function` will be rounded. It can be a positive or negative value.
|
|
521
|
+
* @example 2
|
|
522
|
+
*/
|
|
523
|
+
rounding_precision?: number | null;
|
|
457
524
|
/**
|
|
458
525
|
* Property of the billable metric used for aggregating usage data. This field is not required for `count_agg`.
|
|
459
526
|
* @example "gb"
|
|
@@ -474,6 +541,42 @@ export interface BillableMetricBaseInput {
|
|
|
474
541
|
export interface BillableMetricCreateInput {
|
|
475
542
|
billable_metric: BillableMetricBaseInput;
|
|
476
543
|
}
|
|
544
|
+
export interface BillableMetricEvaluateExpressionInput {
|
|
545
|
+
/**
|
|
546
|
+
* Expression used to calculate the event units. The expression is evalutated for each event and the result is then used to calculate the total aggregated units.
|
|
547
|
+
* Accepted function are `ceil`, `concat` and `round` as well as `+`, `-`, `\` and `*` operations.
|
|
548
|
+
* Round is accepting an optional second parameter to specify the number of decimal.
|
|
549
|
+
* @example "round((ended_at - started_at) * units)"
|
|
550
|
+
*/
|
|
551
|
+
expression: string;
|
|
552
|
+
event: {
|
|
553
|
+
/**
|
|
554
|
+
* The code that identifies a targeted billable metric.
|
|
555
|
+
* @example "storage"
|
|
556
|
+
*/
|
|
557
|
+
code: string;
|
|
558
|
+
/**
|
|
559
|
+
* This field captures the Unix timestamp in seconds indicating the occurrence of the event in Coordinated Universal Time (UTC).
|
|
560
|
+
* If this timestamp is not provided, the API will automatically set it to the time of event reception.
|
|
561
|
+
* @example "1651240791"
|
|
562
|
+
*/
|
|
563
|
+
timestamp?: number | string;
|
|
564
|
+
/**
|
|
565
|
+
* This field represents additional properties associated with the event. They can be used when evaluating the expression.
|
|
566
|
+
* @example {"gb":10}
|
|
567
|
+
*/
|
|
568
|
+
properties: Record<string, string | number>;
|
|
569
|
+
};
|
|
570
|
+
}
|
|
571
|
+
export interface BillableMetricEvaluateExpressionResult {
|
|
572
|
+
expression_result: {
|
|
573
|
+
/**
|
|
574
|
+
* Result of evaluating the expression
|
|
575
|
+
* @example 1
|
|
576
|
+
*/
|
|
577
|
+
value: string | number;
|
|
578
|
+
};
|
|
579
|
+
}
|
|
477
580
|
/** Values used to apply differentiated pricing based on additional event properties. */
|
|
478
581
|
export interface BillableMetricFilterInput {
|
|
479
582
|
/**
|
|
@@ -776,8 +879,11 @@ export interface CouponBaseInput {
|
|
|
776
879
|
* @example 5000
|
|
777
880
|
*/
|
|
778
881
|
amount_cents?: number | null;
|
|
779
|
-
/**
|
|
780
|
-
|
|
882
|
+
/**
|
|
883
|
+
* The currency of the coupon. This field is required only for coupon with `fixed_amount` type.
|
|
884
|
+
* @example "USD"
|
|
885
|
+
*/
|
|
886
|
+
amount_currency?: Currency | null;
|
|
781
887
|
/**
|
|
782
888
|
* Indicates whether the coupon can be reused or not. If set to `true`, the coupon is reusable, meaning it can be applied multiple times to the same customer. If set to `false`, the coupon can only be used once and is not reusable. If not specified, this field is set to `true` by default.
|
|
783
889
|
* @example false
|
|
@@ -869,8 +975,11 @@ export interface CouponObject {
|
|
|
869
975
|
* @example 5000
|
|
870
976
|
*/
|
|
871
977
|
amount_cents?: number | null;
|
|
872
|
-
/**
|
|
873
|
-
|
|
978
|
+
/**
|
|
979
|
+
* The currency of the coupon. This field is required only for coupon with `fixed_amount` type.
|
|
980
|
+
* @example "USD"
|
|
981
|
+
*/
|
|
982
|
+
amount_currency?: Currency | null;
|
|
874
983
|
/**
|
|
875
984
|
* Indicates whether the coupon can be reused or not. If set to `true`, the coupon is reusable, meaning it can be applied multiple times to the same customer. If set to `false`, the coupon can only be used once and is not reusable. If not specified, this field is set to `true` by default.
|
|
876
985
|
* @example true
|
|
@@ -990,7 +1099,10 @@ export interface CreditNoteEstimated {
|
|
|
990
1099
|
* @example "LAG-1234"
|
|
991
1100
|
*/
|
|
992
1101
|
invoice_number: string;
|
|
993
|
-
/**
|
|
1102
|
+
/**
|
|
1103
|
+
* The currency of the credit note.
|
|
1104
|
+
* @example "EUR"
|
|
1105
|
+
*/
|
|
994
1106
|
currency: Currency;
|
|
995
1107
|
/**
|
|
996
1108
|
* The tax amount of the credit note, expressed in cents.
|
|
@@ -1070,7 +1182,10 @@ export interface CreditNoteEstimated {
|
|
|
1070
1182
|
* @example 2000
|
|
1071
1183
|
*/
|
|
1072
1184
|
amount_cents?: number;
|
|
1073
|
-
/**
|
|
1185
|
+
/**
|
|
1186
|
+
* Currency of the tax
|
|
1187
|
+
* @example "USD"
|
|
1188
|
+
*/
|
|
1074
1189
|
amount_currency?: Currency;
|
|
1075
1190
|
}[];
|
|
1076
1191
|
};
|
|
@@ -1087,7 +1202,10 @@ export interface CreditObject {
|
|
|
1087
1202
|
* @example 1200
|
|
1088
1203
|
*/
|
|
1089
1204
|
amount_cents: number;
|
|
1090
|
-
/**
|
|
1205
|
+
/**
|
|
1206
|
+
* The currency of the credit.
|
|
1207
|
+
* @example "EUR"
|
|
1208
|
+
*/
|
|
1091
1209
|
amount_currency: Currency;
|
|
1092
1210
|
/**
|
|
1093
1211
|
* Indicates whether the credit is applied on the amount before taxes (coupons) or after taxes (credit notes). This flag helps determine the order in which credits are applied to the invoice calculation
|
|
@@ -1153,7 +1271,10 @@ export interface CreditNoteItemObject {
|
|
|
1153
1271
|
* @example 100
|
|
1154
1272
|
*/
|
|
1155
1273
|
amount_cents: number;
|
|
1156
|
-
/**
|
|
1274
|
+
/**
|
|
1275
|
+
* The credit note's item currency.
|
|
1276
|
+
* @example "EUR"
|
|
1277
|
+
*/
|
|
1157
1278
|
amount_currency: Currency;
|
|
1158
1279
|
/** The fee object related to the credit note item. */
|
|
1159
1280
|
fee: FeeObject;
|
|
@@ -1221,7 +1342,10 @@ export interface CreditNoteObject {
|
|
|
1221
1342
|
* @example "Free text"
|
|
1222
1343
|
*/
|
|
1223
1344
|
description?: string | null;
|
|
1224
|
-
/**
|
|
1345
|
+
/**
|
|
1346
|
+
* The currency of the credit note.
|
|
1347
|
+
* @example "EUR"
|
|
1348
|
+
*/
|
|
1225
1349
|
currency: Currency;
|
|
1226
1350
|
/**
|
|
1227
1351
|
* The total amount of the credit note, expressed in cents.
|
|
@@ -1370,8 +1494,11 @@ export interface Address {
|
|
|
1370
1494
|
* @example "Woodland Hills"
|
|
1371
1495
|
*/
|
|
1372
1496
|
city?: string | null;
|
|
1373
|
-
/**
|
|
1374
|
-
|
|
1497
|
+
/**
|
|
1498
|
+
* Country code of the customer's billing address. Format must be ISO 3166 (alpha-2)
|
|
1499
|
+
* @example "US"
|
|
1500
|
+
*/
|
|
1501
|
+
country?: Country | null;
|
|
1375
1502
|
/**
|
|
1376
1503
|
* The state of the customer's billing address
|
|
1377
1504
|
* @example "CA"
|
|
@@ -1531,7 +1658,10 @@ export interface CustomerChargeUsageObject {
|
|
|
1531
1658
|
* @example 123
|
|
1532
1659
|
*/
|
|
1533
1660
|
amount_cents: number;
|
|
1534
|
-
/**
|
|
1661
|
+
/**
|
|
1662
|
+
* The currency of a usage item consumed by the customer.
|
|
1663
|
+
* @example "EUR"
|
|
1664
|
+
*/
|
|
1535
1665
|
amount_currency: Currency;
|
|
1536
1666
|
/** Object listing all the properties for a specific charge item. */
|
|
1537
1667
|
charge: {
|
|
@@ -1603,10 +1733,13 @@ export interface CustomerCreateInput {
|
|
|
1603
1733
|
* @example "Woodland Hills"
|
|
1604
1734
|
*/
|
|
1605
1735
|
city?: string | null;
|
|
1606
|
-
/**
|
|
1607
|
-
|
|
1736
|
+
/**
|
|
1737
|
+
* Country code of the customer's billing address. Format must be ISO 3166 (alpha-2)
|
|
1738
|
+
* @example "US"
|
|
1739
|
+
*/
|
|
1740
|
+
country?: Country | null;
|
|
1608
1741
|
/** Currency of the customer. Format must be ISO 4217 */
|
|
1609
|
-
currency?: Currency;
|
|
1742
|
+
currency?: Currency | null;
|
|
1610
1743
|
/**
|
|
1611
1744
|
* The email of the customer
|
|
1612
1745
|
* @format email
|
|
@@ -1670,7 +1803,7 @@ export interface CustomerCreateInput {
|
|
|
1670
1803
|
*/
|
|
1671
1804
|
tax_identification_number?: string | null;
|
|
1672
1805
|
/** The customer's timezone, used for billing purposes in their local time. Overrides the organization's timezone */
|
|
1673
|
-
timezone?: Timezone;
|
|
1806
|
+
timezone?: Timezone | null;
|
|
1674
1807
|
/**
|
|
1675
1808
|
* The custom website URL of the customer
|
|
1676
1809
|
* @example "http://hooli.com"
|
|
@@ -1827,10 +1960,16 @@ export type CustomerObject = {
|
|
|
1827
1960
|
* @example "Woodland Hills"
|
|
1828
1961
|
*/
|
|
1829
1962
|
city?: string | null;
|
|
1830
|
-
/**
|
|
1831
|
-
|
|
1832
|
-
|
|
1833
|
-
|
|
1963
|
+
/**
|
|
1964
|
+
* Country code of the customer's billing address. Format must be ISO 3166 (alpha-2)
|
|
1965
|
+
* @example "US"
|
|
1966
|
+
*/
|
|
1967
|
+
country?: Country | null;
|
|
1968
|
+
/**
|
|
1969
|
+
* Currency of the customer. Format must be ISO 4217
|
|
1970
|
+
* @example "USD"
|
|
1971
|
+
*/
|
|
1972
|
+
currency?: Currency | null;
|
|
1834
1973
|
/**
|
|
1835
1974
|
* The email of the customer
|
|
1836
1975
|
* @format email
|
|
@@ -1889,7 +2028,7 @@ export type CustomerObject = {
|
|
|
1889
2028
|
*/
|
|
1890
2029
|
tax_identification_number?: string | null;
|
|
1891
2030
|
/** The customer's timezone, used for billing purposes in their local time. Overrides the organization's timezone */
|
|
1892
|
-
timezone?: Timezone;
|
|
2031
|
+
timezone?: Timezone | null;
|
|
1893
2032
|
/**
|
|
1894
2033
|
* The custom website URL of the customer
|
|
1895
2034
|
* @example "http://hooli.com"
|
|
@@ -1974,7 +2113,10 @@ export interface CustomerUsageObject {
|
|
|
1974
2113
|
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
1975
2114
|
*/
|
|
1976
2115
|
lago_invoice_id?: string | null;
|
|
1977
|
-
/**
|
|
2116
|
+
/**
|
|
2117
|
+
* The currency of the customer's current usage.
|
|
2118
|
+
* @example "EUR"
|
|
2119
|
+
*/
|
|
1978
2120
|
currency?: Currency;
|
|
1979
2121
|
/**
|
|
1980
2122
|
* The amount in cents, tax excluded.
|
|
@@ -2203,7 +2345,10 @@ export interface FeeObject {
|
|
|
2203
2345
|
* @example "1.0212"
|
|
2204
2346
|
*/
|
|
2205
2347
|
precise_total_amount?: string;
|
|
2206
|
-
/**
|
|
2348
|
+
/**
|
|
2349
|
+
* The currency of this specific fee. It indicates the monetary unit in which the fee's cost is expressed.
|
|
2350
|
+
* @example "EUR"
|
|
2351
|
+
*/
|
|
2207
2352
|
amount_currency: Currency;
|
|
2208
2353
|
/**
|
|
2209
2354
|
* The cost of the tax associated with this specific fee.
|
|
@@ -2235,7 +2380,10 @@ export interface FeeObject {
|
|
|
2235
2380
|
* @example 120
|
|
2236
2381
|
*/
|
|
2237
2382
|
total_amount_cents: number;
|
|
2238
|
-
/**
|
|
2383
|
+
/**
|
|
2384
|
+
* The currency of this specific fee, including any applicable taxes.
|
|
2385
|
+
* @example "EUR"
|
|
2386
|
+
*/
|
|
2239
2387
|
total_amount_currency: Currency;
|
|
2240
2388
|
/**
|
|
2241
2389
|
* The number of events that have been sent and used to charge the customer. This field indicates the count or quantity of events that have been processed and considered in the charging process.
|
|
@@ -2542,7 +2690,10 @@ export interface GrossRevenueObject {
|
|
|
2542
2690
|
* @example 50000
|
|
2543
2691
|
*/
|
|
2544
2692
|
amount_cents: number;
|
|
2545
|
-
/**
|
|
2693
|
+
/**
|
|
2694
|
+
* The currency of revenue analytics. Format must be ISO 4217.
|
|
2695
|
+
* @example "USD"
|
|
2696
|
+
*/
|
|
2546
2697
|
currency: Currency;
|
|
2547
2698
|
/**
|
|
2548
2699
|
* Contains invoices count.
|
|
@@ -2702,7 +2853,10 @@ export interface MrrObject {
|
|
|
2702
2853
|
* @example 50000
|
|
2703
2854
|
*/
|
|
2704
2855
|
amount_cents?: number;
|
|
2705
|
-
/**
|
|
2856
|
+
/**
|
|
2857
|
+
* The currency of MRR analytics. Format must be ISO 4217.
|
|
2858
|
+
* @example "USD"
|
|
2859
|
+
*/
|
|
2706
2860
|
currency?: Currency;
|
|
2707
2861
|
}
|
|
2708
2862
|
export interface Mrrs {
|
|
@@ -2745,7 +2899,10 @@ export interface InvoiceCollectionObject {
|
|
|
2745
2899
|
* @example 50000
|
|
2746
2900
|
*/
|
|
2747
2901
|
amount_cents?: number;
|
|
2748
|
-
/**
|
|
2902
|
+
/**
|
|
2903
|
+
* The currency of revenue analytics. Format must be ISO 4217.
|
|
2904
|
+
* @example "USD"
|
|
2905
|
+
*/
|
|
2749
2906
|
currency?: Currency;
|
|
2750
2907
|
}
|
|
2751
2908
|
export interface InvoiceCollections {
|
|
@@ -2767,7 +2924,10 @@ export interface InvoicedUsageObject {
|
|
|
2767
2924
|
* @example 50000
|
|
2768
2925
|
*/
|
|
2769
2926
|
amount_cents: number;
|
|
2770
|
-
/**
|
|
2927
|
+
/**
|
|
2928
|
+
* The currency of revenue analytics. Format must be ISO 4217.
|
|
2929
|
+
* @example "USD"
|
|
2930
|
+
*/
|
|
2771
2931
|
currency: Currency;
|
|
2772
2932
|
}
|
|
2773
2933
|
export interface InvoicedUsages {
|
|
@@ -2864,7 +3024,10 @@ export type InvoiceObject = {
|
|
|
2864
3024
|
* @example "succeeded"
|
|
2865
3025
|
*/
|
|
2866
3026
|
payment_status: "pending" | "succeeded" | "failed";
|
|
2867
|
-
/**
|
|
3027
|
+
/**
|
|
3028
|
+
* The currency of the invoice issued.
|
|
3029
|
+
* @example "EUR"
|
|
3030
|
+
*/
|
|
2868
3031
|
currency: Currency;
|
|
2869
3032
|
/**
|
|
2870
3033
|
* The total sum of fees amount in cents. It calculates the cumulative amount of all the fees associated with the invoice, providing a consolidated value.
|
|
@@ -2964,7 +3127,10 @@ export interface InvoiceOneOffCreateInput {
|
|
|
2964
3127
|
* @example "hooli_1234"
|
|
2965
3128
|
*/
|
|
2966
3129
|
external_customer_id: string;
|
|
2967
|
-
/**
|
|
3130
|
+
/**
|
|
3131
|
+
* The currency of the invoice.
|
|
3132
|
+
* @example "EUR"
|
|
3133
|
+
*/
|
|
2968
3134
|
currency?: Currency;
|
|
2969
3135
|
fees: {
|
|
2970
3136
|
/**
|
|
@@ -3081,9 +3247,15 @@ export interface OrganizationObject {
|
|
|
3081
3247
|
* @example ["https://webhook.brex.com","https://webhook2.brex.com"]
|
|
3082
3248
|
*/
|
|
3083
3249
|
webhook_urls?: string[] | null;
|
|
3084
|
-
/**
|
|
3085
|
-
|
|
3086
|
-
|
|
3250
|
+
/**
|
|
3251
|
+
* The country of your organization.
|
|
3252
|
+
* @example "US"
|
|
3253
|
+
*/
|
|
3254
|
+
country?: Country | null;
|
|
3255
|
+
/**
|
|
3256
|
+
* The default currency of an organization.
|
|
3257
|
+
* @example "USD"
|
|
3258
|
+
*/
|
|
3087
3259
|
default_currency?: Currency;
|
|
3088
3260
|
/**
|
|
3089
3261
|
* The first line of your organization's billing address.
|
|
@@ -3151,7 +3323,10 @@ export interface OrganizationObject {
|
|
|
3151
3323
|
* @example "US123456789"
|
|
3152
3324
|
*/
|
|
3153
3325
|
tax_identification_number?: string | null;
|
|
3154
|
-
/**
|
|
3326
|
+
/**
|
|
3327
|
+
* Your organization's timezone, used for billing purposes in your own local time. Can be overwritten by the customer's timezone.
|
|
3328
|
+
* @example "America/New_York"
|
|
3329
|
+
*/
|
|
3155
3330
|
timezone?: Timezone;
|
|
3156
3331
|
/** The custom billing settings for your organization. */
|
|
3157
3332
|
billing_configuration: OrganizationBillingConfiguration;
|
|
@@ -3170,9 +3345,15 @@ export interface OrganizationUpdateInput {
|
|
|
3170
3345
|
* @example "https://webhook.brex.com"
|
|
3171
3346
|
*/
|
|
3172
3347
|
webhook_url?: string | null;
|
|
3173
|
-
/**
|
|
3174
|
-
|
|
3175
|
-
|
|
3348
|
+
/**
|
|
3349
|
+
* The country of your organization.
|
|
3350
|
+
* @example "US"
|
|
3351
|
+
*/
|
|
3352
|
+
country?: Country | null;
|
|
3353
|
+
/**
|
|
3354
|
+
* The default currency of an organization.
|
|
3355
|
+
* @example "USD"
|
|
3356
|
+
*/
|
|
3176
3357
|
default_currency?: Currency;
|
|
3177
3358
|
/**
|
|
3178
3359
|
* The first line of your organization's billing address.
|
|
@@ -3240,7 +3421,10 @@ export interface OrganizationUpdateInput {
|
|
|
3240
3421
|
* @example "US123456789"
|
|
3241
3422
|
*/
|
|
3242
3423
|
tax_identification_number?: string | null;
|
|
3243
|
-
/**
|
|
3424
|
+
/**
|
|
3425
|
+
* Your organization's timezone, used for billing purposes in your own local time. Can be overwritten by the customer's timezone.
|
|
3426
|
+
* @example "America/New_York"
|
|
3427
|
+
*/
|
|
3244
3428
|
timezone?: Timezone;
|
|
3245
3429
|
/**
|
|
3246
3430
|
* Represents the email settings of the organization. It allows you to define which documents are sent by email. The field value determines the types of documents that trigger email notifications. Possible values for are `invoice.finalized` and `credit_note.created`. By configuring this field, you can specify whether invoices, credit notes, or both should be sent to recipients via email.
|
|
@@ -3267,7 +3451,10 @@ export interface OverdueBalanceObject {
|
|
|
3267
3451
|
* @example 50000
|
|
3268
3452
|
*/
|
|
3269
3453
|
amount_cents: number;
|
|
3270
|
-
/**
|
|
3454
|
+
/**
|
|
3455
|
+
* The currency of revenue analytics. Format must be ISO 4217.
|
|
3456
|
+
* @example "USD"
|
|
3457
|
+
*/
|
|
3271
3458
|
currency: Currency;
|
|
3272
3459
|
/**
|
|
3273
3460
|
* The Lago invoice IDs associated with the revenue.
|
|
@@ -3323,7 +3510,10 @@ export interface PaymentRequestObject {
|
|
|
3323
3510
|
* @example 100
|
|
3324
3511
|
*/
|
|
3325
3512
|
amount_cents: number;
|
|
3326
|
-
/**
|
|
3513
|
+
/**
|
|
3514
|
+
* The currency of the payment request.
|
|
3515
|
+
* @example "EUR"
|
|
3516
|
+
*/
|
|
3327
3517
|
amount_currency: Currency;
|
|
3328
3518
|
/**
|
|
3329
3519
|
* The status of the payment associated with the payment request. It can have one of the following values:
|
|
@@ -3382,7 +3572,10 @@ export interface PlanCreateInput {
|
|
|
3382
3572
|
* @example 10000
|
|
3383
3573
|
*/
|
|
3384
3574
|
amount_cents?: number;
|
|
3385
|
-
/**
|
|
3575
|
+
/**
|
|
3576
|
+
* The currency of the plan. It indicates the monetary unit in which the plan's cost, including taxes and usage-based charges, is expressed.
|
|
3577
|
+
* @example "USD"
|
|
3578
|
+
*/
|
|
3386
3579
|
amount_currency?: Currency;
|
|
3387
3580
|
/**
|
|
3388
3581
|
* The duration in days during which the base cost of the plan is offered for free.
|
|
@@ -3481,7 +3674,10 @@ export interface PlanOverridesObject {
|
|
|
3481
3674
|
* @example 10000
|
|
3482
3675
|
*/
|
|
3483
3676
|
amount_cents?: number;
|
|
3484
|
-
/**
|
|
3677
|
+
/**
|
|
3678
|
+
* The currency of the plan. It indicates the monetary unit in which the plan's cost, including taxes and usage-based charges, is expressed.
|
|
3679
|
+
* @example "USD"
|
|
3680
|
+
*/
|
|
3485
3681
|
amount_currency?: Currency;
|
|
3486
3682
|
/**
|
|
3487
3683
|
* The description on the plan.
|
|
@@ -3578,7 +3774,10 @@ export interface PlanUpdateInput {
|
|
|
3578
3774
|
* @example 10000
|
|
3579
3775
|
*/
|
|
3580
3776
|
amount_cents?: number;
|
|
3581
|
-
/**
|
|
3777
|
+
/**
|
|
3778
|
+
* The currency of the plan. It indicates the monetary unit in which the plan's cost, including taxes and usage-based charges, is expressed.
|
|
3779
|
+
* @example "USD"
|
|
3780
|
+
*/
|
|
3582
3781
|
amount_currency?: Currency;
|
|
3583
3782
|
/**
|
|
3584
3783
|
* The duration in days during which the base cost of the plan is offered for free.
|
|
@@ -3674,6 +3873,11 @@ export interface PlanUpdateInput {
|
|
|
3674
3873
|
}[];
|
|
3675
3874
|
/** List of usage thresholds to apply to the plan. */
|
|
3676
3875
|
usage_thresholds?: UsageThresholdInput[];
|
|
3876
|
+
/**
|
|
3877
|
+
* This field determines whether the changes made to the plan should be cascaded to the children plans. When set to `true`, the changes will be cascaded into children. Conversely, when set to `false`, the changes will only be applied to the plan itself. If not defined in the request, default value is `false`.
|
|
3878
|
+
* @example true
|
|
3879
|
+
*/
|
|
3880
|
+
cascade_updates?: boolean;
|
|
3677
3881
|
};
|
|
3678
3882
|
}
|
|
3679
3883
|
export interface PlanObject {
|
|
@@ -3719,7 +3923,10 @@ export interface PlanObject {
|
|
|
3719
3923
|
* @example 10000
|
|
3720
3924
|
*/
|
|
3721
3925
|
amount_cents: number;
|
|
3722
|
-
/**
|
|
3926
|
+
/**
|
|
3927
|
+
* The currency of the plan. It indicates the monetary unit in which the plan's cost, including taxes and usage-based charges, is expressed.
|
|
3928
|
+
* @example "USD"
|
|
3929
|
+
*/
|
|
3723
3930
|
amount_currency: Currency;
|
|
3724
3931
|
/**
|
|
3725
3932
|
* The duration in days during which the base cost of the plan is offered for free.
|
|
@@ -4136,7 +4343,10 @@ export interface WalletCreateInput {
|
|
|
4136
4343
|
* @example "1.5"
|
|
4137
4344
|
*/
|
|
4138
4345
|
rate_amount: string;
|
|
4139
|
-
/**
|
|
4346
|
+
/**
|
|
4347
|
+
* The currency of the wallet.
|
|
4348
|
+
* @example "USD"
|
|
4349
|
+
*/
|
|
4140
4350
|
currency: Currency;
|
|
4141
4351
|
/**
|
|
4142
4352
|
* The number of paid credits. Required only if there is no granted credits.
|
|
@@ -4264,7 +4474,10 @@ export interface WalletObject {
|
|
|
4264
4474
|
* @example "active"
|
|
4265
4475
|
*/
|
|
4266
4476
|
status: "active" | "terminated";
|
|
4267
|
-
/**
|
|
4477
|
+
/**
|
|
4478
|
+
* The currency of the wallet.
|
|
4479
|
+
* @example "USD"
|
|
4480
|
+
*/
|
|
4268
4481
|
currency: Currency;
|
|
4269
4482
|
/**
|
|
4270
4483
|
* The name of the wallet.
|
|
@@ -4767,7 +4980,7 @@ export declare class HttpClient<SecurityDataType = unknown> {
|
|
|
4767
4980
|
}
|
|
4768
4981
|
/**
|
|
4769
4982
|
* @title Lago API documentation
|
|
4770
|
-
* @version 1.
|
|
4983
|
+
* @version 1.17.0
|
|
4771
4984
|
* @license AGPLv3
|
|
4772
4985
|
* @baseUrl https://api.getlago.com/api/v1
|
|
4773
4986
|
* @externalDocs https://github.com/getlago
|
|
@@ -5023,6 +5236,16 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
5023
5236
|
*/
|
|
5024
5237
|
per_page?: number;
|
|
5025
5238
|
}, params?: RequestParams) => Promise<HttpResponse<BillableMetricsPaginated, ApiErrorUnauthorized>>;
|
|
5239
|
+
/**
|
|
5240
|
+
* @description Evaluate an expression for a billable metric creation by providing the expression and test data
|
|
5241
|
+
*
|
|
5242
|
+
* @tags billable_metrics
|
|
5243
|
+
* @name EvaluateBillableMetricExpression
|
|
5244
|
+
* @summary Evaluate an expression for a billable metric
|
|
5245
|
+
* @request POST:/billable_metrics/evaluate_expression
|
|
5246
|
+
* @secure
|
|
5247
|
+
*/
|
|
5248
|
+
evaluateBillableMetricExpression: (data: BillableMetricEvaluateExpressionInput, params?: RequestParams) => Promise<HttpResponse<BillableMetricEvaluateExpressionResult, ApiErrorBadRequest | ApiErrorUnauthorized | ApiErrorUnprocessableEntity>>;
|
|
5026
5249
|
/**
|
|
5027
5250
|
* @description This endpoint updates an existing billable metric representing a pricing component of your application.
|
|
5028
5251
|
*
|