lago-javascript-client 1.27.1 → 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,6 +169,150 @@ export interface ApiErrorUnprocessableEntity {
169
169
  code: string;
170
170
  error_details: object;
171
171
  }
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 {
297
+ /**
298
+ * @format int32
299
+ * @example 400
300
+ */
301
+ status: number;
302
+ /** @example "Bad request" */
303
+ error: string;
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" */
314
+ code: string;
315
+ }
172
316
  export interface TaxObject {
173
317
  /**
174
318
  * Unique identifier of the tax, created by Lago.
@@ -197,7 +341,8 @@ export interface TaxObject {
197
341
  */
198
342
  rate: number;
199
343
  /**
200
- * 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
201
346
  * @example true
202
347
  */
203
348
  applied_to_organization: boolean;
@@ -222,6 +367,128 @@ export interface ApiErrorNotFound {
222
367
  /** @example "object_not_found" */
223
368
  code: string;
224
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
+ }
225
492
  export interface AddOnObject {
226
493
  /**
227
494
  * Unique identifier of the add-on, created by Lago.
@@ -342,15 +609,6 @@ export interface AddOnCreateInput {
342
609
  export interface AddOn {
343
610
  add_on: AddOnObject;
344
611
  }
345
- export interface ApiErrorBadRequest {
346
- /**
347
- * @format int32
348
- * @example 400
349
- */
350
- status: number;
351
- /** @example "Bad request" */
352
- error: string;
353
- }
354
612
  export interface AddOnUpdateInput {
355
613
  add_on: AddOnBaseInput;
356
614
  }
@@ -3814,6 +4072,12 @@ export interface Organization {
3814
4072
  organization: OrganizationObject;
3815
4073
  }
3816
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;
3817
4081
  /**
3818
4082
  * The unique identifier of the paid resource, created by Lago.
3819
4083
  * @format uuid
@@ -3835,7 +4099,7 @@ export interface PaymentObject {
3835
4099
  * The customer external unique identifier (provided by your own application)
3836
4100
  * @example "5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba"
3837
4101
  */
3838
- external_id: string;
4102
+ external_id?: string;
3839
4103
  /**
3840
4104
  * Unique identifier of the customer within the payment provider
3841
4105
  * @example "5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba"
@@ -3857,6 +4121,16 @@ export interface PaymentObject {
3857
4121
  */
3858
4122
  provider_payment_id: string;
3859
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;
3860
4134
  }
