lago-javascript-client 1.52.1 → 1.53.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.
@@ -1,7 +1,7 @@
1
1
  /** @example "USD" */
2
2
  export type Currency = "AED" | "AFN" | "ALL" | "AMD" | "ANG" | "AOA" | "ARS" | "AUD" | "AWG" | "AZN" | "BAM" | "BBD" | "BDT" | "BGN" | "BIF" | "BMD" | "BND" | "BOB" | "BRL" | "BSD" | "BWP" | "BYN" | "BZD" | "CAD" | "CDF" | "CHF" | "CLF" | "CLP" | "CNY" | "COP" | "CRC" | "CVE" | "CZK" | "DJF" | "DKK" | "DOP" | "DZD" | "EGP" | "ETB" | "EUR" | "FJD" | "FKP" | "GBP" | "GEL" | "GHS" | "GIP" | "GMD" | "GNF" | "GTQ" | "GYD" | "HKD" | "HNL" | "HRK" | "HTG" | "HUF" | "IDR" | "ILS" | "INR" | "ISK" | "JMD" | "JPY" | "KES" | "KGS" | "KHR" | "KMF" | "KRW" | "KYD" | "KZT" | "LAK" | "LBP" | "LKR" | "LRD" | "LSL" | "MAD" | "MDL" | "MGA" | "MKD" | "MMK" | "MNT" | "MOP" | "MRO" | "MUR" | "MVR" | "MWK" | "MXN" | "MYR" | "MZN" | "NAD" | "NGN" | "NIO" | "NOK" | "NPR" | "NZD" | "PAB" | "PEN" | "PGK" | "PHP" | "PKR" | "PLN" | "PYG" | "QAR" | "RON" | "RSD" | "RUB" | "RWF" | "SAR" | "SBD" | "SCR" | "SEK" | "SGD" | "SHP" | "SLL" | "SOS" | "SRD" | "STD" | "SZL" | "THB" | "TJS" | "TOP" | "TRY" | "TTD" | "TWD" | "TZS" | "UAH" | "UGX" | "USD" | "UYU" | "UZS" | "VND" | "VUV" | "WST" | "XAF" | "XCD" | "XOF" | "XPF" | "YER" | "ZAR" | "ZMW";
3
3
  /** @example "US" */
4
- export type Country = "AD" | "AE" | "AF" | "AG" | "AI" | "AL" | "AM" | "AO" | "AQ" | "AR" | "AS" | "AT" | "AU" | "AW" | "AX" | "AZ" | "BA" | "BB" | "BD" | "BE" | "BF" | "BG" | "BH" | "BI" | "BJ" | "BL" | "BM" | "BN" | "BO" | "BQ" | "BR" | "BS" | "BT" | "BV" | "BW" | "BY" | "BZ" | "CA" | "CC" | "CD" | "CF" | "CG" | "CH" | "CI" | "CK" | "CL" | "CM" | "CN" | "CO" | "CR" | "CU" | "CV" | "CW" | "CX" | "CY" | "CZ" | "DE" | "DJ" | "DK" | "DM" | "DO" | "DZ" | "EC" | "EE" | "EG" | "EH" | "ER" | "ES" | "ET" | "FI" | "FJ" | "FK" | "FM" | "FO" | "FR" | "GA" | "GB" | "GD" | "GE" | "GF" | "GG" | "GH" | "GI" | "GL" | "GM" | "GN" | "GP" | "GQ" | "GR" | "GS" | "GT" | "GU" | "GW" | "GY" | "HK" | "HM" | "HN" | "HR" | "HT" | "HU" | "ID" | "IE" | "IL" | "IM" | "IN" | "IO" | "IQ" | "IR" | "IS" | "IT" | "JE" | "JM" | "JO" | "JP" | "KE" | "KG" | "KH" | "KI" | "KM" | "KN" | "KP" | "KR" | "KW" | "KY" | "KZ" | "LA" | "LB" | "LC" | "LI" | "LK" | "LR" | "LS" | "LT" | "LU" | "LV" | "LY" | "MA" | "MC" | "MD" | "ME" | "MF" | "MG" | "MH" | "MK" | "ML" | "MM" | "MN" | "MO" | "MP" | "MQ" | "MR" | "MS" | "MT" | "MU" | "MV" | "MW" | "MX" | "MY" | "MZ" | "NA" | "NC" | "NE" | "NF" | "NG" | "NI" | "NL" | "NO" | "NP" | "NR" | "NU" | "NZ" | "OM" | "PA" | "PE" | "PF" | "PG" | "PH" | "PK" | "PL" | "PM" | "PN" | "PR" | "PS" | "PT" | "PW" | "PY" | "QA" | "RE" | "RO" | "RS" | "RU" | "RW" | "SA" | "SB" | "SC" | "SD" | "SE" | "SG" | "SH" | "SI" | "SJ" | "SK" | "SL" | "SM" | "SN" | "SO" | "SR" | "SS" | "ST" | "SV" | "SX" | "SY" | "SZ" | "TC" | "TD" | "TF" | "TG" | "TH" | "TJ" | "TK" | "TL" | "TM" | "TN" | "TO" | "TR" | "TT" | "TV" | "TW" | "TZ" | "UA" | "UG" | "UM" | "US" | "UY" | "UZ" | "VA" | "VC" | "VE" | "VG" | "VI" | "VN" | "VU" | "WF" | "WS" | "YE" | "YT" | "ZA" | "ZM" | "ZW";
4
+ export type CountryOrNull = "AD" | "AE" | "AF" | "AG" | "AI" | "AL" | "AM" | "AO" | "AQ" | "AR" | "AS" | "AT" | "AU" | "AW" | "AX" | "AZ" | "BA" | "BB" | "BD" | "BE" | "BF" | "BG" | "BH" | "BI" | "BJ" | "BL" | "BM" | "BN" | "BO" | "BQ" | "BR" | "BS" | "BT" | "BV" | "BW" | "BY" | "BZ" | "CA" | "CC" | "CD" | "CF" | "CG" | "CH" | "CI" | "CK" | "CL" | "CM" | "CN" | "CO" | "CR" | "CU" | "CV" | "CW" | "CX" | "CY" | "CZ" | "DE" | "DJ" | "DK" | "DM" | "DO" | "DZ" | "EC" | "EE" | "EG" | "EH" | "ER" | "ES" | "ET" | "FI" | "FJ" | "FK" | "FM" | "FO" | "FR" | "GA" | "GB" | "GD" | "GE" | "GF" | "GG" | "GH" | "GI" | "GL" | "GM" | "GN" | "GP" | "GQ" | "GR" | "GS" | "GT" | "GU" | "GW" | "GY" | "HK" | "HM" | "HN" | "HR" | "HT" | "HU" | "ID" | "IE" | "IL" | "IM" | "IN" | "IO" | "IQ" | "IR" | "IS" | "IT" | "JE" | "JM" | "JO" | "JP" | "KE" | "KG" | "KH" | "KI" | "KM" | "KN" | "KP" | "KR" | "KW" | "KY" | "KZ" | "LA" | "LB" | "LC" | "LI" | "LK" | "LR" | "LS" | "LT" | "LU" | "LV" | "LY" | "MA" | "MC" | "MD" | "ME" | "MF" | "MG" | "MH" | "MK" | "ML" | "MM" | "MN" | "MO" | "MP" | "MQ" | "MR" | "MS" | "MT" | "MU" | "MV" | "MW" | "MX" | "MY" | "MZ" | "NA" | "NC" | "NE" | "NF" | "NG" | "NI" | "NL" | "NO" | "NP" | "NR" | "NU" | "NZ" | "OM" | "PA" | "PE" | "PF" | "PG" | "PH" | "PK" | "PL" | "PM" | "PN" | "PR" | "PS" | "PT" | "PW" | "PY" | "QA" | "RE" | "RO" | "RS" | "RU" | "RW" | "SA" | "SB" | "SC" | "SD" | "SE" | "SG" | "SH" | "SI" | "SJ" | "SK" | "SL" | "SM" | "SN" | "SO" | "SR" | "SS" | "ST" | "SV" | "SX" | "SY" | "SZ" | "TC" | "TD" | "TF" | "TG" | "TH" | "TJ" | "TK" | "TL" | "TM" | "TN" | "TO" | "TR" | "TT" | "TV" | "TW" | "TZ" | "UA" | "UG" | "UM" | "US" | "UY" | "UZ" | "VA" | "VC" | "VE" | "VG" | "VI" | "VN" | "VU" | "WF" | "WS" | "YE" | "YT" | "ZA" | "ZM" | "ZW";
5
5
  /** @example "America/Los_Angeles" */
6
6
  export type Timezone = "UTC" | "Africa/Algiers" | "Africa/Cairo" | "Africa/Casablanca" | "Africa/Harare" | "Africa/Johannesburg" | "Africa/Monrovia" | "Africa/Nairobi" | "America/Argentina/Buenos_Aires" | "America/Bogota" | "America/Caracas" | "America/Chicago" | "America/Chihuahua" | "America/Denver" | "America/Guatemala" | "America/Guyana" | "America/Halifax" | "America/Indiana/Indianapolis" | "America/Juneau" | "America/La_Paz" | "America/Lima" | "America/Los_Angeles" | "America/Mazatlan" | "America/Mexico_City" | "America/Monterrey" | "America/Montevideo" | "America/New_York" | "America/Nuuk" | "America/Phoenix" | "America/Puerto_Rico" | "America/Regina" | "America/Santiago" | "America/Sao_Paulo" | "America/St_Johns" | "America/Tijuana" | "Asia/Almaty" | "Asia/Baghdad" | "Asia/Baku" | "Asia/Bangkok" | "Asia/Chongqing" | "Asia/Colombo" | "Asia/Dhaka" | "Asia/Hong_Kong" | "Asia/Irkutsk" | "Asia/Jakarta" | "Asia/Jerusalem" | "Asia/Kabul" | "Asia/Kamchatka" | "Asia/Karachi" | "Asia/Kathmandu" | "Asia/Kolkata" | "Asia/Krasnoyarsk" | "Asia/Kuala_Lumpur" | "Asia/Kuwait" | "Asia/Magadan" | "Asia/Muscat" | "Asia/Novosibirsk" | "Asia/Riyadh" | "Asia/Seoul" | "Asia/Shanghai" | "Asia/Singapore" | "Asia/Srednekolymsk" | "Asia/Taipei" | "Asia/Tashkent" | "Asia/Tbilisi" | "Asia/Tehran" | "Asia/Tokyo" | "Asia/Ulaanbaatar" | "Asia/Urumqi" | "Asia/Vladivostok" | "Asia/Yakutsk" | "Asia/Yangon" | "Asia/Yekaterinburg" | "Asia/Yerevan" | "Atlantic/Azores" | "Atlantic/Cape_Verde" | "Atlantic/South_Georgia" | "Australia/Adelaide" | "Australia/Brisbane" | "Australia/Darwin" | "Australia/Hobart" | "Australia/Melbourne" | "Australia/Perth" | "Australia/Sydney" | "Europe/Amsterdam" | "Europe/Athens" | "Europe/Belgrade" | "Europe/Berlin" | "Europe/Bratislava" | "Europe/Brussels" | "Europe/Bucharest" | "Europe/Budapest" | "Europe/Copenhagen" | "Europe/Dublin" | "Europe/Helsinki" | "Europe/Istanbul" | "Europe/Kaliningrad" | "Europe/Kyiv" | "Europe/Lisbon" | "Europe/Ljubljana" | "Europe/London" | "Europe/Madrid" | "Europe/Minsk" | "Europe/Moscow" | "Europe/Paris" | "Europe/Prague" | "Europe/Riga" | "Europe/Rome" | "Europe/Samara" | "Europe/Sarajevo" | "Europe/Skopje" | "Europe/Sofia" | "Europe/Stockholm" | "Europe/Tallinn" | "Europe/Vienna" | "Europe/Vilnius" | "Europe/Volgograd" | "Europe/Warsaw" | "Europe/Zagreb" | "Europe/Zurich" | "GMT+12" | "Pacific/Apia" | "Pacific/Auckland" | "Pacific/Chatham" | "Pacific/Fakaofo" | "Pacific/Fiji" | "Pacific/Guadalcanal" | "Pacific/Guam" | "Pacific/Honolulu" | "Pacific/Majuro" | "Pacific/Midway" | "Pacific/Noumea" | "Pacific/Pago_Pago" | "Pacific/Port_Moresby" | "Pacific/Tongatapu";
7
7
  /** Billing entity object */
