lago-javascript-client 1.31.0 → 1.33.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 +1269 -266
- package/esm/openapi/client.js +356 -0
- package/package.json +1 -1
- package/script/openapi/client.d.ts +1269 -266
- package/script/openapi/client.js +356 -0
|
@@ -1,9 +1,9 @@
|
|
|
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" */
|
|
6
|
-
export type Timezone = "UTC" | "Africa/Algiers" | "Africa/Cairo" | "Africa/Casablanca" | "Africa/Harare" | "Africa/Johannesburg" | "Africa/Monrovia" | "Africa/Nairobi" | "America/Argentina/Buenos_Aires" | "America/Bogota" | "America/Caracas" | "America/Chicago" | "America/Chihuahua" | "America/Denver" | "America/
|
|
6
|
+
export type Timezone = "UTC" | "Africa/Algiers" | "Africa/Cairo" | "Africa/Casablanca" | "Africa/Harare" | "Africa/Johannesburg" | "Africa/Monrovia" | "Africa/Nairobi" | "America/Argentina/Buenos_Aires" | "America/Bogota" | "America/Caracas" | "America/Chicago" | "America/Chihuahua" | "America/Denver" | "America/Guatemala" | "America/Guyana" | "America/Halifax" | "America/Indiana/Indianapolis" | "America/Juneau" | "America/La_Paz" | "America/Lima" | "America/Los_Angeles" | "America/Mazatlan" | "America/Mexico_City" | "America/Monterrey" | "America/Montevideo" | "America/New_York" | "America/Nuuk" | "America/Phoenix" | "America/Puerto_Rico" | "America/Regina" | "America/Santiago" | "America/Sao_Paulo" | "America/St_Johns" | "America/Tijuana" | "Asia/Almaty" | "Asia/Baghdad" | "Asia/Baku" | "Asia/Bangkok" | "Asia/Chongqing" | "Asia/Colombo" | "Asia/Dhaka" | "Asia/Hong_Kong" | "Asia/Irkutsk" | "Asia/Jakarta" | "Asia/Jerusalem" | "Asia/Kabul" | "Asia/Kamchatka" | "Asia/Karachi" | "Asia/Kathmandu" | "Asia/Kolkata" | "Asia/Krasnoyarsk" | "Asia/Kuala_Lumpur" | "Asia/Kuwait" | "Asia/Magadan" | "Asia/Muscat" | "Asia/Novosibirsk" | "Asia/Riyadh" | "Asia/Seoul" | "Asia/Shanghai" | "Asia/Singapore" | "Asia/Srednekolymsk" | "Asia/Taipei" | "Asia/Tashkent" | "Asia/Tbilisi" | "Asia/Tehran" | "Asia/Tokyo" | "Asia/Ulaanbaatar" | "Asia/Urumqi" | "Asia/Vladivostok" | "Asia/Yakutsk" | "Asia/Yangon" | "Asia/Yekaterinburg" | "Asia/Yerevan" | "Atlantic/Azores" | "Atlantic/Cape_Verde" | "Atlantic/South_Georgia" | "Australia/Adelaide" | "Australia/Brisbane" | "Australia/Darwin" | "Australia/Hobart" | "Australia/Melbourne" | "Australia/Perth" | "Australia/Sydney" | "Europe/Amsterdam" | "Europe/Athens" | "Europe/Belgrade" | "Europe/Berlin" | "Europe/Bratislava" | "Europe/Brussels" | "Europe/Bucharest" | "Europe/Budapest" | "Europe/Copenhagen" | "Europe/Dublin" | "Europe/Helsinki" | "Europe/Istanbul" | "Europe/Kaliningrad" | "Europe/Kyiv" | "Europe/Lisbon" | "Europe/Ljubljana" | "Europe/London" | "Europe/Madrid" | "Europe/Minsk" | "Europe/Moscow" | "Europe/Paris" | "Europe/Prague" | "Europe/Riga" | "Europe/Rome" | "Europe/Samara" | "Europe/Sarajevo" | "Europe/Skopje" | "Europe/Sofia" | "Europe/Stockholm" | "Europe/Tallinn" | "Europe/Vienna" | "Europe/Vilnius" | "Europe/Volgograd" | "Europe/Warsaw" | "Europe/Zagreb" | "Europe/Zurich" | "GMT+12" | "Pacific/Apia" | "Pacific/Auckland" | "Pacific/Chatham" | "Pacific/Fakaofo" | "Pacific/Fiji" | "Pacific/Guadalcanal" | "Pacific/Guam" | "Pacific/Honolulu" | "Pacific/Majuro" | "Pacific/Midway" | "Pacific/Noumea" | "Pacific/Pago_Pago" | "Pacific/Port_Moresby" | "Pacific/Tongatapu";
|
|
7
7
|
/** Billing entity object */
|
|
8
8
|
export interface BillingEntityObject {
|
|
9
9
|
/**
|
|
@@ -331,10 +331,10 @@ export interface TaxObject {
|
|
|
331
331
|
*/
|
|
332
332
|
code: string;
|
|
333
333
|
/**
|
|
334
|
-
* Internal description of the
|
|
334
|
+
* Internal description of the tax
|
|
335
335
|
* @example "French standard VAT"
|
|
336
336
|
*/
|
|
337
|
-
description?: string;
|
|
337
|
+
description?: string | null;
|
|
338
338
|
/**
|
|
339
339
|
* The percentage rate of the tax
|
|
340
340
|
* @example 20
|
|
@@ -419,6 +419,11 @@ export interface ApiErrorNotFound {
|
|
|
419
419
|
/** @example "object_not_found" */
|
|
420
420
|
code: string;
|
|
421
421
|
}
|
|
422
|
+
/**
|
|
423
|
+
* List of unique code used to identify the taxes.
|
|
424
|
+
* @example ["french_standard_vat"]
|
|
425
|
+
*/
|
|
426
|
+
export type TaxCodes = string[];
|
|
422
427
|
/** Billing entity update input */
|
|
423
428
|
export interface BillingEntityUpdateInput {
|
|
424
429
|
/**
|
|
@@ -522,11 +527,8 @@ export interface BillingEntityUpdateInput {
|
|
|
522
527
|
* @example "UTC"
|
|
523
528
|
*/
|
|
524
529
|
timezone?: Timezone;
|
|
525
|
-
/**
|
|
526
|
-
|
|
527
|
-
* @example ["french_standard_vat"]
|
|
528
|
-
*/
|
|
529
|
-
tax_codes?: string[];
|
|
530
|
+
/** The tax codes that should be associated with this billing entity */
|
|
531
|
+
tax_codes?: TaxCodes;
|
|
530
532
|
/** The email notification settings for this billing entity */
|
|
531
533
|
email_settings?: ("invoice.finalized" | "credit_note.created")[];
|
|
532
534
|
/**
|
|
@@ -535,7 +537,7 @@ export interface BillingEntityUpdateInput {
|
|
|
535
537
|
*/
|
|
536
538
|
eu_tax_management?: boolean;
|
|
537
539
|
/**
|
|
538
|
-
* The base64 encoded logo image for the billing entity
|
|
540
|
+
* The base64 encoded logo image for the billing entity. Sending "null" will remove the logo, if any exist.
|
|
539
541
|
* @format uri
|
|
540
542
|
* @example "data:image/png;base64,..."
|
|
541
543
|
*/
|
|
@@ -670,7 +672,7 @@ export interface AddOnObject {
|
|
|
670
672
|
* 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
673
|
* @example "Setup Fee (SF1)"
|
|
672
674
|
*/
|
|
673
|
-
invoice_display_name
|
|
675
|
+
invoice_display_name: string | null;
|
|
674
676
|
/**
|
|
675
677
|
* Unique code used to identify the add-on.
|
|
676
678
|
* @example "setup_fee"
|
|
@@ -690,7 +692,7 @@ export interface AddOnObject {
|
|
|
690
692
|
* The description of the add-on.
|
|
691
693
|
* @example "Implementation fee for new customers."
|
|
692
694
|
*/
|
|
693
|
-
description
|
|
695
|
+
description: string | null;
|
|
694
696
|
/**
|
|
695
697
|
* 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
698
|
* @format date-time
|
|
@@ -714,7 +716,7 @@ export interface AddOnBaseInput {
|
|
|
714
716
|
* 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
717
|
* @example "Setup Fee (SF1)"
|
|
716
718
|
*/
|
|
717
|
-
invoice_display_name?: string;
|
|
719
|
+
invoice_display_name?: string | null;
|
|
718
720
|
/**
|
|
719
721
|
* Unique code used to identify the add-on.
|
|
720
722
|
* @example "setup_fee"
|
|
@@ -735,11 +737,8 @@ export interface AddOnBaseInput {
|
|
|
735
737
|
* @example "Implementation fee for new customers."
|
|
736
738
|
*/
|
|
737
739
|
description?: string | null;
|
|
738
|
-
/**
|
|
739
|
-
|
|
740
|
-
* @example ["french_standard_vat"]
|
|
741
|
-
*/
|
|
742
|
-
tax_codes?: string[];
|
|
740
|
+
/** List of unique code used to identify the taxes. */
|
|
741
|
+
tax_codes?: TaxCodes;
|
|
743
742
|
}
|
|
744
743
|
export interface AddOnCreateInput {
|
|
745
744
|
add_on: AddOnBaseInput;
|
|
@@ -907,12 +906,12 @@ export interface MrrObject {
|
|
|
907
906
|
* The total amount of MRR, expressed in cents.
|
|
908
907
|
* @example 50000
|
|
909
908
|
*/
|
|
910
|
-
amount_cents
|
|
909
|
+
amount_cents: number;
|
|
911
910
|
/**
|
|
912
911
|
* The currency of MRR analytics. Format must be ISO 4217.
|
|
913
912
|
* @example "USD"
|
|
914
913
|
*/
|
|
915
|
-
currency
|
|
914
|
+
currency: Currency;
|
|
916
915
|
}
|
|
917
916
|
export interface Mrrs {
|
|
918
917
|
mrrs: MrrObject[];
|
|
@@ -942,6 +941,55 @@ export interface OverdueBalanceObject {
|
|
|
942
941
|
export interface OverdueBalances {
|
|
943
942
|
overdue_balances: OverdueBalanceObject[];
|
|
944
943
|
}
|
|
944
|
+
export interface UsageObject {
|
|
945
|
+
/**
|
|
946
|
+
* The unique identifier of the organization for which the usage analytics is calculated.
|
|
947
|
+
* @format uuid
|
|
948
|
+
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
949
|
+
*/
|
|
950
|
+
organization_id: string;
|
|
951
|
+
/**
|
|
952
|
+
* The start date of the period for which the usage analytics is calculated.
|
|
953
|
+
* @format date
|
|
954
|
+
* @example "2023-11-01"
|
|
955
|
+
*/
|
|
956
|
+
start_of_period_dt?: string;
|
|
957
|
+
/**
|
|
958
|
+
* The end date of the period for which the usage analytics is calculated.
|
|
959
|
+
* @format date
|
|
960
|
+
* @example "2023-11-30"
|
|
961
|
+
*/
|
|
962
|
+
end_of_period_dt?: string;
|
|
963
|
+
/**
|
|
964
|
+
* The currency of usage analytics. Format must be ISO 4217.
|
|
965
|
+
* @example "USD"
|
|
966
|
+
*/
|
|
967
|
+
amount_currency: Currency;
|
|
968
|
+
/**
|
|
969
|
+
* The total amount for usages for a period, expressed in cents.
|
|
970
|
+
* @example 50000
|
|
971
|
+
*/
|
|
972
|
+
amount_cents: number;
|
|
973
|
+
/**
|
|
974
|
+
* The code of the usage-based billable metrics.
|
|
975
|
+
* @example "code1"
|
|
976
|
+
*/
|
|
977
|
+
billable_metric_code?: string;
|
|
978
|
+
/**
|
|
979
|
+
* The total number of units for the usage-based billable metrics.
|
|
980
|
+
* @pattern ^[0-9]+.?[0-9]*$
|
|
981
|
+
* @example "1.0"
|
|
982
|
+
*/
|
|
983
|
+
units?: string;
|
|
984
|
+
/**
|
|
985
|
+
* Indicates whether the billable metric associated with the usage is deleted.
|
|
986
|
+
* @example false
|
|
987
|
+
*/
|
|
988
|
+
is_billable_metric_deleted?: boolean;
|
|
989
|
+
}
|
|
990
|
+
export interface Usages {
|
|
991
|
+
usages: UsageObject[];
|
|
992
|
+
}
|
|
945
993
|
/** @example "USD" */
|
|
946
994
|
export type CurrencyOrNull = "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";
|
|
947
995
|
export interface AppliedCouponObject {
|
|
@@ -1349,6 +1397,150 @@ export interface BillableMetricEvaluateExpressionResult {
|
|
|
1349
1397
|
export interface BillableMetricUpdateInput {
|
|
1350
1398
|
billable_metric: BillableMetricBaseInput;
|
|
1351
1399
|
}
|
|
1400
|
+
export interface FeaturePrivilegeObject {
|
|
1401
|
+
/**
|
|
1402
|
+
* Unique code for the privilege.
|
|
1403
|
+
* @example "max"
|
|
1404
|
+
*/
|
|
1405
|
+
code: string;
|
|
1406
|
+
/**
|
|
1407
|
+
* Display name for the privilege.
|
|
1408
|
+
* @example "Maximum"
|
|
1409
|
+
*/
|
|
1410
|
+
name?: string | null;
|
|
1411
|
+
/**
|
|
1412
|
+
* Data type of the privilege value. Default: string
|
|
1413
|
+
* @example "integer"
|
|
1414
|
+
*/
|
|
1415
|
+
value_type?: "integer" | "boolean" | "string" | "select";
|
|
1416
|
+
config?: {
|
|
1417
|
+
/**
|
|
1418
|
+
* Array of string, required only when value_type is `select`.
|
|
1419
|
+
* @example ["google","okta"]
|
|
1420
|
+
*/
|
|
1421
|
+
select_options?: string[];
|
|
1422
|
+
};
|
|
1423
|
+
}
|
|
1424
|
+
export interface FeatureObject {
|
|
1425
|
+
/**
|
|
1426
|
+
* Unique code used to identify the feature. Max 255 characters.
|
|
1427
|
+
* @example "seats"
|
|
1428
|
+
*/
|
|
1429
|
+
code: string;
|
|
1430
|
+
/**
|
|
1431
|
+
* Name of the feature. Max 255 characters.
|
|
1432
|
+
* @example "Number of seats"
|
|
1433
|
+
*/
|
|
1434
|
+
name?: string | null;
|
|
1435
|
+
/**
|
|
1436
|
+
* Description of the feature. Max 600 characters.
|
|
1437
|
+
* @example "Number of users of the account"
|
|
1438
|
+
*/
|
|
1439
|
+
description?: string | null;
|
|
1440
|
+
/**
|
|
1441
|
+
* Privileges associated with this feature. Can be empty.
|
|
1442
|
+
* @example [{"code":"max","name":"Maximum","value_type":"integer"},{"code":"max_admins","name":"Max Admins","value_type":"integer"},{"code":"root","name":"Allow root user","value_type":"boolean"},{"code":"provider","name":"SSO Provider","value_type":"select","config":{"select_options":["google","okta"]}}]
|
|
1443
|
+
*/
|
|
1444
|
+
privileges?: FeaturePrivilegeObject[];
|
|
1445
|
+
/**
|
|
1446
|
+
* Creation date of the feature.
|
|
1447
|
+
* @format date-time
|
|
1448
|
+
* @example "2025-07-17T12:34:35Z"
|
|
1449
|
+
*/
|
|
1450
|
+
created_at: string;
|
|
1451
|
+
}
|
|
1452
|
+
export interface FeaturesPaginated {
|
|
1453
|
+
features: FeatureObject[];
|
|
1454
|
+
meta: PaginationMeta;
|
|
1455
|
+
}
|
|
1456
|
+
export interface FeatureCreateInput {
|
|
1457
|
+
/**
|
|
1458
|
+
* Unique code used to identify the feature.
|
|
1459
|
+
* @example "seats"
|
|
1460
|
+
*/
|
|
1461
|
+
code: string;
|
|
1462
|
+
/**
|
|
1463
|
+
* Name of the feature.
|
|
1464
|
+
* @example "Number of seats"
|
|
1465
|
+
*/
|
|
1466
|
+
name?: string | null;
|
|
1467
|
+
/**
|
|
1468
|
+
* Internal description of the feature.
|
|
1469
|
+
* @example "Number of users of the account"
|
|
1470
|
+
*/
|
|
1471
|
+
description?: string | null;
|
|
1472
|
+
/**
|
|
1473
|
+
* Privileges associated with this feature. Can be empty.
|
|
1474
|
+
* @example [{"code":"max","name":"Maximum","value_type":"integer"},{"code":"max_admins","name":"Max Admins","value_type":"integer"},{"code":"root","name":"Allow root user","value_type":"boolean"},{"code":"provider","name":"SSO Provider","value_type":"select","config":{"select_options":["google","okta"]}}]
|
|
1475
|
+
*/
|
|
1476
|
+
privileges?: {
|
|
1477
|
+
/**
|
|
1478
|
+
* Unique code for the privilege.
|
|
1479
|
+
* @example "max"
|
|
1480
|
+
*/
|
|
1481
|
+
code: string;
|
|
1482
|
+
/**
|
|
1483
|
+
* Display name for the privilege.
|
|
1484
|
+
* @example "Maximum"
|
|
1485
|
+
*/
|
|
1486
|
+
name?: string | null;
|
|
1487
|
+
/**
|
|
1488
|
+
* Data type of the privilege value. Default: string
|
|
1489
|
+
* @example "integer"
|
|
1490
|
+
*/
|
|
1491
|
+
value_type?: "integer" | "boolean" | "string" | "select";
|
|
1492
|
+
config?: {
|
|
1493
|
+
/**
|
|
1494
|
+
* Array of string, required only when value_type is `select`.
|
|
1495
|
+
* @example ["google","okta"]
|
|
1496
|
+
*/
|
|
1497
|
+
select_options?: string[];
|
|
1498
|
+
};
|
|
1499
|
+
}[];
|
|
1500
|
+
}
|
|
1501
|
+
export interface Feature {
|
|
1502
|
+
feature: FeatureObject;
|
|
1503
|
+
}
|
|
1504
|
+
export interface FeatureUpdateInput {
|
|
1505
|
+
/**
|
|
1506
|
+
* Name of the feature.
|
|
1507
|
+
* @example "Number of seats"
|
|
1508
|
+
*/
|
|
1509
|
+
name?: string | null;
|
|
1510
|
+
/**
|
|
1511
|
+
* Description of the feature.
|
|
1512
|
+
* @example "Number of users of the account"
|
|
1513
|
+
*/
|
|
1514
|
+
description?: string | null;
|
|
1515
|
+
/**
|
|
1516
|
+
* Existing privilege names can be updated or new privilege created.
|
|
1517
|
+
* @example [{"code":"max","name":"Maximum"},{"code":"new_extra","name":"Extra","value_type":"string"},{"code":"providers","value_type":"select","config":{"select_options":["ms"]}}]
|
|
1518
|
+
*/
|
|
1519
|
+
privileges?: {
|
|
1520
|
+
/**
|
|
1521
|
+
* Code of the privilege to update or create.
|
|
1522
|
+
* @example "max"
|
|
1523
|
+
*/
|
|
1524
|
+
code?: string;
|
|
1525
|
+
/**
|
|
1526
|
+
* Display name for the privilege.
|
|
1527
|
+
* @example "Maximum"
|
|
1528
|
+
*/
|
|
1529
|
+
name?: string;
|
|
1530
|
+
/**
|
|
1531
|
+
* Data type of the privilege value. Value_type cannot be modified for existing privilege but can be set for new privileges.
|
|
1532
|
+
* @example "integer"
|
|
1533
|
+
*/
|
|
1534
|
+
value_type?: "integer" | "boolean" | "string" | "select";
|
|
1535
|
+
config?: {
|
|
1536
|
+
/**
|
|
1537
|
+
* Array of new string to add to existing options. Options cannot be deleted. Only used only when value_type is `select`.
|
|
1538
|
+
* @example ["ms"]
|
|
1539
|
+
*/
|
|
1540
|
+
select_options?: string[];
|
|
1541
|
+
};
|
|
1542
|
+
}[];
|
|
1543
|
+
}
|
|
1352
1544
|
export interface CouponObject {
|
|
1353
1545
|
/**
|
|
1354
1546
|
* Unique identifier of the coupon, created by Lago.
|
|
@@ -1562,6 +1754,11 @@ export interface CouponUpdateInput {
|
|
|
1562
1754
|
coupon: CouponBaseInput;
|
|
1563
1755
|
}
|
|
1564
1756
|
export interface FeeAmountDetails {
|
|
1757
|
+
/**
|
|
1758
|
+
* 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.
|
|
1759
|
+
* @example 10000
|
|
1760
|
+
*/
|
|
1761
|
+
plan_amount_cents?: number;
|
|
1565
1762
|
/** Graduated ranges, used for a `graduated` charge model. */
|
|
1566
1763
|
graduated_ranges?: {
|
|
1567
1764
|
/**
|
|
@@ -1668,6 +1865,12 @@ export interface FeeAmountDetails {
|
|
|
1668
1865
|
* @example "0.5"
|
|
1669
1866
|
*/
|
|
1670
1867
|
per_package_unit_amount?: string;
|
|
1868
|
+
/**
|
|
1869
|
+
* Total amount of received units to be charged for the Volume or Percentage charge model.
|
|
1870
|
+
* @pattern ^[0-9]+.?[0-9]*$
|
|
1871
|
+
* @example "10.0"
|
|
1872
|
+
*/
|
|
1873
|
+
per_unit_total_amount?: string;
|
|
1671
1874
|
/**
|
|
1672
1875
|
* The total units received in Lago for the Percentage charge model.
|
|
1673
1876
|
* @pattern ^[0-9]+.?[0-9]*$
|
|
@@ -1685,11 +1888,6 @@ export interface FeeAmountDetails {
|
|
|
1685
1888
|
* @example "1.0"
|
|
1686
1889
|
*/
|
|
1687
1890
|
rate?: string;
|
|
1688
|
-
/**
|
|
1689
|
-
* Total amount of received units to be charged for the Percentage charge model.
|
|
1690
|
-
* @example "10.0"
|
|
1691
|
-
*/
|
|
1692
|
-
per_unit_total_amount?: string;
|
|
1693
1891
|
/**
|
|
1694
1892
|
* Total number of paid events for the Percentage charge model.
|
|
1695
1893
|
* @example 20
|
|
@@ -1710,27 +1908,18 @@ export interface FeeAmountDetails {
|
|
|
1710
1908
|
* @example "20.0"
|
|
1711
1909
|
*/
|
|
1712
1910
|
min_max_adjustment_total_amount?: string;
|
|
1713
|
-
/**
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
*/
|
|
1726
|
-
flat_unit_amount: string;
|
|
1727
|
-
/**
|
|
1728
|
-
* Total amount of received units to be charged.
|
|
1729
|
-
* @pattern ^[0-9]+.?[0-9]*$
|
|
1730
|
-
* @example "10.0"
|
|
1731
|
-
*/
|
|
1732
|
-
per_unit_total_amount: string;
|
|
1733
|
-
}[];
|
|
1911
|
+
/**
|
|
1912
|
+
* The flat amount for a whole tier, excluding tax, for a `volume` charge model.
|
|
1913
|
+
* @pattern ^[0-9]+.?[0-9]*$
|
|
1914
|
+
* @example "0.5"
|
|
1915
|
+
*/
|
|
1916
|
+
per_unit_amount?: string;
|
|
1917
|
+
/**
|
|
1918
|
+
* The unit price, excluding tax, for a specific tier of a `volume` charge model.
|
|
1919
|
+
* @pattern ^[0-9]+.?[0-9]*$
|
|
1920
|
+
* @example "10.0"
|
|
1921
|
+
*/
|
|
1922
|
+
flat_unit_amount?: string;
|
|
1734
1923
|
}
|
|
1735
1924
|
export interface BaseAppliedTax {
|
|
1736
1925
|
/**
|
|
@@ -1738,49 +1927,49 @@ export interface BaseAppliedTax {
|
|
|
1738
1927
|
* @format uuid
|
|
1739
1928
|
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
1740
1929
|
*/
|
|
1741
|
-
lago_id
|
|
1930
|
+
lago_id: string;
|
|
1742
1931
|
/**
|
|
1743
1932
|
* Unique identifier of the tax, created by Lago.
|
|
1744
1933
|
* @format uuid
|
|
1745
1934
|
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
1746
1935
|
*/
|
|
1747
|
-
lago_tax_id
|
|
1936
|
+
lago_tax_id: string | null;
|
|
1748
1937
|
/**
|
|
1749
1938
|
* Name of the tax.
|
|
1750
1939
|
* @example "TVA"
|
|
1751
1940
|
*/
|
|
1752
|
-
tax_name
|
|
1941
|
+
tax_name: string;
|
|
1753
1942
|
/**
|
|
1754
1943
|
* Unique code used to identify the tax associated with the API request.
|
|
1755
1944
|
* @example "french_standard_vat"
|
|
1756
1945
|
*/
|
|
1757
|
-
tax_code
|
|
1946
|
+
tax_code: string;
|
|
1758
1947
|
/**
|
|
1759
1948
|
* The percentage rate of the tax
|
|
1760
1949
|
* @example 20
|
|
1761
1950
|
*/
|
|
1762
|
-
tax_rate
|
|
1951
|
+
tax_rate: number;
|
|
1763
1952
|
/**
|
|
1764
|
-
* Internal description of the
|
|
1953
|
+
* Internal description of the tax
|
|
1765
1954
|
* @example "French standard VAT"
|
|
1766
1955
|
*/
|
|
1767
|
-
tax_description
|
|
1956
|
+
tax_description: string | null;
|
|
1768
1957
|
/**
|
|
1769
1958
|
* Amount of the tax
|
|
1770
1959
|
* @example 2000
|
|
1771
1960
|
*/
|
|
1772
|
-
amount_cents
|
|
1961
|
+
amount_cents: number;
|
|
1773
1962
|
/**
|
|
1774
1963
|
* Currency of the tax
|
|
1775
1964
|
* @example "USD"
|
|
1776
1965
|
*/
|
|
1777
|
-
amount_currency
|
|
1966
|
+
amount_currency: Currency;
|
|
1778
1967
|
/**
|
|
1779
1968
|
* The date and time when the applied tax was created. It is expressed in UTC format according to the ISO 8601 datetime standard. This field provides the timestamp for the exact moment when the applied tax was initially created.
|
|
1780
1969
|
* @format date-time
|
|
1781
1970
|
* @example "2022-09-14T16:35:31Z"
|
|
1782
1971
|
*/
|
|
1783
|
-
created_at
|
|
1972
|
+
created_at: string;
|
|
1784
1973
|
}
|
|
1785
1974
|
export type FeeAppliedTaxObject = BaseAppliedTax & {
|
|
1786
1975
|
/**
|
|
@@ -1790,6 +1979,49 @@ export type FeeAppliedTaxObject = BaseAppliedTax & {
|
|
|
1790
1979
|
*/
|
|
1791
1980
|
lago_fee_id?: string;
|
|
1792
1981
|
};
|
|
1982
|
+
export interface PricingUnitDetailsObject {
|
|
1983
|
+
/**
|
|
1984
|
+
* Unique identifier of the pricing unit, created by Lago.
|
|
1985
|
+
* @format uuid
|
|
1986
|
+
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
1987
|
+
*/
|
|
1988
|
+
lago_pricing_unit_id: string;
|
|
1989
|
+
/**
|
|
1990
|
+
* The code of the pricing unit.
|
|
1991
|
+
* @example "credits"
|
|
1992
|
+
*/
|
|
1993
|
+
pricing_unit_code: string;
|
|
1994
|
+
/**
|
|
1995
|
+
* The short name of the pricing unit. Will be used as currency name in the UI and PDFs.
|
|
1996
|
+
* @example "CR"
|
|
1997
|
+
*/
|
|
1998
|
+
short_name: string;
|
|
1999
|
+
/**
|
|
2000
|
+
* The amount in cents in the pricing unit.
|
|
2001
|
+
* @example 200
|
|
2002
|
+
*/
|
|
2003
|
+
amount_cents: number;
|
|
2004
|
+
/**
|
|
2005
|
+
* The precise amount in cents in the pricing unit.
|
|
2006
|
+
* @example "200.0"
|
|
2007
|
+
*/
|
|
2008
|
+
precise_amount_cents: string;
|
|
2009
|
+
/**
|
|
2010
|
+
* The unit amount in cents in the pricing unit.
|
|
2011
|
+
* @example 100
|
|
2012
|
+
*/
|
|
2013
|
+
unit_amount_cents: number;
|
|
2014
|
+
/**
|
|
2015
|
+
* The precise unit amount in the pricing unit.
|
|
2016
|
+
* @example "100.0"
|
|
2017
|
+
*/
|
|
2018
|
+
precise_unit_amount: string;
|
|
2019
|
+
/**
|
|
2020
|
+
* The conversion rate from pricing units to the plan's currency.
|
|
2021
|
+
* @example "0.5"
|
|
2022
|
+
*/
|
|
2023
|
+
conversion_rate: string;
|
|
2024
|
+
}
|
|
1793
2025
|
export interface FeeObject {
|
|
1794
2026
|
/**
|
|
1795
2027
|
* 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.
|
|
@@ -1849,11 +2081,6 @@ export interface FeeObject {
|
|
|
1849
2081
|
* @example "external_id"
|
|
1850
2082
|
*/
|
|
1851
2083
|
external_subscription_id?: string | null;
|
|
1852
|
-
/**
|
|
1853
|
-
* 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.
|
|
1854
|
-
* @example "Setup Fee (SF1)"
|
|
1855
|
-
*/
|
|
1856
|
-
invoice_display_name?: string;
|
|
1857
2084
|
/**
|
|
1858
2085
|
* The cost of this specific fee, excluding any applicable taxes.
|
|
1859
2086
|
* @example 100
|
|
@@ -1913,7 +2140,7 @@ export interface FeeObject {
|
|
|
1913
2140
|
* 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.
|
|
1914
2141
|
* @example 23
|
|
1915
2142
|
*/
|
|
1916
|
-
events_count?: number;
|
|
2143
|
+
events_count?: number | null;
|
|
1917
2144
|
/**
|
|
1918
2145
|
* 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).
|
|
1919
2146
|
* @example true
|
|
@@ -1970,6 +2197,16 @@ export interface FeeObject {
|
|
|
1970
2197
|
* @example "transaction_1234567890"
|
|
1971
2198
|
*/
|
|
1972
2199
|
event_transaction_id?: string | null;
|
|
2200
|
+
/**
|
|
2201
|
+
* The description of the fee.
|
|
2202
|
+
* @example "Fee description"
|
|
2203
|
+
*/
|
|
2204
|
+
description?: string | null;
|
|
2205
|
+
/**
|
|
2206
|
+
* The coupon amount applied to the fee, with precision.
|
|
2207
|
+
* @example "0.0"
|
|
2208
|
+
*/
|
|
2209
|
+
precise_coupons_amount_cents?: string;
|
|
1973
2210
|
/** List of all unit amount details for calculating the fee. */
|
|
1974
2211
|
amount_details?: FeeAmountDetails;
|
|
1975
2212
|
/**
|
|
@@ -1983,7 +2220,7 @@ export interface FeeObject {
|
|
|
1983
2220
|
* The fee type. Possible values are `add-on`, `charge`, `credit`, `subscription` or `commitment`.
|
|
1984
2221
|
* @example "subscription"
|
|
1985
2222
|
*/
|
|
1986
|
-
type: "charge" | "add_on" | "subscription" | "credit";
|
|
2223
|
+
type: "charge" | "add_on" | "subscription" | "credit" | "commitment";
|
|
1987
2224
|
/**
|
|
1988
2225
|
* The code of the fee item. It can be the code of the `add-on`, the code of the `charge`, the code of the `credit` or the code of the `subscription`.
|
|
1989
2226
|
* @example "startup"
|
|
@@ -1994,6 +2231,11 @@ export interface FeeObject {
|
|
|
1994
2231
|
* @example "Startup"
|
|
1995
2232
|
*/
|
|
1996
2233
|
name: string;
|
|
2234
|
+
/**
|
|
2235
|
+
* The description of the fee item. It can be the description of the `add-on`, the `charge`, the `credit`, the `subscription` or the `commitment`.
|
|
2236
|
+
* @example "Startup"
|
|
2237
|
+
*/
|
|
2238
|
+
description?: string | null;
|
|
1997
2239
|
/**
|
|
1998
2240
|
* 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.
|
|
1999
2241
|
* @example "Setup Fee (SF1)"
|
|
@@ -2003,9 +2245,9 @@ export interface FeeObject {
|
|
|
2003
2245
|
* 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.
|
|
2004
2246
|
* @example "AWS eu-east-1"
|
|
2005
2247
|
*/
|
|
2006
|
-
filter_invoice_display_name?: string;
|
|
2248
|
+
filter_invoice_display_name?: string | null;
|
|
2007
2249
|
/** Key value list of event properties */
|
|
2008
|
-
filters?:
|
|
2250
|
+
filters?: object | null;
|
|
2009
2251
|
/**
|
|
2010
2252
|
* Unique identifier of the fee item, created by Lago. It can be the identifier of the `add-on`, the `charge`, the `credit`, the `subscription` or the `commitment`.
|
|
2011
2253
|
* @format uuid
|
|
@@ -2022,6 +2264,8 @@ export interface FeeObject {
|
|
|
2022
2264
|
};
|
|
2023
2265
|
/** List of fee applied taxes */
|
|
2024
2266
|
applied_taxes?: FeeAppliedTaxObject[];
|
|
2267
|
+
/** Details about the pricing unit used and amounts for this fee. */
|
|
2268
|
+
pricing_unit_details?: object | null;
|
|
2025
2269
|
}
|
|
2026
2270
|
export interface CreditNoteItemObject {
|
|
2027
2271
|
/**
|
|
@@ -2053,6 +2297,21 @@ export type CreditNoteAppliedTaxObject = BaseAppliedTax & {
|
|
|
2053
2297
|
/** @example 100 */
|
|
2054
2298
|
base_amount_cents?: number;
|
|
2055
2299
|
};
|
|
2300
|
+
export interface CreditNoteErrorDetailsObject {
|
|
2301
|
+
/**
|
|
2302
|
+
* The credit note error details unique identifier, created by Lago.
|
|
2303
|
+
* @format uuid
|
|
2304
|
+
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
2305
|
+
*/
|
|
2306
|
+
lago_id: string;
|
|
2307
|
+
/**
|
|
2308
|
+
* The type of the error.
|
|
2309
|
+
* @example "tax_error"
|
|
2310
|
+
*/
|
|
2311
|
+
error_code: "not_provided" | "tax_error" | "tax_voiding_error" | "invoice_generation_error";
|
|
2312
|
+
/** The details of the error. */
|
|
2313
|
+
details: object;
|
|
2314
|
+
}
|
|
2056
2315
|
export interface CreditNoteObject {
|
|
2057
2316
|
/**
|
|
2058
2317
|
* The credit note unique identifier, created by Lago.
|
|
@@ -2191,6 +2450,7 @@ export interface CreditNoteObject {
|
|
|
2191
2450
|
* @example false
|
|
2192
2451
|
*/
|
|
2193
2452
|
self_billed?: boolean;
|
|
2453
|
+
error_details?: any[] | null;
|
|
2194
2454
|
}
|
|
2195
2455
|
export interface CreditNotesPaginated {
|
|
2196
2456
|
credit_notes: CreditNoteObject[];
|
|
@@ -2310,6 +2570,11 @@ export interface CreditNoteEstimated {
|
|
|
2310
2570
|
* @example 20
|
|
2311
2571
|
*/
|
|
2312
2572
|
taxes_amount_cents: number;
|
|
2573
|
+
/**
|
|
2574
|
+
* The precise tax amount of the credit note, expressed in cents with decimal precision.
|
|
2575
|
+
* @example 20.1
|
|
2576
|
+
*/
|
|
2577
|
+
precise_taxes_amount_cents: number;
|
|
2313
2578
|
/**
|
|
2314
2579
|
* The tax rate associated with this specific credit note.
|
|
2315
2580
|
* @example 20
|
|
@@ -2335,6 +2600,11 @@ export interface CreditNoteEstimated {
|
|
|
2335
2600
|
* @example 20
|
|
2336
2601
|
*/
|
|
2337
2602
|
coupons_adjustment_amount_cents: number;
|
|
2603
|
+
/**
|
|
2604
|
+
* The precise pro-rated amount with decimal precision of the coupons applied to the source invoice.
|
|
2605
|
+
* @example 20.1
|
|
2606
|
+
*/
|
|
2607
|
+
precise_coupons_adjustment_amount_cents: number;
|
|
2338
2608
|
/** Array of credit note's items. */
|
|
2339
2609
|
items: {
|
|
2340
2610
|
/**
|
|
@@ -2686,33 +2956,43 @@ export interface IntegrationCustomer {
|
|
|
2686
2956
|
* @format uuid
|
|
2687
2957
|
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
2688
2958
|
*/
|
|
2689
|
-
lago_id
|
|
2959
|
+
lago_id: string;
|
|
2690
2960
|
/**
|
|
2691
2961
|
* The integration type used for accounting and tax syncs.
|
|
2692
2962
|
* Accepted values: `netsuite, anrok`.
|
|
2693
2963
|
* @example "netsuite"
|
|
2694
2964
|
*/
|
|
2695
|
-
type
|
|
2965
|
+
type: "netsuite" | "anrok" | "xero" | "hubspot" | "salesforce";
|
|
2696
2966
|
/**
|
|
2697
2967
|
* Unique code used to identify an integration connection.
|
|
2698
2968
|
* @example "netsuite-eu-1"
|
|
2699
2969
|
*/
|
|
2700
|
-
integration_code
|
|
2970
|
+
integration_code: string;
|
|
2701
2971
|
/**
|
|
2702
2972
|
* 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.
|
|
2703
2973
|
* @example "cus_12345"
|
|
2704
2974
|
*/
|
|
2705
|
-
external_customer_id
|
|
2975
|
+
external_customer_id: string;
|
|
2706
2976
|
/**
|
|
2707
2977
|
* 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`
|
|
2708
2978
|
* @example true
|
|
2709
2979
|
*/
|
|
2710
|
-
sync_with_provider?: boolean;
|
|
2980
|
+
sync_with_provider?: boolean | null;
|
|
2711
2981
|
/**
|
|
2712
2982
|
* This optional field is needed only when working with `netsuite` connection.
|
|
2713
2983
|
* @example "2"
|
|
2714
2984
|
*/
|
|
2715
2985
|
subsidiary_id?: string;
|
|
2986
|
+
/**
|
|
2987
|
+
* This optional field is present only when working with `hubspot` connection.
|
|
2988
|
+
* @example "contacts"
|
|
2989
|
+
*/
|
|
2990
|
+
targeted_object?: string | null;
|
|
2991
|
+
/**
|
|
2992
|
+
* This optional field is present only when working with `hubspot` connection.
|
|
2993
|
+
* @example "dinesh@piedpiper.test"
|
|
2994
|
+
*/
|
|
2995
|
+
email?: string | null;
|
|
2716
2996
|
}
|
|
2717
2997
|
export type CustomerObject = CustomerBaseObject & {
|
|
2718
2998
|
integration_customers?: IntegrationCustomer[];
|
|
@@ -2821,11 +3101,8 @@ export interface CustomerCreateInput {
|
|
|
2821
3101
|
* @example "CA"
|
|
2822
3102
|
*/
|
|
2823
3103
|
state?: string | null;
|
|
2824
|
-
/**
|
|
2825
|
-
|
|
2826
|
-
* @example ["french_standard_vat"]
|
|
2827
|
-
*/
|
|
2828
|
-
tax_codes?: string[];
|
|
3104
|
+
/** List of unique code used to identify the taxes. */
|
|
3105
|
+
tax_codes?: TaxCodes;
|
|
2829
3106
|
/**
|
|
2830
3107
|
* The tax identification number of the customer
|
|
2831
3108
|
* @example "EU123456789"
|
|
@@ -2933,6 +3210,24 @@ export interface CustomerCreateInput {
|
|
|
2933
3210
|
export interface Customer {
|
|
2934
3211
|
customer: CustomerObjectExtended;
|
|
2935
3212
|
}
|
|
3213
|
+
/** Details about the pricing unit used for charge usage. */
|
|
3214
|
+
export interface UsagePricingUnitDetailsObject {
|
|
3215
|
+
/**
|
|
3216
|
+
* The amount in cents in the pricing unit.
|
|
3217
|
+
* @example 200
|
|
3218
|
+
*/
|
|
3219
|
+
amount_cents: number;
|
|
3220
|
+
/**
|
|
3221
|
+
* The short name of the pricing unit.
|
|
3222
|
+
* @example "CR"
|
|
3223
|
+
*/
|
|
3224
|
+
short_name: string;
|
|
3225
|
+
/**
|
|
3226
|
+
* The conversion rate from pricing units to the plan's currency.
|
|
3227
|
+
* @example "0.5"
|
|
3228
|
+
*/
|
|
3229
|
+
conversion_rate: string;
|
|
3230
|
+
}
|
|
2936
3231
|
/** Array of filter object, representing multiple dimensions for a charge item. */
|
|
2937
3232
|
export type CustomerChargeFiltersUsageObject = {
|
|
2938
3233
|
/**
|
|
@@ -2956,11 +3251,13 @@ export type CustomerChargeFiltersUsageObject = {
|
|
|
2956
3251
|
* @example "AWS eu-east-1"
|
|
2957
3252
|
*/
|
|
2958
3253
|
invoice_display_name?: string;
|
|
3254
|
+
/** Details about the pricing unit used for charge usage. */
|
|
3255
|
+
pricing_unit_details?: UsagePricingUnitDetailsObject;
|
|
2959
3256
|
/**
|
|
2960
3257
|
* List of filter values applied to the usage.
|
|
2961
|
-
* @example {"region":"us-east-1"}
|
|
3258
|
+
* @example {"region":["us-east-1"]}
|
|
2962
3259
|
*/
|
|
2963
|
-
values?: Record<string, string>;
|
|
3260
|
+
values?: Record<string, string[]>;
|
|
2964
3261
|
}[];
|
|
2965
3262
|
/** Array of aggregated fees, grouped by the event properties defined in a `standard` charge model. */
|
|
2966
3263
|
export type CustomerChargeGroupedUsageObject = {
|
|
@@ -2980,6 +3277,8 @@ export type CustomerChargeGroupedUsageObject = {
|
|
|
2980
3277
|
* @example "0.9"
|
|
2981
3278
|
*/
|
|
2982
3279
|
units?: string;
|
|
3280
|
+
/** Details about the pricing unit used for charge usage. */
|
|
3281
|
+
pricing_unit_details?: UsagePricingUnitDetailsObject;
|
|
2983
3282
|
/** Key value list of event properties aggregated by the charge model */
|
|
2984
3283
|
grouped_by?: Record<string, string>;
|
|
2985
3284
|
/** Array of filter object, representing multiple dimensions for a charge item. */
|
|
@@ -3007,6 +3306,8 @@ export interface CustomerChargeUsageObject {
|
|
|
3007
3306
|
* @example "EUR"
|
|
3008
3307
|
*/
|
|
3009
3308
|
amount_currency: Currency;
|
|
3309
|
+
/** Details about the pricing unit used for charge usage. */
|
|
3310
|
+
pricing_unit_details?: UsagePricingUnitDetailsObject;
|
|
3010
3311
|
/** Object listing all the properties for a specific charge item. */
|
|
3011
3312
|
charge: {
|
|
3012
3313
|
/**
|
|
@@ -3106,9 +3407,65 @@ export interface CustomerUsageObject {
|
|
|
3106
3407
|
export interface CustomerUsage {
|
|
3107
3408
|
customer_usage: CustomerUsageObject;
|
|
3108
3409
|
}
|
|
3109
|
-
export interface
|
|
3110
|
-
|
|
3111
|
-
|
|
3410
|
+
export interface CustomerProjectedUsageObject {
|
|
3411
|
+
/**
|
|
3412
|
+
* The lower bound of the billing period, expressed in the ISO 8601 datetime format in Coordinated Universal Time (UTC).
|
|
3413
|
+
* @format date-time
|
|
3414
|
+
* @example "2022-07-01T00:00:00Z"
|
|
3415
|
+
*/
|
|
3416
|
+
from_datetime: string;
|
|
3417
|
+
/**
|
|
3418
|
+
* The upper bound of the billing period, expressed in the ISO 8601 datetime format in Coordinated Universal Time (UTC).
|
|
3419
|
+
* @format date-time
|
|
3420
|
+
* @example "2022-07-31T23:59:59Z"
|
|
3421
|
+
*/
|
|
3422
|
+
to_datetime: string;
|
|
3423
|
+
/**
|
|
3424
|
+
* The date of creation of the invoice.
|
|
3425
|
+
* @format date
|
|
3426
|
+
* @example "2022-08-01"
|
|
3427
|
+
*/
|
|
3428
|
+
issuing_date: string;
|
|
3429
|
+
/**
|
|
3430
|
+
* A unique identifier associated with the invoice related to this particular usage record.
|
|
3431
|
+
* @format uuid
|
|
3432
|
+
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
3433
|
+
*/
|
|
3434
|
+
lago_invoice_id?: string | null;
|
|
3435
|
+
/**
|
|
3436
|
+
* The currency of the customer's current usage.
|
|
3437
|
+
* @example "EUR"
|
|
3438
|
+
*/
|
|
3439
|
+
currency?: Currency;
|
|
3440
|
+
/**
|
|
3441
|
+
* The amount in cents, tax excluded.
|
|
3442
|
+
* @example 123
|
|
3443
|
+
*/
|
|
3444
|
+
amount_cents: number;
|
|
3445
|
+
/**
|
|
3446
|
+
* The projected amount in cents, tax excluded.
|
|
3447
|
+
* @example 256
|
|
3448
|
+
*/
|
|
3449
|
+
projected_amount_cents: number;
|
|
3450
|
+
/**
|
|
3451
|
+
* The tax amount in cents.
|
|
3452
|
+
* @example 200
|
|
3453
|
+
*/
|
|
3454
|
+
taxes_amount_cents: number;
|
|
3455
|
+
/**
|
|
3456
|
+
* The total amount in cents, tax included.
|
|
3457
|
+
* @example 123
|
|
3458
|
+
*/
|
|
3459
|
+
total_amount_cents: number;
|
|
3460
|
+
/** Array of charges that comprise the current usage. It contains detailed information about individual charge items associated with the usage. */
|
|
3461
|
+
charges_usage: CustomerChargeUsageObject[];
|
|
3462
|
+
}
|
|
3463
|
+
export interface CustomerProjectedUsage {
|
|
3464
|
+
customer_projected_usage: CustomerProjectedUsageObject;
|
|
3465
|
+
}
|
|
3466
|
+
export interface CustomerPastUsage {
|
|
3467
|
+
usage_periods: CustomerUsage[];
|
|
3468
|
+
meta: PaginationMeta;
|
|
3112
3469
|
}
|
|
3113
3470
|
/** . */
|
|
3114
3471
|
export interface CustomerCheckoutUrl {
|
|
@@ -3242,17 +3599,32 @@ export interface EventInputObject {
|
|
|
3242
3599
|
* 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.
|
|
3243
3600
|
* @example {"gb":10}
|
|
3244
3601
|
*/
|
|
3245
|
-
properties?:
|
|
3602
|
+
properties?: object | null;
|
|
3246
3603
|
}
|
|
3247
3604
|
export interface EventInput {
|
|
3248
3605
|
event: EventInputObject;
|
|
3249
3606
|
}
|
|
3250
|
-
export interface
|
|
3251
|
-
event: EventObject
|
|
3607
|
+
export interface EventCreated {
|
|
3608
|
+
event: EventObject & {
|
|
3609
|
+
/**
|
|
3610
|
+
* The value will always be null in this response as the event processing is done asynchronously
|
|
3611
|
+
* @example null
|
|
3612
|
+
*/
|
|
3613
|
+
lago_customer_id?: null;
|
|
3614
|
+
};
|
|
3252
3615
|
}
|
|
3253
3616
|
export interface EventBatchInput {
|
|
3254
3617
|
events: EventInputObject[];
|
|
3255
3618
|
}
|
|
3619
|
+
export interface EventsCreated {
|
|
3620
|
+
events: (EventObject & {
|
|
3621
|
+
/**
|
|
3622
|
+
* The value will always be null in this response as the event processing is done asynchronously
|
|
3623
|
+
* @example null
|
|
3624
|
+
*/
|
|
3625
|
+
lago_customer_id?: null;
|
|
3626
|
+
})[];
|
|
3627
|
+
}
|
|
3256
3628
|
export interface EventEstimateFeesInput {
|
|
3257
3629
|
event: {
|
|
3258
3630
|
/**
|
|
@@ -3272,9 +3644,219 @@ export interface EventEstimateFeesInput {
|
|
|
3272
3644
|
export interface Fees {
|
|
3273
3645
|
fees: FeeObject[];
|
|
3274
3646
|
}
|
|
3275
|
-
export
|
|
3647
|
+
export interface EventEstimateInstantFeesInput {
|
|
3648
|
+
event: {
|
|
3649
|
+
/**
|
|
3650
|
+
* 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.
|
|
3651
|
+
* @example "storage"
|
|
3652
|
+
*/
|
|
3653
|
+
code: string;
|
|
3654
|
+
/**
|
|
3655
|
+
* The unique identifier of the subscription within your application.
|
|
3656
|
+
* @example "sub_1234567890"
|
|
3657
|
+
*/
|
|
3658
|
+
external_subscription_id: string;
|
|
3659
|
+
/** 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. */
|
|
3660
|
+
properties?: object;
|
|
3661
|
+
/**
|
|
3662
|
+
* This field represents a unique identifier for the event.
|
|
3663
|
+
* @example "transaction_1234567890"
|
|
3664
|
+
*/
|
|
3665
|
+
transaction_id?: string | null;
|
|
3666
|
+
};
|
|
3667
|
+
}
|
|
3668
|
+
export interface FeeEstimateObject {
|
|
3669
|
+
lago_id?: null;
|
|
3670
|
+
/**
|
|
3671
|
+
* Unique identifier assigned to the charge that the fee belongs to
|
|
3672
|
+
* @format uuid
|
|
3673
|
+
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
3674
|
+
*/
|
|
3675
|
+
lago_charge_id?: string;
|
|
3676
|
+
/**
|
|
3677
|
+
* Unique identifier assigned to the charge filter that the fee belongs to
|
|
3678
|
+
* @format uuid
|
|
3679
|
+
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
3680
|
+
*/
|
|
3681
|
+
lago_charge_filter_id?: string | null;
|
|
3682
|
+
lago_invoice_id?: null;
|
|
3683
|
+
lago_true_up_fee_id?: null;
|
|
3684
|
+
lago_true_up_parent_fee_id?: null;
|
|
3685
|
+
/**
|
|
3686
|
+
* Unique identifier assigned to the subscription, created by Lago. This field is specifically displayed when the fee type is charge or subscription.
|
|
3687
|
+
* @format uuid
|
|
3688
|
+
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
3689
|
+
*/
|
|
3690
|
+
lago_subscription_id?: string;
|
|
3691
|
+
/**
|
|
3692
|
+
* Unique identifier assigned to the customer, created by Lago. This field is specifically displayed when the fee type is charge or subscription.
|
|
3693
|
+
* @format uuid
|
|
3694
|
+
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
3695
|
+
*/
|
|
3696
|
+
lago_customer_id?: string;
|
|
3697
|
+
/**
|
|
3698
|
+
* Unique identifier assigned to the customer in your application. This field is specifically displayed when the fee type is charge or subscription.
|
|
3699
|
+
* @example "external_id"
|
|
3700
|
+
*/
|
|
3701
|
+
external_customer_id?: string;
|
|
3702
|
+
/**
|
|
3703
|
+
* Unique identifier assigned to the subscription in your application. This field is specifically displayed when the fee type is charge or subscription.
|
|
3704
|
+
* @example "external_id"
|
|
3705
|
+
*/
|
|
3706
|
+
external_subscription_id?: string;
|
|
3707
|
+
/**
|
|
3708
|
+
* The cost of this specific fee, excluding any applicable taxes.
|
|
3709
|
+
* @example 100
|
|
3710
|
+
*/
|
|
3711
|
+
amount_cents: number;
|
|
3712
|
+
/**
|
|
3713
|
+
* The cost of this specific fee, excluding any applicable taxes, with precision.
|
|
3714
|
+
* @example 1.0001
|
|
3715
|
+
*/
|
|
3716
|
+
precise_amount?: number;
|
|
3717
|
+
/**
|
|
3718
|
+
* The cost of this specific fee, including any applicable taxes, with precision.
|
|
3719
|
+
* @example 1.0212
|
|
3720
|
+
*/
|
|
3721
|
+
precise_total_amount?: number;
|
|
3722
|
+
/**
|
|
3723
|
+
* The currency of this specific fee. It indicates the monetary unit in which the fee's cost is expressed.
|
|
3724
|
+
* @example "EUR"
|
|
3725
|
+
*/
|
|
3726
|
+
amount_currency: Currency;
|
|
3727
|
+
/**
|
|
3728
|
+
* The cost of the tax associated with this specific fee.
|
|
3729
|
+
* @example 0
|
|
3730
|
+
*/
|
|
3731
|
+
taxes_amount_cents: number;
|
|
3732
|
+
/**
|
|
3733
|
+
* The cost of the tax associated with this specific fee, with precision.
|
|
3734
|
+
* @example 0
|
|
3735
|
+
*/
|
|
3736
|
+
taxes_precise_amount?: number;
|
|
3737
|
+
/**
|
|
3738
|
+
* The tax rate associated with this specific fee.
|
|
3739
|
+
* @example 20
|
|
3740
|
+
*/
|
|
3741
|
+
taxes_rate: number;
|
|
3742
|
+
/**
|
|
3743
|
+
* 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.
|
|
3744
|
+
* @example "0.32"
|
|
3745
|
+
*/
|
|
3746
|
+
units: string;
|
|
3747
|
+
description?: null;
|
|
3748
|
+
/**
|
|
3749
|
+
* The unit amount of the fee per unit, with precision.
|
|
3750
|
+
* @example 312.5
|
|
3751
|
+
*/
|
|
3752
|
+
precise_unit_amount: number;
|
|
3753
|
+
/**
|
|
3754
|
+
* The coupon amount applied to the estimated instant fee. It will always returns 0
|
|
3755
|
+
* @example "0.0"
|
|
3756
|
+
*/
|
|
3757
|
+
precise_coupons_amount_cents?: string;
|
|
3758
|
+
/**
|
|
3759
|
+
* The cost of this specific fee, including any applicable taxes.
|
|
3760
|
+
* @example 120
|
|
3761
|
+
*/
|
|
3762
|
+
total_amount_cents: number;
|
|
3763
|
+
/**
|
|
3764
|
+
* The currency of this specific fee, including any applicable taxes.
|
|
3765
|
+
* @example "EUR"
|
|
3766
|
+
*/
|
|
3767
|
+
total_amount_currency: Currency;
|
|
3768
|
+
/**
|
|
3769
|
+
* 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.
|
|
3770
|
+
* @example 1
|
|
3771
|
+
*/
|
|
3772
|
+
events_count?: number;
|
|
3773
|
+
/**
|
|
3774
|
+
* 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).
|
|
3775
|
+
* @example true
|
|
3776
|
+
*/
|
|
3777
|
+
pay_in_advance: boolean;
|
|
3778
|
+
/**
|
|
3779
|
+
* 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.
|
|
3780
|
+
* @example true
|
|
3781
|
+
*/
|
|
3782
|
+
invoiceable: boolean;
|
|
3783
|
+
/**
|
|
3784
|
+
* Indicates the payment status of the fee. It represents the current status of the payment associated with the fee. The value will always `pending`.
|
|
3785
|
+
* @example "pending"
|
|
3786
|
+
*/
|
|
3787
|
+
payment_status: "pending";
|
|
3788
|
+
created_at?: null;
|
|
3789
|
+
succeeded_at?: null;
|
|
3790
|
+
failed_at?: null;
|
|
3791
|
+
refunded_at?: null;
|
|
3792
|
+
/**
|
|
3793
|
+
* 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`).
|
|
3794
|
+
* @example "transaction_1234567890"
|
|
3795
|
+
*/
|
|
3796
|
+
event_transaction_id?: string;
|
|
3797
|
+
amount_details?: null;
|
|
3798
|
+
/** Item attached to the fee */
|
|
3799
|
+
item: {
|
|
3800
|
+
/**
|
|
3801
|
+
* The fee type. The value will be `charge`.
|
|
3802
|
+
* @example "charge"
|
|
3803
|
+
*/
|
|
3804
|
+
type: "charge";
|
|
3805
|
+
/**
|
|
3806
|
+
* The code of the fee item. It will be the code of the `billable_metric`.
|
|
3807
|
+
* @example "startup"
|
|
3808
|
+
*/
|
|
3809
|
+
code: string;
|
|
3810
|
+
/**
|
|
3811
|
+
* The name of the fee item. It will be the name of the `billable_metric`.
|
|
3812
|
+
* @example "Startup"
|
|
3813
|
+
*/
|
|
3814
|
+
name: string;
|
|
3815
|
+
/**
|
|
3816
|
+
* The description of the fee item. It will be the name of the `billable_metric`.
|
|
3817
|
+
* @example "Startup description"
|
|
3818
|
+
*/
|
|
3819
|
+
description?: string;
|
|
3820
|
+
/**
|
|
3821
|
+
* 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.
|
|
3822
|
+
* @example "Setup Fee (SF1)"
|
|
3823
|
+
*/
|
|
3824
|
+
invoice_display_name?: string;
|
|
3825
|
+
/**
|
|
3826
|
+
* 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.
|
|
3827
|
+
* @example "AWS eu-east-1"
|
|
3828
|
+
*/
|
|
3829
|
+
filter_invoice_display_name?: string | null;
|
|
3830
|
+
/** Key value list of event properties */
|
|
3831
|
+
filters?: object | null;
|
|
3832
|
+
/**
|
|
3833
|
+
* Unique identifier of the fee item, created by Lago. It will be the identifier of the `billable_metric`.
|
|
3834
|
+
* @format uuid
|
|
3835
|
+
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
3836
|
+
*/
|
|
3837
|
+
lago_item_id: string;
|
|
3838
|
+
/**
|
|
3839
|
+
* The type of the fee item. Values is `BillableMetric`.
|
|
3840
|
+
* @example "BillableMetric"
|
|
3841
|
+
*/
|
|
3842
|
+
item_type: "BillableMetric";
|
|
3843
|
+
/** Key value list of event properties aggregated by the charge model */
|
|
3844
|
+
grouped_by?: Record<string, string>;
|
|
3845
|
+
};
|
|
3846
|
+
}
|
|
3847
|
+
export interface FeesEstimate {
|
|
3848
|
+
fees: FeeEstimateObject[];
|
|
3849
|
+
}
|
|
3850
|
+
export interface EventBatchEstimateInstantFeesInput {
|
|
3851
|
+
events: EventEstimateInstantFeesInput[];
|
|
3852
|
+
}
|
|
3853
|
+
export interface Event {
|
|
3854
|
+
event: EventObject;
|
|
3855
|
+
}
|
|
3856
|
+
export interface FeesPaginated {
|
|
3857
|
+
fees: FeeObject[];
|
|
3276
3858
|
meta: PaginationMeta;
|
|
3277
|
-
}
|
|
3859
|
+
}
|
|
3278
3860
|
export interface Fee {
|
|
3279
3861
|
fee: FeeObject;
|
|
3280
3862
|
}
|
|
@@ -3461,7 +4043,7 @@ export interface BillingPeriodObject {
|
|
|
3461
4043
|
* @format uuid
|
|
3462
4044
|
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
3463
4045
|
*/
|
|
3464
|
-
lago_plan_id
|
|
4046
|
+
lago_plan_id: string;
|
|
3465
4047
|
/**
|
|
3466
4048
|
* The beginning date of the subscription billing period. This field indicates the start date of the billing period associated with the subscription fee.
|
|
3467
4049
|
* @format date-time
|
|
@@ -3540,7 +4122,7 @@ export interface UsageThresholdObject {
|
|
|
3540
4122
|
* The display name of the usage threshold.
|
|
3541
4123
|
* @example "Threshold 1"
|
|
3542
4124
|
*/
|
|
3543
|
-
threshold_display_name
|
|
4125
|
+
threshold_display_name: string | null;
|
|
3544
4126
|
/**
|
|
3545
4127
|
* The amount to reach to trigger a `progressive_billing` invoice.
|
|
3546
4128
|
* @example 10000
|
|
@@ -3573,6 +4155,7 @@ export interface AppliedUsageThresholdObject {
|
|
|
3573
4155
|
/**
|
|
3574
4156
|
* The date and time when the lifetime usage was computed. It is expressed in UTC format according to the ISO 8601 datetime standard.
|
|
3575
4157
|
* @format date-time
|
|
4158
|
+
* @example "2025-03-31T12:31:44Z"
|
|
3576
4159
|
*/
|
|
3577
4160
|
created_at: string;
|
|
3578
4161
|
usage_threshold: UsageThresholdObject;
|
|
@@ -3583,7 +4166,7 @@ export type InvoiceObject = InvoiceBaseObject & {
|
|
|
3583
4166
|
billing_periods?: BillingPeriodObject[];
|
|
3584
4167
|
metadata?: InvoiceMetadataObject[];
|
|
3585
4168
|
applied_taxes?: InvoiceAppliedTaxObject[];
|
|
3586
|
-
applied_usage_thresholds?:
|
|
4169
|
+
applied_usage_thresholds?: AppliedUsageThresholdObject[];
|
|
3587
4170
|
};
|
|
3588
4171
|
export interface InvoicesPaginated {
|
|
3589
4172
|
invoices: InvoiceObject[];
|
|
@@ -3629,10 +4212,19 @@ export interface InvoiceOneOffCreateInput {
|
|
|
3629
4212
|
*/
|
|
3630
4213
|
description?: string | null;
|
|
3631
4214
|
/**
|
|
3632
|
-
*
|
|
3633
|
-
* @
|
|
4215
|
+
* The lower boundary of the invoice billing interval. The `from_datetime` should be provided in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC).
|
|
4216
|
+
* @format date-time
|
|
4217
|
+
* @example "2022-08-08T00:00:00Z"
|
|
4218
|
+
*/
|
|
4219
|
+
from_datetime?: string;
|
|
4220
|
+
/**
|
|
4221
|
+
* The upper boundary of the invoice billing interval. The `to_datetime` should be provided in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC).
|
|
4222
|
+
* @format date-time
|
|
4223
|
+
* @example "2022-08-08T00:00:00Z"
|
|
3634
4224
|
*/
|
|
3635
|
-
|
|
4225
|
+
to_datetime?: string;
|
|
4226
|
+
/** List of unique code used to identify the taxes. */
|
|
4227
|
+
tax_codes?: TaxCodes;
|
|
3636
4228
|
/**
|
|
3637
4229
|
* If true, the invoice will be created but not sent to the payment provider.
|
|
3638
4230
|
* @default false
|
|
@@ -3759,6 +4351,28 @@ export interface SubscriptionObject {
|
|
|
3759
4351
|
* @example "2022-09-08T00:00:00Z"
|
|
3760
4352
|
*/
|
|
3761
4353
|
current_billing_period_ending_at?: string | null;
|
|
4354
|
+
/**
|
|
4355
|
+
* 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.
|
|
4356
|
+
* This field allows you to control the behavior of the credit note generation:
|
|
4357
|
+
*
|
|
4358
|
+
* - `credit`: A credit note is generated for the unused subscription time. The unused amount is credited back to the customer.
|
|
4359
|
+
* - `refund`: A credit note is generated for the unused subscription time. If the invoice is paid or partially paid, the unused paid amount is refunded; any unpaid unused amount is credited back to the customer.
|
|
4360
|
+
* - `skip`: No credit note is generated for the unused subscription time.
|
|
4361
|
+
*
|
|
4362
|
+
* _Note: This field is only applicable to pay-in-advance plans and will be `null` for pay-in-arrears plans._
|
|
4363
|
+
* @example "credit"
|
|
4364
|
+
*/
|
|
4365
|
+
on_termination_credit_note: "credit" | "refund" | "skip";
|
|
4366
|
+
/**
|
|
4367
|
+
* When a subscription is terminated before the end of its billing period, we generate an invoice for the unbilled usage.
|
|
4368
|
+
* This field allows you to control the behavior of the invoice generation:
|
|
4369
|
+
*
|
|
4370
|
+
* - `generate`: An invoice is generated for the unbilled usage.
|
|
4371
|
+
* - `skip`: No invoice is generated for the unbilled usage.
|
|
4372
|
+
* @default "generate"
|
|
4373
|
+
* @example "generate"
|
|
4374
|
+
*/
|
|
4375
|
+
on_termination_invoice: "generate" | "skip";
|
|
3762
4376
|
}
|
|
3763
4377
|
export interface ErrorDetailObject {
|
|
3764
4378
|
/**
|
|
@@ -4704,7 +5318,7 @@ export interface ChargeObject {
|
|
|
4704
5318
|
* 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.
|
|
4705
5319
|
* @example "Setup"
|
|
4706
5320
|
*/
|
|
4707
|
-
invoice_display_name
|
|
5321
|
+
invoice_display_name: string | null;
|
|
4708
5322
|
/**
|
|
4709
5323
|
* The date and time when the charge was created. It is expressed in UTC format according to the ISO 8601 datetime standard.
|
|
4710
5324
|
* @format date-time
|
|
@@ -4717,12 +5331,12 @@ export interface ChargeObject {
|
|
|
4717
5331
|
* 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.
|
|
4718
5332
|
* @example true
|
|
4719
5333
|
*/
|
|
4720
|
-
pay_in_advance
|
|
5334
|
+
pay_in_advance: boolean;
|
|
4721
5335
|
/**
|
|
4722
5336
|
* 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`.
|
|
4723
5337
|
* @example true
|
|
4724
5338
|
*/
|
|
4725
|
-
invoiceable
|
|
5339
|
+
invoiceable: boolean;
|
|
4726
5340
|
/**
|
|
4727
5341
|
* This setting can only be configured if `pay_in_advance` is `true` and `invoiceable` is `false`.
|
|
4728
5342
|
* This field determines whether and when the charge fee should be included in
|
|
@@ -4731,7 +5345,7 @@ export interface ChargeObject {
|
|
|
4731
5345
|
* consolidating all charge fees with a succeeded payment status.
|
|
4732
5346
|
* @example "invoice"
|
|
4733
5347
|
*/
|
|
4734
|
-
regroup_paid_fees
|
|
5348
|
+
regroup_paid_fees: "invoice";
|
|
4735
5349
|
/**
|
|
4736
5350
|
* Specifies whether a charge is prorated based on the remaining number of days in the billing period or billed fully.
|
|
4737
5351
|
*
|
|
@@ -4740,18 +5354,63 @@ export interface ChargeObject {
|
|
|
4740
5354
|
* - If not defined in the request, default value is `false`.
|
|
4741
5355
|
* @example false
|
|
4742
5356
|
*/
|
|
4743
|
-
prorated
|
|
5357
|
+
prorated: boolean;
|
|
4744
5358
|
/**
|
|
4745
5359
|
* 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.
|
|
4746
5360
|
* @example 1200
|
|
4747
5361
|
*/
|
|
4748
|
-
min_amount_cents
|
|
5362
|
+
min_amount_cents: number;
|
|
4749
5363
|
/** List of all thresholds utilized for calculating the charge. */
|
|
4750
|
-
properties
|
|
5364
|
+
properties: ChargeProperties;
|
|
4751
5365
|
/** List of filters used to apply differentiated pricing based on additional event properties. */
|
|
4752
|
-
filters
|
|
5366
|
+
filters: ChargeFilterObject[];
|
|
4753
5367
|
/** All taxes applied to the charge. */
|
|
4754
5368
|
taxes?: TaxObject[];
|
|
5369
|
+
/** The pricing unit applied to the charge. */
|
|
5370
|
+
applied_pricing_unit?: {
|
|
5371
|
+
/**
|
|
5372
|
+
* The code of the pricing unit.
|
|
5373
|
+
* @example "unit_code"
|
|
5374
|
+
*/
|
|
5375
|
+
code: string;
|
|
5376
|
+
/**
|
|
5377
|
+
* The conversion rate from pricing units to the plan's currency.
|
|
5378
|
+
* @example "0.5"
|
|
5379
|
+
*/
|
|
5380
|
+
conversion_rate: string;
|
|
5381
|
+
};
|
|
5382
|
+
}
|
|
5383
|
+
export type PlanEntitlementPrivilegeObject = FeaturePrivilegeObject & {
|
|
5384
|
+
/**
|
|
5385
|
+
* Value assigned to this privilege in the entitlement. Type depends on the privilege's value_type.
|
|
5386
|
+
* @example 10
|
|
5387
|
+
*/
|
|
5388
|
+
value: number | boolean | string;
|
|
5389
|
+
};
|
|
5390
|
+
export interface PlanEntitlementObject {
|
|
5391
|
+
/**
|
|
5392
|
+
* Unique code used to identify the feature. Max 255 characters.
|
|
5393
|
+
* @example "seats"
|
|
5394
|
+
*/
|
|
5395
|
+
code: string;
|
|
5396
|
+
/**
|
|
5397
|
+
* Name of the feature. Max 255 characters.
|
|
5398
|
+
* @example "Number of seats"
|
|
5399
|
+
*/
|
|
5400
|
+
name: string | null;
|
|
5401
|
+
/**
|
|
5402
|
+
* Description of the feature. Max 600 characters.
|
|
5403
|
+
* @example "Number of users of the account"
|
|
5404
|
+
*/
|
|
5405
|
+
description: string | null;
|
|
5406
|
+
/**
|
|
5407
|
+
* Privileges associated with this feature. Each privilege must have a value assigned.
|
|
5408
|
+
* @example [{"code":"max","name":"Maximum","value_type":"integer","value":10},{"code":"max_admins","name":"Max Admins","value_type":"integer","value":5},{"code":"root","name":"Allow root user","value_type":"boolean","value":true},{"code":"provider","name":"SSO Provider","value_type":"select","value":"google","config":{"select_options":["google","okta"]}}]
|
|
5409
|
+
*/
|
|
5410
|
+
privileges: PlanEntitlementPrivilegeObject[];
|
|
5411
|
+
}
|
|
5412
|
+
export interface PlanEntitlement {
|
|
5413
|
+
entitlement: PlanEntitlementObject;
|
|
4755
5414
|
}
|
|
4756
5415
|
export interface PlanObject {
|
|
4757
5416
|
/**
|
|
@@ -4819,13 +5478,15 @@ export interface PlanObject {
|
|
|
4819
5478
|
minimum_commitment?: MinimumCommitmentObject;
|
|
4820
5479
|
/**
|
|
4821
5480
|
* Additional usage-based charges for this plan.
|
|
4822
|
-
* @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":[]}]
|
|
5481
|
+
* @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":[]}]
|
|
4823
5482
|
*/
|
|
4824
5483
|
charges?: ChargeObject[];
|
|
4825
5484
|
/** All taxes applied to the plan. */
|
|
4826
5485
|
taxes?: TaxObject[];
|
|
4827
5486
|
/** List of usage thresholds applied to the plan. */
|
|
4828
5487
|
usage_thresholds?: UsageThresholdObject[];
|
|
5488
|
+
/** List of all feature entitlements and their privileges available for this plan. */
|
|
5489
|
+
entitlements?: PlanEntitlement[];
|
|
4829
5490
|
}
|
|
4830
5491
|
export interface PlansPaginated {
|
|
4831
5492
|
plans: PlanObject[];
|
|
@@ -4843,11 +5504,8 @@ export interface MinimumCommitmentInput {
|
|
|
4843
5504
|
* @example "Minimum Commitment (C1)"
|
|
4844
5505
|
*/
|
|
4845
5506
|
invoice_display_name?: string;
|
|
4846
|
-
/**
|
|
4847
|
-
|
|
4848
|
-
* @example ["french_standard_vat"]
|
|
4849
|
-
*/
|
|
4850
|
-
tax_codes?: string[];
|
|
5507
|
+
/** List of unique code used to identify the taxes. */
|
|
5508
|
+
tax_codes?: TaxCodes;
|
|
4851
5509
|
}
|
|
4852
5510
|
/** Values used to apply differentiated pricing based on additional event properties. */
|
|
4853
5511
|
export interface ChargeFilterInput {
|
|
@@ -4857,12 +5515,12 @@ export interface ChargeFilterInput {
|
|
|
4857
5515
|
*/
|
|
4858
5516
|
invoice_display_name?: string | null;
|
|
4859
5517
|
/** List of all thresholds utilized for calculating the charge. */
|
|
4860
|
-
properties
|
|
5518
|
+
properties: ChargeProperties;
|
|
4861
5519
|
/**
|
|
4862
5520
|
* List of possible filter values. The key and values must match one of the billable metric filters.
|
|
4863
5521
|
* @example {"region":["us-east-1"]}
|
|
4864
5522
|
*/
|
|
4865
|
-
values
|
|
5523
|
+
values: Record<string, string[]>;
|
|
4866
5524
|
}
|
|
4867
5525
|
export interface UsageThresholdInput {
|
|
4868
5526
|
/**
|
|
@@ -4939,11 +5597,8 @@ export interface PlanCreateInput {
|
|
|
4939
5597
|
* @example null
|
|
4940
5598
|
*/
|
|
4941
5599
|
bill_charges_monthly?: boolean | null;
|
|
4942
|
-
/**
|
|
4943
|
-
|
|
4944
|
-
* @example ["french_standard_vat"]
|
|
4945
|
-
*/
|
|
4946
|
-
tax_codes?: string[];
|
|
5600
|
+
/** List of unique code used to identify the taxes. */
|
|
5601
|
+
tax_codes?: TaxCodes;
|
|
4947
5602
|
/** Minimum commitment for this plan. */
|
|
4948
5603
|
minimum_commitment?: MinimumCommitmentInput;
|
|
4949
5604
|
/**
|
|
@@ -5004,11 +5659,23 @@ export interface PlanCreateInput {
|
|
|
5004
5659
|
properties?: ChargeProperties;
|
|
5005
5660
|
/** List of filters used to apply differentiated pricing based on additional event properties. */
|
|
5006
5661
|
filters?: ChargeFilterInput[];
|
|
5007
|
-
/**
|
|
5008
|
-
|
|
5009
|
-
|
|
5010
|
-
|
|
5011
|
-
|
|
5662
|
+
/** List of unique code used to identify the taxes. */
|
|
5663
|
+
tax_codes?: TaxCodes;
|
|
5664
|
+
/** The pricing unit to apply to the charge. */
|
|
5665
|
+
applied_pricing_unit?: {
|
|
5666
|
+
/**
|
|
5667
|
+
* The code of the pricing unit.
|
|
5668
|
+
* @example "credits"
|
|
5669
|
+
*/
|
|
5670
|
+
code?: string;
|
|
5671
|
+
/**
|
|
5672
|
+
* The conversion rate from pricing units to the plan's currency.
|
|
5673
|
+
* This rate determines how many currency units (in the plan's base currency) equal one pricing unit.
|
|
5674
|
+
* For example, if the plan uses USD and the conversion rate is 0.5, then 1 pricing unit = $0.50.
|
|
5675
|
+
* @example "0.5"
|
|
5676
|
+
*/
|
|
5677
|
+
conversion_rate?: string;
|
|
5678
|
+
};
|
|
5012
5679
|
}[];
|
|
5013
5680
|
/** List of usage thresholds to apply to the plan. */
|
|
5014
5681
|
usage_thresholds?: UsageThresholdInput[];
|
|
@@ -5069,11 +5736,8 @@ export interface PlanUpdateInput {
|
|
|
5069
5736
|
* @example null
|
|
5070
5737
|
*/
|
|
5071
5738
|
bill_charges_monthly?: boolean | null;
|
|
5072
|
-
/**
|
|
5073
|
-
|
|
5074
|
-
* @example ["french_standard_vat"]
|
|
5075
|
-
*/
|
|
5076
|
-
tax_codes?: string[];
|
|
5739
|
+
/** List of unique code used to identify the taxes. */
|
|
5740
|
+
tax_codes?: TaxCodes;
|
|
5077
5741
|
/** Minimum commitment for this plan. */
|
|
5078
5742
|
minimum_commitment?: MinimumCommitmentInput;
|
|
5079
5743
|
/**
|
|
@@ -5140,11 +5804,18 @@ export interface PlanUpdateInput {
|
|
|
5140
5804
|
properties?: ChargeProperties;
|
|
5141
5805
|
/** List of filters used to apply differentiated pricing based on additional event properties. */
|
|
5142
5806
|
filters?: ChargeFilterInput[];
|
|
5143
|
-
/**
|
|
5144
|
-
|
|
5145
|
-
|
|
5146
|
-
|
|
5147
|
-
|
|
5807
|
+
/** List of unique code used to identify the taxes. */
|
|
5808
|
+
tax_codes?: TaxCodes;
|
|
5809
|
+
/** Updates the pricing unit conversion rate for this charge. Only applies if the charge has applied pricing unit. */
|
|
5810
|
+
applied_pricing_unit?: {
|
|
5811
|
+
/**
|
|
5812
|
+
* The conversion rate from pricing units to the plan's currency.
|
|
5813
|
+
* This rate determines how many currency units (in the plan's base currency) equal one pricing unit.
|
|
5814
|
+
* For example, if the plan uses USD and the conversion rate is 0.5, then 1 pricing unit = $0.50 USD.
|
|
5815
|
+
* @example "0.5"
|
|
5816
|
+
*/
|
|
5817
|
+
conversion_rate?: string;
|
|
5818
|
+
};
|
|
5148
5819
|
}[];
|
|
5149
5820
|
/** List of usage thresholds to apply to the plan. */
|
|
5150
5821
|
usage_thresholds?: UsageThresholdInput[];
|
|
@@ -5155,6 +5826,14 @@ export interface PlanUpdateInput {
|
|
|
5155
5826
|
cascade_updates?: boolean;
|
|
5156
5827
|
};
|
|
5157
5828
|
}
|
|
5829
|
+
export interface PlanEntitlements {
|
|
5830
|
+
entitlements: PlanEntitlementObject[];
|
|
5831
|
+
}
|
|
5832
|
+
/**
|
|
5833
|
+
* Feature entitlements with their privilege values. Each key is a feature code, and the value is an object containing privilege codes with their associated values.
|
|
5834
|
+
* @example {"seats":{"max":20,"max_admins":10,"root":false},"sso":{"provider":"okta"}}
|
|
5835
|
+
*/
|
|
5836
|
+
export type EntitlementUpdateInput = Record<string, Record<string, number | boolean | string>>;
|
|
5158
5837
|
export interface SubscriptionsPaginated {
|
|
5159
5838
|
subscriptions: SubscriptionObject[];
|
|
5160
5839
|
meta: PaginationMeta;
|
|
@@ -5186,11 +5865,8 @@ export interface PlanOverridesObject {
|
|
|
5186
5865
|
* @example "Startup"
|
|
5187
5866
|
*/
|
|
5188
5867
|
name?: string;
|
|
5189
|
-
/**
|
|
5190
|
-
|
|
5191
|
-
* @example ["french_standard_vat"]
|
|
5192
|
-
*/
|
|
5193
|
-
tax_codes?: string[];
|
|
5868
|
+
/** List of unique code used to identify the taxes. */
|
|
5869
|
+
tax_codes?: TaxCodes;
|
|
5194
5870
|
/**
|
|
5195
5871
|
* The duration in days during which the base cost of the plan is offered for free.
|
|
5196
5872
|
* @example 5
|
|
@@ -5225,11 +5901,18 @@ export interface PlanOverridesObject {
|
|
|
5225
5901
|
properties?: ChargeProperties;
|
|
5226
5902
|
/** List of filters used to apply differentiated pricing based on additional event properties. */
|
|
5227
5903
|
filters?: ChargeFilterInput[];
|
|
5228
|
-
/**
|
|
5229
|
-
|
|
5230
|
-
|
|
5231
|
-
|
|
5232
|
-
|
|
5904
|
+
/** List of unique code used to identify the taxes. */
|
|
5905
|
+
tax_codes?: TaxCodes;
|
|
5906
|
+
/** Updates the pricing unit conversion rate for this charge. Only applies if the charge has applied pricing unit. */
|
|
5907
|
+
applied_pricing_unit?: {
|
|
5908
|
+
/**
|
|
5909
|
+
* The conversion rate from pricing units to the plan's currency.
|
|
5910
|
+
* This rate determines how many currency units (in the plan's base currency) equal one pricing unit.
|
|
5911
|
+
* For example, if the plan uses USD and the conversion rate is 0.5, then 1 pricing unit = $0.50 USD.
|
|
5912
|
+
* @example "0.5"
|
|
5913
|
+
*/
|
|
5914
|
+
conversion_rate?: string;
|
|
5915
|
+
};
|
|
5233
5916
|
}[];
|
|
5234
5917
|
/** List of usage thresholds applied to the subscription. */
|
|
5235
5918
|
usage_thresholds?: UsageThresholdObject[];
|
|
@@ -5520,6 +6203,51 @@ export interface Alert {
|
|
|
5520
6203
|
export interface AlertUpdateInput {
|
|
5521
6204
|
alert: AlertBaseInput;
|
|
5522
6205
|
}
|
|
6206
|
+
export type SubscriptionEntitlementPrivilegeObject = FeaturePrivilegeObject & {
|
|
6207
|
+
/**
|
|
6208
|
+
* Applicable value this this subscription (override_value if set, plan_value otherwise). Type depends on the privilege's value_type.
|
|
6209
|
+
* @example 10
|
|
6210
|
+
*/
|
|
6211
|
+
value: number | boolean | string;
|
|
6212
|
+
/**
|
|
6213
|
+
* Value assigned to this privilege in the plan. Type depends on the privilege's value_type.
|
|
6214
|
+
* @example 10
|
|
6215
|
+
*/
|
|
6216
|
+
plan_value: number | boolean | string;
|
|
6217
|
+
/**
|
|
6218
|
+
* Value assigned to this subscription specifically. Type depends on the privilege's value_type. Null if no override is set.
|
|
6219
|
+
* @example 10
|
|
6220
|
+
*/
|
|
6221
|
+
override_value: number | boolean | string | null;
|
|
6222
|
+
};
|
|
6223
|
+
export interface SubscriptionEntitlementObject {
|
|
6224
|
+
/**
|
|
6225
|
+
* Unique code used to identify the feature. Max 255 characters.
|
|
6226
|
+
* @example "seats"
|
|
6227
|
+
*/
|
|
6228
|
+
code: string;
|
|
6229
|
+
/**
|
|
6230
|
+
* Name of the feature. Max 255 characters.
|
|
6231
|
+
* @example "Number of seats"
|
|
6232
|
+
*/
|
|
6233
|
+
name: string | null;
|
|
6234
|
+
/**
|
|
6235
|
+
* Description of the feature. Max 600 characters.
|
|
6236
|
+
* @example "Number of users of the account"
|
|
6237
|
+
*/
|
|
6238
|
+
description: string | null;
|
|
6239
|
+
/**
|
|
6240
|
+
* Privileges associated with this feature. Each privilege shows the plan value and any subscription override.
|
|
6241
|
+
* @example [{"code":"max","name":"Maximum","value_type":"integer","value":15,"plan_value":10,"override_value":15},{"code":"max_admins","name":"Max Admins","value_type":"integer","value":5,"plan_value":5,"override_value":null},{"code":"root","name":"Allow root user","value_type":"boolean","value":true,"plan_value":true,"override_value":null},{"code":"provider","name":"SSO Provider","value_type":"select","value":"okta","plan_value":"google","override_value":"okta","config":{"select_options":["google","okta"]}}]
|
|
6242
|
+
*/
|
|
6243
|
+
privileges: SubscriptionEntitlementPrivilegeObject[];
|
|
6244
|
+
}
|
|
6245
|
+
export interface SubscriptionEntitlements {
|
|
6246
|
+
entitlements: SubscriptionEntitlementObject[];
|
|
6247
|
+
}
|
|
6248
|
+
export interface SubscriptionEntitlement {
|
|
6249
|
+
entitlement: SubscriptionEntitlementObject;
|
|
6250
|
+
}
|
|
5523
6251
|
export interface TaxesPaginated {
|
|
5524
6252
|
taxes: TaxObject[];
|
|
5525
6253
|
meta: PaginationMeta;
|
|
@@ -5613,13 +6341,13 @@ export interface WalletRecurringTransactionRule {
|
|
|
5613
6341
|
* @format date-time
|
|
5614
6342
|
* @example "2022-08-08T00:00:00Z"
|
|
5615
6343
|
*/
|
|
5616
|
-
started_at?: string;
|
|
6344
|
+
started_at?: string | null;
|
|
5617
6345
|
/**
|
|
5618
6346
|
* 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`.
|
|
5619
6347
|
* @pattern ^[0-9]+.?[0-9]*$
|
|
5620
6348
|
* @example "200.0"
|
|
5621
6349
|
*/
|
|
5622
|
-
target_ongoing_balance: string;
|
|
6350
|
+
target_ongoing_balance: string | null;
|
|
5623
6351
|
/**
|
|
5624
6352
|
* 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
|
|
5625
6353
|
* @format date-time
|
|
@@ -5631,7 +6359,7 @@ export interface WalletRecurringTransactionRule {
|
|
|
5631
6359
|
* @format date-time
|
|
5632
6360
|
* @example "2023-09-30T23:59:59Z"
|
|
5633
6361
|
*/
|
|
5634
|
-
expiration_at?: string;
|
|
6362
|
+
expiration_at?: string | null;
|
|
5635
6363
|
/**
|
|
5636
6364
|
* 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.
|
|
5637
6365
|
* @example false
|
|
@@ -5680,7 +6408,7 @@ export interface WalletObject {
|
|
|
5680
6408
|
* The name of the wallet.
|
|
5681
6409
|
* @example "Prepaid"
|
|
5682
6410
|
*/
|
|
5683
|
-
name?: string;
|
|
6411
|
+
name?: string | null;
|
|
5684
6412
|
/**
|
|
5685
6413
|
* 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.
|
|
5686
6414
|
* @pattern ^[0-9]+.?[0-9]*$
|
|
@@ -5738,14 +6466,19 @@ export interface WalletObject {
|
|
|
5738
6466
|
* 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.
|
|
5739
6467
|
* @example false
|
|
5740
6468
|
*/
|
|
5741
|
-
invoice_requires_successful_payment
|
|
6469
|
+
invoice_requires_successful_payment: boolean;
|
|
5742
6470
|
/** Set wallet limitations to fee types. */
|
|
5743
6471
|
applies_to?: {
|
|
5744
6472
|
/**
|
|
5745
6473
|
* 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.
|
|
5746
6474
|
* @example ["charge"]
|
|
5747
6475
|
*/
|
|
5748
|
-
fee_types?:
|
|
6476
|
+
fee_types?: ("charge" | "subscription" | "commitment")[];
|
|
6477
|
+
/**
|
|
6478
|
+
* An array of billable metric codes to which the wallet is applicable. By specifying the billable metric codes in this field, you can restrict the wallet's usage to specific metrics only.
|
|
6479
|
+
* @example ["bm1"]
|
|
6480
|
+
*/
|
|
6481
|
+
billable_metric_codes?: string[];
|
|
5749
6482
|
};
|
|
5750
6483
|
/** List of recurring transaction rules. Currently, we only allow one recurring rule per wallet. */
|
|
5751
6484
|
recurring_transaction_rules?: WalletRecurringTransactionRule[];
|
|
@@ -5782,7 +6515,7 @@ export interface WalletCreateInput {
|
|
|
5782
6515
|
* The name of the wallet.
|
|
5783
6516
|
* @example "Prepaid"
|
|
5784
6517
|
*/
|
|
5785
|
-
name?: string;
|
|
6518
|
+
name?: string | null;
|
|
5786
6519
|
/**
|
|
5787
6520
|
* 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.
|
|
5788
6521
|
* @pattern ^[0-9]+.?[0-9]*$
|
|
@@ -5826,12 +6559,7 @@ export interface WalletCreateInput {
|
|
|
5826
6559
|
* 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.
|
|
5827
6560
|
* @example [{"key":"example_key","value":"example_value"},{"key":"another_key","value":"another_value"}]
|
|
5828
6561
|
*/
|
|
5829
|
-
transaction_metadata?:
|
|
5830
|
-
/** The unique identifier for the attribute. */
|
|
5831
|
-
key?: string;
|
|
5832
|
-
/** The corresponding value for the key. */
|
|
5833
|
-
value?: string;
|
|
5834
|
-
}[];
|
|
6562
|
+
transaction_metadata?: any[] | null;
|
|
5835
6563
|
/** Set wallet limitations to fee types. */
|
|
5836
6564
|
applies_to?: {
|
|
5837
6565
|
/**
|
|
@@ -5839,76 +6567,14 @@ export interface WalletCreateInput {
|
|
|
5839
6567
|
* @example ["charge"]
|
|
5840
6568
|
*/
|
|
5841
6569
|
fee_types?: any[] | null;
|
|
5842
|
-
};
|
|
5843
|
-
/** List of recurring transaction rules. Currently, we only allow one recurring rule per wallet. */
|
|
5844
|
-
recurring_transaction_rules?: {
|
|
5845
|
-
/**
|
|
5846
|
-
* The number of paid credits used for recurring top-up.
|
|
5847
|
-
* @pattern ^[0-9]+.?[0-9]*$
|
|
5848
|
-
* @example "20.0"
|
|
5849
|
-
*/
|
|
5850
|
-
paid_credits?: string | null;
|
|
5851
|
-
/**
|
|
5852
|
-
* The number of free granted credits used for recurring top-up.
|
|
5853
|
-
* @pattern ^[0-9]+.?[0-9]*$
|
|
5854
|
-
* @example "10.0"
|
|
5855
|
-
*/
|
|
5856
|
-
granted_credits?: string | null;
|
|
5857
|
-
/**
|
|
5858
|
-
* The method used for recurring top-up. Possible values are `fixed` or `target`.
|
|
5859
|
-
* @example "target"
|
|
5860
|
-
*/
|
|
5861
|
-
method?: "fixed" | "target";
|
|
5862
|
-
/**
|
|
5863
|
-
* The trigger. Possible values are `interval` or `threshold`.
|
|
5864
|
-
* @example "interval"
|
|
5865
|
-
*/
|
|
5866
|
-
trigger: "interval" | "threshold";
|
|
5867
|
-
/**
|
|
5868
|
-
* 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`.
|
|
5869
|
-
* @example "monthly"
|
|
5870
|
-
*/
|
|
5871
|
-
interval?: "weekly" | "monthly" | "quarterly" | "yearly";
|
|
5872
|
-
/**
|
|
5873
|
-
* 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).
|
|
5874
|
-
* @format date-time
|
|
5875
|
-
* @example "2022-08-08T00:00:00Z"
|
|
5876
|
-
*/
|
|
5877
|
-
started_at?: string;
|
|
5878
|
-
/**
|
|
5879
|
-
* 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).
|
|
5880
|
-
* @format date-time
|
|
5881
|
-
* @example "2023-09-30T23:59:59Z"
|
|
5882
|
-
*/
|
|
5883
|
-
expiration_at?: string | null;
|
|
5884
|
-
/**
|
|
5885
|
-
* 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`.
|
|
5886
|
-
* @pattern ^[0-9]+.?[0-9]*$
|
|
5887
|
-
* @example "20.0"
|
|
5888
|
-
*/
|
|
5889
|
-
threshold_credits?: string;
|
|
5890
|
-
/**
|
|
5891
|
-
* 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`.
|
|
5892
|
-
* @pattern ^[0-9]+.?[0-9]*$
|
|
5893
|
-
* @example "200.0"
|
|
5894
|
-
*/
|
|
5895
|
-
target_ongoing_balance?: string;
|
|
5896
|
-
/**
|
|
5897
|
-
* 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.
|
|
5898
|
-
* @example false
|
|
5899
|
-
*/
|
|
5900
|
-
invoice_requires_successful_payment?: boolean;
|
|
5901
6570
|
/**
|
|
5902
|
-
*
|
|
5903
|
-
* @example [
|
|
6571
|
+
* An array of billable metric codes to which the wallet is applicable. By specifying the billable metric codes in this field, you can restrict the wallet's usage to specific metrics only.
|
|
6572
|
+
* @example []
|
|
5904
6573
|
*/
|
|
5905
|
-
|
|
5906
|
-
|
|
5907
|
-
|
|
5908
|
-
|
|
5909
|
-
value?: string;
|
|
5910
|
-
}[];
|
|
5911
|
-
}[];
|
|
6574
|
+
billable_metric_codes?: any[] | null;
|
|
6575
|
+
};
|
|
6576
|
+
/** List of recurring transaction rules. Currently, we only allow one recurring rule per wallet. */
|
|
6577
|
+
recurring_transaction_rules?: any[] | null;
|
|
5912
6578
|
};
|
|
5913
6579
|
}
|
|
5914
6580
|
export interface Wallet {
|
|
@@ -5966,19 +6632,19 @@ export interface WalletUpdateInput {
|
|
|
5966
6632
|
* @pattern ^[0-9]+.?[0-9]*$
|
|
5967
6633
|
* @example "20.0"
|
|
5968
6634
|
*/
|
|
5969
|
-
paid_credits?: string;
|
|
6635
|
+
paid_credits?: string | null;
|
|
5970
6636
|
/**
|
|
5971
6637
|
* The number of free granted credits. Required only if there is no paid credits.
|
|
5972
6638
|
* @pattern ^[0-9]+.?[0-9]*$
|
|
5973
6639
|
* @example "10.0"
|
|
5974
6640
|
*/
|
|
5975
|
-
granted_credits?: string;
|
|
6641
|
+
granted_credits?: string | null;
|
|
5976
6642
|
/**
|
|
5977
6643
|
* 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).
|
|
5978
6644
|
* @format date-time
|
|
5979
6645
|
* @example "2022-08-08T00:00:00Z"
|
|
5980
6646
|
*/
|
|
5981
|
-
started_at?: string;
|
|
6647
|
+
started_at?: string | null;
|
|
5982
6648
|
/**
|
|
5983
6649
|
* 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).
|
|
5984
6650
|
* @format date-time
|
|
@@ -6014,6 +6680,11 @@ export interface WalletUpdateInput {
|
|
|
6014
6680
|
* @example ["charge"]
|
|
6015
6681
|
*/
|
|
6016
6682
|
fee_types?: any[] | null;
|
|
6683
|
+
/**
|
|
6684
|
+
* An array of billable metric codes to which the wallet is applicable. By specifying the billable metric codes in this field, you can restrict the wallet's usage to specific metrics only.
|
|
6685
|
+
* @example []
|
|
6686
|
+
*/
|
|
6687
|
+
billable_metric_codes?: any[] | null;
|
|
6017
6688
|
};
|
|
6018
6689
|
};
|
|
6019
6690
|
}
|
|
@@ -6030,19 +6701,19 @@ export interface WalletTransactionCreateInput {
|
|
|
6030
6701
|
* @pattern ^[0-9]+.?[0-9]*$
|
|
6031
6702
|
* @example "20.0"
|
|
6032
6703
|
*/
|
|
6033
|
-
paid_credits?: string;
|
|
6704
|
+
paid_credits?: string | null;
|
|
6034
6705
|
/**
|
|
6035
6706
|
* The number of free granted credits.
|
|
6036
6707
|
* @pattern ^[0-9]+.?[0-9]*$
|
|
6037
6708
|
* @example "10.0"
|
|
6038
6709
|
*/
|
|
6039
|
-
granted_credits?: string;
|
|
6710
|
+
granted_credits?: string | null;
|
|
6040
6711
|
/**
|
|
6041
6712
|
* The number of voided credits.
|
|
6042
6713
|
* @pattern ^[0-9]+.?[0-9]*$
|
|
6043
6714
|
* @example "5.0"
|
|
6044
6715
|
*/
|
|
6045
|
-
voided_credits?: string;
|
|
6716
|
+
voided_credits?: string | null;
|
|
6046
6717
|
/**
|
|
6047
6718
|
* 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.
|
|
6048
6719
|
* @example false
|
|
@@ -6052,12 +6723,7 @@ export interface WalletTransactionCreateInput {
|
|
|
6052
6723
|
* This optional field allows you to store a list of key-value pairs that hold additional information or custom attributes related to the data.
|
|
6053
6724
|
* @example [{"key":"example key","value":"example value"},{"key":"another key","value":"another value"}]
|
|
6054
6725
|
*/
|
|
6055
|
-
metadata?:
|
|
6056
|
-
/** The unique identifier for the attribute. */
|
|
6057
|
-
key?: string;
|
|
6058
|
-
/** The value associated with the key. */
|
|
6059
|
-
value?: string;
|
|
6060
|
-
}[];
|
|
6726
|
+
metadata?: any[] | null;
|
|
6061
6727
|
};
|
|
6062
6728
|
}
|
|
6063
6729
|
export interface WalletTransactionObject {
|
|
@@ -6079,10 +6745,10 @@ export interface WalletTransactionObject {
|
|
|
6079
6745
|
*/
|
|
6080
6746
|
status: "pending" | "settled" | "failed";
|
|
6081
6747
|
/**
|
|
6082
|
-
* The source field represents the origin or trigger of the wallet transaction. Possible values are `manual`, `interval
|
|
6748
|
+
* The source field represents the origin or trigger of the wallet transaction. Possible values are `manual`, `interval`, `threshold`
|
|
6083
6749
|
* @example "manual"
|
|
6084
6750
|
*/
|
|
6085
|
-
source
|
|
6751
|
+
source: "manual" | "interval" | "threshold";
|
|
6086
6752
|
/**
|
|
6087
6753
|
* The transaction status of the wallet transaction. Possible values are `purchased` (with pending or settled status), `granted` (without invoice_id), `voided` or `invoiced`.
|
|
6088
6754
|
* @example "purchased"
|
|
@@ -6125,13 +6791,13 @@ export interface WalletTransactionObject {
|
|
|
6125
6791
|
* @format date-time
|
|
6126
6792
|
* @example "2022-04-29T08:59:51Z"
|
|
6127
6793
|
*/
|
|
6128
|
-
settled_at?: string;
|
|
6794
|
+
settled_at?: string | null;
|
|
6129
6795
|
/**
|
|
6130
6796
|
* The date when the wallet transaction failed, represented in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC).
|
|
6131
6797
|
* @format date-time
|
|
6132
6798
|
* @example "2022-04-29T08:59:51Z"
|
|
6133
6799
|
*/
|
|
6134
|
-
failed_at?: string;
|
|
6800
|
+
failed_at?: string | null;
|
|
6135
6801
|
/**
|
|
6136
6802
|
* The date of the wallet transaction creation, represented in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC).
|
|
6137
6803
|
* @format date-time
|
|
@@ -6428,6 +7094,28 @@ export interface CreditNotePaymentProviderRefundError {
|
|
|
6428
7094
|
payment_provider_code?: string;
|
|
6429
7095
|
provider_error?: string | Record<string, any>;
|
|
6430
7096
|
}
|
|
7097
|
+
export interface DunningCampaignFinishedObject {
|
|
7098
|
+
/**
|
|
7099
|
+
* The customer external unique identifier (provided by your own application).
|
|
7100
|
+
* @example "cus_0987654321"
|
|
7101
|
+
*/
|
|
7102
|
+
customer_external_id: string;
|
|
7103
|
+
/**
|
|
7104
|
+
* Identifier of the dunning campaign.
|
|
7105
|
+
* @example "dun_code_1234"
|
|
7106
|
+
*/
|
|
7107
|
+
dunning_campaign_code: string;
|
|
7108
|
+
/**
|
|
7109
|
+
* The amount of the overdue balance, expressed in cents.
|
|
7110
|
+
* @example 120
|
|
7111
|
+
*/
|
|
7112
|
+
overdue_balance_cents: number;
|
|
7113
|
+
/**
|
|
7114
|
+
* The currency of the balance.
|
|
7115
|
+
* @example "EUR"
|
|
7116
|
+
*/
|
|
7117
|
+
overdue_balance_currency: Currency;
|
|
7118
|
+
}
|
|
6431
7119
|
export interface EventErrorsObject {
|
|
6432
7120
|
/**
|
|
6433
7121
|
* HTTP status code. It will always be 422
|
|
@@ -6435,8 +7123,8 @@ export interface EventErrorsObject {
|
|
|
6435
7123
|
*/
|
|
6436
7124
|
status: number;
|
|
6437
7125
|
/**
|
|
6438
|
-
* HTTP error description. It will always be "Unprocessable
|
|
6439
|
-
* @example "Unprocessable
|
|
7126
|
+
* HTTP error description. It will always be "Unprocessable entity"
|
|
7127
|
+
* @example "Unprocessable entity"
|
|
6440
7128
|
*/
|
|
6441
7129
|
error: string;
|
|
6442
7130
|
message: string | Record<string, any>;
|
|
@@ -6458,6 +7146,8 @@ export interface EventsErrorsObject {
|
|
|
6458
7146
|
* @example ["transaction_1234567890"]
|
|
6459
7147
|
*/
|
|
6460
7148
|
invalid_filter_values: string[];
|
|
7149
|
+
/** @deprecated */
|
|
7150
|
+
missing_group_key: string[];
|
|
6461
7151
|
}
|
|
6462
7152
|
export interface FeeTaxProviderErrorObject {
|
|
6463
7153
|
/**
|
|
@@ -6645,10 +7335,8 @@ export interface WalletTransactionPaymentFailureObject {
|
|
|
6645
7335
|
payment_provider_code?: string;
|
|
6646
7336
|
provider_error?: string | Record<string, any>;
|
|
6647
7337
|
}
|
|
6648
|
-
export interface CreditNotes {
|
|
6649
|
-
credit_notes: CreditNoteObject[];
|
|
6650
|
-
}
|
|
6651
7338
|
export type CustomerPaymentProvidernErrorObject = CustomerPaymentProviderErrorObject;
|
|
7339
|
+
export type PrivilegeObject = FeaturePrivilegeObject;
|
|
6652
7340
|
export type QueryParamsType = Record<string | number, any>;
|
|
6653
7341
|
export type ResponseFormat = keyof Omit<Body, "body" | "bodyUsed">;
|
|
6654
7342
|
export interface FullRequestParams extends Omit<RequestInit, "body"> {
|
|
@@ -6854,7 +7542,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
6854
7542
|
* @request POST:/add_ons
|
|
6855
7543
|
* @secure
|
|
6856
7544
|
*/
|
|
6857
|
-
createAddOn: (data: AddOnCreateInput, params?: RequestParams) => Promise<HttpResponse<AddOn, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorBadRequest>>;
|
|
7545
|
+
createAddOn: (data: AddOnCreateInput, params?: RequestParams) => Promise<HttpResponse<AddOn, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorBadRequest | ApiErrorForbidden>>;
|
|
6858
7546
|
/**
|
|
6859
7547
|
* @description This endpoint is used to list all existing add-ons.
|
|
6860
7548
|
*
|
|
@@ -6875,7 +7563,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
6875
7563
|
* @example 20
|
|
6876
7564
|
*/
|
|
6877
7565
|
per_page?: number;
|
|
6878
|
-
}, params?: RequestParams) => Promise<HttpResponse<AddOnsPaginated, ApiErrorUnauthorized>>;
|
|
7566
|
+
}, params?: RequestParams) => Promise<HttpResponse<AddOnsPaginated, ApiErrorUnauthorized | ApiErrorForbidden>>;
|
|
6879
7567
|
/**
|
|
6880
7568
|
* @description This endpoint is used to update an existing add-on.
|
|
6881
7569
|
*
|
|
@@ -6885,7 +7573,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
6885
7573
|
* @request PUT:/add_ons/{code}
|
|
6886
7574
|
* @secure
|
|
6887
7575
|
*/
|
|
6888
|
-
updateAddOn: (code: string, data: AddOnUpdateInput, params?: RequestParams) => Promise<HttpResponse<AddOn, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorBadRequest | ApiErrorNotFound>>;
|
|
7576
|
+
updateAddOn: (code: string, data: AddOnUpdateInput, params?: RequestParams) => Promise<HttpResponse<AddOn, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorBadRequest | ApiErrorForbidden | ApiErrorNotFound>>;
|
|
6889
7577
|
/**
|
|
6890
7578
|
* @description This endpoint is used to retrieve a specific add-on.
|
|
6891
7579
|
*
|
|
@@ -6895,7 +7583,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
6895
7583
|
* @request GET:/add_ons/{code}
|
|
6896
7584
|
* @secure
|
|
6897
7585
|
*/
|
|
6898
|
-
findAddOn: (code: string, params?: RequestParams) => Promise<HttpResponse<AddOn, ApiErrorUnauthorized | ApiErrorNotFound>>;
|
|
7586
|
+
findAddOn: (code: string, params?: RequestParams) => Promise<HttpResponse<AddOn, ApiErrorUnauthorized | ApiErrorForbidden | ApiErrorNotFound>>;
|
|
6899
7587
|
/**
|
|
6900
7588
|
* @description This endpoint is used to delete an existing add-on.
|
|
6901
7589
|
*
|
|
@@ -6905,7 +7593,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
6905
7593
|
* @request DELETE:/add_ons/{code}
|
|
6906
7594
|
* @secure
|
|
6907
7595
|
*/
|
|
6908
|
-
destroyAddOn: (code: string, params?: RequestParams) => Promise<HttpResponse<AddOn, ApiErrorUnauthorized | ApiErrorNotFound>>;
|
|
7596
|
+
destroyAddOn: (code: string, params?: RequestParams) => Promise<HttpResponse<AddOn, ApiErrorUnauthorized | ApiErrorForbidden | ApiErrorNotFound>>;
|
|
6909
7597
|
};
|
|
6910
7598
|
apiLogs: {
|
|
6911
7599
|
/**
|
|
@@ -6952,9 +7640,9 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
6952
7640
|
"http_statuses[]"?: ("succeeded" | "failed" | number)[];
|
|
6953
7641
|
/**
|
|
6954
7642
|
* Filter results by API version
|
|
6955
|
-
* @example
|
|
7643
|
+
* @example "v1"
|
|
6956
7644
|
*/
|
|
6957
|
-
|
|
7645
|
+
api_version?: string;
|
|
6958
7646
|
/**
|
|
6959
7647
|
* Filter results by the path of the request
|
|
6960
7648
|
* @example "/billable_metrics/"
|
|
@@ -6995,7 +7683,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
6995
7683
|
* @example 12
|
|
6996
7684
|
*/
|
|
6997
7685
|
months?: number;
|
|
6998
|
-
}, params?: RequestParams) => Promise<HttpResponse<GrossRevenues, ApiErrorUnauthorized>>;
|
|
7686
|
+
}, params?: RequestParams) => Promise<HttpResponse<GrossRevenues, ApiErrorUnauthorized | ApiErrorForbidden>>;
|
|
6999
7687
|
/**
|
|
7000
7688
|
* @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`.
|
|
7001
7689
|
*
|
|
@@ -7056,7 +7744,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
7056
7744
|
* @example 12
|
|
7057
7745
|
*/
|
|
7058
7746
|
months?: number;
|
|
7059
|
-
}, params?: RequestParams) => Promise<HttpResponse<Mrrs, ApiErrorUnauthorized>>;
|
|
7747
|
+
}, params?: RequestParams) => Promise<HttpResponse<Mrrs, ApiErrorUnauthorized | ApiErrorForbidden>>;
|
|
7060
7748
|
/**
|
|
7061
7749
|
* @description Overdue balance is the total amount associated with overdue invoices (invoices with pending or failed payments which are past their due dates).
|
|
7062
7750
|
*
|
|
@@ -7079,7 +7767,69 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
7079
7767
|
* @example 12
|
|
7080
7768
|
*/
|
|
7081
7769
|
months?: number;
|
|
7082
|
-
}, params?: RequestParams) => Promise<HttpResponse<OverdueBalances, ApiErrorUnauthorized>>;
|
|
7770
|
+
}, params?: RequestParams) => Promise<HttpResponse<OverdueBalances, ApiErrorUnauthorized | ApiErrorForbidden>>;
|
|
7771
|
+
/**
|
|
7772
|
+
* @description Returns usages.
|
|
7773
|
+
*
|
|
7774
|
+
* @tags analytics
|
|
7775
|
+
* @name FindAllUsages
|
|
7776
|
+
* @summary List usage
|
|
7777
|
+
* @request GET:/analytics/usage
|
|
7778
|
+
* @secure
|
|
7779
|
+
*/
|
|
7780
|
+
findAllUsages: (query?: {
|
|
7781
|
+
/**
|
|
7782
|
+
* The time granularity of usage analytics. Possible values are 'daily', 'weekly', 'monthly', 'yearly'.
|
|
7783
|
+
* @example "monthly"
|
|
7784
|
+
*/
|
|
7785
|
+
time_granularity?: "daily" | "weekly" | "monthly";
|
|
7786
|
+
/** The currency of usage analytics. Format must be ISO 4217. */
|
|
7787
|
+
currency?: Currency;
|
|
7788
|
+
/**
|
|
7789
|
+
* The start date of the period for which the usage analytics is calculated.
|
|
7790
|
+
* @format date
|
|
7791
|
+
* @example "2023-11-01"
|
|
7792
|
+
*/
|
|
7793
|
+
from_date?: string;
|
|
7794
|
+
/**
|
|
7795
|
+
* The end date of the period for which the usage analytics is calculated.
|
|
7796
|
+
* @format date
|
|
7797
|
+
* @example "2023-11-30"
|
|
7798
|
+
*/
|
|
7799
|
+
to_date?: string;
|
|
7800
|
+
/**
|
|
7801
|
+
* The type of customer for which the usage analytics is calculated. Possible values are 'individual', 'company'.
|
|
7802
|
+
* @example "individual"
|
|
7803
|
+
*/
|
|
7804
|
+
customer_type?: "individual" | "company";
|
|
7805
|
+
/**
|
|
7806
|
+
* The external identifier of the customer for which the usage analytics is calculated.
|
|
7807
|
+
* @example "ext-customer-123"
|
|
7808
|
+
*/
|
|
7809
|
+
external_customer_id?: string;
|
|
7810
|
+
/** The country of the customer for which the usage analytics is calculated. */
|
|
7811
|
+
customer_country?: Country;
|
|
7812
|
+
/**
|
|
7813
|
+
* The external identifier of the subscription for which the usage analytics is calculated.
|
|
7814
|
+
* @example "ext-subscription-123"
|
|
7815
|
+
*/
|
|
7816
|
+
external_subscription_id?: string;
|
|
7817
|
+
/**
|
|
7818
|
+
* Indicates whether the billable metric associated with the usage is recurring.
|
|
7819
|
+
* @example true
|
|
7820
|
+
*/
|
|
7821
|
+
is_billable_metric_recurring?: boolean;
|
|
7822
|
+
/**
|
|
7823
|
+
* The code of the plan for which the usage analytics is calculated.
|
|
7824
|
+
* @example "plan-code-123"
|
|
7825
|
+
*/
|
|
7826
|
+
plan_code?: string;
|
|
7827
|
+
/**
|
|
7828
|
+
* The code of the usage-based billable metrics for which the usage analytics is calculated.
|
|
7829
|
+
* @example "code1"
|
|
7830
|
+
*/
|
|
7831
|
+
billable_metric_code?: string;
|
|
7832
|
+
}, params?: RequestParams) => Promise<HttpResponse<Usages, ApiErrorUnauthorized>>;
|
|
7083
7833
|
};
|
|
7084
7834
|
appliedCoupons: {
|
|
7085
7835
|
/**
|
|
@@ -7202,6 +7952,81 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
7202
7952
|
*/
|
|
7203
7953
|
findBillableMetric: (code: string, params?: RequestParams) => Promise<HttpResponse<BillableMetric, ApiErrorUnauthorized | ApiErrorNotFound>>;
|
|
7204
7954
|
};
|
|
7955
|
+
features: {
|
|
7956
|
+
/**
|
|
7957
|
+
* @description This endpoint creates a new feature representing an entitlement component of your application.
|
|
7958
|
+
*
|
|
7959
|
+
* @tags features
|
|
7960
|
+
* @name CreateFeature
|
|
7961
|
+
* @summary Create a feature
|
|
7962
|
+
* @request POST:/features
|
|
7963
|
+
* @secure
|
|
7964
|
+
*/
|
|
7965
|
+
createFeature: (data: FeatureCreateInput, params?: RequestParams) => Promise<HttpResponse<Feature, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorBadRequest>>;
|
|
7966
|
+
/**
|
|
7967
|
+
* @description This endpoint retrieves all existing features that represent entitlement components of your application.
|
|
7968
|
+
*
|
|
7969
|
+
* @tags features
|
|
7970
|
+
* @name FindAllFeatures
|
|
7971
|
+
* @summary List all features
|
|
7972
|
+
* @request GET:/features
|
|
7973
|
+
* @secure
|
|
7974
|
+
*/
|
|
7975
|
+
findAllFeatures: (query?: {
|
|
7976
|
+
/**
|
|
7977
|
+
* Page number.
|
|
7978
|
+
* @example 1
|
|
7979
|
+
*/
|
|
7980
|
+
page?: number;
|
|
7981
|
+
/**
|
|
7982
|
+
* Number of records per page.
|
|
7983
|
+
* @example 20
|
|
7984
|
+
*/
|
|
7985
|
+
per_page?: number;
|
|
7986
|
+
/** Search in name, code and description. */
|
|
7987
|
+
search_term?: string;
|
|
7988
|
+
}, params?: RequestParams) => Promise<HttpResponse<FeaturesPaginated, ApiErrorUnauthorized>>;
|
|
7989
|
+
/**
|
|
7990
|
+
* @description This endpoint updates an existing feature representing an entitlement component of your application.
|
|
7991
|
+
*
|
|
7992
|
+
* @tags features
|
|
7993
|
+
* @name UpdateFeature
|
|
7994
|
+
* @summary Update a feature
|
|
7995
|
+
* @request PUT:/features/{code}
|
|
7996
|
+
* @secure
|
|
7997
|
+
*/
|
|
7998
|
+
updateFeature: (code: string, data: FeatureUpdateInput, params?: RequestParams) => Promise<HttpResponse<Feature, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorBadRequest | ApiErrorForbidden | ApiErrorNotFound>>;
|
|
7999
|
+
/**
|
|
8000
|
+
* @description This endpoint deletes an existing feature representing an entitlement component of your application. Deleting a feature will remove it from all plans and subscriptions.
|
|
8001
|
+
*
|
|
8002
|
+
* @tags features
|
|
8003
|
+
* @name DestroyFeature
|
|
8004
|
+
* @summary Delete a feature
|
|
8005
|
+
* @request DELETE:/features/{code}
|
|
8006
|
+
* @secure
|
|
8007
|
+
*/
|
|
8008
|
+
destroyFeature: (code: string, params?: RequestParams) => Promise<HttpResponse<Feature, ApiErrorUnauthorized | ApiErrorNotFound>>;
|
|
8009
|
+
/**
|
|
8010
|
+
* @description This endpoint retrieves an existing feature that represents an entitlement component of your application. The feature is identified by its unique code.
|
|
8011
|
+
*
|
|
8012
|
+
* @tags features
|
|
8013
|
+
* @name FindFeature
|
|
8014
|
+
* @summary Retrieve a feature
|
|
8015
|
+
* @request GET:/features/{code}
|
|
8016
|
+
* @secure
|
|
8017
|
+
*/
|
|
8018
|
+
findFeature: (code: string, params?: RequestParams) => Promise<HttpResponse<Feature, ApiErrorUnauthorized | ApiErrorNotFound>>;
|
|
8019
|
+
/**
|
|
8020
|
+
* @description Delete privilege from feature. Deleting a privilege removes it from all plans and subscriptions.
|
|
8021
|
+
*
|
|
8022
|
+
* @tags features
|
|
8023
|
+
* @name DeleteFeaturePrivilege
|
|
8024
|
+
* @summary Delete a privilege. Deleting a privilege removes it from all plans and subscriptions.
|
|
8025
|
+
* @request DELETE:/features/{code}/privileges/{privilege_code}
|
|
8026
|
+
* @secure
|
|
8027
|
+
*/
|
|
8028
|
+
deleteFeaturePrivilege: (code: string, privilegeCode: string, params?: RequestParams) => Promise<HttpResponse<Feature, ApiErrorUnauthorized | ApiErrorNotFound>>;
|
|
8029
|
+
};
|
|
7205
8030
|
coupons: {
|
|
7206
8031
|
/**
|
|
7207
8032
|
* @description This endpoint is used to create a coupon that can be then attached to a customer to create a discount.
|
|
@@ -7518,6 +8343,28 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
7518
8343
|
*/
|
|
7519
8344
|
apply_taxes?: boolean;
|
|
7520
8345
|
}, params?: RequestParams) => Promise<HttpResponse<CustomerUsage, ApiErrorUnauthorized | ApiErrorNotFound>>;
|
|
8346
|
+
/**
|
|
8347
|
+
* @description This endpoint enables the retrieval of the usage-based billing data for a customer within the current period. It also returns the projected usage for the current period based on the current usage.
|
|
8348
|
+
*
|
|
8349
|
+
* @tags customers
|
|
8350
|
+
* @name FindCustomerProjectedUsage
|
|
8351
|
+
* @summary Retrieve customer current and projected usage
|
|
8352
|
+
* @request GET:/customers/{external_customer_id}/projected_usage
|
|
8353
|
+
* @secure
|
|
8354
|
+
*/
|
|
8355
|
+
findCustomerProjectedUsage: (externalCustomerId: string, query: {
|
|
8356
|
+
/**
|
|
8357
|
+
* The unique identifier of the subscription within your application.
|
|
8358
|
+
* @example "sub_1234567890"
|
|
8359
|
+
*/
|
|
8360
|
+
external_subscription_id: string;
|
|
8361
|
+
/**
|
|
8362
|
+
* Optional flag to determine if taxes should be applied. Defaults to `true` if not provided or if null.
|
|
8363
|
+
* @default true
|
|
8364
|
+
* @example true
|
|
8365
|
+
*/
|
|
8366
|
+
apply_taxes?: boolean;
|
|
8367
|
+
}, params?: RequestParams) => Promise<HttpResponse<CustomerProjectedUsage, ApiErrorUnauthorized | ApiErrorForbidden | ApiErrorNotFound>>;
|
|
7521
8368
|
/**
|
|
7522
8369
|
* @description This endpoint enables the retrieval of the usage-based billing data for a customer within past periods.
|
|
7523
8370
|
*
|
|
@@ -7575,7 +8422,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
7575
8422
|
* @request POST:/events
|
|
7576
8423
|
* @secure
|
|
7577
8424
|
*/
|
|
7578
|
-
createEvent: (data: EventInput, params?: RequestParams) => Promise<HttpResponse<
|
|
8425
|
+
createEvent: (data: EventInput, params?: RequestParams) => Promise<HttpResponse<EventCreated, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorBadRequest | ApiErrorForbidden>>;
|
|
7579
8426
|
/**
|
|
7580
8427
|
* @description This endpoint is used for retrieving all events.
|
|
7581
8428
|
*
|
|
@@ -7618,7 +8465,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
7618
8465
|
* @example "2022-08-08T00:00:00Z"
|
|
7619
8466
|
*/
|
|
7620
8467
|
timestamp_to?: string;
|
|
7621
|
-
}, params?: RequestParams) => Promise<HttpResponse<EventsPaginated, ApiErrorUnauthorized>>;
|
|
8468
|
+
}, params?: RequestParams) => Promise<HttpResponse<EventsPaginated, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorForbidden>>;
|
|
7622
8469
|
/**
|
|
7623
8470
|
* @description This endpoint can be used to send a batch of usage records. Each request may include up to 100 events.
|
|
7624
8471
|
*
|
|
@@ -7628,7 +8475,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
7628
8475
|
* @request POST:/events/batch
|
|
7629
8476
|
* @secure
|
|
7630
8477
|
*/
|
|
7631
|
-
createBatchEvents: (data: EventBatchInput, params?: RequestParams) => Promise<HttpResponse<
|
|
8478
|
+
createBatchEvents: (data: EventBatchInput, params?: RequestParams) => Promise<HttpResponse<EventsCreated, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorBadRequest | ApiErrorForbidden>>;
|
|
7632
8479
|
/**
|
|
7633
8480
|
* @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
|
|
7634
8481
|
*
|
|
@@ -7638,7 +8485,27 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
7638
8485
|
* @request POST:/events/estimate_fees
|
|
7639
8486
|
* @secure
|
|
7640
8487
|
*/
|
|
7641
|
-
eventEstimateFees: (data: EventEstimateFeesInput, params?: RequestParams) => Promise<HttpResponse<Fees, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorBadRequest | ApiErrorNotFound>>;
|
|
8488
|
+
eventEstimateFees: (data: EventEstimateFeesInput, params?: RequestParams) => Promise<HttpResponse<Fees, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorBadRequest | ApiErrorForbidden | ApiErrorNotFound>>;
|
|
8489
|
+
/**
|
|
8490
|
+
* @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
|
|
8491
|
+
*
|
|
8492
|
+
* @tags events
|
|
8493
|
+
* @name EventEstimateInstantFees
|
|
8494
|
+
* @summary Estimate instant fees for a pay in advance charge
|
|
8495
|
+
* @request POST:/events/estimate_instant_fees
|
|
8496
|
+
* @secure
|
|
8497
|
+
*/
|
|
8498
|
+
eventEstimateInstantFees: (data: EventEstimateInstantFeesInput, params?: RequestParams) => Promise<HttpResponse<FeesEstimate, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorBadRequest | ApiErrorForbidden | ApiErrorNotFound>>;
|
|
8499
|
+
/**
|
|
8500
|
+
* @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
|
|
8501
|
+
*
|
|
8502
|
+
* @tags events
|
|
8503
|
+
* @name EventBatchEstimateInstantFees
|
|
8504
|
+
* @summary Batch estimate instant fees for a pay in advance charge
|
|
8505
|
+
* @request POST:/events/batch_estimate_instant_fees
|
|
8506
|
+
* @secure
|
|
8507
|
+
*/
|
|
8508
|
+
eventBatchEstimateInstantFees: (data: EventBatchEstimateInstantFeesInput, params?: RequestParams) => Promise<HttpResponse<FeesEstimate, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorBadRequest | ApiErrorForbidden | ApiErrorNotFound>>;
|
|
7642
8509
|
/**
|
|
7643
8510
|
* @description This endpoint is used for retrieving a specific usage measurement event that has been sent to a customer or a subscription.
|
|
7644
8511
|
*
|
|
@@ -7648,7 +8515,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
7648
8515
|
* @request GET:/events/{transaction_id}
|
|
7649
8516
|
* @secure
|
|
7650
8517
|
*/
|
|
7651
|
-
findEvent: (transactionId: string, params?: RequestParams) => Promise<HttpResponse<Event, ApiErrorUnauthorized | ApiErrorNotFound>>;
|
|
8518
|
+
findEvent: (transactionId: string, params?: RequestParams) => Promise<HttpResponse<Event, ApiErrorUnauthorized | ApiErrorForbidden | ApiErrorNotFound>>;
|
|
7652
8519
|
};
|
|
7653
8520
|
fees: {
|
|
7654
8521
|
/**
|
|
@@ -7686,13 +8553,13 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
7686
8553
|
* @example "et_12345678"
|
|
7687
8554
|
*/
|
|
7688
8555
|
event_transaction_id?: string;
|
|
7689
|
-
/** Filter results by fee
|
|
8556
|
+
/** Filter results by fee"s currency. */
|
|
7690
8557
|
currency?: Currency;
|
|
7691
8558
|
/**
|
|
7692
|
-
* The fee type. Possible values are `add-on`, `charge`, `credit` or
|
|
8559
|
+
* The fee type. Possible values are `add-on`, `charge`, `credit`, `subscription` or "commitment".
|
|
7693
8560
|
* @example "charge"
|
|
7694
8561
|
*/
|
|
7695
|
-
fee_type?: "charge" | "add_on" | "subscription" | "credit" | "
|
|
8562
|
+
fee_type?: "charge" | "add_on" | "subscription" | "credit" | "commitment";
|
|
7696
8563
|
/**
|
|
7697
8564
|
* Filter results by the `code` of the billable metric attached to the fee. Only applies to `charge` types.
|
|
7698
8565
|
* @example "bm_code"
|
|
@@ -8080,7 +8947,22 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
8080
8947
|
* @example "5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba"
|
|
8081
8948
|
*/
|
|
8082
8949
|
external_customer_id?: string;
|
|
8950
|
+
/**
|
|
8951
|
+
* Filter by payment status. Possible values are `pending`, `failed` or `succeeded`.
|
|
8952
|
+
* @example "pending"
|
|
8953
|
+
*/
|
|
8954
|
+
payment_status?: "pending" | "failed" | "succeeded";
|
|
8083
8955
|
}, params?: RequestParams) => Promise<HttpResponse<PaymentRequestsPaginated, ApiErrorUnauthorized>>;
|
|
8956
|
+
/**
|
|
8957
|
+
* @description This endpoint retrieves a specific payment request by its ID.
|
|
8958
|
+
*
|
|
8959
|
+
* @tags payment_requests
|
|
8960
|
+
* @name FindPaymentRequest
|
|
8961
|
+
* @summary Retrieve a payment request
|
|
8962
|
+
* @request GET:/payment_requests/{lago_id}
|
|
8963
|
+
* @secure
|
|
8964
|
+
*/
|
|
8965
|
+
findPaymentRequest: (lagoId: string, params?: RequestParams) => Promise<HttpResponse<PaymentRequestObject, ApiErrorUnauthorized | ApiErrorNotFound>>;
|
|
8084
8966
|
};
|
|
8085
8967
|
payments: {
|
|
8086
8968
|
/**
|
|
@@ -8198,6 +9080,66 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
8198
9080
|
* @secure
|
|
8199
9081
|
*/
|
|
8200
9082
|
destroyPlan: (code: string, params?: RequestParams) => Promise<HttpResponse<Plan, ApiErrorUnauthorized | ApiErrorNotFound>>;
|
|
9083
|
+
/**
|
|
9084
|
+
* @description This endpoint creates a new entitlement by adding a feature to a plan. The feature must exist and all privileges must be valid for the feature.
|
|
9085
|
+
*
|
|
9086
|
+
* @tags entitlements
|
|
9087
|
+
* @name CreateEntitlement
|
|
9088
|
+
* @summary Create an entitlement
|
|
9089
|
+
* @request POST:/plans/{code}/entitlements
|
|
9090
|
+
* @secure
|
|
9091
|
+
*/
|
|
9092
|
+
createEntitlement: (code: string, data: EntitlementUpdateInput, params?: RequestParams) => Promise<HttpResponse<PlanEntitlement, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorBadRequest | ApiErrorNotFound>>;
|
|
9093
|
+
/**
|
|
9094
|
+
* @description This endpoint retrieves all entitlements for a specific plan.
|
|
9095
|
+
*
|
|
9096
|
+
* @tags entitlements
|
|
9097
|
+
* @name FindAllEntitlements
|
|
9098
|
+
* @summary List all entitlements
|
|
9099
|
+
* @request GET:/plans/{code}/entitlements
|
|
9100
|
+
* @secure
|
|
9101
|
+
*/
|
|
9102
|
+
findAllEntitlements: (code: string, params?: RequestParams) => Promise<HttpResponse<PlanEntitlements, ApiErrorUnauthorized | ApiErrorNotFound>>;
|
|
9103
|
+
/**
|
|
9104
|
+
* @description This endpoint updates an existing entitlement by modifying privilege values. Notice that the update is partial. All new privileges or features are added. If there is already a value, it's overridden. All feature and privileges not part of the payload are ignored. To remove privileges or feature, use the delete endpoints. All privileges must be valid for the feature.
|
|
9105
|
+
*
|
|
9106
|
+
* @tags entitlements
|
|
9107
|
+
* @name UpdateEntitlement
|
|
9108
|
+
* @summary Partial update of an entitlement
|
|
9109
|
+
* @request PATCH:/plans/{code}/entitlements
|
|
9110
|
+
* @secure
|
|
9111
|
+
*/
|
|
9112
|
+
updateEntitlement: (code: string, data: EntitlementUpdateInput, params?: RequestParams) => Promise<HttpResponse<PlanEntitlement, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorBadRequest | ApiErrorNotFound>>;
|
|
9113
|
+
/**
|
|
9114
|
+
* @description This endpoint retrieves a specific entitlement for a plan.
|
|
9115
|
+
*
|
|
9116
|
+
* @tags entitlements
|
|
9117
|
+
* @name FindEntitlement
|
|
9118
|
+
* @summary Retrieve an entitlement
|
|
9119
|
+
* @request GET:/plans/{code}/entitlements/{feature_code}
|
|
9120
|
+
* @secure
|
|
9121
|
+
*/
|
|
9122
|
+
findEntitlement: (code: string, featureCode: string, params?: RequestParams) => Promise<HttpResponse<PlanEntitlement, ApiErrorUnauthorized | ApiErrorNotFound>>;
|
|
9123
|
+
/**
|
|
9124
|
+
* @description This endpoint deletes an existing entitlement by removing the feature from the plan.
|
|
9125
|
+
*
|
|
9126
|
+
* @tags entitlements
|
|
9127
|
+
* @name DestroyEntitlement
|
|
9128
|
+
* @summary Delete an entitlement
|
|
9129
|
+
* @request DELETE:/plans/{code}/entitlements/{feature_code}
|
|
9130
|
+
* @secure
|
|
9131
|
+
*/
|
|
9132
|
+
destroyEntitlement: (code: string, featureCode: string, params?: RequestParams) => Promise<HttpResponse<PlanEntitlement, ApiErrorUnauthorized | ApiErrorNotFound>>;
|
|
9133
|
+
/**
|
|
9134
|
+
* @description This endpoint removes a specific privilege and its value from an entitlement. The privilege remains untouched on the original feature.
|
|
9135
|
+
*
|
|
9136
|
+
* @tags entitlements
|
|
9137
|
+
* @name RemoveEntitlementPrivilege
|
|
9138
|
+
* @summary Remove a privilege from an entitlement
|
|
9139
|
+
* @request DELETE:/plans/{code}/entitlements/{feature_code}/privileges/{privilege_code}
|
|
9140
|
+
* @secure
|
|
9141
|
+
*/
|
|
9142
|
+
removeEntitlementPrivilege: (code: string, featureCode: string, privilegeCode: string, params?: RequestParams) => Promise<HttpResponse<PlanEntitlement, ApiErrorUnauthorized | ApiErrorNotFound>>;
|
|
8201
9143
|
};
|
|
8202
9144
|
subscriptions: {
|
|
8203
9145
|
/**
|
|
@@ -8289,6 +9231,27 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
8289
9231
|
* @example "pending"
|
|
8290
9232
|
*/
|
|
8291
9233
|
status?: string;
|
|
9234
|
+
/**
|
|
9235
|
+
* 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.
|
|
9236
|
+
* This field allows you to control the behavior of the credit note generation:
|
|
9237
|
+
*
|
|
9238
|
+
* - `credit`: A credit note is generated for the unused subscription time. The unused amount is credited back to the customer.
|
|
9239
|
+
* - `refund`: A credit note is generated for the unused subscription time. If the invoice is paid or partially paid, the unused paid amount is refunded; any unpaid unused amount is credited back to the customer.
|
|
9240
|
+
* - `skip`: No credit note is generated for the unused subscription time.
|
|
9241
|
+
*
|
|
9242
|
+
* _Note: This field is only applicable to pay-in-advance plans and is ignored for pay-in-arrears plans._
|
|
9243
|
+
* @example "credit"
|
|
9244
|
+
*/
|
|
9245
|
+
on_termination_credit_note?: "credit" | "refund" | "skip";
|
|
9246
|
+
/**
|
|
9247
|
+
* When a subscription is terminated before the end of its billing period, we generate an invoice for the unbilled usage.
|
|
9248
|
+
* This field allows you to control the behavior of the invoice generation:
|
|
9249
|
+
*
|
|
9250
|
+
* - `generate`: An invoice is generated for the unbilled usage.
|
|
9251
|
+
* - `skip`: No invoice is generated for the unbilled usage.
|
|
9252
|
+
* @example "generate"
|
|
9253
|
+
*/
|
|
9254
|
+
on_termination_invoice?: "generate" | "skip";
|
|
8292
9255
|
}, params?: RequestParams) => Promise<HttpResponse<Subscription, ApiErrorUnauthorized | ApiErrorNotFound | ApiErrorNotAllowed>>;
|
|
8293
9256
|
/**
|
|
8294
9257
|
* @description This endpoint enables the retrieval of the lifetime usage of a subscription.
|
|
@@ -8360,6 +9323,46 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
8360
9323
|
* @secure
|
|
8361
9324
|
*/
|
|
8362
9325
|
deleteSubscriptionAlert: (externalId: string, code: string, params?: RequestParams) => Promise<HttpResponse<Alert, ApiErrorUnauthorized | ApiErrorNotFound>>;
|
|
9326
|
+
/**
|
|
9327
|
+
* @description This endpoint retrieves all entitlements for a specific subscription, including both plan entitlements and any subscription-specific overrides.
|
|
9328
|
+
*
|
|
9329
|
+
* @tags entitlements
|
|
9330
|
+
* @name FindAllSubscriptionEntitlements
|
|
9331
|
+
* @summary List all subscription entitlements
|
|
9332
|
+
* @request GET:/subscriptions/{external_id}/entitlements
|
|
9333
|
+
* @secure
|
|
9334
|
+
*/
|
|
9335
|
+
findAllSubscriptionEntitlements: (externalId: string, params?: RequestParams) => Promise<HttpResponse<SubscriptionEntitlements, ApiErrorUnauthorized | ApiErrorNotFound>>;
|
|
9336
|
+
/**
|
|
9337
|
+
* @description This endpoint allows partial updates to subscription entitlements. New entitlements are added, provided values are overridden, but entitlements not included in the payload are ignored.
|
|
9338
|
+
*
|
|
9339
|
+
* @tags entitlements
|
|
9340
|
+
* @name UpdateSubscriptionEntitlements
|
|
9341
|
+
* @summary Update subscription entitlements
|
|
9342
|
+
* @request PATCH:/subscriptions/{external_id}/entitlements
|
|
9343
|
+
* @secure
|
|
9344
|
+
*/
|
|
9345
|
+
updateSubscriptionEntitlements: (externalId: string, data: EntitlementUpdateInput, params?: RequestParams) => Promise<HttpResponse<SubscriptionEntitlements, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorBadRequest | ApiErrorNotFound>>;
|
|
9346
|
+
/**
|
|
9347
|
+
* @description This endpoint removes a specific feature entitlement from a subscription. The entitlement remains available from the plan.
|
|
9348
|
+
*
|
|
9349
|
+
* @tags entitlements
|
|
9350
|
+
* @name DestroySubscriptionEntitlement
|
|
9351
|
+
* @summary Remove an entitlement from a subscription
|
|
9352
|
+
* @request DELETE:/subscriptions/{external_id}/entitlements/{feature_code}
|
|
9353
|
+
* @secure
|
|
9354
|
+
*/
|
|
9355
|
+
destroySubscriptionEntitlement: (externalId: string, featureCode: string, params?: RequestParams) => Promise<HttpResponse<SubscriptionEntitlement, ApiErrorUnauthorized | ApiErrorNotFound>>;
|
|
9356
|
+
/**
|
|
9357
|
+
* @description This endpoint removes a specific privilege from a subscription entitlement. The privilege entitlement remains available from the plan.
|
|
9358
|
+
*
|
|
9359
|
+
* @tags entitlements
|
|
9360
|
+
* @name DestroySubscriptionEntitlementPrivilege
|
|
9361
|
+
* @summary Remove a privilege from a subscription entitlement override
|
|
9362
|
+
* @request DELETE:/subscriptions/{external_id}/entitlements/{feature_code}/privileges/{privilege_code}
|
|
9363
|
+
* @secure
|
|
9364
|
+
*/
|
|
9365
|
+
destroySubscriptionEntitlementPrivilege: (externalId: string, featureCode: string, privilegeCode: string, params?: RequestParams) => Promise<HttpResponse<SubscriptionEntitlement, ApiErrorUnauthorized | ApiErrorBadRequest | ApiErrorNotFound>>;
|
|
8363
9366
|
};
|
|
8364
9367
|
taxes: {
|
|
8365
9368
|
/**
|
|
@@ -8434,7 +9437,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
8434
9437
|
* @request POST:/wallets
|
|
8435
9438
|
* @secure
|
|
8436
9439
|
*/
|
|
8437
|
-
createWallet: (data: WalletCreateInput, params?: RequestParams) => Promise<HttpResponse<Wallet, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorBadRequest>>;
|
|
9440
|
+
createWallet: (data: WalletCreateInput, params?: RequestParams) => Promise<HttpResponse<Wallet, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorBadRequest | ApiErrorForbidden>>;
|
|
8438
9441
|
/**
|
|
8439
9442
|
* @description This endpoint is used to list all wallets with prepaid credits.
|
|
8440
9443
|
*
|
|
@@ -8460,7 +9463,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
8460
9463
|
* @example "5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba"
|
|
8461
9464
|
*/
|
|
8462
9465
|
external_customer_id: string;
|
|
8463
|
-
}, params?: RequestParams) => Promise<HttpResponse<WalletsPaginated, ApiErrorUnauthorized>>;
|
|
9466
|
+
}, params?: RequestParams) => Promise<HttpResponse<WalletsPaginated, ApiErrorUnauthorized | ApiErrorForbidden>>;
|
|
8464
9467
|
/**
|
|
8465
9468
|
* @description This endpoint is used to update an existing wallet with prepaid credits.
|
|
8466
9469
|
*
|
|
@@ -8470,7 +9473,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
8470
9473
|
* @request PUT:/wallets/{lago_id}
|
|
8471
9474
|
* @secure
|
|
8472
9475
|
*/
|
|
8473
|
-
updateWallet: (lagoId: string, data: WalletUpdateInput, params?: RequestParams) => Promise<HttpResponse<Wallet, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorBadRequest | ApiErrorNotFound>>;
|
|
9476
|
+
updateWallet: (lagoId: string, data: WalletUpdateInput, params?: RequestParams) => Promise<HttpResponse<Wallet, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorBadRequest | ApiErrorForbidden | ApiErrorNotFound>>;
|
|
8474
9477
|
/**
|
|
8475
9478
|
* @description This endpoint is used to retrieve an existing wallet with prepaid credits.
|
|
8476
9479
|
*
|
|
@@ -8480,7 +9483,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
8480
9483
|
* @request GET:/wallets/{lago_id}
|
|
8481
9484
|
* @secure
|
|
8482
9485
|
*/
|
|
8483
|
-
findWallet: (lagoId: string, params?: RequestParams) => Promise<HttpResponse<Wallet, ApiErrorUnauthorized | ApiErrorNotFound>>;
|
|
9486
|
+
findWallet: (lagoId: string, params?: RequestParams) => Promise<HttpResponse<Wallet, ApiErrorUnauthorized | ApiErrorForbidden | ApiErrorNotFound>>;
|
|
8484
9487
|
/**
|
|
8485
9488
|
* @description This endpoint is used to terminate an existing wallet with prepaid credits.
|
|
8486
9489
|
*
|
|
@@ -8490,7 +9493,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
8490
9493
|
* @request DELETE:/wallets/{lago_id}
|
|
8491
9494
|
* @secure
|
|
8492
9495
|
*/
|
|
8493
|
-
destroyWallet: (lagoId: string, params?: RequestParams) => Promise<HttpResponse<Wallet, ApiErrorUnauthorized |
|
|
9496
|
+
destroyWallet: (lagoId: string, params?: RequestParams) => Promise<HttpResponse<Wallet, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorForbidden | ApiErrorNotFound>>;
|
|
8494
9497
|
/**
|
|
8495
9498
|
* @description This endpoint is used to list all wallet transactions.
|
|
8496
9499
|
*
|
|
@@ -8526,7 +9529,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
8526
9529
|
* @example "inbound"
|
|
8527
9530
|
*/
|
|
8528
9531
|
transaction_type?: string;
|
|
8529
|
-
}, params?: RequestParams) => Promise<HttpResponse<WalletTransactionsPaginated, ApiErrorUnauthorized | ApiErrorNotFound>>;
|
|
9532
|
+
}, params?: RequestParams) => Promise<HttpResponse<WalletTransactionsPaginated, ApiErrorUnauthorized | ApiErrorForbidden | ApiErrorNotFound>>;
|
|
8530
9533
|
};
|
|
8531
9534
|
walletTransactions: {
|
|
8532
9535
|
/**
|
|
@@ -8538,7 +9541,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
8538
9541
|
* @request POST:/wallet_transactions
|
|
8539
9542
|
* @secure
|
|
8540
9543
|
*/
|
|
8541
|
-
createWalletTransaction: (data: WalletTransactionCreateInput, params?: RequestParams) => Promise<HttpResponse<WalletTransactions, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorBadRequest>>;
|
|
9544
|
+
createWalletTransaction: (data: WalletTransactionCreateInput, params?: RequestParams) => Promise<HttpResponse<WalletTransactions, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorBadRequest | ApiErrorForbidden>>;
|
|
8542
9545
|
/**
|
|
8543
9546
|
* @description This endpoint is used to retrieve a specific wallet transactions.
|
|
8544
9547
|
*
|
|
@@ -8548,7 +9551,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
8548
9551
|
* @request GET:/wallet_transactions/{lago_id}
|
|
8549
9552
|
* @secure
|
|
8550
9553
|
*/
|
|
8551
|
-
findWalletTransaction: (lagoId: string, params?: RequestParams) => Promise<HttpResponse<WalletTransactionObject, ApiErrorUnauthorized | ApiErrorNotFound>>;
|
|
9554
|
+
findWalletTransaction: (lagoId: string, params?: RequestParams) => Promise<HttpResponse<WalletTransactionObject, ApiErrorUnauthorized | ApiErrorForbidden | ApiErrorNotFound>>;
|
|
8552
9555
|
/**
|
|
8553
9556
|
* @description This endpoint generates a checkout link for a specific wallet transaction.
|
|
8554
9557
|
*
|
|
@@ -8558,7 +9561,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
8558
9561
|
* @request POST:/wallet_transactions/{lago_id}/payment_url
|
|
8559
9562
|
* @secure
|
|
8560
9563
|
*/
|
|
8561
|
-
walletTransactionPaymentUrl: (lagoId: string, params?: RequestParams) => Promise<HttpResponse<WalletTransactionPaymentUrl, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorNotFound>>;
|
|
9564
|
+
walletTransactionPaymentUrl: (lagoId: string, params?: RequestParams) => Promise<HttpResponse<WalletTransactionPaymentUrl, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorForbidden | ApiErrorNotFound>>;
|
|
8562
9565
|
};
|
|
8563
9566
|
webhooks: {
|
|
8564
9567
|
/**
|