3861
4135
  export interface PaymentReceiptObject {
3862
4136
  /**
@@ -4959,7 +5233,8 @@ export interface TaxBaseInput {
4959
5233
  */
4960
5234
  description?: string | null;
4961
5235
  /**
4962
- * 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
4963
5238
  * @example true
4964
5239
  */
4965
5240
  applied_to_organization?: boolean;
@@ -5626,183 +5901,8 @@ export interface WebhookEndpointUpdateInput {
5626
5901
  */
5627
5902
  signature_algo?: "jwt" | "hmac";
5628
5903
  };
5629
- }
5630
- export interface CustomerIntegratrionErrorObject {
5631
- /**
5632
- * 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.
5633
- * @format uuid
5634
- * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
5635
- */
5636
- lago_customer_id: string;
5637
- /**
5638
- * The customer external unique identifier (provided by your own application)
5639
- * @example "5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba"
5640
- */
5641
- external_customer_id: string;
5642
- /**
5643
- * The type of accounting provider code
5644
- * @example "anrok"
5645
- */
5646
- accounting_provider: "anrok" | "hubspot" | "netsuite" | "okta" | "salesforce" | "xero";
5647
- /**
5648
- * Code of the accounting provider
5649
- * @example "Netsuite Prod"
5650
- */
5651
- accounting_provider_code: string;
5652
- provider_error: string | Record<string, any>;
5653
- }
5654
- export interface CustomerPaymentProviderErrorObject {
5655
- /**
5656
- * 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.
5657
- * @format uuid
5658
- * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
5659
- */
5660
- lago_customer_id: string;
5661
- /**
5662
- * The customer external unique identifier (provided by your own application)
5663
- * @example "5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba"
5664
- */
5665
- external_customer_id: string;
5666
- /**
5667
- * The type of payment provider
5668
- * @example "stripe"
5669
- */
5670
- payment_provider: "adyen" | "cashfree" | "gocardless" | "stripe";
5671
- /**
5672
- * Code of the payment provider
5673
- * @example "Stripe Prod"
5674
- */
5675
- payment_provider_code: string;
5676
- provider_error: string | Record<string, any>;
5677
- }
5678
- export interface CustomerTaxProviderErrorObject {
5679
- /**
5680
- * 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.
5681
- * @format uuid
5682
- * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
5683
- */
5684
- lago_customer_id: string;
5685
- /**
5686
- * The customer external unique identifier (provided by your own application)
5687
- * @example "5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba"
5688
- */
5689
- external_customer_id: string;
5690
- /**
5691
- * The type of tax provider
5692
- * @example "anrock"
5693
- */
5694
- tax_provider: "anrock" | "hubspot" | "netsuite" | "okta" | "salesforce" | "xero";
5695
- /**
5696
- * Code of the tax provider
5697
- * @example "Stripe Prod"
5698
- */
5699
- tax_provider_code: string;
5700
- provider_error: string | Record<string, any>;
5701
- }
5702
- export type CustomerViesCheckObject = CustomerBaseObject & {
5703
- vies_check?: {
5704
- /**
5705
- * Whether the VIES check was successful
5706
- * @example true
5707
- */
5708
- valid?: boolean;
5709
- };
5710
- };
5711
- export type CreditNoteExtendedObject = CreditNoteObject & {
5712
- customer?: CustomerBaseObject;
5713
- };
5714
- export interface CreditNotePaymentProviderRefundError {
5715
- /**
5716
- * 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.
5717
- * @format uuid
5718
- * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
5719
- */
5720
- lago_credit_note_id: string;
5721
- /**
5722
- * 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.
5723
- * @format uuid
5724
- * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
5725
- */
5726
- lago_customer_id: string;
5727
- /**
5728
- * The customer external unique identifier (provided by your own application)
5729
- * @example "5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba"
5730
- */
5731
- external_customer_id: string;
5732
- /**
5733
- * Unique identifier of the customer within the payment provider
5734
- * @example "5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba"
5735
- */
5736
- provider_customer_id?: string;
5737
- /**
5738
- * The type of payment provider code
5739
- * @example "stripe"
5740
- */
5741
- payment_provider: "adyen" | "cashfree" | "gocardless" | "stripe";
5742
- /**
5743
- * Code of the payment provider
5744
- * @example "Stripe Prod"
5745
- */
5746
- payment_provider_code?: string;
5747
- provider_error?: string | Record<string, any>;
5748
- }
5749
- export interface EventErrorsObject {
5750
- /**
5751
- * HTTP status code. It will always be 422
5752
- * @example 422
5753
- */
5754
- status: number;
5755
- /**
5756
- * HTTP error description. It will always be "Unprocessable Entity"
5757
- * @example "Unprocessable Entity"
5758
- */
5759
- error: string;
5760
- message: string | Record<string, any>;
5761
- event: EventObject;
5762
- }
5763
- export interface EventsErrorsObject {
5764
- /**
5765
- * List of event transaction_id with an invalid code
5766
- * @example ["transaction_1234567890"]
5767
- */
5768
- invalid_code: string[];
5769
- /**
5770
- * List of event transaction_id with a missing aggregation property
5771
- * @example ["transaction_1234567890"]
5772
- */
5773
- missing_aggregation_property: string[];
5774
- /**
5775
- * List of event transaction_id with invalid filter values
5776
- * @example ["transaction_1234567890"]
5777
- */
5778
- invalid_filter_values: string[];
5779
- }
5780
- export interface FeeTaxProviderErrorObject {
5781
- /**
5782
- * Code of the tax provider
5783
- * @example "Stripe Prod"
5784
- */
5785
- tax_provider_code: string;
5786
- /**
5787
- * Unique identifier assigned to the charge that the fee belongs to
5788
- * @format uuid
5789
- * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
5790
- */
5791
- lago_charge_id: string | null;
5792
- /**
5793
- * Unique identifier assigned to the transaction. This field is specifically displayed when the fee type is `charge`.
5794
- * @example "transaction_1234567890"
5795
- */
5796
- event_transaction_id: string | null;
5797
- provider_error: string | Record<string, any>;
5798
- }
5799
- export interface InvoicePaymentFailureObject {
5800
- /**
5801
- * 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.
5802
- * @format uuid
5803
- * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
5804
- */
5805
- lago_invoice_id: string;
5904
+ }
5905
+ export interface CustomerIntegratrionErrorObject {
5806
5906
  /**
5807
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.
5808
5908
  * @format uuid
@@ -5815,82 +5915,42 @@ export interface InvoicePaymentFailureObject {
5815
5915
  */
5816
5916
  external_customer_id: string;
5817
5917
  /**
5818
- * Unique identifier of the customer within the payment provider
5819
- * @example "5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba"
5820
- */
5821
- provider_customer_id?: string;
5822
- /**
5823
- * The type of payment provider code
5824
- * @example "stripe"
5825
- */
5826
- payment_provider: "adyen" | "cashfree" | "gocardless" | "stripe";
5827
- /**
5828
- * Code of the payment provider
5829
- * @example "Stripe Prod"
5830
- */
5831
- payment_provider_code?: string;
5832
- provider_error?: string | Record<string, any>;
5833
- }
5834
- export interface IntegrationProviderErrorObject {
5835
- /**
5836
- * 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.
5837
- * @format uuid
5838
- * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
5839
- */
5840
- lago_integration_id: string;
5841
- /**
5842
- * The type of integration provider
5843
- * @example "netsuite"
5918
+ * The type of accounting provider code
5919
+ * @example "anrok"
5844
5920
  */
5845
- provider: string;
5921
+ accounting_provider: "anrok" | "hubspot" | "netsuite" | "okta" | "salesforce" | "xero";
5846
5922
  /**
5847
- * Unique code used to identify an integration connection.
5848
- * @example "netsuite-eu-1"
5923
+ * Code of the accounting provider
5924
+ * @example "Netsuite Prod"
5849
5925
  */
5850
- provider_code: string;
5926
+ accounting_provider_code: string;
5851
5927
  provider_error: string | Record<string, any>;
5852
5928
  }
