lago-javascript-client 1.26.0 → 1.28.1

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.
@@ -169,15 +169,148 @@ export interface ApiErrorUnprocessableEntity {
169
169
  code: string;
170
170
  error_details: object;
171
171
  }
172
- export interface ApiErrorNotFound {
172
+ /** Billing entity create input */
173
+ export interface BillingEntityCreateInput {
174
+ billing_entity: {
175
+ /**
176
+ * The unique code of the billing entity
177
+ * @example "acme_corp"
178
+ */
179
+ code: string;
180
+ /**
181
+ * The name of the billing entity
182
+ * @example "Acme Corp"
183
+ */
184
+ name: string;
185
+ /**
186
+ * The default currency of the billing entity
187
+ * @example "USD"
188
+ */
189
+ default_currency?: Currency;
190
+ /**
191
+ * The type of document numbering for this billing entity:
192
+ * - `per_customer`: document numbers are unique per customer
193
+ * - `per_billing_entity`: document numbers are unique per billing entity
194
+ */
195
+ document_numbering?: "per_customer" | "per_billing_entity";
196
+ /**
197
+ * The prefix used in document numbers for this billing entity
198
+ * @example "ABC-123"
199
+ */
200
+ document_number_prefix?: string | null;
201
+ /**
202
+ * Whether to finalize invoices with zero amount for this billing entity
203
+ * @example true
204
+ */
205
+ finalize_zero_amount_invoice?: boolean;
206
+ billing_configuration?: {
207
+ /**
208
+ * The footer text to be displayed on invoices for this billing entity
209
+ * @example "Thank you for your business"
210
+ */
211
+ invoice_footer?: string;
212
+ /**
213
+ * The language of the documents generated for this billing entity
214
+ * @example "en"
215
+ */
216
+ document_locale?: string;
217
+ /**
218
+ * The grace period (in days) for invoice finalization
219
+ * @example 0
220
+ */
221
+ invoice_grace_period?: number;
222
+ };
223
+ /**
224
+ * The net payment term (in days) for this billing entity
225
+ * @example 0
226
+ */
227
+ net_payment_term?: number;
228
+ /**
229
+ * The first line of the billing address
230
+ * @example "5230 Penfield Ave"
231
+ */
232
+ address_line1?: string | null;
233
+ /**
234
+ * The second line of the billing address
235
+ * @example "Suite 100"
236
+ */
237
+ address_line2?: string | null;
238
+ /**
239
+ * The city of the billing address
240
+ * @example "Woodland Hills"
241
+ */
242
+ city?: string | null;
243
+ /**
244
+ * The state of the billing address
245
+ * @example "CA"
246
+ */
247
+ state?: string | null;
248
+ /** The country code of the billing address */
249
+ country?: Country | null;
250
+ /**
251
+ * The zipcode of the billing address
252
+ * @example "91364"
253
+ */
254
+ zipcode?: string | null;
255
+ /**
256
+ * The email address of the billing entity
257
+ * @format email
258
+ * @example "billing@acme.com"
259
+ */
260
+ email?: string | null;
261
+ /**
262
+ * The legal name of the billing entity
263
+ * @example "Acme Corporation"
264
+ */
265
+ legal_name?: string | null;
266
+ /**
267
+ * The legal registration number of the billing entity
268
+ * @example "US123456789"
269
+ */
270
+ legal_number?: string | null;
271
+ /**
272
+ * The tax identification number of the billing entity
273
+ * @example "EU123456789"
274
+ */
275
+ tax_identification_number?: string | null;
276
+ /**
277
+ * The timezone of the billing entity
278
+ * @example "UTC"
279
+ */
280
+ timezone?: Timezone;
281
+ /** The email notification settings for this billing entity */
282
+ email_settings?: ("invoice.finalized" | "credit_note.created")[];
283
+ /**
284
+ * Whether EU tax management is enabled for this billing entity
285
+ * @example false
286
+ */
287
+ eu_tax_management?: boolean;
288
+ /**
289
+ * The base64 encoded logo image for the billing entity
290
+ * @format uri
291
+ * @example "data:image/png;base64,..."
292
+ */
293
+ logo?: string | null;
294
+ };
295
+ }
296
+ export interface ApiErrorBadRequest {
173
297
  /**
174
298
  * @format int32
175
- * @example 404
299
+ * @example 400
176
300
  */
177
301
  status: number;
178
- /** @example "Not Found" */
302
+ /** @example "Bad request" */
179
303
  error: string;
180
- /** @example "object_not_found" */
304
+ }
305
+ export interface ApiErrorForbidden {
306
+ /**
307
+ * @format int32
308
+ * @example 403
309
+ */
310
+ status: number;
311
+ /** @example "Forbidden" */
312
+ error: string;
313
+ /** @example "feature_unavailable" */
181
314
  code: string;
182
315
  }
183
316
  export interface TaxObject {
@@ -208,7 +341,8 @@ export interface TaxObject {
208
341
  */
209
342
  rate: number;
210
343
  /**
211
- * Set to `true` if the tax is used as one of the organization's default
344
+ * This field is deprecated and will be removed in a future version. When set to true, it applies the tax to the organization's default billing entity. To apply or remove a tax from any billing entity (including the default one), please use the `PUT /billing_entity/:code` endpoint instead.
345
+ * @deprecated
212
346
  * @example true
213
347
  */
214
348
  applied_to_organization: boolean;
@@ -219,6 +353,142 @@ export interface TaxObject {
219
353
  */
220
354
  created_at: string;
221
355
  }
356
+ export type BillingEntityObjectExtended = BillingEntityObject & {
357
+ taxes?: TaxObject[];
358
+ };
359
+ export interface ApiErrorNotFound {
360
+ /**
361
+ * @format int32
362
+ * @example 404
363
+ */
364
+ status: number;
365
+ /** @example "Not Found" */
366
+ error: string;
367
+ /** @example "object_not_found" */
368
+ code: string;
369
+ }
370
+ /** Billing entity update input */
371
+ export interface BillingEntityUpdateInput {
372
+ /**
373
+ * The name of the billing entity
374
+ * @example "Acme Corp"
375
+ */
376
+ name?: string;
377
+ /**
378
+ * The default currency of the billing entity
379
+ * @example "USD"
380
+ */
381
+ default_currency?: Currency;
382
+ /**
383
+ * The type of document numbering for this billing entity:
384
+ * - `per_customer`: document numbers are unique per customer
385
+ * - `per_billing_entity`: document numbers are unique per billing entity
386
+ */
387
+ document_numbering?: "per_customer" | "per_billing_entity";
388
+ /**
389
+ * The prefix used in document numbers for this billing entity
390
+ * @example "ABC-123"
391
+ */
392
+ document_number_prefix?: string | null;
393
+ /**
394
+ * Whether to finalize invoices with zero amount for this billing entity
395
+ * @example true
396
+ */
397
+ finalize_zero_amount_invoice?: boolean;
398
+ billing_configuration?: {
399
+ /**
400
+ * The footer text to be displayed on invoices for this billing entity
401
+ * @example "Thank you for your business"
402
+ */
403
+ invoice_footer?: string;
404
+ /**
405
+ * The language of the documents generated for this billing entity
406
+ * @example "en"
407
+ */
408
+ document_locale?: string;
409
+ /**
410
+ * The grace period (in days) for invoice finalization
411
+ * @example 0
412
+ */
413
+ invoice_grace_period?: number;
414
+ };
415
+ /**
416
+ * The net payment term (in days) for this billing entity
417
+ * @example 0
418
+ */
419
+ net_payment_term?: number;
420
+ /**
421
+ * The first line of the billing address
422
+ * @example "5230 Penfield Ave"
423
+ */
424
+ address_line1?: string | null;
425
+ /**
426
+ * The second line of the billing address
427
+ * @example "Suite 100"
428
+ */
429
+ address_line2?: string | null;
430
+ /**
431
+ * The city of the billing address
432
+ * @example "Woodland Hills"
433
+ */
434
+ city?: string | null;
435
+ /**
436
+ * The state of the billing address
437
+ * @example "CA"
438
+ */
439
+ state?: string | null;
440
+ /** The country code of the billing address */
441
+ country?: Country | null;
442
+ /**
443
+ * The zipcode of the billing address
444
+ * @example "91364"
445
+ */
446
+ zipcode?: string | null;
447
+ /**
448
+ * The email address of the billing entity
449
+ * @format email
450
+ * @example "billing@acme.com"
451
+ */
452
+ email?: string | null;
453
+ /**
454
+ * The legal name of the billing entity
455
+ * @example "Acme Corporation"
456
+ */
457
+ legal_name?: string | null;
458
+ /**
459
+ * The legal registration number of the billing entity
460
+ * @example "US123456789"
461
+ */
462
+ legal_number?: string | null;
463
+ /**
464
+ * The tax identification number of the billing entity
465
+ * @example "EU123456789"
466
+ */
467
+ tax_identification_number?: string | null;
468
+ /**
469
+ * The timezone of the billing entity
470
+ * @example "UTC"
471
+ */
472
+ timezone?: Timezone;
473
+ /**
474
+ * The tax codes that should be associated with this billing entity
475
+ * @example ["french_standard_vat"]
476
+ */
477
+ tax_codes?: string[];
478
+ /** The email notification settings for this billing entity */
479
+ email_settings?: ("invoice.finalized" | "credit_note.created")[];
480
+ /**
481
+ * Whether EU tax management is enabled for this billing entity
482
+ * @example false
483
+ */
484
+ eu_tax_management?: boolean;
485
+ /**
486
+ * The base64 encoded logo image for the billing entity
487
+ * @format uri
488
+ * @example "data:image/png;base64,..."
489
+ */
490
+ logo?: string | null;
491
+ }
222
492
  export interface AddOnObject {
223
493
  /**
224
494
  * Unique identifier of the add-on, created by Lago.
@@ -339,15 +609,6 @@ export interface AddOnCreateInput {
339
609
  export interface AddOn {
340
610
  add_on: AddOnObject;
341
611
  }
342
- export interface ApiErrorBadRequest {
343
- /**
344
- * @format int32
345
- * @example 400
346
- */
347
- status: number;
348
- /** @example "Bad request" */
349
- error: string;
350
- }
351
612
  export interface AddOnUpdateInput {
352
613
  add_on: AddOnBaseInput;
353
614
  }
@@ -3216,6 +3477,12 @@ export interface InvoiceOneOffCreateInput {
3216
3477
  * @example ["french_standard_vat"]
3217
3478
  */
3218
3479
  tax_codes?: string[];
3480
+ /**
3481
+ * If true, the invoice will be created but not sent to the payment provider.
3482
+ * @default false
3483
+ * @example true
3484
+ */
3485
+ skip_psp?: boolean | null;
3219
3486
  }[];
3220
3487
  };
3221
3488
  }
@@ -3805,6 +4072,12 @@ export interface Organization {
3805
4072
  organization: OrganizationObject;
3806
4073
  }
3807
4074
  export interface PaymentObject {
4075
+ /**
4076
+ * Unique identifier of the payment, created by Lago.
4077
+ * @format uuid
4078
+ * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
4079
+ */
4080
+ lago_id: string;
3808
4081
  /**
3809
4082
  * The unique identifier of the paid resource, created by Lago.
3810
4083
  * @format uuid
@@ -3826,7 +4099,7 @@ export interface PaymentObject {
3826
4099
  * The customer external unique identifier (provided by your own application)
3827
4100
  * @example "5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba"
3828
4101
  */
3829
- external_id: string;
4102
+ external_id?: string;
3830
4103
  /**
3831
4104
  * Unique identifier of the customer within the payment provider
3832
4105
  * @example "5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba"
@@ -3848,6 +4121,16 @@ export interface PaymentObject {
3848
4121
  */
3849
4122
  provider_payment_id: string;
3850
4123
  next_action: Record<string, any>;
4124
+ /**
4125
+ * The amount of the payment in cents
4126
+ * @example 1000
4127
+ */
4128
+ amount_cents?: number;
4129
+ /**
4130
+ * The currency of the payment
4131
+ * @example "EUR"
4132
+ */
4133
+ amount_currency?: string;
3851
4134
  }
3852
4135
  export interface PaymentReceiptObject {
3853
4136
  /**
@@ -4950,7 +5233,8 @@ export interface TaxBaseInput {
4950
5233
  */
4951
5234
  description?: string | null;
4952
5235
  /**
4953
- * Set to `true` if the tax is used as one of the organization's default
5236
+ * This field is deprecated and will be removed in a future version. When set to true, it applies the tax to the organization's default billing entity. To apply or remove a tax from any billing entity (including the default one), please use the `PUT /billing_entity/:code` endpoint instead.
5237
+ * @deprecated
4954
5238
  * @example true
4955
5239
  */
4956
5240
  applied_to_organization?: boolean;
@@ -5617,183 +5901,8 @@ export interface WebhookEndpointUpdateInput {
5617
5901
  */
5618
5902
  signature_algo?: "jwt" | "hmac";
5619
5903
  };
5620
- }
5621
- export interface CustomerIntegratrionErrorObject {
5622
- /**
5623
- * 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.
5624
- * @format uuid
5625
- * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
5626
- */
5627
- lago_customer_id: string;
5628
- /**
5629
- * The customer external unique identifier (provided by your own application)
5630
- * @example "5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba"
5631
- */
5632
- external_customer_id: string;
5633
- /**
5634
- * The type of accounting provider code
5635
- * @example "anrok"
5636
- */
5637
- accounting_provider: "anrok" | "hubspot" | "netsuite" | "okta" | "salesforce" | "xero";
5638
- /**
5639
- * Code of the accounting provider
5640
- * @example "Netsuite Prod"
5641
- */
5642
- accounting_provider_code: string;
5643
- provider_error: string | Record<string, any>;
5644
- }
5645
- export interface CustomerPaymentProviderErrorObject {
5646
- /**
5647
- * 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.
5648
- * @format uuid
5649
- * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
5650
- */
5651
- lago_customer_id: string;
5652
- /**
5653
- * The customer external unique identifier (provided by your own application)
5654
- * @example "5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba"
5655
- */
5656
- external_customer_id: string;
5657
- /**
5658
- * The type of payment provider
5659
- * @example "stripe"
5660
- */
5661
- payment_provider: "adyen" | "cashfree" | "gocardless" | "stripe";
5662
- /**
5663
- * Code of the payment provider
5664
- * @example "Stripe Prod"
5665
- */
5666
- payment_provider_code: string;
5667
- provider_error: string | Record<string, any>;
5668
- }
5669
- export interface CustomerTaxProviderErrorObject {
5670
- /**
5671
- * 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.
5672
- * @format uuid
5673
- * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
5674
- */
5675
- lago_customer_id: string;
5676
- /**
5677
- * The customer external unique identifier (provided by your own application)
5678
- * @example "5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba"
5679
- */
5680
- external_customer_id: string;
5681
- /**
5682
- * The type of tax provider
5683
- * @example "anrock"
5684
- */
5685
- tax_provider: "anrock" | "hubspot" | "netsuite" | "okta" | "salesforce" | "xero";
5686
- /**
5687
- * Code of the tax provider
5688
- * @example "Stripe Prod"
5689
- */
5690
- tax_provider_code: string;
5691
- provider_error: string | Record<string, any>;
5692
- }
5693
- export type CustomerViesCheckObject = CustomerBaseObject & {
5694
- vies_check?: {
5695
- /**
5696
- * Whether the VIES check was successful
5697
- * @example true
5698
- */
5699
- valid?: boolean;
5700
- };
5701
- };
5702
- export type CreditNoteExtendedObject = CreditNoteObject & {
5703
- customer?: CustomerBaseObject;
5704
- };
5705
- export interface CreditNotePaymentProviderRefundError {
5706
- /**
5707
- * Unique identifier assigned to the credit note within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the credit note record within the Lago system.
5708
- * @format uuid
5709
- * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
5710
- */
5711
- lago_credit_note_id: string;
5712
- /**
5713
- * 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.
5714
- * @format uuid
5715
- * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
5716
- */
5717
- lago_customer_id: string;
5718
- /**
5719
- * The customer external unique identifier (provided by your own application)
5720
- * @example "5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba"
5721
- */
5722
- external_customer_id: string;
5723
- /**
5724
- * Unique identifier of the customer within the payment provider
5725
- * @example "5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba"
5726
- */
5727
- provider_customer_id?: string;
5728
- /**
5729
- * The type of payment provider code
5730
- * @example "stripe"
5731
- */
5732
- payment_provider: "adyen" | "cashfree" | "gocardless" | "stripe";
5733
- /**
5734
- * Code of the payment provider
5735
- * @example "Stripe Prod"
5736
- */
5737
- payment_provider_code?: string;
5738
- provider_error?: string | Record<string, any>;
5739
- }
5740
- export interface EventErrorsObject {
5741
- /**
5742
- * HTTP status code. It will always be 422
5743
- * @example 422
5744
- */
5745
- status: number;
5746
- /**
5747
- * HTTP error description. It will always be "Unprocessable Entity"
5748
- * @example "Unprocessable Entity"
5749
- */
5750
- error: string;
5751
- message: string | Record<string, any>;
5752
- event: EventObject;
5753
- }
5754
- export interface EventsErrorsObject {
5755
- /**
5756
- * List of event transaction_id with an invalid code
5757
- * @example ["transaction_1234567890"]
5758
- */
5759
- invalid_code: string[];
5760
- /**
5761
- * List of event transaction_id with a missing aggregation property
5762
- * @example ["transaction_1234567890"]
5763
- */
5764
- missing_aggregation_property: string[];
5765
- /**
5766
- * List of event transaction_id with invalid filter values
5767
- * @example ["transaction_1234567890"]
5768
- */
5769
- invalid_filter_values: string[];
5770
- }
5771
- export interface FeeTaxProviderErrorObject {
5772
- /**
5773
- * Code of the tax provider
5774
- * @example "Stripe Prod"
5775
- */
5776
- tax_provider_code: string;
5777
- /**
5778
- * Unique identifier assigned to the charge that the fee belongs to
5779
- * @format uuid
5780
- * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
5781
- */
5782
- lago_charge_id: string | null;
5783
- /**
5784
- * Unique identifier assigned to the transaction. This field is specifically displayed when the fee type is `charge`.
5785
- * @example "transaction_1234567890"
5786
- */
5787
- event_transaction_id: string | null;
5788
- provider_error: string | Record<string, any>;
5789
- }
5790
- export interface InvoicePaymentFailureObject {
5791
- /**
5792
- * Unique identifier assigned to the invoice within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the invoice's record within the Lago system.
5793
- * @format uuid
5794
- * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
5795
- */
5796
- lago_invoice_id: string;
5904
+ }
5905
+ export interface CustomerIntegratrionErrorObject {
5797
5906
  /**
5798
5907
  * 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.
5799
5908
  * @format uuid
@@ -5806,82 +5915,42 @@ export interface InvoicePaymentFailureObject {
5806
5915
  */
5807
5916
  external_customer_id: string;
5808
5917
  /**
5809
- * Unique identifier of the customer within the payment provider
5810
- * @example "5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba"
5811
- */
5812
- provider_customer_id?: string;
5813
- /**
5814
- * The type of payment provider code
5815
- * @example "stripe"
5816
- */
5817
- payment_provider: "adyen" | "cashfree" | "gocardless" | "stripe";
5818
- /**
5819
- * Code of the payment provider
5820
- * @example "Stripe Prod"
5821
- */
5822
- payment_provider_code?: string;
5823
- provider_error?: string | Record<string, any>;
5824
- }
5825
- export interface IntegrationProviderErrorObject {
5826
- /**
5827
- * Unique identifier assigned to the integration within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the integration's record within the Lago system.
5828
- * @format uuid
5829
- * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
5830
- */
5831
- lago_integration_id: string;
5832
- /**
5833
- * The type of integration provider
5834
- * @example "netsuite"
5918
+ * The type of accounting provider code
5919
+ * @example "anrok"
5835
5920
  */
5836
- provider: string;
5921
+ accounting_provider: "anrok" | "hubspot" | "netsuite" | "okta" | "salesforce" | "xero";
5837
5922
  /**
5838
- * Unique code used to identify an integration connection.
5839
- * @example "netsuite-eu-1"
5923
+ * Code of the accounting provider
5924
+ * @example "Netsuite Prod"
5840
5925
  */
5841
- provider_code: string;
5926
+ accounting_provider_code: string;
5842
5927
  provider_error: string | Record<string, any>;
5843
5928
  }
5844
- export interface PaymentProviderErrorObject {
5929
+ export interface CustomerPaymentProviderErrorObject {
5845
5930
  /**
5846
- * Unique identifier assigned to the payment provider within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the payment provider's record within the Lago system.
5931
+ * 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.
5847
5932
  * @format uuid
5848
5933
  * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
5849
5934
  */
5850
- lago_payment_provider_id: string;
5851
- /**
5852
- * The name of payment provider
5853
- * @example "Stripe Prod"
5854
- */
5855
- payment_provider_name: string;
5935
+ lago_customer_id: string;
5856
5936
  /**
5857
- * Code of the payment provider
5858
- * @example "stripe"
5937
+ * The customer external unique identifier (provided by your own application)
5938
+ * @example "5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba"
5859
5939
  */
5860
- payment_provider_code: string;
5940
+ external_customer_id: string;
5861
5941
  /**
5862
- * The source of the error
5942
+ * The type of payment provider
5863
5943
  * @example "stripe"
5864
5944
  */
5865
- source: "stripe";
5945
+ payment_provider: "adyen" | "cashfree" | "gocardless" | "stripe";
5866
5946
  /**
5867
- * The action that was being performed when the error occurred
5868
- * @example "payment_provider.register_webhook"
5947
+ * Code of the payment provider
5948
+ * @example "Stripe Prod"
5869
5949
  */
5870
- action?: "payment_provider.register_webhook";
5950
+ payment_provider_code: string;
5871
5951
  provider_error: string | Record<string, any>;
5872
5952
  }
5873
- export interface PaymentRequestPaymentFailureObject {
5874
- /**
5875
- * Unique identifier assigned to the payment request within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the payment request record within the Lago system.
5876
- * @format uuid
5877
- * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
5878
- */
5879
- lago_payment_request_id: string;
5880
- /**
5881
- * List of unique identifiers assigned to the invoices within the Lago application. These IDs are exclusively created by Lago and serve as unique identifiers for the invoices records within the Lago system.
5882
- * @example ["1a901a90-1a90-1a90-1a90-1a901a901a90"]
5883
- */
5884
- lago_invoice_ids: string[];
5953
+ export interface CustomerTaxProviderErrorObject {
5885
5954
  /**
5886
5955
  * 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.
5887
5956
  * @format uuid
@@ -5894,38 +5963,36 @@ export interface PaymentRequestPaymentFailureObject {
5894
5963
  */
5895
5964
  external_customer_id: string;
5896
5965
  /**
5897
- * Unique identifier of the customer within the payment provider
5898
- * @example "5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba"
5899
- */
5900
- provider_customer_id?: string;
5901
- /**
5902
- * The type of payment provider code
5903
- * @example "stripe"
5966
+ * The type of tax provider
5967
+ * @example "anrock"
5904
5968
  */
5905
- payment_provider: "adyen" | "cashfree" | "gocardless" | "stripe";
5969
+ tax_provider: "anrock" | "hubspot" | "netsuite" | "okta" | "salesforce" | "xero";
5906
5970
  /**
5907
- * Code of the payment provider
5971
+ * Code of the tax provider
5908
5972
  * @example "Stripe Prod"
5909
5973
  */
5910
- payment_provider_code?: string;
5911
- provider_error?: string | Record<string, any>;
5974
+ tax_provider_code: string;
5975
+ provider_error: string | Record<string, any>;
5912
5976
  }
5913
- export type SubscriptionWithCustomerObject = SubscriptionObject & {
5914
- plan?: PlanObject;
5915
- customer?: CustomerObject;
5977
+ export type CustomerViesCheckObject = CustomerBaseObject & {
5978
+ vies_check?: {
5979
+ /**
5980
+ * Whether the VIES check was successful
5981
+ * @example true
5982
+ */
5983
+ valid?: boolean;
5984
+ };
5916
5985
  };
5917
- export type SubscriptionWithThresholdObject = SubscriptionObject & {
5918
- plan?: PlanObject;
5919
- customer?: CustomerObject;
5920
- usage_threshold?: UsageThresholdObject;
5986
+ export type CreditNoteExtendedObject = CreditNoteObject & {
5987
+ customer?: CustomerBaseObject;
5921
5988
  };
5922
- export interface WalletTransactionPaymentFailureObject {
5989
+ export interface CreditNotePaymentProviderRefundError {
5923
5990
  /**
5924
- * Unique identifier assigned to the wallet transaction within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the wallet transaction's record within the Lago system.
5991
+ * Unique identifier assigned to the credit note within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the credit note record within the Lago system.
5925
5992
  * @format uuid
5926
5993
  * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
5927
5994
  */
5928
- lago_wallet_transaction_id: string;
5995
+ lago_credit_note_id: string;
5929
5996
  /**
5930
5997
  * 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.
5931
5998
  * @format uuid
@@ -5954,262 +6021,222 @@ export interface WalletTransactionPaymentFailureObject {
5954
6021
  payment_provider_code?: string;
5955
6022
  provider_error?: string | Record<string, any>;
5956
6023
  }
5957
- export interface ApiErrorForbidden {
6024
+ export interface EventErrorsObject {
5958
6025
  /**
5959
- * @format int32
5960
- * @example 403
6026
+ * HTTP status code. It will always be 422
6027
+ * @example 422
5961
6028
  */
5962
6029
  status: number;
5963
- /** @example "Forbidden" */
6030
+ /**
6031
+ * HTTP error description. It will always be "Unprocessable Entity"
6032
+ * @example "Unprocessable Entity"
6033
+ */
5964
6034
  error: string;
5965
- /** @example "feature_unavailable" */
5966
- code: string;
6035
+ message: string | Record<string, any>;
6036
+ event: EventObject;
5967
6037
  }
5968
- /** Billing entity create input */
5969
- export interface BillingEntityCreateInput {
5970
- billing_entity: {
5971
- /**
5972
- * The unique code of the billing entity
5973
- * @example "acme_corp"
5974
- */
5975
- code: string;
5976
- /**
5977
- * The name of the billing entity
5978
- * @example "Acme Corp"
5979
- */
5980
- name: string;
5981
- /**
5982
- * The default currency of the billing entity
5983
- * @example "USD"
5984
- */
5985
- default_currency?: Currency;
5986
- /**
5987
- * The type of document numbering for this billing entity:
5988
- * - `per_customer`: document numbers are unique per customer
5989
- * - `per_billing_entity`: document numbers are unique per billing entity
5990
- */
5991
- document_numbering?: "per_customer" | "per_billing_entity";
5992
- /**
5993
- * The prefix used in document numbers for this billing entity
5994
- * @example "ABC-123"
5995
- */
5996
- document_number_prefix?: string | null;
5997
- /**
5998
- * Whether to finalize invoices with zero amount for this billing entity
5999
- * @example true
6000
- */
6001
- finalize_zero_amount_invoice?: boolean;
6002
- billing_configuration?: {
6003
- /**
6004
- * The footer text to be displayed on invoices for this billing entity
6005
- * @example "Thank you for your business"
6006
- */
6007
- invoice_footer?: string;
6008
- /**
6009
- * The language of the documents generated for this billing entity
6010
- * @example "en"
6011
- */
6012
- document_locale?: string;
6013
- /**
6014
- * The grace period (in days) for invoice finalization
6015
- * @example 0
6016
- */
6017
- invoice_grace_period?: number;
6018
- };
6019
- /**
6020
- * The net payment term (in days) for this billing entity
6021
- * @example 0
6022
- */
6023
- net_payment_term?: number;
6024
- /**
6025
- * The first line of the billing address
6026
- * @example "5230 Penfield Ave"
6027
- */
6028
- address_line1?: string | null;
6029
- /**
6030
- * The second line of the billing address
6031
- * @example "Suite 100"
6032
- */
6033
- address_line2?: string | null;
6034
- /**
6035
- * The city of the billing address
6036
- * @example "Woodland Hills"
6037
- */
6038
- city?: string | null;
6039
- /**
6040
- * The state of the billing address
6041
- * @example "CA"
6042
- */
6043
- state?: string | null;
6044
- /** The country code of the billing address */
6045
- country?: Country | null;
6046
- /**
6047
- * The zipcode of the billing address
6048
- * @example "91364"
6049
- */
6050
- zipcode?: string | null;
6051
- /**
6052
- * The email address of the billing entity
6053
- * @format email
6054
- * @example "billing@acme.com"
6055
- */
6056
- email?: string | null;
6057
- /**
6058
- * The legal name of the billing entity
6059
- * @example "Acme Corporation"
6060
- */
6061
- legal_name?: string | null;
6062
- /**
6063
- * The legal registration number of the billing entity
6064
- * @example "US123456789"
6065
- */
6066
- legal_number?: string | null;
6067
- /**
6068
- * The tax identification number of the billing entity
6069
- * @example "EU123456789"
6070
- */
6071
- tax_identification_number?: string | null;
6072
- /**
6073
- * The timezone of the billing entity
6074
- * @example "UTC"
6075
- */
6076
- timezone?: Timezone;
6077
- /** The email notification settings for this billing entity */
6078
- email_settings?: ("invoice.finalized" | "credit_note.created")[];
6079
- /**
6080
- * Whether EU tax management is enabled for this billing entity
6081
- * @example false
6082
- */
6083
- eu_tax_management?: boolean;
6084
- /**
6085
- * The base64 encoded logo image for the billing entity
6086
- * @format uri
6087
- * @example "data:image/png;base64,..."
6088
- */
6089
- logo?: string | null;
6090
- };
6038
+ export interface EventsErrorsObject {
6039
+ /**
6040
+ * List of event transaction_id with an invalid code
6041
+ * @example ["transaction_1234567890"]
6042
+ */
6043
+ invalid_code: string[];
6044
+ /**
6045
+ * List of event transaction_id with a missing aggregation property
6046
+ * @example ["transaction_1234567890"]
6047
+ */
6048
+ missing_aggregation_property: string[];
6049
+ /**
6050
+ * List of event transaction_id with invalid filter values
6051
+ * @example ["transaction_1234567890"]
6052
+ */
6053
+ invalid_filter_values: string[];
6091
6054
  }
6092
- /** Billing entity update input */
6093
- export interface BillingEntityUpdateInput {
6055
+ export interface FeeTaxProviderErrorObject {
6094
6056
  /**
6095
- * The unique code of the billing entity
6096
- * @example "acme_corp"
6057
+ * Code of the tax provider
6058
+ * @example "Stripe Prod"
6097
6059
  */
6098
- code: string;
6060
+ tax_provider_code: string;
6099
6061
  /**
6100
- * The name of the billing entity
6101
- * @example "Acme Corp"
6062
+ * Unique identifier assigned to the charge that the fee belongs to
6063
+ * @format uuid
6064
+ * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
6102
6065
  */
6103
- name?: string;
6066
+ lago_charge_id: string | null;
6104
6067
  /**
6105
- * The default currency of the billing entity
6106
- * @example "USD"
6068
+ * Unique identifier assigned to the transaction. This field is specifically displayed when the fee type is `charge`.
6069
+ * @example "transaction_1234567890"
6107
6070
  */
6108
- default_currency?: Currency;
6071
+ event_transaction_id: string | null;
6072
+ provider_error: string | Record<string, any>;
6073
+ }
6074
+ export interface InvoicePaymentFailureObject {
6109
6075
  /**
6110
- * The type of document numbering for this billing entity:
6111
- * - `per_customer`: document numbers are unique per customer
6112
- * - `per_billing_entity`: document numbers are unique per billing entity
6076
+ * Unique identifier assigned to the invoice within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the invoice's record within the Lago system.
6077
+ * @format uuid
6078
+ * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
6113
6079
  */
6114
- document_numbering?: "per_customer" | "per_billing_entity";
6080
+ lago_invoice_id: string;
6115
6081
  /**
6116
- * The prefix used in document numbers for this billing entity
6117
- * @example "ABC-123"
6082
+ * 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.
6083
+ * @format uuid
6084
+ * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
6118
6085
  */
6119
- document_number_prefix?: string | null;
6086
+ lago_customer_id: string;
6120
6087
  /**
6121
- * Whether to finalize invoices with zero amount for this billing entity
6122
- * @example true
6088
+ * The customer external unique identifier (provided by your own application)
6089
+ * @example "5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba"
6123
6090
  */
6124
- finalize_zero_amount_invoice?: boolean;
6125
- billing_configuration?: {
6126
- /**
6127
- * The footer text to be displayed on invoices for this billing entity
6128
- * @example "Thank you for your business"
6129
- */
6130
- invoice_footer?: string;
6131
- /**
6132
- * The language of the documents generated for this billing entity
6133
- * @example "en"
6134
- */
6135
- document_locale?: string;
6136
- /**
6137
- * The grace period (in days) for invoice finalization
6138
- * @example 0
6139
- */
6140
- invoice_grace_period?: number;
6141
- };
6091
+ external_customer_id: string;
6142
6092
  /**
6143
- * The net payment term (in days) for this billing entity
6144
- * @example 0
6093
+ * Unique identifier of the customer within the payment provider
6094
+ * @example "5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba"
6145
6095
  */
6146
- net_payment_term?: number;
6096
+ provider_customer_id?: string;
6147
6097
  /**
6148
- * The first line of the billing address
6149
- * @example "5230 Penfield Ave"
6098
+ * The type of payment provider code
6099
+ * @example "stripe"
6150
6100
  */
6151
- address_line1?: string | null;
6101
+ payment_provider: "adyen" | "cashfree" | "gocardless" | "stripe";
6152
6102
  /**
6153
- * The second line of the billing address
6154
- * @example "Suite 100"
6103
+ * Code of the payment provider
6104
+ * @example "Stripe Prod"
6155
6105
  */
6156
- address_line2?: string | null;
6106
+ payment_provider_code?: string;
6107
+ provider_error?: string | Record<string, any>;
6108
+ }
6109
+ export interface IntegrationProviderErrorObject {
6157
6110
  /**
6158
- * The city of the billing address
6159
- * @example "Woodland Hills"
6111
+ * Unique identifier assigned to the integration within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the integration's record within the Lago system.
6112
+ * @format uuid
6113
+ * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
6160
6114
  */
6161
- city?: string | null;
6115
+ lago_integration_id: string;
6162
6116
  /**
6163
- * The state of the billing address
6164
- * @example "CA"
6117
+ * The type of integration provider
6118
+ * @example "netsuite"
6165
6119
  */
6166
- state?: string | null;
6167
- /** The country code of the billing address */
6168
- country?: Country | null;
6120
+ provider: string;
6169
6121
  /**
6170
- * The zipcode of the billing address
6171
- * @example "91364"
6122
+ * Unique code used to identify an integration connection.
6123
+ * @example "netsuite-eu-1"
6172
6124
  */
6173
- zipcode?: string | null;
6125
+ provider_code: string;
6126
+ provider_error: string | Record<string, any>;
6127
+ }
6128
+ export interface PaymentProviderErrorObject {
6174
6129
  /**
6175
- * The email address of the billing entity
6176
- * @format email
6177
- * @example "billing@acme.com"
6130
+ * Unique identifier assigned to the payment provider within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the payment provider's record within the Lago system.
6131
+ * @format uuid
6132
+ * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
6178
6133
  */
6179
- email?: string | null;
6134
+ lago_payment_provider_id: string;
6180
6135
  /**
6181
- * The legal name of the billing entity
6182
- * @example "Acme Corporation"
6136
+ * The name of payment provider
6137
+ * @example "Stripe Prod"
6183
6138
  */
6184
- legal_name?: string | null;
6139
+ payment_provider_name: string;
6185
6140
  /**
6186
- * The legal registration number of the billing entity
6187
- * @example "US123456789"
6141
+ * Code of the payment provider
6142
+ * @example "stripe"
6188
6143
  */
6189
- legal_number?: string | null;
6144
+ payment_provider_code: string;
6190
6145
  /**
6191
- * The tax identification number of the billing entity
6192
- * @example "EU123456789"
6146
+ * The source of the error
6147
+ * @example "stripe"
6193
6148
  */
6194
- tax_identification_number?: string | null;
6149
+ source: "stripe";
6195
6150
  /**
6196
- * The timezone of the billing entity
6197
- * @example "UTC"
6151
+ * The action that was being performed when the error occurred
6152
+ * @example "payment_provider.register_webhook"
6198
6153
  */
6199
- timezone?: Timezone;
6200
- /** The email notification settings for this billing entity */
6201
- email_settings?: ("invoice.finalized" | "credit_note.created")[];
6154
+ action?: "payment_provider.register_webhook";
6155
+ provider_error: string | Record<string, any>;
6156
+ }
6157
+ export interface PaymentRequestPaymentFailureObject {
6202
6158
  /**
6203
- * Whether EU tax management is enabled for this billing entity
6204
- * @example false
6159
+ * Unique identifier assigned to the payment request within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the payment request record within the Lago system.
6160
+ * @format uuid
6161
+ * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
6205
6162
  */
6206
- eu_tax_management?: boolean;
6163
+ lago_payment_request_id: string;
6207
6164
  /**
6208
- * The base64 encoded logo image for the billing entity
6209
- * @format uri
6210
- * @example "data:image/png;base64,..."
6165
+ * List of unique identifiers assigned to the invoices within the Lago application. These IDs are exclusively created by Lago and serve as unique identifiers for the invoices records within the Lago system.
6166
+ * @example ["1a901a90-1a90-1a90-1a90-1a901a901a90"]
6211
6167
  */
6212
- logo?: string | null;
6168
+ lago_invoice_ids: string[];
6169
+ /**
6170
+ * 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.
6171
+ * @format uuid
6172
+ * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
6173
+ */
6174
+ lago_customer_id: string;
6175
+ /**
6176
+ * The customer external unique identifier (provided by your own application)
6177
+ * @example "5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba"
6178
+ */
6179
+ external_customer_id: string;
6180
+ /**
6181
+ * Unique identifier of the customer within the payment provider
6182
+ * @example "5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba"
6183
+ */
6184
+ provider_customer_id?: string;
6185
+ /**
6186
+ * The type of payment provider code
6187
+ * @example "stripe"
6188
+ */
6189
+ payment_provider: "adyen" | "cashfree" | "gocardless" | "stripe";
6190
+ /**
6191
+ * Code of the payment provider
6192
+ * @example "Stripe Prod"
6193
+ */
6194
+ payment_provider_code?: string;
6195
+ provider_error?: string | Record<string, any>;
6196
+ }
6197
+ export type SubscriptionWithCustomerObject = SubscriptionObject & {
6198
+ plan?: PlanObject;
6199
+ customer?: CustomerObject;
6200
+ };
6201
+ export type SubscriptionWithThresholdObject = SubscriptionObject & {
6202
+ plan?: PlanObject;
6203
+ customer?: CustomerObject;
6204
+ usage_threshold?: UsageThresholdObject;
6205
+ };
6206
+ export interface WalletTransactionPaymentFailureObject {
6207
+ /**
6208
+ * Unique identifier assigned to the wallet transaction within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the wallet transaction's record within the Lago system.
6209
+ * @format uuid
6210
+ * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
6211
+ */
6212
+ lago_wallet_transaction_id: string;
6213
+ /**
6214
+ * 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.
6215
+ * @format uuid
6216
+ * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
6217
+ */
6218
+ lago_customer_id: string;
6219
+ /**
6220
+ * The customer external unique identifier (provided by your own application)
6221
+ * @example "5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba"
6222
+ */
6223
+ external_customer_id: string;
6224
+ /**
6225
+ * Unique identifier of the customer within the payment provider
6226
+ * @example "5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba"
6227
+ */
6228
+ provider_customer_id?: string;
6229
+ /**
6230
+ * The type of payment provider code
6231
+ * @example "stripe"
6232
+ */
6233
+ payment_provider: "adyen" | "cashfree" | "gocardless" | "stripe";
6234
+ /**
6235
+ * Code of the payment provider
6236
+ * @example "Stripe Prod"
6237
+ */
6238
+ payment_provider_code?: string;
6239
+ provider_error?: string | Record<string, any>;
6213
6240
  }
6214
6241
  export type CustomerPaymentProvidernErrorObject = CustomerPaymentProviderErrorObject;
6215
6242
  export type QueryParamsType = Record<string | number, any>;
@@ -6272,7 +6299,7 @@ export declare class HttpClient<SecurityDataType = unknown> {
6272
6299
  }
6273
6300
  /**
6274
6301
  * @title Lago API documentation
6275
- * @version 1.26.0
6302
+ * @version 1.28.1
6276
6303
  * @license AGPLv3
6277
6304
  * @baseUrl https://api.getlago.com/api/v1
6278
6305
  * @externalDocs https://github.com/getlago
@@ -6294,6 +6321,16 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
6294
6321
  listBillingEntities: (params?: RequestParams) => Promise<HttpResponse<{
6295
6322
  billing_entities: BillingEntityObject[];
6296
6323
  }, ApiErrorUnauthorized | ApiErrorUnprocessableEntity>>;
6324
+ /**
6325
+ * @description This endpoint is used to create a new billing entity
6326
+ *
6327
+ * @tags billing_entities
6328
+ * @name CreateBillingEntity
6329
+ * @summary Create a billing entity
6330
+ * @request POST:/billing_entities
6331
+ * @secure
6332
+ */
6333
+ createBillingEntity: (data: BillingEntityCreateInput, params?: RequestParams) => Promise<HttpResponse<BillingEntityObject, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorBadRequest | ApiErrorForbidden>>;
6297
6334
  /**
6298
6335
  * @description This endpoint returns a specific billing entity by its code
6299
6336
  *
@@ -6304,9 +6341,18 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
6304
6341
  * @secure
6305
6342
  */
6306
6343
  getBillingEntity: (code: string, params?: RequestParams) => Promise<HttpResponse<{
6307
- /** Billing entity object */
6308
- billing_entity: BillingEntityObject;
6344
+ billing_entity: BillingEntityObjectExtended;
6309
6345
  }, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorNotFound>>;
6346
+ /**
6347
+ * @description This endpoint is used to update an existing billing entity
6348
+ *
6349
+ * @tags billing_entities
6350
+ * @name UpdateBillingEntity
6351
+ * @summary Update a billing entity
6352
+ * @request PUT:/billing_entities/{code}
6353
+ * @secure
6354
+ */
6355
+ updateBillingEntity: (code: string, data: BillingEntityUpdateInput, params?: RequestParams) => Promise<HttpResponse<BillingEntityObjectExtended, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorBadRequest | ApiErrorNotFound>>;
6310
6356
  };
6311
6357
  addOns: {
6312
6358
  /**
@@ -6349,7 +6395,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
6349
6395
  * @request PUT:/add_ons/{code}
6350
6396
  * @secure
6351
6397
  */
6352
- updateAddOn: (code: string, data: AddOnUpdateInput, params?: RequestParams) => Promise<HttpResponse<AddOn, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorNotFound | ApiErrorBadRequest>>;
6398
+ updateAddOn: (code: string, data: AddOnUpdateInput, params?: RequestParams) => Promise<HttpResponse<AddOn, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorBadRequest | ApiErrorNotFound>>;
6353
6399
  /**
6354
6400
  * @description This endpoint is used to retrieve a specific add-on.
6355
6401
  *
@@ -6490,7 +6536,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
6490
6536
  * @request POST:/applied_coupons
6491
6537
  * @secure
6492
6538
  */
6493
- applyCoupon: (data: AppliedCouponInput, params?: RequestParams) => Promise<HttpResponse<AppliedCoupon, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorNotFound | ApiErrorBadRequest>>;
6539
+ applyCoupon: (data: AppliedCouponInput, params?: RequestParams) => Promise<HttpResponse<AppliedCoupon, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorBadRequest | ApiErrorNotFound>>;
6494
6540
  /**
6495
6541
  * @description This endpoint is used to list all applied coupons. You can filter by coupon status and by customer.
6496
6542
  *
@@ -6574,7 +6620,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
6574
6620
  * @request PUT:/billable_metrics/{code}
6575
6621
  * @secure
6576
6622
  */
6577
- updateBillableMetric: (code: string, data: BillableMetricUpdateInput, params?: RequestParams) => Promise<HttpResponse<BillableMetric, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorNotFound | ApiErrorBadRequest>>;
6623
+ updateBillableMetric: (code: string, data: BillableMetricUpdateInput, params?: RequestParams) => Promise<HttpResponse<BillableMetric, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorBadRequest | ApiErrorNotFound>>;
6578
6624
  /**
6579
6625
  * @description This endpoint deletes an existing billable metric representing a pricing component of your application.
6580
6626
  *
@@ -6637,7 +6683,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
6637
6683
  * @request PUT:/coupons/{code}
6638
6684
  * @secure
6639
6685
  */
6640
- updateCoupon: (code: string, data: CouponUpdateInput, params?: RequestParams) => Promise<HttpResponse<Coupon, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorNotFound | ApiErrorBadRequest>>;
6686
+ updateCoupon: (code: string, data: CouponUpdateInput, params?: RequestParams) => Promise<HttpResponse<Coupon, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorBadRequest | ApiErrorNotFound>>;
6641
6687
  /**
6642
6688
  * @description This endpoint is used to retrieve a specific coupon.
6643
6689
  *
@@ -6758,7 +6804,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
6758
6804
  * @request PUT:/credit_notes/{lago_id}
6759
6805
  * @secure
6760
6806
  */
6761
- updateCreditNote: (lagoId: string, data: CreditNoteUpdateInput, params?: RequestParams) => Promise<HttpResponse<CreditNote, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorNotFound | ApiErrorBadRequest>>;
6807
+ updateCreditNote: (lagoId: string, data: CreditNoteUpdateInput, params?: RequestParams) => Promise<HttpResponse<CreditNote, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorBadRequest | ApiErrorNotFound>>;
6762
6808
  /**
6763
6809
  * @description This endpoint retrieves an existing credit note.
6764
6810
  *
@@ -7032,7 +7078,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
7032
7078
  * @request POST:/events/estimate_fees
7033
7079
  * @secure
7034
7080
  */
7035
- eventEstimateFees: (data: EventEstimateFeesInput, params?: RequestParams) => Promise<HttpResponse<Fees, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorNotFound | ApiErrorBadRequest>>;
7081
+ eventEstimateFees: (data: EventEstimateFeesInput, params?: RequestParams) => Promise<HttpResponse<Fees, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorBadRequest | ApiErrorNotFound>>;
7036
7082
  /**
7037
7083
  * @description This endpoint is used for retrieving a specific usage measurement event that has been sent to a customer or a subscription.
7038
7084
  *
@@ -7165,7 +7211,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
7165
7211
  * @request PUT:/fees/{lago_id}
7166
7212
  * @secure
7167
7213
  */
7168
- updateFee: (lagoId: string, data: FeeUpdateInput, params?: RequestParams) => Promise<HttpResponse<Fee, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorNotFound | ApiErrorBadRequest | ApiErrorNotAllowed>>;
7214
+ updateFee: (lagoId: string, data: FeeUpdateInput, params?: RequestParams) => Promise<HttpResponse<Fee, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorBadRequest | ApiErrorNotFound | ApiErrorNotAllowed>>;
7169
7215
  /**
7170
7216
  * @description This endpoint is used for deleting a specific fee that has not yet been invoiced
7171
7217
  *
@@ -7286,7 +7332,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
7286
7332
  * @request PUT:/invoices/{lago_id}
7287
7333
  * @secure
7288
7334
  */
7289
- updateInvoice: (lagoId: string, data: InvoiceUpdateInput, params?: RequestParams) => Promise<HttpResponse<Invoice, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorNotFound | ApiErrorBadRequest>>;
7335
+ updateInvoice: (lagoId: string, data: InvoiceUpdateInput, params?: RequestParams) => Promise<HttpResponse<Invoice, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorBadRequest | ApiErrorNotFound>>;
7290
7336
  /**
7291
7337
  * @description This endpoint is used for retrieving a specific invoice that has been issued.
7292
7338
  *
@@ -7540,7 +7586,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
7540
7586
  * @request POST:/plans
7541
7587
  * @secure
7542
7588
  */
7543
- createPlan: (data: PlanCreateInput, params?: RequestParams) => Promise<HttpResponse<Plan, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorNotFound | ApiErrorBadRequest>>;
7589
+ createPlan: (data: PlanCreateInput, params?: RequestParams) => Promise<HttpResponse<Plan, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorBadRequest | ApiErrorNotFound>>;
7544
7590
  /**
7545
7591
  * @description This endpoint retrieves all existing plans.
7546
7592
  *
@@ -7571,7 +7617,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
7571
7617
  * @request PUT:/plans/{code}
7572
7618
  * @secure
7573
7619
  */
7574
- updatePlan: (code: string, data: PlanUpdateInput, params?: RequestParams) => Promise<HttpResponse<Plan, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorNotFound | ApiErrorBadRequest>>;
7620
+ updatePlan: (code: string, data: PlanUpdateInput, params?: RequestParams) => Promise<HttpResponse<Plan, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorBadRequest | ApiErrorNotFound>>;
7575
7621
  /**
7576
7622
  * @description This endpoint retrieves a specific plan.
7577
7623
  *
@@ -7603,7 +7649,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
7603
7649
  * @request POST:/subscriptions
7604
7650
  * @secure
7605
7651
  */
7606
- createSubscription: (data: SubscriptionCreateInput, params?: RequestParams) => Promise<HttpResponse<Subscription, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorNotFound | ApiErrorBadRequest>>;
7652
+ createSubscription: (data: SubscriptionCreateInput, params?: RequestParams) => Promise<HttpResponse<Subscription, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorBadRequest | ApiErrorNotFound>>;
7607
7653
  /**
7608
7654
  * @description This endpoint retrieves all active subscriptions.
7609
7655
  *
@@ -7659,7 +7705,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
7659
7705
  * @request PUT:/subscriptions/{external_id}
7660
7706
  * @secure
7661
7707
  */
7662
- updateSubscription: (externalId: string, data: SubscriptionUpdateInput, params?: RequestParams) => Promise<HttpResponse<Subscription, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorNotFound | ApiErrorBadRequest>>;
7708
+ updateSubscription: (externalId: string, data: SubscriptionUpdateInput, params?: RequestParams) => Promise<HttpResponse<Subscription, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorBadRequest | ApiErrorNotFound>>;
7663
7709
  /**
7664
7710
  * @description This endpoint allows you to terminate a subscription.
7665
7711
  *
@@ -7695,7 +7741,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
7695
7741
  * @request PUT:/subscriptions/{external_id}/lifetime_usage
7696
7742
  * @secure
7697
7743
  */
7698
- updateSubscriptionLifetimeUsage: (externalId: string, data: LifetimeUsageInput, params?: RequestParams) => Promise<HttpResponse<LifetimeUsage, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorNotFound | ApiErrorBadRequest>>;
7744
+ updateSubscriptionLifetimeUsage: (externalId: string, data: LifetimeUsageInput, params?: RequestParams) => Promise<HttpResponse<LifetimeUsage, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorBadRequest | ApiErrorNotFound>>;
7699
7745
  };
7700
7746
  taxes: {
7701
7747
  /**
@@ -7738,7 +7784,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
7738
7784
  * @request PUT:/taxes/{code}
7739
7785
  * @secure
7740
7786
  */
7741
- updateTax: (code: string, data: TaxUpdateInput, params?: RequestParams) => Promise<HttpResponse<Tax, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorNotFound | ApiErrorBadRequest>>;
7787
+ updateTax: (code: string, data: TaxUpdateInput, params?: RequestParams) => Promise<HttpResponse<Tax, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorBadRequest | ApiErrorNotFound>>;
7742
7788
  /**
7743
7789
  * @description This endpoint retrieves an existing tax representing a customizable tax rate applicable to either the organization or a specific customer. The tax is identified by its unique code.
7744
7790
  *
@@ -7806,7 +7852,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
7806
7852
  * @request PUT:/wallets/{lago_id}
7807
7853
  * @secure
7808
7854
  */
7809
- updateWallet: (lagoId: string, data: WalletUpdateInput, params?: RequestParams) => Promise<HttpResponse<Wallet, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorNotFound | ApiErrorBadRequest>>;
7855
+ updateWallet: (lagoId: string, data: WalletUpdateInput, params?: RequestParams) => Promise<HttpResponse<Wallet, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorBadRequest | ApiErrorNotFound>>;
7810
7856
  /**
7811
7857
  * @description This endpoint is used to retrieve an existing wallet with prepaid credits.
7812
7858
  *
@@ -7949,7 +7995,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
7949
7995
  * @request PUT:/webhook_endpoints/{lago_id}
7950
7996
  * @secure
7951
7997
  */
7952
- updateWebhookEndpoint: (lagoId: string, data: WebhookEndpointUpdateInput, params?: RequestParams) => Promise<HttpResponse<WebhookEndpoint, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorNotFound | ApiErrorBadRequest>>;
7998
+ updateWebhookEndpoint: (lagoId: string, data: WebhookEndpointUpdateInput, params?: RequestParams) => Promise<HttpResponse<WebhookEndpoint, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorBadRequest | ApiErrorNotFound>>;
7953
7999
  /**
7954
8000
  * @description This endpoint is used to retrieve an existing webhook endpoint.
7955
8001
  *