lago-javascript-client 1.16.0 → 1.18.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.
@@ -428,21 +443,6 @@ export interface BillableMetricObject {
428
443
  */
429
444
  weighted_interval?: "seconds" | null;
430
445
  filters?: BillableMetricFilterObject[];
431
- /**
432
- * Number of active subscriptions using this billable metric.
433
- * @example 4
434
- */
435
- active_subscriptions_count: number;
436
- /**
437
- * Number of draft invoices for which this billable metric is listed as an invoice item.
438
- * @example 10
439
- */
440
- draft_invoices_count: number;
441
- /**
442
- * Number of plans using this billable metric.
443
- * @example 4
444
- */
445
- plans_count: number;
446
446
  }
447
447
  export interface BillableMetricBaseInput {
448
448
  /**
@@ -844,8 +844,11 @@ export interface CouponBaseInput {
844
844
  * @example 5000
845
845
  */
846
846
  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;
847
+ /**
848
+ * The currency of the coupon. This field is required only for coupon with `fixed_amount` type.
849
+ * @example "USD"
850
+ */
851
+ amount_currency?: Currency | null;
849
852
  /**
850
853
  * 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
854
  * @example false
@@ -937,8 +940,11 @@ export interface CouponObject {
937
940
  * @example 5000
938
941
  */
939
942
  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;
943
+ /**
944
+ * The currency of the coupon. This field is required only for coupon with `fixed_amount` type.
945
+ * @example "USD"
946
+ */
947
+ amount_currency?: Currency | null;
942
948
  /**
943
949
  * 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
950
  * @example true
@@ -1009,7 +1015,7 @@ export interface CouponObject {
1009
1015
  * @format date-time
1010
1016
  * @example "2022-08-08T23:59:59Z"
1011
1017
  */
1012
- terminated_at?: string;
1018
+ terminated_at?: string | null;
1013
1019
  }
1014
1020
  export interface CouponsPaginated {
1015
1021
  coupons: CouponObject[];
@@ -1058,7 +1064,10 @@ export interface CreditNoteEstimated {
1058
1064
  * @example "LAG-1234"
1059
1065
  */
1060
1066
  invoice_number: string;
1061
- /** The currency of the credit note. */
1067
+ /**
1068
+ * The currency of the credit note.
1069
+ * @example "EUR"
1070
+ */
1062
1071
  currency: Currency;
1063
1072
  /**
1064
1073
  * The tax amount of the credit note, expressed in cents.
@@ -1138,7 +1147,10 @@ export interface CreditNoteEstimated {
1138
1147
  * @example 2000
1139
1148
  */
1140
1149
  amount_cents?: number;
1141
- /** Currency of the tax */
1150
+ /**
1151
+ * Currency of the tax
1152
+ * @example "USD"
1153
+ */
1142
1154
  amount_currency?: Currency;
1143
1155
  }[];
1144
1156
  };
