lago-javascript-client 0.41.0-beta → 0.43.0-beta
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm/openapi/client.js +0 -34
- package/package.json +1 -1
- package/script/openapi/client.js +0 -34
- package/types/openapi/client.d.ts +100 -72
package/esm/openapi/client.js
CHANGED
|
@@ -1213,40 +1213,6 @@ export class Api extends HttpClient {
|
|
|
1213
1213
|
format: "json",
|
|
1214
1214
|
...params,
|
|
1215
1215
|
}),
|
|
1216
|
-
/**
|
|
1217
|
-
* @description Apply an existing tax to a customer
|
|
1218
|
-
*
|
|
1219
|
-
* @tags customers
|
|
1220
|
-
* @name ApplyTax
|
|
1221
|
-
* @summary Apply a tax
|
|
1222
|
-
* @request POST:/customers/{external_customer_id}/applied_taxes
|
|
1223
|
-
* @secure
|
|
1224
|
-
*/
|
|
1225
|
-
applyTax: (externalCustomerId, data, params = {}) => this.request({
|
|
1226
|
-
path: `/customers/${externalCustomerId}/applied_taxes`,
|
|
1227
|
-
method: "POST",
|
|
1228
|
-
body: data,
|
|
1229
|
-
secure: true,
|
|
1230
|
-
type: ContentType.Json,
|
|
1231
|
-
format: "json",
|
|
1232
|
-
...params,
|
|
1233
|
-
}),
|
|
1234
|
-
/**
|
|
1235
|
-
* @description Delete customer's appplied tax
|
|
1236
|
-
*
|
|
1237
|
-
* @tags customers
|
|
1238
|
-
* @name DeleteAppliedTax
|
|
1239
|
-
* @summary Delete customer's appplied tax
|
|
1240
|
-
* @request DELETE:/customers/{external_customer_id}/applied_taxes/{tax_code}
|
|
1241
|
-
* @secure
|
|
1242
|
-
*/
|
|
1243
|
-
deleteAppliedTax: (externalCustomerId, taxCode, params = {}) => this.request({
|
|
1244
|
-
path: `/customers/${externalCustomerId}/applied_taxes/${taxCode}`,
|
|
1245
|
-
method: "DELETE",
|
|
1246
|
-
secure: true,
|
|
1247
|
-
format: "json",
|
|
1248
|
-
...params,
|
|
1249
|
-
}),
|
|
1250
1216
|
/**
|
|
1251
1217
|
* @description Retrieves an embeddable link for displaying a customer portal. This endpoint allows you to fetch the URL that can be embedded to provide customers access to a dedicated portal
|
|
1252
1218
|
*
|
package/package.json
CHANGED
package/script/openapi/client.js
CHANGED
|
@@ -1217,40 +1217,6 @@ class Api extends HttpClient {
|
|
|
1217
1217
|
format: "json",
|
|
1218
1218
|
...params,
|
|
1219
1219
|
}),
|
|
1220
|
-
/**
|
|
1221
|
-
* @description Apply an existing tax to a customer
|
|
1222
|
-
*
|
|
1223
|
-
* @tags customers
|
|
1224
|
-
* @name ApplyTax
|
|
1225
|
-
* @summary Apply a tax
|
|
1226
|
-
* @request POST:/customers/{external_customer_id}/applied_taxes
|
|
1227
|
-
* @secure
|
|
1228
|
-
*/
|
|
1229
|
-
applyTax: (externalCustomerId, data, params = {}) => this.request({
|
|
1230
|
-
path: `/customers/${externalCustomerId}/applied_taxes`,
|
|
1231
|
-
method: "POST",
|
|
1232
|
-
body: data,
|
|
1233
|
-
secure: true,
|
|
1234
|
-
type: ContentType.Json,
|
|
1235
|
-
format: "json",
|
|
1236
|
-
...params,
|
|
1237
|
-
}),
|
|
1238
|
-
/**
|
|
1239
|
-
* @description Delete customer's appplied tax
|
|
1240
|
-
*
|
|
1241
|
-
* @tags customers
|
|
1242
|
-
* @name DeleteAppliedTax
|
|
1243
|
-
* @summary Delete customer's appplied tax
|
|
1244
|
-
* @request DELETE:/customers/{external_customer_id}/applied_taxes/{tax_code}
|
|
1245
|
-
* @secure
|
|
1246
|
-
*/
|
|
1247
|
-
deleteAppliedTax: (externalCustomerId, taxCode, params = {}) => this.request({
|
|
1248
|
-
path: `/customers/${externalCustomerId}/applied_taxes/${taxCode}`,
|
|
1249
|
-
method: "DELETE",
|
|
1250
|
-
secure: true,
|
|
1251
|
-
format: "json",
|
|
1252
|
-
...params,
|
|
1253
|
-
}),
|
|
1254
1220
|
/**
|
|
1255
1221
|
* @description Retrieves an embeddable link for displaying a customer portal. This endpoint allows you to fetch the URL that can be embedded to provide customers access to a dedicated portal
|
|
1256
1222
|
*
|
|
@@ -587,6 +587,8 @@ export interface ChargeObject {
|
|
|
587
587
|
properties?: ChargeProperties;
|
|
588
588
|
/** All charge information, sorted by groups. */
|
|
589
589
|
group_properties?: GroupPropertiesObject[];
|
|
590
|
+
/** All taxes applied to the charge. */
|
|
591
|
+
taxes?: TaxObject[];
|
|
590
592
|
}
|
|
591
593
|
export interface ChargeProperties {
|
|
592
594
|
/** Graduated ranges, sorted from bottom to top tiers, used for a `graduated` charge model. */
|
|
@@ -1154,7 +1156,7 @@ export interface CreditObject {
|
|
|
1154
1156
|
* Indicates whether the credit is applied on the amount before taxes (coupons) or after taxes (credit notes). This flag helps determine the order in which credits are applied to the invoice calculation
|
|
1155
1157
|
* @example false
|
|
1156
1158
|
*/
|
|
1157
|
-
|
|
1159
|
+
before_taxes: boolean;
|
|
1158
1160
|
/** The item attached to the credit. */
|
|
1159
1161
|
item: {
|
|
1160
1162
|
/**
|
|
@@ -1552,54 +1554,6 @@ export declare enum Currency {
|
|
|
1552
1554
|
export interface Customer {
|
|
1553
1555
|
customer: CustomerObjectExtended;
|
|
1554
1556
|
}
|
|
1555
|
-
export interface CustomerAppliedTax {
|
|
1556
|
-
applied_tax: CustomerAppliedTaxObject;
|
|
1557
|
-
}
|
|
1558
|
-
export interface CustomerAppliedTaxInput {
|
|
1559
|
-
applied_tax: {
|
|
1560
|
-
/**
|
|
1561
|
-
* Unique code used to identify the tax.
|
|
1562
|
-
* @example "vat_fr"
|
|
1563
|
-
*/
|
|
1564
|
-
tax_code: string;
|
|
1565
|
-
};
|
|
1566
|
-
}
|
|
1567
|
-
export interface CustomerAppliedTaxObject {
|
|
1568
|
-
/**
|
|
1569
|
-
* Unique identifier of the applied tax, created by Lago.
|
|
1570
|
-
* @format uuid
|
|
1571
|
-
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
1572
|
-
*/
|
|
1573
|
-
lago_id: string;
|
|
1574
|
-
/**
|
|
1575
|
-
* Unique identifier of the customer, created by Lago.
|
|
1576
|
-
* @format uuid
|
|
1577
|
-
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
1578
|
-
*/
|
|
1579
|
-
lago_customer_id: string;
|
|
1580
|
-
/**
|
|
1581
|
-
* Unique identifier of the tax, created by Lago.
|
|
1582
|
-
* @format uuid
|
|
1583
|
-
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
1584
|
-
*/
|
|
1585
|
-
lago_tax_id: string;
|
|
1586
|
-
/**
|
|
1587
|
-
* The code of the tax.
|
|
1588
|
-
* @example "example_code"
|
|
1589
|
-
*/
|
|
1590
|
-
tax_code: string;
|
|
1591
|
-
/**
|
|
1592
|
-
* The customer external unique identifier (provided by your own application)
|
|
1593
|
-
* @example "5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba"
|
|
1594
|
-
*/
|
|
1595
|
-
external_customer_id: string;
|
|
1596
|
-
/**
|
|
1597
|
-
* 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.
|
|
1598
|
-
* @format date-time
|
|
1599
|
-
* @example "2022-09-14T16:35:31Z"
|
|
1600
|
-
*/
|
|
1601
|
-
created_at: string;
|
|
1602
|
-
}
|
|
1603
1557
|
/** Configuration specific to the payment provider, utilized for billing the customer. This object contains settings and parameters necessary for processing payments and invoicing the customer. */
|
|
1604
1558
|
export interface CustomerBillingConfiguration {
|
|
1605
1559
|
/**
|
|
@@ -1784,6 +1738,11 @@ export interface CustomerCreateInput {
|
|
|
1784
1738
|
* @example "CA"
|
|
1785
1739
|
*/
|
|
1786
1740
|
state?: string | null;
|
|
1741
|
+
/**
|
|
1742
|
+
* List of unique code used to identify the taxes.
|
|
1743
|
+
* @example ["french_standard_vat"]
|
|
1744
|
+
*/
|
|
1745
|
+
tax_codes?: string[];
|
|
1787
1746
|
/**
|
|
1788
1747
|
* The tax identification number of the customer
|
|
1789
1748
|
* @example "EU123456789"
|
|
@@ -1801,6 +1760,11 @@ export interface CustomerCreateInput {
|
|
|
1801
1760
|
* @example "91364"
|
|
1802
1761
|
*/
|
|
1803
1762
|
zipcode?: string | null;
|
|
1763
|
+
/**
|
|
1764
|
+
* The net payment term, expressed in days, specifies the duration within which a customer is expected to remit payment after the invoice is finalized.
|
|
1765
|
+
* @example 30
|
|
1766
|
+
*/
|
|
1767
|
+
net_payment_term?: number | null;
|
|
1804
1768
|
/** Configuration specific to the payment provider, utilized for billing the customer. This object contains settings and parameters necessary for processing payments and invoicing the customer. */
|
|
1805
1769
|
billing_configuration?: CustomerBillingConfiguration;
|
|
1806
1770
|
/** Set of key-value pairs that you can attach to a customer. This can be useful for storing additional information about the customer in a structured format */
|
|
@@ -1955,12 +1919,23 @@ export interface CustomerObject {
|
|
|
1955
1919
|
* @example "91364"
|
|
1956
1920
|
*/
|
|
1957
1921
|
zipcode?: string | null;
|
|
1922
|
+
/**
|
|
1923
|
+
* The net payment term, expressed in days, specifies the duration within which a customer is expected to remit payment after the invoice is finalized.
|
|
1924
|
+
* @example 30
|
|
1925
|
+
*/
|
|
1926
|
+
net_payment_term?: number | null;
|
|
1958
1927
|
/**
|
|
1959
1928
|
* The date of the customer 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 customer object was created
|
|
1960
1929
|
* @format date-time
|
|
1961
1930
|
* @example "2022-04-29T08:59:51Z"
|
|
1962
1931
|
*/
|
|
1963
1932
|
created_at: string;
|
|
1933
|
+
/**
|
|
1934
|
+
* The date of the customer update, represented in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC). The update_date provides a standardized and internationally recognized timestamp for when the customer object was updated
|
|
1935
|
+
* @format date-time
|
|
1936
|
+
* @example "2022-04-29T08:59:51Z"
|
|
1937
|
+
*/
|
|
1938
|
+
updated_at?: string;
|
|
1964
1939
|
/** Configuration specific to the payment provider, utilized for billing the customer. This object contains settings and parameters necessary for processing payments and invoicing the customer. */
|
|
1965
1940
|
billing_configuration?: CustomerBillingConfiguration;
|
|
1966
1941
|
metadata?: CustomerMetadata[];
|
|
@@ -2420,6 +2395,11 @@ export type InvoiceAppliedTaxObject = BaseAppliedTax & {
|
|
|
2420
2395
|
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
2421
2396
|
*/
|
|
2422
2397
|
lago_invoice_id?: string;
|
|
2398
|
+
/**
|
|
2399
|
+
* Fees total amount on which the tax is applied
|
|
2400
|
+
* @example 20000
|
|
2401
|
+
*/
|
|
2402
|
+
fees_amount_cents?: number;
|
|
2423
2403
|
};
|
|
2424
2404
|
export interface InvoiceMetadataObject {
|
|
2425
2405
|
/**
|
|
@@ -2468,6 +2448,17 @@ export interface InvoiceObject {
|
|
|
2468
2448
|
* @example "2022-04-30"
|
|
2469
2449
|
*/
|
|
2470
2450
|
issuing_date: string;
|
|
2451
|
+
/**
|
|
2452
|
+
* The payment due date for the invoice, specified in the ISO 8601 date format.
|
|
2453
|
+
* @format date
|
|
2454
|
+
* @example "2022-04-30"
|
|
2455
|
+
*/
|
|
2456
|
+
payment_due_date?: string;
|
|
2457
|
+
/**
|
|
2458
|
+
* The net payment term, expressed in days, specifies the duration within which a customer is expected to remit payment after the invoice is finalized.
|
|
2459
|
+
* @example 30
|
|
2460
|
+
*/
|
|
2461
|
+
net_payment_term?: number;
|
|
2471
2462
|
/**
|
|
2472
2463
|
* The type of invoice issued. Possible values are `subscription`, `one-off` or `credit`.
|
|
2473
2464
|
* @example "subscription"
|
|
@@ -2713,6 +2704,11 @@ export interface OrganizationObject {
|
|
|
2713
2704
|
* @example null
|
|
2714
2705
|
*/
|
|
2715
2706
|
legal_number?: string | null;
|
|
2707
|
+
/**
|
|
2708
|
+
* The net payment term, expressed in days, specifies the duration within which a customer is expected to remit payment after the invoice is finalized.
|
|
2709
|
+
* @example 30
|
|
2710
|
+
*/
|
|
2711
|
+
net_payment_term?: number;
|
|
2716
2712
|
/**
|
|
2717
2713
|
* The tax identification number of your organization.
|
|
2718
2714
|
* @example "US123456789"
|
|
@@ -2775,6 +2771,11 @@ export interface OrganizationUpdateInput {
|
|
|
2775
2771
|
* @example null
|
|
2776
2772
|
*/
|
|
2777
2773
|
legal_number?: string | null;
|
|
2774
|
+
/**
|
|
2775
|
+
* The net payment term, expressed in days, specifies the duration within which a customer is expected to remit payment after the invoice is finalized.
|
|
2776
|
+
* @example 30
|
|
2777
|
+
*/
|
|
2778
|
+
net_payment_term?: number;
|
|
2778
2779
|
/**
|
|
2779
2780
|
* The tax identification number of your organization.
|
|
2780
2781
|
* @example "US123456789"
|
|
@@ -2865,9 +2866,14 @@ export interface PlanCreateInput {
|
|
|
2865
2866
|
* @example null
|
|
2866
2867
|
*/
|
|
2867
2868
|
bill_charges_monthly?: boolean | null;
|
|
2869
|
+
/**
|
|
2870
|
+
* List of unique code used to identify the taxes.
|
|
2871
|
+
* @example ["french_standard_vat"]
|
|
2872
|
+
*/
|
|
2873
|
+
tax_codes?: string[];
|
|
2868
2874
|
/**
|
|
2869
2875
|
* Additional usage-based charges for this plan.
|
|
2870
|
-
* @example [{"billable_metric_id":"1a901a90-1a90-1a90-1a90-1a901a901a91","charge_model":"package","invoiceable":true,"pay_in_advance":false,"prorated":false,"min_amount_cents":3000,"properties":{"amount":"30","free_units":100,"package_size":1000},"group_properties":[]},{"billable_metric_id":"1a901a90-1a90-1a90-1a90-1a901a901a92","charge_model":"graduated","invoiceable":true,"pay_in_advance":false,"prorated":false,"min_amount_cents":0,"properties":{"graduated_ranges":[{"to_value":10,"from_value":0,"flat_amount":"10","per_unit_amount":"0.5"},{"to_value":null,"from_value":11,"flat_amount":"0","per_unit_amount":"0.4"}]},"group_properties":[]},{"billable_metric_id":"1a901a90-1a90-1a90-1a90-1a901a901a93","charge_model":"standard","invoiceable":true,"pay_in_advance":true,"prorated":false,"min_amount_cents":0,"properties":{},"group_properties":[{"group_id":"1a901a90-1a90-1a90-1a90-1a901a901a01","values":{"amount":"10"}},{"group_id":"1a901a90-1a90-1a90-1a90-1a901a901a02","values":{"amount":"5"}},{"group_id":"1a901a90-1a90-1a90-1a90-1a901a901a03","values":{"amount":"8"}}]},{"billable_metric_id":"1a901a90-1a90-1a90-1a90-1a901a901a94","charge_model":"volume","invoiceable":true,"pay_in_advance":false,"prorated":false,"min_amount_cents":0,"properties":{"volume_ranges":[{"from_value":0,"to_value":100,"flat_amount":"0","per_unit_amount":"0"},{"from_value":101,"to_value":null,"flat_amount":"0","per_unit_amount":"0.5"}]},"group_properties":[]},{"billable_metric_id":"1a901a90-1a90-1a90-1a90-1a901a901a95","charge_model":"percentage","invoiceable":false,"pay_in_advance":true,"prorated":false,"min_amount_cents":0,"properties":{"rate":"1","fixed_amount":"0.5","free_units_per_events":5,"free_units_per_total_aggregation":"500"},"group_properties":[]}]
|
|
2876
|
+
* @example [{"billable_metric_id":"1a901a90-1a90-1a90-1a90-1a901a901a91","charge_model":"package","invoiceable":true,"pay_in_advance":false,"prorated":false,"min_amount_cents":3000,"properties":{"amount":"30","free_units":100,"package_size":1000},"group_properties":[],"tax_codes":["french_standard_vat"]},{"billable_metric_id":"1a901a90-1a90-1a90-1a90-1a901a901a92","charge_model":"graduated","invoiceable":true,"pay_in_advance":false,"prorated":false,"min_amount_cents":0,"properties":{"graduated_ranges":[{"to_value":10,"from_value":0,"flat_amount":"10","per_unit_amount":"0.5"},{"to_value":null,"from_value":11,"flat_amount":"0","per_unit_amount":"0.4"}]},"group_properties":[]},{"billable_metric_id":"1a901a90-1a90-1a90-1a90-1a901a901a93","charge_model":"standard","invoiceable":true,"pay_in_advance":true,"prorated":false,"min_amount_cents":0,"properties":{},"group_properties":[{"group_id":"1a901a90-1a90-1a90-1a90-1a901a901a01","values":{"amount":"10"}},{"group_id":"1a901a90-1a90-1a90-1a90-1a901a901a02","values":{"amount":"5"}},{"group_id":"1a901a90-1a90-1a90-1a90-1a901a901a03","values":{"amount":"8"}}]},{"billable_metric_id":"1a901a90-1a90-1a90-1a90-1a901a901a94","charge_model":"volume","invoiceable":true,"pay_in_advance":false,"prorated":false,"min_amount_cents":0,"properties":{"volume_ranges":[{"from_value":0,"to_value":100,"flat_amount":"0","per_unit_amount":"0"},{"from_value":101,"to_value":null,"flat_amount":"0","per_unit_amount":"0.5"}]},"group_properties":[]},{"billable_metric_id":"1a901a90-1a90-1a90-1a90-1a901a901a95","charge_model":"percentage","invoiceable":false,"pay_in_advance":true,"prorated":false,"min_amount_cents":0,"properties":{"rate":"1","fixed_amount":"0.5","free_units_per_events":5,"free_units_per_total_aggregation":"500"},"group_properties":[]}]
|
|
2871
2877
|
*/
|
|
2872
2878
|
charges?: {
|
|
2873
2879
|
/**
|
|
@@ -2917,6 +2923,11 @@ export interface PlanCreateInput {
|
|
|
2917
2923
|
/** List of all thresholds utilized for calculating a charge, scoped by groups used as dimensions for a single charge. */
|
|
2918
2924
|
values: ChargeProperties;
|
|
2919
2925
|
}[];
|
|
2926
|
+
/**
|
|
2927
|
+
* List of unique code used to identify the taxes.
|
|
2928
|
+
* @example ["french_standard_vat"]
|
|
2929
|
+
*/
|
|
2930
|
+
tax_codes?: string[];
|
|
2920
2931
|
}[];
|
|
2921
2932
|
};
|
|
2922
2933
|
}
|
|
@@ -2964,9 +2975,14 @@ export interface PlanUpdateInput {
|
|
|
2964
2975
|
* @example null
|
|
2965
2976
|
*/
|
|
2966
2977
|
bill_charges_monthly?: boolean | null;
|
|
2978
|
+
/**
|
|
2979
|
+
* List of unique code used to identify the taxes.
|
|
2980
|
+
* @example ["french_standard_vat"]
|
|
2981
|
+
*/
|
|
2982
|
+
tax_codes?: string[];
|
|
2967
2983
|
/**
|
|
2968
2984
|
* Additional usage-based charges for this plan.
|
|
2969
|
-
* @example [{"billable_metric_id":"1a901a90-1a90-1a90-1a90-1a901a901a91","charge_model":"package","invoiceable":true,"pay_in_advance":false,"prorated":false,"min_amount_cents":3000,"properties":{"amount":"30","free_units":100,"package_size":1000},"group_properties":[]},{"billable_metric_id":"1a901a90-1a90-1a90-1a90-1a901a901a92","charge_model":"graduated","invoiceable":true,"pay_in_advance":false,"prorated":false,"min_amount_cents":0,"properties":{"graduated_ranges":[{"to_value":10,"from_value":0,"flat_amount":"10","per_unit_amount":"0.5"},{"to_value":null,"from_value":11,"flat_amount":"0","per_unit_amount":"0.4"}]},"group_properties":[]},{"billable_metric_id":"1a901a90-1a90-1a90-1a90-1a901a901a93","charge_model":"standard","invoiceable":true,"pay_in_advance":true,"prorated":false,"min_amount_cents":0,"properties":{},"group_properties":[{"group_id":"1a901a90-1a90-1a90-1a90-1a901a901a01","values":{"amount":"10"}},{"group_id":"1a901a90-1a90-1a90-1a90-1a901a901a02","values":{"amount":"5"}},{"group_id":"1a901a90-1a90-1a90-1a90-1a901a901a03","values":{"amount":"8"}}]},{"billable_metric_id":"1a901a90-1a90-1a90-1a90-1a901a901a94","charge_model":"volume","invoiceable":true,"pay_in_advance":false,"prorated":false,"min_amount_cents":0,"properties":{"volume_ranges":[{"from_value":0,"to_value":100,"flat_amount":"0","per_unit_amount":"0"},{"from_value":101,"to_value":null,"flat_amount":"0","per_unit_amount":"0.5"}]},"group_properties":[]},{"billable_metric_id":"1a901a90-1a90-1a90-1a90-1a901a901a95","charge_model":"percentage","invoiceable":false,"pay_in_advance":true,"prorated":false,"min_amount_cents":0,"properties":{"rate":"1","fixed_amount":"0.5","free_units_per_events":5,"free_units_per_total_aggregation":"500"},"group_properties":[]}]
|
|
2985
|
+
* @example [{"billable_metric_id":"1a901a90-1a90-1a90-1a90-1a901a901a91","charge_model":"package","invoiceable":true,"pay_in_advance":false,"prorated":false,"min_amount_cents":3000,"properties":{"amount":"30","free_units":100,"package_size":1000},"group_properties":[],"tax_codes":["french_standard_vat"]},{"billable_metric_id":"1a901a90-1a90-1a90-1a90-1a901a901a92","charge_model":"graduated","invoiceable":true,"pay_in_advance":false,"prorated":false,"min_amount_cents":0,"properties":{"graduated_ranges":[{"to_value":10,"from_value":0,"flat_amount":"10","per_unit_amount":"0.5"},{"to_value":null,"from_value":11,"flat_amount":"0","per_unit_amount":"0.4"}]},"group_properties":[]},{"billable_metric_id":"1a901a90-1a90-1a90-1a90-1a901a901a93","charge_model":"standard","invoiceable":true,"pay_in_advance":true,"prorated":false,"min_amount_cents":0,"properties":{},"group_properties":[{"group_id":"1a901a90-1a90-1a90-1a90-1a901a901a01","values":{"amount":"10"}},{"group_id":"1a901a90-1a90-1a90-1a90-1a901a901a02","values":{"amount":"5"}},{"group_id":"1a901a90-1a90-1a90-1a90-1a901a901a03","values":{"amount":"8"}}]},{"billable_metric_id":"1a901a90-1a90-1a90-1a90-1a901a901a94","charge_model":"volume","invoiceable":true,"pay_in_advance":false,"prorated":false,"min_amount_cents":0,"properties":{"volume_ranges":[{"from_value":0,"to_value":100,"flat_amount":"0","per_unit_amount":"0"},{"from_value":101,"to_value":null,"flat_amount":"0","per_unit_amount":"0.5"}]},"group_properties":[]},{"billable_metric_id":"1a901a90-1a90-1a90-1a90-1a901a901a95","charge_model":"percentage","invoiceable":false,"pay_in_advance":true,"prorated":false,"min_amount_cents":0,"properties":{"rate":"1","fixed_amount":"0.5","free_units_per_events":5,"free_units_per_total_aggregation":"500"},"group_properties":[]}]
|
|
2970
2986
|
*/
|
|
2971
2987
|
charges?: {
|
|
2972
2988
|
/**
|
|
@@ -3022,6 +3038,11 @@ export interface PlanUpdateInput {
|
|
|
3022
3038
|
/** List of all thresholds utilized for calculating a charge, scoped by groups used as dimensions for a single charge. */
|
|
3023
3039
|
values: ChargeProperties;
|
|
3024
3040
|
}[];
|
|
3041
|
+
/**
|
|
3042
|
+
* List of unique code used to identify the taxes.
|
|
3043
|
+
* @example ["french_standard_vat"]
|
|
3044
|
+
*/
|
|
3045
|
+
tax_codes?: string[];
|
|
3025
3046
|
}[];
|
|
3026
3047
|
};
|
|
3027
3048
|
}
|
|
@@ -3095,6 +3116,8 @@ export interface PlanObject {
|
|
|
3095
3116
|
* @example [{"lago_id":"1a901a90-1a90-1a90-1a90-1a901a901a91","lago_billable_metric_id":"1a901a90-1a90-1a90-1a90-1a901a901a91","billable_metric_code":"requests","created_at":"2023-06-27T19:43:42Z","charge_model":"package","invoiceable":true,"pay_in_advance":false,"prorated":false,"min_amount_cents":3000,"properties":{"amount":"30","free_units":100,"package_size":1000},"group_properties":[]},{"lago_id":"1a901a90-1a90-1a90-1a90-1a901a901a92","lago_billable_metric_id":"1a901a90-1a90-1a90-1a90-1a901a901a92","billable_metric_code":"cpu","created_at":"2023-06-27T19:43:42Z","charge_model":"graduated","invoiceable":true,"pay_in_advance":false,"prorated":false,"min_amount_cents":0,"properties":{"graduated_ranges":[{"from_value":0,"to_value":10,"flat_amount":"10","per_unit_amount":"0.5"},{"from_value":11,"to_value":null,"flat_amount":"0","per_unit_amount":"0.4"}]},"group_properties":[]},{"lago_id":"1a901a90-1a90-1a90-1a90-1a901a901a93","lago_billable_metric_id":"1a901a90-1a90-1a90-1a90-1a901a901a93","billable_metric_code":"seats","created_at":"2023-06-27T19:43:42Z","charge_model":"standard","invoiceable":true,"pay_in_advance":true,"prorated":false,"min_amount_cents":0,"properties":{},"group_properties":[{"group_id":"1a901a90-1a90-1a90-1a90-1a901a901a01","values":{"amount":"10"}},{"group_id":"1a901a90-1a90-1a90-1a90-1a901a901a02","values":{"amount":"5"}},{"group_id":"1a901a90-1a90-1a90-1a90-1a901a901a03","values":{"amount":"8"}}]},{"lago_id":"1a901a90-1a90-1a90-1a90-1a901a901a94","lago_billable_metric_id":"1a901a90-1a90-1a90-1a90-1a901a901a94","billable_metric_code":"storage","created_at":"2023-06-27T19:43:42Z","charge_model":"volume","invoiceable":true,"pay_in_advance":false,"prorated":false,"min_amount_cents":0,"properties":{"volume_ranges":[{"from_value":0,"to_value":100,"flat_amount":"0","per_unit_amount":"0"},{"from_value":101,"to_value":null,"flat_amount":"0","per_unit_amount":"0.5"}]},"group_properties":[]},{"lago_id":"1a901a90-1a90-1a90-1a90-1a901a901a95","lago_billable_metric_id":"1a901a90-1a90-1a90-1a90-1a901a901a95","billable_metric_code":"payments","created_at":"2023-06-27T19:43:42Z","charge_model":"percentage","invoiceable":false,"pay_in_advance":true,"prorated":false,"min_amount_cents":0,"properties":{"rate":"1","fixed_amount":"0.5","free_units_per_events":5,"free_units_per_total_aggregation":"500"},"group_properties":[]}]
|
|
3096
3117
|
*/
|
|
3097
3118
|
charges?: ChargeObject[];
|
|
3119
|
+
/** All taxes applied to the plan. */
|
|
3120
|
+
taxes?: TaxObject[];
|
|
3098
3121
|
}
|
|
3099
3122
|
export interface PlansPaginated {
|
|
3100
3123
|
plans: PlanObject[];
|
|
@@ -3322,10 +3345,20 @@ export interface TaxObject {
|
|
|
3322
3345
|
*/
|
|
3323
3346
|
applied_to_organization: boolean;
|
|
3324
3347
|
/**
|
|
3325
|
-
* Number of
|
|
3348
|
+
* Number of charges this tax is applied to.
|
|
3349
|
+
* @example 0
|
|
3350
|
+
*/
|
|
3351
|
+
charges_count?: number;
|
|
3352
|
+
/**
|
|
3353
|
+
* Number of customers this tax is applied to (directly or via the organization's default).
|
|
3326
3354
|
* @example 0
|
|
3327
3355
|
*/
|
|
3328
3356
|
customers_count: number;
|
|
3357
|
+
/**
|
|
3358
|
+
* Number of plans this tax is applied to.
|
|
3359
|
+
* @example 0
|
|
3360
|
+
*/
|
|
3361
|
+
plans_count?: number;
|
|
3329
3362
|
/**
|
|
3330
3363
|
* Creation date of the tax.
|
|
3331
3364
|
* @format date-time
|
|
@@ -4171,26 +4204,6 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
4171
4204
|
* @secure
|
|
4172
4205
|
*/
|
|
4173
4206
|
deleteAppliedCoupon: (externalCustomerId: string, appliedCouponId: string, params?: RequestParams) => Promise<HttpResponse<AppliedCoupon, ApiErrorUnauthorized | ApiErrorNotFound>>;
|
|
4174
|
-
/**
|
|
4175
|
-
* @description Apply an existing tax to a customer
|
|
4176
|
-
*
|
|
4177
|
-
* @tags customers
|
|
4178
|
-
* @name ApplyTax
|
|
4179
|
-
* @summary Apply a tax
|
|
4180
|
-
* @request POST:/customers/{external_customer_id}/applied_taxes
|
|
4181
|
-
* @secure
|
|
4182
|
-
*/
|
|
4183
|
-
applyTax: (externalCustomerId: string, data: CustomerAppliedTaxInput, params?: RequestParams) => Promise<HttpResponse<CustomerAppliedTax, ApiErrorBadRequest | ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorNotFound>>;
|
|
4184
|
-
/**
|
|
4185
|
-
* @description Delete customer's appplied tax
|
|
4186
|
-
*
|
|
4187
|
-
* @tags customers
|
|
4188
|
-
* @name DeleteAppliedTax
|
|
4189
|
-
* @summary Delete customer's appplied tax
|
|
4190
|
-
* @request DELETE:/customers/{external_customer_id}/applied_taxes/{tax_code}
|
|
4191
|
-
* @secure
|
|
4192
|
-
*/
|
|
4193
|
-
deleteAppliedTax: (externalCustomerId: string, taxCode: string, params?: RequestParams) => Promise<HttpResponse<CustomerAppliedTax, ApiErrorBadRequest | ApiErrorUnauthorized | ApiErrorNotFound>>;
|
|
4194
4207
|
/**
|
|
4195
4208
|
* @description Retrieves an embeddable link for displaying a customer portal. This endpoint allows you to fetch the URL that can be embedded to provide customers access to a dedicated portal
|
|
4196
4209
|
*
|
|
@@ -4852,6 +4865,11 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
4852
4865
|
* @example "https://foo.bar"
|
|
4853
4866
|
*/
|
|
4854
4867
|
webhook_url: string;
|
|
4868
|
+
/**
|
|
4869
|
+
* The signature used for the webhook. If no value is passed,
|
|
4870
|
+
* @example "hmac"
|
|
4871
|
+
*/
|
|
4872
|
+
signature_algo?: "jwt" | "hmac" | null;
|
|
4855
4873
|
};
|
|
4856
4874
|
}, params?: RequestParams) => Promise<HttpResponse<{
|
|
4857
4875
|
webhook_endpoint: {
|
|
@@ -4872,6 +4890,11 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
4872
4890
|
* @example "Prepaid"
|
|
4873
4891
|
*/
|
|
4874
4892
|
webhook_url: string;
|
|
4893
|
+
/**
|
|
4894
|
+
* The signature algo for the webhook.
|
|
4895
|
+
* @example "hmac"
|
|
4896
|
+
*/
|
|
4897
|
+
signature_algo?: "jwt" | "hmac";
|
|
4875
4898
|
/**
|
|
4876
4899
|
* The date of the webhook endpoint creation, represented in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC).
|
|
4877
4900
|
* @format date-time
|
|
@@ -4920,6 +4943,11 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
4920
4943
|
* @example "https://foo.bar"
|
|
4921
4944
|
*/
|
|
4922
4945
|
webhook_url: string;
|
|
4946
|
+
/**
|
|
4947
|
+
* The signature used for the webhook. If no value is passed,
|
|
4948
|
+
* @example "hmac"
|
|
4949
|
+
*/
|
|
4950
|
+
signature_algo?: "jwt" | "hmac" | null;
|
|
4923
4951
|
};
|
|
4924
4952
|
}, params?: RequestParams) => Promise<HttpResponse<any, ApiErrorBadRequest | ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorNotFound>>;
|
|
4925
4953
|
/**
|