lago-javascript-client 1.3.0 → 1.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -973,7 +973,7 @@ export interface CreditNoteEstimateInput {
973
973
  */
974
974
  invoice_id: string;
975
975
  /**
976
- * The list of credit note’s items.
976
+ * The list of credit note's items.
977
977
  * @example [{"fee_id":"1a901a90-1a90-1a90-1a90-1a901a901a90","amount_cents":10},{"fee_id":"1a901a90-1a90-1a90-1a90-1a901a901a91","amount_cents":5}]
978
978
  */
979
979
  items: {
@@ -1036,15 +1036,15 @@ export interface CreditNoteEstimated {
1036
1036
  * @example 20
1037
1037
  */
1038
1038
  coupons_adjustment_amount_cents: number;
1039
- /** Array of credit note’s items. */
1039
+ /** Array of credit note's items. */
1040
1040
  items: {
1041
1041
  /**
1042
- * The credit note’s item amount, expressed in cents.
1042
+ * The credit note's item amount, expressed in cents.
1043
1043
  * @example 100
1044
1044
  */
1045
1045
  amount_cents: number;
1046
1046
  /**
1047
- * Unique identifier assigned to the fee within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the fee’s record within the Lago system.
1047
+ * Unique identifier assigned to the fee within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the fee's record within the Lago system.
1048
1048
  * @format uuid
1049
1049
  * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
1050
1050
  */
@@ -1091,7 +1091,7 @@ export interface CreditNoteEstimated {
1091
1091
  }
1092
1092
  export interface CreditObject {
1093
1093
  /**
1094
- * Unique identifier assigned to the credit within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the credit’s item record within the Lago system.
1094
+ * Unique identifier assigned to the credit within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the credit's item record within the Lago system.
1095
1095
  * @format uuid
1096
1096
  * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
1097
1097
  */
@@ -1157,17 +1157,17 @@ export type CreditNoteAppliedTaxObject = BaseAppliedTax & {
1157
1157
  };
1158
1158
  export interface CreditNoteItemObject {
1159
1159
  /**
1160
- * The credit note’s item unique identifier, created by Lago.
1160
+ * The credit note's item unique identifier, created by Lago.
1161
1161
  * @format uuid
1162
1162
  * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
1163
1163
  */
1164
1164
  lago_id: string;
1165
1165
  /**
1166
- * The credit note’s item amount, expressed in cents.
1166
+ * The credit note's item amount, expressed in cents.
1167
1167
  * @example 100
1168
1168
  */
1169
1169
  amount_cents: number;
1170
- /** The credit note’s item currency. */
1170
+ /** The credit note's item currency. */
1171
1171
  amount_currency: Currency;
1172
1172
  /** The fee object related to the credit note item. */
1173
1173
  fee: FeeObject;
@@ -1294,7 +1294,7 @@ export interface CreditNoteObject {
1294
1294
  * @example "https://getlago.com/credit_note/file"
1295
1295
  */
1296
1296
  file_url?: string | null;
1297
- /** Array of credit note’s items. */
1297
+ /** Array of credit note's items. */
1298
1298
  items?: CreditNoteItemObject[];
1299
1299
  applied_taxes?: CreditNoteAppliedTaxObject[];
1300
1300
  }
@@ -1331,7 +1331,7 @@ export interface CreditNoteCreateInput {
1331
1331
  */
1332
1332
  refund_amount_cents?: number | null;
1333
1333
  /**
1334
- * The list of credit note’s items.
1334
+ * The list of credit note's items.
1335
1335
  * @example [{"fee_id":"1a901a90-1a90-1a90-1a90-1a901a901a90","amount_cents":10},{"fee_id":"1a901a90-1a90-1a90-1a90-1a901a901a91","amount_cents":5}]
1336
1336
  */
1337
1337
  items: {
@@ -1411,6 +1411,35 @@ export interface CustomerBillingConfiguration {
1411
1411
  */
1412
1412
  provider_payment_methods?: string[] | null;
1413
1413
  }
1414
+ /** Configuration specific to the accounting and tax integrations. This object contains settings and parameters necessary for syncing documents and payments. */
1415
+ export interface IntegrationCustomer {
1416
+ /**
1417
+ * The integration type used for accounting and tax syncs.
1418
+ * Accepted values: `netsuite`.
1419
+ * @example "netsuite"
1420
+ */
1421
+ integration_type?: "netsuite";
1422
+ /**
1423
+ * Unique code used to identify an integration connection.
1424
+ * @example "netsuite-eu-1"
1425
+ */
1426
+ integration_code?: string;
1427
+ /**
1428
+ * The customer ID within the integration's system. If this field is not provided, Lago has the option to create a new customer record within the integration's system on behalf of the customer.
1429
+ * @example "cus_12345"
1430
+ */
1431
+ external_customer_id?: string;
1432
+ /**
1433
+ * Set this field to `true` if you want to create a customer record in the integration's system. This option is applicable only when the `external_customer_id` is null and the `sync_with_provider` field is set to `true`. By default, the value is set to `false`
1434
+ * @example true
1435
+ */
1436
+ sync_with_provider?: boolean;
1437
+ /**
1438
+ * This optional field is needed only when working with `netsuite` connection.
1439
+ * @example "2"
1440
+ */
1441
+ subsidiary_id?: string;
1442
+ }
1414
1443
  /** Array of filter object, representing multiple dimensions for a charge item. */
1415
1444
  export type CustomerChargeFiltersUsageObject = {
1416
1445
  /**
@@ -1525,7 +1554,7 @@ export interface CustomerChargeUsageObject {
1525
1554
  /** Object listing all the properties for a specific charge item. */
1526
1555
  charge: {
1527
1556
  /**
1528
- * Unique identifier assigned to the charge within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the charge’s record within the Lago system.
1557
+ * Unique identifier assigned to the charge within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the charge's record within the Lago system.
1529
1558
  * @format uuid
1530
1559
  * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
1531
1560
  */
@@ -1544,7 +1573,7 @@ export interface CustomerChargeUsageObject {
1544
1573
  /** The related billable metric object. */
1545
1574
  billable_metric: {
1546
1575
  /**
1547
- * Unique identifier assigned to the billable metric within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the billable metric’s record within the Lago system.
1576
+ * Unique identifier assigned to the billable metric within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the billable metric's record within the Lago system.
1548
1577
  * @format uuid
1549
1578
  * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
1550
1579
  */
@@ -1663,6 +1692,8 @@ export interface CustomerCreateInput {
1663
1692
  net_payment_term?: number | null;
1664
1693
  /** 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. */
1665
1694
  billing_configuration?: CustomerBillingConfiguration;
1695
+ /** Configuration specific to the accounting and tax integrations. This object contains settings and parameters necessary for syncing documents and payments. */
1696
+ integration_customer?: IntegrationCustomer;
1666
1697
  /** Set of key-value pairs that you can attach to a customer. This can be useful for storing additional information about the customer in a structured format */
1667
1698
  metadata?: {
1668
1699
  /**
@@ -1834,6 +1865,8 @@ export interface CustomerObject {
1834
1865
  updated_at?: string;
1835
1866
  /** 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. */
1836
1867
  billing_configuration?: CustomerBillingConfiguration;
1868
+ /** Configuration specific to the accounting and tax integrations. This object contains settings and parameters necessary for syncing documents and payments. */
1869
+ integration_customer?: IntegrationCustomer;
1837
1870
  metadata?: CustomerMetadata[];
1838
1871
  }
1839
1872
  export type CustomerObjectExtended = CustomerObject & {
@@ -1867,8 +1900,8 @@ export interface CustomerUsageObject {
1867
1900
  to_datetime: string;
1868
1901
  /**
1869
1902
  * The date of creation of the invoice.
1870
- * @format date-time
1871
- * @example "2022-08-01T23:59:59Z"
1903
+ * @format date
1904
+ * @example "2022-08-01"
1872
1905
  */
1873
1906
  issuing_date: string;
1874
1907
  /**
@@ -1877,7 +1910,7 @@ export interface CustomerUsageObject {
1877
1910
  * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
1878
1911
  */
1879
1912
  lago_invoice_id?: string | null;
1880
- /** The currency of the customer’s current usage. */
1913
+ /** The currency of the customer's current usage. */
1881
1914
  currency?: Currency;
1882
1915
  /**
1883
1916
  * The amount in cents, tax excluded.
@@ -1961,7 +1994,7 @@ export interface EventInput {
1961
1994
  * This field represents additional properties associated with the event, which are utilized in the calculation of the final fee. This object becomes mandatory when the targeted billable metric employs a `sum_agg`, `max_agg`, or `unique_count_agg` aggregation method. However, when using a simple `count_agg`, this object is not required.
1962
1995
  * @example {"gb":10}
1963
1996
  */
1964
- properties?: Record<string, string>;
1997
+ properties?: Record<string, string | number>;
1965
1998
  };
1966
1999
  }
1967
2000
  export interface EventObject {
@@ -2010,7 +2043,7 @@ export interface EventObject {
2010
2043
  [key: string]: any;
2011
2044
  };
2012
2045
  /**
2013
- * Unique identifier assigned to the subscription within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the subscription’s record within the Lago system
2046
+ * Unique identifier assigned to the subscription within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the subscription's record within the Lago system
2014
2047
  * @format uuid
2015
2048
  * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
2016
2049
  */
@@ -2040,7 +2073,7 @@ export type FeeAppliedTaxObject = BaseAppliedTax & {
2040
2073
  };
2041
2074
  export interface FeeObject {
2042
2075
  /**
2043
- * Unique identifier assigned to the fee within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the fee’s record within the Lago system.
2076
+ * Unique identifier assigned to the fee within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the fee's record within the Lago system.
2044
2077
  * @format uuid
2045
2078
  * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
2046
2079
  */
@@ -2108,7 +2141,7 @@ export interface FeeObject {
2108
2141
  * @example 100
2109
2142
  */
2110
2143
  amount_cents: number;
2111
- /** The currency of this specific fee. It indicates the monetary unit in which the fee’s cost is expressed. */
2144
+ /** The currency of this specific fee. It indicates the monetary unit in which the fee's cost is expressed. */
2112
2145
  amount_currency: Currency;
2113
2146
  /**
2114
2147
  * The cost of the tax associated with this specific fee.
@@ -2641,12 +2674,12 @@ export interface InvoiceMetadataObject {
2641
2674
  */
2642
2675
  lago_id?: string;
2643
2676
  /**
2644
- * Represents the key of the metadata’s key-value pair.
2677
+ * Represents the key of the metadata's key-value pair.
2645
2678
  * @example "digital_ref_id"
2646
2679
  */
2647
2680
  key?: string;
2648
2681
  /**
2649
- * Represents the value of the metadata’s key-value pair.
2682
+ * Represents the value of the metadata's key-value pair.
2650
2683
  * @example "INV-0123456-98765"
2651
2684
  */
2652
2685
  value?: string;
@@ -2659,7 +2692,7 @@ export interface InvoiceMetadataObject {
2659
2692
  }
2660
2693
  export interface InvoiceObject {
2661
2694
  /**
2662
- * Unique identifier assigned to the fee within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the fee’s record within the Lago system.
2695
+ * Unique identifier assigned to the fee within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the fee's record within the Lago system.
2663
2696
  * @format uuid
2664
2697
  * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
2665
2698
  */
@@ -2872,7 +2905,7 @@ export interface OrganizationBillingConfiguration {
2872
2905
  */
2873
2906
  invoice_footer?: string | null;
2874
2907
  /**
2875
- * The grace period, expressed in days, for finalizing the invoice. This period refers to the additional time granted to your customers beyond the invoice due date to adjust usage and line items. Can be overwritten by the customer’s grace period.
2908
+ * The grace period, expressed in days, for finalizing the invoice. This period refers to the additional time granted to your customers beyond the invoice due date to adjust usage and line items. Can be overwritten by the customer's grace period.
2876
2909
  * @example 3
2877
2910
  */
2878
2911
  invoice_grace_period?: number;
@@ -2915,22 +2948,22 @@ export interface OrganizationObject {
2915
2948
  /** The default currency of an organization. */
2916
2949
  default_currency?: Currency;
2917
2950
  /**
2918
- * The first line of your organization’s billing address.
2951
+ * The first line of your organization's billing address.
2919
2952
  * @example "100 Brex Street"
2920
2953
  */
2921
2954
  address_line1?: string | null;
2922
2955
  /**
2923
- * The second line of your organization’s billing address.
2956
+ * The second line of your organization's billing address.
2924
2957
  * @example null
2925
2958
  */
2926
2959
  address_line2?: string | null;
2927
2960
  /**
2928
- * The state of your organization’s billing address.
2961
+ * The state of your organization's billing address.
2929
2962
  * @example "NYC"
2930
2963
  */
2931
2964
  state?: string | null;
2932
2965
  /**
2933
- * The zipcode of your organization’s billing address.
2966
+ * The zipcode of your organization's billing address.
2934
2967
  * @example "10000"
2935
2968
  */
2936
2969
  zipcode?: string | null;
@@ -2941,7 +2974,7 @@ export interface OrganizationObject {
2941
2974
  */
2942
2975
  email?: string | null;
2943
2976
  /**
2944
- * The city of your organization’s billing address.
2977
+ * The city of your organization's billing address.
2945
2978
  * @example "New York"
2946
2979
  */
2947
2980
  city?: string | null;
@@ -2980,7 +3013,7 @@ export interface OrganizationObject {
2980
3013
  * @example "US123456789"
2981
3014
  */
2982
3015
  tax_identification_number?: string | null;
2983
- /** Your organization’s timezone, used for billing purposes in your own local time. Can be overwritten by the customer’s timezone. */
3016
+ /** Your organization's timezone, used for billing purposes in your own local time. Can be overwritten by the customer's timezone. */
2984
3017
  timezone?: Timezone;
2985
3018
  /** The custom billing settings for your organization. */
2986
3019
  billing_configuration: OrganizationBillingConfiguration;
@@ -2999,22 +3032,22 @@ export interface OrganizationUpdateInput {
2999
3032
  /** The default currency of an organization. */
3000
3033
  default_currency?: Currency;
3001
3034
  /**
3002
- * The first line of your organization’s billing address.
3035
+ * The first line of your organization's billing address.
3003
3036
  * @example "100 Brex Street"
3004
3037
  */
3005
3038
  address_line1?: string | null;
3006
3039
  /**
3007
- * The second line of your organization’s billing address.
3040
+ * The second line of your organization's billing address.
3008
3041
  * @example null
3009
3042
  */
3010
3043
  address_line2?: string | null;
3011
3044
  /**
3012
- * The state of your organization’s billing address.
3045
+ * The state of your organization's billing address.
3013
3046
  * @example "NYC"
3014
3047
  */
3015
3048
  state?: string | null;
3016
3049
  /**
3017
- * The zipcode of your organization’s billing address.
3050
+ * The zipcode of your organization's billing address.
3018
3051
  * @example "10000"
3019
3052
  */
3020
3053
  zipcode?: string | null;
@@ -3025,7 +3058,7 @@ export interface OrganizationUpdateInput {
3025
3058
  */
3026
3059
  email?: string | null;
3027
3060
  /**
3028
- * The city of your organization’s billing address.
3061
+ * The city of your organization's billing address.
3029
3062
  * @example "New York"
3030
3063
  */
3031
3064
  city?: string | null;
@@ -3064,7 +3097,7 @@ export interface OrganizationUpdateInput {
3064
3097
  * @example "US123456789"
3065
3098
  */
3066
3099
  tax_identification_number?: string | null;
3067
- /** Your organization’s timezone, used for billing purposes in your own local time. Can be overwritten by the customer’s timezone. */
3100
+ /** Your organization's timezone, used for billing purposes in your own local time. Can be overwritten by the customer's timezone. */
3068
3101
  timezone?: Timezone;
3069
3102
  /**
3070
3103
  * Represents the email settings of the organization. It allows you to define which documents are sent by email. The field value determines the types of documents that trigger email notifications. Possible values for are `invoice.finalized` and `credit_note.created`. By configuring this field, you can specify whether invoices, credit notes, or both should be sent to recipients via email.
@@ -3150,7 +3183,7 @@ export interface PlanCreateInput {
3150
3183
  */
3151
3184
  pay_in_advance?: boolean;
3152
3185
  /**
3153
- * 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`.
3186
+ * 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`.
3154
3187
  * @example null
3155
3188
  */
3156
3189
  bill_charges_monthly?: boolean | null;
@@ -3359,7 +3392,7 @@ export interface PlanUpdateInput {
3359
3392
  */
3360
3393
  pay_in_advance?: boolean;
3361
3394
  /**
3362
- * 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`.
3395
+ * 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`.
3363
3396
  * @example null
3364
3397
  */
3365
3398
  bill_charges_monthly?: boolean | null;
@@ -3502,7 +3535,7 @@ export interface PlanObject {
3502
3535
  */
3503
3536
  pay_in_advance?: boolean;
3504
3537
  /**
3505
- * 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`.
3538
+ * 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`.
3506
3539
  * @example null
3507
3540
  */
3508
3541
  bill_charges_monthly?: boolean | null;
@@ -3605,7 +3638,7 @@ export interface SubscriptionUpdateInput {
3605
3638
  }
3606
3639
  export interface SubscriptionObject {
3607
3640
  /**
3608
- * Unique identifier assigned to the subscription within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the subscription’s record within the Lago system
3641
+ * Unique identifier assigned to the subscription within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the subscription's record within the Lago system
3609
3642
  * @format uuid
3610
3643
  * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
3611
3644
  */
@@ -3861,6 +3894,23 @@ export interface WalletCreateInput {
3861
3894
  expiration_at?: string | null;
3862
3895
  /** List of recurring transaction rules. Currently, we only allow one recurring rule per wallet. */
3863
3896
  recurring_transaction_rules?: {
3897
+ /**
3898
+ * The number of paid credits used for recurring top-up.
3899
+ * @pattern ^[0-9]+.?[0-9]*$
3900
+ * @example "20.0"
3901
+ */
3902
+ paid_credits?: string | null;
3903
+ /**
3904
+ * The number of free granted credits used for recurring top-up.
3905
+ * @pattern ^[0-9]+.?[0-9]*$
3906
+ * @example "10.0"
3907
+ */
3908
+ granted_credits?: string | null;
3909
+ /**
3910
+ * The method used for recurring top-up. Possible values are `fixed` or `target`.
3911
+ * @example "target"
3912
+ */
3913
+ method?: "fixed" | "target";
3864
3914
  /**
3865
3915
  * The trigger. Possible values are `interval` or `threshold`.
3866
3916
  * @example "interval"
@@ -3871,24 +3921,36 @@ export interface WalletCreateInput {
3871
3921
  * @example "monthly"
3872
3922
  */
3873
3923
  interval?: "weekly" | "monthly" | "quarterly" | "yearly";
3924
+ /**
3925
+ * The effective start date for recurring top-ups. This date should be provided in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC).
3926
+ * @format date-time
3927
+ * @example "2022-08-08T00:00:00Z"
3928
+ */
3929
+ started_at?: string;
3874
3930
  /**
3875
3931
  * The threshold for recurring top-ups is the value at which an automatic top-up is triggered. For example, if this threshold is set at 10 credits, an automatic top-up will occur whenever the wallet balance falls to or below 10 credits. Required only when trigger is set to `threshold`.
3876
3932
  * @pattern ^[0-9]+.?[0-9]*$
3877
3933
  * @example "20.0"
3878
3934
  */
3879
3935
  threshold_credits?: string;
3936
+ /**
3937
+ * The target ongoing balance is the value set for the ongoing balance to be reached by the automatic top-up. Required only when trigger is set to `target`.
3938
+ * @pattern ^[0-9]+.?[0-9]*$
3939
+ * @example "200.0"
3940
+ */
3941
+ target_ongoing_balance?: string;
3880
3942
  }[];
3881
3943
  };
3882
3944
  }
3883
3945
  export interface WalletObject {
3884
3946
  /**
3885
- * 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 wallet’s record within the Lago system.
3947
+ * 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 wallet's record within the Lago system.
3886
3948
  * @format uuid
3887
3949
  * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
3888
3950
  */
3889
3951
  lago_id: string;
3890
3952
  /**
3891
- * 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.
3953
+ * 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.
3892
3954
  * @format uuid
3893
3955
  * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
3894
3956
  */
@@ -3976,17 +4038,22 @@ export interface WalletObject {
3976
4038
  * @example "interval"
3977
4039
  */
3978
4040
  trigger: "interval" | "threshold";
4041
+ /**
4042
+ * The method used for recurring top-up. Possible values are `fixed` or `target`.
4043
+ * @example "target"
4044
+ */
4045
+ method: "fixed" | "target";
3979
4046
  /**
3980
4047
  * The interval used for recurring top-up. It represents the frequency at which automatic top-up occurs. The interval can be one of the following values: `weekly`, `monthly`, `quarterly` or `yearly`. Required only if trigger is set to `interval`.
3981
4048
  * @example "monthly"
3982
4049
  */
3983
- interval?: "weekly" | "monthly" | "quarterly" | "yearly";
4050
+ interval: "weekly" | "monthly" | "quarterly" | "yearly";
3984
4051
  /**
3985
4052
  * The threshold for recurring top-ups is the value at which an automatic top-up is triggered. For example, if this threshold is set at 10 credits, an automatic top-up will occur whenever the wallet balance falls to or below 10 credits. Required only when trigger is set to `threshold`.
3986
4053
  * @pattern ^[0-9]+.?[0-9]*$
3987
4054
  * @example "20.0"
3988
4055
  */
3989
- threshold_credits?: string;
4056
+ threshold_credits: string;
3990
4057
  /**
3991
4058
  * The number of paid credits. Required only if there is no granted credits.
3992
4059
  * @pattern ^[0-9]+.?[0-9]*$
@@ -3999,6 +4066,18 @@ export interface WalletObject {
3999
4066
  * @example "10.0"
4000
4067
  */
4001
4068
  granted_credits: string;
4069
+ /**
4070
+ * The effective start date for recurring top-ups. This date should be provided in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC).
4071
+ * @format date-time
4072
+ * @example "2022-08-08T00:00:00Z"
4073
+ */
4074
+ started_at?: string;
4075
+ /**
4076
+ * The target ongoing balance is the value set for the ongoing balance to be reached by the automatic top-up. Required only when trigger is set to `target`.
4077
+ * @pattern ^[0-9]+.?[0-9]*$
4078
+ * @example "200.0"
4079
+ */
4080
+ target_ongoing_balance: string;
4002
4081
  /**
4003
4082
  * The date of the metadata object creation, represented in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC). The creation_date provides a standardized and internationally recognized timestamp for when the metadata object was created
4004
4083
  * @format date-time
@@ -4036,7 +4115,7 @@ export interface WalletsPaginated {
4036
4115
  export interface WalletTransactionCreateInput {
4037
4116
  wallet_transaction: {
4038
4117
  /**
4039
- * 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 wallet’s record within the Lago system.
4118
+ * 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 wallet's record within the Lago system.
4040
4119
  * @format uuid
4041
4120
  * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
4042
4121
  */
@@ -4063,13 +4142,13 @@ export interface WalletTransactionCreateInput {
4063
4142
  }
4064
4143
  export interface WalletTransactionObject {
4065
4144
  /**
4066
- * 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.
4145
+ * 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.
4067
4146
  * @format uuid
4068
4147
  * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
4069
4148
  */
4070
4149
  lago_id: string;
4071
4150
  /**
4072
- * 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 wallet’s record within the Lago system.
4151
+ * 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 wallet's record within the Lago system.
4073
4152
  * @format uuid
4074
4153
  * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
4075
4154
  */
@@ -4146,6 +4225,11 @@ export interface WalletUpdateInput {
4146
4225
  * @example "interval"
4147
4226
  */
4148
4227
  trigger?: "interval" | "threshold";
4228
+ /**
4229
+ * The method used for recurring top-up. Possible values are `fixed` or `target`.
4230
+ * @example "target"
4231
+ */
4232
+ method?: "fixed" | "target";
4149
4233
  /**
4150
4234
  * The interval used for recurring top-up. It represents the frequency at which automatic top-up occurs. The interval can be one of the following values: `weekly`, `monthly`, `quarterly` or `yearly`. Required only when trigger is set to `interval`.
4151
4235
  * @example "monthly"
@@ -4169,6 +4253,18 @@ export interface WalletUpdateInput {
4169
4253
  * @example "10.0"
4170
4254
  */
4171
4255
  granted_credits?: string;
4256
+ /**
4257
+ * The effective start date for recurring top-ups. This date should be provided in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC).
4258
+ * @format date-time
4259
+ * @example "2022-08-08T00:00:00Z"
4260
+ */
4261
+ started_at?: string;
4262
+ /**
4263
+ * The target ongoing balance is the value set for the ongoing balance to be reached by the automatic top-up. Required only when trigger is set to `target`.
4264
+ * @pattern ^[0-9]+.?[0-9]*$
4265
+ * @example "200.0"
4266
+ */
4267
+ target_ongoing_balance?: string;
4172
4268
  }[];
4173
4269
  };
4174
4270
  }
@@ -4197,7 +4293,7 @@ export interface WebhookEndpointObject {
4197
4293
  */
4198
4294
  lago_id: string;
4199
4295
  /**
4200
- * 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.
4296
+ * 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.
4201
4297
  * @format uuid
4202
4298
  * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
4203
4299
  */
@@ -4297,7 +4393,7 @@ export declare class HttpClient<SecurityDataType = unknown> {
4297
4393
  }
4298
4394
  /**
4299
4395
  * @title Lago API documentation
4300
- * @version 1.2.0
4396
+ * @version 1.5.0
4301
4397
  * @license AGPLv3
4302
4398
  * @baseUrl https://api.getlago.com/api/v1
4303
4399
  * @externalDocs https://github.com/getlago
@@ -4973,7 +5069,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
4973
5069
  * @example "5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba"
4974
5070
  */
4975
5071
  external_subscription_id?: string;
4976
- /** Filter results by fee’s currency. */
5072
+ /** Filter results by fee's currency. */
4977
5073
  currency?: Currency;
4978
5074
  /**
4979
5075
  * The fee type. Possible values are `add-on`, `charge`, `credit` or `subscription`.
@@ -148,7 +148,7 @@ export class HttpClient {
148
148
  }
149
149
  /**
150
150
  * @title Lago API documentation
151
- * @version 1.2.0
151
+ * @version 1.5.0
152
152
  * @license AGPLv3
153
153
  * @baseUrl https://api.getlago.com/api/v1
154
154
  * @externalDocs https://github.com/getlago
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "main": "./script/mod.js",
4
4
  "name": "lago-javascript-client",
5
5
  "sideEffects": false,
6
- "version": "v1.3.0",
6
+ "version": "v1.5.0",
7
7
  "description": "Lago JavaScript API Client",
8
8
  "repository": {
9
9
  "type": "git",
@@ -973,7 +973,7 @@ export interface CreditNoteEstimateInput {
973
973
  */
974
974
  invoice_id: string;
975
975
  /**
976
- * The list of credit note’s items.
976
+ * The list of credit note's items.
977
977
  * @example [{"fee_id":"1a901a90-1a90-1a90-1a90-1a901a901a90","amount_cents":10},{"fee_id":"1a901a90-1a90-1a90-1a90-1a901a901a91","amount_cents":5}]
978
978
  */
979
979
  items: {
@@ -1036,15 +1036,15 @@ export interface CreditNoteEstimated {
1036
1036
  * @example 20
1037
1037
  */
1038
1038
  coupons_adjustment_amount_cents: number;
1039
- /** Array of credit note’s items. */
1039
+ /** Array of credit note's items. */
1040
1040
  items: {
1041
1041
  /**
1042
- * The credit note’s item amount, expressed in cents.
1042
+ * The credit note's item amount, expressed in cents.
1043
1043
  * @example 100
1044
1044
  */
1045
1045
  amount_cents: number;
1046
1046
  /**
1047
- * Unique identifier assigned to the fee within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the fee’s record within the Lago system.
1047
+ * Unique identifier assigned to the fee within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the fee's record within the Lago system.
1048
1048
  * @format uuid
1049
1049
  * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
1050
1050
  */
@@ -1091,7 +1091,7 @@ export interface CreditNoteEstimated {
1091
1091
  }
1092
1092
  export interface CreditObject {
1093
1093
  /**
1094
- * Unique identifier assigned to the credit within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the credit’s item record within the Lago system.
1094
+ * Unique identifier assigned to the credit within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the credit's item record within the Lago system.
1095
1095
  * @format uuid
1096
1096
  * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
1097
1097
  */
@@ -1157,17 +1157,17 @@ export type CreditNoteAppliedTaxObject = BaseAppliedTax & {
1157
1157
  };
1158
1158
  export interface CreditNoteItemObject {
1159
1159
  /**
1160
- * The credit note’s item unique identifier, created by Lago.
1160
+ * The credit note's item unique identifier, created by Lago.
1161
1161
  * @format uuid
1162
1162
  * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
1163
1163
  */
1164
1164
  lago_id: string;
1165
1165
  /**
1166
- * The credit note’s item amount, expressed in cents.
1166
+ * The credit note's item amount, expressed in cents.
1167
1167
  * @example 100
1168
1168
  */
1169
1169
  amount_cents: number;
1170
- /** The credit note’s item currency. */
1170
+ /** The credit note's item currency. */
1171
1171
  amount_currency: Currency;
1172
1172
  /** The fee object related to the credit note item. */
1173
1173
  fee: FeeObject;
@@ -1294,7 +1294,7 @@ export interface CreditNoteObject {
1294
1294
  * @example "https://getlago.com/credit_note/file"
1295
1295
  */
1296
1296
  file_url?: string | null;
1297
- /** Array of credit note’s items. */
1297
+ /** Array of credit note's items. */
1298
1298
  items?: CreditNoteItemObject[];
1299
1299
  applied_taxes?: CreditNoteAppliedTaxObject[];
1300
1300
  }
@@ -1331,7 +1331,7 @@ export interface CreditNoteCreateInput {
1331
1331
  */
1332
1332
  refund_amount_cents?: number | null;
1333
1333
  /**
1334
- * The list of credit note’s items.
1334
+ * The list of credit note's items.
1335
1335
  * @example [{"fee_id":"1a901a90-1a90-1a90-1a90-1a901a901a90","amount_cents":10},{"fee_id":"1a901a90-1a90-1a90-1a90-1a901a901a91","amount_cents":5}]
1336
1336
  */
1337
1337
  items: {
@@ -1411,6 +1411,35 @@ export interface CustomerBillingConfiguration {
1411
1411
  */
1412
1412
  provider_payment_methods?: string[] | null;
1413
1413
  }
1414
+ /** Configuration specific to the accounting and tax integrations. This object contains settings and parameters necessary for syncing documents and payments. */
1415
+ export interface IntegrationCustomer {
1416
+ /**
1417
+ * The integration type used for accounting and tax syncs.
1418
+ * Accepted values: `netsuite`.
1419
+ * @example "netsuite"
1420
+ */
1421
+ integration_type?: "netsuite";
1422
+ /**
1423
+ * Unique code used to identify an integration connection.
1424
+ * @example "netsuite-eu-1"
1425
+ */
1426
+ integration_code?: string;
1427
+ /**
1428
+ * The customer ID within the integration's system. If this field is not provided, Lago has the option to create a new customer record within the integration's system on behalf of the customer.
1429
+ * @example "cus_12345"
1430
+ */
1431
+ external_customer_id?: string;
1432
+ /**
1433
+ * Set this field to `true` if you want to create a customer record in the integration's system. This option is applicable only when the `external_customer_id` is null and the `sync_with_provider` field is set to `true`. By default, the value is set to `false`
1434
+ * @example true
1435
+ */
1436
+ sync_with_provider?: boolean;
1437
+ /**
1438
+ * This optional field is needed only when working with `netsuite` connection.
1439
+ * @example "2"
1440
+ */
1441
+ subsidiary_id?: string;
1442
+ }
1414
1443
  /** Array of filter object, representing multiple dimensions for a charge item. */
1415
1444
  export type CustomerChargeFiltersUsageObject = {
1416
1445
  /**
@@ -1525,7 +1554,7 @@ export interface CustomerChargeUsageObject {
1525
1554
  /** Object listing all the properties for a specific charge item. */
1526
1555
  charge: {
1527
1556
  /**
1528
- * Unique identifier assigned to the charge within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the charge’s record within the Lago system.
1557
+ * Unique identifier assigned to the charge within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the charge's record within the Lago system.
1529
1558
  * @format uuid
1530
1559
  * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
1531
1560
  */
@@ -1544,7 +1573,7 @@ export interface CustomerChargeUsageObject {
1544
1573
  /** The related billable metric object. */
1545
1574
  billable_metric: {
1546
1575
  /**
1547
- * Unique identifier assigned to the billable metric within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the billable metric’s record within the Lago system.
1576
+ * Unique identifier assigned to the billable metric within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the billable metric's record within the Lago system.
1548
1577
  * @format uuid
1549
1578
  * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
1550
1579
  */
@@ -1663,6 +1692,8 @@ export interface CustomerCreateInput {
1663
1692
  net_payment_term?: number | null;
1664
1693
  /** 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. */
1665
1694
  billing_configuration?: CustomerBillingConfiguration;
1695
+ /** Configuration specific to the accounting and tax integrations. This object contains settings and parameters necessary for syncing documents and payments. */
1696
+ integration_customer?: IntegrationCustomer;
1666
1697
  /** Set of key-value pairs that you can attach to a customer. This can be useful for storing additional information about the customer in a structured format */
1667
1698
  metadata?: {
1668
1699
  /**
@@ -1834,6 +1865,8 @@ export interface CustomerObject {
1834
1865
  updated_at?: string;
1835
1866
  /** 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. */
1836
1867
  billing_configuration?: CustomerBillingConfiguration;
1868
+ /** Configuration specific to the accounting and tax integrations. This object contains settings and parameters necessary for syncing documents and payments. */
1869
+ integration_customer?: IntegrationCustomer;
1837
1870
  metadata?: CustomerMetadata[];
1838
1871
  }
1839
1872
  export type CustomerObjectExtended = CustomerObject & {
@@ -1867,8 +1900,8 @@ export interface CustomerUsageObject {
1867
1900
  to_datetime: string;
1868
1901
  /**
1869
1902
  * The date of creation of the invoice.
1870
- * @format date-time
1871
- * @example "2022-08-01T23:59:59Z"
1903
+ * @format date
1904
+ * @example "2022-08-01"
1872
1905
  */
1873
1906
  issuing_date: string;
1874
1907
  /**
@@ -1877,7 +1910,7 @@ export interface CustomerUsageObject {
1877
1910
  * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
1878
1911
  */
1879
1912
  lago_invoice_id?: string | null;
1880
- /** The currency of the customer’s current usage. */
1913
+ /** The currency of the customer's current usage. */
1881
1914
  currency?: Currency;
1882
1915
  /**
1883
1916
  * The amount in cents, tax excluded.
@@ -1961,7 +1994,7 @@ export interface EventInput {
1961
1994
  * This field represents additional properties associated with the event, which are utilized in the calculation of the final fee. This object becomes mandatory when the targeted billable metric employs a `sum_agg`, `max_agg`, or `unique_count_agg` aggregation method. However, when using a simple `count_agg`, this object is not required.
1962
1995
  * @example {"gb":10}
1963
1996
  */
1964
- properties?: Record<string, string>;
1997
+ properties?: Record<string, string | number>;
1965
1998
  };
1966
1999
  }
1967
2000
  export interface EventObject {
@@ -2010,7 +2043,7 @@ export interface EventObject {
2010
2043
  [key: string]: any;
2011
2044
  };
2012
2045
  /**
2013
- * Unique identifier assigned to the subscription within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the subscription’s record within the Lago system
2046
+ * Unique identifier assigned to the subscription within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the subscription's record within the Lago system
2014
2047
  * @format uuid
2015
2048
  * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
2016
2049
  */
@@ -2040,7 +2073,7 @@ export type FeeAppliedTaxObject = BaseAppliedTax & {
2040
2073
  };
2041
2074
  export interface FeeObject {
2042
2075
  /**
2043
- * Unique identifier assigned to the fee within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the fee’s record within the Lago system.
2076
+ * Unique identifier assigned to the fee within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the fee's record within the Lago system.
2044
2077
  * @format uuid
2045
2078
  * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
2046
2079
  */
@@ -2108,7 +2141,7 @@ export interface FeeObject {
2108
2141
  * @example 100
2109
2142
  */
2110
2143
  amount_cents: number;
2111
- /** The currency of this specific fee. It indicates the monetary unit in which the fee’s cost is expressed. */
2144
+ /** The currency of this specific fee. It indicates the monetary unit in which the fee's cost is expressed. */
2112
2145
  amount_currency: Currency;
2113
2146
  /**
2114
2147
  * The cost of the tax associated with this specific fee.
@@ -2641,12 +2674,12 @@ export interface InvoiceMetadataObject {
2641
2674
  */
2642
2675
  lago_id?: string;
2643
2676
  /**
2644
- * Represents the key of the metadata’s key-value pair.
2677
+ * Represents the key of the metadata's key-value pair.
2645
2678
  * @example "digital_ref_id"
2646
2679
  */
2647
2680
  key?: string;
2648
2681
  /**
2649
- * Represents the value of the metadata’s key-value pair.
2682
+ * Represents the value of the metadata's key-value pair.
2650
2683
  * @example "INV-0123456-98765"
2651
2684
  */
2652
2685
  value?: string;
@@ -2659,7 +2692,7 @@ export interface InvoiceMetadataObject {
2659
2692
  }
2660
2693
  export interface InvoiceObject {
2661
2694
  /**
2662
- * Unique identifier assigned to the fee within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the fee’s record within the Lago system.
2695
+ * Unique identifier assigned to the fee within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the fee's record within the Lago system.
2663
2696
  * @format uuid
2664
2697
  * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
2665
2698
  */
@@ -2872,7 +2905,7 @@ export interface OrganizationBillingConfiguration {
2872
2905
  */
2873
2906
  invoice_footer?: string | null;
2874
2907
  /**
2875
- * The grace period, expressed in days, for finalizing the invoice. This period refers to the additional time granted to your customers beyond the invoice due date to adjust usage and line items. Can be overwritten by the customer’s grace period.
2908
+ * The grace period, expressed in days, for finalizing the invoice. This period refers to the additional time granted to your customers beyond the invoice due date to adjust usage and line items. Can be overwritten by the customer's grace period.
2876
2909
  * @example 3
2877
2910
  */
2878
2911
  invoice_grace_period?: number;
@@ -2915,22 +2948,22 @@ export interface OrganizationObject {
2915
2948
  /** The default currency of an organization. */
2916
2949
  default_currency?: Currency;
2917
2950
  /**
2918
- * The first line of your organization’s billing address.
2951
+ * The first line of your organization's billing address.
2919
2952
  * @example "100 Brex Street"
2920
2953
  */
2921
2954
  address_line1?: string | null;
2922
2955
  /**
2923
- * The second line of your organization’s billing address.
2956
+ * The second line of your organization's billing address.
2924
2957
  * @example null
2925
2958
  */
2926
2959
  address_line2?: string | null;
2927
2960
  /**
2928
- * The state of your organization’s billing address.
2961
+ * The state of your organization's billing address.
2929
2962
  * @example "NYC"
2930
2963
  */
2931
2964
  state?: string | null;
2932
2965
  /**
2933
- * The zipcode of your organization’s billing address.
2966
+ * The zipcode of your organization's billing address.
2934
2967
  * @example "10000"
2935
2968
  */
2936
2969
  zipcode?: string | null;
@@ -2941,7 +2974,7 @@ export interface OrganizationObject {
2941
2974
  */
2942
2975
  email?: string | null;
2943
2976
  /**
2944
- * The city of your organization’s billing address.
2977
+ * The city of your organization's billing address.
2945
2978
  * @example "New York"
2946
2979
  */
2947
2980
  city?: string | null;
@@ -2980,7 +3013,7 @@ export interface OrganizationObject {
2980
3013
  * @example "US123456789"
2981
3014
  */
2982
3015
  tax_identification_number?: string | null;
2983
- /** Your organization’s timezone, used for billing purposes in your own local time. Can be overwritten by the customer’s timezone. */
3016
+ /** Your organization's timezone, used for billing purposes in your own local time. Can be overwritten by the customer's timezone. */
2984
3017
  timezone?: Timezone;
2985
3018
  /** The custom billing settings for your organization. */
2986
3019
  billing_configuration: OrganizationBillingConfiguration;
@@ -2999,22 +3032,22 @@ export interface OrganizationUpdateInput {
2999
3032
  /** The default currency of an organization. */
3000
3033
  default_currency?: Currency;
3001
3034
  /**
3002
- * The first line of your organization’s billing address.
3035
+ * The first line of your organization's billing address.
3003
3036
  * @example "100 Brex Street"
3004
3037
  */
3005
3038
  address_line1?: string | null;
3006
3039
  /**
3007
- * The second line of your organization’s billing address.
3040
+ * The second line of your organization's billing address.
3008
3041
  * @example null
3009
3042
  */
3010
3043
  address_line2?: string | null;
3011
3044
  /**
3012
- * The state of your organization’s billing address.
3045
+ * The state of your organization's billing address.
3013
3046
  * @example "NYC"
3014
3047
  */
3015
3048
  state?: string | null;
3016
3049
  /**
3017
- * The zipcode of your organization’s billing address.
3050
+ * The zipcode of your organization's billing address.
3018
3051
  * @example "10000"
3019
3052
  */
3020
3053
  zipcode?: string | null;
@@ -3025,7 +3058,7 @@ export interface OrganizationUpdateInput {
3025
3058
  */
3026
3059
  email?: string | null;
3027
3060
  /**
3028
- * The city of your organization’s billing address.
3061
+ * The city of your organization's billing address.
3029
3062
  * @example "New York"
3030
3063
  */
3031
3064
  city?: string | null;
@@ -3064,7 +3097,7 @@ export interface OrganizationUpdateInput {
3064
3097
  * @example "US123456789"
3065
3098
  */
3066
3099
  tax_identification_number?: string | null;
3067
- /** Your organization’s timezone, used for billing purposes in your own local time. Can be overwritten by the customer’s timezone. */
3100
+ /** Your organization's timezone, used for billing purposes in your own local time. Can be overwritten by the customer's timezone. */
3068
3101
  timezone?: Timezone;
3069
3102
  /**
3070
3103
  * Represents the email settings of the organization. It allows you to define which documents are sent by email. The field value determines the types of documents that trigger email notifications. Possible values for are `invoice.finalized` and `credit_note.created`. By configuring this field, you can specify whether invoices, credit notes, or both should be sent to recipients via email.
@@ -3150,7 +3183,7 @@ export interface PlanCreateInput {
3150
3183
  */
3151
3184
  pay_in_advance?: boolean;
3152
3185
  /**
3153
- * 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`.
3186
+ * 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`.
3154
3187
  * @example null
3155
3188
  */
3156
3189
  bill_charges_monthly?: boolean | null;
@@ -3359,7 +3392,7 @@ export interface PlanUpdateInput {
3359
3392
  */
3360
3393
  pay_in_advance?: boolean;
3361
3394
  /**
3362
- * 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`.
3395
+ * 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`.
3363
3396
  * @example null
3364
3397
  */
3365
3398
  bill_charges_monthly?: boolean | null;
@@ -3502,7 +3535,7 @@ export interface PlanObject {
3502
3535
  */
3503
3536
  pay_in_advance?: boolean;
3504
3537
  /**
3505
- * 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`.
3538
+ * 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`.
3506
3539
  * @example null
3507
3540
  */
3508
3541
  bill_charges_monthly?: boolean | null;
@@ -3605,7 +3638,7 @@ export interface SubscriptionUpdateInput {
3605
3638
  }
3606
3639
  export interface SubscriptionObject {
3607
3640
  /**
3608
- * Unique identifier assigned to the subscription within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the subscription’s record within the Lago system
3641
+ * Unique identifier assigned to the subscription within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the subscription's record within the Lago system
3609
3642
  * @format uuid
3610
3643
  * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
3611
3644
  */
@@ -3861,6 +3894,23 @@ export interface WalletCreateInput {
3861
3894
  expiration_at?: string | null;
3862
3895
  /** List of recurring transaction rules. Currently, we only allow one recurring rule per wallet. */
3863
3896
  recurring_transaction_rules?: {
3897
+ /**
3898
+ * The number of paid credits used for recurring top-up.
3899
+ * @pattern ^[0-9]+.?[0-9]*$
3900
+ * @example "20.0"
3901
+ */
3902
+ paid_credits?: string | null;
3903
+ /**
3904
+ * The number of free granted credits used for recurring top-up.
3905
+ * @pattern ^[0-9]+.?[0-9]*$
3906
+ * @example "10.0"
3907
+ */
3908
+ granted_credits?: string | null;
3909
+ /**
3910
+ * The method used for recurring top-up. Possible values are `fixed` or `target`.
3911
+ * @example "target"
3912
+ */
3913
+ method?: "fixed" | "target";
3864
3914
  /**
3865
3915
  * The trigger. Possible values are `interval` or `threshold`.
3866
3916
  * @example "interval"
@@ -3871,24 +3921,36 @@ export interface WalletCreateInput {
3871
3921
  * @example "monthly"
3872
3922
  */
3873
3923
  interval?: "weekly" | "monthly" | "quarterly" | "yearly";
3924
+ /**
3925
+ * The effective start date for recurring top-ups. This date should be provided in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC).
3926
+ * @format date-time
3927
+ * @example "2022-08-08T00:00:00Z"
3928
+ */
3929
+ started_at?: string;
3874
3930
  /**
3875
3931
  * The threshold for recurring top-ups is the value at which an automatic top-up is triggered. For example, if this threshold is set at 10 credits, an automatic top-up will occur whenever the wallet balance falls to or below 10 credits. Required only when trigger is set to `threshold`.
3876
3932
  * @pattern ^[0-9]+.?[0-9]*$
3877
3933
  * @example "20.0"
3878
3934
  */
3879
3935
  threshold_credits?: string;
3936
+ /**
3937
+ * The target ongoing balance is the value set for the ongoing balance to be reached by the automatic top-up. Required only when trigger is set to `target`.
3938
+ * @pattern ^[0-9]+.?[0-9]*$
3939
+ * @example "200.0"
3940
+ */
3941
+ target_ongoing_balance?: string;
3880
3942
  }[];
3881
3943
  };
3882
3944
  }
3883
3945
  export interface WalletObject {
3884
3946
  /**
3885
- * 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 wallet’s record within the Lago system.
3947
+ * 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 wallet's record within the Lago system.
3886
3948
  * @format uuid
3887
3949
  * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
3888
3950
  */
3889
3951
  lago_id: string;
3890
3952
  /**
3891
- * 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.
3953
+ * 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.
3892
3954
  * @format uuid
3893
3955
  * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
3894
3956
  */
@@ -3976,17 +4038,22 @@ export interface WalletObject {
3976
4038
  * @example "interval"
3977
4039
  */
3978
4040
  trigger: "interval" | "threshold";
4041
+ /**
4042
+ * The method used for recurring top-up. Possible values are `fixed` or `target`.
4043
+ * @example "target"
4044
+ */
4045
+ method: "fixed" | "target";
3979
4046
  /**
3980
4047
  * The interval used for recurring top-up. It represents the frequency at which automatic top-up occurs. The interval can be one of the following values: `weekly`, `monthly`, `quarterly` or `yearly`. Required only if trigger is set to `interval`.
3981
4048
  * @example "monthly"
3982
4049
  */
3983
- interval?: "weekly" | "monthly" | "quarterly" | "yearly";
4050
+ interval: "weekly" | "monthly" | "quarterly" | "yearly";
3984
4051
  /**
3985
4052
  * The threshold for recurring top-ups is the value at which an automatic top-up is triggered. For example, if this threshold is set at 10 credits, an automatic top-up will occur whenever the wallet balance falls to or below 10 credits. Required only when trigger is set to `threshold`.
3986
4053
  * @pattern ^[0-9]+.?[0-9]*$
3987
4054
  * @example "20.0"
3988
4055
  */
3989
- threshold_credits?: string;
4056
+ threshold_credits: string;
3990
4057
  /**
3991
4058
  * The number of paid credits. Required only if there is no granted credits.
3992
4059
  * @pattern ^[0-9]+.?[0-9]*$
@@ -3999,6 +4066,18 @@ export interface WalletObject {
3999
4066
  * @example "10.0"
4000
4067
  */
4001
4068
  granted_credits: string;
4069
+ /**
4070
+ * The effective start date for recurring top-ups. This date should be provided in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC).
4071
+ * @format date-time
4072
+ * @example "2022-08-08T00:00:00Z"
4073
+ */
4074
+ started_at?: string;
4075
+ /**
4076
+ * The target ongoing balance is the value set for the ongoing balance to be reached by the automatic top-up. Required only when trigger is set to `target`.
4077
+ * @pattern ^[0-9]+.?[0-9]*$
4078
+ * @example "200.0"
4079
+ */
4080
+ target_ongoing_balance: string;
4002
4081
  /**
4003
4082
  * The date of the metadata object creation, represented in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC). The creation_date provides a standardized and internationally recognized timestamp for when the metadata object was created
4004
4083
  * @format date-time
@@ -4036,7 +4115,7 @@ export interface WalletsPaginated {
4036
4115
  export interface WalletTransactionCreateInput {
4037
4116
  wallet_transaction: {
4038
4117
  /**
4039
- * 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 wallet’s record within the Lago system.
4118
+ * 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 wallet's record within the Lago system.
4040
4119
  * @format uuid
4041
4120
  * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
4042
4121
  */
@@ -4063,13 +4142,13 @@ export interface WalletTransactionCreateInput {
4063
4142
  }
4064
4143
  export interface WalletTransactionObject {
4065
4144
  /**
4066
- * 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.
4145
+ * 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.
4067
4146
  * @format uuid
4068
4147
  * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
4069
4148
  */
4070
4149
  lago_id: string;
4071
4150
  /**
4072
- * 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 wallet’s record within the Lago system.
4151
+ * 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 wallet's record within the Lago system.
4073
4152
  * @format uuid
4074
4153
  * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
4075
4154
  */
@@ -4146,6 +4225,11 @@ export interface WalletUpdateInput {
4146
4225
  * @example "interval"
4147
4226
  */
4148
4227
  trigger?: "interval" | "threshold";
4228
+ /**
4229
+ * The method used for recurring top-up. Possible values are `fixed` or `target`.
4230
+ * @example "target"
4231
+ */
4232
+ method?: "fixed" | "target";
4149
4233
  /**
4150
4234
  * The interval used for recurring top-up. It represents the frequency at which automatic top-up occurs. The interval can be one of the following values: `weekly`, `monthly`, `quarterly` or `yearly`. Required only when trigger is set to `interval`.
4151
4235
  * @example "monthly"
@@ -4169,6 +4253,18 @@ export interface WalletUpdateInput {
4169
4253
  * @example "10.0"
4170
4254
  */
4171
4255
  granted_credits?: string;
4256
+ /**
4257
+ * The effective start date for recurring top-ups. This date should be provided in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC).
4258
+ * @format date-time
4259
+ * @example "2022-08-08T00:00:00Z"
4260
+ */
4261
+ started_at?: string;
4262
+ /**
4263
+ * The target ongoing balance is the value set for the ongoing balance to be reached by the automatic top-up. Required only when trigger is set to `target`.
4264
+ * @pattern ^[0-9]+.?[0-9]*$
4265
+ * @example "200.0"
4266
+ */
4267
+ target_ongoing_balance?: string;
4172
4268
  }[];
4173
4269
  };
4174
4270
  }
@@ -4197,7 +4293,7 @@ export interface WebhookEndpointObject {
4197
4293
  */
4198
4294
  lago_id: string;
4199
4295
  /**
4200
- * 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.
4296
+ * 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.
4201
4297
  * @format uuid
4202
4298
  * @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
4203
4299
  */
@@ -4297,7 +4393,7 @@ export declare class HttpClient<SecurityDataType = unknown> {
4297
4393
  }
4298
4394
  /**
4299
4395
  * @title Lago API documentation
4300
- * @version 1.2.0
4396
+ * @version 1.5.0
4301
4397
  * @license AGPLv3
4302
4398
  * @baseUrl https://api.getlago.com/api/v1
4303
4399
  * @externalDocs https://github.com/getlago
@@ -4973,7 +5069,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
4973
5069
  * @example "5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba"
4974
5070
  */
4975
5071
  external_subscription_id?: string;
4976
- /** Filter results by fee’s currency. */
5072
+ /** Filter results by fee's currency. */
4977
5073
  currency?: Currency;
4978
5074
  /**
4979
5075
  * The fee type. Possible values are `add-on`, `charge`, `credit` or `subscription`.
@@ -152,7 +152,7 @@ class HttpClient {
152
152
  exports.HttpClient = HttpClient;
153
153
  /**
154
154
  * @title Lago API documentation
155
- * @version 1.2.0
155
+ * @version 1.5.0
156
156
  * @license AGPLv3
157
157
  * @baseUrl https://api.getlago.com/api/v1
158
158
  * @externalDocs https://github.com/getlago