@@ -1155,7 +1167,10 @@ export interface CreditObject {
1155
1167
  * @example 1200
1156
1168
  */
1157
1169
  amount_cents: number;
1158
- /** The currency of the credit. */
1170
+ /**
1171
+ * The currency of the credit.
1172
+ * @example "EUR"
1173
+ */
1159
1174
  amount_currency: Currency;
1160
1175
  /**
1161
1176
  * 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 +1236,10 @@ export interface CreditNoteItemObject {
1221
1236
  * @example 100
1222
1237
  */
1223
1238
  amount_cents: number;
1224
- /** The credit note's item currency. */
1239
+ /**
1240
+ * The credit note's item currency.
1241
+ * @example "EUR"
1242
+ */
1225
1243
  amount_currency: Currency;
1226
1244
  /** The fee object related to the credit note item. */
1227
1245
  fee: FeeObject;
@@ -1289,7 +1307,10 @@ export interface CreditNoteObject {
1289
1307
  * @example "Free text"
1290
1308
  */
1291
1309
  description?: string | null;
1292
- /** The currency of the credit note. */
1310
+ /**
1311
+ * The currency of the credit note.
1312
+ * @example "EUR"
1313
+ */
1293
1314
  currency: Currency;
1294
1315
  /**
1295
1316
  * The total amount of the credit note, expressed in cents.
@@ -1438,8 +1459,11 @@ export interface Address {
1438
1459
  * @example "Woodland Hills"
1439
1460
  */
1440
1461
  city?: string | null;
1441
- /** Country code of the customer's billing address. Format must be ISO 3166 (alpha-2) */
1442
- country?: Country;
1462
+ /**
1463
+ * Country code of the customer's billing address. Format must be ISO 3166 (alpha-2)
1464
+ * @example "US"
1465
+ */
1466
+ country?: Country | null;
1443
1467
  /**
1444
1468
  * The state of the customer's billing address
1445
1469
  * @example "CA"
@@ -1599,7 +1623,10 @@ export interface CustomerChargeUsageObject {
1599
1623
  * @example 123
1600
1624
  */
1601
1625
  amount_cents: number;
1602
- /** The currency of a usage item consumed by the customer. */
1626
+ /**
1627
+ * The currency of a usage item consumed by the customer.
1628
+ * @example "EUR"
1629
+ */
1603
1630
  amount_currency: Currency;
1604
1631
  /** Object listing all the properties for a specific charge item. */
1605
1632
  charge: {
@@ -1671,10 +1698,13 @@ export interface CustomerCreateInput {
1671
1698
  * @example "Woodland Hills"
1672
1699
  */
1673
1700
  city?: string | null;
1674
- /** Country code of the customer's billing address. Format must be ISO 3166 (alpha-2) */
1675
- country?: Country;
1701
+ /**
1702
+ * Country code of the customer's billing address. Format must be ISO 3166 (alpha-2)
1703
+ * @example "US"
1704
+ */
1705
+ country?: Country | null;
1676
1706
  /** Currency of the customer. Format must be ISO 4217 */
1677
- currency?: Currency;
1707
+ currency?: Currency | null;
1678
1708
  /**
1679
1709
  * The email of the customer
1680
1710
  * @format email
@@ -1738,7 +1768,7 @@ export interface CustomerCreateInput {
1738
1768
  */
1739
1769
  tax_identification_number?: string | null;
1740
1770
  /** The customer's timezone, used for billing purposes in their local time. Overrides the organization's timezone */
1741
- timezone?: Timezone;
1771
+ timezone?: Timezone | null;
1742
1772
  /**
1743
1773
  * The custom website URL of the customer
1744
1774
  * @example "http://hooli.com"
@@ -1824,6 +1854,16 @@ export interface CustomerCreateInput {
1824
1854
  */
1825
1855
  display_in_invoice: boolean;
1826
1856
  }[];
1857
+ /**
1858
+ * Set to `true` to exclude all invoice custom sections from PDF generation for this customer only. False by default
1859
+ * @example false
1860
+ */
1861
+ skip_invoice_custom_sections?: boolean;
1862
+ /**
1863
+ * List of unique codes identifying the invoice custom sections.
1864
+ * @example ["eu_bank_details"]
1865
+ */
1866
+ invoice_custom_section_codes?: string[];
1827
1867
  };
1828
1868
  }
1829
1869
  /** Set of key-value pairs that you can attach to a customer. This can be useful for storing additional information about the customer in a structured format */
@@ -1895,10 +1935,16 @@ export type CustomerObject = {
1895
1935
  * @example "Woodland Hills"
1896
1936
  */
1897
1937
  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;
1938
+ /**
1939
+ * Country code of the customer's billing address. Format must be ISO 3166 (alpha-2)
1940
+ * @example "US"
1941
+ */
1942
+ country?: Country | null;
1943
+ /**
1944
+ * Currency of the customer. Format must be ISO 4217
1945
+ * @example "USD"
1946
+ */
1947
+ currency?: Currency | null;
1902
1948
  /**
1903
1949
  * The email of the customer
1904
1950
  * @format email
@@ -1957,7 +2003,7 @@ export type CustomerObject = {
1957
2003
  */
1958
2004
  tax_identification_number?: string | null;
1959
2005
  /** The customer's timezone, used for billing purposes in their local time. Overrides the organization's timezone */
1960
- timezone?: Timezone;
2006
+ timezone?: Timezone | null;
1961
2007
  /**
1962
2008
  * The custom website URL of the customer
1963
2009
  * @example "http://hooli.com"
@@ -1993,6 +2039,11 @@ export type CustomerObject = {
1993
2039
  * @example "inherit"
1994
2040
  */
1995
2041
  finalize_zero_amount_invoice?: "inherit" | "skip" | "finalize";
2042
+ /**
2043
+ * Set to true to exclude all invoice custom sections from PDF generation for this customer only.
2044
+ * @example false
2045
+ */
2046
+ skip_invoice_custom_sections?: boolean;
1996
2047
  /** Configuration specific to the payment provider, utilized for billing the customer. This object contains settings and parameters necessary for processing payments and invoicing the customer. */
1997
2048
  billing_configuration?: CustomerBillingConfiguration;
1998
2049
  /** Configuration specific to the payment provider, utilized for billing the customer. This object contains settings and parameters necessary for processing payments and invoicing the customer. */
@@ -2005,6 +2056,57 @@ export type CustomerObjectExtended = CustomerObject & {
2005
2056
  metadata?: CustomerMetadata[];
2006
2057
  /** List of customer taxes */
2007
2058
  taxes?: TaxObject[];
2059
+ /** The customer’s invoice custom section used for generating invoices. */
2060
+ applicable_invoice_custom_sections?: {
2061
+ /**
2062
+ * Unique identifier for the invoice custom section in the Lago application, generated by Lago to ensure record uniqueness within the system.
2063
+ * @format uuid
2064
+ * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
2065
+ */
2066
+ lago_id: string;
2067
+ /**
2068
+ * Name of the invoice custom section.
2069
+ * @example "EU Bank Details"
2070
+ */
2071
+ name: string;
2072
+ /**
2073
+ * Unique code identifying the invoice custom section for the API request.
2074
+ * @example "eu_bank_details"
2075
+ */
2076
+ code: string;
2077
+ /**
2078
+ * Internal description of the invoice custom section.
2079
+ * @example "This section contains the bank details for EU customers."
2080
+ */
2081
+ description?: string;
2082
+ /**
2083
+ * The value shown on the invoice PDF.
2084
+ * @example "Bank Name: Lago Bank, IBAN: FR7630004000031234567890143"
2085
+ */
2086
+ details?: string;
2087
+ /**
2088
+ * The name of the invoice custom section displayed on the invoice.
2089
+ * @example "Bank Details:"
2090
+ */
2091
+ display_name?: string;
2092
+ /**
2093
+ * Set to true if the invoice custom section is a default for the organization.
2094
+ * @example true
2095
+ */
2096
+ applied_to_organization?: boolean;
2097
+ /**
2098
+ * Unique identifier for the organization associated with the invoice custom section.
2099
+ * @format uuid
2100
+ * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
2101
+ */
2102
+ organization_id?: string;
2103
+ /**
2104
+ * Creation date of the tax.
2105
+ * @format date-time
2106
+ * @example "2023-07-06T14:35:58Z"
2107
+ */
2108
+ created_at?: string;
2109
+ }[];
2008
2110
  };
2009
2111
  export interface CustomerPastUsage {
2010
2112
  usage_periods: CustomerUsage[];
@@ -2042,7 +2144,10 @@ export interface CustomerUsageObject {
2042
2144
  * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
2043
2145
  */
2044
2146
  lago_invoice_id?: string | null;
2045
- /** The currency of the customer's current usage. */
2147
+ /**
2148
+ * The currency of the customer's current usage.
2149
+ * @example "EUR"
2150
+ */
2046
2151
  currency?: Currency;
2047
2152
  /**
2048
2153
  * The amount in cents, tax excluded.
@@ -2271,7 +2376,10 @@ export interface FeeObject {
2271
2376
  * @example "1.0212"
2272
2377
  */
2273
2378
  precise_total_amount?: string;
2274
- /** The currency of this specific fee. It indicates the monetary unit in which the fee's cost is expressed. */
2379
+ /**
2380
+ * The currency of this specific fee. It indicates the monetary unit in which the fee's cost is expressed.
2381
+ * @example "EUR"
2382
+ */
2275
2383
  amount_currency: Currency;
2276
2384
  /**
2277
2385
  * The cost of the tax associated with this specific fee.
@@ -2303,7 +2411,10 @@ export interface FeeObject {
2303
2411
  * @example 120
2304
2412
  */
2305
2413
  total_amount_cents: number;
2306
- /** The currency of this specific fee, including any applicable taxes. */
2414
+ /**
2415
+ * The currency of this specific fee, including any applicable taxes.
2416
+ * @example "EUR"
2417
+ */
2307
2418
  total_amount_currency: Currency;
2308
2419
  /**
2309
2420
  * 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 +2721,10 @@ export interface GrossRevenueObject {
2610
2721
  * @example 50000
2611
2722
  */
2612
2723
  amount_cents: number;
2613
- /** The currency of revenue analytics. Format must be ISO 4217. */
2724
+ /**
2725
+ * The currency of revenue analytics. Format must be ISO 4217.
2726
+ * @example "USD"
2727
+ */
2614
2728
  currency: Currency;
2615
2729
  /**
2616
2730
  * Contains invoices count.
@@ -2770,7 +2884,10 @@ export interface MrrObject {
2770
2884
  * @example 50000
2771
2885
  */
2772
2886
  amount_cents?: number;
2773
- /** The currency of MRR analytics. Format must be ISO 4217. */
2887
+ /**
2888
+ * The currency of MRR analytics. Format must be ISO 4217.
2889
+ * @example "USD"
2890
+ */
2774
2891
  currency?: Currency;
2775
2892
  }
2776
2893
  export interface Mrrs {
@@ -2813,7 +2930,10 @@ export interface InvoiceCollectionObject {
2813
2930
  * @example 50000
2814
2931
  */
2815
2932
  amount_cents?: number;
2816
- /** The currency of revenue analytics. Format must be ISO 4217. */
2933
+ /**
2934
+ * The currency of revenue analytics. Format must be ISO 4217.
2935
+ * @example "USD"
2936
+ */
2817
2937
  currency?: Currency;
2818
2938
  }
2819
2939
  export interface InvoiceCollections {
@@ -2835,7 +2955,10 @@ export interface InvoicedUsageObject {
2835
2955
  * @example 50000
2836
2956
  */
2837
2957
  amount_cents: number;
2838
- /** The currency of revenue analytics. Format must be ISO 4217. */
2958
+ /**
2959
+ * The currency of revenue analytics. Format must be ISO 4217.
2960
+ * @example "USD"
2961
+ */
2839
2962
  currency: Currency;
2840
2963
  }
2841
2964
  export interface InvoicedUsages {
@@ -2916,14 +3039,15 @@ export type InvoiceObject = {
2916
3039
  */
2917
3040
  invoice_type: "subscription" | "add_on" | "credit" | "one_off" | "progressive_billing";
2918
3041
  /**
2919
- * The status of the invoice. It indicates the current state of the invoice and can have two possible values:
3042
+ * The status of the invoice. It indicates the current state of the invoice and can have following values:
2920
3043
  * - `draft`: the invoice is in the draft state, waiting for the end of the grace period to be finalized. During this period, events can still be ingested and added to the invoice.
2921
3044
  * - `finalized`: the invoice has been issued and finalized. In this state, events cannot be ingested or added to the invoice anymore.
2922
3045
  * - `voided`: the invoice has been issued and subsequently voided. In this state, events cannot be ingested or added to the invoice anymore.
3046
+ * - `pending`: the invoice remains pending until the taxes are fetched from the external provider.
2923
3047
  * - `failed`: during an attempt of finalization of the invoice, an error happened. This invoice will have an array of error_details, explaining, in which part of the system an error happened and how it's possible to fix it. This invoice can't be edited or updated, only retried. This action will discard current error_details and will create new ones if the finalization failed again.
2924
3048
  * @example "finalized"
2925
3049
  */
2926
- status: "draft" | "finalized" | "voided" | "failed";
3050
+ status: "draft" | "finalized" | "voided" | "failed" | "pending";
2927
3051
  /**
2928
3052
  * The status of the payment associated with the invoice. It can have one of the following values:
2929
3053
  * - `pending`: the payment is pending, waiting for payment processing in Stripe or when the invoice is emitted but users have not updated the payment status through the endpoint.
@@ -2932,7 +3056,10 @@ export type InvoiceObject = {
2932
3056
  * @example "succeeded"
2933
3057
  */
2934
3058
  payment_status: "pending" | "succeeded" | "failed";
2935
- /** The currency of the invoice issued. */
3059
+ /**
3060
+ * The currency of the invoice issued.
3061
+ * @example "EUR"
3062
+ */
2936
3063
  currency: Currency;
2937
3064
  /**
2938
3065
  * 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.
@@ -2995,6 +3122,18 @@ export type InvoiceObject = {
2995
3122
  * @example "https://getlago.com/invoice/file"
2996
3123
  */
2997
3124
  file_url?: string;
3125
+ /**
3126
+ * The date of the invoice creation, represented in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC). The creation_date provides a standardized and internationally recognized timestamp for when the invoice object was created
3127
+ * @format date-time
3128
+ * @example "2022-04-29T08:59:51Z"
3129
+ */
3130
+ created_at: string;
3131
+ /**
3132
+ * The date of the invoice update, represented in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC). The update_date provides a standardized and internationally recognized timestamp for when the invoice object was updated
3133
+ * @format date-time
3134
+ * @example "2022-04-29T08:59:51Z"
3135
+ */
3136
+ updated_at: string;
2998
3137
  } & {
2999
3138
  /** The customer on which the invoice applies. It refers to the customer account or entity associated with the invoice. */
3000
3139
  customer?: CustomerObject;
@@ -3032,7 +3171,10 @@ export interface InvoiceOneOffCreateInput {
3032
3171
  * @example "hooli_1234"
3033
3172
  */
3034
3173
  external_customer_id: string;
3035
- /** The currency of the invoice. */
3174
+ /**
3175
+ * The currency of the invoice.
3176
+ * @example "EUR"
3177
+ */
3036
3178
  currency?: Currency;
3037
3179
  fees: {
3038
3180
  /**
@@ -3149,9 +3291,15 @@ export interface OrganizationObject {
3149
3291
  * @example ["https://webhook.brex.com","https://webhook2.brex.com"]
3150
3292
  */
3151
3293
  webhook_urls?: string[] | null;
3152
- /** The country of your organization. */
3153
- country?: Country;
3154
- /** The default currency of an organization. */
3294
+ /**
3295
+ * The country of your organization.
3296
+ * @example "US"
3297
+ */
3298
+ country?: Country | null;
3299
+ /**
3300
+ * The default currency of an organization.
3301
+ * @example "USD"
3302
+ */
3155
3303
  default_currency?: Currency;
3156
3304
  /**
3157
3305
  * The first line of your organization's billing address.
@@ -3219,7 +3367,10 @@ export interface OrganizationObject {
3219
3367
  * @example "US123456789"
3220
3368
  */
3221
3369
  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. */
3370
+ /**
3371
+ * Your organization's timezone, used for billing purposes in your own local time. Can be overwritten by the customer's timezone.
3372
+ * @example "America/New_York"
3373
+ */
3223
3374
  timezone?: Timezone;
3224
3375
  /** The custom billing settings for your organization. */
3225
3376
  billing_configuration: OrganizationBillingConfiguration;
@@ -3238,9 +3389,15 @@ export interface OrganizationUpdateInput {
3238
3389
  * @example "https://webhook.brex.com"
3239
3390
  */
3240
3391
  webhook_url?: string | null;
3241
- /** The country of your organization. */
3242
- country?: Country;
3243
- /** The default currency of an organization. */
3392
+ /**
3393
+ * The country of your organization.
3394
+ * @example "US"
3395
+ */
3396
+ country?: Country | null;
3397
+ /**
3398
+ * The default currency of an organization.
3399
+ * @example "USD"
3400
+ */
3244
3401
  default_currency?: Currency;
3245
3402
  /**
3246
3403
  * The first line of your organization's billing address.
@@ -3308,7 +3465,10 @@ export interface OrganizationUpdateInput {
3308
3465
  * @example "US123456789"
3309
3466
  */
3310
3467
  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. */
3468
+ /**
3469
+ * Your organization's timezone, used for billing purposes in your own local time. Can be overwritten by the customer's timezone.
3470
+ * @example "America/New_York"
3471
+ */
3312
3472
  timezone?: Timezone;
3313
3473
  /**
3314
3474
  * 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 +3495,10 @@ export interface OverdueBalanceObject {
3335
3495
  * @example 50000
3336
3496
  */
3337
3497
  amount_cents: number;
3338
- /** The currency of revenue analytics. Format must be ISO 4217. */
3498
+ /**
3499
+ * The currency of revenue analytics. Format must be ISO 4217.
3500
+ * @example "USD"
3501
+ */
3339
3502
  currency: Currency;
3340
3503
  /**
3341
3504
  * The Lago invoice IDs associated with the revenue.
@@ -3391,7 +3554,10 @@ export interface PaymentRequestObject {
3391
3554
  * @example 100
3392
3555
  */
3393
3556
  amount_cents: number;
3394
- /** The currency of the payment request. */
3557
+ /**
3558
+ * The currency of the payment request.
3559
+ * @example "EUR"
3560
+ */
3395
3561
  amount_currency: Currency;
3396
3562
  /**
3397
3563
  * The status of the payment associated with the payment request. It can have one of the following values:
@@ -3450,7 +3616,10 @@ export interface PlanCreateInput {
3450
3616
  * @example 10000
3451
3617
  */
3452
3618
  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. */
3619
+ /**
3620
+ * The currency of the plan. It indicates the monetary unit in which the plan's cost, including taxes and usage-based charges, is expressed.
3621
+ * @example "USD"
3622
+ */
3454
3623
  amount_currency?: Currency;
3455
3624
  /**
3456
3625
  * The duration in days during which the base cost of the plan is offered for free.
@@ -3549,7 +3718,10 @@ export interface PlanOverridesObject {
3549
3718
  * @example 10000
3550
3719
  */
3551
3720
  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. */
3721
+ /**
3722
+ * The currency of the plan. It indicates the monetary unit in which the plan's cost, including taxes and usage-based charges, is expressed.
3723
+ * @example "USD"
3724
+ */
3553
3725
  amount_currency?: Currency;
3554
3726
  /**
3555
3727
  * The description on the plan.
@@ -3646,7 +3818,10 @@ export interface PlanUpdateInput {
3646
3818
  * @example 10000
3647
3819
  */
3648
3820
  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. */
3821
+ /**
3822
+ * The currency of the plan. It indicates the monetary unit in which the plan's cost, including taxes and usage-based charges, is expressed.
3823
+ * @example "USD"
3824
+ */
3650
3825
  amount_currency?: Currency;
3651
3826
  /**
3652
3827
  * The duration in days during which the base cost of the plan is offered for free.
@@ -3792,7 +3967,10 @@ export interface PlanObject {
3792
3967
  * @example 10000
3793
3968
  */
3794
3969
  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. */
3970
+ /**
3971
+ * The currency of the plan. It indicates the monetary unit in which the plan's cost, including taxes and usage-based charges, is expressed.
3972
+ * @example "USD"
3973
+ */
3796
3974
  amount_currency: Currency;
3797
3975
  /**
3798
3976
  * The duration in days during which the base cost of the plan is offered for free.
@@ -3809,16 +3987,6 @@ export interface PlanObject {
3809
3987
  * @example null
3810
3988
  */
3811
3989
  bill_charges_monthly?: boolean | null;
3812
- /**
3813
- * The count of active subscriptions that are currently associated with the plan. This field provides valuable information regarding the impact of deleting the plan. By checking the value of this field, you can determine the number of subscriptions that will be affected if the plan is deleted.
3814
- * @example 0
3815
- */
3816
- active_subscriptions_count: number;
3817
- /**
3818
- * The number of draft invoices that include a subscription attached to the plan. This field provides valuable information about the impact of deleting the plan. By checking the value of this field, you can determine the number of draft invoices that will be affected if the plan is deleted.
3819
- * @example 0
3820
- */
3821
- draft_invoices_count: number;
3822
3990
  minimum_commitment?: MinimumCommitmentObject;
3823
3991
  /**
3824
3992
  * Additional usage-based charges for this plan.
@@ -3978,7 +4146,7 @@ export interface SubscriptionObject {
3978
4146
  * @format date-time
3979
4147
  * @example "2022-10-08T00:00:00Z"
3980
4148
  */
3981
- ending_at?: string;
4149
+ ending_at?: string | null;
3982
4150
  /**
3983
4151
  * The anniversary date and time of the initial subscription. This date serves as the basis for billing subscriptions with `anniversary` billing time. The `anniversary_date` should be provided in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC).
3984
4152
  * @format date-time
@@ -4103,26 +4271,6 @@ export interface TaxObject {
4103
4271
  * @example true
4104
4272
  */
4105
4273
  applied_to_organization: boolean;
4106
- /**
4107
- * Number of add-ons this tax is applied to.
4108
- * @example 0
4109
- */
4110
- add_ons_count?: number;
4111
- /**
4112
- * Number of charges this tax is applied to.
4113
- * @example 0
4114
- */
4115
- charges_count?: number;
4116
- /**
4117
- * Number of customers this tax is applied to (directly or via the organization's default).
4118
- * @example 0
4119
- */
4120
- customers_count: number;
4121
- /**
4122
- * Number of plans this tax is applied to.
4123
- * @example 0
4124
- */
4125
- plans_count?: number;
4126
4274
  /**
4127
4275
  * Creation date of the tax.
4128
4276
  * @format date-time
@@ -4209,7 +4357,10 @@ export interface WalletCreateInput {
4209
4357
  * @example "1.5"
4210
4358
  */
4211
4359
  rate_amount: string;
4212
- /** The currency of the wallet. */
4360
+ /**
4361
+ * The currency of the wallet.
4362
+ * @example "USD"
4363
+ */
4213
4364
  currency: Currency;
4214
4365
  /**
4215
4366
  * The number of paid credits. Required only if there is no granted credits.
@@ -4337,7 +4488,10 @@ export interface WalletObject {
4337
4488
  * @example "active"
4338
4489
  */
4339
4490
  status: "active" | "terminated";
4340
- /** The currency of the wallet. */
4491
+ /**
4492
+ * The currency of the wallet.
4493
+ * @example "USD"
4494
+ */
4341
4495
  currency: Currency;
4342
4496
  /**
4343
4497
  * The name of the wallet.
@@ -4483,7 +4637,7 @@ export interface WalletObject {
4483
4637
  */
4484
4638
  ongoing_balance_cents: number;
4485
4639
  /**
4486
- * The ongoing usage balance of the wallet, expressed in cents. This reflects all current usage including taxes.
4640
+ * The ongoing usage balance of the wallet, expressed in cents. This reflects all current usage and draft invoices including taxes.
4487
4641
  * @example 200
4488
4642
  */
4489
4643
  ongoing_usage_balance_cents: number;
@@ -4494,7 +4648,7 @@ export interface WalletObject {
4494
4648
  */
4495
4649
  credits_ongoing_balance: string;
4496
4650
  /**
4497
- * The ongoing usage balance of the wallet, expressed in credits. This reflects all current usage including taxes.
4651
+ * The ongoing usage balance of the wallet, expressed in credits. This reflects all current usage and draft invoices including taxes.
4498
4652
  * @pattern ^[0-9]+.?[0-9]*$
4499
4653
  * @example "2.0"
4500
4654
  */
@@ -4840,7 +4994,7 @@ export declare class HttpClient<SecurityDataType = unknown> {
4840
4994
  }
4841
4995
  /**
4842
4996
  * @title Lago API documentation
4843
- * @version 1.16.0
4997
+ * @version 1.18.0
4844
4998
  * @license AGPLv3
4845
4999
  * @baseUrl https://api.getlago.com/api/v1
4846
5000
  * @externalDocs https://github.com/getlago
@@ -5236,6 +5390,49 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
5236
5390
  * @example "5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba"
5237
5391
  */
5238
5392
  external_customer_id?: string;
5393
+ /**
5394
+ * Filter credit notes starting from a specific date.
5395
+ * @format date
5396
+ * @example "2022-07-08"
5397
+ */
5398
+ issuing_date_from?: string;
5399
+ /**
5400
+ * Filter credit notes up to a specific date.
5401
+ * @format date
5402
+ * @example "2022-08-09"
5403
+ */
5404
+ issuing_date_to?: string;
5405
+ /**
5406
+ * Search credit notes by id, number, customer name, customer external_id or customer email.
5407
+ * @example "Jane"
5408
+ */
5409
+ search_term?: string;
5410
+ /**
5411
+ * Filter credit notes by currency. Possible values ISO 4217 currency codes.
5412
+ * @example "EUR"
5413
+ */
5414
+ currency?: string;
5415
+ /** Filter credit notes by reasons. Possible values are `product_unsatisfactory`, `order_change`, `order_cancellation`, `fraudulent_charge`, `duplicated_charge` or `other`. */
5416
+ reason?: "product_unsatisfactory" | "order_change" | "order_cancellation" | "fraudulent_charge" | "duplicated_charge" | "other";
5417
+ /** Filter credit notes by credit status. Possible values are `available`, `consumed` or `voided`. */
5418
+ credit_status?: "available" | "consumed" | "voided";
5419
+ /** Filter credit notes by refund status. Possible values are `pending`, `succeeded` or `failed`. */
5420
+ refund_status?: "pending" | "succeeded" | "failed";
5421
+ /**
5422
+ * Filter credit notes by their related invoice number.
5423
+ * @example "INV-001-002"
5424
+ */
5425
+ invoice_number?: string;
5426
+ /**
5427
+ * Filter credit notes of at least a specific amount. This parameter must be defined in cents to ensure consistent handling for all currency types.
5428
+ * @example 9000
5429
+ */
5430
+ amount_from?: number;
5431
+ /**
5432
+ * Filter credit notes up to a specific amount. This parameter must be defined in cents to ensure consistent handling for all currency types.
5433
+ * @example 100000
5434
+ */
5435
+ amount_to?: number;
5239
5436
  }, params?: RequestParams) => Promise<HttpResponse<CreditNotes, ApiErrorUnauthorized>>;
5240
5437
  /**
5241
5438
  * @description This endpoint updates an existing credit note.
@@ -5573,6 +5770,11 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
5573
5770
  * @example "5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba"
5574
5771
  */
5575
5772
  external_subscription_id?: string;
5773
+ /**
5774
+ * Filter results by event transaction ID
5775
+ * @example "et_12345678"
5776
+ */
5777
+ event_transaction_id?: string;
5576
5778
  /** Filter results by fee's currency. */
5577
5779
  currency?: Currency;
5578
5780
  /**
@@ -5733,7 +5935,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
5733
5935
  */
5734
5936
  search_term?: string;
5735
5937
  /**
5736
- * Filter invoices by currency in. Possible values ISO 4217 currency codes.
5938
+ * Filter invoices by currency. Possible values ISO 4217 currency codes.
5737
5939
  * @example "EUR"
5738
5940
  */
5739
5941
  currency?: string;