lago-javascript-client 0.39.0-beta → 0.41.0-beta

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.
@@ -360,29 +360,31 @@ export interface BaseAppliedTax {
360
360
  */
361
361
  lago_tax_id?: string;
362
362
  /**
363
- * The name of the tax.
364
- * @example "example name"
363
+ * Name of the tax.
364
+ * @example "TVA"
365
365
  */
366
366
  tax_name?: string;
367
367
  /**
368
- * The code of the tax.
369
- * @example "example_code"
368
+ * Unique code used to identify the tax associated with the API request.
369
+ * @example "french_standard_vat"
370
370
  */
371
371
  tax_code?: string;
372
372
  /**
373
- * The rate of the tax.
374
- * @format ^[0-9]+.?[0-9]*$
375
- * @example "25.0"
373
+ * The percentage rate of the tax
374
+ * @example 20
376
375
  */
377
- tax_rate?: string;
376
+ tax_rate?: number;
378
377
  /**
379
- * The description of the tax.
380
- * @example "description"
378
+ * Internal description of the taxe
379
+ * @example "French standard VAT"
381
380
  */
382
381
  tax_description?: string;
383
- /** @example 20 */
382
+ /**
383
+ * Amount of the tax
384
+ * @example 2000
385
+ */
384
386
  amount_cents?: number;
385
- /** The currency of the tax. */
387
+ /** Currency of the tax */
386
388
  amount_currency?: Currency;
387
389
  /**
388
390
  * The date and time when the applied tax was created. It is expressed in UTC format according to the ISO 8601 datetime standard. This field provides the timestamp for the exact moment when the applied tax was initially created.
@@ -416,6 +418,15 @@ export interface BillableMetricObject {
416
418
  * @example "GB of storage used in my application"
417
419
  */
418
420
  description?: string | null;
421
+ /**
422
+ * Defines if the billable metric is persisted billing period over billing period.
423
+ *
424
+ * - If set to `true`: the accumulated number of units calculated from the previous billing period is persisted to the next billing period.
425
+ * - If set to `false`: the accumulated number of units is reset to 0 at the end of the billing period.
426
+ * - If not defined in the request, default value is `false`.
427
+ * @example false
428
+ */
429
+ recurring: boolean;
419
430
  /**
420
431
  * Creation date of the billable metric.
421
432
  * @format date-time
@@ -466,6 +477,15 @@ export interface BillableMetricBaseInput {
466
477
  * @example "GB of storage used in my application"
467
478
  */
468
479
  description?: string | null;
480
+ /**
481
+ * Defines if the billable metric is persisted billing period over billing period.
482
+ *
483
+ * - If set to `true`: the accumulated number of units calculated from the previous billing period is persisted to the next billing period.
484
+ * - If set to `false`: the accumulated number of units is reset to 0 at the end of the billing period.
485
+ * - If not defined in the request, default value is `false`.
486
+ * @example false
487
+ */
488
+ recurring?: boolean;
469
489
  /**
470
490
  * Property of the billable metric used for aggregating usage data. This field is not required for `count_agg`.
471
491
  * @example "gb"
@@ -549,6 +569,15 @@ export interface ChargeObject {
549
569
  * @example true
550
570
  */
551
571
  invoiceable?: boolean;
572
+ /**
573
+ * Specifies whether a charge is prorated based on the remaining number of days in the billing period or billed fully.
574
+ *
575
+ * - If set to `true`, the charge is prorated based on the remaining days in the current billing period.
576
+ * - If set to `false`, the charge is billed in full.
577
+ * - If not defined in the request, default value is `false`.
578
+ * @example false
579
+ */
580
+ prorated?: boolean;
552
581
  /**
553
582
  * The minimum spending amount required for the charge, measured in cents and excluding any applicable taxes. It indicates the minimum amount that needs to be charged for each billing period.
554
583
  * @example 1200
@@ -655,6 +684,258 @@ export interface ChargeProperties {
655
684
  per_unit_amount: string;
656
685
  }[];
657
686
  }
687
+ /** @example "US" */
688
+ export declare enum Country {
689
+ AD = "AD",
690
+ AE = "AE",
691
+ AF = "AF",
692
+ AG = "AG",
693
+ AI = "AI",
694
+ AL = "AL",
695
+ AM = "AM",
696
+ AO = "AO",
697
+ AQ = "AQ",
698
+ AR = "AR",
699
+ AS = "AS",
700
+ AT = "AT",
701
+ AU = "AU",
702
+ AW = "AW",
703
+ AX = "AX",
704
+ AZ = "AZ",
705
+ BA = "BA",
706
+ BB = "BB",
707
+ BD = "BD",
708
+ BE = "BE",
709
+ BF = "BF",
710
+ BG = "BG",
711
+ BH = "BH",
712
+ BI = "BI",
713
+ BJ = "BJ",
714
+ BL = "BL",
715
+ BM = "BM",
716
+ BN = "BN",
717
+ BO = "BO",
718
+ BQ = "BQ",
719
+ BR = "BR",
720
+ BS = "BS",
721
+ BT = "BT",
722
+ BV = "BV",
723
+ BW = "BW",
724
+ BY = "BY",
725
+ BZ = "BZ",
726
+ CA = "CA",
727
+ CC = "CC",
728
+ CD = "CD",
729
+ CF = "CF",
730
+ CG = "CG",
731
+ CH = "CH",
732
+ CI = "CI",
733
+ CK = "CK",
734
+ CL = "CL",
735
+ CM = "CM",
736
+ CN = "CN",
737
+ CO = "CO",
738
+ CR = "CR",
739
+ CU = "CU",
740
+ CV = "CV",
741
+ CW = "CW",
742
+ CX = "CX",
743
+ CY = "CY",
744
+ CZ = "CZ",
745
+ DE = "DE",
746
+ DJ = "DJ",
747
+ DK = "DK",
748
+ DM = "DM",
749
+ DO = "DO",
750
+ DZ = "DZ",
751
+ EC = "EC",
752
+ EE = "EE",
753
+ EG = "EG",
754
+ EH = "EH",
755
+ ER = "ER",
756
+ ES = "ES",
757
+ ET = "ET",
758
+ FI = "FI",
759
+ FJ = "FJ",
760
+ FK = "FK",
761
+ FM = "FM",
762
+ FO = "FO",
763
+ FR = "FR",
764
+ GA = "GA",
765
+ GB = "GB",
766
+ GD = "GD",
767
+ GE = "GE",
768
+ GF = "GF",
769
+ GG = "GG",
770
+ GH = "GH",
771
+ GI = "GI",
772
+ GL = "GL",
773
+ GM = "GM",
774
+ GN = "GN",
775
+ GP = "GP",
776
+ GQ = "GQ",
777
+ GR = "GR",
778
+ GS = "GS",
779
+ GT = "GT",
780
+ GU = "GU",
781
+ GW = "GW",
782
+ GY = "GY",
783
+ HK = "HK",
784
+ HM = "HM",
785
+ HN = "HN",
786
+ HR = "HR",
787
+ HT = "HT",
788
+ HU = "HU",
789
+ ID = "ID",
790
+ IE = "IE",
791
+ IL = "IL",
792
+ IM = "IM",
793
+ IN = "IN",
794
+ IO = "IO",
795
+ IQ = "IQ",
796
+ IR = "IR",
797
+ IS = "IS",
798
+ IT = "IT",
799
+ JE = "JE",
800
+ JM = "JM",
801
+ JO = "JO",
802
+ JP = "JP",
803
+ KE = "KE",
804
+ KG = "KG",
805
+ KH = "KH",
806
+ KI = "KI",
807
+ KM = "KM",
808
+ KN = "KN",
809
+ KP = "KP",
810
+ KR = "KR",
811
+ KW = "KW",
812
+ KY = "KY",
813
+ KZ = "KZ",
814
+ LA = "LA",
815
+ LB = "LB",
816
+ LC = "LC",
817
+ LI = "LI",
818
+ LK = "LK",
819
+ LR = "LR",
820
+ LS = "LS",
821
+ LT = "LT",
822
+ LU = "LU",
823
+ LV = "LV",
824
+ LY = "LY",
825
+ MA = "MA",
826
+ MC = "MC",
827
+ MD = "MD",
828
+ ME = "ME",
829
+ MF = "MF",
830
+ MG = "MG",
831
+ MH = "MH",
832
+ MK = "MK",
833
+ ML = "ML",
834
+ MM = "MM",
835
+ MN = "MN",
836
+ MO = "MO",
837
+ MP = "MP",
838
+ MQ = "MQ",
839
+ MR = "MR",
840
+ MS = "MS",
841
+ MT = "MT",
842
+ MU = "MU",
843
+ MV = "MV",
844
+ MW = "MW",
845
+ MX = "MX",
846
+ MY = "MY",
847
+ MZ = "MZ",
848
+ NA = "NA",
849
+ NC = "NC",
850
+ NE = "NE",
851
+ NF = "NF",
852
+ NG = "NG",
853
+ NI = "NI",
854
+ NL = "NL",
855
+ NO = "NO",
856
+ NP = "NP",
857
+ NR = "NR",
858
+ NU = "NU",
859
+ NZ = "NZ",
860
+ OM = "OM",
861
+ PA = "PA",
862
+ PE = "PE",
863
+ PF = "PF",
864
+ PG = "PG",
865
+ PH = "PH",
866
+ PK = "PK",
867
+ PL = "PL",
868
+ PM = "PM",
869
+ PN = "PN",
870
+ PR = "PR",
871
+ PS = "PS",
872
+ PT = "PT",
873
+ PW = "PW",
874
+ PY = "PY",
875
+ QA = "QA",
876
+ RE = "RE",
877
+ RO = "RO",
878
+ RS = "RS",
879
+ RU = "RU",
880
+ RW = "RW",
881
+ SA = "SA",
882
+ SB = "SB",
883
+ SC = "SC",
884
+ SD = "SD",
885
+ SE = "SE",
886
+ SG = "SG",
887
+ SH = "SH",
888
+ SI = "SI",
889
+ SJ = "SJ",
890
+ SK = "SK",
891
+ SL = "SL",
892
+ SM = "SM",
893
+ SN = "SN",
894
+ SO = "SO",
895
+ SR = "SR",
896
+ SS = "SS",
897
+ ST = "ST",
898
+ SV = "SV",
899
+ SX = "SX",
900
+ SY = "SY",
901
+ SZ = "SZ",
902
+ TC = "TC",
903
+ TD = "TD",
904
+ TF = "TF",
905
+ TG = "TG",
906
+ TH = "TH",
907
+ TJ = "TJ",
908
+ TK = "TK",
909
+ TL = "TL",
910
+ TM = "TM",
911
+ TN = "TN",
912
+ TO = "TO",
913
+ TR = "TR",
914
+ TT = "TT",
915
+ TV = "TV",
916
+ TW = "TW",
917
+ TZ = "TZ",
918
+ UA = "UA",
919
+ UG = "UG",
920
+ UM = "UM",
921
+ US = "US",
922
+ UY = "UY",
923
+ UZ = "UZ",
924
+ VA = "VA",
925
+ VC = "VC",
926
+ VE = "VE",
927
+ VG = "VG",
928
+ VI = "VI",
929
+ VN = "VN",
930
+ VU = "VU",
931
+ WF = "WF",
932
+ WS = "WS",
933
+ YE = "YE",
934
+ YT = "YT",
935
+ ZA = "ZA",
936
+ ZM = "ZM",
937
+ ZW = "ZW"
938
+ }
658
939
  export interface Coupon {
659
940
  coupon: CouponObject;
660
941
  }
@@ -1015,10 +1296,9 @@ export interface CreditNoteObject {
1015
1296
  taxes_amount_cents: number;
1016
1297
  /**
1017
1298
  * The tax rate associated with this specific credit note.
1018
- * @format ^[0-9]+.?[0-9]*$
1019
- * @example "20.0"
1299
+ * @example 20
1020
1300
  */
1021
- taxes_rate: string;
1301
+ taxes_rate: number;
1022
1302
  /**
1023
1303
  * The subtotal of the credit note excluding any applicable taxes, expressed in cents.
1024
1304
  * @example 100
@@ -1353,6 +1633,11 @@ export interface CustomerBillingConfiguration {
1353
1633
  * @example "fr"
1354
1634
  */
1355
1635
  document_locale?: string;
1636
+ /**
1637
+ * Specifies the available payment methods that can be used for this customer when `payment_provider` is set to `stripe`. The `provider_payment_methods` field is an array that allows multiple payment options to be defined. If this field is not explicitly set, all the payment methods are selected. For now, possible values are `card` and `sepa_debit`.
1638
+ * @example ["card","sepa_debit"]
1639
+ */
1640
+ provider_payment_methods?: string[] | null;
1356
1641
  }
1357
1642
  export interface CustomerChargeUsageObject {
1358
1643
  /**
@@ -1421,7 +1706,7 @@ export interface CustomerChargeUsageObject {
1421
1706
  key?: string | null;
1422
1707
  /**
1423
1708
  * The group value.
1424
- * @example "eruope"
1709
+ * @example "europe"
1425
1710
  */
1426
1711
  value?: string;
1427
1712
  /**
@@ -1459,11 +1744,8 @@ export interface CustomerCreateInput {
1459
1744
  * @example "Woodland Hills"
1460
1745
  */
1461
1746
  city?: string | null;
1462
- /**
1463
- * Country code of the customer's billing address. Format must be ISO 3166 (alpha-2)
1464
- * @example "US"
1465
- */
1466
- country?: string | null;
1747
+ /** Country code of the customer's billing address. Format must be ISO 3166 (alpha-2) */
1748
+ country?: Country;
1467
1749
  /** Currency of the customer. Format must be ISO 4217 */
1468
1750
  currency?: Currency;
1469
1751
  /**
@@ -1616,11 +1898,8 @@ export interface CustomerObject {
1616
1898
  * @example "Woodland Hills"
1617
1899
  */
1618
1900
  city?: string | null;
1619
- /**
1620
- * Country code of the customer's billing address. Format must be ISO 3166 (alpha-2)
1621
- * @example "US"
1622
- */
1623
- country?: string | null;
1901
+ /** Country code of the customer's billing address. Format must be ISO 3166 (alpha-2) */
1902
+ country?: Country;
1624
1903
  /** Currency of the customer. Format must be ISO 4217 */
1625
1904
  currency?: Currency;
1626
1905
  /**
@@ -1649,6 +1928,11 @@ export interface CustomerObject {
1649
1928
  * @example "Gavin Belson"
1650
1929
  */
1651
1930
  name?: string | null;
1931
+ /**
1932
+ * The phone number of the customer
1933
+ * @example "1-171-883-3711 x245"
1934
+ */
1935
+ phone?: string | null;
1652
1936
  /**
1653
1937
  * The state of the customer's billing address
1654
1938
  * @example "CA"
@@ -1680,11 +1964,11 @@ export interface CustomerObject {
1680
1964
  /** Configuration specific to the payment provider, utilized for billing the customer. This object contains settings and parameters necessary for processing payments and invoicing the customer. */
1681
1965
  billing_configuration?: CustomerBillingConfiguration;
1682
1966
  metadata?: CustomerMetadata[];
1683
- /** List of customer taxes */
1684
- taxes?: TaxObject[];
1685
1967
  }
1686
1968
  export type CustomerObjectExtended = CustomerObject & {
1687
1969
  metadata?: CustomerMetadata[];
1970
+ /** List of customer taxes */
1971
+ taxes?: TaxObject[];
1688
1972
  };
1689
1973
  export interface CustomersPaginated {
1690
1974
  customers: CustomerObjectExtended[];
@@ -1971,10 +2255,9 @@ export interface FeeObject {
1971
2255
  taxes_amount_cents: number;
1972
2256
  /**
1973
2257
  * The tax rate associated with this specific fee.
1974
- * @format ^[0-9]+.?[0-9]*$
1975
- * @example "20.0"
2258
+ * @example 20
1976
2259
  */
1977
- taxes_rate: string;
2260
+ taxes_rate: number;
1978
2261
  /**
1979
2262
  * The number of units used to charge the customer. This field indicates the quantity or count of units consumed or utilized in the context of the charge. It helps in determining the basis for calculating the fee or cost associated with the usage of the service or product provided to the customer.
1980
2263
  * @example "0.32"
@@ -2387,11 +2670,8 @@ export interface OrganizationObject {
2387
2670
  * @example ["https://webhook.brex.com","https://webhook2.brex.com"]
2388
2671
  */
2389
2672
  webhook_urls?: string[] | null;
2390
- /**
2391
- * The country of your organization.
2392
- * @example "US"
2393
- */
2394
- country?: string | null;
2673
+ /** The country of your organization. */
2674
+ country?: Country;
2395
2675
  /**
2396
2676
  * The first line of your organization’s billing address.
2397
2677
  * @example "100 Brex Street"
@@ -2452,11 +2732,8 @@ export interface OrganizationUpdateInput {
2452
2732
  * @example "https://webhook.brex.com"
2453
2733
  */
2454
2734
  webhook_url?: string | null;
2455
- /**
2456
- * The country of your organization.
2457
- * @example "US"
2458
- */
2459
- country?: string | null;
2735
+ /** The country of your organization. */
2736
+ country?: Country;
2460
2737
  /**
2461
2738
  * The first line of your organization’s billing address.
2462
2739
  * @example "100 Brex Street"
@@ -2544,7 +2821,106 @@ export interface PaginationMeta {
2544
2821
  export interface Plan {
2545
2822
  plan: PlanObject;
2546
2823
  }
2547
- export interface PlanInput {
2824
+ export interface PlanCreateInput {
2825
+ plan: {
2826
+ /**
2827
+ * The name of the plan.
2828
+ * @example "Startup"
2829
+ */
2830
+ name?: string;
2831
+ /**
2832
+ * The code of the plan. It serves as a unique identifier associated with a particular plan. The code is typically used for internal or system-level identification purposes, like assigning a subscription, for instance.
2833
+ * @example "startup"
2834
+ */
2835
+ code?: string;
2836
+ /**
2837
+ * The interval used for recurring billing. It represents the frequency at which subscription billing occurs. The interval can be one of the following values: `yearly`, `monthly`, or `weekly`.
2838
+ * @example "monthly"
2839
+ */
2840
+ interval?: "weekly" | "monthly" | "yearly";
2841
+ /**
2842
+ * The description on the plan.
2843
+ * @example "Plan for early stage startups."
2844
+ */
2845
+ description?: string;
2846
+ /**
2847
+ * The base cost of the plan, excluding any applicable taxes, that is billed on a recurring basis. This value is defined at 0 if your plan is a pay-as-you-go plan.
2848
+ * @example 10000
2849
+ */
2850
+ amount_cents?: number;
2851
+ /** The currency of the plan. It indicates the monetary unit in which the plan's cost, including taxes and usage-based charges, is expressed. */
2852
+ amount_currency?: Currency;
2853
+ /**
2854
+ * The duration in days during which the base cost of the plan is offered for free.
2855
+ * @example 5
2856
+ */
2857
+ trial_period?: number;
2858
+ /**
2859
+ * This field determines the billing timing for the plan. When set to `true`, the base cost of the plan is due at the beginning of each billing period. Conversely, when set to `false`, the base cost of the plan is due at the end of each billing period.
2860
+ * @example true
2861
+ */
2862
+ pay_in_advance?: boolean;
2863
+ /**
2864
+ * This field, when set to `true`, enables to invoice usage-based charges on monthly basis, even if the cadence of the plan is yearly. This allows customers to pay charges overage on a monthly basis. This can be set to true only if the plan’s interval is `yearly`.
2865
+ * @example null
2866
+ */
2867
+ bill_charges_monthly?: boolean | null;
2868
+ /**
2869
+ * Additional usage-based charges for this plan.
2870
+ * @example [{"billable_metric_id":"1a901a90-1a90-1a90-1a90-1a901a901a91","charge_model":"package","invoiceable":true,"pay_in_advance":false,"prorated":false,"min_amount_cents":3000,"properties":{"amount":"30","free_units":100,"package_size":1000},"group_properties":[]},{"billable_metric_id":"1a901a90-1a90-1a90-1a90-1a901a901a92","charge_model":"graduated","invoiceable":true,"pay_in_advance":false,"prorated":false,"min_amount_cents":0,"properties":{"graduated_ranges":[{"to_value":10,"from_value":0,"flat_amount":"10","per_unit_amount":"0.5"},{"to_value":null,"from_value":11,"flat_amount":"0","per_unit_amount":"0.4"}]},"group_properties":[]},{"billable_metric_id":"1a901a90-1a90-1a90-1a90-1a901a901a93","charge_model":"standard","invoiceable":true,"pay_in_advance":true,"prorated":false,"min_amount_cents":0,"properties":{},"group_properties":[{"group_id":"1a901a90-1a90-1a90-1a90-1a901a901a01","values":{"amount":"10"}},{"group_id":"1a901a90-1a90-1a90-1a90-1a901a901a02","values":{"amount":"5"}},{"group_id":"1a901a90-1a90-1a90-1a90-1a901a901a03","values":{"amount":"8"}}]},{"billable_metric_id":"1a901a90-1a90-1a90-1a90-1a901a901a94","charge_model":"volume","invoiceable":true,"pay_in_advance":false,"prorated":false,"min_amount_cents":0,"properties":{"volume_ranges":[{"from_value":0,"to_value":100,"flat_amount":"0","per_unit_amount":"0"},{"from_value":101,"to_value":null,"flat_amount":"0","per_unit_amount":"0.5"}]},"group_properties":[]},{"billable_metric_id":"1a901a90-1a90-1a90-1a90-1a901a901a95","charge_model":"percentage","invoiceable":false,"pay_in_advance":true,"prorated":false,"min_amount_cents":0,"properties":{"rate":"1","fixed_amount":"0.5","free_units_per_events":5,"free_units_per_total_aggregation":"500"},"group_properties":[]}]
2871
+ */
2872
+ charges?: {
2873
+ /**
2874
+ * Unique identifier of the billable metric created by Lago.
2875
+ * @format uuid
2876
+ * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
2877
+ */
2878
+ billable_metric_id?: string;
2879
+ /**
2880
+ * Specifies the pricing model used for the calculation of the final fee. It can be `standard`, `graduated`, `package`, `percentage` or `volume`.
2881
+ * @example "standard"
2882
+ */
2883
+ charge_model?: "standard" | "graduated" | "package" | "percentage" | "volume";
2884
+ /**
2885
+ * This field determines the billing timing for this specific usage-based charge. When set to `true`, the charge is due and invoiced immediately. Conversely, when set to false, the charge is due and invoiced at the end of each billing period.
2886
+ * @example false
2887
+ */
2888
+ pay_in_advance?: boolean;
2889
+ /**
2890
+ * This field specifies whether the charge should be included in a proper invoice. If set to false, no invoice will be issued for this charge. You can only set it to `false` when `pay_in_advance` is `true`.
2891
+ * @example true
2892
+ */
2893
+ invoiceable?: boolean;
2894
+ /**
2895
+ * Specifies whether a charge is prorated based on the remaining number of days in the billing period or billed fully.
2896
+ *
2897
+ * - If set to `true`, the charge is prorated based on the remaining days in the current billing period.
2898
+ * - If set to `false`, the charge is billed in full.
2899
+ * - If not defined in the request, default value is `false`.
2900
+ * @example false
2901
+ */
2902
+ prorated?: boolean;
2903
+ /**
2904
+ * The minimum spending amount required for the charge, measured in cents and excluding any applicable taxes. It indicates the minimum amount that needs to be charged for each billing period.
2905
+ * @example 0
2906
+ */
2907
+ min_amount_cents?: number;
2908
+ /** List of all thresholds utilized for calculating the charge. */
2909
+ properties?: ChargeProperties;
2910
+ /** All charge information, sorted by groups. */
2911
+ group_properties?: {
2912
+ /**
2913
+ * Unique identifier of a billable metric group, created by Lago.
2914
+ * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
2915
+ */
2916
+ group_id: string;
2917
+ /** List of all thresholds utilized for calculating a charge, scoped by groups used as dimensions for a single charge. */
2918
+ values: ChargeProperties;
2919
+ }[];
2920
+ }[];
2921
+ };
2922
+ }
2923
+ export interface PlanUpdateInput {
2548
2924
  plan: {
2549
2925
  /**
2550
2926
  * The name of the plan.
@@ -2590,7 +2966,7 @@ export interface PlanInput {
2590
2966
  bill_charges_monthly?: boolean | null;
2591
2967
  /**
2592
2968
  * Additional usage-based charges for this plan.
2593
- * @example [{"billable_metric_id":"1a901a90-1a90-1a90-1a90-1a901a901a91","charge_model":"package","invoiceable":true,"pay_in_advance":false,"min_amount_cents":3000,"properties":{"amount":"30","free_units":100,"package_size":1000},"group_properties":[]},{"billable_metric_id":"1a901a90-1a90-1a90-1a90-1a901a901a92","charge_model":"graduated","invoiceable":true,"pay_in_advance":false,"min_amount_cents":0,"properties":{"graduated_ranges":[{"to_value":10,"from_value":0,"flat_amount":"10","per_unit_amount":"0.5"},{"to_value":null,"from_value":11,"flat_amount":"0","per_unit_amount":"0.4"}]},"group_properties":[]},{"billable_metric_id":"1a901a90-1a90-1a90-1a90-1a901a901a93","charge_model":"standard","invoiceable":true,"pay_in_advance":true,"min_amount_cents":0,"properties":{},"group_properties":[{"group_id":"1a901a90-1a90-1a90-1a90-1a901a901a01","values":{"amount":"10"}},{"group_id":"1a901a90-1a90-1a90-1a90-1a901a901a02","values":{"amount":"5"}},{"group_id":"1a901a90-1a90-1a90-1a90-1a901a901a03","values":{"amount":"8"}}]},{"billable_metric_id":"1a901a90-1a90-1a90-1a90-1a901a901a94","charge_model":"volume","invoiceable":true,"pay_in_advance":false,"min_amount_cents":0,"properties":{"volume_ranges":[{"from_value":0,"to_value":100,"flat_amount":"0","per_unit_amount":"0"},{"from_value":101,"to_value":null,"flat_amount":"0","per_unit_amount":"0.5"}]},"group_properties":[]},{"billable_metric_id":"1a901a90-1a90-1a90-1a90-1a901a901a95","charge_model":"percentage","invoiceable":false,"pay_in_advance":true,"min_amount_cents":0,"properties":{"rate":"1","fixed_amount":"0.5","free_units_per_events":5,"free_units_per_total_aggregation":"500"},"group_properties":[]}]
2969
+ * @example [{"billable_metric_id":"1a901a90-1a90-1a90-1a90-1a901a901a91","charge_model":"package","invoiceable":true,"pay_in_advance":false,"prorated":false,"min_amount_cents":3000,"properties":{"amount":"30","free_units":100,"package_size":1000},"group_properties":[]},{"billable_metric_id":"1a901a90-1a90-1a90-1a90-1a901a901a92","charge_model":"graduated","invoiceable":true,"pay_in_advance":false,"prorated":false,"min_amount_cents":0,"properties":{"graduated_ranges":[{"to_value":10,"from_value":0,"flat_amount":"10","per_unit_amount":"0.5"},{"to_value":null,"from_value":11,"flat_amount":"0","per_unit_amount":"0.4"}]},"group_properties":[]},{"billable_metric_id":"1a901a90-1a90-1a90-1a90-1a901a901a93","charge_model":"standard","invoiceable":true,"pay_in_advance":true,"prorated":false,"min_amount_cents":0,"properties":{},"group_properties":[{"group_id":"1a901a90-1a90-1a90-1a90-1a901a901a01","values":{"amount":"10"}},{"group_id":"1a901a90-1a90-1a90-1a90-1a901a901a02","values":{"amount":"5"}},{"group_id":"1a901a90-1a90-1a90-1a90-1a901a901a03","values":{"amount":"8"}}]},{"billable_metric_id":"1a901a90-1a90-1a90-1a90-1a901a901a94","charge_model":"volume","invoiceable":true,"pay_in_advance":false,"prorated":false,"min_amount_cents":0,"properties":{"volume_ranges":[{"from_value":0,"to_value":100,"flat_amount":"0","per_unit_amount":"0"},{"from_value":101,"to_value":null,"flat_amount":"0","per_unit_amount":"0.5"}]},"group_properties":[]},{"billable_metric_id":"1a901a90-1a90-1a90-1a90-1a901a901a95","charge_model":"percentage","invoiceable":false,"pay_in_advance":true,"prorated":false,"min_amount_cents":0,"properties":{"rate":"1","fixed_amount":"0.5","free_units_per_events":5,"free_units_per_total_aggregation":"500"},"group_properties":[]}]
2594
2970
  */
2595
2971
  charges?: {
2596
2972
  /**
@@ -2620,6 +2996,15 @@ export interface PlanInput {
2620
2996
  * @example true
2621
2997
  */
2622
2998
  invoiceable?: boolean;
2999
+ /**
3000
+ * Specifies whether a charge is prorated based on the remaining number of days in the billing period or billed fully.
3001
+ *
3002
+ * - If set to `true`, the charge is prorated based on the remaining days in the current billing period.
3003
+ * - If set to `false`, the charge is billed in full.
3004
+ * - If not defined in the request, default value is `false`.
3005
+ * @example false
3006
+ */
3007
+ prorated?: boolean;
2623
3008
  /**
2624
3009
  * The minimum spending amount required for the charge, measured in cents and excluding any applicable taxes. It indicates the minimum amount that needs to be charged for each billing period.
2625
3010
  * @example 0
@@ -2707,7 +3092,7 @@ export interface PlanObject {
2707
3092
  draft_invoices_count: number;
2708
3093
  /**
2709
3094
  * Additional usage-based charges for this plan.
2710
- * @example [{"lago_id":"1a901a90-1a90-1a90-1a90-1a901a901a91","lago_billable_metric_id":"1a901a90-1a90-1a90-1a90-1a901a901a91","billable_metric_code":"requests","created_at":"2023-06-27T19:43:42Z","charge_model":"package","invoiceable":true,"pay_in_advance":false,"min_amount_cents":3000,"properties":{"amount":"30","free_units":100,"package_size":1000},"group_properties":[]},{"lago_id":"1a901a90-1a90-1a90-1a90-1a901a901a92","lago_billable_metric_id":"1a901a90-1a90-1a90-1a90-1a901a901a92","billable_metric_code":"cpu","created_at":"2023-06-27T19:43:42Z","charge_model":"graduated","invoiceable":true,"pay_in_advance":false,"min_amount_cents":0,"properties":{"graduated_ranges":[{"from_value":0,"to_value":10,"flat_amount":"10","per_unit_amount":"0.5"},{"from_value":11,"to_value":null,"flat_amount":"0","per_unit_amount":"0.4"}]},"group_properties":[]},{"lago_id":"1a901a90-1a90-1a90-1a90-1a901a901a93","lago_billable_metric_id":"1a901a90-1a90-1a90-1a90-1a901a901a93","billable_metric_code":"seats","created_at":"2023-06-27T19:43:42Z","charge_model":"standard","invoiceable":true,"pay_in_advance":true,"min_amount_cents":0,"properties":{},"group_properties":[{"group_id":"1a901a90-1a90-1a90-1a90-1a901a901a01","values":{"amount":"10"}},{"group_id":"1a901a90-1a90-1a90-1a90-1a901a901a02","values":{"amount":"5"}},{"group_id":"1a901a90-1a90-1a90-1a90-1a901a901a03","values":{"amount":"8"}}]},{"lago_id":"1a901a90-1a90-1a90-1a90-1a901a901a94","lago_billable_metric_id":"1a901a90-1a90-1a90-1a90-1a901a901a94","billable_metric_code":"storage","created_at":"2023-06-27T19:43:42Z","charge_model":"volume","invoiceable":true,"pay_in_advance":false,"min_amount_cents":0,"properties":{"volume_ranges":[{"from_value":0,"to_value":100,"flat_amount":"0","per_unit_amount":"0"},{"from_value":101,"to_value":null,"flat_amount":"0","per_unit_amount":"0.5"}]},"group_properties":[]},{"lago_id":"1a901a90-1a90-1a90-1a90-1a901a901a95","lago_billable_metric_id":"1a901a90-1a90-1a90-1a90-1a901a901a95","billable_metric_code":"payments","created_at":"2023-06-27T19:43:42Z","charge_model":"percentage","invoiceable":false,"pay_in_advance":true,"min_amount_cents":0,"properties":{"rate":"1","fixed_amount":"0.5","free_units_per_events":5,"free_units_per_total_aggregation":"500"},"group_properties":[]}]
3095
+ * @example [{"lago_id":"1a901a90-1a90-1a90-1a90-1a901a901a91","lago_billable_metric_id":"1a901a90-1a90-1a90-1a90-1a901a901a91","billable_metric_code":"requests","created_at":"2023-06-27T19:43:42Z","charge_model":"package","invoiceable":true,"pay_in_advance":false,"prorated":false,"min_amount_cents":3000,"properties":{"amount":"30","free_units":100,"package_size":1000},"group_properties":[]},{"lago_id":"1a901a90-1a90-1a90-1a90-1a901a901a92","lago_billable_metric_id":"1a901a90-1a90-1a90-1a90-1a901a901a92","billable_metric_code":"cpu","created_at":"2023-06-27T19:43:42Z","charge_model":"graduated","invoiceable":true,"pay_in_advance":false,"prorated":false,"min_amount_cents":0,"properties":{"graduated_ranges":[{"from_value":0,"to_value":10,"flat_amount":"10","per_unit_amount":"0.5"},{"from_value":11,"to_value":null,"flat_amount":"0","per_unit_amount":"0.4"}]},"group_properties":[]},{"lago_id":"1a901a90-1a90-1a90-1a90-1a901a901a93","lago_billable_metric_id":"1a901a90-1a90-1a90-1a90-1a901a901a93","billable_metric_code":"seats","created_at":"2023-06-27T19:43:42Z","charge_model":"standard","invoiceable":true,"pay_in_advance":true,"prorated":false,"min_amount_cents":0,"properties":{},"group_properties":[{"group_id":"1a901a90-1a90-1a90-1a90-1a901a901a01","values":{"amount":"10"}},{"group_id":"1a901a90-1a90-1a90-1a90-1a901a901a02","values":{"amount":"5"}},{"group_id":"1a901a90-1a90-1a90-1a90-1a901a901a03","values":{"amount":"8"}}]},{"lago_id":"1a901a90-1a90-1a90-1a90-1a901a901a94","lago_billable_metric_id":"1a901a90-1a90-1a90-1a90-1a901a901a94","billable_metric_code":"storage","created_at":"2023-06-27T19:43:42Z","charge_model":"volume","invoiceable":true,"pay_in_advance":false,"prorated":false,"min_amount_cents":0,"properties":{"volume_ranges":[{"from_value":0,"to_value":100,"flat_amount":"0","per_unit_amount":"0"},{"from_value":101,"to_value":null,"flat_amount":"0","per_unit_amount":"0.5"}]},"group_properties":[]},{"lago_id":"1a901a90-1a90-1a90-1a90-1a901a901a95","lago_billable_metric_id":"1a901a90-1a90-1a90-1a90-1a901a901a95","billable_metric_code":"payments","created_at":"2023-06-27T19:43:42Z","charge_model":"percentage","invoiceable":false,"pay_in_advance":true,"prorated":false,"min_amount_cents":0,"properties":{"rate":"1","fixed_amount":"0.5","free_units_per_events":5,"free_units_per_total_aggregation":"500"},"group_properties":[]}]
2711
3096
  */
2712
3097
  charges?: ChargeObject[];
2713
3098
  }
@@ -2869,84 +3254,88 @@ export interface SubscriptionsPaginated {
2869
3254
  export interface Tax {
2870
3255
  tax: TaxObject;
2871
3256
  }
3257
+ export interface TaxBaseInput {
3258
+ /**
3259
+ * Name of the tax.
3260
+ * @example "TVA"
3261
+ */
3262
+ name?: string;
3263
+ /**
3264
+ * Unique code used to identify the tax associated with the API request.
3265
+ * @example "french_standard_vat"
3266
+ */
3267
+ code?: string;
3268
+ /**
3269
+ * The percentage rate of the tax
3270
+ * @format ^[0-9]+.?[0-9]*$
3271
+ * @example "20.0"
3272
+ */
3273
+ rate?: string;
3274
+ /**
3275
+ * Internal description of the taxe
3276
+ * @example "French standard VAT"
3277
+ */
3278
+ description?: string | null;
3279
+ /**
3280
+ * Set to `true` if the tax is used as one of the organization's default
3281
+ * @example true
3282
+ */
3283
+ applied_to_organization?: boolean;
3284
+ }
3285
+ export interface TaxCreateInput {
3286
+ tax: TaxBaseInput;
3287
+ }
2872
3288
  export interface TaxesPaginated {
2873
3289
  taxes: TaxObject[];
2874
3290
  meta: PaginationMeta;
2875
3291
  }
2876
- export interface TaxInput {
2877
- tax: {
2878
- /**
2879
- * The name of the tax.
2880
- * @example "French VAT"
2881
- */
2882
- name?: string;
2883
- /**
2884
- * Unique code used to identify the tax.
2885
- * @example "vat_fr"
2886
- */
2887
- code?: string;
2888
- /**
2889
- * The rate of the tax
2890
- * @format ^[0-9]+.?[0-9]*$
2891
- * @example "15.0"
2892
- */
2893
- rate?: string;
2894
- /**
2895
- * Description of the tax.
2896
- * @example "description"
2897
- */
2898
- description?: string;
2899
- /**
2900
- * Set to `true` if the tax is used as one of the organization's default.
2901
- * @example false
2902
- */
2903
- applied_to_organization?: boolean;
2904
- };
2905
- }
2906
3292
  export interface TaxObject {
2907
3293
  /**
3294
+ * Unique identifier of the tax, created by Lago.
2908
3295
  * @format uuid
2909
3296
  * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
2910
3297
  */
2911
3298
  lago_id: string;
2912
3299
  /**
2913
- * The name of the tax.
2914
- * @example "French VAT"
3300
+ * Name of the tax.
3301
+ * @example "TVA"
2915
3302
  */
2916
3303
  name: string;
2917
3304
  /**
2918
- * Unique code used to identify the tax.
2919
- * @example "vat_fr"
3305
+ * Unique code used to identify the tax associated with the API request.
3306
+ * @example "french_standard_vat"
2920
3307
  */
2921
3308
  code: string;
2922
3309
  /**
2923
- * Description of the tax.
2924
- * @example "description"
3310
+ * Internal description of the taxe
3311
+ * @example "French standard VAT"
2925
3312
  */
2926
3313
  description?: string;
2927
3314
  /**
2928
- * The rate of the tax
2929
- * @format ^[0-9]+.?[0-9]*$
2930
- * @example "25.0"
3315
+ * The percentage rate of the tax
3316
+ * @example 20
2931
3317
  */
2932
- rate?: string;
3318
+ rate: number;
2933
3319
  /**
2934
- * Set to `true` if the tax is used as one of the organization's default.
3320
+ * Set to `true` if the tax is used as one of the organization's default
2935
3321
  * @example true
2936
3322
  */
2937
3323
  applied_to_organization: boolean;
2938
3324
  /**
2939
- * Number of customers this tax is applied to (directly or via the organization's default).
2940
- * @example 12
3325
+ * Number of customers this tax is applied to (directly or via the organization's default)
3326
+ * @example 0
2941
3327
  */
2942
3328
  customers_count: number;
2943
3329
  /**
2944
- * The date and time when the tax was created. It is expressed in UTC format according to the ISO 8601 datetime standard. This field provides the timestamp for the exact moment when the tax was initially created.
3330
+ * Creation date of the tax.
2945
3331
  * @format date-time
2946
- * @example "2022-09-14T16:35:31Z"
3332
+ * @example "2023-07-06T14:35:58Z"
2947
3333
  */
2948
3334
  created_at: string;
2949
3335
  }
3336
+ export interface TaxUpdateInput {
3337
+ tax: TaxBaseInput;
3338
+ }
2950
3339
  /** @example "America/Los_Angeles" */
2951
3340
  export declare enum Timezone {
2952
3341
  UTC = "UTC",
@@ -3367,7 +3756,7 @@ export declare class HttpClient<SecurityDataType = unknown> {
3367
3756
  }
3368
3757
  /**
3369
3758
  * @title Lago API documentation
3370
- * @version 0.39.0-beta
3759
+ * @version 0.41.0-beta
3371
3760
  * @license AGPLv3
3372
3761
  * @baseUrl https://api.getlago.com/api/v1
3373
3762
  * @externalDocs https://github.com/getlago
@@ -4133,7 +4522,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
4133
4522
  * @request POST:/plans
4134
4523
  * @secure
4135
4524
  */
4136
- createPlan: (data: PlanInput, params?: RequestParams) => Promise<HttpResponse<Plan, ApiErrorBadRequest | ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorNotFound>>;
4525
+ createPlan: (data: PlanCreateInput, params?: RequestParams) => Promise<HttpResponse<Plan, ApiErrorBadRequest | ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorNotFound>>;
4137
4526
  /**
4138
4527
  * @description This endpoint retrieves all existing plans.
4139
4528
  *
@@ -4164,7 +4553,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
4164
4553
  * @request PUT:/plans/{code}
4165
4554
  * @secure
4166
4555
  */
4167
- updatePlan: (code: string, data: PlanInput, params?: RequestParams) => Promise<HttpResponse<Plan, ApiErrorBadRequest | ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorNotFound>>;
4556
+ updatePlan: (code: string, data: PlanUpdateInput, params?: RequestParams) => Promise<HttpResponse<Plan, ApiErrorBadRequest | ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorNotFound>>;
4168
4557
  /**
4169
4558
  * @description This endpoint retrieves a specific plan.
4170
4559
  *
@@ -4227,6 +4616,11 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
4227
4616
  * @example "premium"
4228
4617
  */
4229
4618
  plan_code?: string;
4619
+ /**
4620
+ * If the field is not defined, Lago will return only `active` subscriptions. However, if you wish to fetch subscriptions by different status you can define them in a status[] query param. Available filter values: `pending`, `canceled`, `terminated`, `active`.
4621
+ * @example ["active","pending"]
4622
+ */
4623
+ status?: ("pending" | "canceled" | "terminated" | "active")[];
4230
4624
  }, params?: RequestParams) => Promise<HttpResponse<SubscriptionsPaginated, ApiErrorUnauthorized | ApiErrorNotFound>>;
4231
4625
  /**
4232
4626
  * @description This endpoint allows you to update a subscription.
@@ -4247,11 +4641,17 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
4247
4641
  * @request DELETE:/subscriptions/{external_id}
4248
4642
  * @secure
4249
4643
  */
4250
- destroySubscription: (externalId: string, params?: RequestParams) => Promise<HttpResponse<Subscription, ApiErrorUnauthorized | ApiErrorNotAllowed | ApiErrorNotFound>>;
4644
+ destroySubscription: (externalId: string, query?: {
4645
+ /**
4646
+ * If the field is not defined, Lago will terminate only `active` subscriptions. However, if you wish to cancel a `pending` subscription, please ensure that you include `status=pending` in your request.
4647
+ * @example "pending"
4648
+ */
4649
+ status?: string;
4650
+ }, params?: RequestParams) => Promise<HttpResponse<Subscription, ApiErrorUnauthorized | ApiErrorNotAllowed | ApiErrorNotFound>>;
4251
4651
  };
4252
4652
  taxes: {
4253
4653
  /**
4254
- * @description Create a tax
4654
+ * @description This endpoint creates a new tax representing a customizable tax rate applicable to either the organization or a specific customer.
4255
4655
  *
4256
4656
  * @tags taxes
4257
4657
  * @name CreateTax
@@ -4259,50 +4659,50 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
4259
4659
  * @request POST:/taxes
4260
4660
  * @secure
4261
4661
  */
4262
- createTax: (data: TaxInput, params?: RequestParams) => Promise<HttpResponse<Tax, ApiErrorBadRequest | ApiErrorUnauthorized | ApiErrorUnprocessableEntity>>;
4662
+ createTax: (data: TaxCreateInput, params?: RequestParams) => Promise<HttpResponse<Tax, ApiErrorBadRequest | ApiErrorUnauthorized | ApiErrorUnprocessableEntity>>;
4263
4663
  /**
4264
- * @description Find all taxes in certain organization
4664
+ * @description This endpoint retrieves all existing taxes representing a customizable tax rate applicable to either the organization or a specific customer.
4265
4665
  *
4266
4666
  * @tags taxes
4267
4667
  * @name FindAllTaxes
4268
- * @summary Find taxes
4668
+ * @summary List all taxes
4269
4669
  * @request GET:/taxes
4270
4670
  * @secure
4271
4671
  */
4272
4672
  findAllTaxes: (query?: {
4273
4673
  /**
4274
- * Number of page
4275
- * @example 2
4674
+ * Page number.
4675
+ * @example 1
4276
4676
  */
4277
4677
  page?: number;
4278
4678
  /**
4279
- * Number of records per page
4679
+ * Number of records per page.
4280
4680
  * @example 20
4281
4681
  */
4282
4682
  per_page?: number;
4283
4683
  }, params?: RequestParams) => Promise<HttpResponse<TaxesPaginated, ApiErrorUnauthorized>>;
4284
4684
  /**
4285
- * @description Update an existing tax by code
4685
+ * @description This endpoint updates an existing tax representing a customizable tax rate applicable to either the organization or a specific customer.
4286
4686
  *
4287
4687
  * @tags taxes
4288
4688
  * @name UpdateTax
4289
- * @summary Update an existing tax
4689
+ * @summary Update a tax
4290
4690
  * @request PUT:/taxes/{code}
4291
4691
  * @secure
4292
4692
  */
4293
- updateTax: (code: string, data: TaxInput, params?: RequestParams) => Promise<HttpResponse<Tax, ApiErrorBadRequest | ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorNotFound>>;
4693
+ updateTax: (code: string, data: TaxUpdateInput, params?: RequestParams) => Promise<HttpResponse<Tax, ApiErrorBadRequest | ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorNotFound>>;
4294
4694
  /**
4295
- * @description Return a single tax
4695
+ * @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.
4296
4696
  *
4297
4697
  * @tags taxes
4298
4698
  * @name FindTax
4299
- * @summary Find tax by code
4699
+ * @summary Retrieve a Tax
4300
4700
  * @request GET:/taxes/{code}
4301
4701
  * @secure
4302
4702
  */
4303
4703
  findTax: (code: string, params?: RequestParams) => Promise<HttpResponse<Tax, ApiErrorUnauthorized | ApiErrorNotFound>>;
4304
4704
  /**
4305
- * @description Delete a tax
4705
+ * @description This endpoint is used to delete a tax.
4306
4706
  *
4307
4707
  * @tags taxes
4308
4708
  * @name DestroyTax
@@ -4435,5 +4835,113 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
4435
4835
  */
4436
4836
  fetchPublicKey: (params?: RequestParams) => Promise<HttpResponse<string, ApiErrorUnauthorized>>;
4437
4837
  };
4838
+ webhookEndpoints: {
4839
+ /**
4840
+ * @description This endpoint is used to create a webhook endpoint.
4841
+ *
4842
+ * @tags webhook_endpoints
4843
+ * @name CreateWebhookEndpoint
4844
+ * @summary Create a webhook_endpoint
4845
+ * @request POST:/webhook_endpoints
4846
+ * @secure
4847
+ */
4848
+ createWebhookEndpoint: (data: {
4849
+ webhook_endpoint?: {
4850
+ /**
4851
+ * The URL of the webhook endpoint.
4852
+ * @example "https://foo.bar"
4853
+ */
4854
+ webhook_url: string;
4855
+ };
4856
+ }, params?: RequestParams) => Promise<HttpResponse<{
4857
+ webhook_endpoint: {
4858
+ /**
4859
+ * Unique identifier assigned to the wallet within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the webhook endpoint's record within the Lago system.
4860
+ * @format uuid
4861
+ * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
4862
+ */
4863
+ lago_id: string;
4864
+ /**
4865
+ * Unique identifier assigned to the organization attached to the webhook endpoint within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the organization’s record within the Lago system.
4866
+ * @format uuid
4867
+ * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
4868
+ */
4869
+ lago_organization_id: string;
4870
+ /**
4871
+ * The name of the wallet.
4872
+ * @example "Prepaid"
4873
+ */
4874
+ webhook_url: string;
4875
+ /**
4876
+ * The date of the webhook endpoint creation, represented in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC).
4877
+ * @format date-time
4878
+ * @example "2022-04-29T08:59:51Z"
4879
+ */
4880
+ created_at: string;
4881
+ };
4882
+ }, ApiErrorBadRequest | ApiErrorUnauthorized | ApiErrorUnprocessableEntity>>;
4883
+ /**
4884
+ * @description This endpoint is used to list all webhook endpoints.
4885
+ *
4886
+ * @tags webhook_endpoints
4887
+ * @name FindAllWebhookEndpoints
4888
+ * @summary List all webhook endpoints
4889
+ * @request GET:/webhook_endpoints
4890
+ * @secure
4891
+ */
4892
+ findAllWebhookEndpoints: (query?: {
4893
+ /**
4894
+ * Page number.
4895
+ * @example 1
4896
+ */
4897
+ page?: number;
4898
+ /**
4899
+ * Number of records per page.
4900
+ * @example 20
4901
+ */
4902
+ per_page?: number;
4903
+ }, params?: RequestParams) => Promise<HttpResponse<{
4904
+ webhook_endpoints: any[];
4905
+ meta: PaginationMeta;
4906
+ }, ApiErrorUnauthorized>>;
4907
+ /**
4908
+ * @description This endpoint is used to update an existing webhook endpoint.
4909
+ *
4910
+ * @tags webhook_endpoints
4911
+ * @name UpdateWebhookEndpoint
4912
+ * @summary Update a webhook endpoint
4913
+ * @request PUT:/webhook_endpoints/{lago_id}
4914
+ * @secure
4915
+ */
4916
+ updateWebhookEndpoint: (lagoId: string, data: {
4917
+ webhook_endpoint?: {
4918
+ /**
4919
+ * The URL of the webhook endpoint.
4920
+ * @example "https://foo.bar"
4921
+ */
4922
+ webhook_url: string;
4923
+ };
4924
+ }, params?: RequestParams) => Promise<HttpResponse<any, ApiErrorBadRequest | ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorNotFound>>;
4925
+ /**
4926
+ * @description This endpoint is used to retrieve an existing webhook endpoint.
4927
+ *
4928
+ * @tags webhook_endpoints
4929
+ * @name FindWebhookEndpoint
4930
+ * @summary Retrieve a webhook endpoint
4931
+ * @request GET:/webhook_endpoints/{lago_id}
4932
+ * @secure
4933
+ */
4934
+ findWebhookEndpoint: (lagoId: string, params?: RequestParams) => Promise<HttpResponse<any, ApiErrorUnauthorized | ApiErrorNotFound>>;
4935
+ /**
4936
+ * @description This endpoint is used to delete an existing webhook endpoint.
4937
+ *
4938
+ * @tags webhook_endpoints
4939
+ * @name DestroyWebhookEndpoint
4940
+ * @summary Delete a webhook endpoint
4941
+ * @request DELETE:/webhook_endpoints/{lago_id}
4942
+ * @secure
4943
+ */
4944
+ destroyWebhookEndpoint: (lagoId: string, params?: RequestParams) => Promise<HttpResponse<any, ApiErrorUnauthorized | ApiErrorNotAllowed | ApiErrorNotFound>>;
4945
+ };
4438
4946
  }
4439
4947
  export {};