lago-javascript-client 0.39.1-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 +99 -45
- package/package.json +1 -1
- package/script/openapi/client.js +99 -45
- package/types/openapi/client.d.ts +445 -154
|
@@ -360,29 +360,31 @@ export interface BaseAppliedTax {
|
|
|
360
360
|
*/
|
|
361
361
|
lago_tax_id?: string;
|
|
362
362
|
/**
|
|
363
|
-
*
|
|
364
|
-
* @example "
|
|
363
|
+
* Name of the tax.
|
|
364
|
+
* @example "TVA"
|
|
365
365
|
*/
|
|
366
366
|
tax_name?: string;
|
|
367
367
|
/**
|
|
368
|
-
*
|
|
369
|
-
* @example "
|
|
368
|
+
* Unique code used to identify the tax associated with the API request.
|
|
369
|
+
* @example "french_standard_vat"
|
|
370
370
|
*/
|
|
371
371
|
tax_code?: string;
|
|
372
372
|
/**
|
|
373
|
-
* The rate of the tax
|
|
374
|
-
* @
|
|
375
|
-
* @example "25.0"
|
|
373
|
+
* The percentage rate of the tax
|
|
374
|
+
* @example 20
|
|
376
375
|
*/
|
|
377
|
-
tax_rate?:
|
|
376
|
+
tax_rate?: number;
|
|
378
377
|
/**
|
|
379
|
-
*
|
|
380
|
-
* @example "
|
|
378
|
+
* Internal description of the taxe
|
|
379
|
+
* @example "French standard VAT"
|
|
381
380
|
*/
|
|
382
381
|
tax_description?: string;
|
|
383
|
-
/**
|
|
382
|
+
/**
|
|
383
|
+
* Amount of the tax
|
|
384
|
+
* @example 2000
|
|
385
|
+
*/
|
|
384
386
|
amount_cents?: number;
|
|
385
|
-
/**
|
|
387
|
+
/** Currency of the tax */
|
|
386
388
|
amount_currency?: Currency;
|
|
387
389
|
/**
|
|
388
390
|
* The date and time when the applied tax was created. It is expressed in UTC format according to the ISO 8601 datetime standard. This field provides the timestamp for the exact moment when the applied tax was initially created.
|
|
@@ -416,6 +418,15 @@ export interface BillableMetricObject {
|
|
|
416
418
|
* @example "GB of storage used in my application"
|
|
417
419
|
*/
|
|
418
420
|
description?: string | null;
|
|
421
|
+
/**
|
|
422
|
+
* Defines if the billable metric is persisted billing period over billing period.
|
|
423
|
+
*
|
|
424
|
+
* - If set to `true`: the accumulated number of units calculated from the previous billing period is persisted to the next billing period.
|
|
425
|
+
* - If set to `false`: the accumulated number of units is reset to 0 at the end of the billing period.
|
|
426
|
+
* - If not defined in the request, default value is `false`.
|
|
427
|
+
* @example false
|
|
428
|
+
*/
|
|
429
|
+
recurring: boolean;
|
|
419
430
|
/**
|
|
420
431
|
* Creation date of the billable metric.
|
|
421
432
|
* @format date-time
|
|
@@ -466,6 +477,15 @@ export interface BillableMetricBaseInput {
|
|
|
466
477
|
* @example "GB of storage used in my application"
|
|
467
478
|
*/
|
|
468
479
|
description?: string | null;
|
|
480
|
+
/**
|
|
481
|
+
* Defines if the billable metric is persisted billing period over billing period.
|
|
482
|
+
*
|
|
483
|
+
* - If set to `true`: the accumulated number of units calculated from the previous billing period is persisted to the next billing period.
|
|
484
|
+
* - If set to `false`: the accumulated number of units is reset to 0 at the end of the billing period.
|
|
485
|
+
* - If not defined in the request, default value is `false`.
|
|
486
|
+
* @example false
|
|
487
|
+
*/
|
|
488
|
+
recurring?: boolean;
|
|
469
489
|
/**
|
|
470
490
|
* Property of the billable metric used for aggregating usage data. This field is not required for `count_agg`.
|
|
471
491
|
* @example "gb"
|
|
@@ -549,6 +569,15 @@ export interface ChargeObject {
|
|
|
549
569
|
* @example true
|
|
550
570
|
*/
|
|
551
571
|
invoiceable?: boolean;
|
|
572
|
+
/**
|
|
573
|
+
* Specifies whether a charge is prorated based on the remaining number of days in the billing period or billed fully.
|
|
574
|
+
*
|
|
575
|
+
* - If set to `true`, the charge is prorated based on the remaining days in the current billing period.
|
|
576
|
+
* - If set to `false`, the charge is billed in full.
|
|
577
|
+
* - If not defined in the request, default value is `false`.
|
|
578
|
+
* @example false
|
|
579
|
+
*/
|
|
580
|
+
prorated?: boolean;
|
|
552
581
|
/**
|
|
553
582
|
* The minimum spending amount required for the charge, measured in cents and excluding any applicable taxes. It indicates the minimum amount that needs to be charged for each billing period.
|
|
554
583
|
* @example 1200
|
|
@@ -558,6 +587,8 @@ export interface ChargeObject {
|
|
|
558
587
|
properties?: ChargeProperties;
|
|
559
588
|
/** All charge information, sorted by groups. */
|
|
560
589
|
group_properties?: GroupPropertiesObject[];
|
|
590
|
+
/** All taxes applied to the charge. */
|
|
591
|
+
taxes?: TaxObject[];
|
|
561
592
|
}
|
|
562
593
|
export interface ChargeProperties {
|
|
563
594
|
/** Graduated ranges, sorted from bottom to top tiers, used for a `graduated` charge model. */
|
|
@@ -1125,7 +1156,7 @@ export interface CreditObject {
|
|
|
1125
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
|
|
1126
1157
|
* @example false
|
|
1127
1158
|
*/
|
|
1128
|
-
|
|
1159
|
+
before_taxes: boolean;
|
|
1129
1160
|
/** The item attached to the credit. */
|
|
1130
1161
|
item: {
|
|
1131
1162
|
/**
|
|
@@ -1267,10 +1298,9 @@ export interface CreditNoteObject {
|
|
|
1267
1298
|
taxes_amount_cents: number;
|
|
1268
1299
|
/**
|
|
1269
1300
|
* The tax rate associated with this specific credit note.
|
|
1270
|
-
* @
|
|
1271
|
-
* @example "20.0"
|
|
1301
|
+
* @example 20
|
|
1272
1302
|
*/
|
|
1273
|
-
taxes_rate:
|
|
1303
|
+
taxes_rate: number;
|
|
1274
1304
|
/**
|
|
1275
1305
|
* The subtotal of the credit note excluding any applicable taxes, expressed in cents.
|
|
1276
1306
|
* @example 100
|
|
@@ -1524,54 +1554,6 @@ export declare enum Currency {
|
|
|
1524
1554
|
export interface Customer {
|
|
1525
1555
|
customer: CustomerObjectExtended;
|
|
1526
1556
|
}
|
|
1527
|
-
export interface CustomerAppliedTax {
|
|
1528
|
-
applied_tax: CustomerAppliedTaxObject;
|
|
1529
|
-
}
|
|
1530
|
-
export interface CustomerAppliedTaxInput {
|
|
1531
|
-
applied_tax: {
|
|
1532
|
-
/**
|
|
1533
|
-
* Unique code used to identify the tax.
|
|
1534
|
-
* @example "vat_fr"
|
|
1535
|
-
*/
|
|
1536
|
-
tax_code: string;
|
|
1537
|
-
};
|
|
1538
|
-
}
|
|
1539
|
-
export interface CustomerAppliedTaxObject {
|
|
1540
|
-
/**
|
|
1541
|
-
* Unique identifier of the applied tax, created by Lago.
|
|
1542
|
-
* @format uuid
|
|
1543
|
-
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
1544
|
-
*/
|
|
1545
|
-
lago_id: string;
|
|
1546
|
-
/**
|
|
1547
|
-
* Unique identifier of the customer, created by Lago.
|
|
1548
|
-
* @format uuid
|
|
1549
|
-
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
1550
|
-
*/
|
|
1551
|
-
lago_customer_id: string;
|
|
1552
|
-
/**
|
|
1553
|
-
* Unique identifier of the tax, created by Lago.
|
|
1554
|
-
* @format uuid
|
|
1555
|
-
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
1556
|
-
*/
|
|
1557
|
-
lago_tax_id: string;
|
|
1558
|
-
/**
|
|
1559
|
-
* The code of the tax.
|
|
1560
|
-
* @example "example_code"
|
|
1561
|
-
*/
|
|
1562
|
-
tax_code: string;
|
|
1563
|
-
/**
|
|
1564
|
-
* The customer external unique identifier (provided by your own application)
|
|
1565
|
-
* @example "5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba"
|
|
1566
|
-
*/
|
|
1567
|
-
external_customer_id: string;
|
|
1568
|
-
/**
|
|
1569
|
-
* 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.
|
|
1570
|
-
* @format date-time
|
|
1571
|
-
* @example "2022-09-14T16:35:31Z"
|
|
1572
|
-
*/
|
|
1573
|
-
created_at: string;
|
|
1574
|
-
}
|
|
1575
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. */
|
|
1576
1558
|
export interface CustomerBillingConfiguration {
|
|
1577
1559
|
/**
|
|
@@ -1605,6 +1587,11 @@ export interface CustomerBillingConfiguration {
|
|
|
1605
1587
|
* @example "fr"
|
|
1606
1588
|
*/
|
|
1607
1589
|
document_locale?: string;
|
|
1590
|
+
/**
|
|
1591
|
+
* Specifies the available payment methods that can be used for this customer when `payment_provider` is set to `stripe`. The `provider_payment_methods` field is an array that allows multiple payment options to be defined. If this field is not explicitly set, all the payment methods are selected. For now, possible values are `card` and `sepa_debit`.
|
|
1592
|
+
* @example ["card","sepa_debit"]
|
|
1593
|
+
*/
|
|
1594
|
+
provider_payment_methods?: string[] | null;
|
|
1608
1595
|
}
|
|
1609
1596
|
export interface CustomerChargeUsageObject {
|
|
1610
1597
|
/**
|
|
@@ -1673,7 +1660,7 @@ export interface CustomerChargeUsageObject {
|
|
|
1673
1660
|
key?: string | null;
|
|
1674
1661
|
/**
|
|
1675
1662
|
* The group value.
|
|
1676
|
-
* @example "
|
|
1663
|
+
* @example "europe"
|
|
1677
1664
|
*/
|
|
1678
1665
|
value?: string;
|
|
1679
1666
|
/**
|
|
@@ -1751,6 +1738,11 @@ export interface CustomerCreateInput {
|
|
|
1751
1738
|
* @example "CA"
|
|
1752
1739
|
*/
|
|
1753
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[];
|
|
1754
1746
|
/**
|
|
1755
1747
|
* The tax identification number of the customer
|
|
1756
1748
|
* @example "EU123456789"
|
|
@@ -1768,6 +1760,11 @@ export interface CustomerCreateInput {
|
|
|
1768
1760
|
* @example "91364"
|
|
1769
1761
|
*/
|
|
1770
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;
|
|
1771
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. */
|
|
1772
1769
|
billing_configuration?: CustomerBillingConfiguration;
|
|
1773
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 */
|
|
@@ -1922,20 +1919,31 @@ export interface CustomerObject {
|
|
|
1922
1919
|
* @example "91364"
|
|
1923
1920
|
*/
|
|
1924
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;
|
|
1925
1927
|
/**
|
|
1926
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
|
|
1927
1929
|
* @format date-time
|
|
1928
1930
|
* @example "2022-04-29T08:59:51Z"
|
|
1929
1931
|
*/
|
|
1930
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;
|
|
1931
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. */
|
|
1932
1940
|
billing_configuration?: CustomerBillingConfiguration;
|
|
1933
1941
|
metadata?: CustomerMetadata[];
|
|
1934
|
-
/** List of customer taxes */
|
|
1935
|
-
taxes?: TaxObject[];
|
|
1936
1942
|
}
|
|
1937
1943
|
export type CustomerObjectExtended = CustomerObject & {
|
|
1938
1944
|
metadata?: CustomerMetadata[];
|
|
1945
|
+
/** List of customer taxes */
|
|
1946
|
+
taxes?: TaxObject[];
|
|
1939
1947
|
};
|
|
1940
1948
|
export interface CustomersPaginated {
|
|
1941
1949
|
customers: CustomerObjectExtended[];
|
|
@@ -2222,10 +2230,9 @@ export interface FeeObject {
|
|
|
2222
2230
|
taxes_amount_cents: number;
|
|
2223
2231
|
/**
|
|
2224
2232
|
* The tax rate associated with this specific fee.
|
|
2225
|
-
* @
|
|
2226
|
-
* @example "20.0"
|
|
2233
|
+
* @example 20
|
|
2227
2234
|
*/
|
|
2228
|
-
taxes_rate:
|
|
2235
|
+
taxes_rate: number;
|
|
2229
2236
|
/**
|
|
2230
2237
|
* 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.
|
|
2231
2238
|
* @example "0.32"
|
|
@@ -2388,6 +2395,11 @@ export type InvoiceAppliedTaxObject = BaseAppliedTax & {
|
|
|
2388
2395
|
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
2389
2396
|
*/
|
|
2390
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;
|
|
2391
2403
|
};
|
|
2392
2404
|
export interface InvoiceMetadataObject {
|
|
2393
2405
|
/**
|
|
@@ -2436,6 +2448,17 @@ export interface InvoiceObject {
|
|
|
2436
2448
|
* @example "2022-04-30"
|
|
2437
2449
|
*/
|
|
2438
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;
|
|
2439
2462
|
/**
|
|
2440
2463
|
* The type of invoice issued. Possible values are `subscription`, `one-off` or `credit`.
|
|
2441
2464
|
* @example "subscription"
|
|
@@ -2681,6 +2704,11 @@ export interface OrganizationObject {
|
|
|
2681
2704
|
* @example null
|
|
2682
2705
|
*/
|
|
2683
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;
|
|
2684
2712
|
/**
|
|
2685
2713
|
* The tax identification number of your organization.
|
|
2686
2714
|
* @example "US123456789"
|
|
@@ -2743,6 +2771,11 @@ export interface OrganizationUpdateInput {
|
|
|
2743
2771
|
* @example null
|
|
2744
2772
|
*/
|
|
2745
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;
|
|
2746
2779
|
/**
|
|
2747
2780
|
* The tax identification number of your organization.
|
|
2748
2781
|
* @example "US123456789"
|
|
@@ -2789,7 +2822,7 @@ export interface PaginationMeta {
|
|
|
2789
2822
|
export interface Plan {
|
|
2790
2823
|
plan: PlanObject;
|
|
2791
2824
|
}
|
|
2792
|
-
export interface
|
|
2825
|
+
export interface PlanCreateInput {
|
|
2793
2826
|
plan: {
|
|
2794
2827
|
/**
|
|
2795
2828
|
* The name of the plan.
|
|
@@ -2833,9 +2866,123 @@ export interface PlanInput {
|
|
|
2833
2866
|
* @example null
|
|
2834
2867
|
*/
|
|
2835
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[];
|
|
2836
2874
|
/**
|
|
2837
2875
|
* Additional usage-based charges for this plan.
|
|
2838
|
-
* @example [{"billable_metric_id":"1a901a90-1a90-1a90-1a90-1a901a901a91","charge_model":"package","invoiceable":true,"pay_in_advance":false,"min_amount_cents":3000,"properties":{"amount":"30","free_units":100,"package_size":1000},"group_properties":[]},{"billable_metric_id":"1a901a90-1a90-1a90-1a90-1a901a901a92","charge_model":"graduated","invoiceable":true,"pay_in_advance":false,"min_amount_cents":0,"properties":{"graduated_ranges":[{"to_value":10,"from_value":0,"flat_amount":"10","per_unit_amount":"0.5"},{"to_value":null,"from_value":11,"flat_amount":"0","per_unit_amount":"0.4"}]},"group_properties":[]},{"billable_metric_id":"1a901a90-1a90-1a90-1a90-1a901a901a93","charge_model":"standard","invoiceable":true,"pay_in_advance":true,"min_amount_cents":0,"properties":{},"group_properties":[{"group_id":"1a901a90-1a90-1a90-1a90-1a901a901a01","values":{"amount":"10"}},{"group_id":"1a901a90-1a90-1a90-1a90-1a901a901a02","values":{"amount":"5"}},{"group_id":"1a901a90-1a90-1a90-1a90-1a901a901a03","values":{"amount":"8"}}]},{"billable_metric_id":"1a901a90-1a90-1a90-1a90-1a901a901a94","charge_model":"volume","invoiceable":true,"pay_in_advance":false,"min_amount_cents":0,"properties":{"volume_ranges":[{"from_value":0,"to_value":100,"flat_amount":"0","per_unit_amount":"0"},{"from_value":101,"to_value":null,"flat_amount":"0","per_unit_amount":"0.5"}]},"group_properties":[]},{"billable_metric_id":"1a901a90-1a90-1a90-1a90-1a901a901a95","charge_model":"percentage","invoiceable":false,"pay_in_advance":true,"min_amount_cents":0,"properties":{"rate":"1","fixed_amount":"0.5","free_units_per_events":5,"free_units_per_total_aggregation":"500"},"group_properties":[]}]
|
|
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":[]}]
|
|
2877
|
+
*/
|
|
2878
|
+
charges?: {
|
|
2879
|
+
/**
|
|
2880
|
+
* Unique identifier of the billable metric created by Lago.
|
|
2881
|
+
* @format uuid
|
|
2882
|
+
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
2883
|
+
*/
|
|
2884
|
+
billable_metric_id?: string;
|
|
2885
|
+
/**
|
|
2886
|
+
* Specifies the pricing model used for the calculation of the final fee. It can be `standard`, `graduated`, `package`, `percentage` or `volume`.
|
|
2887
|
+
* @example "standard"
|
|
2888
|
+
*/
|
|
2889
|
+
charge_model?: "standard" | "graduated" | "package" | "percentage" | "volume";
|
|
2890
|
+
/**
|
|
2891
|
+
* 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.
|
|
2892
|
+
* @example false
|
|
2893
|
+
*/
|
|
2894
|
+
pay_in_advance?: boolean;
|
|
2895
|
+
/**
|
|
2896
|
+
* 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`.
|
|
2897
|
+
* @example true
|
|
2898
|
+
*/
|
|
2899
|
+
invoiceable?: boolean;
|
|
2900
|
+
/**
|
|
2901
|
+
* Specifies whether a charge is prorated based on the remaining number of days in the billing period or billed fully.
|
|
2902
|
+
*
|
|
2903
|
+
* - If set to `true`, the charge is prorated based on the remaining days in the current billing period.
|
|
2904
|
+
* - If set to `false`, the charge is billed in full.
|
|
2905
|
+
* - If not defined in the request, default value is `false`.
|
|
2906
|
+
* @example false
|
|
2907
|
+
*/
|
|
2908
|
+
prorated?: boolean;
|
|
2909
|
+
/**
|
|
2910
|
+
* 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.
|
|
2911
|
+
* @example 0
|
|
2912
|
+
*/
|
|
2913
|
+
min_amount_cents?: number;
|
|
2914
|
+
/** List of all thresholds utilized for calculating the charge. */
|
|
2915
|
+
properties?: ChargeProperties;
|
|
2916
|
+
/** All charge information, sorted by groups. */
|
|
2917
|
+
group_properties?: {
|
|
2918
|
+
/**
|
|
2919
|
+
* Unique identifier of a billable metric group, created by Lago.
|
|
2920
|
+
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
2921
|
+
*/
|
|
2922
|
+
group_id: string;
|
|
2923
|
+
/** List of all thresholds utilized for calculating a charge, scoped by groups used as dimensions for a single charge. */
|
|
2924
|
+
values: ChargeProperties;
|
|
2925
|
+
}[];
|
|
2926
|
+
/**
|
|
2927
|
+
* List of unique code used to identify the taxes.
|
|
2928
|
+
* @example ["french_standard_vat"]
|
|
2929
|
+
*/
|
|
2930
|
+
tax_codes?: string[];
|
|
2931
|
+
}[];
|
|
2932
|
+
};
|
|
2933
|
+
}
|
|
2934
|
+
export interface PlanUpdateInput {
|
|
2935
|
+
plan: {
|
|
2936
|
+
/**
|
|
2937
|
+
* The name of the plan.
|
|
2938
|
+
* @example "Startup"
|
|
2939
|
+
*/
|
|
2940
|
+
name?: string;
|
|
2941
|
+
/**
|
|
2942
|
+
* The code of the plan. It serves as a unique identifier associated with a particular plan. The code is typically used for internal or system-level identification purposes, like assigning a subscription, for instance.
|
|
2943
|
+
* @example "startup"
|
|
2944
|
+
*/
|
|
2945
|
+
code?: string;
|
|
2946
|
+
/**
|
|
2947
|
+
* The interval used for recurring billing. It represents the frequency at which subscription billing occurs. The interval can be one of the following values: `yearly`, `monthly`, or `weekly`.
|
|
2948
|
+
* @example "monthly"
|
|
2949
|
+
*/
|
|
2950
|
+
interval?: "weekly" | "monthly" | "yearly";
|
|
2951
|
+
/**
|
|
2952
|
+
* The description on the plan.
|
|
2953
|
+
* @example "Plan for early stage startups."
|
|
2954
|
+
*/
|
|
2955
|
+
description?: string;
|
|
2956
|
+
/**
|
|
2957
|
+
* 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.
|
|
2958
|
+
* @example 10000
|
|
2959
|
+
*/
|
|
2960
|
+
amount_cents?: number;
|
|
2961
|
+
/** The currency of the plan. It indicates the monetary unit in which the plan's cost, including taxes and usage-based charges, is expressed. */
|
|
2962
|
+
amount_currency?: Currency;
|
|
2963
|
+
/**
|
|
2964
|
+
* The duration in days during which the base cost of the plan is offered for free.
|
|
2965
|
+
* @example 5
|
|
2966
|
+
*/
|
|
2967
|
+
trial_period?: number;
|
|
2968
|
+
/**
|
|
2969
|
+
* This field determines the billing timing for the plan. When set to `true`, the base cost of the plan is due at the beginning of each billing period. Conversely, when set to `false`, the base cost of the plan is due at the end of each billing period.
|
|
2970
|
+
* @example true
|
|
2971
|
+
*/
|
|
2972
|
+
pay_in_advance?: boolean;
|
|
2973
|
+
/**
|
|
2974
|
+
* This field, when set to `true`, enables to invoice usage-based charges on monthly basis, even if the cadence of the plan is yearly. This allows customers to pay charges overage on a monthly basis. This can be set to true only if the plan’s interval is `yearly`.
|
|
2975
|
+
* @example null
|
|
2976
|
+
*/
|
|
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[];
|
|
2983
|
+
/**
|
|
2984
|
+
* Additional usage-based charges for this plan.
|
|
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":[]}]
|
|
2839
2986
|
*/
|
|
2840
2987
|
charges?: {
|
|
2841
2988
|
/**
|
|
@@ -2865,6 +3012,15 @@ export interface PlanInput {
|
|
|
2865
3012
|
* @example true
|
|
2866
3013
|
*/
|
|
2867
3014
|
invoiceable?: boolean;
|
|
3015
|
+
/**
|
|
3016
|
+
* Specifies whether a charge is prorated based on the remaining number of days in the billing period or billed fully.
|
|
3017
|
+
*
|
|
3018
|
+
* - If set to `true`, the charge is prorated based on the remaining days in the current billing period.
|
|
3019
|
+
* - If set to `false`, the charge is billed in full.
|
|
3020
|
+
* - If not defined in the request, default value is `false`.
|
|
3021
|
+
* @example false
|
|
3022
|
+
*/
|
|
3023
|
+
prorated?: boolean;
|
|
2868
3024
|
/**
|
|
2869
3025
|
* 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.
|
|
2870
3026
|
* @example 0
|
|
@@ -2882,6 +3038,11 @@ export interface PlanInput {
|
|
|
2882
3038
|
/** List of all thresholds utilized for calculating a charge, scoped by groups used as dimensions for a single charge. */
|
|
2883
3039
|
values: ChargeProperties;
|
|
2884
3040
|
}[];
|
|
3041
|
+
/**
|
|
3042
|
+
* List of unique code used to identify the taxes.
|
|
3043
|
+
* @example ["french_standard_vat"]
|
|
3044
|
+
*/
|
|
3045
|
+
tax_codes?: string[];
|
|
2885
3046
|
}[];
|
|
2886
3047
|
};
|
|
2887
3048
|
}
|
|
@@ -2952,9 +3113,11 @@ export interface PlanObject {
|
|
|
2952
3113
|
draft_invoices_count: number;
|
|
2953
3114
|
/**
|
|
2954
3115
|
* Additional usage-based charges for this plan.
|
|
2955
|
-
* @example [{"lago_id":"1a901a90-1a90-1a90-1a90-1a901a901a91","lago_billable_metric_id":"1a901a90-1a90-1a90-1a90-1a901a901a91","billable_metric_code":"requests","created_at":"2023-06-27T19:43:42Z","charge_model":"package","invoiceable":true,"pay_in_advance":false,"min_amount_cents":3000,"properties":{"amount":"30","free_units":100,"package_size":1000},"group_properties":[]},{"lago_id":"1a901a90-1a90-1a90-1a90-1a901a901a92","lago_billable_metric_id":"1a901a90-1a90-1a90-1a90-1a901a901a92","billable_metric_code":"cpu","created_at":"2023-06-27T19:43:42Z","charge_model":"graduated","invoiceable":true,"pay_in_advance":false,"min_amount_cents":0,"properties":{"graduated_ranges":[{"from_value":0,"to_value":10,"flat_amount":"10","per_unit_amount":"0.5"},{"from_value":11,"to_value":null,"flat_amount":"0","per_unit_amount":"0.4"}]},"group_properties":[]},{"lago_id":"1a901a90-1a90-1a90-1a90-1a901a901a93","lago_billable_metric_id":"1a901a90-1a90-1a90-1a90-1a901a901a93","billable_metric_code":"seats","created_at":"2023-06-27T19:43:42Z","charge_model":"standard","invoiceable":true,"pay_in_advance":true,"min_amount_cents":0,"properties":{},"group_properties":[{"group_id":"1a901a90-1a90-1a90-1a90-1a901a901a01","values":{"amount":"10"}},{"group_id":"1a901a90-1a90-1a90-1a90-1a901a901a02","values":{"amount":"5"}},{"group_id":"1a901a90-1a90-1a90-1a90-1a901a901a03","values":{"amount":"8"}}]},{"lago_id":"1a901a90-1a90-1a90-1a90-1a901a901a94","lago_billable_metric_id":"1a901a90-1a90-1a90-1a90-1a901a901a94","billable_metric_code":"storage","created_at":"2023-06-27T19:43:42Z","charge_model":"volume","invoiceable":true,"pay_in_advance":false,"min_amount_cents":0,"properties":{"volume_ranges":[{"from_value":0,"to_value":100,"flat_amount":"0","per_unit_amount":"0"},{"from_value":101,"to_value":null,"flat_amount":"0","per_unit_amount":"0.5"}]},"group_properties":[]},{"lago_id":"1a901a90-1a90-1a90-1a90-1a901a901a95","lago_billable_metric_id":"1a901a90-1a90-1a90-1a90-1a901a901a95","billable_metric_code":"payments","created_at":"2023-06-27T19:43:42Z","charge_model":"percentage","invoiceable":false,"pay_in_advance":true,"min_amount_cents":0,"properties":{"rate":"1","fixed_amount":"0.5","free_units_per_events":5,"free_units_per_total_aggregation":"500"},"group_properties":[]}]
|
|
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":[]}]
|
|
2956
3117
|
*/
|
|
2957
3118
|
charges?: ChargeObject[];
|
|
3119
|
+
/** All taxes applied to the plan. */
|
|
3120
|
+
taxes?: TaxObject[];
|
|
2958
3121
|
}
|
|
2959
3122
|
export interface PlansPaginated {
|
|
2960
3123
|
plans: PlanObject[];
|
|
@@ -3114,84 +3277,98 @@ export interface SubscriptionsPaginated {
|
|
|
3114
3277
|
export interface Tax {
|
|
3115
3278
|
tax: TaxObject;
|
|
3116
3279
|
}
|
|
3280
|
+
export interface TaxBaseInput {
|
|
3281
|
+
/**
|
|
3282
|
+
* Name of the tax.
|
|
3283
|
+
* @example "TVA"
|
|
3284
|
+
*/
|
|
3285
|
+
name?: string;
|
|
3286
|
+
/**
|
|
3287
|
+
* Unique code used to identify the tax associated with the API request.
|
|
3288
|
+
* @example "french_standard_vat"
|
|
3289
|
+
*/
|
|
3290
|
+
code?: string;
|
|
3291
|
+
/**
|
|
3292
|
+
* The percentage rate of the tax
|
|
3293
|
+
* @format ^[0-9]+.?[0-9]*$
|
|
3294
|
+
* @example "20.0"
|
|
3295
|
+
*/
|
|
3296
|
+
rate?: string;
|
|
3297
|
+
/**
|
|
3298
|
+
* Internal description of the taxe
|
|
3299
|
+
* @example "French standard VAT"
|
|
3300
|
+
*/
|
|
3301
|
+
description?: string | null;
|
|
3302
|
+
/**
|
|
3303
|
+
* Set to `true` if the tax is used as one of the organization's default
|
|
3304
|
+
* @example true
|
|
3305
|
+
*/
|
|
3306
|
+
applied_to_organization?: boolean;
|
|
3307
|
+
}
|
|
3308
|
+
export interface TaxCreateInput {
|
|
3309
|
+
tax: TaxBaseInput;
|
|
3310
|
+
}
|
|
3117
3311
|
export interface TaxesPaginated {
|
|
3118
3312
|
taxes: TaxObject[];
|
|
3119
3313
|
meta: PaginationMeta;
|
|
3120
3314
|
}
|
|
3121
|
-
export interface TaxInput {
|
|
3122
|
-
tax: {
|
|
3123
|
-
/**
|
|
3124
|
-
* The name of the tax.
|
|
3125
|
-
* @example "French VAT"
|
|
3126
|
-
*/
|
|
3127
|
-
name?: string;
|
|
3128
|
-
/**
|
|
3129
|
-
* Unique code used to identify the tax.
|
|
3130
|
-
* @example "vat_fr"
|
|
3131
|
-
*/
|
|
3132
|
-
code?: string;
|
|
3133
|
-
/**
|
|
3134
|
-
* The rate of the tax
|
|
3135
|
-
* @format ^[0-9]+.?[0-9]*$
|
|
3136
|
-
* @example "15.0"
|
|
3137
|
-
*/
|
|
3138
|
-
rate?: string;
|
|
3139
|
-
/**
|
|
3140
|
-
* Description of the tax.
|
|
3141
|
-
* @example "description"
|
|
3142
|
-
*/
|
|
3143
|
-
description?: string;
|
|
3144
|
-
/**
|
|
3145
|
-
* Set to `true` if the tax is used as one of the organization's default.
|
|
3146
|
-
* @example false
|
|
3147
|
-
*/
|
|
3148
|
-
applied_to_organization?: boolean;
|
|
3149
|
-
};
|
|
3150
|
-
}
|
|
3151
3315
|
export interface TaxObject {
|
|
3152
3316
|
/**
|
|
3317
|
+
* Unique identifier of the tax, created by Lago.
|
|
3153
3318
|
* @format uuid
|
|
3154
3319
|
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
3155
3320
|
*/
|
|
3156
3321
|
lago_id: string;
|
|
3157
3322
|
/**
|
|
3158
|
-
*
|
|
3159
|
-
* @example "
|
|
3323
|
+
* Name of the tax.
|
|
3324
|
+
* @example "TVA"
|
|
3160
3325
|
*/
|
|
3161
3326
|
name: string;
|
|
3162
3327
|
/**
|
|
3163
|
-
* Unique code used to identify the tax.
|
|
3164
|
-
* @example "
|
|
3328
|
+
* Unique code used to identify the tax associated with the API request.
|
|
3329
|
+
* @example "french_standard_vat"
|
|
3165
3330
|
*/
|
|
3166
3331
|
code: string;
|
|
3167
3332
|
/**
|
|
3168
|
-
*
|
|
3169
|
-
* @example "
|
|
3333
|
+
* Internal description of the taxe
|
|
3334
|
+
* @example "French standard VAT"
|
|
3170
3335
|
*/
|
|
3171
3336
|
description?: string;
|
|
3172
3337
|
/**
|
|
3173
|
-
* The rate of the tax
|
|
3174
|
-
* @
|
|
3175
|
-
* @example "25.0"
|
|
3338
|
+
* The percentage rate of the tax
|
|
3339
|
+
* @example 20
|
|
3176
3340
|
*/
|
|
3177
|
-
rate
|
|
3341
|
+
rate: number;
|
|
3178
3342
|
/**
|
|
3179
|
-
* Set to `true` if the tax is used as one of the organization's default
|
|
3343
|
+
* Set to `true` if the tax is used as one of the organization's default
|
|
3180
3344
|
* @example true
|
|
3181
3345
|
*/
|
|
3182
3346
|
applied_to_organization: boolean;
|
|
3347
|
+
/**
|
|
3348
|
+
* Number of charges this tax is applied to.
|
|
3349
|
+
* @example 0
|
|
3350
|
+
*/
|
|
3351
|
+
charges_count?: number;
|
|
3183
3352
|
/**
|
|
3184
3353
|
* Number of customers this tax is applied to (directly or via the organization's default).
|
|
3185
|
-
* @example
|
|
3354
|
+
* @example 0
|
|
3186
3355
|
*/
|
|
3187
3356
|
customers_count: number;
|
|
3188
3357
|
/**
|
|
3189
|
-
*
|
|
3358
|
+
* Number of plans this tax is applied to.
|
|
3359
|
+
* @example 0
|
|
3360
|
+
*/
|
|
3361
|
+
plans_count?: number;
|
|
3362
|
+
/**
|
|
3363
|
+
* Creation date of the tax.
|
|
3190
3364
|
* @format date-time
|
|
3191
|
-
* @example "
|
|
3365
|
+
* @example "2023-07-06T14:35:58Z"
|
|
3192
3366
|
*/
|
|
3193
3367
|
created_at: string;
|
|
3194
3368
|
}
|
|
3369
|
+
export interface TaxUpdateInput {
|
|
3370
|
+
tax: TaxBaseInput;
|
|
3371
|
+
}
|
|
3195
3372
|
/** @example "America/Los_Angeles" */
|
|
3196
3373
|
export declare enum Timezone {
|
|
3197
3374
|
UTC = "UTC",
|
|
@@ -3612,7 +3789,7 @@ export declare class HttpClient<SecurityDataType = unknown> {
|
|
|
3612
3789
|
}
|
|
3613
3790
|
/**
|
|
3614
3791
|
* @title Lago API documentation
|
|
3615
|
-
* @version 0.
|
|
3792
|
+
* @version 0.41.0-beta
|
|
3616
3793
|
* @license AGPLv3
|
|
3617
3794
|
* @baseUrl https://api.getlago.com/api/v1
|
|
3618
3795
|
* @externalDocs https://github.com/getlago
|
|
@@ -4027,26 +4204,6 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
4027
4204
|
* @secure
|
|
4028
4205
|
*/
|
|
4029
4206
|
deleteAppliedCoupon: (externalCustomerId: string, appliedCouponId: string, params?: RequestParams) => Promise<HttpResponse<AppliedCoupon, ApiErrorUnauthorized | ApiErrorNotFound>>;
|
|
4030
|
-
/**
|
|
4031
|
-
* @description Apply an existing tax to a customer
|
|
4032
|
-
*
|
|
4033
|
-
* @tags customers
|
|
4034
|
-
* @name ApplyTax
|
|
4035
|
-
* @summary Apply a tax
|
|
4036
|
-
* @request POST:/customers/{external_customer_id}/applied_taxes
|
|
4037
|
-
* @secure
|
|
4038
|
-
*/
|
|
4039
|
-
applyTax: (externalCustomerId: string, data: CustomerAppliedTaxInput, params?: RequestParams) => Promise<HttpResponse<CustomerAppliedTax, ApiErrorBadRequest | ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorNotFound>>;
|
|
4040
|
-
/**
|
|
4041
|
-
* @description Delete customer's appplied tax
|
|
4042
|
-
*
|
|
4043
|
-
* @tags customers
|
|
4044
|
-
* @name DeleteAppliedTax
|
|
4045
|
-
* @summary Delete customer's appplied tax
|
|
4046
|
-
* @request DELETE:/customers/{external_customer_id}/applied_taxes/{tax_code}
|
|
4047
|
-
* @secure
|
|
4048
|
-
*/
|
|
4049
|
-
deleteAppliedTax: (externalCustomerId: string, taxCode: string, params?: RequestParams) => Promise<HttpResponse<CustomerAppliedTax, ApiErrorBadRequest | ApiErrorUnauthorized | ApiErrorNotFound>>;
|
|
4050
4207
|
/**
|
|
4051
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
|
|
4052
4209
|
*
|
|
@@ -4378,7 +4535,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
4378
4535
|
* @request POST:/plans
|
|
4379
4536
|
* @secure
|
|
4380
4537
|
*/
|
|
4381
|
-
createPlan: (data:
|
|
4538
|
+
createPlan: (data: PlanCreateInput, params?: RequestParams) => Promise<HttpResponse<Plan, ApiErrorBadRequest | ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorNotFound>>;
|
|
4382
4539
|
/**
|
|
4383
4540
|
* @description This endpoint retrieves all existing plans.
|
|
4384
4541
|
*
|
|
@@ -4409,7 +4566,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
4409
4566
|
* @request PUT:/plans/{code}
|
|
4410
4567
|
* @secure
|
|
4411
4568
|
*/
|
|
4412
|
-
updatePlan: (code: string, data:
|
|
4569
|
+
updatePlan: (code: string, data: PlanUpdateInput, params?: RequestParams) => Promise<HttpResponse<Plan, ApiErrorBadRequest | ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorNotFound>>;
|
|
4413
4570
|
/**
|
|
4414
4571
|
* @description This endpoint retrieves a specific plan.
|
|
4415
4572
|
*
|
|
@@ -4472,6 +4629,11 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
4472
4629
|
* @example "premium"
|
|
4473
4630
|
*/
|
|
4474
4631
|
plan_code?: string;
|
|
4632
|
+
/**
|
|
4633
|
+
* If the field is not defined, Lago will return only `active` subscriptions. However, if you wish to fetch subscriptions by different status you can define them in a status[] query param. Available filter values: `pending`, `canceled`, `terminated`, `active`.
|
|
4634
|
+
* @example ["active","pending"]
|
|
4635
|
+
*/
|
|
4636
|
+
status?: ("pending" | "canceled" | "terminated" | "active")[];
|
|
4475
4637
|
}, params?: RequestParams) => Promise<HttpResponse<SubscriptionsPaginated, ApiErrorUnauthorized | ApiErrorNotFound>>;
|
|
4476
4638
|
/**
|
|
4477
4639
|
* @description This endpoint allows you to update a subscription.
|
|
@@ -4492,11 +4654,17 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
4492
4654
|
* @request DELETE:/subscriptions/{external_id}
|
|
4493
4655
|
* @secure
|
|
4494
4656
|
*/
|
|
4495
|
-
destroySubscription: (externalId: string,
|
|
4657
|
+
destroySubscription: (externalId: string, query?: {
|
|
4658
|
+
/**
|
|
4659
|
+
* If the field is not defined, Lago will terminate only `active` subscriptions. However, if you wish to cancel a `pending` subscription, please ensure that you include `status=pending` in your request.
|
|
4660
|
+
* @example "pending"
|
|
4661
|
+
*/
|
|
4662
|
+
status?: string;
|
|
4663
|
+
}, params?: RequestParams) => Promise<HttpResponse<Subscription, ApiErrorUnauthorized | ApiErrorNotAllowed | ApiErrorNotFound>>;
|
|
4496
4664
|
};
|
|
4497
4665
|
taxes: {
|
|
4498
4666
|
/**
|
|
4499
|
-
* @description
|
|
4667
|
+
* @description This endpoint creates a new tax representing a customizable tax rate applicable to either the organization or a specific customer.
|
|
4500
4668
|
*
|
|
4501
4669
|
* @tags taxes
|
|
4502
4670
|
* @name CreateTax
|
|
@@ -4504,50 +4672,50 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
4504
4672
|
* @request POST:/taxes
|
|
4505
4673
|
* @secure
|
|
4506
4674
|
*/
|
|
4507
|
-
createTax: (data:
|
|
4675
|
+
createTax: (data: TaxCreateInput, params?: RequestParams) => Promise<HttpResponse<Tax, ApiErrorBadRequest | ApiErrorUnauthorized | ApiErrorUnprocessableEntity>>;
|
|
4508
4676
|
/**
|
|
4509
|
-
* @description
|
|
4677
|
+
* @description This endpoint retrieves all existing taxes representing a customizable tax rate applicable to either the organization or a specific customer.
|
|
4510
4678
|
*
|
|
4511
4679
|
* @tags taxes
|
|
4512
4680
|
* @name FindAllTaxes
|
|
4513
|
-
* @summary
|
|
4681
|
+
* @summary List all taxes
|
|
4514
4682
|
* @request GET:/taxes
|
|
4515
4683
|
* @secure
|
|
4516
4684
|
*/
|
|
4517
4685
|
findAllTaxes: (query?: {
|
|
4518
4686
|
/**
|
|
4519
|
-
*
|
|
4520
|
-
* @example
|
|
4687
|
+
* Page number.
|
|
4688
|
+
* @example 1
|
|
4521
4689
|
*/
|
|
4522
4690
|
page?: number;
|
|
4523
4691
|
/**
|
|
4524
|
-
* Number of records per page
|
|
4692
|
+
* Number of records per page.
|
|
4525
4693
|
* @example 20
|
|
4526
4694
|
*/
|
|
4527
4695
|
per_page?: number;
|
|
4528
4696
|
}, params?: RequestParams) => Promise<HttpResponse<TaxesPaginated, ApiErrorUnauthorized>>;
|
|
4529
4697
|
/**
|
|
4530
|
-
* @description
|
|
4698
|
+
* @description This endpoint updates an existing tax representing a customizable tax rate applicable to either the organization or a specific customer.
|
|
4531
4699
|
*
|
|
4532
4700
|
* @tags taxes
|
|
4533
4701
|
* @name UpdateTax
|
|
4534
|
-
* @summary Update
|
|
4702
|
+
* @summary Update a tax
|
|
4535
4703
|
* @request PUT:/taxes/{code}
|
|
4536
4704
|
* @secure
|
|
4537
4705
|
*/
|
|
4538
|
-
updateTax: (code: string, data:
|
|
4706
|
+
updateTax: (code: string, data: TaxUpdateInput, params?: RequestParams) => Promise<HttpResponse<Tax, ApiErrorBadRequest | ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorNotFound>>;
|
|
4539
4707
|
/**
|
|
4540
|
-
* @description
|
|
4708
|
+
* @description This endpoint retrieves an existing tax representing a customizable tax rate applicable to either the organization or a specific customer. The tax is identified by its unique code.
|
|
4541
4709
|
*
|
|
4542
4710
|
* @tags taxes
|
|
4543
4711
|
* @name FindTax
|
|
4544
|
-
* @summary
|
|
4712
|
+
* @summary Retrieve a Tax
|
|
4545
4713
|
* @request GET:/taxes/{code}
|
|
4546
4714
|
* @secure
|
|
4547
4715
|
*/
|
|
4548
4716
|
findTax: (code: string, params?: RequestParams) => Promise<HttpResponse<Tax, ApiErrorUnauthorized | ApiErrorNotFound>>;
|
|
4549
4717
|
/**
|
|
4550
|
-
* @description
|
|
4718
|
+
* @description This endpoint is used to delete a tax.
|
|
4551
4719
|
*
|
|
4552
4720
|
* @tags taxes
|
|
4553
4721
|
* @name DestroyTax
|
|
@@ -4680,5 +4848,128 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
4680
4848
|
*/
|
|
4681
4849
|
fetchPublicKey: (params?: RequestParams) => Promise<HttpResponse<string, ApiErrorUnauthorized>>;
|
|
4682
4850
|
};
|
|
4851
|
+
webhookEndpoints: {
|
|
4852
|
+
/**
|
|
4853
|
+
* @description This endpoint is used to create a webhook endpoint.
|
|
4854
|
+
*
|
|
4855
|
+
* @tags webhook_endpoints
|
|
4856
|
+
* @name CreateWebhookEndpoint
|
|
4857
|
+
* @summary Create a webhook_endpoint
|
|
4858
|
+
* @request POST:/webhook_endpoints
|
|
4859
|
+
* @secure
|
|
4860
|
+
*/
|
|
4861
|
+
createWebhookEndpoint: (data: {
|
|
4862
|
+
webhook_endpoint?: {
|
|
4863
|
+
/**
|
|
4864
|
+
* The URL of the webhook endpoint.
|
|
4865
|
+
* @example "https://foo.bar"
|
|
4866
|
+
*/
|
|
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;
|
|
4873
|
+
};
|
|
4874
|
+
}, params?: RequestParams) => Promise<HttpResponse<{
|
|
4875
|
+
webhook_endpoint: {
|
|
4876
|
+
/**
|
|
4877
|
+
* Unique identifier assigned to the wallet within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the webhook endpoint's record within the Lago system.
|
|
4878
|
+
* @format uuid
|
|
4879
|
+
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
4880
|
+
*/
|
|
4881
|
+
lago_id: string;
|
|
4882
|
+
/**
|
|
4883
|
+
* Unique identifier assigned to the organization attached to the webhook endpoint within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the organization’s record within the Lago system.
|
|
4884
|
+
* @format uuid
|
|
4885
|
+
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
4886
|
+
*/
|
|
4887
|
+
lago_organization_id: string;
|
|
4888
|
+
/**
|
|
4889
|
+
* The name of the wallet.
|
|
4890
|
+
* @example "Prepaid"
|
|
4891
|
+
*/
|
|
4892
|
+
webhook_url: string;
|
|
4893
|
+
/**
|
|
4894
|
+
* The signature algo for the webhook.
|
|
4895
|
+
* @example "hmac"
|
|
4896
|
+
*/
|
|
4897
|
+
signature_algo?: "jwt" | "hmac";
|
|
4898
|
+
/**
|
|
4899
|
+
* The date of the webhook endpoint creation, represented in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC).
|
|
4900
|
+
* @format date-time
|
|
4901
|
+
* @example "2022-04-29T08:59:51Z"
|
|
4902
|
+
*/
|
|
4903
|
+
created_at: string;
|
|
4904
|
+
};
|
|
4905
|
+
}, ApiErrorBadRequest | ApiErrorUnauthorized | ApiErrorUnprocessableEntity>>;
|
|
4906
|
+
/**
|
|
4907
|
+
* @description This endpoint is used to list all webhook endpoints.
|
|
4908
|
+
*
|
|
4909
|
+
* @tags webhook_endpoints
|
|
4910
|
+
* @name FindAllWebhookEndpoints
|
|
4911
|
+
* @summary List all webhook endpoints
|
|
4912
|
+
* @request GET:/webhook_endpoints
|
|
4913
|
+
* @secure
|
|
4914
|
+
*/
|
|
4915
|
+
findAllWebhookEndpoints: (query?: {
|
|
4916
|
+
/**
|
|
4917
|
+
* Page number.
|
|
4918
|
+
* @example 1
|
|
4919
|
+
*/
|
|
4920
|
+
page?: number;
|
|
4921
|
+
/**
|
|
4922
|
+
* Number of records per page.
|
|
4923
|
+
* @example 20
|
|
4924
|
+
*/
|
|
4925
|
+
per_page?: number;
|
|
4926
|
+
}, params?: RequestParams) => Promise<HttpResponse<{
|
|
4927
|
+
webhook_endpoints: any[];
|
|
4928
|
+
meta: PaginationMeta;
|
|
4929
|
+
}, ApiErrorUnauthorized>>;
|
|
4930
|
+
/**
|
|
4931
|
+
* @description This endpoint is used to update an existing webhook endpoint.
|
|
4932
|
+
*
|
|
4933
|
+
* @tags webhook_endpoints
|
|
4934
|
+
* @name UpdateWebhookEndpoint
|
|
4935
|
+
* @summary Update a webhook endpoint
|
|
4936
|
+
* @request PUT:/webhook_endpoints/{lago_id}
|
|
4937
|
+
* @secure
|
|
4938
|
+
*/
|
|
4939
|
+
updateWebhookEndpoint: (lagoId: string, data: {
|
|
4940
|
+
webhook_endpoint?: {
|
|
4941
|
+
/**
|
|
4942
|
+
* The URL of the webhook endpoint.
|
|
4943
|
+
* @example "https://foo.bar"
|
|
4944
|
+
*/
|
|
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;
|
|
4951
|
+
};
|
|
4952
|
+
}, params?: RequestParams) => Promise<HttpResponse<any, ApiErrorBadRequest | ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorNotFound>>;
|
|
4953
|
+
/**
|
|
4954
|
+
* @description This endpoint is used to retrieve an existing webhook endpoint.
|
|
4955
|
+
*
|
|
4956
|
+
* @tags webhook_endpoints
|
|
4957
|
+
* @name FindWebhookEndpoint
|
|
4958
|
+
* @summary Retrieve a webhook endpoint
|
|
4959
|
+
* @request GET:/webhook_endpoints/{lago_id}
|
|
4960
|
+
* @secure
|
|
4961
|
+
*/
|
|
4962
|
+
findWebhookEndpoint: (lagoId: string, params?: RequestParams) => Promise<HttpResponse<any, ApiErrorUnauthorized | ApiErrorNotFound>>;
|
|
4963
|
+
/**
|
|
4964
|
+
* @description This endpoint is used to delete an existing webhook endpoint.
|
|
4965
|
+
*
|
|
4966
|
+
* @tags webhook_endpoints
|
|
4967
|
+
* @name DestroyWebhookEndpoint
|
|
4968
|
+
* @summary Delete a webhook endpoint
|
|
4969
|
+
* @request DELETE:/webhook_endpoints/{lago_id}
|
|
4970
|
+
* @secure
|
|
4971
|
+
*/
|
|
4972
|
+
destroyWebhookEndpoint: (lagoId: string, params?: RequestParams) => Promise<HttpResponse<any, ApiErrorUnauthorized | ApiErrorNotAllowed | ApiErrorNotFound>>;
|
|
4973
|
+
};
|
|
4683
4974
|
}
|
|
4684
4975
|
export {};
|