lago-javascript-client 1.16.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.
@@ -19,7 +19,10 @@ export interface AddOnBaseInput {
19
19
  * @example 50000
20
20
  */
21
21
  amount_cents?: number;
22
- /** The currency of the add-on. */
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
- /** The currency of the add-on. */
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
- /** The currency of the coupon. This field is required only for coupon with `fixed_amount` type. */
189
- amount_currency?: Currency;
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
- /** The currency of the coupon. This field is required only for coupon with `fixed_amount` type. */
248
- amount_currency?: Currency;
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
- /** Currency of the tax */
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: BillableMetricObject;
376
+ billable_metric: BillableMetricObjectExtended;
362
377
  }
363
378
  export interface BillableMetricObject {
364
379
  /**
@@ -430,20 +445,40 @@ export interface BillableMetricObject {
430
445
  filters?: BillableMetricFilterObject[];
431
446
  /**
432
447
  * Number of active subscriptions using this billable metric.
448
+ * @deprecated
433
449
  * @example 4
434
450
  */
435
451
  active_subscriptions_count: number;
436
452
  /**
437
453
  * Number of draft invoices for which this billable metric is listed as an invoice item.
454
+ * @deprecated
438
455
  * @example 10
439
456
  */
440
457
  draft_invoices_count: number;
441
458
  /**
442
459
  * Number of plans using this billable metric.
460
+ * @deprecated
443
461
  * @example 4
444
462
  */
445
463
  plans_count: number;
446
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
+ };
447
482
  export interface BillableMetricBaseInput {
448
483
  /**
449
484
  * Name of the billable metric.
@@ -844,8 +879,11 @@ export interface CouponBaseInput {
844
879
  * @example 5000
845
880
  */
846
881
  amount_cents?: number | null;
847
- /** The currency of the coupon. This field is required only for coupon with `fixed_amount` type. */
848
- amount_currency?: Currency;
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;
849
887
  /**
850
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.
851
889
  * @example false
@@ -937,8 +975,11 @@ export interface CouponObject {
937
975
  * @example 5000
938
976
  */
939
977
  amount_cents?: number | null;
940
- /** The currency of the coupon. This field is required only for coupon with `fixed_amount` type. */
941
- amount_currency?: Currency;
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;
942
983
  /**
943
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.
944
985
  * @example true
@@ -1058,7 +1099,10 @@ export interface CreditNoteEstimated {
1058
1099
  * @example "LAG-1234"
1059
1100
  */
1060
1101
  invoice_number: string;
1061
- /** The currency of the credit note. */
1102
+ /**
1103
+ * The currency of the credit note.
1104
+ * @example "EUR"
1105
+ */
1062
1106
  currency: Currency;
1063
1107
  /**
1064
1108
  * The tax amount of the credit note, expressed in cents.
@@ -1138,7 +1182,10 @@ export interface CreditNoteEstimated {
1138
1182
  * @example 2000
1139
1183
  */
1140
1184
  amount_cents?: number;
1141
- /** Currency of the tax */
1185
+ /**
1186
+ * Currency of the tax
1187
+ * @example "USD"
1188
+ */
1142
1189
  amount_currency?: Currency;
1143
1190
  }[];
1144
1191
  };
