lago-javascript-client 1.6.0 → 1.9.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 +257 -224
- package/esm/openapi/client.js +34 -19
- package/package.json +1 -1
- package/script/openapi/client.d.ts +257 -224
- package/script/openapi/client.js +34 -19
package/esm/openapi/client.d.ts
CHANGED
|
@@ -399,8 +399,6 @@ export interface BillableMetricObject {
|
|
|
399
399
|
* @example "seconds"
|
|
400
400
|
*/
|
|
401
401
|
weighted_interval?: "seconds" | null;
|
|
402
|
-
/** Group with one or two dimensions, used to apply differentiated pricing based on additional properties of the billable metric. */
|
|
403
|
-
group?: BillableMetricGroup;
|
|
404
402
|
filters?: BillableMetricFilterObject[];
|
|
405
403
|
/**
|
|
406
404
|
* Number of active subscriptions using this billable metric.
|
|
@@ -458,8 +456,6 @@ export interface BillableMetricBaseInput {
|
|
|
458
456
|
* @example "seconds"
|
|
459
457
|
*/
|
|
460
458
|
weighted_interval?: "seconds" | null;
|
|
461
|
-
/** Group with one or two dimensions, used to apply differentiated pricing based on additional properties of the billable metric. */
|
|
462
|
-
group?: BillableMetricGroup;
|
|
463
459
|
filters?: BillableMetricFilterInput[];
|
|
464
460
|
}
|
|
465
461
|
export interface BillableMetricCreateInput {
|
|
@@ -488,33 +484,6 @@ export interface BillableMetricFilterObject {
|
|
|
488
484
|
export interface BillableMetricUpdateInput {
|
|
489
485
|
billable_metric: BillableMetricBaseInput;
|
|
490
486
|
}
|
|
491
|
-
/**
|
|
492
|
-
* Group with one or two dimensions, used to apply differentiated pricing based on additional properties of the billable metric.
|
|
493
|
-
* @deprecated
|
|
494
|
-
*/
|
|
495
|
-
export interface BillableMetricGroup {
|
|
496
|
-
/**
|
|
497
|
-
* Name of the event property used to group values.
|
|
498
|
-
* @example "region"
|
|
499
|
-
*/
|
|
500
|
-
key: string;
|
|
501
|
-
/**
|
|
502
|
-
* Array of strings or objects representing all possible values.
|
|
503
|
-
* @example ["us-east-1","us-east-2","eu-west-1"]
|
|
504
|
-
*/
|
|
505
|
-
values: (string | {
|
|
506
|
-
/**
|
|
507
|
-
* Name of the event property used to group values.
|
|
508
|
-
* @example "region"
|
|
509
|
-
*/
|
|
510
|
-
key: string;
|
|
511
|
-
/**
|
|
512
|
-
* Array of strings representing all possible values.
|
|
513
|
-
* @example ["us-east-1","us-east-2","eu-west-1"]
|
|
514
|
-
*/
|
|
515
|
-
values: string[];
|
|
516
|
-
})[];
|
|
517
|
-
}
|
|
518
487
|
export interface BillableMetricsPaginated {
|
|
519
488
|
billable_metrics: BillableMetricObject[];
|
|
520
489
|
meta: PaginationMeta;
|
|
@@ -590,6 +559,15 @@ export interface ChargeObject {
|
|
|
590
559
|
* @example true
|
|
591
560
|
*/
|
|
592
561
|
invoiceable?: boolean;
|
|
562
|
+
/**
|
|
563
|
+
* This setting can only be configured if `pay_in_advance` is `true` and `invoiceable` is `false`.
|
|
564
|
+
* This field determines whether and when the charge fee should be included in
|
|
565
|
+
* the invoice. If `null`, no invoice will be issued for this charge fee.
|
|
566
|
+
* If `invoice`, an invoice will be generated at the end of the period,
|
|
567
|
+
* consolidating all charge fees with a succeeded payment status.
|
|
568
|
+
* @example "invoice"
|
|
569
|
+
*/
|
|
570
|
+
regroup_paid_fees?: "invoice" | null;
|
|
593
571
|
/**
|
|
594
572
|
* Specifies whether a charge is prorated based on the remaining number of days in the billing period or billed fully.
|
|
595
573
|
*
|
|
@@ -608,11 +586,6 @@ export interface ChargeObject {
|
|
|
608
586
|
properties?: ChargeProperties;
|
|
609
587
|
/** List of filters used to apply differentiated pricing based on additional event properties. */
|
|
610
588
|
filters?: ChargeFilterObject[];
|
|
611
|
-
/**
|
|
612
|
-
* All charge information, sorted by groups.
|
|
613
|
-
* @deprecated
|
|
614
|
-
*/
|
|
615
|
-
group_properties?: GroupPropertiesObject[];
|
|
616
589
|
/** All taxes applied to the charge. */
|
|
617
590
|
taxes?: TaxObject[];
|
|
618
591
|
}
|
|
@@ -1368,6 +1341,36 @@ export interface Customer {
|
|
|
1368
1341
|
customer: CustomerObjectExtended;
|
|
1369
1342
|
}
|
|
1370
1343
|
/** 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. */
|
|
1344
|
+
export interface Address {
|
|
1345
|
+
/**
|
|
1346
|
+
* The first line of the billing address
|
|
1347
|
+
* @example "5230 Penfield Ave"
|
|
1348
|
+
*/
|
|
1349
|
+
address_line1?: string | null;
|
|
1350
|
+
/**
|
|
1351
|
+
* The second line of the billing address
|
|
1352
|
+
* @example null
|
|
1353
|
+
*/
|
|
1354
|
+
address_line2?: string | null;
|
|
1355
|
+
/**
|
|
1356
|
+
* The city of the customer's billing address
|
|
1357
|
+
* @example "Woodland Hills"
|
|
1358
|
+
*/
|
|
1359
|
+
city?: string | null;
|
|
1360
|
+
/** Country code of the customer's billing address. Format must be ISO 3166 (alpha-2) */
|
|
1361
|
+
country?: Country;
|
|
1362
|
+
/**
|
|
1363
|
+
* The state of the customer's billing address
|
|
1364
|
+
* @example "CA"
|
|
1365
|
+
*/
|
|
1366
|
+
state?: string | null;
|
|
1367
|
+
/**
|
|
1368
|
+
* The zipcode of the customer's billing address
|
|
1369
|
+
* @example "91364"
|
|
1370
|
+
*/
|
|
1371
|
+
zipcode?: string | null;
|
|
1372
|
+
}
|
|
1373
|
+
/** 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. */
|
|
1371
1374
|
export interface CustomerBillingConfiguration {
|
|
1372
1375
|
/**
|
|
1373
1376
|
* The grace period, expressed in days, for the invoice. This period refers to the additional time granted to the customer beyond the invoice due date to adjust usage and line items
|
|
@@ -1406,7 +1409,7 @@ export interface CustomerBillingConfiguration {
|
|
|
1406
1409
|
*/
|
|
1407
1410
|
document_locale?: string;
|
|
1408
1411
|
/**
|
|
1409
|
-
* 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,
|
|
1412
|
+
* 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, the payment methods will be set to `[card]`. For now, possible values are `card`, `sepa_debit`, `us_bank_account`, `bacs_debit` and `link`. Note that when `link` is selected, `card` should also be provided in the array.
|
|
1410
1413
|
* @example ["card","sepa_debit"]
|
|
1411
1414
|
*/
|
|
1412
1415
|
provider_payment_methods?: string[] | null;
|
|
@@ -1497,46 +1500,6 @@ export type CustomerChargeGroupedUsageObject = {
|
|
|
1497
1500
|
grouped_by?: Record<string, string>;
|
|
1498
1501
|
/** Array of filter object, representing multiple dimensions for a charge item. */
|
|
1499
1502
|
filters?: CustomerChargeFiltersUsageObject;
|
|
1500
|
-
/** Array of group object, representing multiple dimensions for a charge item. */
|
|
1501
|
-
groups?: CustomerChargeGroupsUsageObject;
|
|
1502
|
-
}[];
|
|
1503
|
-
/**
|
|
1504
|
-
* Array of group object, representing multiple dimensions for a charge item.
|
|
1505
|
-
* @deprecated
|
|
1506
|
-
*/
|
|
1507
|
-
export type CustomerChargeGroupsUsageObject = {
|
|
1508
|
-
/**
|
|
1509
|
-
* Unique identifier assigned to the group within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the group record within the Lago system.
|
|
1510
|
-
* @format uuid
|
|
1511
|
-
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
1512
|
-
*/
|
|
1513
|
-
lago_id?: string;
|
|
1514
|
-
/**
|
|
1515
|
-
* The group key, only returned for groups with two dimensions.
|
|
1516
|
-
* @example null
|
|
1517
|
-
*/
|
|
1518
|
-
key?: string | null;
|
|
1519
|
-
/**
|
|
1520
|
-
* The group value.
|
|
1521
|
-
* @example "europe"
|
|
1522
|
-
*/
|
|
1523
|
-
value?: string;
|
|
1524
|
-
/**
|
|
1525
|
-
* The number of units consumed for a specific group related to a charge item.
|
|
1526
|
-
* @pattern ^[0-9]+.?[0-9]*$
|
|
1527
|
-
* @example "0.9"
|
|
1528
|
-
*/
|
|
1529
|
-
units?: string;
|
|
1530
|
-
/**
|
|
1531
|
-
* The quantity of usage events that have been recorded for a particular charge during the specified time period. These events may also be referred to as the number of transactions in some contexts.
|
|
1532
|
-
* @example 10
|
|
1533
|
-
*/
|
|
1534
|
-
events_count?: number;
|
|
1535
|
-
/**
|
|
1536
|
-
* The amount in cents, tax excluded, consumed for a specific group related to a charge item.
|
|
1537
|
-
* @example 1000
|
|
1538
|
-
*/
|
|
1539
|
-
amount_cents?: number;
|
|
1540
1503
|
}[];
|
|
1541
1504
|
export interface CustomerChargeUsageObject {
|
|
1542
1505
|
/**
|
|
@@ -1598,12 +1561,10 @@ export interface CustomerChargeUsageObject {
|
|
|
1598
1561
|
* The aggregation type of the billable metric used for this charge. Possible values are `count_agg`, `sum_agg`, `max_agg` or `unique_count_agg`.
|
|
1599
1562
|
* @example "sum_agg"
|
|
1600
1563
|
*/
|
|
1601
|
-
aggregation_type: "count_agg" | "sum_agg" | "max_agg" | "unique_count_agg";
|
|
1564
|
+
aggregation_type: "count_agg" | "sum_agg" | "max_agg" | "unique_count_agg" | "weighted_sum_agg" | "latest_agg";
|
|
1602
1565
|
};
|
|
1603
1566
|
/** Array of filter object, representing multiple dimensions for a charge item. */
|
|
1604
1567
|
filters?: CustomerChargeFiltersUsageObject;
|
|
1605
|
-
/** Array of group object, representing multiple dimensions for a charge item. */
|
|
1606
|
-
groups: CustomerChargeGroupsUsageObject;
|
|
1607
1568
|
/** Array of aggregated fees, grouped by the event properties defined in a `standard` charge model. */
|
|
1608
1569
|
grouped_usage?: CustomerChargeGroupedUsageObject;
|
|
1609
1570
|
}
|
|
@@ -1698,6 +1659,8 @@ export interface CustomerCreateInput {
|
|
|
1698
1659
|
net_payment_term?: number | null;
|
|
1699
1660
|
/** 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. */
|
|
1700
1661
|
billing_configuration?: CustomerBillingConfiguration;
|
|
1662
|
+
/** 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. */
|
|
1663
|
+
shipping_address?: Address;
|
|
1701
1664
|
integration_customers?: {
|
|
1702
1665
|
/**
|
|
1703
1666
|
* A unique identifier for the integration customer object in the Lago application.
|
|
@@ -1903,6 +1866,8 @@ export interface CustomerObject {
|
|
|
1903
1866
|
updated_at?: string;
|
|
1904
1867
|
/** 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. */
|
|
1905
1868
|
billing_configuration?: CustomerBillingConfiguration;
|
|
1869
|
+
/** 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. */
|
|
1870
|
+
shipping_address?: Address;
|
|
1906
1871
|
integration_customers?: IntegrationCustomer[];
|
|
1907
1872
|
metadata?: CustomerMetadata[];
|
|
1908
1873
|
}
|
|
@@ -1971,7 +1936,7 @@ export interface Event {
|
|
|
1971
1936
|
event: EventObject;
|
|
1972
1937
|
}
|
|
1973
1938
|
export interface EventBatchInput {
|
|
1974
|
-
events:
|
|
1939
|
+
events: any[];
|
|
1975
1940
|
}
|
|
1976
1941
|
export interface EventEstimateFeesInput {
|
|
1977
1942
|
event: {
|
|
@@ -1981,17 +1946,10 @@ export interface EventEstimateFeesInput {
|
|
|
1981
1946
|
*/
|
|
1982
1947
|
code: string;
|
|
1983
1948
|
/**
|
|
1984
|
-
* The
|
|
1985
|
-
* This field is deprecated and is no longer supported or maintained. Please use the `external_subscription_id` instead.
|
|
1986
|
-
* @deprecated
|
|
1987
|
-
* @example "5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba"
|
|
1988
|
-
*/
|
|
1989
|
-
external_customer_id?: string;
|
|
1990
|
-
/**
|
|
1991
|
-
* The unique identifier of the subscription within your application. It is a mandatory field when the customer possesses multiple subscriptions or when the `external_customer_id` is not provided.
|
|
1949
|
+
* The unique identifier of the subscription within your application.
|
|
1992
1950
|
* @example "sub_1234567890"
|
|
1993
1951
|
*/
|
|
1994
|
-
external_subscription_id
|
|
1952
|
+
external_subscription_id: string;
|
|
1995
1953
|
/** 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. */
|
|
1996
1954
|
properties?: object;
|
|
1997
1955
|
};
|
|
@@ -2003,13 +1961,6 @@ export interface EventInput {
|
|
|
2003
1961
|
* @example "transaction_1234567890"
|
|
2004
1962
|
*/
|
|
2005
1963
|
transaction_id: string;
|
|
2006
|
-
/**
|
|
2007
|
-
* The customer external unique identifier (provided by your own application). This field is optional if you send the `external_subscription_id`, targeting a specific subscription.
|
|
2008
|
-
* This field is deprecated and is no longer supported or maintained. Please use the `external_subscription_id` instead.
|
|
2009
|
-
* @deprecated
|
|
2010
|
-
* @example "5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba"
|
|
2011
|
-
*/
|
|
2012
|
-
external_customer_id?: string;
|
|
2013
1964
|
/**
|
|
2014
1965
|
* The unique identifier of the subscription within your application. It is a mandatory field when the customer possesses multiple subscriptions or when the `external_customer_id` is not provided.
|
|
2015
1966
|
* @example "sub_1234567890"
|
|
@@ -2052,13 +2003,6 @@ export interface EventObject {
|
|
|
2052
2003
|
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
2053
2004
|
*/
|
|
2054
2005
|
lago_customer_id: string | null;
|
|
2055
|
-
/**
|
|
2056
|
-
* The customer external unique identifier (provided by your own application). This field is optional if you send the `external_subscription_id`, targeting a specific subscription.
|
|
2057
|
-
* This field is deprecated and is no longer supported or maintained. Please use the `external_subscription_id` instead.
|
|
2058
|
-
* @deprecated
|
|
2059
|
-
* @example "5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba"
|
|
2060
|
-
*/
|
|
2061
|
-
external_customer_id: string | null;
|
|
2062
2006
|
/**
|
|
2063
2007
|
* 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.
|
|
2064
2008
|
* @example "storage"
|
|
@@ -2089,7 +2033,7 @@ export interface EventObject {
|
|
|
2089
2033
|
* The unique identifier of the subscription within your application. It is a mandatory field when the customer possesses multiple subscriptions or when the `external_customer_id` is not provided.
|
|
2090
2034
|
* @example "sub_1234567890"
|
|
2091
2035
|
*/
|
|
2092
|
-
external_subscription_id: string
|
|
2036
|
+
external_subscription_id: string;
|
|
2093
2037
|
/**
|
|
2094
2038
|
* The creation date of the event's record in the Lago application, presented in the ISO 8601 datetime format, specifically in Coordinated Universal Time (UTC). It provides the precise timestamp of when the event's record was created within the Lago application
|
|
2095
2039
|
* @format date-time
|
|
@@ -2115,13 +2059,6 @@ export interface FeeObject {
|
|
|
2115
2059
|
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
2116
2060
|
*/
|
|
2117
2061
|
lago_id?: string | null;
|
|
2118
|
-
/**
|
|
2119
|
-
* Unique identifier assigned to the group that the fee belongs to
|
|
2120
|
-
* @deprecated
|
|
2121
|
-
* @format uuid
|
|
2122
|
-
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
2123
|
-
*/
|
|
2124
|
-
lago_group_id?: string | null;
|
|
2125
2062
|
/**
|
|
2126
2063
|
* Unique identifier assigned to the charge filter that the fee belongs to
|
|
2127
2064
|
* @format uuid
|
|
@@ -2469,12 +2406,6 @@ export interface FeeObject {
|
|
|
2469
2406
|
filter_invoice_display_name?: string;
|
|
2470
2407
|
/** Key value list of event properties */
|
|
2471
2408
|
filters?: Record<string, string[]>;
|
|
2472
|
-
/**
|
|
2473
|
-
* 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.
|
|
2474
|
-
* @deprecated
|
|
2475
|
-
* @example "Transactions - ACH"
|
|
2476
|
-
*/
|
|
2477
|
-
group_invoice_display_name?: string;
|
|
2478
2409
|
/**
|
|
2479
2410
|
* Unique identifier of the fee item, created by Lago. It can be the identifier of the `add-on`, the identifier of the `charge`, the identifier of the `credit` or the identifier of the `subscription`.
|
|
2480
2411
|
* @format uuid
|
|
@@ -2517,49 +2448,17 @@ export interface GrossRevenueObject {
|
|
|
2517
2448
|
* The total amount of revenue for a period, expressed in cents.
|
|
2518
2449
|
* @example 50000
|
|
2519
2450
|
*/
|
|
2520
|
-
amount_cents
|
|
2451
|
+
amount_cents: number;
|
|
2521
2452
|
/** The currency of revenue analytics. Format must be ISO 4217. */
|
|
2522
|
-
currency
|
|
2523
|
-
}
|
|
2524
|
-
export interface GrossRevenues {
|
|
2525
|
-
gross_revenues: GrossRevenueObject[];
|
|
2526
|
-
}
|
|
2527
|
-
export interface GroupObject {
|
|
2528
|
-
/**
|
|
2529
|
-
* Unique identifier of a specific group associated with the billable metric.
|
|
2530
|
-
* @format uuid
|
|
2531
|
-
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
2532
|
-
*/
|
|
2533
|
-
lago_id: string;
|
|
2534
|
-
/**
|
|
2535
|
-
* Key of a specific group associated with the billable metric.
|
|
2536
|
-
* @example "region"
|
|
2537
|
-
*/
|
|
2538
|
-
key: string;
|
|
2539
|
-
/**
|
|
2540
|
-
* One of the values for a specific group associated with the billable metric.
|
|
2541
|
-
* @example "us-east-1"
|
|
2542
|
-
*/
|
|
2543
|
-
value: string;
|
|
2544
|
-
}
|
|
2545
|
-
export interface GroupPropertiesObject {
|
|
2546
|
-
/**
|
|
2547
|
-
* Unique identifier of a billable metric group, created by Lago.
|
|
2548
|
-
* @format uuid
|
|
2549
|
-
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
2550
|
-
*/
|
|
2551
|
-
group_id: string;
|
|
2453
|
+
currency: Currency;
|
|
2552
2454
|
/**
|
|
2553
|
-
*
|
|
2554
|
-
* @example
|
|
2455
|
+
* Contains invoices count.
|
|
2456
|
+
* @example 10
|
|
2555
2457
|
*/
|
|
2556
|
-
|
|
2557
|
-
/** List of all thresholds utilized for calculating a charge, scoped by groups used as dimensions for a single charge. */
|
|
2558
|
-
values: ChargeProperties;
|
|
2458
|
+
invoices_count: number;
|
|
2559
2459
|
}
|
|
2560
|
-
export interface
|
|
2561
|
-
|
|
2562
|
-
meta: PaginationMeta;
|
|
2460
|
+
export interface GrossRevenues {
|
|
2461
|
+
gross_revenues: GrossRevenueObject[];
|
|
2563
2462
|
}
|
|
2564
2463
|
/** Minimum commitment for this plan. */
|
|
2565
2464
|
export type MinimumCommitmentInput = {
|
|
@@ -2674,7 +2573,7 @@ export interface InvoiceCollectionObject {
|
|
|
2674
2573
|
* The total amount of revenue for a period, expressed in cents.
|
|
2675
2574
|
* @example 50000
|
|
2676
2575
|
*/
|
|
2677
|
-
amount_cents
|
|
2576
|
+
amount_cents?: number;
|
|
2678
2577
|
/** The currency of revenue analytics. Format must be ISO 4217. */
|
|
2679
2578
|
currency?: Currency;
|
|
2680
2579
|
}
|
|
@@ -3150,6 +3049,28 @@ export interface OrganizationUpdateInput {
|
|
|
3150
3049
|
billing_configuration?: OrganizationBillingConfiguration;
|
|
3151
3050
|
};
|
|
3152
3051
|
}
|
|
3052
|
+
export interface OverdueBalanceObject {
|
|
3053
|
+
/**
|
|
3054
|
+
* Identifies the month to analyze revenue.
|
|
3055
|
+
* @example "2023-11-01T00:00:00.000Z"
|
|
3056
|
+
*/
|
|
3057
|
+
month: string;
|
|
3058
|
+
/**
|
|
3059
|
+
* The total amount of revenue for a period, expressed in cents.
|
|
3060
|
+
* @example 50000
|
|
3061
|
+
*/
|
|
3062
|
+
amount_cents: number;
|
|
3063
|
+
/** The currency of revenue analytics. Format must be ISO 4217. */
|
|
3064
|
+
currency: Currency;
|
|
3065
|
+
/**
|
|
3066
|
+
* The Lago invoice IDs associated with the revenue.
|
|
3067
|
+
* @example ["5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba"]
|
|
3068
|
+
*/
|
|
3069
|
+
lago_invoice_ids: string[];
|
|
3070
|
+
}
|
|
3071
|
+
export interface OverdueBalances {
|
|
3072
|
+
overdue_balances: OverdueBalanceObject[];
|
|
3073
|
+
}
|
|
3153
3074
|
export interface PaginationMeta {
|
|
3154
3075
|
/**
|
|
3155
3076
|
* Current page.
|
|
@@ -3238,7 +3159,7 @@ export interface PlanCreateInput {
|
|
|
3238
3159
|
minimum_commitment?: MinimumCommitmentInput;
|
|
3239
3160
|
/**
|
|
3240
3161
|
* Additional usage-based charges for this plan.
|
|
3241
|
-
* @example [{"billable_metric_id":"1a901a90-1a90-1a90-1a90-1a901a901a91","charge_model":"package","invoiceable":true,"invoice_display_name":"Setup","pay_in_advance":false,"prorated":false,"min_amount_cents":3000,"properties":{"amount":"30","free_units":100,"package_size":1000},"
|
|
3162
|
+
* @example [{"billable_metric_id":"1a901a90-1a90-1a90-1a90-1a901a901a91","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},"tax_codes":["french_standard_vat"]},{"billable_metric_id":"1a901a90-1a90-1a90-1a90-1a901a901a92","charge_model":"graduated","invoiceable":true,"invoice_display_name":"Setup","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"}]}},{"billable_metric_id":"1a901a90-1a90-1a90-1a90-1a901a901a93","charge_model":"standard","invoiceable":true,"invoice_display_name":"Setup","pay_in_advance":true,"prorated":false,"min_amount_cents":0,"properties":{}},{"billable_metric_id":"1a901a90-1a90-1a90-1a90-1a901a901a94","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"}]}},{"billable_metric_id":"1a901a90-1a90-1a90-1a90-1a901a901a95","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"}}]
|
|
3242
3163
|
*/
|
|
3243
3164
|
charges?: {
|
|
3244
3165
|
/**
|
|
@@ -3262,6 +3183,15 @@ export interface PlanCreateInput {
|
|
|
3262
3183
|
* @example true
|
|
3263
3184
|
*/
|
|
3264
3185
|
invoiceable?: boolean;
|
|
3186
|
+
/**
|
|
3187
|
+
* This setting can only be configured if `pay_in_advance` is `true` and `invoiceable` is `false`.
|
|
3188
|
+
* This field determines whether and when the charge fee should be included in
|
|
3189
|
+
* the invoice. If `null`, no invoice will be issued for this charge fee.
|
|
3190
|
+
* If `invoice`, an invoice will be generated at the end of the period,
|
|
3191
|
+
* consolidating all charge fees with a succeeded payment status.
|
|
3192
|
+
* @example "invoice"
|
|
3193
|
+
*/
|
|
3194
|
+
regroup_paid_fees?: "invoice" | null;
|
|
3265
3195
|
/**
|
|
3266
3196
|
* 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.
|
|
3267
3197
|
* @example "Setup"
|
|
@@ -3283,19 +3213,6 @@ export interface PlanCreateInput {
|
|
|
3283
3213
|
min_amount_cents?: number;
|
|
3284
3214
|
/** List of all thresholds utilized for calculating the charge. */
|
|
3285
3215
|
properties?: ChargeProperties;
|
|
3286
|
-
/**
|
|
3287
|
-
* All charge information, sorted by groups.
|
|
3288
|
-
* @deprecated
|
|
3289
|
-
*/
|
|
3290
|
-
group_properties?: {
|
|
3291
|
-
/**
|
|
3292
|
-
* Unique identifier of a billable metric group, created by Lago.
|
|
3293
|
-
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
3294
|
-
*/
|
|
3295
|
-
group_id: string;
|
|
3296
|
-
/** List of all thresholds utilized for calculating a charge, scoped by groups used as dimensions for a single charge. */
|
|
3297
|
-
values: ChargeProperties;
|
|
3298
|
-
}[];
|
|
3299
3216
|
/** List of filters used to apply differentiated pricing based on additional event properties. */
|
|
3300
3217
|
filters?: ChargeFilterInput[];
|
|
3301
3218
|
/**
|
|
@@ -3367,19 +3284,6 @@ export interface PlanOverridesObject {
|
|
|
3367
3284
|
min_amount_cents?: number;
|
|
3368
3285
|
/** List of all thresholds utilized for calculating the charge. */
|
|
3369
3286
|
properties?: ChargeProperties;
|
|
3370
|
-
/**
|
|
3371
|
-
* All charge information, sorted by groups.
|
|
3372
|
-
* @deprecated
|
|
3373
|
-
*/
|
|
3374
|
-
group_properties?: {
|
|
3375
|
-
/**
|
|
3376
|
-
* Unique identifier of a billable metric group, created by Lago.
|
|
3377
|
-
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
3378
|
-
*/
|
|
3379
|
-
group_id: string;
|
|
3380
|
-
/** List of all thresholds utilized for calculating a charge, scoped by groups used as dimensions for a single charge. */
|
|
3381
|
-
values: ChargeProperties;
|
|
3382
|
-
}[];
|
|
3383
3287
|
/** List of filters used to apply differentiated pricing based on additional event properties. */
|
|
3384
3288
|
filters?: ChargeFilterInput[];
|
|
3385
3289
|
/**
|
|
@@ -3447,7 +3351,7 @@ export interface PlanUpdateInput {
|
|
|
3447
3351
|
minimum_commitment?: MinimumCommitmentInput;
|
|
3448
3352
|
/**
|
|
3449
3353
|
* Additional usage-based charges for this plan.
|
|
3450
|
-
* @example [{"billable_metric_id":"1a901a90-1a90-1a90-1a90-1a901a901a91","charge_model":"package","invoiceable":true,"invoice_display_name":"Setup","pay_in_advance":false,"prorated":false,"min_amount_cents":3000,"properties":{"amount":"30","free_units":100,"package_size":1000},"
|
|
3354
|
+
* @example [{"billable_metric_id":"1a901a90-1a90-1a90-1a90-1a901a901a91","charge_model":"package","invoiceable":true,"invoice_display_name":"Setup","pay_in_advance":false,"prorated":false,"min_amount_cents":3000,"properties":{"amount":"30","free_units":100,"package_size":1000},"tax_codes":["french_standard_vat"]},{"billable_metric_id":"1a901a90-1a90-1a90-1a90-1a901a901a92","charge_model":"graduated","invoiceable":true,"invoice_display_name":"Setup","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"}]}},{"billable_metric_id":"1a901a90-1a90-1a90-1a90-1a901a901a93","charge_model":"standard","invoiceable":true,"invoice_display_name":"Setup","pay_in_advance":true,"regroup_paid_fees":null,"prorated":false,"min_amount_cents":0,"properties":{}},{"billable_metric_id":"1a901a90-1a90-1a90-1a90-1a901a901a94","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"}]}},{"billable_metric_id":"1a901a90-1a90-1a90-1a90-1a901a901a95","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"}}]
|
|
3451
3355
|
*/
|
|
3452
3356
|
charges?: {
|
|
3453
3357
|
/**
|
|
@@ -3477,6 +3381,15 @@ export interface PlanUpdateInput {
|
|
|
3477
3381
|
* @example true
|
|
3478
3382
|
*/
|
|
3479
3383
|
invoiceable?: boolean;
|
|
3384
|
+
/**
|
|
3385
|
+
* This setting can only be configured if `pay_in_advance` is `true` and `invoiceable` is `false`.
|
|
3386
|
+
* This field determines whether and when the charge fee should be included in
|
|
3387
|
+
* the invoice. If `null`, no invoice will be issued for this charge fee.
|
|
3388
|
+
* If `invoice`, an invoice will be generated at the end of the period,
|
|
3389
|
+
* consolidating all charge fees with a succeeded payment status.
|
|
3390
|
+
* @example "invoice"
|
|
3391
|
+
*/
|
|
3392
|
+
regroup_paid_fees?: "invoice" | null;
|
|
3480
3393
|
/**
|
|
3481
3394
|
* 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.
|
|
3482
3395
|
* @example "Setup"
|
|
@@ -3498,19 +3411,6 @@ export interface PlanUpdateInput {
|
|
|
3498
3411
|
min_amount_cents?: number;
|
|
3499
3412
|
/** List of all thresholds utilized for calculating the charge. */
|
|
3500
3413
|
properties?: ChargeProperties;
|
|
3501
|
-
/**
|
|
3502
|
-
* All charge information, sorted by groups.
|
|
3503
|
-
* @deprecated
|
|
3504
|
-
*/
|
|
3505
|
-
group_properties?: {
|
|
3506
|
-
/**
|
|
3507
|
-
* Unique identifier of a billable metric group, created by Lago.
|
|
3508
|
-
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
3509
|
-
*/
|
|
3510
|
-
group_id: string;
|
|
3511
|
-
/** List of all thresholds utilized for calculating a charge, scoped by groups used as dimensions for a single charge. */
|
|
3512
|
-
values: ChargeProperties;
|
|
3513
|
-
}[];
|
|
3514
3414
|
/** List of filters used to apply differentiated pricing based on additional event properties. */
|
|
3515
3415
|
filters?: ChargeFilterInput[];
|
|
3516
3416
|
/**
|
|
@@ -3594,7 +3494,7 @@ export interface PlanObject {
|
|
|
3594
3494
|
minimum_commitment?: MinimumCommitmentObject;
|
|
3595
3495
|
/**
|
|
3596
3496
|
* Additional usage-based charges for this plan.
|
|
3597
|
-
* @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,"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,"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":[]}]
|
|
3497
|
+
* @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":[]}]
|
|
3598
3498
|
*/
|
|
3599
3499
|
charges?: ChargeObject[];
|
|
3600
3500
|
/** All taxes applied to the plan. */
|
|
@@ -3934,6 +3834,21 @@ export interface WalletCreateInput {
|
|
|
3934
3834
|
* @example "2022-07-07T23:59:59Z"
|
|
3935
3835
|
*/
|
|
3936
3836
|
expiration_at?: string | null;
|
|
3837
|
+
/**
|
|
3838
|
+
* 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.
|
|
3839
|
+
* @example false
|
|
3840
|
+
*/
|
|
3841
|
+
invoice_requires_successful_payment?: boolean;
|
|
3842
|
+
/**
|
|
3843
|
+
* 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.
|
|
3844
|
+
* @example [{"key":"example_key","value":"example_value"},{"key":"another_key","value":"another_value"}]
|
|
3845
|
+
*/
|
|
3846
|
+
transaction_metadata?: {
|
|
3847
|
+
/** The unique identifier for the attribute. */
|
|
3848
|
+
key?: string;
|
|
3849
|
+
/** The corresponding value for the key. */
|
|
3850
|
+
value?: string;
|
|
3851
|
+
}[];
|
|
3937
3852
|
/** List of recurring transaction rules. Currently, we only allow one recurring rule per wallet. */
|
|
3938
3853
|
recurring_transaction_rules?: {
|
|
3939
3854
|
/**
|
|
@@ -3981,6 +3896,21 @@ export interface WalletCreateInput {
|
|
|
3981
3896
|
* @example "200.0"
|
|
3982
3897
|
*/
|
|
3983
3898
|
target_ongoing_balance?: string;
|
|
3899
|
+
/**
|
|
3900
|
+
* 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.
|
|
3901
|
+
* @example false
|
|
3902
|
+
*/
|
|
3903
|
+
invoice_requires_successful_payment?: boolean;
|
|
3904
|
+
/**
|
|
3905
|
+
* This optional field allows you to store a list of key-value pairs containing additional information or custom attributes. These key-value pairs will populate the metadata of the wallet transactions triggered by this rule.
|
|
3906
|
+
* @example [{"key":"example_key","value":"example_value"},{"key":"another_key","value":"another_value"}]
|
|
3907
|
+
*/
|
|
3908
|
+
transaction_metadata?: {
|
|
3909
|
+
/** The unique identifier for the attribute. */
|
|
3910
|
+
key?: string;
|
|
3911
|
+
/** The value associated with the key. */
|
|
3912
|
+
value?: string;
|
|
3913
|
+
}[];
|
|
3984
3914
|
}[];
|
|
3985
3915
|
};
|
|
3986
3916
|
}
|
|
@@ -4067,6 +3997,11 @@ export interface WalletObject {
|
|
|
4067
3997
|
* @example "2022-09-14T16:35:31Z"
|
|
4068
3998
|
*/
|
|
4069
3999
|
terminated_at?: string | null;
|
|
4000
|
+
/**
|
|
4001
|
+
* 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.
|
|
4002
|
+
* @example false
|
|
4003
|
+
*/
|
|
4004
|
+
invoice_requires_successful_payment?: boolean;
|
|
4070
4005
|
/** List of recurring transaction rules. Currently, we only allow one recurring rule per wallet. */
|
|
4071
4006
|
recurring_transaction_rules?: {
|
|
4072
4007
|
/**
|
|
@@ -4126,6 +4061,21 @@ export interface WalletObject {
|
|
|
4126
4061
|
* @example "2022-04-29T08:59:51Z"
|
|
4127
4062
|
*/
|
|
4128
4063
|
created_at: string;
|
|
4064
|
+
/**
|
|
4065
|
+
* 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.
|
|
4066
|
+
* @example false
|
|
4067
|
+
*/
|
|
4068
|
+
invoice_requires_successful_payment?: boolean;
|
|
4069
|
+
/**
|
|
4070
|
+
* This field allows you to store a list of key-value pairs containing additional information or custom attributes. These key-value pairs will populate the metadata of the wallet transactions triggered by this rule.
|
|
4071
|
+
* @example [{"key":"example_key","value":"example_value"},{"key":"another_key","value":"another_value"}]
|
|
4072
|
+
*/
|
|
4073
|
+
transaction_metadata?: {
|
|
4074
|
+
/** The unique identifier for the attribute. */
|
|
4075
|
+
key?: string;
|
|
4076
|
+
/** The value associated with the key. */
|
|
4077
|
+
value?: string;
|
|
4078
|
+
}[];
|
|
4129
4079
|
}[];
|
|
4130
4080
|
/**
|
|
4131
4081
|
* The wallet ongoing balance expressed in cents.
|
|
@@ -4180,6 +4130,21 @@ export interface WalletTransactionCreateInput {
|
|
|
4180
4130
|
* @example "5.0"
|
|
4181
4131
|
*/
|
|
4182
4132
|
voided_credits?: string;
|
|
4133
|
+
/**
|
|
4134
|
+
* 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.
|
|
4135
|
+
* @example false
|
|
4136
|
+
*/
|
|
4137
|
+
invoice_requires_successful_payment?: boolean;
|
|
4138
|
+
/**
|
|
4139
|
+
* This optional field allows you to store a list of key-value pairs that hold additional information or custom attributes related to the data.
|
|
4140
|
+
* @example [{"key":"example key","value":"example value"},{"key":"another key","value":"another value"}]
|
|
4141
|
+
*/
|
|
4142
|
+
metadata?: {
|
|
4143
|
+
/** The unique identifier for the attribute. */
|
|
4144
|
+
key?: string;
|
|
4145
|
+
/** The value associated with the key. */
|
|
4146
|
+
value?: string;
|
|
4147
|
+
}[];
|
|
4183
4148
|
};
|
|
4184
4149
|
}
|
|
4185
4150
|
export interface WalletTransactionObject {
|
|
@@ -4200,6 +4165,11 @@ export interface WalletTransactionObject {
|
|
|
4200
4165
|
* @example "settled"
|
|
4201
4166
|
*/
|
|
4202
4167
|
status: "pending" | "settled";
|
|
4168
|
+
/**
|
|
4169
|
+
* The source field represents the origin or trigger of the wallet transaction. Possible values are `manual`, `interval`. `threshold`
|
|
4170
|
+
* @example "manual"
|
|
4171
|
+
*/
|
|
4172
|
+
source?: "manual" | "interval" | "threshold";
|
|
4203
4173
|
/**
|
|
4204
4174
|
* The transaction status of the wallet transaction. Possible values are `purchased` (with pending or settled status), `granted` (without invoice_id), `voided` or `invoiced`.
|
|
4205
4175
|
* @example "purchased"
|
|
@@ -4222,6 +4192,21 @@ export interface WalletTransactionObject {
|
|
|
4222
4192
|
* @example "100.0"
|
|
4223
4193
|
*/
|
|
4224
4194
|
credit_amount: string;
|
|
4195
|
+
/**
|
|
4196
|
+
* 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.
|
|
4197
|
+
* @example false
|
|
4198
|
+
*/
|
|
4199
|
+
invoice_requires_successful_payment?: boolean;
|
|
4200
|
+
/**
|
|
4201
|
+
* This field allows you to store a list of key-value pairs that hold additional information or custom attributes related to the data.
|
|
4202
|
+
* @example [{"key":"example key","value":"example value"},{"key":"another key","value":"another value"}]
|
|
4203
|
+
*/
|
|
4204
|
+
metadata?: {
|
|
4205
|
+
/** The unique identifier for the attribute. */
|
|
4206
|
+
key?: string;
|
|
4207
|
+
/** The value associated with the key. */
|
|
4208
|
+
value?: string;
|
|
4209
|
+
}[];
|
|
4225
4210
|
/**
|
|
4226
4211
|
* The date when wallet transaction is settled, represented in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC).
|
|
4227
4212
|
* @format date-time
|
|
@@ -4254,6 +4239,11 @@ export interface WalletUpdateInput {
|
|
|
4254
4239
|
* @example "2022-07-07T23:59:59Z"
|
|
4255
4240
|
*/
|
|
4256
4241
|
expiration_at?: string | null;
|
|
4242
|
+
/**
|
|
4243
|
+
* 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.
|
|
4244
|
+
* @example false
|
|
4245
|
+
*/
|
|
4246
|
+
invoice_requires_successful_payment?: boolean;
|
|
4257
4247
|
/** List of recurring transaction rules. Currently, we only allow one recurring rule per wallet. */
|
|
4258
4248
|
recurring_transaction_rules?: {
|
|
4259
4249
|
/**
|
|
@@ -4307,6 +4297,21 @@ export interface WalletUpdateInput {
|
|
|
4307
4297
|
* @example "200.0"
|
|
4308
4298
|
*/
|
|
4309
4299
|
target_ongoing_balance?: string;
|
|
4300
|
+
/**
|
|
4301
|
+
* 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.
|
|
4302
|
+
* @example false
|
|
4303
|
+
*/
|
|
4304
|
+
invoice_requires_successful_payment?: boolean;
|
|
4305
|
+
/**
|
|
4306
|
+
* This optional field allows you to store a list of key-value pairs containing additional information or custom attributes. These key-value pairs will populate the metadata of the wallet transactions triggered by this rule.
|
|
4307
|
+
* @example [{"key":"example_key","value":"example_value"},{"key":"another_key","value":"another_value"}]
|
|
4308
|
+
*/
|
|
4309
|
+
transaction_metadata?: {
|
|
4310
|
+
/** The unique identifier for the attribute. */
|
|
4311
|
+
key?: string;
|
|
4312
|
+
/** The value associated with the key. */
|
|
4313
|
+
value?: string;
|
|
4314
|
+
}[];
|
|
4310
4315
|
}[];
|
|
4311
4316
|
};
|
|
4312
4317
|
}
|
|
@@ -4435,7 +4440,7 @@ export declare class HttpClient<SecurityDataType = unknown> {
|
|
|
4435
4440
|
}
|
|
4436
4441
|
/**
|
|
4437
4442
|
* @title Lago API documentation
|
|
4438
|
-
* @version 1.
|
|
4443
|
+
* @version 1.9.0
|
|
4439
4444
|
* @license AGPLv3
|
|
4440
4445
|
* @baseUrl https://{region}.getlago.com/api/v1
|
|
4441
4446
|
* @externalDocs https://github.com/getlago
|
|
@@ -4592,6 +4597,29 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
4592
4597
|
*/
|
|
4593
4598
|
months?: number;
|
|
4594
4599
|
}, params?: RequestParams) => Promise<HttpResponse<Mrrs, ApiErrorUnauthorized>>;
|
|
4600
|
+
/**
|
|
4601
|
+
* @description Overdue balance is the total amount associated with overdue invoices (invoices with pending or failed payments which are past their due dates).
|
|
4602
|
+
*
|
|
4603
|
+
* @tags analytics
|
|
4604
|
+
* @name FindAllOverdueBalances
|
|
4605
|
+
* @summary List overdue balance
|
|
4606
|
+
* @request GET:/analytics/overdue_balance
|
|
4607
|
+
* @secure
|
|
4608
|
+
*/
|
|
4609
|
+
findAllOverdueBalances: (query?: {
|
|
4610
|
+
/** Currency of revenue analytics. Format must be ISO 4217. */
|
|
4611
|
+
currency?: Currency;
|
|
4612
|
+
/**
|
|
4613
|
+
* The customer external unique identifier (provided by your own application). Use it to filter revenue analytics at the customer level.
|
|
4614
|
+
* @example "5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba"
|
|
4615
|
+
*/
|
|
4616
|
+
external_customer_id?: string;
|
|
4617
|
+
/**
|
|
4618
|
+
* Show data only for given number of months.
|
|
4619
|
+
* @example 12
|
|
4620
|
+
*/
|
|
4621
|
+
months?: number;
|
|
4622
|
+
}, params?: RequestParams) => Promise<HttpResponse<OverdueBalances, ApiErrorUnauthorized>>;
|
|
4595
4623
|
};
|
|
4596
4624
|
appliedCoupons: {
|
|
4597
4625
|
/**
|
|
@@ -4698,28 +4726,6 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
4698
4726
|
* @secure
|
|
4699
4727
|
*/
|
|
4700
4728
|
findBillableMetric: (code: string, params?: RequestParams) => Promise<HttpResponse<BillableMetric, ApiErrorUnauthorized | ApiErrorNotFound>>;
|
|
4701
|
-
/**
|
|
4702
|
-
* @description This endpoint retrieves all groups for a billable metric.
|
|
4703
|
-
*
|
|
4704
|
-
* @tags billable_metrics
|
|
4705
|
-
* @name FindAllBillableMetricGroups
|
|
4706
|
-
* @summary Find a billable metric's groups
|
|
4707
|
-
* @request GET:/billable_metrics/{code}/groups
|
|
4708
|
-
* @deprecated
|
|
4709
|
-
* @secure
|
|
4710
|
-
*/
|
|
4711
|
-
findAllBillableMetricGroups: (code: string, query?: {
|
|
4712
|
-
/**
|
|
4713
|
-
* Page number.
|
|
4714
|
-
* @example 1
|
|
4715
|
-
*/
|
|
4716
|
-
page?: number;
|
|
4717
|
-
/**
|
|
4718
|
-
* Number of records per page.
|
|
4719
|
-
* @example 20
|
|
4720
|
-
*/
|
|
4721
|
-
per_page?: number;
|
|
4722
|
-
}, params?: RequestParams) => Promise<HttpResponse<GroupsPaginated, ApiErrorUnauthorized>>;
|
|
4723
4729
|
};
|
|
4724
4730
|
coupons: {
|
|
4725
4731
|
/**
|
|
@@ -5196,7 +5202,17 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
5196
5202
|
* @request PUT:/fees/{lago_id}
|
|
5197
5203
|
* @secure
|
|
5198
5204
|
*/
|
|
5199
|
-
updateFee: (lagoId: string, data: FeeUpdateInput, params?: RequestParams) => Promise<HttpResponse<Fee, ApiErrorBadRequest | ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorNotFound>>;
|
|
5205
|
+
updateFee: (lagoId: string, data: FeeUpdateInput, params?: RequestParams) => Promise<HttpResponse<Fee, ApiErrorBadRequest | ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorNotAllowed | ApiErrorNotFound>>;
|
|
5206
|
+
/**
|
|
5207
|
+
* @description This endpoint is used for deleting a specific fee that has not yet been invoiced
|
|
5208
|
+
*
|
|
5209
|
+
* @tags fees
|
|
5210
|
+
* @name DeleteFee
|
|
5211
|
+
* @summary Delete a fee
|
|
5212
|
+
* @request DELETE:/fees/{lago_id}
|
|
5213
|
+
* @secure
|
|
5214
|
+
*/
|
|
5215
|
+
deleteFee: (lagoId: string, params?: RequestParams) => Promise<HttpResponse<Fee, ApiErrorUnauthorized | ApiErrorNotAllowed | ApiErrorNotFound>>;
|
|
5200
5216
|
};
|
|
5201
5217
|
invoices: {
|
|
5202
5218
|
/**
|
|
@@ -5255,6 +5271,23 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
5255
5271
|
* @example true
|
|
5256
5272
|
*/
|
|
5257
5273
|
payment_overdue?: boolean;
|
|
5274
|
+
/**
|
|
5275
|
+
* Search invoices by id, number, customer name, customer external_id or customer email.
|
|
5276
|
+
* @example "Jane"
|
|
5277
|
+
*/
|
|
5278
|
+
search_term?: string;
|
|
5279
|
+
/**
|
|
5280
|
+
* Filter invoices by currency in. Possible values ISO 4217 currency codes.
|
|
5281
|
+
* @example "EUR"
|
|
5282
|
+
*/
|
|
5283
|
+
currency?: string;
|
|
5284
|
+
/**
|
|
5285
|
+
* Filter invoices with a payment dispute lost. Possible values are `true` or `false`.
|
|
5286
|
+
* @example true
|
|
5287
|
+
*/
|
|
5288
|
+
payment_dispute_lost?: boolean;
|
|
5289
|
+
/** Filter invoices by invoice type. Possible values are `subscription`, `add_on`, `credit`, `one_off` or `advance_charges` */
|
|
5290
|
+
invoice_type?: "subscription" | "add_on" | "credit" | "one_off" | "advance_charges";
|
|
5258
5291
|
}, params?: RequestParams) => Promise<HttpResponse<InvoicesPaginated, ApiErrorUnauthorized>>;
|
|
5259
5292
|
/**
|
|
5260
5293
|
* @description This endpoint is used for updating an existing invoice.
|