@@ -70,7 +70,7 @@ export interface BillingEntityObject {
70
70
  */
71
71
  subscription_invoice_issuing_date_adjustment?: "align_with_finalization_date" | "keep_anchor";
72
72
  /**
73
- * Whether this billing entity is the default billing entity for the organization. Default billing entity will be used as fallback in services if no billing entity is specified when billing_entity is not provided. Default billing entity is the billing entity that will be used to generate invoices if no billing entity is specified when invoice is created. is the oldest active billing entity and this flag cannot be changed
73
+ * Whether this billing entity is the organization's default billing entity. The default billing entity is the oldest active one, and is used as a fallback whenever no billing entity is provided, for example when an invoice is created. This flag cannot be changed.
74
74
  * @example false
75
75
  */
76
76
  is_default?: boolean;
@@ -89,6 +89,11 @@ export interface BillingEntityObject {
89
89
  * @example "Suite 100"
90
90
  */
91
91
  address_line2?: string | null;
92
+ /**
93
+ * The phone number of the billing entity
94
+ * @example "1-171-883-3711 x245"
95
+ */
96
+ phone?: string | null;
92
97
  /**
93
98
  * The city of the billing address
94
99
  * @example "Woodland Hills"
@@ -100,7 +105,7 @@ export interface BillingEntityObject {
100
105
  */
101
106
  state?: string | null;
102
107
  /** The country code of the billing address */
103
- country?: Country | null;
108
+ country?: CountryOrNull;
104
109
  /**
105
110
  * The zipcode of the billing address
106
111
  * @example "91364"
@@ -139,6 +144,11 @@ export interface BillingEntityObject {
139
144
  * @example false
140
145
  */
141
146
  eu_tax_management?: boolean;
147
+ /**
148
+ * Whether e-invoicing is enabled for this billing entity
149
+ * @example false
150
+ */
151
+ einvoicing?: boolean;
142
152
  /**
143
153
  * The URL of the billing entity's logo
144
154
  * @format uri
@@ -255,6 +265,11 @@ export interface BillingEntityCreateInput {
255
265
  * @example "Suite 100"
256
266
  */
257
267
  address_line2?: string | null;
268
+ /**
269
+ * The phone number of the billing entity
270
+ * @example "1-171-883-3711 x245"
271
+ */
272
+ phone?: string | null;
258
273
  /**
259
274
  * The city of the billing address
260
275
  * @example "Woodland Hills"
@@ -266,7 +281,7 @@ export interface BillingEntityCreateInput {
266
281
  */
267
282
  state?: string | null;
268
283
  /** The country code of the billing address */
269
- country?: Country | null;
284
+ country?: CountryOrNull;
270
285
  /**
271
286
  * The zipcode of the billing address
272
287
  * @example "91364"
@@ -299,12 +314,17 @@ export interface BillingEntityCreateInput {
299
314
  */
300
315
  timezone?: Timezone;
301
316
  /** The email notification settings for this billing entity */
302
- email_settings?: ("invoice.finalized" | "credit_note.created")[];
317
+ email_settings?: ("invoice.finalized" | "credit_note.created" | "payment_receipt.created")[];
303
318
  /**
304
319
  * Whether EU tax management is enabled for this billing entity
305
320
  * @example false
306
321
  */
307
322
  eu_tax_management?: boolean;
323
+ /**
324
+ * Whether e-invoicing is enabled for this billing entity
325
+ * @example false
326
+ */
327
+ einvoicing?: boolean;
308
328
  /**
309
329
  * The base64 encoded logo image for the billing entity
310
330
  * @format uri
@@ -366,6 +386,11 @@ export interface TaxObject {
366
386
  * @example true
367
387
  */
368
388
  applied_to_organization: boolean;
389
+ /**
390
+ * The codes of the billing entities the tax is applied to, sorted alphabetically. It is empty when the tax is only attached to customers.
391
+ * @example ["acme_corp","foo_bar"]
392
+ */
393
+ applied_to_billing_entities_codes?: string[];
369
394
  /**
370
395
  * Creation date of the tax.
371
396
  * @format date-time
@@ -446,137 +471,149 @@ export interface ApiErrorNotFound {
446
471
  export type TaxCodes = string[];
447
472
  /** Billing entity update input */
448
473
  export interface BillingEntityUpdateInput {
449
- /**
450
- * The name of the billing entity
451
- * @example "Acme Corp"
452
- */
453
- name?: string;
454
- /**
455
- * The default currency of the billing entity
456
- * @example "USD"
457
- */
458
- default_currency?: Currency;
459
- /**
460
- * The type of document numbering for this billing entity:
461
- * - `per_customer`: document numbers are unique per customer
462
- * - `per_billing_entity`: document numbers are unique per billing entity
463
- */
464
- document_numbering?: "per_customer" | "per_billing_entity";
465
- /**
466
- * The prefix used in document numbers for this billing entity
467
- * @example "ABC-123"
468
- */
469
- document_number_prefix?: string | null;
470
- /**
471
- * Whether to finalize invoices with zero amount for this billing entity
472
- * @example true
473
- */
474
- finalize_zero_amount_invoice?: boolean;
475
- billing_configuration?: {
474
+ billing_entity: {
475
+ /**
476
+ * The name of the billing entity
477
+ * @example "Acme Corp"
478
+ */
479
+ name?: string;
480
+ /**
481
+ * The default currency of the billing entity
482
+ * @example "USD"
483
+ */
484
+ default_currency?: Currency;
485
+ /**
486
+ * The type of document numbering for this billing entity:
487
+ * - `per_customer`: document numbers are unique per customer
488
+ * - `per_billing_entity`: document numbers are unique per billing entity
489
+ */
490
+ document_numbering?: "per_customer" | "per_billing_entity";
476
491
  /**
477
- * The footer text to be displayed on invoices for this billing entity
478
- * @example "Thank you for your business"
492
+ * The prefix used in document numbers for this billing entity
493
+ * @example "ABC-123"
479
494
  */
480
- invoice_footer?: string;
495
+ document_number_prefix?: string | null;
481
496
  /**
482
- * The language of the documents generated for this billing entity
483
- * @example "en"
497
+ * Whether to finalize invoices with zero amount for this billing entity
498
+ * @example true
484
499
  */
485
- document_locale?: string;
500
+ finalize_zero_amount_invoice?: boolean;
501
+ billing_configuration?: {
502
+ /**
503
+ * The footer text to be displayed on invoices for this billing entity
504
+ * @example "Thank you for your business"
505
+ */
506
+ invoice_footer?: string;
507
+ /**
508
+ * The language of the documents generated for this billing entity
509
+ * @example "en"
510
+ */
511
+ document_locale?: string;
512
+ /**
513
+ * The grace period (in days) for invoice finalization
514
+ * @example 0
515
+ */
516
+ invoice_grace_period?: number;
517
+ /**
518
+ * Defines whether the issuing date follows the current billing period's end date or the next period starting date.
519
+ * @default "next_period_start"
520
+ */
521
+ subscription_invoice_issuing_date_anchor?: "current_period_end" | "next_period_start";
522
+ /**
523
+ * The logic applied on top of the subscription_invoice_issuing_date_anchor rule. You can opt to use the invoice finalization date, that includes any configured grace period.
524
+ * @default "align_with_finalization_date"
525
+ */
526
+ subscription_invoice_issuing_date_adjustment?: "align_with_finalization_date" | "keep_anchor";
527
+ };
486
528
  /**
487
- * The grace period (in days) for invoice finalization
529
+ * The net payment term (in days) for this billing entity
488
530
  * @example 0
489
531
  */
490
- invoice_grace_period?: number;
532
+ net_payment_term?: number;
533
+ /**
534
+ * The first line of the billing address
535
+ * @example "5230 Penfield Ave"
536
+ */
537
+ address_line1?: string | null;
538
+ /**
539
+ * The second line of the billing address
540
+ * @example "Suite 100"
541
+ */
542
+ address_line2?: string | null;
543
+ /**
544
+ * The phone number of the billing entity
545
+ * @example "1-171-883-3711 x245"
546
+ */
547
+ phone?: string | null;
548
+ /**
549
+ * The city of the billing address
550
+ * @example "Woodland Hills"
551
+ */
552
+ city?: string | null;
553
+ /**
554
+ * The state of the billing address
555
+ * @example "CA"
556
+ */
557
+ state?: string | null;
558
+ /** The country code of the billing address */
559
+ country?: CountryOrNull;
560
+ /**
561
+ * The zipcode of the billing address
562
+ * @example "91364"
563
+ */
564
+ zipcode?: string | null;
565
+ /**
566
+ * The email address of the billing entity
567
+ * @format email
568
+ * @example "billing@acme.com"
569
+ */
570
+ email?: string | null;
571
+ /**
572
+ * The legal name of the billing entity
573
+ * @example "Acme Corporation"
574
+ */
575
+ legal_name?: string | null;
576
+ /**
577
+ * The legal registration number of the billing entity
578
+ * @example "US123456789"
579
+ */
580
+ legal_number?: string | null;
581
+ /**
582
+ * The tax identification number of the billing entity
583
+ * @example "EU123456789"
584
+ */
585
+ tax_identification_number?: string | null;
586
+ /**
587
+ * The timezone of the billing entity
588
+ * @example "UTC"
589
+ */
590
+ timezone?: Timezone;
591
+ /** The tax codes that should be associated with this billing entity */
592
+ tax_codes?: TaxCodes;
593
+ /** The email notification settings for this billing entity */
594
+ email_settings?: ("invoice.finalized" | "credit_note.created" | "payment_receipt.created")[];
491
595
  /**
492
- * Defines whether the issuing date follows the current billing period's end date or the next period starting date.
493
- * @default "next_period_start"
596
+ * Whether EU tax management is enabled for this billing entity
597
+ * @example false
494
598
  */
495
- subscription_invoice_issuing_date_anchor?: "current_period_end" | "next_period_start";
599
+ eu_tax_management?: boolean;
496
600
  /**
497
- * The logic applied on top of the subscription_invoice_issuing_date_anchor rule. You can opt to use the invoice finalization date, that includes any configured grace period.
498
- * @default "align_with_finalization_date"
601
+ * Whether e-invoicing is enabled for this billing entity
602
+ * @example false
499
603
  */
500
- subscription_invoice_issuing_date_adjustment?: "align_with_finalization_date" | "keep_anchor";
604
+ einvoicing?: boolean;
605
+ /**
606
+ * The base64 encoded logo image for the billing entity. Sending "null" will remove the logo, if any exist.
607
+ * @format uri
608
+ * @example "data:image/png;base64,..."
609
+ */
610
+ logo?: string | null;
611
+ /**
612
+ * The codes of the invoice custom section that should be associated with this billing entity
613
+ * @example ["custom_section_1","custom_section_2"]
614
+ */
615
+ invoice_custom_section_codes?: string[];
501
616
  };
502
- /**
503
- * The net payment term (in days) for this billing entity
504
- * @example 0
505
- */
506
- net_payment_term?: number;
507
- /**
508
- * The first line of the billing address
509
- * @example "5230 Penfield Ave"
510
- */
511
- address_line1?: string | null;
512
- /**
513
- * The second line of the billing address
514
- * @example "Suite 100"
515
- */
516
- address_line2?: string | null;
517
- /**
518
- * The city of the billing address
519
- * @example "Woodland Hills"
520
- */
521
- city?: string | null;
522
- /**
523
- * The state of the billing address
524
- * @example "CA"
525
- */
526
- state?: string | null;
527
- /** The country code of the billing address */
528
- country?: Country | null;
529
- /**
530
- * The zipcode of the billing address
531
- * @example "91364"
532
- */
533
- zipcode?: string | null;
534
- /**
535
- * The email address of the billing entity
536
- * @format email
537
- * @example "billing@acme.com"
538
- */
539
- email?: string | null;
540
- /**
541
- * The legal name of the billing entity
542
- * @example "Acme Corporation"
543
- */
544
- legal_name?: string | null;
545
- /**
546
- * The legal registration number of the billing entity
547
- * @example "US123456789"
548
- */
549
- legal_number?: string | null;
550
- /**
551
- * The tax identification number of the billing entity
552
- * @example "EU123456789"
553
- */
554
- tax_identification_number?: string | null;
555
- /**
556
- * The timezone of the billing entity
557
- * @example "UTC"
558
- */
559
- timezone?: Timezone;
560
- /** The tax codes that should be associated with this billing entity */
561
- tax_codes?: TaxCodes;
562
- /** The email notification settings for this billing entity */
563
- email_settings?: ("invoice.finalized" | "credit_note.created")[];
564
- /**
565
- * Whether EU tax management is enabled for this billing entity
566
- * @example false
567
- */
568
- eu_tax_management?: boolean;
569
- /**
570
- * The base64 encoded logo image for the billing entity. Sending "null" will remove the logo, if any exist.
571
- * @format uri
572
- * @example "data:image/png;base64,..."
573
- */
574
- logo?: string | null;
575
- /**
576
- * The codes of the invoice custom section that should be associated with this billing entity
577
- * @example ["custom_section_1","custom_section_2"]
578
- */
579
- invoice_custom_section_codes?: string[];
580
617
  }
581
618
  export interface ActivityLogObject {
582
619
  /**
@@ -867,6 +904,12 @@ export interface GrossRevenueObject {
867
904
  * @example 10
868
905
  */
869
906
  invoices_count: number;
907
+ /**
908
+ * Unique identifier assigned to the billing entity the revenue is attributed to, created by Lago.
909
+ * @format uuid
910
+ * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
911
+ */
912
+ billing_entity_id: string;
870
913
  }
871
914
  export interface GrossRevenues {
872
915
  gross_revenues: GrossRevenueObject[];
@@ -967,10 +1010,18 @@ export interface OverdueBalanceObject {
967
1010
  * @example ["5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba"]
968
1011
  */
969
1012
  lago_invoice_ids: string[];
1013
+ /**
1014
+ * Unique identifier assigned to the billing entity the overdue balance is attributed to, created by Lago.
1015
+ * @format uuid
1016
+ * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
1017
+ */
1018
+ billing_entity_id: string;
970
1019
  }
971
1020
  export interface OverdueBalances {
972
1021
  overdue_balances: OverdueBalanceObject[];
973
1022
  }
1023
+ /** @example "US" */
1024
+ export type Country = "AD" | "AE" | "AF" | "AG" | "AI" | "AL" | "AM" | "AO" | "AQ" | "AR" | "AS" | "AT" | "AU" | "AW" | "AX" | "AZ" | "BA" | "BB" | "BD" | "BE" | "BF" | "BG" | "BH" | "BI" | "BJ" | "BL" | "BM" | "BN" | "BO" | "BQ" | "BR" | "BS" | "BT" | "BV" | "BW" | "BY" | "BZ" | "CA" | "CC" | "CD" | "CF" | "CG" | "CH" | "CI" | "CK" | "CL" | "CM" | "CN" | "CO" | "CR" | "CU" | "CV" | "CW" | "CX" | "CY" | "CZ" | "DE" | "DJ" | "DK" | "DM" | "DO" | "DZ" | "EC" | "EE" | "EG" | "EH" | "ER" | "ES" | "ET" | "FI" | "FJ" | "FK" | "FM" | "FO" | "FR" | "GA" | "GB" | "GD" | "GE" | "GF" | "GG" | "GH" | "GI" | "GL" | "GM" | "GN" | "GP" | "GQ" | "GR" | "GS" | "GT" | "GU" | "GW" | "GY" | "HK" | "HM" | "HN" | "HR" | "HT" | "HU" | "ID" | "IE" | "IL" | "IM" | "IN" | "IO" | "IQ" | "IR" | "IS" | "IT" | "JE" | "JM" | "JO" | "JP" | "KE" | "KG" | "KH" | "KI" | "KM" | "KN" | "KP" | "KR" | "KW" | "KY" | "KZ" | "LA" | "LB" | "LC" | "LI" | "LK" | "LR" | "LS" | "LT" | "LU" | "LV" | "LY" | "MA" | "MC" | "MD" | "ME" | "MF" | "MG" | "MH" | "MK" | "ML" | "MM" | "MN" | "MO" | "MP" | "MQ" | "MR" | "MS" | "MT" | "MU" | "MV" | "MW" | "MX" | "MY" | "MZ" | "NA" | "NC" | "NE" | "NF" | "NG" | "NI" | "NL" | "NO" | "NP" | "NR" | "NU" | "NZ" | "OM" | "PA" | "PE" | "PF" | "PG" | "PH" | "PK" | "PL" | "PM" | "PN" | "PR" | "PS" | "PT" | "PW" | "PY" | "QA" | "RE" | "RO" | "RS" | "RU" | "RW" | "SA" | "SB" | "SC" | "SD" | "SE" | "SG" | "SH" | "SI" | "SJ" | "SK" | "SL" | "SM" | "SN" | "SO" | "SR" | "SS" | "ST" | "SV" | "SX" | "SY" | "SZ" | "TC" | "TD" | "TF" | "TG" | "TH" | "TJ" | "TK" | "TL" | "TM" | "TN" | "TO" | "TR" | "TT" | "TV" | "TW" | "TZ" | "UA" | "UG" | "UM" | "US" | "UY" | "UZ" | "VA" | "VC" | "VE" | "VG" | "VI" | "VN" | "VU" | "WF" | "WS" | "YE" | "YT" | "ZA" | "ZM" | "ZW";
974
1025
  export interface UsageObject {
975
1026
  /**
976
1027
  * The unique identifier of the organization for which the usage analytics is calculated.
@@ -2083,6 +2134,12 @@ export interface FeeObject {
2083
2134
  * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
2084
2135
  */
2085
2136
  lago_true_up_parent_fee_id?: string | null;
2137
+ /**
2138
+ * Unique identifier assigned to the fee this fee was derived from. It is set on fees regenerated from an existing fee, and `null` otherwise.
2139
+ * @format uuid
2140
+ * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
2141
+ */
2142
+ lago_original_fee_id?: string | null;
2086
2143
  /**
2087
2144
  * Unique identifier assigned to the subscription, created by Lago. This field is specifically displayed when the fee type is charge or subscription.
2088
2145
  * @format uuid
@@ -2256,12 +2313,12 @@ export interface FeeObject {
2256
2313
  /** Item attached to the fee */
2257
2314
  item: {
2258
2315
  /**
2259
- * The fee type. Possible values are `add-on`, `charge`, `fixed_charge`, `credit`, `subscription` or `commitment`.
2316
+ * The fee type. Possible values are `add_on`, `charge`, `fixed_charge`, `credit`, `subscription` or `commitment`.
2260
2317
  * @example "subscription"
2261
2318
  */
2262
2319
  type: "charge" | "fixed_charge" | "add_on" | "subscription" | "credit" | "commitment";
2263
2320
  /**
2264
- * The code of the fee item. It can be the code of the `add-on`, the code of the `charge`, the code of the `fixed_charge`, the code of the `credit` or the code of the `subscription`.
2321
+ * The code of the fee item. It can be the code of the `add_on`, the code of the `charge`, the code of the `fixed_charge`, the code of the `credit` or the code of the `subscription`.
2265
2322
  * @example "startup"
2266
2323
  */
2267
2324
  code: string;
@@ -2269,7 +2326,7 @@ export interface FeeObject {
2269
2326
  * The name of the fee item. The value depends on the type of the fee item:
2270
2327
  *
2271
2328
  * - If the fee item is a `charge`, it is the billable metric name.
2272
- * - If the fee item is a `add-on`, it is the add-on name.
2329
+ * - If the fee item is an `add_on`, it is the add-on name.
2273
2330
  * - If the fee item is a `credit`, it is the wallet transaction name if set, or `"credit"` if not.
2274
2331
  * - If the fee item is a `fixed_charge`, it is the fixed charge add-on name.
2275
2332
  * - For all the other fee items, it is the subscription plan name.
@@ -2280,7 +2337,7 @@ export interface FeeObject {
2280
2337
  * The description of the fee item. The value depends on the type of the fee item:
2281
2338
  *
2282
2339
  * - If the fee item is a `charge`, it is the billable metric description.
2283
- * - If the fee item is a `add-on`, it is the add-on description.
2340
+ * - If the fee item is an `add_on`, it is the add-on description.
2284
2341
  * - If the fee item is a `credit`, it is always `"credit"`.
2285
2342
  * - If the fee item is a `fixed_charge`, it is the fixed charge add-on description.
2286
2343
  * - For all the other fee items, it is the subscription plan description.
@@ -2291,7 +2348,7 @@ export interface FeeObject {
2291
2348
  * Specifies the name that will be displayed on an invoice. If no value is set for this field, we'll fallback to a value that depends on the type of the fee items:
2292
2349
  *
2293
2350
  * - If the fee item is a `charge`, we'll fallback to the `invoice_display_name` of the `charge` or the billable metric name if no `invoice_display_name` is set.
2294
- * - If the fee item is a `add-on`, we'll fallback to the `invoice_name` of the `add-on` or the `name` of the `add-on`.
2351
+ * - If the fee item is an `add_on`, we'll fallback to the `invoice_name` of the `add_on` or the `name` of the `add_on`.
2295
2352
  * - If the fee item is a `credit`, we'll fallback to the wallet transaction name if set, or `credit` if not.
2296
2353
  * - If the fee item is a `fixed_charge`, we'll fallback to the `invoice_display_name` of the `fixed_charge` or the `invoice_name` of the `fixed_charge_add_on` if no `invoice_display_name` is set.
2297
2354
  * - For all the other fee items, we'll fallback to the `invoice_display_name` of the subscription plan.
@@ -2306,7 +2363,7 @@ export interface FeeObject {
2306
2363
  /** Key value list of event properties */
2307
2364
  filters?: object | null;
2308
2365
  /**
2309
- * Unique identifier of the fee item, created by Lago. It can be the identifier of the `add-on`, the `charge`, the `credit`, the `subscription` or the `commitment`.
2366
+ * Unique identifier of the fee item, created by Lago. It can be the identifier of the `add_on`, the `charge`, the `credit`, the `subscription` or the `commitment`.
2310
2367
  * @format uuid
2311
2368
  * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
2312
2369
  */
@@ -2356,8 +2413,6 @@ export type CreditNoteAppliedTaxObject = BaseAppliedTax & {
2356
2413
  /** @example 100 */
2357
2414
  base_amount_cents?: number;
2358
2415
  };
2359
- /** @example "US" */
2360
- export type CountryOrNull = "AD" | "AE" | "AF" | "AG" | "AI" | "AL" | "AM" | "AO" | "AQ" | "AR" | "AS" | "AT" | "AU" | "AW" | "AX" | "AZ" | "BA" | "BB" | "BD" | "BE" | "BF" | "BG" | "BH" | "BI" | "BJ" | "BL" | "BM" | "BN" | "BO" | "BQ" | "BR" | "BS" | "BT" | "BV" | "BW" | "BY" | "BZ" | "CA" | "CC" | "CD" | "CF" | "CG" | "CH" | "CI" | "CK" | "CL" | "CM" | "CN" | "CO" | "CR" | "CU" | "CV" | "CW" | "CX" | "CY" | "CZ" | "DE" | "DJ" | "DK" | "DM" | "DO" | "DZ" | "EC" | "EE" | "EG" | "EH" | "ER" | "ES" | "ET" | "FI" | "FJ" | "FK" | "FM" | "FO" | "FR" | "GA" | "GB" | "GD" | "GE" | "GF" | "GG" | "GH" | "GI" | "GL" | "GM" | "GN" | "GP" | "GQ" | "GR" | "GS" | "GT" | "GU" | "GW" | "GY" | "HK" | "HM" | "HN" | "HR" | "HT" | "HU" | "ID" | "IE" | "IL" | "IM" | "IN" | "IO" | "IQ" | "IR" | "IS" | "IT" | "JE" | "JM" | "JO" | "JP" | "KE" | "KG" | "KH" | "KI" | "KM" | "KN" | "KP" | "KR" | "KW" | "KY" | "KZ" | "LA" | "LB" | "LC" | "LI" | "LK" | "LR" | "LS" | "LT" | "LU" | "LV" | "LY" | "MA" | "MC" | "MD" | "ME" | "MF" | "MG" | "MH" | "MK" | "ML" | "MM" | "MN" | "MO" | "MP" | "MQ" | "MR" | "MS" | "MT" | "MU" | "MV" | "MW" | "MX" | "MY" | "MZ" | "NA" | "NC" | "NE" | "NF" | "NG" | "NI" | "NL" | "NO" | "NP" | "NR" | "NU" | "NZ" | "OM" | "PA" | "PE" | "PF" | "PG" | "PH" | "PK" | "PL" | "PM" | "PN" | "PR" | "PS" | "PT" | "PW" | "PY" | "QA" | "RE" | "RO" | "RS" | "RU" | "RW" | "SA" | "SB" | "SC" | "SD" | "SE" | "SG" | "SH" | "SI" | "SJ" | "SK" | "SL" | "SM" | "SN" | "SO" | "SR" | "SS" | "ST" | "SV" | "SX" | "SY" | "SZ" | "TC" | "TD" | "TF" | "TG" | "TH" | "TJ" | "TK" | "TL" | "TM" | "TN" | "TO" | "TR" | "TT" | "TV" | "TW" | "TZ" | "UA" | "UG" | "UM" | "US" | "UY" | "UZ" | "VA" | "VC" | "VE" | "VG" | "VI" | "VN" | "VU" | "WF" | "WS" | "YE" | "YT" | "ZA" | "ZM" | "ZW";
2361
2416
  /** @example "America/Los_Angeles" */
2362
2417
  export type TimezoneOrNull = "UTC" | "Africa/Algiers" | "Africa/Cairo" | "Africa/Casablanca" | "Africa/Harare" | "Africa/Johannesburg" | "Africa/Monrovia" | "Africa/Nairobi" | "America/Argentina/Buenos_Aires" | "America/Bogota" | "America/Caracas" | "America/Chicago" | "America/Chihuahua" | "America/Denver" | "America/Godthab" | "America/Guatemala" | "America/Guyana" | "America/Halifax" | "America/Indiana/Indianapolis" | "America/Juneau" | "America/La_Paz" | "America/Lima" | "America/Los_Angeles" | "America/Mazatlan" | "America/Mexico_City" | "America/Monterrey" | "America/Montevideo" | "America/New_York" | "America/Phoenix" | "America/Puerto_Rico" | "America/Regina" | "America/Santiago" | "America/Sao_Paulo" | "America/St_Johns" | "America/Tijuana" | "Asia/Almaty" | "Asia/Baghdad" | "Asia/Baku" | "Asia/Bangkok" | "Asia/Chongqing" | "Asia/Colombo" | "Asia/Dhaka" | "Asia/Hong_Kong" | "Asia/Irkutsk" | "Asia/Jakarta" | "Asia/Jerusalem" | "Asia/Kabul" | "Asia/Kamchatka" | "Asia/Karachi" | "Asia/Kathmandu" | "Asia/Kolkata" | "Asia/Krasnoyarsk" | "Asia/Kuala_Lumpur" | "Asia/Kuwait" | "Asia/Magadan" | "Asia/Muscat" | "Asia/Novosibirsk" | "Asia/Rangoon" | "Asia/Riyadh" | "Asia/Seoul" | "Asia/Shanghai" | "Asia/Singapore" | "Asia/Srednekolymsk" | "Asia/Taipei" | "Asia/Tashkent" | "Asia/Tbilisi" | "Asia/Tehran" | "Asia/Tokyo" | "Asia/Ulaanbaatar" | "Asia/Urumqi" | "Asia/Vladivostok" | "Asia/Yakutsk" | "Asia/Yekaterinburg" | "Asia/Yerevan" | "Atlantic/Azores" | "Atlantic/Cape_Verde" | "Atlantic/South_Georgia" | "Australia/Adelaide" | "Australia/Brisbane" | "Australia/Darwin" | "Australia/Hobart" | "Australia/Melbourne" | "Australia/Perth" | "Australia/Sydney" | "Europe/Amsterdam" | "Europe/Athens" | "Europe/Belgrade" | "Europe/Berlin" | "Europe/Bratislava" | "Europe/Brussels" | "Europe/Bucharest" | "Europe/Budapest" | "Europe/Copenhagen" | "Europe/Dublin" | "Europe/Helsinki" | "Europe/Istanbul" | "Europe/Kaliningrad" | "Europe/Kiev" | "Europe/Lisbon" | "Europe/Ljubljana" | "Europe/London" | "Europe/Madrid" | "Europe/Minsk" | "Europe/Moscow" | "Europe/Paris" | "Europe/Prague" | "Europe/Riga" | "Europe/Rome" | "Europe/Samara" | "Europe/Sarajevo" | "Europe/Skopje" | "Europe/Sofia" | "Europe/Stockholm" | "Europe/Tallinn" | "Europe/Vienna" | "Europe/Vilnius" | "Europe/Volgograd" | "Europe/Warsaw" | "Europe/Zagreb" | "Europe/Zurich" | "GMT+12" | "Pacific/Apia" | "Pacific/Auckland" | "Pacific/Chatham" | "Pacific/Fakaofo" | "Pacific/Fiji" | "Pacific/Guadalcanal" | "Pacific/Guam" | "Pacific/Honolulu" | "Pacific/Majuro" | "Pacific/Midway" | "Pacific/Noumea" | "Pacific/Pago_Pago" | "Pacific/Port_Moresby" | "Pacific/Tongatapu";
2363
2418
  /** 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. */
@@ -2381,10 +2436,10 @@ export interface CustomerBillingConfiguration {
2381
2436
  subscription_invoice_issuing_date_adjustment?: "align_with_finalization_date" | "keep_anchor";
2382
2437
  /**
2383
2438
  * The payment provider utilized to initiate payments for invoices issued by Lago.
2384
- * Accepted values: `stripe`, `adyen`, `gocardless` or null. This field is required if you intend to assign a `provider_customer_id`.
2439
+ * Accepted values: `stripe`, `adyen`, `cashfree`, `flutterwave`, `gocardless`, `moneyhash` or null. This field is required if you intend to assign a `provider_customer_id`.
2385
2440
  * @example "stripe"
2386
2441
  */
2387
- payment_provider?: "stripe" | "adyen" | "gocardless";
2442
+ payment_provider?: "stripe" | "adyen" | "cashfree" | "flutterwave" | "gocardless" | "moneyhash";
2388
2443
  /**
2389
2444
  * Unique code used to identify a payment provider connection.
2390
2445
  * @example "stripe-eu-1"
@@ -2487,7 +2542,7 @@ export interface CustomerBaseObject {
2487
2542
  */
2488
2543
  lago_id: string;
2489
2544
  /**
2490
- * The unique identifier assigned to the customer within the organization's scope. This identifier is used to track and reference the customer's order of creation within the organization's system. It ensures that each customer has a distinct `sequential_id`` associated with them, allowing for easy identification and sorting based on the order of creation
2545
+ * The unique identifier assigned to the customer within the organization's scope. This identifier is used to track and reference the customer's order of creation within the organization's system. It ensures that each customer has a distinct `sequential_id` associated with them, allowing for easy identification and sorting based on the order of creation
2491
2546
  * @example 1
2492
2547
  */
2493
2548
  sequential_id: number;
@@ -2614,6 +2669,11 @@ export interface CustomerBaseObject {
2614
2669
  * @example 30
2615
2670
  */
2616
2671
  net_payment_term?: number | null;
2672
+ /**
2673
+ * The customer ID within the Salesforce system
2674
+ * @example "0015p00001JQx1QAAT"
2675
+ */
2676
+ external_salesforce_id?: string | null;
2617
2677
  /**
2618
2678
  * The date of the customer 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 customer object was created
2619
2679
  * @format date-time
@@ -2654,8 +2714,8 @@ export interface IntegrationCustomer {
2654
2714
  */
2655
2715
  lago_id: string;
2656
2716
  /**
2657
- * The integration type used for accounting and tax syncs.
2658
- * Accepted values: `netsuite, anrok`.
2717
+ * The integration type used for accounting, tax and CRM syncs.
2718
+ * Accepted values: `netsuite`, `anrok`, `xero`, `hubspot`, `salesforce`.
2659
2719
  * @example "netsuite"
2660
2720
  */
2661
2721
  type: "netsuite" | "anrok" | "xero" | "hubspot" | "salesforce";
@@ -2797,11 +2857,21 @@ export interface CreditNoteObject {
2797
2857
  * @example 120
2798
2858
  */
2799
2859
  total_amount_cents: number;
2860
+ /**
2861
+ * The total amount of the credit note, expressed in cents, with precision.
2862
+ * @example "120.0001"
2863
+ */
2864
+ precise_total_amount_cents?: string | null;
2800
2865
  /**
2801
2866
  * The tax amount of the credit note, expressed in cents.
2802
2867
  * @example 20
2803
2868
  */
2804
2869
  taxes_amount_cents: number;
2870
+ /**
2871
+ * The tax amount of the credit note, expressed in cents, with precision.
2872
+ * @example "20.0001"
2873
+ */
2874
+ precise_taxes_amount_cents?: string | null;
2805
2875
  /**
2806
2876
  * The tax rate associated with this specific credit note.
2807
2877
  * @example 20
@@ -2828,7 +2898,7 @@ export interface CreditNoteObject {
2828
2898
  */
2829
2899
  refund_amount_cents: number;
2830
2900
  /**
2831
- * The ofsetted amount (deducted from the invoice balance) of the credit note, expressed in cents.
2901
+ * The offset amount (deducted from the invoice balance) of the credit note, expressed in cents.
2832
2902
  * @example 0
2833
2903
  */
2834
2904
  offset_amount_cents: number;
@@ -2850,10 +2920,15 @@ export interface CreditNoteObject {
2850
2920
  */
2851
2921
  updated_at: string;
2852
2922
  /**
2853
- * The PDF file of the credit note.
2923
+ * The PDF file of the credit note. It is `null` while no PDF has been generated.
2854
2924
  * @example "https://getlago.com/credit_note/file"
2855
2925
  */
2856
2926
  file_url?: string | null;
2927
+ /**
2928
+ * The e-invoicing XML file of the credit note. It is `null` while no XML file has been generated.
2929
+ * @example "https://getlago.com/credit_note/xml"
2930
+ */
2931
+ xml_url?: string | null;
2857
2932
  /** Array of credit note's items. */
2858
2933
  items?: CreditNoteItemObject[];
2859
2934
  applied_taxes?: CreditNoteAppliedTaxObject[];
@@ -2899,17 +2974,17 @@ export interface CreditNoteCreateInput {
2899
2974
  */
2900
2975
  description?: string;
2901
2976
  /**
2902
- * The total amount to be credited to the customer balance for discounts on future invoices. For a total or partial refund, credit or offset, the amount in cents must include both the item amount and the applicable tax. The refunded, credited and offsetted amounts should always balance. The total, including taxes, cannot exceed the invoice’s total fees.”
2977
+ * The total amount to be credited to the customer balance for discounts on future invoices. For a total or partial refund, credit or offset, the amount in cents must include both the item amount and the applicable tax. The refunded, credited and offsetted amounts should always balance. The total, including taxes, cannot exceed the invoice's total fees.
2903
2978
  * @example 100
2904
2979
  */
2905
2980
  credit_amount_cents?: number | null;
2906
2981
  /**
2907
- * The total amount to be refunded immediately to the payment method used by the customer. For a total or partial refund, credit or offset, the amount in cents must include both the item amount and the applicable tax. The refunded, credited and offsetted amounts should always balance. The total, including taxes, cannot exceed the invoice’s total fees.”
2982
+ * The total amount to be refunded immediately to the payment method used by the customer. For a total or partial refund, credit or offset, the amount in cents must include both the item amount and the applicable tax. The refunded, credited and offsetted amounts should always balance. The total, including taxes, cannot exceed the invoice's total fees.
2908
2983
  * @example 500
2909
2984
  */
2910
2985
  refund_amount_cents?: number | null;
2911
2986
  /**
2912
- * The total amount to be immediately deducted from the invoice balance. For a total or partial refund, credit or offset, the amount in cents must include both the item amount and the applicable tax. The refunded, credited and offsetted amounts should always balance. The total, including taxes, cannot exceed the invoice’s total fees.”
2987
+ * The total amount to be immediately deducted from the invoice balance. For a total or partial refund, credit or offset, the amount in cents must include both the item amount and the applicable tax. The refunded, credited and offsetted amounts should always balance. The total, including taxes, cannot exceed the invoice's total fees.
2913
2988
  * @example 200
2914
2989
  */
2915
2990
  offset_amount_cents?: number | null;
@@ -3144,9 +3219,9 @@ export type CustomerObjectExtended = CustomerObject & {
3144
3219
  metadata?: CustomerMetadata[];
3145
3220
  /** List of customer taxes */
3146
3221
  taxes?: TaxObject[];
3147
- /** The customer’s invoice custom section used for generating invoices. */
3222
+ /** The customer's invoice custom sections used for generating invoices. */
3148
3223
  applicable_invoice_custom_sections?: InvoiceCustomSectionObject[];
3149
- /** List of errors with details that might have been raised while processing backgroud actions for the customers */
3224
+ /** List of errors with details that might have been raised while processing background actions for the customer */
3150
3225
  error_details?: ErrorDetailObject[];
3151
3226
  };
3152
3227
  export interface CustomersPaginated {
@@ -3228,6 +3303,8 @@ export interface CustomerCreateInput {
3228
3303
  * The type of the account. It can have one of the following values:
3229
3304
  * - `customer`: the account is a customer, default value.
3230
3305
  * - `partner`: the account is a partner.
3306
+ *
3307
+ * This field is only applied when revenue share is enabled on your organization; otherwise it is ignored.
3231
3308
  * @example "customer"
3232
3309
  */
3233
3310
  account_type?: "customer" | "partner";
@@ -3271,6 +3348,11 @@ export interface CustomerCreateInput {
3271
3348
  * @example 30
3272
3349
  */
3273
3350
  net_payment_term?: number | null;
3351
+ /**
3352
+ * The customer ID within the Salesforce system
3353
+ * @example "0015p00001JQx1QAAT"
3354
+ */
3355
+ external_salesforce_id?: string | null;
3274
3356
  /**
3275
3357
  * Specifies how invoices with a zero total amount should be handled:
3276
3358
  * - `inherit`: (Default) Follows the organization-level configuration.
@@ -3291,11 +3373,11 @@ export interface CustomerCreateInput {
3291
3373
  */
3292
3374
  id?: string;
3293
3375
  /**
3294
- * The integration type used for accounting and tax syncs.
3295
- * Accepted values: `netsuite, anrok, xero`.
3376
+ * The integration type used for accounting, tax and CRM syncs.
3377
+ * Accepted values: `netsuite`, `anrok`, `avalara`, `xero`, `hubspot`, `salesforce`.
3296
3378
  * @example "netsuite"
3297
3379
  */
3298
- integration_type?: "netsuite" | "anrok" | "xero";
3380
+ integration_type?: "netsuite" | "anrok" | "avalara" | "xero" | "hubspot" | "salesforce";
3299
3381
  /**
3300
3382
  * Unique code used to identify an integration connection.
3301
3383
  * @example "netsuite-eu-1"
@@ -3316,6 +3398,11 @@ export interface CustomerCreateInput {
3316
3398
  * @example "2"
3317
3399
  */
3318
3400
  subsidiary_id?: string;
3401
+ /**
3402
+ * This optional field is needed only when working with `hubspot` connection.
3403
+ * @example "contacts"
3404
+ */
3405
+ targeted_object?: string | null;
3319
3406
  }[];
3320
3407
  /** 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 */
3321
3408
  metadata?: {
@@ -3339,7 +3426,7 @@ export interface CustomerCreateInput {
3339
3426
  * Determines whether the item or information should be displayed in the invoice. If set to true, the item or information will be included and visible in the generated invoice. If set to false, the item or information will be excluded and not displayed in the invoice.
3340
3427
  * @example true
3341
3428
  */
3342
- display_in_invoice: boolean;
3429
+ display_in_invoice?: boolean;
3343
3430
  }[];
3344
3431
  /**
3345
3432
  * Set to `true` to exclude all invoice custom sections from PDF generation for this customer only. False by default
@@ -3390,17 +3477,17 @@ export interface InvoiceBaseObject {
3390
3477
  */
3391
3478
  issuing_date: string;
3392
3479
  /**
3393
- * The date when the payment dispute was lost. It is expressed in Coordinated Universal Time (UTC).
3480
+ * The date when the payment dispute was lost. It is expressed in Coordinated Universal Time (UTC). It is `null` until a dispute is lost on the invoice.
3394
3481
  * @format date-time
3395
3482
  * @example "2022-09-14T16:35:31Z"
3396
3483
  */
3397
- payment_dispute_lost_at?: string;
3484
+ payment_dispute_lost_at?: string | null;
3398
3485
  /**
3399
3486
  * The payment due date for the invoice, specified in the ISO 8601 date format.
3400
3487
  * @format date
3401
3488
  * @example "2022-04-30"
3402
3489
  */
3403
- payment_due_date?: string;
3490
+ payment_due_date?: string | null;
3404
3491
  /**
3405
3492
  * Specifies if the payment is considered as overdue.
3406
3493
  * @example true
@@ -3412,10 +3499,10 @@ export interface InvoiceBaseObject {
3412
3499
  */
3413
3500
  net_payment_term?: number;
3414
3501
  /**
3415
- * The type of invoice issued. Possible values are `subscription`, `one-off`, `credit` or `progressive_billing`.
3502
+ * The type of invoice issued. Possible values are `subscription`, `add_on`, `credit`, `one_off`, `advance_charges` or `progressive_billing`.
3416
3503
  * @example "subscription"
3417
3504
  */
3418
- invoice_type: "subscription" | "add_on" | "credit" | "one_off" | "progressive_billing";
3505
+ invoice_type: "subscription" | "add_on" | "credit" | "one_off" | "advance_charges" | "progressive_billing";
3419
3506
  /**
3420
3507
  * The status of the invoice. It indicates the current state of the invoice and can have following values:
3421
3508
  * - `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.
@@ -3503,6 +3590,21 @@ export interface InvoiceBaseObject {
3503
3590
  * @example 100
3504
3591
  */
3505
3592
  total_amount_cents: number;
3593
+ /**
3594
+ * The amount already paid on the invoice, expressed in cents.
3595
+ * @example 40
3596
+ */
3597
+ total_paid_amount_cents?: number;
3598
+ /**
3599
+ * The amount of the invoice settled by finalized credit notes, expressed in cents.
3600
+ * @example 10
3601
+ */
3602
+ total_offsetted_credit_note_amount_cents?: number;
3603
+ /**
3604
+ * The amount still due on the invoice, expressed in cents. It is equal to `total_amount_cents` minus `total_paid_amount_cents` and `total_offsetted_credit_note_amount_cents`, and is `0` for voided invoices.
3605
+ * @example 50
3606
+ */
3607
+ total_due_amount_cents?: number;
3506
3608
  /** @example 3 */
3507
3609
  version_number: number;
3508
3610
  /**
@@ -3511,11 +3613,17 @@ export interface InvoiceBaseObject {
3511
3613
  */
3512
3614
  self_billed?: boolean;
3513
3615
  /**
3514
- * Contains the URL that provides direct access to the invoice PDF file. You can use this URL to download or view the PDF document of the invoice
3616
+ * Contains the URL that provides direct access to the invoice PDF file. You can use this URL to download or view the PDF document of the invoice. It is `null` while no PDF has been generated, which is the case for draft invoices.
3515
3617
  * @format uri
3516
3618
  * @example "https://getlago.com/invoice/file"
3517
3619
  */
3518
- file_url?: string;
3620
+ file_url?: string | null;
3621
+ /**
3622
+ * Contains the URL that provides direct access to the e-invoicing XML file. It is `null` while no XML file has been generated for the invoice.
3623
+ * @format uri
3624
+ * @example "https://getlago.com/invoice/xml"
3625
+ */
3626
+ xml_url?: string | null;
3519
3627
  /**
3520
3628
  * Contains the URL to the invoice page in the Lago dashboard. It is `null` for invoices that are not visible in the dashboard (for example while still generating). Use it to link users directly to the invoice overview page.
3521
3629
  * @format uri
@@ -3534,6 +3642,12 @@ export interface InvoiceBaseObject {
3534
3642
  * @example "2022-04-29T08:59:51Z"
3535
3643
  */
3536
3644
  updated_at: string;
3645
+ /**
3646
+ * The date when the invoice was voided, represented in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC). It is `null` for invoices that have not been voided.
3647
+ * @format date-time
3648
+ * @example "2022-04-29T08:59:51Z"
3649
+ */
3650
+ voided_at?: string | null;
3537
3651
  }
3538
3652
  export interface InvoiceMetadataObject {
3539
3653
  /**
@@ -4580,7 +4694,7 @@ export interface WalletUpdateInput {
4580
4694
  * The trigger. Possible values are `interval` or `threshold`.
4581
4695
  * @example "interval"
4582
4696
  */
4583
- trigger?: "interval" | "threshold";
4697
+ trigger: "interval" | "threshold";
4584
4698
  /**
4585
4699
  * The method used for recurring top-up. Possible values are `fixed` or `target`.
4586
4700
  * @example "target"
@@ -4704,6 +4818,8 @@ export interface AlertThresholdBaseObject {
4704
4818
  export type AlertThresholdObject = AlertThresholdBaseObject & {
4705
4819
  /**
4706
4820
  * A value that should trigger this alert, formatted as a BigDecimal.
4821
+ *
4822
+ * The unit depends on the alert type: `billable_metric_current_usage_units` and `billable_metric_lifetime_usage_units` are expressed in units, `wallet_credits_balance` and `wallet_credits_ongoing_balance` in credits, and all other types in cents.
4707
4823
  * @pattern ^[0-9]+.?[0-9]*$
4708
4824
  * @example "99.0"
4709
4825
  */
@@ -4781,6 +4897,8 @@ export interface WalletAlerts {
4781
4897
  export type AlertThresholdInput = AlertThresholdBaseObject & {
4782
4898
  /**
4783
4899
  * A value that should trigger this alert. This can be an integer or a string formatted as a BigDecimal.
4900
+ *
4901
+ * The unit depends on the alert type: `billable_metric_current_usage_units` and `billable_metric_lifetime_usage_units` are expressed in units, `wallet_credits_balance` and `wallet_credits_ongoing_balance` in credits, and all other types in cents.
4784
4902
  * @example 99
4785
4903
  */
4786
4904
  value: number | string;
@@ -4880,23 +4998,23 @@ export type CustomerChargeFiltersUsageObject = {
4880
4998
  * @pattern ^[0-9]+.?[0-9]*$
4881
4999
  * @example "0.9"
4882
5000
  */
4883
- units?: string;
5001
+ units: string;
4884
5002
  /**
4885
5003
  * The total number of units consumed by the customer for a specific charge item, aggregated across all usage events.
4886
5004
  * @pattern ^[0-9]+.?[0-9]*$
4887
5005
  * @example "1.0"
4888
5006
  */
4889
- total_aggregated_units?: string;
5007
+ total_aggregated_units: string;
4890
5008
  /**
4891
5009
  * The amount in cents, tax excluded, consumed for a specific charge filter related to a charge item.
4892
5010
  * @example 1000
4893
5011
  */
4894
- amount_cents?: number;
5012
+ amount_cents: number;
4895
5013
  /**
4896
5014
  * The quantity of usage events that have been recorded for a particular charge filter during the specified time period. These events may also be referred to as the number of transactions in some contexts.
4897
5015
  * @example 10
4898
5016
  */
4899
- events_count?: number;
5017
+ events_count: number;
4900
5018
  /**
4901
5019
  * Specifies the name that will be displayed on an invoice.
4902
5020
  * @example "AWS eu-east-1"
@@ -4908,7 +5026,7 @@ export type CustomerChargeFiltersUsageObject = {
4908
5026
  * List of filter values applied to the usage.
4909
5027
  * @example {"region":["us-east-1"]}
4910
5028
  */
4911
- values?: Record<string, string[]>;
5029
+ values: Record<string, string[]>;
4912
5030
  /** Array of usage breakdowns split by presentation group keys without affecting pricing or aggregation. */
4913
5031
  presentation_breakdowns?: PresentationBreakdownsObject;
4914
5032
  }[];
@@ -4918,28 +5036,28 @@ export type CustomerChargeGroupedUsageObject = {
4918
5036
  * The amount in cents, tax excluded, consumed for a specific group related to a charge item.
4919
5037
  * @example 1000
4920
5038
  */
4921
- amount_cents?: number;
5039
+ amount_cents: number;
4922
5040
  /**
4923
5041
  * The quantity of usage events that have been recorded for a particular charge during the specified time period. These events may also be referred to as the number of transactions in some contexts.
4924
5042
  * @example 10
4925
5043
  */
4926
- events_count?: number;
5044
+ events_count: number;
4927
5045
  /**
4928
5046
  * The number of units consumed for a specific group related to a charge item.
4929
5047
  * @pattern ^[0-9]+.?[0-9]*$
4930
5048
  * @example "0.9"
4931
5049
  */
4932
- units?: string;
5050
+ units: string;
4933
5051
  /**
4934
5052
  * The total number of units consumed by the customer for a specific charge item, aggregated across all usage events.
4935
5053
  * @pattern ^[0-9]+.?[0-9]*$
4936
5054
  * @example "1.0"
4937
5055
  */
4938
- total_aggregated_units?: string;
5056
+ total_aggregated_units: string;
4939
5057
  /** Details about the pricing unit used for charge usage. */
4940
5058
  pricing_unit_details?: UsagePricingUnitDetailsObject;
4941
5059
  /** Key value list of event properties aggregated by the charge model */
4942
- grouped_by?: Record<string, string>;
5060
+ grouped_by: Record<string, string>;
4943
5061
  /** Array of filter object, representing multiple dimensions for a charge item. */
4944
5062
  filters?: CustomerChargeFiltersUsageObject;
4945
5063
  /** Array of usage breakdowns split by presentation group keys without affecting pricing or aggregation. */
@@ -5083,28 +5201,28 @@ export type CustomerProjectedChargeFiltersUsageObject = {
5083
5201
  * @pattern ^[0-9]+.?[0-9]*$
5084
5202
  * @example "0.9"
5085
5203
  */
5086
- units?: string;
5204
+ units: string;
5087
5205
  /**
5088
5206
  * The projected number of units that can be consumed for a specific charge filter related to a charge item.
5089
5207
  * @pattern ^[0-9]+.?[0-9]*$
5090
5208
  * @example "1.8"
5091
5209
  */
5092
- projected_units?: string;
5210
+ projected_units: string;
5093
5211
  /**
5094
5212
  * The amount in cents, tax excluded, consumed for a specific charge filter related to a charge item.
5095
5213
  * @example 1000
5096
5214
  */
5097
- amount_cents?: number;
5215
+ amount_cents: number;
5098
5216
  /**
5099
5217
  * The projected amount in cents, tax excluded, that can be consumed for a specific charge filter related to a charge item.
5100
5218
  * @example 2000
5101
5219
  */
5102
- projected_amount_cents?: number;
5220
+ projected_amount_cents: number;
5103
5221
  /**
5104
5222
  * The quantity of usage events that have been recorded for a particular charge filter during the specified time period. These events may also be referred to as the number of transactions in some contexts.
5105
5223
  * @example 10
5106
5224
  */
5107
- events_count?: number;
5225
+ events_count: number;
5108
5226
  /**
5109
5227
  * Specifies the name that will be displayed on an invoice.
5110
5228
  * @example "AWS eu-east-1"
@@ -5116,7 +5234,7 @@ export type CustomerProjectedChargeFiltersUsageObject = {
5116
5234
  * List of filter values applied to the usage.
5117
5235
  * @example {"region":["us-east-1"]}
5118
5236
  */
5119
- values?: Record<string, string[]>;
5237
+ values: Record<string, string[]>;
5120
5238
  /** Array of usage breakdowns split by presentation group keys without affecting pricing or aggregation. */
5121
5239
  presentation_breakdowns?: PresentationBreakdownsObject;
5122
5240
  /** Array of usage breakdowns split by presentation group keys without affecting pricing or aggregation. */
@@ -5128,33 +5246,33 @@ export type CustomerProjectedChargeGroupedUsageObject = {
5128
5246
  * The amount in cents, tax excluded, consumed for a specific group related to a charge item.
5129
5247
  * @example 1000
5130
5248
  */
5131
- amount_cents?: number;
5249
+ amount_cents: number;
5132
5250
  /**
5133
5251
  * The projected amount in cents, tax excluded, that can be consumed for a specific group related to a charge item.
5134
5252
  * @example 2000
5135
5253
  */
5136
- projected_amount_cents?: number;
5254
+ projected_amount_cents: number;
5137
5255
  /**
5138
5256
  * The quantity of usage events that have been recorded for a particular charge during the specified time period. These events may also be referred to as the number of transactions in some contexts.
5139
5257
  * @example 10
5140
5258
  */
5141
- events_count?: number;
5259
+ events_count: number;
5142
5260
  /**
5143
5261
  * The number of units consumed for a specific group related to a charge item.
5144
5262
  * @pattern ^[0-9]+.?[0-9]*$
5145
5263
  * @example "0.9"
5146
5264
  */
5147
- units?: string;
5265
+ units: string;
5148
5266
  /**
5149
5267
  * The projected number of units that can be consumed for a specific group related to a charge item.
5150
5268
  * @pattern ^[0-9]+.?[0-9]*$
5151
5269
  * @example "1.8"
5152
5270
  */
5153
- projected_units?: string;
5271
+ projected_units: string;
5154
5272
  /** Details about the pricing unit used for charge usage. */
5155
5273
  pricing_unit_details?: UsagePricingUnitDetailsObject;
5156
5274
  /** Key value list of event properties aggregated by the charge model */
5157
- grouped_by?: Record<string, string>;
5275
+ grouped_by: Record<string, string>;
5158
5276
  /** Array of filter object, representing multiple dimensions for a charge item. */
5159
5277
  filters?: CustomerProjectedChargeFiltersUsageObject;
5160
5278
  /** Array of usage breakdowns split by presentation group keys without affecting pricing or aggregation. */
@@ -5483,7 +5601,18 @@ export interface EventInputObject {
5483
5601
  * This field represents additional properties associated with the event, which are utilized in the calculation of the final fee. This object becomes mandatory when the targeted billable metric employs a `sum_agg`, `max_agg`, or `unique_count_agg` aggregation method. However, when using a simple `count_agg`, this object is not required.
5484
5602
  * @example {"gb":10}
5485
5603
  */
5486
- properties?: object | null;
5604
+ properties?: {
5605
+ /**
5606
+ * The code of the wallet targeted by this event for prepaid credits deduction.
5607
+ * When provided, credits are drawn from this specific wallet instead of following the standard wallet selection logic.
5608
+ * If the code does not match an existing wallet, no credits will be applied for the event.
5609
+ * This field is only taken into account when the targeted charge has `accepts_target_wallet` set to `true`.
5610
+ * This field requires a premium integration.
5611
+ * @example "main_wallet"
5612
+ */
5613
+ target_wallet_code?: string | null;
5614
+ [key: string]: any;
5615
+ };
5487
5616
  }
5488
5617
  export interface EventInput {
5489
5618
  event: EventInputObject;
@@ -5521,8 +5650,19 @@ export interface EventEstimateFeesInput {
5521
5650
  * @example "sub_1234567890"
5522
5651
  */
5523
5652
  external_subscription_id: string;
5524
- /** This field represents additional properties associated with the event, which are utilized in the calculation of the final fee. This object becomes mandatory when the targeted billable metric employs a `sum_agg`, `max_agg`, or `unique_count_agg` aggregation method. However, when using a simple `count_agg`, this object is not required. */
5525
- properties?: object;
5653
+ /** This field represents additional properties associated with the event, which are utilized in the calculation of the final fee. This object becomes mandatory when the targeted billable metric employs a `sum_agg`, `max_agg`, or `unique_count_agg` aggregation method. However, when using a simple `count_agg`, this object is not required. Any property of the targeted billable metric can be sent here, in addition to the documented fields below. */
5654
+ properties?: {
5655
+ /**
5656
+ * The code of the wallet targeted by this event for prepaid credits deduction.
5657
+ * When provided, credits are drawn from this specific wallet instead of following the standard wallet selection logic.
5658
+ * If the code does not match an existing wallet, no credits will be applied for the event.
5659
+ * This field is only taken into account when the targeted charge has `accepts_target_wallet` set to `true`.
5660
+ * This field requires a premium integration.
5661
+ * @example "main_wallet"
5662
+ */
5663
+ target_wallet_code?: string | null;
5664
+ [key: string]: any;
5665
+ };
5526
5666
  };
5527
5667
  }
5528
5668
  export interface Fees {
@@ -5770,6 +5910,12 @@ export interface InvoiceOneOffCreateInput {
5770
5910
  * @example "EUR"
5771
5911
  */
5772
5912
  currency?: Currency;
5913
+ /**
5914
+ * If true, the invoice will be created but not sent to the payment provider.
5915
+ * @default false
5916
+ * @example true
5917
+ */
5918
+ skip_psp?: boolean | null;
5773
5919
  /**
5774
5920
  * The purchase order number to associate with the invoice.
5775
5921
  * @example "PO-123"
@@ -5792,14 +5938,14 @@ export interface InvoiceOneOffCreateInput {
5792
5938
  */
5793
5939
  unit_amount_cents?: number | null;
5794
5940
  /**
5795
- * The quantity of units associated with the fee. By default, only 1 unit is added to the invoice.
5941
+ * The quantity of units associated with the fee. Accepts a number or a string formatted as a BigDecimal. By default, only 1 unit is added to the invoice.
5796
5942
  * @pattern ^[0-9]+.?[0-9]*$
5797
5943
  * @example "2.5"
5798
5944
  */
5799
- units?: string | null;
5945
+ units?: string | number | null;
5800
5946
  /**
5801
- * This is a description
5802
- * @example "The description of the fee line item in the invoice. By default, the description of the add-on is used."
5947
+ * The description of the fee line item in the invoice. By default, the description of the add-on is used.
5948
+ * @example "Onboarding session, June 2024"
5803
5949
  */
5804
5950
  description?: string | null;
5805
5951
  /**
@@ -5816,12 +5962,6 @@ export interface InvoiceOneOffCreateInput {
5816
5962
  to_datetime?: string;
5817
5963
  /** List of unique code used to identify the taxes. */
5818
5964
  tax_codes?: TaxCodes;
5819
- /**
5820
- * If true, the invoice will be created but not sent to the payment provider.
5821
- * @default false
5822
- * @example true
5823
- */
5824
- skip_psp?: boolean | null;
5825
5965
  }[];
5826
5966
  /** Configuration for invoice custom sections to apply to invoices generated by this resource. */
5827
5967
  invoice_custom_section?: InvoiceCustomSectionInput;
@@ -6786,108 +6926,6 @@ export interface OrganizationBillingConfiguration {
6786
6926
  */
6787
6927
  document_locale?: string;
6788
6928
  }
6789
- export interface OrganizationUpdateInput {
6790
- organization: {
6791
- /**
6792
- * The URL of your newest updated webhook endpoint. This URL allows your organization to receive important messages, notifications, or data from the Lago system. By configuring your webhook endpoint to this URL, you can ensure that your organization stays informed and receives relevant information in a timely manner.
6793
- * @example "https://webhook.brex.com"
6794
- */
6795
- webhook_url?: string | null;
6796
- /**
6797
- * The country of your organization.
6798
- * @example "US"
6799
- */
6800
- country?: CountryOrNull;
6801
- /**
6802
- * The default currency of an organization.
6803
- * @example "USD"
6804
- */
6805
- default_currency?: Currency;
6806
- /**
6807
- * The first line of your organization's billing address.
6808
- * @example "100 Brex Street"
6809
- */
6810
- address_line1?: string | null;
6811
- /**
6812
- * The second line of your organization's billing address.
6813
- * @example null
6814
- */
6815
- address_line2?: string | null;
6816
- /**
6817
- * The state of your organization's billing address.
6818
- * @example "NYC"
6819
- */
6820
- state?: string | null;
6821
- /**
6822
- * The zipcode of your organization's billing address.
6823
- * @example "10000"
6824
- */
6825
- zipcode?: string | null;
6826
- /**
6827
- * The email address of your organization used to bill your customers.
6828
- * @format email
6829
- * @example "brex@brex.com"
6830
- */
6831
- email?: string | null;
6832
- /**
6833
- * The city of your organization's billing address.
6834
- * @example "New York"
6835
- */
6836
- city?: string | null;
6837
- /**
6838
- * The legal name of your organization.
6839
- * @example null
6840
- */
6841
- legal_name?: string | null;
6842
- /**
6843
- * The legal number of your organization.
6844
- * @example null
6845
- */
6846
- legal_number?: string | null;
6847
- /**
6848
- * This parameter configures the method of incrementing invoice numbers for your customers.
6849
- *
6850
- * - `per_customer`: Invoice numbers are incremented individually for each customer. This means every customer will have their own unique sequence of invoice numbers, separate from other customers. It ensures that each customer's invoice numbers follow a distinct and isolated numbering pattern.
6851
- * - `per_organization`: Invoice number incrementation is made across your entire organization. Rather than individual sequences for each customer, all invoices within the organization follow a single, unified numbering system. This creates a continuous and organization-wide sequence for all invoice numbers. Invoices are incremented per month (dynamic value used is YYYYMM), and invoice numbers are reset at the end of each month.
6852
- *
6853
- * The default value for `document_numbering` is set to `per_customer`, meaning that, unless changed, invoice numbers will increment uniquely for each customer.
6854
- * @example "per_customer"
6855
- */
6856
- document_numbering?: "per_customer" | "per_organization";
6857
- /**
6858
- * Sets the prefix for invoices and credit notes. Default is the first three letters of your organization name plus the last four digits of your organization ID. Customizable within 1-10 characters, and automatically capitalized by Lago.
6859
- * @example "ORG-1234"
6860
- */
6861
- document_number_prefix?: string;
6862
- /**
6863
- * The net payment term, expressed in days, specifies the duration within which a customer is expected to remit payment after the invoice is finalized.
6864
- * @example 30
6865
- */
6866
- net_payment_term?: number;
6867
- /**
6868
- * The tax identification number of your organization.
6869
- * @example "US123456789"
6870
- */
6871
- tax_identification_number?: string | null;
6872
- /**
6873
- * Your organization's timezone, used for billing purposes in your own local time. Can be overwritten by the customer's timezone.
6874
- * @example "America/New_York"
6875
- */
6876
- timezone?: Timezone;
6877
- /**
6878
- * 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.
6879
- * @example ["invoice.finalized","credit_note.created"]
6880
- */
6881
- email_settings?: ("invoice.finalized" | "credit_note.created")[];
6882
- /** The custom billing settings for your organization. */
6883
- billing_configuration?: OrganizationBillingConfiguration;
6884
- /**
6885
- * Determines whether invoices with a zero total amount should be finalized. If set to true, zero amount invoices will be finalized. If set to false, zero amount invoices will not be finalized.
6886
- * @example false
6887
- */
6888
- finalize_zero_amount_invoice?: boolean;
6889
- };
6890
- }
6891
6929
  export interface OrganizationObject {
6892
6930
  /**
6893
6931
  * Unique identifier assigned to the organization within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the organization's record within the Lago system
@@ -6900,6 +6938,11 @@ export interface OrganizationObject {
6900
6938
  * @example "Name1"
6901
6939
  */
6902
6940
  name: string;
6941
+ /**
6942
+ * A concise and unique identifier for your organization, formed by combining the organization's `name` and `id`.
6943
+ * @example "NAME1-1234"
6944
+ */
6945
+ slug?: string;
6903
6946
  /**
6904
6947
  * The date of creation of your organization, represented in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC).
6905
6948
  * @format date-time
@@ -6997,6 +7040,11 @@ export interface OrganizationObject {
6997
7040
  * @example "America/New_York"
6998
7041
  */
6999
7042
  timezone?: Timezone;
7043
+ /**
7044
+ * 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 are `invoice.finalized`, `credit_note.created` and `payment_receipt.created`.
7045
+ * @example ["invoice.finalized","credit_note.created"]
7046
+ */
7047
+ email_settings: ("invoice.finalized" | "credit_note.created" | "payment_receipt.created")[];
7000
7048
  /** The custom billing settings for your organization. */
7001
7049
  billing_configuration: OrganizationBillingConfiguration;
7002
7050
  /** List of default organization taxes */
@@ -7012,6 +7060,113 @@ export interface OrganizationObject {
7012
7060
  export interface Organization {
7013
7061
  organization: OrganizationObject;
7014
7062
  }
7063
+ export interface OrganizationUpdateInput {
7064
+ organization: {
7065
+ /**
7066
+ * The URL of your newest updated webhook endpoint. This URL allows your organization to receive important messages, notifications, or data from the Lago system. By configuring your webhook endpoint to this URL, you can ensure that your organization stays informed and receives relevant information in a timely manner.
7067
+ * @example "https://webhook.brex.com"
7068
+ */
7069
+ webhook_url?: string | null;
7070
+ /**
7071
+ * The country of your organization.
7072
+ * @example "US"
7073
+ */
7074
+ country?: CountryOrNull;
7075
+ /**
7076
+ * The default currency of an organization.
7077
+ * @example "USD"
7078
+ */
7079
+ default_currency?: Currency;
7080
+ /**
7081
+ * The first line of your organization's billing address.
7082
+ * @example "100 Brex Street"
7083
+ */
7084
+ address_line1?: string | null;
7085
+ /**
7086
+ * The second line of your organization's billing address.
7087
+ * @example null
7088
+ */
7089
+ address_line2?: string | null;
7090
+ /**
7091
+ * The state of your organization's billing address.
7092
+ * @example "NYC"
7093
+ */
7094
+ state?: string | null;
7095
+ /**
7096
+ * The zipcode of your organization's billing address.
7097
+ * @example "10000"
7098
+ */
7099
+ zipcode?: string | null;
7100
+ /**
7101
+ * The email address of your organization used to bill your customers.
7102
+ * @format email
7103
+ * @example "brex@brex.com"
7104
+ */
7105
+ email?: string | null;
7106
+ /**
7107
+ * The city of your organization's billing address.
7108
+ * @example "New York"
7109
+ */
7110
+ city?: string | null;
7111
+ /**
7112
+ * The legal name of your organization.
7113
+ * @example null
7114
+ */
7115
+ legal_name?: string | null;
7116
+ /**
7117
+ * The legal number of your organization.
7118
+ * @example null
7119
+ */
7120
+ legal_number?: string | null;
7121
+ /**
7122
+ * This parameter configures the method of incrementing invoice numbers for your customers.
7123
+ *
7124
+ * - `per_customer`: Invoice numbers are incremented individually for each customer. This means every customer will have their own unique sequence of invoice numbers, separate from other customers. It ensures that each customer's invoice numbers follow a distinct and isolated numbering pattern.
7125
+ * - `per_organization`: Invoice number incrementation is made across your entire organization. Rather than individual sequences for each customer, all invoices within the organization follow a single, unified numbering system. This creates a continuous and organization-wide sequence for all invoice numbers. Invoices are incremented per month (dynamic value used is YYYYMM), and invoice numbers are reset at the end of each month.
7126
+ *
7127
+ * The default value for `document_numbering` is set to `per_customer`, meaning that, unless changed, invoice numbers will increment uniquely for each customer.
7128
+ * @example "per_customer"
7129
+ */
7130
+ document_numbering?: "per_customer" | "per_organization";
7131
+ /**
7132
+ * Sets the prefix for invoices and credit notes. Default is the first three letters of your organization name plus the last four digits of your organization ID. Customizable within 1-10 characters, and automatically capitalized by Lago.
7133
+ * @example "ORG-1234"
7134
+ */
7135
+ document_number_prefix?: string;
7136
+ /**
7137
+ * The net payment term, expressed in days, specifies the duration within which a customer is expected to remit payment after the invoice is finalized.
7138
+ * @example 30
7139
+ */
7140
+ net_payment_term?: number;
7141
+ /**
7142
+ * The tax identification number of your organization.
7143
+ * @example "US123456789"
7144
+ */
7145
+ tax_identification_number?: string | null;
7146
+ /**
7147
+ * Your organization's timezone, used for billing purposes in your own local time. Can be overwritten by the customer's timezone.
7148
+ * @example "America/New_York"
7149
+ */
7150
+ timezone?: Timezone;
7151
+ /**
7152
+ * 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 are `invoice.finalized`, `credit_note.created` and `payment_receipt.created`.
7153
+ * @example ["invoice.finalized","credit_note.created"]
7154
+ */
7155
+ email_settings?: ("invoice.finalized" | "credit_note.created" | "payment_receipt.created")[];
7156
+ /** The custom billing settings for your organization. */
7157
+ billing_configuration?: OrganizationBillingConfiguration;
7158
+ /**
7159
+ * Determines whether invoices with a zero total amount should be finalized. If set to true, zero amount invoices will be finalized. If set to false, zero amount invoices will not be finalized.
7160
+ * @example false
7161
+ */
7162
+ finalize_zero_amount_invoice?: boolean;
7163
+ /**
7164
+ * A concise and unique identifier for your organization, used as a prefix in customer slugs.
7165
+ * @example "NAME1-1234"
7166
+ */
7167
+ slug?: string;
7168
+ };
7169
+ }
7015
7170
  export interface PaymentReceiptObject {
7016
7171
  /**
7017
7172
  * Unique identifier of the payment receipt, created by Lago.
@@ -7420,6 +7575,8 @@ export interface ChargeObject {
7420
7575
  };
7421
7576
  /**
7422
7577
  * Specifies whether the charge accepts a target wallet for prepaid credits deduction.
7578
+ * When `true`, events may include a `target_wallet_code` in their `properties` to direct credit deduction to a specific wallet.
7579
+ * This field requires a premium integration.
7423
7580
  * @example false
7424
7581
  */
7425
7582
  accepts_target_wallet?: boolean | null;
@@ -8293,6 +8450,16 @@ export type ChargeInput = ChargeOverridableInput & {
8293
8450
  * @example false
8294
8451
  */
8295
8452
  prorated?: boolean;
8453
+ /**
8454
+ * Specifies whether the charge accepts a target wallet for prepaid credits deduction.
8455
+ * When set to `true`, events may include a `target_wallet_code` in their `properties` to direct credit deduction to a specific wallet.
8456
+ * If no `target_wallet_code` is provided on the event, the standard wallet selection logic is applied.
8457
+ * If the `target_wallet_code` does not match an existing wallet, no credits will be applied for that event.
8458
+ *
8459
+ * This field requires a premium integration.
8460
+ * @example false
8461
+ */
8462
+ accepts_target_wallet?: boolean | null;
8296
8463
  };
8297
8464
  export interface ChargeCreateInput {
8298
8465
  charge: ChargeInput & {
@@ -9161,7 +9328,7 @@ export interface AlertObject {
9161
9328
  * The type of alert.
9162
9329
  * @example "billable_metric_current_usage_amount"
9163
9330
  */
9164
- alert_type: "current_usage_amount" | "billable_metric_current_usage_amount" | "billable_metric_current_usage_units" | "lifetime_usage_amount";
9331
+ alert_type: "current_usage_amount" | "billable_metric_current_usage_amount" | "billable_metric_current_usage_units" | "lifetime_usage_amount" | "billable_metric_lifetime_usage_units";
9165
9332
  /**
9166
9333
  * Unique code used to identify the alert.
9167
9334
  * @example "storage_threshold_alert"
@@ -9207,7 +9374,7 @@ export interface AlertCreateInput {
9207
9374
  * The type of alert.
9208
9375
  * @example "billable_metric_current_usage_amount"
9209
9376
  */
9210
- alert_type: "current_usage_amount" | "billable_metric_current_usage_amount" | "billable_metric_current_usage_units" | "lifetime_usage_amount";
9377
+ alert_type: "current_usage_amount" | "billable_metric_current_usage_amount" | "billable_metric_current_usage_units" | "lifetime_usage_amount" | "billable_metric_lifetime_usage_units";
9211
9378
  /**
9212
9379
  * Unique code used to identify the alert.
9213
9380
  * @example "storage_threshold_alert"
@@ -9227,7 +9394,7 @@ export interface AlertBatchCreateInput {
9227
9394
  * The type of alert.
9228
9395
  * @example "billable_metric_current_usage_amount"
9229
9396
  */
9230
- alert_type: "current_usage_amount" | "billable_metric_current_usage_amount" | "billable_metric_current_usage_units" | "lifetime_usage_amount";
9397
+ alert_type: "current_usage_amount" | "billable_metric_current_usage_amount" | "billable_metric_current_usage_units" | "lifetime_usage_amount" | "billable_metric_lifetime_usage_units";
9231
9398
  /**
9232
9399
  * Unique code used to identify the alert.
9233
9400
  * @example "storage_threshold_alert"
@@ -9329,7 +9496,7 @@ export interface TaxBaseInput {
9329
9496
  */
9330
9497
  rate?: string;
9331
9498
  /**
9332
- * Internal description of the taxe
9499
+ * Internal description of the tax
9333
9500
  * @example "French standard VAT"
9334
9501
  */
9335
9502
  description?: string | null;
@@ -9784,7 +9951,7 @@ export interface TriggeredAlertObject {
9784
9951
  * The type of alert triggered.
9785
9952
  * @example "billable_metric_current_usage_amount"
9786
9953
  */
9787
- alert_type: "current_usage_amount" | "billable_metric_current_usage_amount" | "billable_metric_current_usage_units" | "lifetime_usage_amount";
9954
+ alert_type: "current_usage_amount" | "billable_metric_current_usage_amount" | "billable_metric_current_usage_units" | "lifetime_usage_amount" | "billable_metric_lifetime_usage_units" | "wallet_balance_amount" | "wallet_credits_balance" | "wallet_ongoing_balance_amount" | "wallet_credits_ongoing_balance";
9788
9955
  /**
9789
9956
  * Unique code used to identify the alert triggered.
9790
9957
  * @example "storage_threshold_alert"
@@ -9814,7 +9981,7 @@ export interface TriggeredAlertObject {
9814
9981
  /** Array of thresholds crossed. All the recurring threshold values are present. */
9815
9982
  crossed_thresholds: AlertThresholdObject[];
9816
9983
  }
9817
- export interface CustomerIntegratrionErrorObject {
9984
+ export interface CustomerIntegrationErrorObject {
9818
9985
  /**
9819
9986
  * Unique identifier assigned to the customer within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the customer's record within the Lago system.
9820
9987
  * @format uuid
@@ -10200,7 +10367,6 @@ export interface WalletTransactionPaymentFailureObject {
10200
10367
  payment_provider_code?: string;
10201
10368
  provider_error?: string | Record<string, any>;
10202
10369
  }
10203
- export type CustomerPaymentProvidernErrorObject = CustomerPaymentProviderErrorObject;
10204
10370
  export type QueryParamsType = Record<string | number, any>;
10205
10371
  export type ResponseFormat = keyof Omit<Body, "body" | "bodyUsed">;
10206
10372
  export interface FullRequestParams extends Omit<RequestInit, "body"> {
@@ -10261,7 +10427,7 @@ export declare class HttpClient<SecurityDataType = unknown> {
10261
10427
  }
10262
10428
  /**
10263
10429
  * @title Lago API documentation
10264
- * @version 1.52.0
10430
+ * @version 1.53.0
10265
10431
  * @license AGPLv3 (https://github.com/getlago/lago-openapi/blob/main/LICENSE)
10266
10432
  * @baseUrl https://api.getlago.com/api/v1
10267
10433
  * @externalDocs https://github.com/getlago
@@ -10292,7 +10458,10 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
10292
10458
  * @request POST:/billing_entities
10293
10459
  * @secure
10294
10460
  */
10295
- createBillingEntity: (data: BillingEntityCreateInput, params?: RequestParams) => Promise<HttpResponse<BillingEntityObject, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorBadRequest | ApiErrorForbidden>>;
10461
+ createBillingEntity: (data: BillingEntityCreateInput, params?: RequestParams) => Promise<HttpResponse<{
10462
+ /** Billing entity object */
10463
+ billing_entity: BillingEntityObject;
10464
+ }, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorBadRequest | ApiErrorForbidden>>;
10296
10465
  /**
10297
10466
  * @description This endpoint returns a specific billing entity by its code
10298
10467
  *
@@ -10314,7 +10483,9 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
10314
10483
  * @request PUT:/billing_entities/{code}
10315
10484
  * @secure
10316
10485
  */
10317
- updateBillingEntity: (code: string, data: BillingEntityUpdateInput, params?: RequestParams) => Promise<HttpResponse<BillingEntityObjectExtended, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorBadRequest | ApiErrorNotFound>>;
10486
+ updateBillingEntity: (code: string, data: BillingEntityUpdateInput, params?: RequestParams) => Promise<HttpResponse<{
10487
+ billing_entity: BillingEntityObjectExtended;
10488
+ }, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorBadRequest | ApiErrorNotFound>>;
10318
10489
  };
10319
10490
  activityLogs: {
10320
10491
  /**
@@ -11015,9 +11186,9 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
11015
11186
  currency?: string;
11016
11187
  /** Filter credit notes by reasons. Possible values are `product_unsatisfactory`, `order_change`, `order_cancellation`, `fraudulent_charge`, `duplicated_charge` or `other`. */
11017
11188
  reason?: "product_unsatisfactory" | "order_change" | "order_cancellation" | "fraudulent_charge" | "duplicated_charge" | "other";
11018
- /** Filter credit notes by credit status. Possible values are `available`, `consumed` or `voided`. */
11189
+ /** Filter credit notes by credit status. Possible values are `available`, `consumed` or `voided`. */
11019
11190
  credit_status?: "available" | "consumed" | "voided";
11020
- /** Filter credit notes by refund status. Possible values are `pending`, `succeeded` or `failed`. */
11191
+ /** Filter credit notes by refund status. Possible values are `pending`, `succeeded` or `failed`. */
11021
11192
  refund_status?: "pending" | "succeeded" | "failed";
11022
11193
  /**
11023
11194
  * Filter credit notes by their related invoice number.
@@ -11039,6 +11210,11 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
11039
11210
  * @example 100000
11040
11211
  */
11041
11212
  amount_to?: number;
11213
+ /**
11214
+ * Filter credit notes by the kind of amount they carry. `credit` matches credit notes with a credited amount, `refund` those with a refunded amount and `offset` those with an amount deducted from the invoice balance. A credit note can match several types.
11215
+ * @example ["credit","refund"]
11216
+ */
11217
+ "types[]"?: ("credit" | "refund" | "offset")[];
11042
11218
  /**
11043
11219
  * Filter credit notes belonging to a self billed invoice. Possible values are `true` or `false`.
11044
11220
  * @example true
@@ -11172,6 +11348,11 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
11172
11348
  * @example 20
11173
11349
  */
11174
11350
  per_page?: number;
11351
+ /**
11352
+ * Filter customers by external ID.
11353
+ * @example "5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba"
11354
+ */
11355
+ external_id?: string;
11175
11356
  /**
11176
11357
  * Filter customers by account type.
11177
11358
  * @example ["customer","partner"]
@@ -11533,6 +11714,11 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
11533
11714
  * @example 20
11534
11715
  */
11535
11716
  per_page?: number;
11717
+ /**
11718
+ * The subscription external unique identifier (provided by your own application).
11719
+ * @example "subscription_premium"
11720
+ */
11721
+ external_id?: string;
11536
11722
  /**
11537
11723
  * The unique code representing the plan to be attached to the customer. This code must correspond to the code property of one of the active plans.
11538
11724
  * @example "premium"
@@ -11586,7 +11772,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
11586
11772
  "billing_entity_codes[]"?: string[];
11587
11773
  }, params?: RequestParams) => Promise<HttpResponse<WalletsPaginated, ApiErrorUnauthorized | ApiErrorForbidden | ApiErrorNotFound>>;
11588
11774
  /**
11589
- * @description This endpoint is used to update an existing wallet with prepaid credits.
11775
+ * @description This endpoint is used to update an existing wallet with prepaid credits. A terminated wallet cannot be updated and returns a `422` error.
11590
11776
  *
11591
11777
  * @tags wallets
11592
11778
  * @name UpdateCustomerWallet
@@ -12012,7 +12198,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
12012
12198
  };
12013
12199
  fees: {
12014
12200
  /**
12015
- * @description This endpoint is used for retrieving all fees that has been issued.
12201
+ * @description This endpoint is used for retrieving all fees that have been issued.
12016
12202
  *
12017
12203
  * @tags fees
12018
12204
  * @name FindAllFees
@@ -12046,67 +12232,67 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
12046
12232
  * @example "et_12345678"
12047
12233
  */
12048
12234
  event_transaction_id?: string;
12049
- /** Filter results by fee"s currency. */
12235
+ /** Filter results by the fee's currency. */
12050
12236
  currency?: Currency;
12051
12237
  /**
12052
- * The fee type. Possible values are `add-on`, `charge`, `credit`, `subscription` or "commitment".
12238
+ * The fee type. Possible values are `add_on`, `charge`, `fixed_charge`, `credit`, `subscription` or `commitment`.
12053
12239
  * @example "charge"
12054
12240
  */
12055
- fee_type?: "charge" | "add_on" | "subscription" | "credit" | "commitment";
12241
+ fee_type?: "charge" | "fixed_charge" | "add_on" | "subscription" | "credit" | "commitment";
12056
12242
  /**
12057
12243
  * Filter results by the `code` of the billable metric attached to the fee. Only applies to `charge` types.
12058
12244
  * @example "bm_code"
12059
12245
  */
12060
12246
  billable_metric_code?: string;
12061
12247
  /**
12062
- * Indicates the payment status of the fee. It represents the current status of the payment associated with the fee. The possible values for this field are `pending`, `succeeded`, `failed` and refunded`.
12248
+ * Indicates the payment status of the fee. It represents the current status of the payment associated with the fee. The possible values for this field are `pending`, `succeeded`, `failed` and `refunded`.
12063
12249
  * @example "succeeded"
12064
12250
  */
12065
12251
  payment_status?: "pending" | "succeeded" | "failed" | "refunded";
12066
12252
  /**
12067
- * Filter results created after creation date and time in UTC.
12253
+ * Filter results created at or after this date and time in UTC.
12068
12254
  * @format date-time
12069
12255
  * @example "2023-03-28T12:21:51Z"
12070
12256
  */
12071
12257
  created_at_from?: string;
12072
12258
  /**
12073
- * Filter results created before creation date and time in UTC.
12259
+ * Filter results created at or before this date and time in UTC.
12074
12260
  * @format date-time
12075
12261
  * @example "2023-03-28T12:21:51Z"
12076
12262
  */
12077
12263
  created_at_to?: string;
12078
12264
  /**
12079
- * Filter results with payment success after creation date and time in UTC.
12265
+ * Filter results with a payment success at or after this date and time in UTC.
12080
12266
  * @format date-time
12081
12267
  * @example "2023-03-28T12:21:51Z"
12082
12268
  */
12083
12269
  succeeded_at_from?: string;
12084
12270
  /**
12085
- * Filter results with payment success after creation date and time in UTC.
12271
+ * Filter results with a payment success at or before this date and time in UTC.
12086
12272
  * @format date-time
12087
12273
  * @example "2023-03-28T12:21:51Z"
12088
12274
  */
12089
12275
  succeeded_at_to?: string;
12090
12276
  /**
12091
- * Filter results with payment failure after creation date and time in UTC.
12277
+ * Filter results with a payment failure at or after this date and time in UTC.
12092
12278
  * @format date-time
12093
12279
  * @example "2023-03-28T12:21:51Z"
12094
12280
  */
12095
12281
  failed_at_from?: string;
12096
12282
  /**
12097
- * Filter results with payment failure after creation date and time in UTC.
12283
+ * Filter results with a payment failure at or before this date and time in UTC.
12098
12284
  * @format date-time
12099
12285
  * @example "2023-03-28T12:21:51Z"
12100
12286
  */
12101
12287
  failed_at_to?: string;
12102
12288
  /**
12103
- * Filter results with payment refund after creation date and time in UTC.
12289
+ * Filter results with a payment refund at or after this date and time in UTC.
12104
12290
  * @format date-time
12105
12291
  * @example "2023-03-28T12:21:51Z"
12106
12292
  */
12107
12293
  refunded_at_from?: string;
12108
12294
  /**
12109
- * Filter results with payment refund after creation date and time in UTC.
12295
+ * Filter results with a payment refund at or before this date and time in UTC.
12110
12296
  * @format date-time
12111
12297
  * @example "2023-03-28T12:21:51Z"
12112
12298
  */
@@ -12225,6 +12411,16 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
12225
12411
  * @example true
12226
12412
  */
12227
12413
  payment_dispute_lost?: boolean;
12414
+ /**
12415
+ * Filter invoices that are partially paid. When `true`, only invoices with a non-zero amount paid that is below the total due are returned. When `false`, those invoices are excluded.
12416
+ * @example true
12417
+ */
12418
+ partially_paid?: boolean;
12419
+ /**
12420
+ * Filter invoices settled by at least one of the given settlement types. `payment` matches invoices settled by a payment, `credit_note` matches invoices settled by a credit note.
12421
+ * @example ["payment","credit_note"]
12422
+ */
12423
+ "settlements[]"?: ("payment" | "credit_note")[];
12228
12424
  /** Filter invoices by invoice type. Possible values are `subscription`, `add_on`, `credit`, `one_off`, `advance_charges` or `progressive_billing`. */
12229
12425
  invoice_type?: "subscription" | "add_on" | "credit" | "one_off" | "advance_charges" | "progressive_billing";
12230
12426
  /**
@@ -12249,7 +12445,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
12249
12445
  purchase_order_number?: string;
12250
12446
  }, params?: RequestParams) => Promise<HttpResponse<InvoicesPaginated, ApiErrorUnauthorized>>;
12251
12447
  /**
12252
- * @description This endpoint is used for updating an existing invoice.
12448
+ * @description This endpoint is used for updating an existing invoice. A voided invoice cannot be updated and returns a `405` error.
12253
12449
  *
12254
12450
  * @tags invoices
12255
12451
  * @name UpdateInvoice
@@ -12257,7 +12453,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
12257
12453
  * @request PUT:/invoices/{lago_id}
12258
12454
  * @secure
12259
12455
  */
12260
- updateInvoice: (lagoId: string, data: InvoiceUpdateInput, params?: RequestParams) => Promise<HttpResponse<Invoice, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorBadRequest | ApiErrorNotFound>>;
12456
+ updateInvoice: (lagoId: string, data: InvoiceUpdateInput, params?: RequestParams) => Promise<HttpResponse<Invoice, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorBadRequest | ApiErrorNotFound | ApiErrorNotAllowed>>;
12261
12457
  /**
12262
12458
  * @description This endpoint is used for retrieving a specific invoice that has been issued.
12263
12459
  *
@@ -12568,6 +12764,16 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
12568
12764
  executeOrder: (lagoId: string, data?: OrderExecuteInput, params?: RequestParams) => Promise<HttpResponse<Order, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorForbidden | ApiErrorNotFound>>;
12569
12765
  };
12570
12766
  organizations: {
12767
+ /**
12768
+ * @description This endpoint retrieves your own organization's settings.
12769
+ *
12770
+ * @tags organizations
12771
+ * @name FindOrganization
12772
+ * @summary Retrieve your organization
12773
+ * @request GET:/organizations
12774
+ * @secure
12775
+ */
12776
+ findOrganization: (params?: RequestParams) => Promise<HttpResponse<Organization, ApiErrorUnauthorized>>;
12571
12777
  /**
12572
12778
  * @description This endpoint is used to update your own organization's settings.
12573
12779
  *
@@ -13248,11 +13454,21 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
13248
13454
  * @example "5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba"
13249
13455
  */
13250
13456
  external_customer_id?: string;
13457
+ /**
13458
+ * Filter subscriptions by their external unique identifier (provided by your own application).
13459
+ * @example "my_sub_1234567890"
13460
+ */
13461
+ external_id?: string;
13251
13462
  /**
13252
13463
  * The unique code representing the plan to be attached to the customer. This code must correspond to the code property of one of the active plans.
13253
13464
  * @example "premium"
13254
13465
  */
13255
13466
  plan_code?: string;
13467
+ /**
13468
+ * When set, filters subscriptions by whether their plan is an override of a parent plan. `true` returns only subscriptions on overridden plans; `false` returns only those on standard (non-overridden) plans.
13469
+ * @example true
13470
+ */
13471
+ overridden?: boolean;
13256
13472
  /**
13257
13473
  * If the field is not defined, Lago will return only `active` subscriptions. However, if you wish to fetch subscriptions by different status you can define them in a status[] query param. Available filter values: `pending`, `canceled`, `terminated`, `active`.
13258
13474
  * @example ["active","pending"]
@@ -13832,7 +14048,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
13832
14048
  * @request GET:/wallets
13833
14049
  * @secure
13834
14050
  */
13835
- findAllWallets: (query: {
14051
+ findAllWallets: (query?: {
13836
14052
  /**
13837
14053
  * Page number.
13838
14054
  * @example 1
@@ -13849,10 +14065,10 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
13849
14065
  */
13850
14066
  currency?: string;
13851
14067
  /**
13852
- * The customer external unique identifier (provided by your own application).
14068
+ * Filter wallets by customer external unique identifier (provided by your own application). When omitted, all wallets for the organization are returned.
13853
14069
  * @example "5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba"
13854
14070
  */
13855
- external_customer_id: string;
14071
+ external_customer_id?: string;
13856
14072
  /**
13857
14073
  * Filter wallets by billing entity codes.
13858
14074
  * @example ["billing_entity_code_1","billing_entity_code_2"]
@@ -13860,7 +14076,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
13860
14076
  "billing_entity_codes[]"?: string[];
13861
14077
  }, params?: RequestParams) => Promise<HttpResponse<WalletsPaginated, ApiErrorUnauthorized | ApiErrorForbidden>>;
13862
14078
  /**
13863
- * @description This endpoint is used to update an existing wallet with prepaid credits.
14079
+ * @description This endpoint is used to update an existing wallet with prepaid credits. A terminated wallet cannot be updated and returns a `422` error.
13864
14080
  *
13865
14081
  * @tags wallets
13866
14082
  * @name UpdateWallet