@@ -1155,7 +1202,10 @@ export interface CreditObject {
1155
1202
  * @example 1200
1156
1203
  */
1157
1204
  amount_cents: number;
1158
- /** The currency of the credit. */
1205
+ /**
1206
+ * The currency of the credit.
1207
+ * @example "EUR"
1208
+ */
1159
1209
  amount_currency: Currency;
1160
1210
  /**
1161
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
@@ -1221,7 +1271,10 @@ export interface CreditNoteItemObject {
1221
1271
  * @example 100
1222
1272
  */
1223
1273
  amount_cents: number;
1224
- /** The credit note's item currency. */
1274
+ /**
1275
+ * The credit note's item currency.
1276
+ * @example "EUR"
1277
+ */
1225
1278
  amount_currency: Currency;
1226
1279
  /** The fee object related to the credit note item. */
1227
1280
  fee: FeeObject;
@@ -1289,7 +1342,10 @@ export interface CreditNoteObject {
1289
1342
  * @example "Free text"
1290
1343
  */
1291
1344
  description?: string | null;
1292
- /** The currency of the credit note. */
1345
+ /**
1346
+ * The currency of the credit note.
1347
+ * @example "EUR"
1348
+ */
1293
1349
  currency: Currency;
1294
1350
  /**
1295
1351
  * The total amount of the credit note, expressed in cents.
@@ -1438,8 +1494,11 @@ export interface Address {
1438
1494
  * @example "Woodland Hills"
1439
1495
  */
1440
1496
  city?: string | null;
1441
- /** Country code of the customer's billing address. Format must be ISO 3166 (alpha-2) */
1442
- country?: Country;
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;
1443
1502
  /**
1444
1503
  * The state of the customer's billing address
1445
1504
  * @example "CA"
@@ -1599,7 +1658,10 @@ export interface CustomerChargeUsageObject {
1599
1658
  * @example 123
1600
1659
  */
1601
1660
  amount_cents: number;
1602
- /** The currency of a usage item consumed by the customer. */
1661
+ /**
1662
+ * The currency of a usage item consumed by the customer.
1663
+ * @example "EUR"
1664
+ */
1603
1665
  amount_currency: Currency;
1604
1666
  /** Object listing all the properties for a specific charge item. */
1605
1667
  charge: {
@@ -1671,10 +1733,13 @@ export interface CustomerCreateInput {
1671
1733
  * @example "Woodland Hills"
1672
1734
  */
1673
1735
  city?: string | null;
1674
- /** Country code of the customer's billing address. Format must be ISO 3166 (alpha-2) */
1675
- country?: Country;
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;
1676
1741
  /** Currency of the customer. Format must be ISO 4217 */
1677
- currency?: Currency;
1742
+ currency?: Currency | null;
1678
1743
  /**
1679
1744
  * The email of the customer
1680
1745
  * @format email
@@ -1738,7 +1803,7 @@ export interface CustomerCreateInput {
1738
1803
  */
1739
1804
  tax_identification_number?: string | null;
1740
1805
  /** The customer's timezone, used for billing purposes in their local time. Overrides the organization's timezone */
1741
- timezone?: Timezone;
1806
+ timezone?: Timezone | null;
1742
1807
  /**
1743
1808
  * The custom website URL of the customer
1744
1809
  * @example "http://hooli.com"
@@ -1895,10 +1960,16 @@ export type CustomerObject = {
1895
1960
  * @example "Woodland Hills"
1896
1961
  */
1897
1962
  city?: string | null;
1898
- /** Country code of the customer's billing address. Format must be ISO 3166 (alpha-2) */
1899
- country?: Country;
1900
- /** Currency of the customer. Format must be ISO 4217 */
1901
- currency?: Currency;
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;
1902
1973
  /**
1903
1974
  * The email of the customer
1904
1975
  * @format email
@@ -1957,7 +2028,7 @@ export type CustomerObject = {
1957
2028
  */
1958
2029
  tax_identification_number?: string | null;
1959
2030
  /** The customer's timezone, used for billing purposes in their local time. Overrides the organization's timezone */
1960
- timezone?: Timezone;
2031
+ timezone?: Timezone | null;
1961
2032
  /**
1962
2033
  * The custom website URL of the customer
1963
2034
  * @example "http://hooli.com"
@@ -2042,7 +2113,10 @@ export interface CustomerUsageObject {
2042
2113
  * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
2043
2114
  */
2044
2115
  lago_invoice_id?: string | null;
2045
- /** The currency of the customer's current usage. */
2116
+ /**
2117
+ * The currency of the customer's current usage.
2118
+ * @example "EUR"
2119
+ */
2046
2120
  currency?: Currency;
2047
2121
  /**
2048
2122
  * The amount in cents, tax excluded.
@@ -2271,7 +2345,10 @@ export interface FeeObject {
2271
2345
  * @example "1.0212"
2272
2346
  */
2273
2347
  precise_total_amount?: string;
2274
- /** The currency of this specific fee. It indicates the monetary unit in which the fee's cost is expressed. */
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
+ */
2275
2352
  amount_currency: Currency;
2276
2353
  /**
2277
2354
  * The cost of the tax associated with this specific fee.
@@ -2303,7 +2380,10 @@ export interface FeeObject {
2303
2380
  * @example 120
2304
2381
  */
2305
2382
  total_amount_cents: number;
2306
- /** The currency of this specific fee, including any applicable taxes. */
2383
+ /**
2384
+ * The currency of this specific fee, including any applicable taxes.
2385
+ * @example "EUR"
2386
+ */
2307
2387
  total_amount_currency: Currency;
2308
2388
  /**
2309
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.
@@ -2610,7 +2690,10 @@ export interface GrossRevenueObject {
2610
2690
  * @example 50000
2611
2691
  */
2612
2692
  amount_cents: number;
2613
- /** The currency of revenue analytics. Format must be ISO 4217. */
2693
+ /**
2694
+ * The currency of revenue analytics. Format must be ISO 4217.
2695
+ * @example "USD"
2696
+ */
2614
2697
  currency: Currency;
2615
2698
  /**
2616
2699
  * Contains invoices count.
@@ -2770,7 +2853,10 @@ export interface MrrObject {
2770
2853
  * @example 50000
2771
2854
  */
2772
2855
  amount_cents?: number;
2773
- /** The currency of MRR analytics. Format must be ISO 4217. */
2856
+ /**
2857
+ * The currency of MRR analytics. Format must be ISO 4217.
2858
+ * @example "USD"
2859
+ */
2774
2860
  currency?: Currency;
2775
2861
  }
2776
2862
  export interface Mrrs {
@@ -2813,7 +2899,10 @@ export interface InvoiceCollectionObject {
2813
2899
  * @example 50000
2814
2900
  */
2815
2901
  amount_cents?: number;
2816
- /** The currency of revenue analytics. Format must be ISO 4217. */
2902
+ /**
2903
+ * The currency of revenue analytics. Format must be ISO 4217.
2904
+ * @example "USD"
2905
+ */
2817
2906
  currency?: Currency;
2818
2907
  }
2819
2908
  export interface InvoiceCollections {
@@ -2835,7 +2924,10 @@ export interface InvoicedUsageObject {
2835
2924
  * @example 50000
2836
2925
  */
2837
2926
  amount_cents: number;
2838
- /** The currency of revenue analytics. Format must be ISO 4217. */
2927
+ /**
2928
+ * The currency of revenue analytics. Format must be ISO 4217.
2929
+ * @example "USD"
2930
+ */
2839
2931
  currency: Currency;
2840
2932
  }
2841
2933
  export interface InvoicedUsages {
@@ -2932,7 +3024,10 @@ export type InvoiceObject = {
2932
3024
  * @example "succeeded"
2933
3025
  */
2934
3026
  payment_status: "pending" | "succeeded" | "failed";
2935
- /** The currency of the invoice issued. */
3027
+ /**
3028
+ * The currency of the invoice issued.
3029
+ * @example "EUR"
3030
+ */
2936
3031
  currency: Currency;
2937
3032
  /**
2938
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.
@@ -3032,7 +3127,10 @@ export interface InvoiceOneOffCreateInput {
3032
3127
  * @example "hooli_1234"
3033
3128
  */
3034
3129
  external_customer_id: string;
3035
- /** The currency of the invoice. */
3130
+ /**
3131
+ * The currency of the invoice.
3132
+ * @example "EUR"
3133
+ */
3036
3134
  currency?: Currency;
3037
3135
  fees: {
3038
3136
  /**
@@ -3149,9 +3247,15 @@ export interface OrganizationObject {
3149
3247
  * @example ["https://webhook.brex.com","https://webhook2.brex.com"]
3150
3248
  */
3151
3249
  webhook_urls?: string[] | null;
3152
- /** The country of your organization. */
3153
- country?: Country;
3154
- /** The default currency of an organization. */
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
+ */
3155
3259
  default_currency?: Currency;
3156
3260
  /**
3157
3261
  * The first line of your organization's billing address.
@@ -3219,7 +3323,10 @@ export interface OrganizationObject {
3219
3323
  * @example "US123456789"
3220
3324
  */
3221
3325
  tax_identification_number?: string | null;
3222
- /** Your organization's timezone, used for billing purposes in your own local time. Can be overwritten by the customer's timezone. */
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
+ */
3223
3330
  timezone?: Timezone;
3224
3331
  /** The custom billing settings for your organization. */
3225
3332
  billing_configuration: OrganizationBillingConfiguration;
@@ -3238,9 +3345,15 @@ export interface OrganizationUpdateInput {
3238
3345
  * @example "https://webhook.brex.com"
3239
3346
  */
3240
3347
  webhook_url?: string | null;
3241
- /** The country of your organization. */
3242
- country?: Country;
3243
- /** The default currency of an organization. */
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
+ */
3244
3357
  default_currency?: Currency;
3245
3358
  /**
3246
3359
  * The first line of your organization's billing address.
@@ -3308,7 +3421,10 @@ export interface OrganizationUpdateInput {
3308
3421
  * @example "US123456789"
3309
3422
  */
3310
3423
  tax_identification_number?: string | null;
3311
- /** Your organization's timezone, used for billing purposes in your own local time. Can be overwritten by the customer's timezone. */
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
+ */
3312
3428
  timezone?: Timezone;
3313
3429
  /**
3314
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.
@@ -3335,7 +3451,10 @@ export interface OverdueBalanceObject {
3335
3451
  * @example 50000
3336
3452
  */
3337
3453
  amount_cents: number;
3338
- /** The currency of revenue analytics. Format must be ISO 4217. */
3454
+ /**
3455
+ * The currency of revenue analytics. Format must be ISO 4217.
3456
+ * @example "USD"
3457
+ */
3339
3458
  currency: Currency;
3340
3459
  /**
3341
3460
  * The Lago invoice IDs associated with the revenue.
@@ -3391,7 +3510,10 @@ export interface PaymentRequestObject {
3391
3510
  * @example 100
3392
3511
  */
3393
3512
  amount_cents: number;
3394
- /** The currency of the payment request. */
3513
+ /**
3514
+ * The currency of the payment request.
3515
+ * @example "EUR"
3516
+ */
3395
3517
  amount_currency: Currency;
3396
3518
  /**
3397
3519
  * The status of the payment associated with the payment request. It can have one of the following values:
@@ -3450,7 +3572,10 @@ export interface PlanCreateInput {
3450
3572
  * @example 10000
3451
3573
  */
3452
3574
  amount_cents?: number;
3453
- /** The currency of the plan. It indicates the monetary unit in which the plan's cost, including taxes and usage-based charges, is expressed. */
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
+ */
3454
3579
  amount_currency?: Currency;
3455
3580
  /**
3456
3581
  * The duration in days during which the base cost of the plan is offered for free.
@@ -3549,7 +3674,10 @@ export interface PlanOverridesObject {
3549
3674
  * @example 10000
3550
3675
  */
3551
3676
  amount_cents?: number;
3552
- /** The currency of the plan. It indicates the monetary unit in which the plan's cost, including taxes and usage-based charges, is expressed. */
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
+ */
3553
3681
  amount_currency?: Currency;
3554
3682
  /**
3555
3683
  * The description on the plan.
@@ -3646,7 +3774,10 @@ export interface PlanUpdateInput {
3646
3774
  * @example 10000
3647
3775
  */
3648
3776
  amount_cents?: number;
3649
- /** The currency of the plan. It indicates the monetary unit in which the plan's cost, including taxes and usage-based charges, is expressed. */
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
+ */
3650
3781
  amount_currency?: Currency;
3651
3782
  /**
3652
3783
  * The duration in days during which the base cost of the plan is offered for free.
@@ -3792,7 +3923,10 @@ export interface PlanObject {
3792
3923
  * @example 10000
3793
3924
  */
3794
3925
  amount_cents: number;
3795
- /** The currency of the plan. It indicates the monetary unit in which the plan's cost, including taxes and usage-based charges, is expressed. */
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
+ */
3796
3930
  amount_currency: Currency;
3797
3931
  /**
3798
3932
  * The duration in days during which the base cost of the plan is offered for free.
@@ -4209,7 +4343,10 @@ export interface WalletCreateInput {
4209
4343
  * @example "1.5"
4210
4344
  */
4211
4345
  rate_amount: string;
4212
- /** The currency of the wallet. */
4346
+ /**
4347
+ * The currency of the wallet.
4348
+ * @example "USD"
4349
+ */
4213
4350
  currency: Currency;
4214
4351
  /**
4215
4352
  * The number of paid credits. Required only if there is no granted credits.
@@ -4337,7 +4474,10 @@ export interface WalletObject {
4337
4474
  * @example "active"
4338
4475
  */
4339
4476
  status: "active" | "terminated";
4340
- /** The currency of the wallet. */
4477
+ /**
4478
+ * The currency of the wallet.
4479
+ * @example "USD"
4480
+ */
4341
4481
  currency: Currency;
4342
4482
  /**
4343
4483
  * The name of the wallet.
@@ -4840,7 +4980,7 @@ export declare class HttpClient<SecurityDataType = unknown> {
4840
4980
  }
4841
4981
  /**
4842
4982
  * @title Lago API documentation
4843
- * @version 1.16.0
4983
+ * @version 1.17.0
4844
4984
  * @license AGPLv3
4845
4985
  * @baseUrl https://api.getlago.com/api/v1
4846
4986
  * @externalDocs https://github.com/getlago
@@ -148,7 +148,7 @@ export class HttpClient {
148
148
  }
149
149
  /**
150
150
  * @title Lago API documentation
151
- * @version 1.16.0
151
+ * @version 1.17.0
152
152
  * @license AGPLv3
153
153
  * @baseUrl https://api.getlago.com/api/v1
154
154
  * @externalDocs https://github.com/getlago
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "main": "./script/mod.js",
4
4
  "name": "lago-javascript-client",
5
5
  "sideEffects": false,
6
- "version": "v1.16.0",
6
+ "version": "v1.17.0",
7
7
  "description": "Lago JavaScript API Client",
8
8
  "repository": {
9
9
  "type": "git",
@@ -19,7 +19,10 @@ export interface AddOnBaseInput {
19
19
  * @example 50000
20
20
  */
21
21
  amount_cents?: number;
22
- /** The currency of the add-on. */
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
- /** The currency of the add-on. */
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
- /** The currency of the coupon. This field is required only for coupon with `fixed_amount` type. */
189
- amount_currency?: Currency;
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
- /** The currency of the coupon. This field is required only for coupon with `fixed_amount` type. */
248
- amount_currency?: Currency;
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
- /** Currency of the tax */
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: BillableMetricObject;
376
+ billable_metric: BillableMetricObjectExtended;
362
377
  }
363
378
  export interface BillableMetricObject {
364
379
  /**
@@ -430,20 +445,40 @@ export interface BillableMetricObject {
430
445
  filters?: BillableMetricFilterObject[];
431
446
  /**
432
447
  * Number of active subscriptions using this billable metric.
448
+ * @deprecated
433
449
  * @example 4
434
450
  */
435
451
  active_subscriptions_count: number;
436
452
  /**
437
453
  * Number of draft invoices for which this billable metric is listed as an invoice item.
454
+ * @deprecated
438
455
  * @example 10
439
456
  */
440
457
  draft_invoices_count: number;
441
458
  /**
442
459
  * Number of plans using this billable metric.
460
+ * @deprecated
443
461
  * @example 4
444
462
  */
445
463
  plans_count: number;
446
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
+ };
447
482
  export interface BillableMetricBaseInput {
448
483
  /**
449
484
  * Name of the billable metric.
@@ -844,8 +879,11 @@ export interface CouponBaseInput {
844
879
  * @example 5000
845
880
  */
846
881
  amount_cents?: number | null;
847
- /** The currency of the coupon. This field is required only for coupon with `fixed_amount` type. */
848
- amount_currency?: Currency;
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;
849
887
  /**
850
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.
851
889
  * @example false
@@ -937,8 +975,11 @@ export interface CouponObject {
937
975
  * @example 5000
938
976
  */
939
977
  amount_cents?: number | null;
940
- /** The currency of the coupon. This field is required only for coupon with `fixed_amount` type. */
941
- amount_currency?: Currency;
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;
942
983
  /**
943
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.
944
985
  * @example true
@@ -1058,7 +1099,10 @@ export interface CreditNoteEstimated {
1058
1099
  * @example "LAG-1234"
1059
1100
  */
1060
1101
  invoice_number: string;
1061
- /** The currency of the credit note. */
1102
+ /**
1103
+ * The currency of the credit note.
1104
+ * @example "EUR"
1105
+ */
1062
1106
  currency: Currency;
1063
1107
  /**
1064
1108
  * The tax amount of the credit note, expressed in cents.
@@ -1138,7 +1182,10 @@ export interface CreditNoteEstimated {
1138
1182
  * @example 2000
1139
1183
  */
1140
1184
  amount_cents?: number;
1141
- /** Currency of the tax */
1185
+ /**
1186
+ * Currency of the tax
1187
+ * @example "USD"
1188
+ */
1142
1189
  amount_currency?: Currency;
1143
1190
  }[];
1144
1191
  };
@@ -1155,7 +1202,10 @@ export interface CreditObject {
1155
1202
  * @example 1200
1156
1203
  */
1157
1204
  amount_cents: number;
1158
- /** The currency of the credit. */
1205
+ /**
1206
+ * The currency of the credit.
1207
+ * @example "EUR"
1208
+ */
1159
1209
  amount_currency: Currency;
1160
1210
  /**
1161
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
@@ -1221,7 +1271,10 @@ export interface CreditNoteItemObject {
1221
1271
  * @example 100
1222
1272
  */
1223
1273
  amount_cents: number;
1224
- /** The credit note's item currency. */
1274
+ /**
1275
+ * The credit note's item currency.
1276
+ * @example "EUR"
1277
+ */
1225
1278
  amount_currency: Currency;
1226
1279
  /** The fee object related to the credit note item. */
1227
1280
  fee: FeeObject;
@@ -1289,7 +1342,10 @@ export interface CreditNoteObject {
1289
1342
  * @example "Free text"
1290
1343
  */
1291
1344
  description?: string | null;
1292
- /** The currency of the credit note. */
1345
+ /**
1346
+ * The currency of the credit note.
1347
+ * @example "EUR"
1348
+ */
1293
1349
  currency: Currency;
1294
1350
  /**
1295
1351
  * The total amount of the credit note, expressed in cents.
@@ -1438,8 +1494,11 @@ export interface Address {
1438
1494
  * @example "Woodland Hills"
1439
1495
  */
1440
1496
  city?: string | null;
1441
- /** Country code of the customer's billing address. Format must be ISO 3166 (alpha-2) */
1442
- country?: Country;
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;
1443
1502
  /**
1444
1503
  * The state of the customer's billing address
1445
1504
  * @example "CA"
@@ -1599,7 +1658,10 @@ export interface CustomerChargeUsageObject {
1599
1658
  * @example 123
1600
1659
  */
1601
1660
  amount_cents: number;
1602
- /** The currency of a usage item consumed by the customer. */
1661
+ /**
1662
+ * The currency of a usage item consumed by the customer.
1663
+ * @example "EUR"
1664
+ */
1603
1665
  amount_currency: Currency;
1604
1666
  /** Object listing all the properties for a specific charge item. */
1605
1667
  charge: {
@@ -1671,10 +1733,13 @@ export interface CustomerCreateInput {
1671
1733
  * @example "Woodland Hills"
1672
1734
  */
1673
1735
  city?: string | null;
1674
- /** Country code of the customer's billing address. Format must be ISO 3166 (alpha-2) */
1675
- country?: Country;
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;
1676
1741
  /** Currency of the customer. Format must be ISO 4217 */
1677
- currency?: Currency;
1742
+ currency?: Currency | null;
1678
1743
  /**
1679
1744
  * The email of the customer
1680
1745
  * @format email
@@ -1738,7 +1803,7 @@ export interface CustomerCreateInput {
1738
1803
  */
1739
1804
  tax_identification_number?: string | null;
1740
1805
  /** The customer's timezone, used for billing purposes in their local time. Overrides the organization's timezone */
1741
- timezone?: Timezone;
1806
+ timezone?: Timezone | null;
1742
1807
  /**
1743
1808
  * The custom website URL of the customer
1744
1809
  * @example "http://hooli.com"
@@ -1895,10 +1960,16 @@ export type CustomerObject = {
1895
1960
  * @example "Woodland Hills"
1896
1961
  */
1897
1962
  city?: string | null;
1898
- /** Country code of the customer's billing address. Format must be ISO 3166 (alpha-2) */
1899
- country?: Country;
1900
- /** Currency of the customer. Format must be ISO 4217 */
1901
- currency?: Currency;
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;
1902
1973
  /**
1903
1974
  * The email of the customer
1904
1975
  * @format email
@@ -1957,7 +2028,7 @@ export type CustomerObject = {
1957
2028
  */
1958
2029
  tax_identification_number?: string | null;
1959
2030
  /** The customer's timezone, used for billing purposes in their local time. Overrides the organization's timezone */
1960
- timezone?: Timezone;
2031
+ timezone?: Timezone | null;
1961
2032
  /**
1962
2033
  * The custom website URL of the customer
1963
2034
  * @example "http://hooli.com"
@@ -2042,7 +2113,10 @@ export interface CustomerUsageObject {
2042
2113
  * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
2043
2114
  */
2044
2115
  lago_invoice_id?: string | null;
2045
- /** The currency of the customer's current usage. */
2116
+ /**
2117
+ * The currency of the customer's current usage.
2118
+ * @example "EUR"
2119
+ */
2046
2120
  currency?: Currency;
2047
2121
  /**
2048
2122
  * The amount in cents, tax excluded.
@@ -2271,7 +2345,10 @@ export interface FeeObject {
2271
2345
  * @example "1.0212"
2272
2346
  */
2273
2347
  precise_total_amount?: string;
2274
- /** The currency of this specific fee. It indicates the monetary unit in which the fee's cost is expressed. */
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
+ */
2275
2352
  amount_currency: Currency;
2276
2353
  /**
2277
2354
  * The cost of the tax associated with this specific fee.
@@ -2303,7 +2380,10 @@ export interface FeeObject {
2303
2380
  * @example 120
2304
2381
  */
2305
2382
  total_amount_cents: number;
2306
- /** The currency of this specific fee, including any applicable taxes. */
2383
+ /**
2384
+ * The currency of this specific fee, including any applicable taxes.
2385
+ * @example "EUR"
2386
+ */
2307
2387
  total_amount_currency: Currency;
2308
2388
  /**
2309
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.
@@ -2610,7 +2690,10 @@ export interface GrossRevenueObject {
2610
2690
  * @example 50000
2611
2691
  */
2612
2692
  amount_cents: number;
2613
- /** The currency of revenue analytics. Format must be ISO 4217. */
2693
+ /**
2694
+ * The currency of revenue analytics. Format must be ISO 4217.
2695
+ * @example "USD"
2696
+ */
2614
2697
  currency: Currency;
2615
2698
  /**
2616
2699
  * Contains invoices count.
@@ -2770,7 +2853,10 @@ export interface MrrObject {
2770
2853
  * @example 50000
2771
2854
  */
2772
2855
  amount_cents?: number;
2773
- /** The currency of MRR analytics. Format must be ISO 4217. */
2856
+ /**
2857
+ * The currency of MRR analytics. Format must be ISO 4217.
2858
+ * @example "USD"
2859
+ */
2774
2860
  currency?: Currency;
2775
2861
  }
2776
2862
  export interface Mrrs {
@@ -2813,7 +2899,10 @@ export interface InvoiceCollectionObject {
2813
2899
  * @example 50000
2814
2900
  */
2815
2901
  amount_cents?: number;
2816
- /** The currency of revenue analytics. Format must be ISO 4217. */
2902
+ /**
2903
+ * The currency of revenue analytics. Format must be ISO 4217.
2904
+ * @example "USD"
2905
+ */
2817
2906
  currency?: Currency;
2818
2907
  }
2819
2908
  export interface InvoiceCollections {
@@ -2835,7 +2924,10 @@ export interface InvoicedUsageObject {
2835
2924
  * @example 50000
2836
2925
  */
2837
2926
  amount_cents: number;
2838
- /** The currency of revenue analytics. Format must be ISO 4217. */
2927
+ /**
2928
+ * The currency of revenue analytics. Format must be ISO 4217.
2929
+ * @example "USD"
2930
+ */
2839
2931
  currency: Currency;
2840
2932
  }
2841
2933
  export interface InvoicedUsages {
@@ -2932,7 +3024,10 @@ export type InvoiceObject = {
2932
3024
  * @example "succeeded"
2933
3025
  */
2934
3026
  payment_status: "pending" | "succeeded" | "failed";
2935
- /** The currency of the invoice issued. */
3027
+ /**
3028
+ * The currency of the invoice issued.
3029
+ * @example "EUR"
3030
+ */
2936
3031
  currency: Currency;
2937
3032
  /**
2938
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.
@@ -3032,7 +3127,10 @@ export interface InvoiceOneOffCreateInput {
3032
3127
  * @example "hooli_1234"
3033
3128
  */
3034
3129
  external_customer_id: string;
3035
- /** The currency of the invoice. */
3130
+ /**
3131
+ * The currency of the invoice.
3132
+ * @example "EUR"
3133
+ */
3036
3134
  currency?: Currency;
3037
3135
  fees: {
3038
3136
  /**
@@ -3149,9 +3247,15 @@ export interface OrganizationObject {
3149
3247
  * @example ["https://webhook.brex.com","https://webhook2.brex.com"]
3150
3248
  */
3151
3249
  webhook_urls?: string[] | null;
3152
- /** The country of your organization. */
3153
- country?: Country;
3154
- /** The default currency of an organization. */
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
+ */
3155
3259
  default_currency?: Currency;
3156
3260
  /**
3157
3261
  * The first line of your organization's billing address.
@@ -3219,7 +3323,10 @@ export interface OrganizationObject {
3219
3323
  * @example "US123456789"
3220
3324
  */
3221
3325
  tax_identification_number?: string | null;
3222
- /** Your organization's timezone, used for billing purposes in your own local time. Can be overwritten by the customer's timezone. */
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
+ */
3223
3330
  timezone?: Timezone;
3224
3331
  /** The custom billing settings for your organization. */
3225
3332
  billing_configuration: OrganizationBillingConfiguration;
@@ -3238,9 +3345,15 @@ export interface OrganizationUpdateInput {
3238
3345
  * @example "https://webhook.brex.com"
3239
3346
  */
3240
3347
  webhook_url?: string | null;
3241
- /** The country of your organization. */
3242
- country?: Country;
3243
- /** The default currency of an organization. */
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
+ */
3244
3357
  default_currency?: Currency;
3245
3358
  /**
3246
3359
  * The first line of your organization's billing address.
@@ -3308,7 +3421,10 @@ export interface OrganizationUpdateInput {
3308
3421
  * @example "US123456789"
3309
3422
  */
3310
3423
  tax_identification_number?: string | null;
3311
- /** Your organization's timezone, used for billing purposes in your own local time. Can be overwritten by the customer's timezone. */
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
+ */
3312
3428
  timezone?: Timezone;
3313
3429
  /**
3314
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.
@@ -3335,7 +3451,10 @@ export interface OverdueBalanceObject {
3335
3451
  * @example 50000
3336
3452
  */
3337
3453
  amount_cents: number;
3338
- /** The currency of revenue analytics. Format must be ISO 4217. */
3454
+ /**
3455
+ * The currency of revenue analytics. Format must be ISO 4217.
3456
+ * @example "USD"
3457
+ */
3339
3458
  currency: Currency;
3340
3459
  /**
3341
3460
  * The Lago invoice IDs associated with the revenue.
@@ -3391,7 +3510,10 @@ export interface PaymentRequestObject {
3391
3510
  * @example 100
3392
3511
  */
3393
3512
  amount_cents: number;
3394
- /** The currency of the payment request. */
3513
+ /**
3514
+ * The currency of the payment request.
3515
+ * @example "EUR"
3516
+ */
3395
3517
  amount_currency: Currency;
3396
3518
  /**
3397
3519
  * The status of the payment associated with the payment request. It can have one of the following values:
@@ -3450,7 +3572,10 @@ export interface PlanCreateInput {
3450
3572
  * @example 10000
3451
3573
  */
3452
3574
  amount_cents?: number;
3453
- /** The currency of the plan. It indicates the monetary unit in which the plan's cost, including taxes and usage-based charges, is expressed. */
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
+ */
3454
3579
  amount_currency?: Currency;
3455
3580
  /**
3456
3581
  * The duration in days during which the base cost of the plan is offered for free.
@@ -3549,7 +3674,10 @@ export interface PlanOverridesObject {
3549
3674
  * @example 10000
3550
3675
  */
3551
3676
  amount_cents?: number;
3552
- /** The currency of the plan. It indicates the monetary unit in which the plan's cost, including taxes and usage-based charges, is expressed. */
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
+ */
3553
3681
  amount_currency?: Currency;
3554
3682
  /**
3555
3683
  * The description on the plan.
@@ -3646,7 +3774,10 @@ export interface PlanUpdateInput {
3646
3774
  * @example 10000
3647
3775
  */
3648
3776
  amount_cents?: number;
3649
- /** The currency of the plan. It indicates the monetary unit in which the plan's cost, including taxes and usage-based charges, is expressed. */
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
+ */
3650
3781
  amount_currency?: Currency;
3651
3782
  /**
3652
3783
  * The duration in days during which the base cost of the plan is offered for free.
@@ -3792,7 +3923,10 @@ export interface PlanObject {
3792
3923
  * @example 10000
3793
3924
  */
3794
3925
  amount_cents: number;
3795
- /** The currency of the plan. It indicates the monetary unit in which the plan's cost, including taxes and usage-based charges, is expressed. */
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
+ */
3796
3930
  amount_currency: Currency;
3797
3931
  /**
3798
3932
  * The duration in days during which the base cost of the plan is offered for free.
@@ -4209,7 +4343,10 @@ export interface WalletCreateInput {
4209
4343
  * @example "1.5"
4210
4344
  */
4211
4345
  rate_amount: string;
4212
- /** The currency of the wallet. */
4346
+ /**
4347
+ * The currency of the wallet.
4348
+ * @example "USD"
4349
+ */
4213
4350
  currency: Currency;
4214
4351
  /**
4215
4352
  * The number of paid credits. Required only if there is no granted credits.
@@ -4337,7 +4474,10 @@ export interface WalletObject {
4337
4474
  * @example "active"
4338
4475
  */
4339
4476
  status: "active" | "terminated";
4340
- /** The currency of the wallet. */
4477
+ /**
4478
+ * The currency of the wallet.
4479
+ * @example "USD"
4480
+ */
4341
4481
  currency: Currency;
4342
4482
  /**
4343
4483
  * The name of the wallet.
@@ -4840,7 +4980,7 @@ export declare class HttpClient<SecurityDataType = unknown> {
4840
4980
  }
4841
4981
  /**
4842
4982
  * @title Lago API documentation
4843
- * @version 1.16.0
4983
+ * @version 1.17.0
4844
4984
  * @license AGPLv3
4845
4985
  * @baseUrl https://api.getlago.com/api/v1
4846
4986
  * @externalDocs https://github.com/getlago
@@ -152,7 +152,7 @@ class HttpClient {
152
152
  exports.HttpClient = HttpClient;
153
153
  /**
154
154
  * @title Lago API documentation
155
- * @version 1.16.0
155
+ * @version 1.17.0
156
156
  * @license AGPLv3
157
157
  * @baseUrl https://api.getlago.com/api/v1
158
158
  * @externalDocs https://github.com/getlago