5853
- export interface PaymentProviderErrorObject {
5929
+ export interface CustomerPaymentProviderErrorObject {
5854
5930
  /**
5855
- * 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.
5856
5932
  * @format uuid
5857
5933
  * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
5858
5934
  */
5859
- lago_payment_provider_id: string;
5860
- /**
5861
- * The name of payment provider
5862
- * @example "Stripe Prod"
5863
- */
5864
- payment_provider_name: string;
5935
+ lago_customer_id: string;
5865
5936
  /**
5866
- * Code of the payment provider
5867
- * @example "stripe"
5937
+ * The customer external unique identifier (provided by your own application)
5938
+ * @example "5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba"
5868
5939
  */
5869
- payment_provider_code: string;
5940
+ external_customer_id: string;
5870
5941
  /**
5871
- * The source of the error
5942
+ * The type of payment provider
5872
5943
  * @example "stripe"
5873
5944
  */
5874
- source: "stripe";
5945
+ payment_provider: "adyen" | "cashfree" | "gocardless" | "stripe";
5875
5946
  /**
5876
- * The action that was being performed when the error occurred
5877
- * @example "payment_provider.register_webhook"
5947
+ * Code of the payment provider
5948
+ * @example "Stripe Prod"
5878
5949
  */
5879
- action?: "payment_provider.register_webhook";
5950
+ payment_provider_code: string;
5880
5951
  provider_error: string | Record<string, any>;
5881
5952
  }
5882
- export interface PaymentRequestPaymentFailureObject {
5883
- /**
5884
- * 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.
5885
- * @format uuid
5886
- * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
5887
- */
5888
- lago_payment_request_id: string;
5889
- /**
5890
- * 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.
5891
- * @example ["1a901a90-1a90-1a90-1a90-1a901a901a90"]
5892
- */
5893
- lago_invoice_ids: string[];
5953
+ export interface CustomerTaxProviderErrorObject {
5894
5954
  /**
5895
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.
5896
5956
  * @format uuid
@@ -5903,38 +5963,36 @@ export interface PaymentRequestPaymentFailureObject {
5903
5963
  */
5904
5964
  external_customer_id: string;
5905
5965
  /**
5906
- * Unique identifier of the customer within the payment provider
5907
- * @example "5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba"
5908
- */
5909
- provider_customer_id?: string;
5910
- /**
5911
- * The type of payment provider code
5912
- * @example "stripe"
5966
+ * The type of tax provider
5967
+ * @example "anrock"
5913
5968
  */
5914
- payment_provider: "adyen" | "cashfree" | "gocardless" | "stripe";
5969
+ tax_provider: "anrock" | "hubspot" | "netsuite" | "okta" | "salesforce" | "xero";
5915
5970
  /**
5916
- * Code of the payment provider
5971
+ * Code of the tax provider
5917
5972
  * @example "Stripe Prod"
5918
5973
  */
5919
- payment_provider_code?: string;
5920
- provider_error?: string | Record<string, any>;
5974
+ tax_provider_code: string;
5975
+ provider_error: string | Record<string, any>;
5921
5976
  }
5922
- export type SubscriptionWithCustomerObject = SubscriptionObject & {
5923
- plan?: PlanObject;
5924
- 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
+ };
5925
5985
  };
5926
- export type SubscriptionWithThresholdObject = SubscriptionObject & {
5927
- plan?: PlanObject;
5928
- customer?: CustomerObject;
5929
- usage_threshold?: UsageThresholdObject;
5986
+ export type CreditNoteExtendedObject = CreditNoteObject & {
5987
+ customer?: CustomerBaseObject;
5930
5988
  };
5931
- export interface WalletTransactionPaymentFailureObject {
5989
+ export interface CreditNotePaymentProviderRefundError {
5932
5990
  /**
5933
- * 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.
5934
5992
  * @format uuid
5935
5993
  * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
5936
5994
  */
5937
- lago_wallet_transaction_id: string;
5995
+ lago_credit_note_id: string;
5938
5996
  /**
5939
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.
5940
5998
  * @format uuid
@@ -5963,262 +6021,222 @@ export interface WalletTransactionPaymentFailureObject {
5963
6021
  payment_provider_code?: string;
5964
6022
  provider_error?: string | Record<string, any>;
5965
6023
  }
5966
- export interface ApiErrorForbidden {
6024
+ export interface EventErrorsObject {
5967
6025
  /**
5968
- * @format int32
5969
- * @example 403
6026
+ * HTTP status code. It will always be 422
6027
+ * @example 422
5970
6028
  */
5971
6029
  status: number;
5972
- /** @example "Forbidden" */
6030
+ /**
6031
+ * HTTP error description. It will always be "Unprocessable Entity"
6032
+ * @example "Unprocessable Entity"
6033
+ */
5973
6034
  error: string;
5974
- /** @example "feature_unavailable" */
5975
- code: string;
6035
+ message: string | Record<string, any>;
6036
+ event: EventObject;
5976
6037
  }
5977
- /** Billing entity create input */
5978
- export interface BillingEntityCreateInput {
5979
- billing_entity: {
5980
- /**
5981
- * The unique code of the billing entity
5982
- * @example "acme_corp"
5983
- */
5984
- code: string;
5985
- /**
5986
- * The name of the billing entity
5987
- * @example "Acme Corp"
5988
- */
5989
- name: string;
5990
- /**
5991
- * The default currency of the billing entity
5992
- * @example "USD"
5993
- */
5994
- default_currency?: Currency;
5995
- /**
5996
- * The type of document numbering for this billing entity:
5997
- * - `per_customer`: document numbers are unique per customer
5998
- * - `per_billing_entity`: document numbers are unique per billing entity
5999
- */
6000
- document_numbering?: "per_customer" | "per_billing_entity";
6001
- /**
6002
- * The prefix used in document numbers for this billing entity
6003
- * @example "ABC-123"
6004
- */
6005
- document_number_prefix?: string | null;
6006
- /**
6007
- * Whether to finalize invoices with zero amount for this billing entity
6008
- * @example true
6009
- */
6010
- finalize_zero_amount_invoice?: boolean;
6011
- billing_configuration?: {
6012
- /**
6013
- * The footer text to be displayed on invoices for this billing entity
6014
- * @example "Thank you for your business"
6015
- */
6016
- invoice_footer?: string;
6017
- /**
6018
- * The language of the documents generated for this billing entity
6019
- * @example "en"
6020
- */
6021
- document_locale?: string;
6022
- /**
6023
- * The grace period (in days) for invoice finalization
6024
- * @example 0
6025
- */
6026
- invoice_grace_period?: number;
6027
- };
6028
- /**
6029
- * The net payment term (in days) for this billing entity
6030
- * @example 0
6031
- */
6032
- net_payment_term?: number;
6033
- /**
6034
- * The first line of the billing address
6035
- * @example "5230 Penfield Ave"
6036
- */
6037
- address_line1?: string | null;
6038
- /**
6039
- * The second line of the billing address
6040
- * @example "Suite 100"
6041
- */
6042
- address_line2?: string | null;
6043
- /**
6044
- * The city of the billing address
6045
- * @example "Woodland Hills"
6046
- */
6047
- city?: string | null;
6048
- /**
6049
- * The state of the billing address
6050
- * @example "CA"
6051
- */
6052
- state?: string | null;
6053
- /** The country code of the billing address */
6054
- country?: Country | null;
6055
- /**
6056
- * The zipcode of the billing address
6057
- * @example "91364"
6058
- */
6059
- zipcode?: string | null;
6060
- /**
6061
- * The email address of the billing entity
6062
- * @format email
6063
- * @example "billing@acme.com"
6064
- */
6065
- email?: string | null;
6066
- /**
6067
- * The legal name of the billing entity
6068
- * @example "Acme Corporation"
6069
- */
6070
- legal_name?: string | null;
6071
- /**
6072
- * The legal registration number of the billing entity
6073
- * @example "US123456789"
6074
- */
6075
- legal_number?: string | null;
6076
- /**
6077
- * The tax identification number of the billing entity
6078
- * @example "EU123456789"
6079
- */
6080
- tax_identification_number?: string | null;
6081
- /**
6082
- * The timezone of the billing entity
6083
- * @example "UTC"
6084
- */
6085
- timezone?: Timezone;
6086
- /** The email notification settings for this billing entity */
6087
- email_settings?: ("invoice.finalized" | "credit_note.created")[];
6088
- /**
6089
- * Whether EU tax management is enabled for this billing entity
6090
- * @example false
6091
- */
6092
- eu_tax_management?: boolean;
6093
- /**
6094
- * The base64 encoded logo image for the billing entity
6095
- * @format uri
6096
- * @example "data:image/png;base64,..."
6097
- */
6098
- logo?: string | null;
6099
- };
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[];
6100
6054
  }
6101
- /** Billing entity update input */
6102
- export interface BillingEntityUpdateInput {
6055
+ export interface FeeTaxProviderErrorObject {
6103
6056
  /**
6104
- * The unique code of the billing entity
6105
- * @example "acme_corp"
6057
+ * Code of the tax provider
6058
+ * @example "Stripe Prod"
6106
6059
  */
6107
- code: string;
6060
+ tax_provider_code: string;
6108
6061
  /**
6109
- * The name of the billing entity
6110
- * @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"
6111
6065
  */
6112
- name?: string;
6066
+ lago_charge_id: string | null;
6113
6067
  /**
6114
- * The default currency of the billing entity
6115
- * @example "USD"
6068
+ * Unique identifier assigned to the transaction. This field is specifically displayed when the fee type is `charge`.
6069
+ * @example "transaction_1234567890"
6116
6070
  */
6117
- default_currency?: Currency;
6071
+ event_transaction_id: string | null;
6072
+ provider_error: string | Record<string, any>;
6073
+ }
6074
+ export interface InvoicePaymentFailureObject {
6118
6075
  /**
6119
- * The type of document numbering for this billing entity:
6120
- * - `per_customer`: document numbers are unique per customer
6121
- * - `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"
6122
6079
  */
6123
- document_numbering?: "per_customer" | "per_billing_entity";
6080
+ lago_invoice_id: string;
6124
6081
  /**
6125
- * The prefix used in document numbers for this billing entity
6126
- * @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"
6127
6085
  */
6128
- document_number_prefix?: string | null;
6086
+ lago_customer_id: string;
6129
6087
  /**
6130
- * Whether to finalize invoices with zero amount for this billing entity
6131
- * @example true
6088
+ * The customer external unique identifier (provided by your own application)
6089
+ * @example "5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba"
6132
6090
  */
6133
- finalize_zero_amount_invoice?: boolean;
6134
- billing_configuration?: {
6135
- /**
6136
- * The footer text to be displayed on invoices for this billing entity
6137
- * @example "Thank you for your business"
6138
- */
6139
- invoice_footer?: string;
6140
- /**
6141
- * The language of the documents generated for this billing entity
6142
- * @example "en"
6143
- */
6144
- document_locale?: string;
6145
- /**
6146
- * The grace period (in days) for invoice finalization
6147
- * @example 0
6148
- */
6149
- invoice_grace_period?: number;
6150
- };
6091
+ external_customer_id: string;
6151
6092
  /**
6152
- * The net payment term (in days) for this billing entity
6153
- * @example 0
6093
+ * Unique identifier of the customer within the payment provider
6094
+ * @example "5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba"
6154
6095
  */
6155
- net_payment_term?: number;
6096
+ provider_customer_id?: string;
6156
6097
  /**
6157
- * The first line of the billing address
6158
- * @example "5230 Penfield Ave"
6098
+ * The type of payment provider code
6099
+ * @example "stripe"
6159
6100
  */
6160
- address_line1?: string | null;
6101
+ payment_provider: "adyen" | "cashfree" | "gocardless" | "stripe";
6161
6102
  /**
6162
- * The second line of the billing address
6163
- * @example "Suite 100"
6103
+ * Code of the payment provider
6104
+ * @example "Stripe Prod"
6164
6105
  */
6165
- address_line2?: string | null;
6106
+ payment_provider_code?: string;
6107
+ provider_error?: string | Record<string, any>;
6108
+ }
6109
+ export interface IntegrationProviderErrorObject {
6166
6110
  /**
6167
- * The city of the billing address
6168
- * @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"
6169
6114
  */
6170
- city?: string | null;
6115
+ lago_integration_id: string;
6171
6116
  /**
6172
- * The state of the billing address
6173
- * @example "CA"
6117
+ * The type of integration provider
6118
+ * @example "netsuite"
6174
6119
  */
6175
- state?: string | null;
6176
- /** The country code of the billing address */
6177
- country?: Country | null;
6120
+ provider: string;
6178
6121
  /**
6179
- * The zipcode of the billing address
6180
- * @example "91364"
6122
+ * Unique code used to identify an integration connection.
6123
+ * @example "netsuite-eu-1"
6181
6124
  */
6182
- zipcode?: string | null;
6125
+ provider_code: string;
6126
+ provider_error: string | Record<string, any>;
6127
+ }
6128
+ export interface PaymentProviderErrorObject {
6183
6129
  /**
6184
- * The email address of the billing entity
6185
- * @format email
6186
- * @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"
6187
6133
  */
6188
- email?: string | null;
6134
+ lago_payment_provider_id: string;
6189
6135
  /**
6190
- * The legal name of the billing entity
6191
- * @example "Acme Corporation"
6136
+ * The name of payment provider
6137
+ * @example "Stripe Prod"
6192
6138
  */
6193
- legal_name?: string | null;
6139
+ payment_provider_name: string;
6194
6140
  /**
6195
- * The legal registration number of the billing entity
6196
- * @example "US123456789"
6141
+ * Code of the payment provider
6142
+ * @example "stripe"
6197
6143
  */
6198
- legal_number?: string | null;
6144
+ payment_provider_code: string;
6199
6145
  /**
6200
- * The tax identification number of the billing entity
6201
- * @example "EU123456789"
6146
+ * The source of the error
6147
+ * @example "stripe"
6202
6148
  */
6203
- tax_identification_number?: string | null;
6149
+ source: "stripe";
6204
6150
  /**
6205
- * The timezone of the billing entity
6206
- * @example "UTC"
6151
+ * The action that was being performed when the error occurred
6152
+ * @example "payment_provider.register_webhook"
6207
6153
  */
6208
- timezone?: Timezone;
6209
- /** The email notification settings for this billing entity */
6210
- 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 {
6211
6158
  /**
6212
- * Whether EU tax management is enabled for this billing entity
6213
- * @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"
6214
6162
  */
6215
- eu_tax_management?: boolean;
6163
+ lago_payment_request_id: string;
6216
6164
  /**
6217
- * The base64 encoded logo image for the billing entity
6218
- * @format uri
6219
- * @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"]
6220
6167
  */
6221
- 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>;
6222
6240
  }
6223
6241
  export type CustomerPaymentProvidernErrorObject = CustomerPaymentProviderErrorObject;
6224
6242
  export type QueryParamsType = Record<string | number, any>;
@@ -6281,7 +6299,7 @@ export declare class HttpClient<SecurityDataType = unknown> {
6281
6299
  }
6282
6300
  /**
6283
6301
  * @title Lago API documentation
6284
- * @version 1.26.0
6302
+ * @version 1.28.1
6285
6303
  * @license AGPLv3
6286
6304
  * @baseUrl https://api.getlago.com/api/v1
6287
6305
  * @externalDocs https://github.com/getlago
@@ -6303,6 +6321,16 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
6303
6321
  listBillingEntities: (params?: RequestParams) => Promise<HttpResponse<{
6304
6322
  billing_entities: BillingEntityObject[];
6305
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>>;
6306
6334
  /**
6307
6335
  * @description This endpoint returns a specific billing entity by its code
6308
6336
  *
@@ -6315,6 +6343,16 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
6315
6343
  getBillingEntity: (code: string, params?: RequestParams) => Promise<HttpResponse<{
6316
6344
  billing_entity: BillingEntityObjectExtended;
6317
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>>;
6318
6356
  };
6319
6357
  addOns: {
6320
6358
  /**
@@ -6357,7 +6395,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
6357
6395
  * @request PUT:/add_ons/{code}
6358
6396
  * @secure
6359
6397
  */
6360
- 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>>;
6361
6399
  /**
6362
6400
  * @description This endpoint is used to retrieve a specific add-on.
6363
6401
  *
@@ -6498,7 +6536,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
6498
6536
  * @request POST:/applied_coupons
6499
6537
  * @secure
6500
6538
  */
6501
- 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>>;
6502
6540
  /**
6503
6541
  * @description This endpoint is used to list all applied coupons. You can filter by coupon status and by customer.
6504
6542
  *
@@ -6582,7 +6620,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
6582
6620
  * @request PUT:/billable_metrics/{code}
6583
6621
  * @secure
6584
6622
  */
6585
- 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>>;
6586
6624
  /**
6587
6625
  * @description This endpoint deletes an existing billable metric representing a pricing component of your application.
6588
6626
  *
@@ -6645,7 +6683,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
6645
6683
  * @request PUT:/coupons/{code}
6646
6684
  * @secure
6647
6685
  */
6648
- 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>>;
6649
6687
  /**
6650
6688
  * @description This endpoint is used to retrieve a specific coupon.
6651
6689
  *
@@ -6766,7 +6804,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
6766
6804
  * @request PUT:/credit_notes/{lago_id}
6767
6805
  * @secure
6768
6806
  */
6769
- 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>>;
6770
6808
  /**
6771
6809
  * @description This endpoint retrieves an existing credit note.
6772
6810
  *
@@ -7040,7 +7078,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
7040
7078
  * @request POST:/events/estimate_fees
7041
7079
  * @secure
7042
7080
  */
7043
- 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>>;
7044
7082
  /**
7045
7083
  * @description This endpoint is used for retrieving a specific usage measurement event that has been sent to a customer or a subscription.
7046
7084
  *
@@ -7173,7 +7211,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
7173
7211
  * @request PUT:/fees/{lago_id}
7174
7212
  * @secure
7175
7213
  */
7176
- 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>>;
7177
7215
  /**
7178
7216
  * @description This endpoint is used for deleting a specific fee that has not yet been invoiced
7179
7217
  *
@@ -7294,7 +7332,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
7294
7332
  * @request PUT:/invoices/{lago_id}
7295
7333
  * @secure
7296
7334
  */
7297
- 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>>;
7298
7336
  /**
7299
7337
  * @description This endpoint is used for retrieving a specific invoice that has been issued.
7300
7338
  *
@@ -7548,7 +7586,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
7548
7586
  * @request POST:/plans
7549
7587
  * @secure
7550
7588
  */
7551
- 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>>;
7552
7590
  /**
7553
7591
  * @description This endpoint retrieves all existing plans.
7554
7592
  *
@@ -7579,7 +7617,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
7579
7617
  * @request PUT:/plans/{code}
7580
7618
  * @secure
7581
7619
  */
7582
- 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>>;
7583
7621
  /**
7584
7622
  * @description This endpoint retrieves a specific plan.
7585
7623
  *
@@ -7611,7 +7649,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
7611
7649
  * @request POST:/subscriptions
7612
7650
  * @secure
7613
7651
  */
7614
- 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>>;
7615
7653
  /**
7616
7654
  * @description This endpoint retrieves all active subscriptions.
7617
7655
  *
@@ -7667,7 +7705,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
7667
7705
  * @request PUT:/subscriptions/{external_id}
7668
7706
  * @secure
7669
7707
  */
7670
- 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>>;
7671
7709
  /**
7672
7710
  * @description This endpoint allows you to terminate a subscription.
7673
7711
  *
@@ -7703,7 +7741,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
7703
7741
  * @request PUT:/subscriptions/{external_id}/lifetime_usage
7704
7742
  * @secure
7705
7743
  */
7706
- 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>>;
7707
7745
  };
7708
7746
  taxes: {
7709
7747
  /**
@@ -7746,7 +7784,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
7746
7784
  * @request PUT:/taxes/{code}
7747
7785
  * @secure
7748
7786
  */
7749
- 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>>;
7750
7788
  /**
7751
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.
7752
7790
  *
@@ -7814,7 +7852,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
7814
7852
  * @request PUT:/wallets/{lago_id}
7815
7853
  * @secure
7816
7854
  */
7817
- 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>>;
7818
7856
  /**
7819
7857
  * @description This endpoint is used to retrieve an existing wallet with prepaid credits.
7820
7858
  *
@@ -7957,7 +7995,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
7957
7995
  * @request PUT:/webhook_endpoints/{lago_id}
7958
7996
  * @secure
7959
7997
  */
7960
- 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>>;
7961
7999
  /**
7962
8000
  * @description This endpoint is used to retrieve an existing webhook endpoint.
7963
8001
  *