lago-javascript-client 1.30.0 → 1.32.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.
- package/esm/openapi/client.d.ts +715 -168
- package/esm/openapi/client.js +77 -3
- package/package.json +1 -1
- package/script/openapi/client.d.ts +715 -168
- package/script/openapi/client.js +77 -3
package/esm/openapi/client.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** @example "USD" */
|
|
2
|
-
export type Currency = "AED" | "AFN" | "ALL" | "AMD" | "ANG" | "AOA" | "ARS" | "AUD" | "AWG" | "AZN" | "BAM" | "BBD" | "BDT" | "BGN" | "BIF" | "BMD" | "BND" | "BOB" | "BRL" | "BSD" | "BWP" | "BYN" | "BZD" | "CAD" | "CDF" | "CHF" | "CLF" | "CLP" | "CNY" | "COP" | "CRC" | "CVE" | "CZK" | "DJF" | "DKK" | "DOP" | "DZD" | "EGP" | "ETB" | "EUR" | "FJD" | "FKP" | "GBP" | "GEL" | "GIP" | "GMD" | "GNF" | "GTQ" | "GYD" | "HKD" | "HNL" | "HRK" | "HTG" | "HUF" | "IDR" | "ILS" | "INR" | "ISK" | "JMD" | "JPY" | "KES" | "KGS" | "KHR" | "KMF" | "KRW" | "KYD" | "KZT" | "LAK" | "LBP" | "LKR" | "LRD" | "LSL" | "MAD" | "MDL" | "MGA" | "MKD" | "MMK" | "MNT" | "MOP" | "MRO" | "MUR" | "MVR" | "MWK" | "MXN" | "MYR" | "MZN" | "NAD" | "NGN" | "NIO" | "NOK" | "NPR" | "NZD" | "PAB" | "PEN" | "PGK" | "PHP" | "PKR" | "PLN" | "PYG" | "QAR" | "RON" | "RSD" | "RUB" | "RWF" | "SAR" | "SBD" | "SCR" | "SEK" | "SGD" | "SHP" | "SLL" | "SOS" | "SRD" | "STD" | "SZL" | "THB" | "TJS" | "TOP" | "TRY" | "TTD" | "TWD" | "TZS" | "UAH" | "UGX" | "USD" | "UYU" | "UZS" | "VND" | "VUV" | "WST" | "XAF" | "XCD" | "XOF" | "XPF" | "YER" | "ZAR" | "ZMW";
|
|
2
|
+
export type Currency = "AED" | "AFN" | "ALL" | "AMD" | "ANG" | "AOA" | "ARS" | "AUD" | "AWG" | "AZN" | "BAM" | "BBD" | "BDT" | "BGN" | "BIF" | "BMD" | "BND" | "BOB" | "BRL" | "BSD" | "BWP" | "BYN" | "BZD" | "CAD" | "CDF" | "CHF" | "CLF" | "CLP" | "CNY" | "COP" | "CRC" | "CVE" | "CZK" | "DJF" | "DKK" | "DOP" | "DZD" | "EGP" | "ETB" | "EUR" | "FJD" | "FKP" | "GBP" | "GEL" | "GHS" | "GIP" | "GMD" | "GNF" | "GTQ" | "GYD" | "HKD" | "HNL" | "HRK" | "HTG" | "HUF" | "IDR" | "ILS" | "INR" | "ISK" | "JMD" | "JPY" | "KES" | "KGS" | "KHR" | "KMF" | "KRW" | "KYD" | "KZT" | "LAK" | "LBP" | "LKR" | "LRD" | "LSL" | "MAD" | "MDL" | "MGA" | "MKD" | "MMK" | "MNT" | "MOP" | "MRO" | "MUR" | "MVR" | "MWK" | "MXN" | "MYR" | "MZN" | "NAD" | "NGN" | "NIO" | "NOK" | "NPR" | "NZD" | "PAB" | "PEN" | "PGK" | "PHP" | "PKR" | "PLN" | "PYG" | "QAR" | "RON" | "RSD" | "RUB" | "RWF" | "SAR" | "SBD" | "SCR" | "SEK" | "SGD" | "SHP" | "SLL" | "SOS" | "SRD" | "STD" | "SZL" | "THB" | "TJS" | "TOP" | "TRY" | "TTD" | "TWD" | "TZS" | "UAH" | "UGX" | "USD" | "UYU" | "UZS" | "VND" | "VUV" | "WST" | "XAF" | "XCD" | "XOF" | "XPF" | "YER" | "ZAR" | "ZMW";
|
|
3
3
|
/** @example "US" */
|
|
4
4
|
export type Country = "AD" | "AE" | "AF" | "AG" | "AI" | "AL" | "AM" | "AO" | "AQ" | "AR" | "AS" | "AT" | "AU" | "AW" | "AX" | "AZ" | "BA" | "BB" | "BD" | "BE" | "BF" | "BG" | "BH" | "BI" | "BJ" | "BL" | "BM" | "BN" | "BO" | "BQ" | "BR" | "BS" | "BT" | "BV" | "BW" | "BY" | "BZ" | "CA" | "CC" | "CD" | "CF" | "CG" | "CH" | "CI" | "CK" | "CL" | "CM" | "CN" | "CO" | "CR" | "CU" | "CV" | "CW" | "CX" | "CY" | "CZ" | "DE" | "DJ" | "DK" | "DM" | "DO" | "DZ" | "EC" | "EE" | "EG" | "EH" | "ER" | "ES" | "ET" | "FI" | "FJ" | "FK" | "FM" | "FO" | "FR" | "GA" | "GB" | "GD" | "GE" | "GF" | "GG" | "GH" | "GI" | "GL" | "GM" | "GN" | "GP" | "GQ" | "GR" | "GS" | "GT" | "GU" | "GW" | "GY" | "HK" | "HM" | "HN" | "HR" | "HT" | "HU" | "ID" | "IE" | "IL" | "IM" | "IN" | "IO" | "IQ" | "IR" | "IS" | "IT" | "JE" | "JM" | "JO" | "JP" | "KE" | "KG" | "KH" | "KI" | "KM" | "KN" | "KP" | "KR" | "KW" | "KY" | "KZ" | "LA" | "LB" | "LC" | "LI" | "LK" | "LR" | "LS" | "LT" | "LU" | "LV" | "LY" | "MA" | "MC" | "MD" | "ME" | "MF" | "MG" | "MH" | "MK" | "ML" | "MM" | "MN" | "MO" | "MP" | "MQ" | "MR" | "MS" | "MT" | "MU" | "MV" | "MW" | "MX" | "MY" | "MZ" | "NA" | "NC" | "NE" | "NF" | "NG" | "NI" | "NL" | "NO" | "NP" | "NR" | "NU" | "NZ" | "OM" | "PA" | "PE" | "PF" | "PG" | "PH" | "PK" | "PL" | "PM" | "PN" | "PR" | "PS" | "PT" | "PW" | "PY" | "QA" | "RE" | "RO" | "RS" | "RU" | "RW" | "SA" | "SB" | "SC" | "SD" | "SE" | "SG" | "SH" | "SI" | "SJ" | "SK" | "SL" | "SM" | "SN" | "SO" | "SR" | "SS" | "ST" | "SV" | "SX" | "SY" | "SZ" | "TC" | "TD" | "TF" | "TG" | "TH" | "TJ" | "TK" | "TL" | "TM" | "TN" | "TO" | "TR" | "TT" | "TV" | "TW" | "TZ" | "UA" | "UG" | "UM" | "US" | "UY" | "UZ" | "VA" | "VC" | "VE" | "VG" | "VI" | "VN" | "VU" | "WF" | "WS" | "YE" | "YT" | "ZA" | "ZM" | "ZW";
|
|
5
5
|
/** @example "America/Los_Angeles" */
|
|
@@ -535,7 +535,7 @@ export interface BillingEntityUpdateInput {
|
|
|
535
535
|
*/
|
|
536
536
|
eu_tax_management?: boolean;
|
|
537
537
|
/**
|
|
538
|
-
* The base64 encoded logo image for the billing entity
|
|
538
|
+
* The base64 encoded logo image for the billing entity. Sending "null" will remove the logo, if any exist.
|
|
539
539
|
* @format uri
|
|
540
540
|
* @example "data:image/png;base64,..."
|
|
541
541
|
*/
|
|
@@ -572,14 +572,14 @@ export interface ActivityLogObject {
|
|
|
572
572
|
/**
|
|
573
573
|
* This field represents the final state of the object that the action was applied.
|
|
574
574
|
* @format object
|
|
575
|
-
* @example
|
|
575
|
+
* @example {"lago_id":"dad68bc7-c01a-4ad8-a87b-13e78693a5bc","plan_id":"b9155544-e261-4e92-b54e-f65d7609294c"}
|
|
576
576
|
*/
|
|
577
|
-
activity_object?:
|
|
577
|
+
activity_object?: object | null;
|
|
578
578
|
/**
|
|
579
579
|
* @format object
|
|
580
|
-
* @example
|
|
580
|
+
* @example {"plan_id":[null,"b9155544-e261-4e92-b54e-f65d7609294c"]}
|
|
581
581
|
*/
|
|
582
|
-
activity_object_changes?:
|
|
582
|
+
activity_object_changes?: object | null;
|
|
583
583
|
/**
|
|
584
584
|
* The customer external unique identifier (provided by your own application)
|
|
585
585
|
* @example "5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba"
|
|
@@ -670,7 +670,7 @@ export interface AddOnObject {
|
|
|
670
670
|
* Specifies the name that will be displayed on an invoice. If no value is set for this field, the name of the actual charge will be used as the default display name.
|
|
671
671
|
* @example "Setup Fee (SF1)"
|
|
672
672
|
*/
|
|
673
|
-
invoice_display_name
|
|
673
|
+
invoice_display_name: string | null;
|
|
674
674
|
/**
|
|
675
675
|
* Unique code used to identify the add-on.
|
|
676
676
|
* @example "setup_fee"
|
|
@@ -690,7 +690,7 @@ export interface AddOnObject {
|
|
|
690
690
|
* The description of the add-on.
|
|
691
691
|
* @example "Implementation fee for new customers."
|
|
692
692
|
*/
|
|
693
|
-
description
|
|
693
|
+
description: string | null;
|
|
694
694
|
/**
|
|
695
695
|
* The date and time when the add-on 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 add-on was initially created.
|
|
696
696
|
* @format date-time
|
|
@@ -714,7 +714,7 @@ export interface AddOnBaseInput {
|
|
|
714
714
|
* Specifies the name that will be displayed on an invoice. If no value is set for this field, the name of the actual charge will be used as the default display name.
|
|
715
715
|
* @example "Setup Fee (SF1)"
|
|
716
716
|
*/
|
|
717
|
-
invoice_display_name?: string;
|
|
717
|
+
invoice_display_name?: string | null;
|
|
718
718
|
/**
|
|
719
719
|
* Unique code used to identify the add-on.
|
|
720
720
|
* @example "setup_fee"
|
|
@@ -750,6 +750,73 @@ export interface AddOn {
|
|
|
750
750
|
export interface AddOnUpdateInput {
|
|
751
751
|
add_on: AddOnBaseInput;
|
|
752
752
|
}
|
|
753
|
+
export interface ApiLogObject {
|
|
754
|
+
/**
|
|
755
|
+
* Lago API version used in the request.
|
|
756
|
+
* @example "v1"
|
|
757
|
+
*/
|
|
758
|
+
api_version: string;
|
|
759
|
+
/**
|
|
760
|
+
* The client used to make the request to the API.
|
|
761
|
+
* @example "Lago Ruby v1.26.0"
|
|
762
|
+
*/
|
|
763
|
+
client: string;
|
|
764
|
+
/**
|
|
765
|
+
* This field represents the HTTP method of the request.
|
|
766
|
+
* @example "post"
|
|
767
|
+
*/
|
|
768
|
+
http_method: "post" | "put" | "delete";
|
|
769
|
+
/**
|
|
770
|
+
* This field represents the HTTP status of the requests.
|
|
771
|
+
* @example 200
|
|
772
|
+
*/
|
|
773
|
+
http_status: number;
|
|
774
|
+
/**
|
|
775
|
+
* The logged date of the api log, presented in the ISO 8601 datetime format, specifically in Coordinated Universal Time (UTC). It provides the precise timestamp of when the event's record was created within the Lago application
|
|
776
|
+
* @format date-time
|
|
777
|
+
* @example "2025-03-31T12:31:44Z"
|
|
778
|
+
*/
|
|
779
|
+
logged_at: string;
|
|
780
|
+
/**
|
|
781
|
+
* @format object
|
|
782
|
+
* @example "{ "billable_metric": { "name": "Storage", "code": "storage" } }"
|
|
783
|
+
*/
|
|
784
|
+
request_body: string;
|
|
785
|
+
/**
|
|
786
|
+
* This field represents the API origin of the requested URL
|
|
787
|
+
* @example "https://app.lago.dev/"
|
|
788
|
+
*/
|
|
789
|
+
request_origin: string;
|
|
790
|
+
/**
|
|
791
|
+
* This field represents the API path of the requested URL
|
|
792
|
+
* @example "/billable_metrics"
|
|
793
|
+
*/
|
|
794
|
+
request_path: string;
|
|
795
|
+
/**
|
|
796
|
+
* The creation date of the api log record in the Lago application, presented in the ISO 8601 datetime format, specifically in Coordinated Universal Time (UTC). It provides the precise timestamp of when the event's record was created within the Lago application
|
|
797
|
+
* @format date-time
|
|
798
|
+
* @example "2022-04-29T08:59:51Z"
|
|
799
|
+
*/
|
|
800
|
+
created_at: string;
|
|
801
|
+
/**
|
|
802
|
+
* Unique identifier for the api log.
|
|
803
|
+
* @format uuid
|
|
804
|
+
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
805
|
+
*/
|
|
806
|
+
request_id: string;
|
|
807
|
+
/**
|
|
808
|
+
* @format object
|
|
809
|
+
* @example "{ "lago_id": "b9155544-e261-4e92-b54e-f65d7609294c", ... }"
|
|
810
|
+
*/
|
|
811
|
+
request_response?: string;
|
|
812
|
+
}
|
|
813
|
+
export interface ApiLogsPaginated {
|
|
814
|
+
api_logs: ApiLogObject[];
|
|
815
|
+
meta: PaginationMeta;
|
|
816
|
+
}
|
|
817
|
+
export interface ApiLog {
|
|
818
|
+
api_log: ApiLogObject;
|
|
819
|
+
}
|
|
753
820
|
export interface GrossRevenueObject {
|
|
754
821
|
/**
|
|
755
822
|
* Identifies the month to analyze revenue.
|
|
@@ -840,12 +907,12 @@ export interface MrrObject {
|
|
|
840
907
|
* The total amount of MRR, expressed in cents.
|
|
841
908
|
* @example 50000
|
|
842
909
|
*/
|
|
843
|
-
amount_cents
|
|
910
|
+
amount_cents: number;
|
|
844
911
|
/**
|
|
845
912
|
* The currency of MRR analytics. Format must be ISO 4217.
|
|
846
913
|
* @example "USD"
|
|
847
914
|
*/
|
|
848
|
-
currency
|
|
915
|
+
currency: Currency;
|
|
849
916
|
}
|
|
850
917
|
export interface Mrrs {
|
|
851
918
|
mrrs: MrrObject[];
|
|
@@ -1495,6 +1562,11 @@ export interface CouponUpdateInput {
|
|
|
1495
1562
|
coupon: CouponBaseInput;
|
|
1496
1563
|
}
|
|
1497
1564
|
export interface FeeAmountDetails {
|
|
1565
|
+
/**
|
|
1566
|
+
* 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.
|
|
1567
|
+
* @example 10000
|
|
1568
|
+
*/
|
|
1569
|
+
plan_amount_cents?: number;
|
|
1498
1570
|
/** Graduated ranges, used for a `graduated` charge model. */
|
|
1499
1571
|
graduated_ranges?: {
|
|
1500
1572
|
/**
|
|
@@ -1723,6 +1795,49 @@ export type FeeAppliedTaxObject = BaseAppliedTax & {
|
|
|
1723
1795
|
*/
|
|
1724
1796
|
lago_fee_id?: string;
|
|
1725
1797
|
};
|
|
1798
|
+
export interface PricingUnitDetailsObject {
|
|
1799
|
+
/**
|
|
1800
|
+
* Unique identifier of the pricing unit, created by Lago.
|
|
1801
|
+
* @format uuid
|
|
1802
|
+
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
1803
|
+
*/
|
|
1804
|
+
lago_pricing_unit_id: string;
|
|
1805
|
+
/**
|
|
1806
|
+
* The code of the pricing unit.
|
|
1807
|
+
* @example "credits"
|
|
1808
|
+
*/
|
|
1809
|
+
pricing_unit_code: string;
|
|
1810
|
+
/**
|
|
1811
|
+
* The short name of the pricing unit. Will be used as currency name in the UI and PDFs.
|
|
1812
|
+
* @example "CR"
|
|
1813
|
+
*/
|
|
1814
|
+
short_name: string;
|
|
1815
|
+
/**
|
|
1816
|
+
* The amount in cents in the pricing unit.
|
|
1817
|
+
* @example 200
|
|
1818
|
+
*/
|
|
1819
|
+
amount_cents: number;
|
|
1820
|
+
/**
|
|
1821
|
+
* The precise amount in cents in the pricing unit.
|
|
1822
|
+
* @example "200.0"
|
|
1823
|
+
*/
|
|
1824
|
+
precise_amount_cents: string;
|
|
1825
|
+
/**
|
|
1826
|
+
* The unit amount in cents in the pricing unit.
|
|
1827
|
+
* @example 100
|
|
1828
|
+
*/
|
|
1829
|
+
unit_amount_cents: number;
|
|
1830
|
+
/**
|
|
1831
|
+
* The precise unit amount in the pricing unit.
|
|
1832
|
+
* @example "100.0"
|
|
1833
|
+
*/
|
|
1834
|
+
precise_unit_amount: string;
|
|
1835
|
+
/**
|
|
1836
|
+
* The conversion rate from pricing units to the plan's currency.
|
|
1837
|
+
* @example "0.5"
|
|
1838
|
+
*/
|
|
1839
|
+
conversion_rate: string;
|
|
1840
|
+
}
|
|
1726
1841
|
export interface FeeObject {
|
|
1727
1842
|
/**
|
|
1728
1843
|
* 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.
|
|
@@ -1955,6 +2070,8 @@ export interface FeeObject {
|
|
|
1955
2070
|
};
|
|
1956
2071
|
/** List of fee applied taxes */
|
|
1957
2072
|
applied_taxes?: FeeAppliedTaxObject[];
|
|
2073
|
+
/** Details about the pricing unit used and amounts for this fee. */
|
|
2074
|
+
pricing_unit_details?: object | null;
|
|
1958
2075
|
}
|
|
1959
2076
|
export interface CreditNoteItemObject {
|
|
1960
2077
|
/**
|
|
@@ -1986,6 +2103,21 @@ export type CreditNoteAppliedTaxObject = BaseAppliedTax & {
|
|
|
1986
2103
|
/** @example 100 */
|
|
1987
2104
|
base_amount_cents?: number;
|
|
1988
2105
|
};
|
|
2106
|
+
export interface CreditNoteErrorDetailsObject {
|
|
2107
|
+
/**
|
|
2108
|
+
* The credit note error details unique identifier, created by Lago.
|
|
2109
|
+
* @format uuid
|
|
2110
|
+
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
2111
|
+
*/
|
|
2112
|
+
lago_id: string;
|
|
2113
|
+
/**
|
|
2114
|
+
* The type of the error.
|
|
2115
|
+
* @example "tax_error"
|
|
2116
|
+
*/
|
|
2117
|
+
error_code: "not_provided" | "tax_error" | "tax_voiding_error" | "invoice_generation_error";
|
|
2118
|
+
/** The details of the error. */
|
|
2119
|
+
details: object;
|
|
2120
|
+
}
|
|
1989
2121
|
export interface CreditNoteObject {
|
|
1990
2122
|
/**
|
|
1991
2123
|
* The credit note unique identifier, created by Lago.
|
|
@@ -2124,6 +2256,7 @@ export interface CreditNoteObject {
|
|
|
2124
2256
|
* @example false
|
|
2125
2257
|
*/
|
|
2126
2258
|
self_billed?: boolean;
|
|
2259
|
+
error_details?: any[] | null;
|
|
2127
2260
|
}
|
|
2128
2261
|
export interface CreditNotesPaginated {
|
|
2129
2262
|
credit_notes: CreditNoteObject[];
|
|
@@ -2243,6 +2376,11 @@ export interface CreditNoteEstimated {
|
|
|
2243
2376
|
* @example 20
|
|
2244
2377
|
*/
|
|
2245
2378
|
taxes_amount_cents: number;
|
|
2379
|
+
/**
|
|
2380
|
+
* The precise tax amount of the credit note, expressed in cents with decimal precision.
|
|
2381
|
+
* @example 20.1
|
|
2382
|
+
*/
|
|
2383
|
+
precise_taxes_amount_cents: number;
|
|
2246
2384
|
/**
|
|
2247
2385
|
* The tax rate associated with this specific credit note.
|
|
2248
2386
|
* @example 20
|
|
@@ -2268,6 +2406,11 @@ export interface CreditNoteEstimated {
|
|
|
2268
2406
|
* @example 20
|
|
2269
2407
|
*/
|
|
2270
2408
|
coupons_adjustment_amount_cents: number;
|
|
2409
|
+
/**
|
|
2410
|
+
* The precise pro-rated amount with decimal precision of the coupons applied to the source invoice.
|
|
2411
|
+
* @example 20.1
|
|
2412
|
+
*/
|
|
2413
|
+
precise_coupons_adjustment_amount_cents: number;
|
|
2271
2414
|
/** Array of credit note's items. */
|
|
2272
2415
|
items: {
|
|
2273
2416
|
/**
|
|
@@ -2619,33 +2762,43 @@ export interface IntegrationCustomer {
|
|
|
2619
2762
|
* @format uuid
|
|
2620
2763
|
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
2621
2764
|
*/
|
|
2622
|
-
lago_id
|
|
2765
|
+
lago_id: string;
|
|
2623
2766
|
/**
|
|
2624
2767
|
* The integration type used for accounting and tax syncs.
|
|
2625
2768
|
* Accepted values: `netsuite, anrok`.
|
|
2626
2769
|
* @example "netsuite"
|
|
2627
2770
|
*/
|
|
2628
|
-
type
|
|
2771
|
+
type: "netsuite" | "anrok" | "xero" | "hubspot" | "salesforce";
|
|
2629
2772
|
/**
|
|
2630
2773
|
* Unique code used to identify an integration connection.
|
|
2631
2774
|
* @example "netsuite-eu-1"
|
|
2632
2775
|
*/
|
|
2633
|
-
integration_code
|
|
2776
|
+
integration_code: string;
|
|
2634
2777
|
/**
|
|
2635
2778
|
* 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.
|
|
2636
2779
|
* @example "cus_12345"
|
|
2637
2780
|
*/
|
|
2638
|
-
external_customer_id
|
|
2781
|
+
external_customer_id: string;
|
|
2639
2782
|
/**
|
|
2640
2783
|
* 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`
|
|
2641
2784
|
* @example true
|
|
2642
2785
|
*/
|
|
2643
|
-
sync_with_provider?: boolean;
|
|
2786
|
+
sync_with_provider?: boolean | null;
|
|
2644
2787
|
/**
|
|
2645
2788
|
* This optional field is needed only when working with `netsuite` connection.
|
|
2646
2789
|
* @example "2"
|
|
2647
2790
|
*/
|
|
2648
2791
|
subsidiary_id?: string;
|
|
2792
|
+
/**
|
|
2793
|
+
* This optional field is present only when working with `hubspot` connection.
|
|
2794
|
+
* @example "contacts"
|
|
2795
|
+
*/
|
|
2796
|
+
targeted_object?: string | null;
|
|
2797
|
+
/**
|
|
2798
|
+
* This optional field is present only when working with `hubspot` connection.
|
|
2799
|
+
* @example "dinesh@piedpiper.test"
|
|
2800
|
+
*/
|
|
2801
|
+
email?: string | null;
|
|
2649
2802
|
}
|
|
2650
2803
|
export type CustomerObject = CustomerBaseObject & {
|
|
2651
2804
|
integration_customers?: IntegrationCustomer[];
|
|
@@ -2866,6 +3019,24 @@ export interface CustomerCreateInput {
|
|
|
2866
3019
|
export interface Customer {
|
|
2867
3020
|
customer: CustomerObjectExtended;
|
|
2868
3021
|
}
|
|
3022
|
+
/** Details about the pricing unit used for charge usage. */
|
|
3023
|
+
export interface UsagePricingUnitDetailsObject {
|
|
3024
|
+
/**
|
|
3025
|
+
* The amount in cents in the pricing unit.
|
|
3026
|
+
* @example 200
|
|
3027
|
+
*/
|
|
3028
|
+
amount_cents: number;
|
|
3029
|
+
/**
|
|
3030
|
+
* The short name of the pricing unit.
|
|
3031
|
+
* @example "CR"
|
|
3032
|
+
*/
|
|
3033
|
+
short_name: string;
|
|
3034
|
+
/**
|
|
3035
|
+
* The conversion rate from pricing units to the plan's currency.
|
|
3036
|
+
* @example "0.5"
|
|
3037
|
+
*/
|
|
3038
|
+
conversion_rate: string;
|
|
3039
|
+
}
|
|
2869
3040
|
/** Array of filter object, representing multiple dimensions for a charge item. */
|
|
2870
3041
|
export type CustomerChargeFiltersUsageObject = {
|
|
2871
3042
|
/**
|
|
@@ -2889,6 +3060,8 @@ export type CustomerChargeFiltersUsageObject = {
|
|
|
2889
3060
|
* @example "AWS eu-east-1"
|
|
2890
3061
|
*/
|
|
2891
3062
|
invoice_display_name?: string;
|
|
3063
|
+
/** Details about the pricing unit used for charge usage. */
|
|
3064
|
+
pricing_unit_details?: UsagePricingUnitDetailsObject;
|
|
2892
3065
|
/**
|
|
2893
3066
|
* List of filter values applied to the usage.
|
|
2894
3067
|
* @example {"region":"us-east-1"}
|
|
@@ -2913,6 +3086,8 @@ export type CustomerChargeGroupedUsageObject = {
|
|
|
2913
3086
|
* @example "0.9"
|
|
2914
3087
|
*/
|
|
2915
3088
|
units?: string;
|
|
3089
|
+
/** Details about the pricing unit used for charge usage. */
|
|
3090
|
+
pricing_unit_details?: UsagePricingUnitDetailsObject;
|
|
2916
3091
|
/** Key value list of event properties aggregated by the charge model */
|
|
2917
3092
|
grouped_by?: Record<string, string>;
|
|
2918
3093
|
/** Array of filter object, representing multiple dimensions for a charge item. */
|
|
@@ -2940,6 +3115,8 @@ export interface CustomerChargeUsageObject {
|
|
|
2940
3115
|
* @example "EUR"
|
|
2941
3116
|
*/
|
|
2942
3117
|
amount_currency: Currency;
|
|
3118
|
+
/** Details about the pricing unit used for charge usage. */
|
|
3119
|
+
pricing_unit_details?: UsagePricingUnitDetailsObject;
|
|
2943
3120
|
/** Object listing all the properties for a specific charge item. */
|
|
2944
3121
|
charge: {
|
|
2945
3122
|
/**
|
|
@@ -3175,17 +3352,32 @@ export interface EventInputObject {
|
|
|
3175
3352
|
* 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.
|
|
3176
3353
|
* @example {"gb":10}
|
|
3177
3354
|
*/
|
|
3178
|
-
properties?:
|
|
3355
|
+
properties?: object | null;
|
|
3179
3356
|
}
|
|
3180
3357
|
export interface EventInput {
|
|
3181
3358
|
event: EventInputObject;
|
|
3182
3359
|
}
|
|
3183
|
-
export interface
|
|
3184
|
-
event: EventObject
|
|
3360
|
+
export interface EventCreated {
|
|
3361
|
+
event: EventObject & {
|
|
3362
|
+
/**
|
|
3363
|
+
* The value will always be null in this response as the event processing is done asynchronously
|
|
3364
|
+
* @example null
|
|
3365
|
+
*/
|
|
3366
|
+
lago_customer_id?: null;
|
|
3367
|
+
};
|
|
3185
3368
|
}
|
|
3186
3369
|
export interface EventBatchInput {
|
|
3187
3370
|
events: EventInputObject[];
|
|
3188
3371
|
}
|
|
3372
|
+
export interface EventsCreated {
|
|
3373
|
+
events: (EventObject & {
|
|
3374
|
+
/**
|
|
3375
|
+
* The value will always be null in this response as the event processing is done asynchronously
|
|
3376
|
+
* @example null
|
|
3377
|
+
*/
|
|
3378
|
+
lago_customer_id?: null;
|
|
3379
|
+
})[];
|
|
3380
|
+
}
|
|
3189
3381
|
export interface EventEstimateFeesInput {
|
|
3190
3382
|
event: {
|
|
3191
3383
|
/**
|
|
@@ -3205,6 +3397,215 @@ export interface EventEstimateFeesInput {
|
|
|
3205
3397
|
export interface Fees {
|
|
3206
3398
|
fees: FeeObject[];
|
|
3207
3399
|
}
|
|
3400
|
+
export interface EventEstimateInstantFeesInput {
|
|
3401
|
+
event: {
|
|
3402
|
+
/**
|
|
3403
|
+
* The code that identifies a targeted billable metric. It is essential that this code matches the `code` property of one of your active billable metrics. If the provided code does not correspond to any active billable metric, it will be ignored during the process.
|
|
3404
|
+
* @example "storage"
|
|
3405
|
+
*/
|
|
3406
|
+
code: string;
|
|
3407
|
+
/**
|
|
3408
|
+
* The unique identifier of the subscription within your application.
|
|
3409
|
+
* @example "sub_1234567890"
|
|
3410
|
+
*/
|
|
3411
|
+
external_subscription_id: string;
|
|
3412
|
+
/** 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. */
|
|
3413
|
+
properties?: object;
|
|
3414
|
+
/**
|
|
3415
|
+
* This field represents a unique identifier for the event.
|
|
3416
|
+
* @example "transaction_1234567890"
|
|
3417
|
+
*/
|
|
3418
|
+
transaction_id?: string | null;
|
|
3419
|
+
};
|
|
3420
|
+
}
|
|
3421
|
+
export interface FeeEstimateObject {
|
|
3422
|
+
lago_id?: null;
|
|
3423
|
+
/**
|
|
3424
|
+
* Unique identifier assigned to the charge that the fee belongs to
|
|
3425
|
+
* @format uuid
|
|
3426
|
+
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
3427
|
+
*/
|
|
3428
|
+
lago_charge_id?: string;
|
|
3429
|
+
/**
|
|
3430
|
+
* Unique identifier assigned to the charge filter that the fee belongs to
|
|
3431
|
+
* @format uuid
|
|
3432
|
+
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
3433
|
+
*/
|
|
3434
|
+
lago_charge_filter_id?: string | null;
|
|
3435
|
+
lago_invoice_id?: null;
|
|
3436
|
+
lago_true_up_fee_id?: null;
|
|
3437
|
+
lago_true_up_parent_fee_id?: null;
|
|
3438
|
+
/**
|
|
3439
|
+
* Unique identifier assigned to the subscription, created by Lago. This field is specifically displayed when the fee type is charge or subscription.
|
|
3440
|
+
* @format uuid
|
|
3441
|
+
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
3442
|
+
*/
|
|
3443
|
+
lago_subscription_id?: string;
|
|
3444
|
+
/**
|
|
3445
|
+
* Unique identifier assigned to the customer, created by Lago. This field is specifically displayed when the fee type is charge or subscription.
|
|
3446
|
+
* @format uuid
|
|
3447
|
+
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
3448
|
+
*/
|
|
3449
|
+
lago_customer_id?: string;
|
|
3450
|
+
/**
|
|
3451
|
+
* Unique identifier assigned to the customer in your application. This field is specifically displayed when the fee type is charge or subscription.
|
|
3452
|
+
* @example "external_id"
|
|
3453
|
+
*/
|
|
3454
|
+
external_customer_id?: string;
|
|
3455
|
+
/**
|
|
3456
|
+
* Unique identifier assigned to the subscription in your application. This field is specifically displayed when the fee type is charge or subscription.
|
|
3457
|
+
* @example "external_id"
|
|
3458
|
+
*/
|
|
3459
|
+
external_subscription_id?: string;
|
|
3460
|
+
/**
|
|
3461
|
+
* The cost of this specific fee, excluding any applicable taxes.
|
|
3462
|
+
* @example 100
|
|
3463
|
+
*/
|
|
3464
|
+
amount_cents: number;
|
|
3465
|
+
/**
|
|
3466
|
+
* The cost of this specific fee, excluding any applicable taxes, with precision.
|
|
3467
|
+
* @example 1.0001
|
|
3468
|
+
*/
|
|
3469
|
+
precise_amount?: number;
|
|
3470
|
+
/**
|
|
3471
|
+
* The cost of this specific fee, including any applicable taxes, with precision.
|
|
3472
|
+
* @example 1.0212
|
|
3473
|
+
*/
|
|
3474
|
+
precise_total_amount?: number;
|
|
3475
|
+
/**
|
|
3476
|
+
* The currency of this specific fee. It indicates the monetary unit in which the fee's cost is expressed.
|
|
3477
|
+
* @example "EUR"
|
|
3478
|
+
*/
|
|
3479
|
+
amount_currency: Currency;
|
|
3480
|
+
/**
|
|
3481
|
+
* The cost of the tax associated with this specific fee.
|
|
3482
|
+
* @example 0
|
|
3483
|
+
*/
|
|
3484
|
+
taxes_amount_cents: number;
|
|
3485
|
+
/**
|
|
3486
|
+
* The cost of the tax associated with this specific fee, with precision.
|
|
3487
|
+
* @example 0
|
|
3488
|
+
*/
|
|
3489
|
+
taxes_precise_amount?: number;
|
|
3490
|
+
/**
|
|
3491
|
+
* The tax rate associated with this specific fee.
|
|
3492
|
+
* @example 20
|
|
3493
|
+
*/
|
|
3494
|
+
taxes_rate: number;
|
|
3495
|
+
/**
|
|
3496
|
+
* 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.
|
|
3497
|
+
* @example "0.32"
|
|
3498
|
+
*/
|
|
3499
|
+
units: string;
|
|
3500
|
+
description?: null;
|
|
3501
|
+
/**
|
|
3502
|
+
* The unit amount of the fee per unit, with precision.
|
|
3503
|
+
* @example 312.5
|
|
3504
|
+
*/
|
|
3505
|
+
precise_unit_amount: number;
|
|
3506
|
+
/**
|
|
3507
|
+
* The coupon amount applied to the estimated instant fee. It will always returns 0
|
|
3508
|
+
* @example "0.0"
|
|
3509
|
+
*/
|
|
3510
|
+
precise_coupons_amount_cents?: string;
|
|
3511
|
+
/**
|
|
3512
|
+
* The cost of this specific fee, including any applicable taxes.
|
|
3513
|
+
* @example 120
|
|
3514
|
+
*/
|
|
3515
|
+
total_amount_cents: number;
|
|
3516
|
+
/**
|
|
3517
|
+
* The currency of this specific fee, including any applicable taxes.
|
|
3518
|
+
* @example "EUR"
|
|
3519
|
+
*/
|
|
3520
|
+
total_amount_currency: Currency;
|
|
3521
|
+
/**
|
|
3522
|
+
* The number of events that have been sent and used to charge the customer. This field indicates the count or quantity of events that have been processed and considered in the charging process.
|
|
3523
|
+
* @example 1
|
|
3524
|
+
*/
|
|
3525
|
+
events_count?: number;
|
|
3526
|
+
/**
|
|
3527
|
+
* Flag that indicates whether the fee was paid in advance. It serves as a boolean value, where `true` represents that the fee was paid in advance (straightaway), and `false` indicates that the fee was not paid in arrears (at the end of the period).
|
|
3528
|
+
* @example true
|
|
3529
|
+
*/
|
|
3530
|
+
pay_in_advance: boolean;
|
|
3531
|
+
/**
|
|
3532
|
+
* Flag that indicates whether the fee was included on the invoice. It serves as a boolean value, where `true` represents that the fee was included on the invoice, and `false` indicates that the fee was not included on the invoice.
|
|
3533
|
+
* @example true
|
|
3534
|
+
*/
|
|
3535
|
+
invoiceable: boolean;
|
|
3536
|
+
/**
|
|
3537
|
+
* Indicates the payment status of the fee. It represents the current status of the payment associated with the fee. The value will always `pending`.
|
|
3538
|
+
* @example "pending"
|
|
3539
|
+
*/
|
|
3540
|
+
payment_status: "pending";
|
|
3541
|
+
created_at?: null;
|
|
3542
|
+
succeeded_at?: null;
|
|
3543
|
+
failed_at?: null;
|
|
3544
|
+
refunded_at?: null;
|
|
3545
|
+
/**
|
|
3546
|
+
* Unique identifier assigned to the transaction. This field is specifically displayed when the fee type is `charge` and the payment for the fee is made in advance (`pay_in_advance` is set to `true`).
|
|
3547
|
+
* @example "transaction_1234567890"
|
|
3548
|
+
*/
|
|
3549
|
+
event_transaction_id?: string;
|
|
3550
|
+
amount_details?: null;
|
|
3551
|
+
/** Item attached to the fee */
|
|
3552
|
+
item: {
|
|
3553
|
+
/**
|
|
3554
|
+
* The fee type. The value will be `charge`.
|
|
3555
|
+
* @example "charge"
|
|
3556
|
+
*/
|
|
3557
|
+
type: "charge";
|
|
3558
|
+
/**
|
|
3559
|
+
* The code of the fee item. It will be the code of the `billable_metric`.
|
|
3560
|
+
* @example "startup"
|
|
3561
|
+
*/
|
|
3562
|
+
code: string;
|
|
3563
|
+
/**
|
|
3564
|
+
* The name of the fee item. It will be the name of the `billable_metric`.
|
|
3565
|
+
* @example "Startup"
|
|
3566
|
+
*/
|
|
3567
|
+
name: string;
|
|
3568
|
+
/**
|
|
3569
|
+
* The description of the fee item. It will be the name of the `billable_metric`.
|
|
3570
|
+
* @example "Startup description"
|
|
3571
|
+
*/
|
|
3572
|
+
description?: string;
|
|
3573
|
+
/**
|
|
3574
|
+
* Specifies the name that will be displayed on an invoice. If no value is set for this field, the name of the actual charge will be used as the default display name.
|
|
3575
|
+
* @example "Setup Fee (SF1)"
|
|
3576
|
+
*/
|
|
3577
|
+
invoice_display_name?: string;
|
|
3578
|
+
/**
|
|
3579
|
+
* Specifies the name that will be displayed on an invoice. If no value is set for this field, the actual charge filter values will be used as the default display name.
|
|
3580
|
+
* @example "AWS eu-east-1"
|
|
3581
|
+
*/
|
|
3582
|
+
filter_invoice_display_name?: string | null;
|
|
3583
|
+
/** Key value list of event properties */
|
|
3584
|
+
filters?: object | null;
|
|
3585
|
+
/**
|
|
3586
|
+
* Unique identifier of the fee item, created by Lago. It will be the identifier of the `billable_metric`.
|
|
3587
|
+
* @format uuid
|
|
3588
|
+
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
3589
|
+
*/
|
|
3590
|
+
lago_item_id: string;
|
|
3591
|
+
/**
|
|
3592
|
+
* The type of the fee item. Values is `BillableMetric`.
|
|
3593
|
+
* @example "BillableMetric"
|
|
3594
|
+
*/
|
|
3595
|
+
item_type: "BillableMetric";
|
|
3596
|
+
/** Key value list of event properties aggregated by the charge model */
|
|
3597
|
+
grouped_by?: Record<string, string>;
|
|
3598
|
+
};
|
|
3599
|
+
}
|
|
3600
|
+
export interface FeesEstimate {
|
|
3601
|
+
fees: FeeEstimateObject[];
|
|
3602
|
+
}
|
|
3603
|
+
export interface EventBatchEstimateInstantFeesInput {
|
|
3604
|
+
events: EventEstimateInstantFeesInput[];
|
|
3605
|
+
}
|
|
3606
|
+
export interface Event {
|
|
3607
|
+
event: EventObject;
|
|
3608
|
+
}
|
|
3208
3609
|
export type FeesPaginated = Fees & {
|
|
3209
3610
|
meta: PaginationMeta;
|
|
3210
3611
|
};
|
|
@@ -3394,7 +3795,7 @@ export interface BillingPeriodObject {
|
|
|
3394
3795
|
* @format uuid
|
|
3395
3796
|
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
3396
3797
|
*/
|
|
3397
|
-
lago_plan_id
|
|
3798
|
+
lago_plan_id: string;
|
|
3398
3799
|
/**
|
|
3399
3800
|
* The beginning date of the subscription billing period. This field indicates the start date of the billing period associated with the subscription fee.
|
|
3400
3801
|
* @format date-time
|
|
@@ -3473,7 +3874,7 @@ export interface UsageThresholdObject {
|
|
|
3473
3874
|
* The display name of the usage threshold.
|
|
3474
3875
|
* @example "Threshold 1"
|
|
3475
3876
|
*/
|
|
3476
|
-
threshold_display_name
|
|
3877
|
+
threshold_display_name: string | null;
|
|
3477
3878
|
/**
|
|
3478
3879
|
* The amount to reach to trigger a `progressive_billing` invoice.
|
|
3479
3880
|
* @example 10000
|
|
@@ -3506,6 +3907,7 @@ export interface AppliedUsageThresholdObject {
|
|
|
3506
3907
|
/**
|
|
3507
3908
|
* The date and time when the lifetime usage was computed. It is expressed in UTC format according to the ISO 8601 datetime standard.
|
|
3508
3909
|
* @format date-time
|
|
3910
|
+
* @example "2025-03-31T12:31:44Z"
|
|
3509
3911
|
*/
|
|
3510
3912
|
created_at: string;
|
|
3511
3913
|
usage_threshold: UsageThresholdObject;
|
|
@@ -3516,7 +3918,7 @@ export type InvoiceObject = InvoiceBaseObject & {
|
|
|
3516
3918
|
billing_periods?: BillingPeriodObject[];
|
|
3517
3919
|
metadata?: InvoiceMetadataObject[];
|
|
3518
3920
|
applied_taxes?: InvoiceAppliedTaxObject[];
|
|
3519
|
-
applied_usage_thresholds?:
|
|
3921
|
+
applied_usage_thresholds?: AppliedUsageThresholdObject[];
|
|
3520
3922
|
};
|
|
3521
3923
|
export interface InvoicesPaginated {
|
|
3522
3924
|
invoices: InvoiceObject[];
|
|
@@ -3692,6 +4094,27 @@ export interface SubscriptionObject {
|
|
|
3692
4094
|
* @example "2022-09-08T00:00:00Z"
|
|
3693
4095
|
*/
|
|
3694
4096
|
current_billing_period_ending_at?: string | null;
|
|
4097
|
+
/**
|
|
4098
|
+
* When a pay-in-advance subscription is terminated before the end of its billing period, we generate a credit note for the unused subscription time by default.
|
|
4099
|
+
* This field allows you to control the behavior of the credit note generation:
|
|
4100
|
+
*
|
|
4101
|
+
* - `credit`: A credit note is generated for the unused subscription time. The unused amount is credited to the credit note wallet.
|
|
4102
|
+
* - `skip`: No credit note is generated for the unused subscription time.
|
|
4103
|
+
*
|
|
4104
|
+
* _Note: This field is only applicable to pay-in-advance plans and will be `null` for pay-in-arrears plans._
|
|
4105
|
+
* @example "credit"
|
|
4106
|
+
*/
|
|
4107
|
+
on_termination_credit_note: "credit" | "skip";
|
|
4108
|
+
/**
|
|
4109
|
+
* When a subscription is terminated before the end of its billing period, we generate an invoice for the unbilled usage.
|
|
4110
|
+
* This field allows you to control the behavior of the invoice generation:
|
|
4111
|
+
*
|
|
4112
|
+
* - `generate`: An invoice is generated for the unbilled usage.
|
|
4113
|
+
* - `skip`: No invoice is generated for the unbilled usage.
|
|
4114
|
+
* @default "generate"
|
|
4115
|
+
* @example "generate"
|
|
4116
|
+
*/
|
|
4117
|
+
on_termination_invoice: "generate" | "skip";
|
|
3695
4118
|
}
|
|
3696
4119
|
export interface ErrorDetailObject {
|
|
3697
4120
|
/**
|
|
@@ -3918,6 +4341,26 @@ export interface InvoicePreviewInput {
|
|
|
3918
4341
|
*/
|
|
3919
4342
|
billing_entity_code?: string;
|
|
3920
4343
|
}
|
|
4344
|
+
/** Parameters available when voiding an invoice that optionally generate credit notes. */
|
|
4345
|
+
export interface InvoiceVoidInput {
|
|
4346
|
+
/**
|
|
4347
|
+
* Set to `true` to force voiding the invoice and generate a credit note.
|
|
4348
|
+
* @example true
|
|
4349
|
+
*/
|
|
4350
|
+
generate_credit_note?: boolean;
|
|
4351
|
+
/**
|
|
4352
|
+
* Portion of the invoice amount (in cents) to be refunded to the customer in the generated credit note.
|
|
4353
|
+
* @min 0
|
|
4354
|
+
* @example 2000
|
|
4355
|
+
*/
|
|
4356
|
+
refund_amount?: number;
|
|
4357
|
+
/**
|
|
4358
|
+
* Portion of the invoice amount (in cents) to be credited to the customer's balance in the generated credit note.
|
|
4359
|
+
* @min 0
|
|
4360
|
+
* @example 1150
|
|
4361
|
+
*/
|
|
4362
|
+
credit_amount?: number;
|
|
4363
|
+
}
|
|
3921
4364
|
/** The custom billing settings for your organization. */
|
|
3922
4365
|
export interface OrganizationBillingConfiguration {
|
|
3923
4366
|
/**
|
|
@@ -4436,7 +4879,7 @@ export interface MinimumCommitmentObject {
|
|
|
4436
4879
|
export interface ChargeProperties {
|
|
4437
4880
|
/**
|
|
4438
4881
|
* The list of event properties that are used to group the events on the invoice for a `standard` charge model.
|
|
4439
|
-
* **DEPRECATED** Replaced by pricing_group_keys
|
|
4882
|
+
* **DEPRECATED** Replaced by `pricing_group_keys`.
|
|
4440
4883
|
* @deprecated
|
|
4441
4884
|
* @example ["agent_name"]
|
|
4442
4885
|
*/
|
|
@@ -4617,7 +5060,7 @@ export interface ChargeObject {
|
|
|
4617
5060
|
* Specifies the name that will be displayed on an invoice. If no value is set for this field, the name of the actual charge will be used as the default display name.
|
|
4618
5061
|
* @example "Setup"
|
|
4619
5062
|
*/
|
|
4620
|
-
invoice_display_name
|
|
5063
|
+
invoice_display_name: string | null;
|
|
4621
5064
|
/**
|
|
4622
5065
|
* The date and time when the charge was created. It is expressed in UTC format according to the ISO 8601 datetime standard.
|
|
4623
5066
|
* @format date-time
|
|
@@ -4630,12 +5073,12 @@ export interface ChargeObject {
|
|
|
4630
5073
|
* 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.
|
|
4631
5074
|
* @example true
|
|
4632
5075
|
*/
|
|
4633
|
-
pay_in_advance
|
|
5076
|
+
pay_in_advance: boolean;
|
|
4634
5077
|
/**
|
|
4635
5078
|
* 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`.
|
|
4636
5079
|
* @example true
|
|
4637
5080
|
*/
|
|
4638
|
-
invoiceable
|
|
5081
|
+
invoiceable: boolean;
|
|
4639
5082
|
/**
|
|
4640
5083
|
* This setting can only be configured if `pay_in_advance` is `true` and `invoiceable` is `false`.
|
|
4641
5084
|
* This field determines whether and when the charge fee should be included in
|
|
@@ -4644,7 +5087,7 @@ export interface ChargeObject {
|
|
|
4644
5087
|
* consolidating all charge fees with a succeeded payment status.
|
|
4645
5088
|
* @example "invoice"
|
|
4646
5089
|
*/
|
|
4647
|
-
regroup_paid_fees
|
|
5090
|
+
regroup_paid_fees: "invoice";
|
|
4648
5091
|
/**
|
|
4649
5092
|
* Specifies whether a charge is prorated based on the remaining number of days in the billing period or billed fully.
|
|
4650
5093
|
*
|
|
@@ -4653,18 +5096,31 @@ export interface ChargeObject {
|
|
|
4653
5096
|
* - If not defined in the request, default value is `false`.
|
|
4654
5097
|
* @example false
|
|
4655
5098
|
*/
|
|
4656
|
-
prorated
|
|
5099
|
+
prorated: boolean;
|
|
4657
5100
|
/**
|
|
4658
5101
|
* 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.
|
|
4659
5102
|
* @example 1200
|
|
4660
5103
|
*/
|
|
4661
|
-
min_amount_cents
|
|
5104
|
+
min_amount_cents: number;
|
|
4662
5105
|
/** List of all thresholds utilized for calculating the charge. */
|
|
4663
|
-
properties
|
|
5106
|
+
properties: ChargeProperties;
|
|
4664
5107
|
/** List of filters used to apply differentiated pricing based on additional event properties. */
|
|
4665
|
-
filters
|
|
5108
|
+
filters: ChargeFilterObject[];
|
|
4666
5109
|
/** All taxes applied to the charge. */
|
|
4667
5110
|
taxes?: TaxObject[];
|
|
5111
|
+
/** The pricing unit applied to the charge. */
|
|
5112
|
+
applied_pricing_unit?: {
|
|
5113
|
+
/**
|
|
5114
|
+
* The code of the pricing unit.
|
|
5115
|
+
* @example "unit_code"
|
|
5116
|
+
*/
|
|
5117
|
+
code: string;
|
|
5118
|
+
/**
|
|
5119
|
+
* The conversion rate from pricing units to the plan's currency.
|
|
5120
|
+
* @example "0.5"
|
|
5121
|
+
*/
|
|
5122
|
+
conversion_rate: string;
|
|
5123
|
+
};
|
|
4668
5124
|
}
|
|
4669
5125
|
export interface PlanObject {
|
|
4670
5126
|
/**
|
|
@@ -4732,7 +5188,7 @@ export interface PlanObject {
|
|
|
4732
5188
|
minimum_commitment?: MinimumCommitmentObject;
|
|
4733
5189
|
/**
|
|
4734
5190
|
* Additional usage-based charges for this plan.
|
|
4735
|
-
* @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,"invoice_display_name":"Setup","pay_in_advance":false,"regroup_paid_fees":null,"prorated":false,"min_amount_cents":3000,"properties":{"amount":"30","free_units":100,"package_size":1000},"filters":[]},{"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,"invoice_display_name":"Setup","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"}]},"filters":[]},{"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,"invoice_display_name":"Setup","pay_in_advance":true,"prorated":false,"min_amount_cents":0,"properties":{},"filters":[{"invoice_display_name":"Europe","properties":{"amount":"10"},"values":{"region":["Europe"]}},{"invoice_display_name":"USA","properties":{"amount":"5"},"values":{"region":["USA"]}},{"invoice_display_name":"Africa","properties":{"amount":"8"},"values":{"region":["Africa"]}}]},{"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,"invoice_display_name":"Setup","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"}]},"filters":[]},{"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,"invoice_display_name":"Setup","pay_in_advance":true,"regroup_paid_fees":"invoice","prorated":false,"min_amount_cents":0,"properties":{"rate":"1","fixed_amount":"0.5","free_units_per_events":5,"free_units_per_total_aggregation":"500"},"filters":[]}]
|
|
5191
|
+
* @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,"invoice_display_name":"Setup","pay_in_advance":false,"regroup_paid_fees":null,"prorated":false,"min_amount_cents":3000,"properties":{"amount":"30","free_units":100,"package_size":1000},"filters":[]},{"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,"invoice_display_name":"Setup","pay_in_advance":false,"regroup_paid_fees":null,"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"}]},"filters":[]},{"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,"invoice_display_name":"Setup","pay_in_advance":true,"regroup_paid_fees":null,"prorated":false,"min_amount_cents":0,"properties":{},"filters":[{"invoice_display_name":"Europe","properties":{"amount":"10"},"values":{"region":["Europe"]}},{"invoice_display_name":"USA","properties":{"amount":"5"},"values":{"region":["USA"]}},{"invoice_display_name":"Africa","properties":{"amount":"8"},"values":{"region":["Africa"]}}]},{"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,"invoice_display_name":"Setup","pay_in_advance":false,"regroup_paid_fees":null,"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"}]},"filters":[]},{"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,"invoice_display_name":"Setup","pay_in_advance":true,"regroup_paid_fees":"invoice","prorated":false,"min_amount_cents":0,"properties":{"rate":"1","fixed_amount":"0.5","free_units_per_events":5,"free_units_per_total_aggregation":"500"},"filters":[]}]
|
|
4736
5192
|
*/
|
|
4737
5193
|
charges?: ChargeObject[];
|
|
4738
5194
|
/** All taxes applied to the plan. */
|
|
@@ -4770,12 +5226,12 @@ export interface ChargeFilterInput {
|
|
|
4770
5226
|
*/
|
|
4771
5227
|
invoice_display_name?: string | null;
|
|
4772
5228
|
/** List of all thresholds utilized for calculating the charge. */
|
|
4773
|
-
properties
|
|
5229
|
+
properties: ChargeProperties;
|
|
4774
5230
|
/**
|
|
4775
5231
|
* List of possible filter values. The key and values must match one of the billable metric filters.
|
|
4776
5232
|
* @example {"region":["us-east-1"]}
|
|
4777
5233
|
*/
|
|
4778
|
-
values
|
|
5234
|
+
values: Record<string, string[]>;
|
|
4779
5235
|
}
|
|
4780
5236
|
export interface UsageThresholdInput {
|
|
4781
5237
|
/**
|
|
@@ -4922,6 +5378,21 @@ export interface PlanCreateInput {
|
|
|
4922
5378
|
* @example ["french_standard_vat"]
|
|
4923
5379
|
*/
|
|
4924
5380
|
tax_codes?: string[];
|
|
5381
|
+
/** The pricing unit to apply to the charge. */
|
|
5382
|
+
applied_pricing_unit?: {
|
|
5383
|
+
/**
|
|
5384
|
+
* The code of the pricing unit.
|
|
5385
|
+
* @example "credits"
|
|
5386
|
+
*/
|
|
5387
|
+
code?: string;
|
|
5388
|
+
/**
|
|
5389
|
+
* The conversion rate from pricing units to the plan's currency.
|
|
5390
|
+
* This rate determines how many currency units (in the plan's base currency) equal one pricing unit.
|
|
5391
|
+
* For example, if the plan uses USD and the conversion rate is 0.5, then 1 pricing unit = $0.50.
|
|
5392
|
+
* @example "0.5"
|
|
5393
|
+
*/
|
|
5394
|
+
conversion_rate?: string;
|
|
5395
|
+
};
|
|
4925
5396
|
}[];
|
|
4926
5397
|
/** List of usage thresholds to apply to the plan. */
|
|
4927
5398
|
usage_thresholds?: UsageThresholdInput[];
|
|
@@ -5058,6 +5529,16 @@ export interface PlanUpdateInput {
|
|
|
5058
5529
|
* @example ["french_standard_vat"]
|
|
5059
5530
|
*/
|
|
5060
5531
|
tax_codes?: string[];
|
|
5532
|
+
/** Updates the pricing unit conversion rate for this charge. Only applies if the charge has applied pricing unit. */
|
|
5533
|
+
applied_pricing_unit?: {
|
|
5534
|
+
/**
|
|
5535
|
+
* The conversion rate from pricing units to the plan's currency.
|
|
5536
|
+
* This rate determines how many currency units (in the plan's base currency) equal one pricing unit.
|
|
5537
|
+
* For example, if the plan uses USD and the conversion rate is 0.5, then 1 pricing unit = $0.50 USD.
|
|
5538
|
+
* @example "0.5"
|
|
5539
|
+
*/
|
|
5540
|
+
conversion_rate?: string;
|
|
5541
|
+
};
|
|
5061
5542
|
}[];
|
|
5062
5543
|
/** List of usage thresholds to apply to the plan. */
|
|
5063
5544
|
usage_thresholds?: UsageThresholdInput[];
|
|
@@ -5143,6 +5624,16 @@ export interface PlanOverridesObject {
|
|
|
5143
5624
|
* @example ["french_standard_vat"]
|
|
5144
5625
|
*/
|
|
5145
5626
|
tax_codes?: string[];
|
|
5627
|
+
/** Updates the pricing unit conversion rate for this charge. Only applies if the charge has applied pricing unit. */
|
|
5628
|
+
applied_pricing_unit?: {
|
|
5629
|
+
/**
|
|
5630
|
+
* The conversion rate from pricing units to the plan's currency.
|
|
5631
|
+
* This rate determines how many currency units (in the plan's base currency) equal one pricing unit.
|
|
5632
|
+
* For example, if the plan uses USD and the conversion rate is 0.5, then 1 pricing unit = $0.50 USD.
|
|
5633
|
+
* @example "0.5"
|
|
5634
|
+
*/
|
|
5635
|
+
conversion_rate?: string;
|
|
5636
|
+
};
|
|
5146
5637
|
}[];
|
|
5147
5638
|
/** List of usage thresholds applied to the subscription. */
|
|
5148
5639
|
usage_thresholds?: UsageThresholdObject[];
|
|
@@ -5526,13 +6017,13 @@ export interface WalletRecurringTransactionRule {
|
|
|
5526
6017
|
* @format date-time
|
|
5527
6018
|
* @example "2022-08-08T00:00:00Z"
|
|
5528
6019
|
*/
|
|
5529
|
-
started_at?: string;
|
|
6020
|
+
started_at?: string | null;
|
|
5530
6021
|
/**
|
|
5531
6022
|
* 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`.
|
|
5532
6023
|
* @pattern ^[0-9]+.?[0-9]*$
|
|
5533
6024
|
* @example "200.0"
|
|
5534
6025
|
*/
|
|
5535
|
-
target_ongoing_balance: string;
|
|
6026
|
+
target_ongoing_balance: string | null;
|
|
5536
6027
|
/**
|
|
5537
6028
|
* 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
|
|
5538
6029
|
* @format date-time
|
|
@@ -5544,7 +6035,7 @@ export interface WalletRecurringTransactionRule {
|
|
|
5544
6035
|
* @format date-time
|
|
5545
6036
|
* @example "2023-09-30T23:59:59Z"
|
|
5546
6037
|
*/
|
|
5547
|
-
expiration_at?: string;
|
|
6038
|
+
expiration_at?: string | null;
|
|
5548
6039
|
/**
|
|
5549
6040
|
* A boolean setting that, when set to true, delays issuing an invoice for a wallet top-up until a successful payment is made; if false, the invoice is issued immediately upon wallet top-up, regardless of the payment status. Default value of false.
|
|
5550
6041
|
* @example false
|
|
@@ -5593,7 +6084,7 @@ export interface WalletObject {
|
|
|
5593
6084
|
* The name of the wallet.
|
|
5594
6085
|
* @example "Prepaid"
|
|
5595
6086
|
*/
|
|
5596
|
-
name?: string;
|
|
6087
|
+
name?: string | null;
|
|
5597
6088
|
/**
|
|
5598
6089
|
* The rate of conversion between credits and the amount in the specified currency. It indicates the ratio or factor used to convert credits into the corresponding monetary value in the currency of the transaction.
|
|
5599
6090
|
* @pattern ^[0-9]+.?[0-9]*$
|
|
@@ -5651,7 +6142,15 @@ export interface WalletObject {
|
|
|
5651
6142
|
* A boolean setting that, when set to true, delays issuing an invoice for a wallet top-up until a successful payment is made; if false, the invoice is issued immediately upon wallet top-up, regardless of the payment status. Default value of false.
|
|
5652
6143
|
* @example false
|
|
5653
6144
|
*/
|
|
5654
|
-
invoice_requires_successful_payment
|
|
6145
|
+
invoice_requires_successful_payment: boolean;
|
|
6146
|
+
/** Set wallet limitations to fee types. */
|
|
6147
|
+
applies_to?: {
|
|
6148
|
+
/**
|
|
6149
|
+
* An array of fee types to which the wallet is applicable. By specifying the fee types in this field, you can restrict the wallet's usage to specific fee types only.
|
|
6150
|
+
* @example ["charge"]
|
|
6151
|
+
*/
|
|
6152
|
+
fee_types?: ("charge" | "subscription" | "commitment")[];
|
|
6153
|
+
};
|
|
5655
6154
|
/** List of recurring transaction rules. Currently, we only allow one recurring rule per wallet. */
|
|
5656
6155
|
recurring_transaction_rules?: WalletRecurringTransactionRule[];
|
|
5657
6156
|
/**
|
|
@@ -5687,7 +6186,7 @@ export interface WalletCreateInput {
|
|
|
5687
6186
|
* The name of the wallet.
|
|
5688
6187
|
* @example "Prepaid"
|
|
5689
6188
|
*/
|
|
5690
|
-
name?: string;
|
|
6189
|
+
name?: string | null;
|
|
5691
6190
|
/**
|
|
5692
6191
|
* The rate of conversion between credits and the amount in the specified currency. It indicates the ratio or factor used to convert credits into the corresponding monetary value in the currency of the transaction.
|
|
5693
6192
|
* @pattern ^[0-9]+.?[0-9]*$
|
|
@@ -5731,81 +6230,17 @@ export interface WalletCreateInput {
|
|
|
5731
6230
|
* This optional field allows you to store a list of key-value pairs that provide additional information or custom attributes. These key-value pairs will be included in the metadata of wallet transactions generated during the wallet creation process.
|
|
5732
6231
|
* @example [{"key":"example_key","value":"example_value"},{"key":"another_key","value":"another_value"}]
|
|
5733
6232
|
*/
|
|
5734
|
-
transaction_metadata?:
|
|
5735
|
-
|
|
5736
|
-
|
|
5737
|
-
/** The corresponding value for the key. */
|
|
5738
|
-
value?: string;
|
|
5739
|
-
}[];
|
|
5740
|
-
/** List of recurring transaction rules. Currently, we only allow one recurring rule per wallet. */
|
|
5741
|
-
recurring_transaction_rules?: {
|
|
6233
|
+
transaction_metadata?: any[] | null;
|
|
6234
|
+
/** Set wallet limitations to fee types. */
|
|
6235
|
+
applies_to?: {
|
|
5742
6236
|
/**
|
|
5743
|
-
*
|
|
5744
|
-
* @
|
|
5745
|
-
* @example "20.0"
|
|
6237
|
+
* An array of fee types to which the wallet is applicable. By specifying the fee types in this field, you can restrict the wallet's usage to specific fee types only.
|
|
6238
|
+
* @example ["charge"]
|
|
5746
6239
|
*/
|
|
5747
|
-
|
|
5748
|
-
|
|
5749
|
-
|
|
5750
|
-
|
|
5751
|
-
* @example "10.0"
|
|
5752
|
-
*/
|
|
5753
|
-
granted_credits?: string | null;
|
|
5754
|
-
/**
|
|
5755
|
-
* The method used for recurring top-up. Possible values are `fixed` or `target`.
|
|
5756
|
-
* @example "target"
|
|
5757
|
-
*/
|
|
5758
|
-
method?: "fixed" | "target";
|
|
5759
|
-
/**
|
|
5760
|
-
* The trigger. Possible values are `interval` or `threshold`.
|
|
5761
|
-
* @example "interval"
|
|
5762
|
-
*/
|
|
5763
|
-
trigger: "interval" | "threshold";
|
|
5764
|
-
/**
|
|
5765
|
-
* 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 `interval`.
|
|
5766
|
-
* @example "monthly"
|
|
5767
|
-
*/
|
|
5768
|
-
interval?: "weekly" | "monthly" | "quarterly" | "yearly";
|
|
5769
|
-
/**
|
|
5770
|
-
* 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).
|
|
5771
|
-
* @format date-time
|
|
5772
|
-
* @example "2022-08-08T00:00:00Z"
|
|
5773
|
-
*/
|
|
5774
|
-
started_at?: string;
|
|
5775
|
-
/**
|
|
5776
|
-
* The expiration date and time for this specific recurring transaction rule. It follows the ISO 8601 datetime format and is expressed in Coordinated Universal Time (UTC).
|
|
5777
|
-
* @format date-time
|
|
5778
|
-
* @example "2023-09-30T23:59:59Z"
|
|
5779
|
-
*/
|
|
5780
|
-
expiration_at?: string | null;
|
|
5781
|
-
/**
|
|
5782
|
-
* 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`.
|
|
5783
|
-
* @pattern ^[0-9]+.?[0-9]*$
|
|
5784
|
-
* @example "20.0"
|
|
5785
|
-
*/
|
|
5786
|
-
threshold_credits?: string;
|
|
5787
|
-
/**
|
|
5788
|
-
* 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`.
|
|
5789
|
-
* @pattern ^[0-9]+.?[0-9]*$
|
|
5790
|
-
* @example "200.0"
|
|
5791
|
-
*/
|
|
5792
|
-
target_ongoing_balance?: string;
|
|
5793
|
-
/**
|
|
5794
|
-
* A boolean setting that, when set to true, delays issuing an invoice for a wallet top-up until a successful payment is made; if false, the invoice is issued immediately upon wallet top-up, regardless of the payment status. Default value of false.
|
|
5795
|
-
* @example false
|
|
5796
|
-
*/
|
|
5797
|
-
invoice_requires_successful_payment?: boolean;
|
|
5798
|
-
/**
|
|
5799
|
-
* This optional field allows you to store a list of key-value pairs containing additional information or custom attributes. These key-value pairs will populate the metadata of the wallet transactions triggered by this rule.
|
|
5800
|
-
* @example [{"key":"example_key","value":"example_value"},{"key":"another_key","value":"another_value"}]
|
|
5801
|
-
*/
|
|
5802
|
-
transaction_metadata?: {
|
|
5803
|
-
/** The unique identifier for the attribute. */
|
|
5804
|
-
key?: string;
|
|
5805
|
-
/** The value associated with the key. */
|
|
5806
|
-
value?: string;
|
|
5807
|
-
}[];
|
|
5808
|
-
}[];
|
|
6240
|
+
fee_types?: any[] | null;
|
|
6241
|
+
};
|
|
6242
|
+
/** List of recurring transaction rules. Currently, we only allow one recurring rule per wallet. */
|
|
6243
|
+
recurring_transaction_rules?: any[] | null;
|
|
5809
6244
|
};
|
|
5810
6245
|
}
|
|
5811
6246
|
export interface Wallet {
|
|
@@ -5863,19 +6298,19 @@ export interface WalletUpdateInput {
|
|
|
5863
6298
|
* @pattern ^[0-9]+.?[0-9]*$
|
|
5864
6299
|
* @example "20.0"
|
|
5865
6300
|
*/
|
|
5866
|
-
paid_credits?: string;
|
|
6301
|
+
paid_credits?: string | null;
|
|
5867
6302
|
/**
|
|
5868
6303
|
* The number of free granted credits. Required only if there is no paid credits.
|
|
5869
6304
|
* @pattern ^[0-9]+.?[0-9]*$
|
|
5870
6305
|
* @example "10.0"
|
|
5871
6306
|
*/
|
|
5872
|
-
granted_credits?: string;
|
|
6307
|
+
granted_credits?: string | null;
|
|
5873
6308
|
/**
|
|
5874
6309
|
* 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).
|
|
5875
6310
|
* @format date-time
|
|
5876
6311
|
* @example "2022-08-08T00:00:00Z"
|
|
5877
6312
|
*/
|
|
5878
|
-
started_at?: string;
|
|
6313
|
+
started_at?: string | null;
|
|
5879
6314
|
/**
|
|
5880
6315
|
* The expiration date and time for this specific recurring transaction rule. It follows the ISO 8601 datetime format and is expressed in Coordinated Universal Time (UTC).
|
|
5881
6316
|
* @format date-time
|
|
@@ -5904,6 +6339,14 @@ export interface WalletUpdateInput {
|
|
|
5904
6339
|
value?: string;
|
|
5905
6340
|
}[];
|
|
5906
6341
|
}[];
|
|
6342
|
+
/** Set wallet limitations to fee types. */
|
|
6343
|
+
applies_to?: {
|
|
6344
|
+
/**
|
|
6345
|
+
* An array of fee types to which the wallet is applicable. By specifying the fee types in this field, you can restrict the wallet's usage to specific fee types only.
|
|
6346
|
+
* @example ["charge"]
|
|
6347
|
+
*/
|
|
6348
|
+
fee_types?: any[] | null;
|
|
6349
|
+
};
|
|
5907
6350
|
};
|
|
5908
6351
|
}
|
|
5909
6352
|
export interface WalletTransactionCreateInput {
|
|
@@ -5919,19 +6362,19 @@ export interface WalletTransactionCreateInput {
|
|
|
5919
6362
|
* @pattern ^[0-9]+.?[0-9]*$
|
|
5920
6363
|
* @example "20.0"
|
|
5921
6364
|
*/
|
|
5922
|
-
paid_credits?: string;
|
|
6365
|
+
paid_credits?: string | null;
|
|
5923
6366
|
/**
|
|
5924
6367
|
* The number of free granted credits.
|
|
5925
6368
|
* @pattern ^[0-9]+.?[0-9]*$
|
|
5926
6369
|
* @example "10.0"
|
|
5927
6370
|
*/
|
|
5928
|
-
granted_credits?: string;
|
|
6371
|
+
granted_credits?: string | null;
|
|
5929
6372
|
/**
|
|
5930
6373
|
* The number of voided credits.
|
|
5931
6374
|
* @pattern ^[0-9]+.?[0-9]*$
|
|
5932
6375
|
* @example "5.0"
|
|
5933
6376
|
*/
|
|
5934
|
-
voided_credits?: string;
|
|
6377
|
+
voided_credits?: string | null;
|
|
5935
6378
|
/**
|
|
5936
6379
|
* A boolean setting that, when set to true, delays issuing an invoice for a wallet top-up until a successful payment is made; if false, the invoice is issued immediately upon wallet top-up, regardless of the payment status. Default value of false.
|
|
5937
6380
|
* @example false
|
|
@@ -5941,12 +6384,7 @@ export interface WalletTransactionCreateInput {
|
|
|
5941
6384
|
* This optional field allows you to store a list of key-value pairs that hold additional information or custom attributes related to the data.
|
|
5942
6385
|
* @example [{"key":"example key","value":"example value"},{"key":"another key","value":"another value"}]
|
|
5943
6386
|
*/
|
|
5944
|
-
metadata?:
|
|
5945
|
-
/** The unique identifier for the attribute. */
|
|
5946
|
-
key?: string;
|
|
5947
|
-
/** The value associated with the key. */
|
|
5948
|
-
value?: string;
|
|
5949
|
-
}[];
|
|
6387
|
+
metadata?: any[] | null;
|
|
5950
6388
|
};
|
|
5951
6389
|
}
|
|
5952
6390
|
export interface WalletTransactionObject {
|
|
@@ -5968,10 +6406,10 @@ export interface WalletTransactionObject {
|
|
|
5968
6406
|
*/
|
|
5969
6407
|
status: "pending" | "settled" | "failed";
|
|
5970
6408
|
/**
|
|
5971
|
-
* The source field represents the origin or trigger of the wallet transaction. Possible values are `manual`, `interval
|
|
6409
|
+
* The source field represents the origin or trigger of the wallet transaction. Possible values are `manual`, `interval`, `threshold`
|
|
5972
6410
|
* @example "manual"
|
|
5973
6411
|
*/
|
|
5974
|
-
source
|
|
6412
|
+
source: "manual" | "interval" | "threshold";
|
|
5975
6413
|
/**
|
|
5976
6414
|
* The transaction status of the wallet transaction. Possible values are `purchased` (with pending or settled status), `granted` (without invoice_id), `voided` or `invoiced`.
|
|
5977
6415
|
* @example "purchased"
|
|
@@ -6014,13 +6452,13 @@ export interface WalletTransactionObject {
|
|
|
6014
6452
|
* @format date-time
|
|
6015
6453
|
* @example "2022-04-29T08:59:51Z"
|
|
6016
6454
|
*/
|
|
6017
|
-
settled_at?: string;
|
|
6455
|
+
settled_at?: string | null;
|
|
6018
6456
|
/**
|
|
6019
6457
|
* The date when the wallet transaction failed, represented in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC).
|
|
6020
6458
|
* @format date-time
|
|
6021
6459
|
* @example "2022-04-29T08:59:51Z"
|
|
6022
6460
|
*/
|
|
6023
|
-
failed_at?: string;
|
|
6461
|
+
failed_at?: string | null;
|
|
6024
6462
|
/**
|
|
6025
6463
|
* The date of the wallet transaction creation, represented in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC).
|
|
6026
6464
|
* @format date-time
|
|
@@ -6324,8 +6762,8 @@ export interface EventErrorsObject {
|
|
|
6324
6762
|
*/
|
|
6325
6763
|
status: number;
|
|
6326
6764
|
/**
|
|
6327
|
-
* HTTP error description. It will always be "Unprocessable
|
|
6328
|
-
* @example "Unprocessable
|
|
6765
|
+
* HTTP error description. It will always be "Unprocessable entity"
|
|
6766
|
+
* @example "Unprocessable entity"
|
|
6329
6767
|
*/
|
|
6330
6768
|
error: string;
|
|
6331
6769
|
message: string | Record<string, any>;
|
|
@@ -6347,6 +6785,8 @@ export interface EventsErrorsObject {
|
|
|
6347
6785
|
* @example ["transaction_1234567890"]
|
|
6348
6786
|
*/
|
|
6349
6787
|
invalid_filter_values: string[];
|
|
6788
|
+
/** @deprecated */
|
|
6789
|
+
missing_group_key: string[];
|
|
6350
6790
|
}
|
|
6351
6791
|
export interface FeeTaxProviderErrorObject {
|
|
6352
6792
|
/**
|
|
@@ -6534,9 +6974,6 @@ export interface WalletTransactionPaymentFailureObject {
|
|
|
6534
6974
|
payment_provider_code?: string;
|
|
6535
6975
|
provider_error?: string | Record<string, any>;
|
|
6536
6976
|
}
|
|
6537
|
-
export interface CreditNotes {
|
|
6538
|
-
credit_notes: CreditNoteObject[];
|
|
6539
|
-
}
|
|
6540
6977
|
export type CustomerPaymentProvidernErrorObject = CustomerPaymentProviderErrorObject;
|
|
6541
6978
|
export type QueryParamsType = Record<string | number, any>;
|
|
6542
6979
|
export type ResponseFormat = keyof Omit<Body, "body" | "bodyUsed">;
|
|
@@ -6598,7 +7035,7 @@ export declare class HttpClient<SecurityDataType = unknown> {
|
|
|
6598
7035
|
}
|
|
6599
7036
|
/**
|
|
6600
7037
|
* @title Lago API documentation
|
|
6601
|
-
* @version 1.
|
|
7038
|
+
* @version 1.31.0
|
|
6602
7039
|
* @license AGPLv3
|
|
6603
7040
|
* @baseUrl https://api.getlago.com/api/v1
|
|
6604
7041
|
* @externalDocs https://github.com/getlago
|
|
@@ -6690,17 +7127,17 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
6690
7127
|
* Filter results by activity types
|
|
6691
7128
|
* @example ["billing_metric.created","billing_metric.updated"]
|
|
6692
7129
|
*/
|
|
6693
|
-
activity_types?: string[];
|
|
7130
|
+
"activity_types[]"?: string[];
|
|
6694
7131
|
/**
|
|
6695
7132
|
* Filter results by activity sources
|
|
6696
7133
|
* @example ["api","front"]
|
|
6697
7134
|
*/
|
|
6698
|
-
activity_sources?: ("api" | "front" | "system")[];
|
|
7135
|
+
"activity_sources[]"?: ("api" | "front" | "system")[];
|
|
6699
7136
|
/**
|
|
6700
7137
|
* Filter results by user emails
|
|
6701
7138
|
* @example ["dinesh@piedpiper.test"]
|
|
6702
7139
|
*/
|
|
6703
|
-
user_emails?: string[];
|
|
7140
|
+
"user_emails[]"?: string[];
|
|
6704
7141
|
/**
|
|
6705
7142
|
* Unique identifier assigned to the customer in your application.
|
|
6706
7143
|
* @example "5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba"
|
|
@@ -6715,12 +7152,12 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
6715
7152
|
* Filter results by resources unique identifiers
|
|
6716
7153
|
* @example ["5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba","1a901a90-1a90-1a90-1a90-1a901a901a90"]
|
|
6717
7154
|
*/
|
|
6718
|
-
resource_ids?: string[];
|
|
7155
|
+
"resource_ids[]"?: string[];
|
|
6719
7156
|
/**
|
|
6720
7157
|
* Filter results by resource class types
|
|
6721
7158
|
* @example ["BillableMetric","Invoice"]
|
|
6722
7159
|
*/
|
|
6723
|
-
resource_types?: string[];
|
|
7160
|
+
"resource_types[]"?: string[];
|
|
6724
7161
|
}, params?: RequestParams) => Promise<HttpResponse<ActivityLogsPaginated, ApiErrorUnauthorized>>;
|
|
6725
7162
|
/**
|
|
6726
7163
|
* @description This endpoint retrieves an existing activity log that represents an action performed on some resource. The activity log is identified by its unique activity_id.
|
|
@@ -6743,7 +7180,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
6743
7180
|
* @request POST:/add_ons
|
|
6744
7181
|
* @secure
|
|
6745
7182
|
*/
|
|
6746
|
-
createAddOn: (data: AddOnCreateInput, params?: RequestParams) => Promise<HttpResponse<AddOn, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorBadRequest>>;
|
|
7183
|
+
createAddOn: (data: AddOnCreateInput, params?: RequestParams) => Promise<HttpResponse<AddOn, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorBadRequest | ApiErrorForbidden>>;
|
|
6747
7184
|
/**
|
|
6748
7185
|
* @description This endpoint is used to list all existing add-ons.
|
|
6749
7186
|
*
|
|
@@ -6764,7 +7201,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
6764
7201
|
* @example 20
|
|
6765
7202
|
*/
|
|
6766
7203
|
per_page?: number;
|
|
6767
|
-
}, params?: RequestParams) => Promise<HttpResponse<AddOnsPaginated, ApiErrorUnauthorized>>;
|
|
7204
|
+
}, params?: RequestParams) => Promise<HttpResponse<AddOnsPaginated, ApiErrorUnauthorized | ApiErrorForbidden>>;
|
|
6768
7205
|
/**
|
|
6769
7206
|
* @description This endpoint is used to update an existing add-on.
|
|
6770
7207
|
*
|
|
@@ -6774,7 +7211,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
6774
7211
|
* @request PUT:/add_ons/{code}
|
|
6775
7212
|
* @secure
|
|
6776
7213
|
*/
|
|
6777
|
-
updateAddOn: (code: string, data: AddOnUpdateInput, params?: RequestParams) => Promise<HttpResponse<AddOn, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorBadRequest | ApiErrorNotFound>>;
|
|
7214
|
+
updateAddOn: (code: string, data: AddOnUpdateInput, params?: RequestParams) => Promise<HttpResponse<AddOn, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorBadRequest | ApiErrorForbidden | ApiErrorNotFound>>;
|
|
6778
7215
|
/**
|
|
6779
7216
|
* @description This endpoint is used to retrieve a specific add-on.
|
|
6780
7217
|
*
|
|
@@ -6784,7 +7221,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
6784
7221
|
* @request GET:/add_ons/{code}
|
|
6785
7222
|
* @secure
|
|
6786
7223
|
*/
|
|
6787
|
-
findAddOn: (code: string, params?: RequestParams) => Promise<HttpResponse<AddOn, ApiErrorUnauthorized | ApiErrorNotFound>>;
|
|
7224
|
+
findAddOn: (code: string, params?: RequestParams) => Promise<HttpResponse<AddOn, ApiErrorUnauthorized | ApiErrorForbidden | ApiErrorNotFound>>;
|
|
6788
7225
|
/**
|
|
6789
7226
|
* @description This endpoint is used to delete an existing add-on.
|
|
6790
7227
|
*
|
|
@@ -6794,7 +7231,72 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
6794
7231
|
* @request DELETE:/add_ons/{code}
|
|
6795
7232
|
* @secure
|
|
6796
7233
|
*/
|
|
6797
|
-
destroyAddOn: (code: string, params?: RequestParams) => Promise<HttpResponse<AddOn, ApiErrorUnauthorized | ApiErrorNotFound>>;
|
|
7234
|
+
destroyAddOn: (code: string, params?: RequestParams) => Promise<HttpResponse<AddOn, ApiErrorUnauthorized | ApiErrorForbidden | ApiErrorNotFound>>;
|
|
7235
|
+
};
|
|
7236
|
+
apiLogs: {
|
|
7237
|
+
/**
|
|
7238
|
+
* @description This endpoint retrieves all existing api logs that represent requests performed to Lago's API.
|
|
7239
|
+
*
|
|
7240
|
+
* @tags api_logs
|
|
7241
|
+
* @name FindAllApiLogs
|
|
7242
|
+
* @summary List all api logs
|
|
7243
|
+
* @request GET:/api_logs
|
|
7244
|
+
* @secure
|
|
7245
|
+
*/
|
|
7246
|
+
findAllApiLogs: (query?: {
|
|
7247
|
+
/**
|
|
7248
|
+
* Page number.
|
|
7249
|
+
* @example 1
|
|
7250
|
+
*/
|
|
7251
|
+
page?: number;
|
|
7252
|
+
/**
|
|
7253
|
+
* Number of records per page.
|
|
7254
|
+
* @example 20
|
|
7255
|
+
*/
|
|
7256
|
+
per_page?: number;
|
|
7257
|
+
/**
|
|
7258
|
+
* Filter api logs from a specific date.
|
|
7259
|
+
* @format date
|
|
7260
|
+
* @example "2022-08-09"
|
|
7261
|
+
*/
|
|
7262
|
+
from_date?: string;
|
|
7263
|
+
/**
|
|
7264
|
+
* Filter api logs up to a specific date.
|
|
7265
|
+
* @format date
|
|
7266
|
+
* @example "2022-08-09"
|
|
7267
|
+
*/
|
|
7268
|
+
to_date?: string;
|
|
7269
|
+
/**
|
|
7270
|
+
* Filter results by HTTP methods
|
|
7271
|
+
* @example ["post","put"]
|
|
7272
|
+
*/
|
|
7273
|
+
"http_methods[]"?: ("post" | "put" | "delete")[];
|
|
7274
|
+
/**
|
|
7275
|
+
* Filter results by HTTP status or by generic request status
|
|
7276
|
+
* @example ["failed","succeeded",404]
|
|
7277
|
+
*/
|
|
7278
|
+
"http_statuses[]"?: ("succeeded" | "failed" | number)[];
|
|
7279
|
+
/**
|
|
7280
|
+
* Filter results by API version
|
|
7281
|
+
* @example "v1"
|
|
7282
|
+
*/
|
|
7283
|
+
api_version?: string;
|
|
7284
|
+
/**
|
|
7285
|
+
* Filter results by the path of the request
|
|
7286
|
+
* @example "/billable_metrics/"
|
|
7287
|
+
*/
|
|
7288
|
+
request_paths?: string;
|
|
7289
|
+
}, params?: RequestParams) => Promise<HttpResponse<ApiLogsPaginated, ApiErrorUnauthorized>>;
|
|
7290
|
+
/**
|
|
7291
|
+
* @description This endpoint retrieves an existing api log that represents a request made to the API. The api log is identified by its unique request_id.
|
|
7292
|
+
*
|
|
7293
|
+
* @tags api_logs
|
|
7294
|
+
* @name FindApiLog
|
|
7295
|
+
* @summary Retrieve an api log
|
|
7296
|
+
* @request GET:/api_logs/{request_id}
|
|
7297
|
+
* @secure
|
|
7298
|
+
*/
|
|
7299
|
+
findApiLog: (requestId: string, params?: RequestParams) => Promise<HttpResponse<ApiLog, ApiErrorUnauthorized | ApiErrorNotFound>>;
|
|
6798
7300
|
};
|
|
6799
7301
|
analytics: {
|
|
6800
7302
|
/**
|
|
@@ -6819,7 +7321,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
6819
7321
|
* @example 12
|
|
6820
7322
|
*/
|
|
6821
7323
|
months?: number;
|
|
6822
|
-
}, params?: RequestParams) => Promise<HttpResponse<GrossRevenues, ApiErrorUnauthorized>>;
|
|
7324
|
+
}, params?: RequestParams) => Promise<HttpResponse<GrossRevenues, ApiErrorUnauthorized | ApiErrorForbidden>>;
|
|
6823
7325
|
/**
|
|
6824
7326
|
* @description Represents a monthly aggregation, detailing both the total count and the cumulative amount of invoices that have been marked as `finalized`. This report sorts invoices categorically based on their `payment_status`.
|
|
6825
7327
|
*
|
|
@@ -6880,7 +7382,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
6880
7382
|
* @example 12
|
|
6881
7383
|
*/
|
|
6882
7384
|
months?: number;
|
|
6883
|
-
}, params?: RequestParams) => Promise<HttpResponse<Mrrs, ApiErrorUnauthorized>>;
|
|
7385
|
+
}, params?: RequestParams) => Promise<HttpResponse<Mrrs, ApiErrorUnauthorized | ApiErrorForbidden>>;
|
|
6884
7386
|
/**
|
|
6885
7387
|
* @description Overdue balance is the total amount associated with overdue invoices (invoices with pending or failed payments which are past their due dates).
|
|
6886
7388
|
*
|
|
@@ -6903,7 +7405,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
6903
7405
|
* @example 12
|
|
6904
7406
|
*/
|
|
6905
7407
|
months?: number;
|
|
6906
|
-
}, params?: RequestParams) => Promise<HttpResponse<OverdueBalances, ApiErrorUnauthorized>>;
|
|
7408
|
+
}, params?: RequestParams) => Promise<HttpResponse<OverdueBalances, ApiErrorUnauthorized | ApiErrorForbidden>>;
|
|
6907
7409
|
};
|
|
6908
7410
|
appliedCoupons: {
|
|
6909
7411
|
/**
|
|
@@ -7177,7 +7679,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
7177
7679
|
* Filter credit notes by billing entity codes.
|
|
7178
7680
|
* @example ["billing_entity_code_1","billing_entity_code_2"]
|
|
7179
7681
|
*/
|
|
7180
|
-
billing_entity_codes?: string[];
|
|
7682
|
+
"billing_entity_codes[]"?: string[];
|
|
7181
7683
|
}, params?: RequestParams) => Promise<HttpResponse<CreditNotesPaginated, ApiErrorUnauthorized>>;
|
|
7182
7684
|
/**
|
|
7183
7685
|
* @description This endpoint updates an existing credit note.
|
|
@@ -7265,12 +7767,12 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
7265
7767
|
* Filter customers by account type.
|
|
7266
7768
|
* @example ["customer","partner"]
|
|
7267
7769
|
*/
|
|
7268
|
-
account_type?: ("customer" | "partner")[];
|
|
7770
|
+
"account_type[]"?: ("customer" | "partner")[];
|
|
7269
7771
|
/**
|
|
7270
7772
|
* Filter customers by billing entity codes.
|
|
7271
7773
|
* @example ["billing_entity_code_1","billing_entity_code_2"]
|
|
7272
7774
|
*/
|
|
7273
|
-
billing_entity_codes?: string[];
|
|
7775
|
+
"billing_entity_codes[]"?: string[];
|
|
7274
7776
|
}, params?: RequestParams) => Promise<HttpResponse<CustomersPaginated, ApiErrorUnauthorized>>;
|
|
7275
7777
|
/**
|
|
7276
7778
|
* @description This endpoint retrieves an existing customer.
|
|
@@ -7399,7 +7901,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
7399
7901
|
* @request POST:/events
|
|
7400
7902
|
* @secure
|
|
7401
7903
|
*/
|
|
7402
|
-
createEvent: (data: EventInput, params?: RequestParams) => Promise<HttpResponse<
|
|
7904
|
+
createEvent: (data: EventInput, params?: RequestParams) => Promise<HttpResponse<EventCreated, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorBadRequest | ApiErrorForbidden>>;
|
|
7403
7905
|
/**
|
|
7404
7906
|
* @description This endpoint is used for retrieving all events.
|
|
7405
7907
|
*
|
|
@@ -7442,7 +7944,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
7442
7944
|
* @example "2022-08-08T00:00:00Z"
|
|
7443
7945
|
*/
|
|
7444
7946
|
timestamp_to?: string;
|
|
7445
|
-
}, params?: RequestParams) => Promise<HttpResponse<EventsPaginated, ApiErrorUnauthorized>>;
|
|
7947
|
+
}, params?: RequestParams) => Promise<HttpResponse<EventsPaginated, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorForbidden>>;
|
|
7446
7948
|
/**
|
|
7447
7949
|
* @description This endpoint can be used to send a batch of usage records. Each request may include up to 100 events.
|
|
7448
7950
|
*
|
|
@@ -7452,7 +7954,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
7452
7954
|
* @request POST:/events/batch
|
|
7453
7955
|
* @secure
|
|
7454
7956
|
*/
|
|
7455
|
-
createBatchEvents: (data: EventBatchInput, params?: RequestParams) => Promise<HttpResponse<
|
|
7957
|
+
createBatchEvents: (data: EventBatchInput, params?: RequestParams) => Promise<HttpResponse<EventsCreated, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorBadRequest | ApiErrorForbidden>>;
|
|
7456
7958
|
/**
|
|
7457
7959
|
* @description Estimate the fees that would be created after reception of an event for a billable metric attached to one or multiple pay in advance charges
|
|
7458
7960
|
*
|
|
@@ -7462,7 +7964,27 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
7462
7964
|
* @request POST:/events/estimate_fees
|
|
7463
7965
|
* @secure
|
|
7464
7966
|
*/
|
|
7465
|
-
eventEstimateFees: (data: EventEstimateFeesInput, params?: RequestParams) => Promise<HttpResponse<Fees, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorBadRequest | ApiErrorNotFound>>;
|
|
7967
|
+
eventEstimateFees: (data: EventEstimateFeesInput, params?: RequestParams) => Promise<HttpResponse<Fees, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorBadRequest | ApiErrorForbidden | ApiErrorNotFound>>;
|
|
7968
|
+
/**
|
|
7969
|
+
* @description Estimate the fees that would be created after reception of an event for a billable metric attached to one or multiple pay in advance standard or percentage charges
|
|
7970
|
+
*
|
|
7971
|
+
* @tags events
|
|
7972
|
+
* @name EventEstimateInstantFees
|
|
7973
|
+
* @summary Estimate instant fees for a pay in advance charge
|
|
7974
|
+
* @request POST:/events/estimate_instant_fees
|
|
7975
|
+
* @secure
|
|
7976
|
+
*/
|
|
7977
|
+
eventEstimateInstantFees: (data: EventEstimateInstantFeesInput, params?: RequestParams) => Promise<HttpResponse<FeesEstimate, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorBadRequest | ApiErrorForbidden | ApiErrorNotFound>>;
|
|
7978
|
+
/**
|
|
7979
|
+
* @description Estimate the fees that would be created after reception of an event for a billable metric attached to one or multiple pay in advance standard or percentage charges
|
|
7980
|
+
*
|
|
7981
|
+
* @tags events
|
|
7982
|
+
* @name EventBatchEstimateInstantFees
|
|
7983
|
+
* @summary Batch estimate instant fees for a pay in advance charge
|
|
7984
|
+
* @request POST:/events/batch_estimate_instant_fees
|
|
7985
|
+
* @secure
|
|
7986
|
+
*/
|
|
7987
|
+
eventBatchEstimateInstantFees: (data: EventBatchEstimateInstantFeesInput, params?: RequestParams) => Promise<HttpResponse<FeesEstimate, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorBadRequest | ApiErrorForbidden | ApiErrorNotFound>>;
|
|
7466
7988
|
/**
|
|
7467
7989
|
* @description This endpoint is used for retrieving a specific usage measurement event that has been sent to a customer or a subscription.
|
|
7468
7990
|
*
|
|
@@ -7472,7 +7994,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
7472
7994
|
* @request GET:/events/{transaction_id}
|
|
7473
7995
|
* @secure
|
|
7474
7996
|
*/
|
|
7475
|
-
findEvent: (transactionId: string, params?: RequestParams) => Promise<HttpResponse<Event, ApiErrorUnauthorized | ApiErrorNotFound>>;
|
|
7997
|
+
findEvent: (transactionId: string, params?: RequestParams) => Promise<HttpResponse<Event, ApiErrorUnauthorized | ApiErrorForbidden | ApiErrorNotFound>>;
|
|
7476
7998
|
};
|
|
7477
7999
|
fees: {
|
|
7478
8000
|
/**
|
|
@@ -7700,7 +8222,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
7700
8222
|
* Filter invoices by billing entity codes. Possible values are the billing entity codes you have created.
|
|
7701
8223
|
* @example ["acme_corp","foo_bar"]
|
|
7702
8224
|
*/
|
|
7703
|
-
billing_entity_codes?: string[];
|
|
8225
|
+
"billing_entity_codes[]"?: string[];
|
|
7704
8226
|
/**
|
|
7705
8227
|
* Filter invoices by metadata. Replace `key` with the actual metadata key you want to match, and provide the corresponding value. Providing empty value will search for invoice without given metadata key. For example, `metadata[color]=blue`.
|
|
7706
8228
|
* @example "someValue"
|
|
@@ -7808,7 +8330,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
7808
8330
|
*/
|
|
7809
8331
|
retryPayment: (lagoId: string, params?: RequestParams) => Promise<HttpResponse<void, ApiErrorUnauthorized | ApiErrorNotFound | ApiErrorNotAllowed>>;
|
|
7810
8332
|
/**
|
|
7811
|
-
* @description This endpoint is used for voiding an invoice.
|
|
8333
|
+
* @description This endpoint is used for voiding an invoice. • When no body parameters are provided, the invoice can be voided only if it is in a `finalized` status and its payment status is NOT `succeeded`. • When `generate_credit_note` is provided (optionally with `refund_amount` and/or `credit_amount`), this validation is bypassed: the invoice is forcibly voided and a credit note is generated. If the specified refund/credit amounts do not cover the full invoice total, the remainder is issued on a second credit note that is created and immediately voided.
|
|
7812
8334
|
*
|
|
7813
8335
|
* @tags invoices
|
|
7814
8336
|
* @name VoidInvoice
|
|
@@ -7816,7 +8338,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
7816
8338
|
* @request POST:/invoices/{lago_id}/void
|
|
7817
8339
|
* @secure
|
|
7818
8340
|
*/
|
|
7819
|
-
voidInvoice: (lagoId: string, params?: RequestParams) => Promise<HttpResponse<Invoice, ApiErrorUnauthorized | ApiErrorNotFound>>;
|
|
8341
|
+
voidInvoice: (lagoId: string, data?: InvoiceVoidInput, params?: RequestParams) => Promise<HttpResponse<Invoice, ApiErrorUnauthorized | ApiErrorNotFound>>;
|
|
7820
8342
|
};
|
|
7821
8343
|
organizations: {
|
|
7822
8344
|
/**
|
|
@@ -7904,6 +8426,11 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
7904
8426
|
* @example "5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba"
|
|
7905
8427
|
*/
|
|
7906
8428
|
external_customer_id?: string;
|
|
8429
|
+
/**
|
|
8430
|
+
* Filter by payment status. Possible values are `pending`, `failed` or `succeeded`.
|
|
8431
|
+
* @example "pending"
|
|
8432
|
+
*/
|
|
8433
|
+
payment_status?: "pending" | "failed" | "succeeded";
|
|
7907
8434
|
}, params?: RequestParams) => Promise<HttpResponse<PaymentRequestsPaginated, ApiErrorUnauthorized>>;
|
|
7908
8435
|
};
|
|
7909
8436
|
payments: {
|
|
@@ -8113,6 +8640,26 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
8113
8640
|
* @example "pending"
|
|
8114
8641
|
*/
|
|
8115
8642
|
status?: string;
|
|
8643
|
+
/**
|
|
8644
|
+
* When a pay-in-advance subscription is terminated before the end of its billing period, we generate a credit note for the unused subscription time by default.
|
|
8645
|
+
* This field allows you to control the behavior of the credit note generation:
|
|
8646
|
+
*
|
|
8647
|
+
* - `credit`: A credit note is generated for the unused subscription time.
|
|
8648
|
+
* - `skip`: No credit note is generated for the unused subscription time.
|
|
8649
|
+
*
|
|
8650
|
+
* _Note: This field is only applicable to pay-in-advance plans and is ignored for pay-in-arrears plans._
|
|
8651
|
+
* @example "credit"
|
|
8652
|
+
*/
|
|
8653
|
+
on_termination_credit_note?: "credit" | "skip";
|
|
8654
|
+
/**
|
|
8655
|
+
* When a subscription is terminated before the end of its billing period, we generate an invoice for the unbilled usage.
|
|
8656
|
+
* This field allows you to control the behavior of the invoice generation:
|
|
8657
|
+
*
|
|
8658
|
+
* - `generate`: An invoice is generated for the unbilled usage.
|
|
8659
|
+
* - `skip`: No invoice is generated for the unbilled usage.
|
|
8660
|
+
* @example "generate"
|
|
8661
|
+
*/
|
|
8662
|
+
on_termination_invoice?: "generate" | "skip";
|
|
8116
8663
|
}, params?: RequestParams) => Promise<HttpResponse<Subscription, ApiErrorUnauthorized | ApiErrorNotFound | ApiErrorNotAllowed>>;
|
|
8117
8664
|
/**
|
|
8118
8665
|
* @description This endpoint enables the retrieval of the lifetime usage of a subscription.
|
|
@@ -8258,7 +8805,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
8258
8805
|
* @request POST:/wallets
|
|
8259
8806
|
* @secure
|
|
8260
8807
|
*/
|
|
8261
|
-
createWallet: (data: WalletCreateInput, params?: RequestParams) => Promise<HttpResponse<Wallet, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorBadRequest>>;
|
|
8808
|
+
createWallet: (data: WalletCreateInput, params?: RequestParams) => Promise<HttpResponse<Wallet, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorBadRequest | ApiErrorForbidden>>;
|
|
8262
8809
|
/**
|
|
8263
8810
|
* @description This endpoint is used to list all wallets with prepaid credits.
|
|
8264
8811
|
*
|
|
@@ -8284,7 +8831,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
8284
8831
|
* @example "5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba"
|
|
8285
8832
|
*/
|
|
8286
8833
|
external_customer_id: string;
|
|
8287
|
-
}, params?: RequestParams) => Promise<HttpResponse<WalletsPaginated, ApiErrorUnauthorized>>;
|
|
8834
|
+
}, params?: RequestParams) => Promise<HttpResponse<WalletsPaginated, ApiErrorUnauthorized | ApiErrorForbidden>>;
|
|
8288
8835
|
/**
|
|
8289
8836
|
* @description This endpoint is used to update an existing wallet with prepaid credits.
|
|
8290
8837
|
*
|
|
@@ -8294,7 +8841,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
8294
8841
|
* @request PUT:/wallets/{lago_id}
|
|
8295
8842
|
* @secure
|
|
8296
8843
|
*/
|
|
8297
|
-
updateWallet: (lagoId: string, data: WalletUpdateInput, params?: RequestParams) => Promise<HttpResponse<Wallet, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorBadRequest | ApiErrorNotFound>>;
|
|
8844
|
+
updateWallet: (lagoId: string, data: WalletUpdateInput, params?: RequestParams) => Promise<HttpResponse<Wallet, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorBadRequest | ApiErrorForbidden | ApiErrorNotFound>>;
|
|
8298
8845
|
/**
|
|
8299
8846
|
* @description This endpoint is used to retrieve an existing wallet with prepaid credits.
|
|
8300
8847
|
*
|
|
@@ -8304,7 +8851,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
8304
8851
|
* @request GET:/wallets/{lago_id}
|
|
8305
8852
|
* @secure
|
|
8306
8853
|
*/
|
|
8307
|
-
findWallet: (lagoId: string, params?: RequestParams) => Promise<HttpResponse<Wallet, ApiErrorUnauthorized | ApiErrorNotFound>>;
|
|
8854
|
+
findWallet: (lagoId: string, params?: RequestParams) => Promise<HttpResponse<Wallet, ApiErrorUnauthorized | ApiErrorForbidden | ApiErrorNotFound>>;
|
|
8308
8855
|
/**
|
|
8309
8856
|
* @description This endpoint is used to terminate an existing wallet with prepaid credits.
|
|
8310
8857
|
*
|
|
@@ -8314,7 +8861,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
8314
8861
|
* @request DELETE:/wallets/{lago_id}
|
|
8315
8862
|
* @secure
|
|
8316
8863
|
*/
|
|
8317
|
-
destroyWallet: (lagoId: string, params?: RequestParams) => Promise<HttpResponse<Wallet, ApiErrorUnauthorized |
|
|
8864
|
+
destroyWallet: (lagoId: string, params?: RequestParams) => Promise<HttpResponse<Wallet, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorForbidden | ApiErrorNotFound>>;
|
|
8318
8865
|
/**
|
|
8319
8866
|
* @description This endpoint is used to list all wallet transactions.
|
|
8320
8867
|
*
|
|
@@ -8350,7 +8897,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
8350
8897
|
* @example "inbound"
|
|
8351
8898
|
*/
|
|
8352
8899
|
transaction_type?: string;
|
|
8353
|
-
}, params?: RequestParams) => Promise<HttpResponse<WalletTransactionsPaginated, ApiErrorUnauthorized | ApiErrorNotFound>>;
|
|
8900
|
+
}, params?: RequestParams) => Promise<HttpResponse<WalletTransactionsPaginated, ApiErrorUnauthorized | ApiErrorForbidden | ApiErrorNotFound>>;
|
|
8354
8901
|
};
|
|
8355
8902
|
walletTransactions: {
|
|
8356
8903
|
/**
|
|
@@ -8362,7 +8909,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
8362
8909
|
* @request POST:/wallet_transactions
|
|
8363
8910
|
* @secure
|
|
8364
8911
|
*/
|
|
8365
|
-
createWalletTransaction: (data: WalletTransactionCreateInput, params?: RequestParams) => Promise<HttpResponse<WalletTransactions, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorBadRequest>>;
|
|
8912
|
+
createWalletTransaction: (data: WalletTransactionCreateInput, params?: RequestParams) => Promise<HttpResponse<WalletTransactions, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorBadRequest | ApiErrorForbidden>>;
|
|
8366
8913
|
/**
|
|
8367
8914
|
* @description This endpoint is used to retrieve a specific wallet transactions.
|
|
8368
8915
|
*
|
|
@@ -8372,7 +8919,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
8372
8919
|
* @request GET:/wallet_transactions/{lago_id}
|
|
8373
8920
|
* @secure
|
|
8374
8921
|
*/
|
|
8375
|
-
findWalletTransaction: (lagoId: string, params?: RequestParams) => Promise<HttpResponse<WalletTransactionObject, ApiErrorUnauthorized | ApiErrorNotFound>>;
|
|
8922
|
+
findWalletTransaction: (lagoId: string, params?: RequestParams) => Promise<HttpResponse<WalletTransactionObject, ApiErrorUnauthorized | ApiErrorForbidden | ApiErrorNotFound>>;
|
|
8376
8923
|
/**
|
|
8377
8924
|
* @description This endpoint generates a checkout link for a specific wallet transaction.
|
|
8378
8925
|
*
|
|
@@ -8382,7 +8929,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
8382
8929
|
* @request POST:/wallet_transactions/{lago_id}/payment_url
|
|
8383
8930
|
* @secure
|
|
8384
8931
|
*/
|
|
8385
|
-
walletTransactionPaymentUrl: (lagoId: string, params?: RequestParams) => Promise<HttpResponse<WalletTransactionPaymentUrl, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorNotFound>>;
|
|
8932
|
+
walletTransactionPaymentUrl: (lagoId: string, params?: RequestParams) => Promise<HttpResponse<WalletTransactionPaymentUrl, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorForbidden | ApiErrorNotFound>>;
|
|
8386
8933
|
};
|
|
8387
8934
|
webhooks: {
|
|
8388
8935
|
/**
|