lago-javascript-client 1.18.0 → 1.20.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 +498 -5
- package/esm/openapi/client.js +1 -1
- package/package.json +1 -1
- package/script/openapi/client.d.ts +498 -5
- package/script/openapi/client.js +1 -1
package/esm/openapi/client.d.ts
CHANGED
|
@@ -1372,6 +1372,11 @@ export interface CreditNoteObject {
|
|
|
1372
1372
|
/** Array of credit note's items. */
|
|
1373
1373
|
items?: CreditNoteItemObject[];
|
|
1374
1374
|
applied_taxes?: CreditNoteAppliedTaxObject[];
|
|
1375
|
+
/**
|
|
1376
|
+
* Indicates if the credit note belongs to self-billed invoice. Self-billing is a process where an organization creates the invoice on behalf of the partner.
|
|
1377
|
+
* @example false
|
|
1378
|
+
*/
|
|
1379
|
+
self_billed?: boolean;
|
|
1375
1380
|
}
|
|
1376
1381
|
export interface CreditNotes {
|
|
1377
1382
|
credit_notes: CreditNoteObject[];
|
|
@@ -1437,6 +1442,44 @@ export interface CreditNoteUpdateInput {
|
|
|
1437
1442
|
refund_status: "pending" | "succeeded" | "failed";
|
|
1438
1443
|
};
|
|
1439
1444
|
}
|
|
1445
|
+
export type CreditNoteExtendedObject = CreditNoteObject & {
|
|
1446
|
+
customer?: any;
|
|
1447
|
+
};
|
|
1448
|
+
export interface CreditNotePaymentProviderRefundError {
|
|
1449
|
+
/**
|
|
1450
|
+
* Unique identifier assigned to the credit note within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the credit note record within the Lago system.
|
|
1451
|
+
* @format uuid
|
|
1452
|
+
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
1453
|
+
*/
|
|
1454
|
+
lago_credit_note_id: string;
|
|
1455
|
+
/**
|
|
1456
|
+
* Unique identifier assigned to the customer within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the customer's record within the Lago system.
|
|
1457
|
+
* @format uuid
|
|
1458
|
+
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
1459
|
+
*/
|
|
1460
|
+
lago_customer_id: string;
|
|
1461
|
+
/**
|
|
1462
|
+
* The customer external unique identifier (provided by your own application)
|
|
1463
|
+
* @example "5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba"
|
|
1464
|
+
*/
|
|
1465
|
+
external_customer_id: string;
|
|
1466
|
+
/**
|
|
1467
|
+
* Unique identifier of the customer within the payment provider
|
|
1468
|
+
* @example "5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba"
|
|
1469
|
+
*/
|
|
1470
|
+
provider_customer_id?: string;
|
|
1471
|
+
/**
|
|
1472
|
+
* The type of payment provider code
|
|
1473
|
+
* @example "stripe"
|
|
1474
|
+
*/
|
|
1475
|
+
payment_provider: "adyen" | "cashfree" | "gocardless" | "stripe";
|
|
1476
|
+
/**
|
|
1477
|
+
* Code of the payment provider
|
|
1478
|
+
* @example "Stripe Prod"
|
|
1479
|
+
*/
|
|
1480
|
+
payment_provider_code?: string;
|
|
1481
|
+
provider_error?: string | Record<string, any>;
|
|
1482
|
+
}
|
|
1440
1483
|
/** @example "USD" */
|
|
1441
1484
|
export type Currency = "AED" | "AFN" | "ALL" | "AMD" | "ANG" | "AOA" | "ARS" | "AUD" | "AWG" | "AZN" | "BAM" | "BBD" | "BDT" | "BGN" | "BIF" | "BMD" | "BND" | "BOB" | "BRL" | "BSD" | "BWP" | "BYN" | "BZD" | "CAD" | "CDF" | "CHF" | "CLF" | "CLP" | "CNY" | "COP" | "CRC" | "CVE" | "CZK" | "DJF" | "DKK" | "DOP" | "DZD" | "EGP" | "ETB" | "EUR" | "FJD" | "FKP" | "GBP" | "GEL" | "GIP" | "GMD" | "GNF" | "GTQ" | "GYD" | "HKD" | "HNL" | "HRK" | "HTG" | "HUF" | "IDR" | "ILS" | "INR" | "ISK" | "JMD" | "JPY" | "KES" | "KGS" | "KHR" | "KMF" | "KRW" | "KYD" | "KZT" | "LAK" | "LBP" | "LKR" | "LRD" | "LSL" | "MAD" | "MDL" | "MGA" | "MKD" | "MMK" | "MNT" | "MOP" | "MRO" | "MUR" | "MVR" | "MWK" | "MXN" | "MYR" | "MZN" | "NAD" | "NGN" | "NIO" | "NOK" | "NPR" | "NZD" | "PAB" | "PEN" | "PGK" | "PHP" | "PKR" | "PLN" | "PYG" | "QAR" | "RON" | "RSD" | "RUB" | "RWF" | "SAR" | "SBD" | "SCR" | "SEK" | "SGD" | "SHP" | "SLL" | "SOS" | "SRD" | "STD" | "SZL" | "THB" | "TJS" | "TOP" | "TRY" | "TTD" | "TWD" | "TZS" | "UAH" | "UGX" | "USD" | "UYU" | "UZS" | "VND" | "VUV" | "WST" | "XAF" | "XCD" | "XOF" | "XPF" | "YER" | "ZAR" | "ZMW";
|
|
1442
1485
|
export interface Customer {
|
|
@@ -1554,6 +1597,25 @@ export interface IntegrationCustomer {
|
|
|
1554
1597
|
*/
|
|
1555
1598
|
subsidiary_id?: string;
|
|
1556
1599
|
}
|
|
1600
|
+
export interface IntegrationProviderErrorObject {
|
|
1601
|
+
/**
|
|
1602
|
+
* Unique identifier assigned to the integration within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the integration's record within the Lago system.
|
|
1603
|
+
* @format uuid
|
|
1604
|
+
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
1605
|
+
*/
|
|
1606
|
+
lago_integration_id: string;
|
|
1607
|
+
/**
|
|
1608
|
+
* The type of integration provider
|
|
1609
|
+
* @example "netsuite"
|
|
1610
|
+
*/
|
|
1611
|
+
provider: string;
|
|
1612
|
+
/**
|
|
1613
|
+
* Unique code used to identify an integration connection.
|
|
1614
|
+
* @example "netsuite-eu-1"
|
|
1615
|
+
*/
|
|
1616
|
+
provider_code: string;
|
|
1617
|
+
provider_error: string | Record<string, any>;
|
|
1618
|
+
}
|
|
1557
1619
|
/** Array of filter object, representing multiple dimensions for a charge item. */
|
|
1558
1620
|
export type CustomerChargeFiltersUsageObject = {
|
|
1559
1621
|
/**
|
|
@@ -1741,6 +1803,13 @@ export interface CustomerCreateInput {
|
|
|
1741
1803
|
* @example "Belson"
|
|
1742
1804
|
*/
|
|
1743
1805
|
lastname?: string | null;
|
|
1806
|
+
/**
|
|
1807
|
+
* The type of the account. It can have one of the following values:
|
|
1808
|
+
* - `customer`: the account is a customer, default value.
|
|
1809
|
+
* - `partner`: the account is a partner.
|
|
1810
|
+
* @example "customer"
|
|
1811
|
+
*/
|
|
1812
|
+
account_type?: "customer" | "partner" | null;
|
|
1744
1813
|
/**
|
|
1745
1814
|
* The type of the customer. It can have one of the following values:
|
|
1746
1815
|
* - `company`: the customer is a company.
|
|
@@ -1866,6 +1935,30 @@ export interface CustomerCreateInput {
|
|
|
1866
1935
|
invoice_custom_section_codes?: string[];
|
|
1867
1936
|
};
|
|
1868
1937
|
}
|
|
1938
|
+
export interface CustomerIntegratrionErrorObject {
|
|
1939
|
+
/**
|
|
1940
|
+
* Unique identifier assigned to the customer within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the customer's record within the Lago system.
|
|
1941
|
+
* @format uuid
|
|
1942
|
+
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
1943
|
+
*/
|
|
1944
|
+
lago_customer_id: string;
|
|
1945
|
+
/**
|
|
1946
|
+
* The customer external unique identifier (provided by your own application)
|
|
1947
|
+
* @example "5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba"
|
|
1948
|
+
*/
|
|
1949
|
+
external_customer_id: string;
|
|
1950
|
+
/**
|
|
1951
|
+
* The type of accounting provider code
|
|
1952
|
+
* @example "anrock"
|
|
1953
|
+
*/
|
|
1954
|
+
accounting_provider: "anrock" | "hubspot" | "netsuite" | "okta" | "salesforce" | "xero";
|
|
1955
|
+
/**
|
|
1956
|
+
* Code of the accounting provider
|
|
1957
|
+
* @example "Netsuite Prod"
|
|
1958
|
+
*/
|
|
1959
|
+
accounting_provider_code: string;
|
|
1960
|
+
provider_error: string | Record<string, any>;
|
|
1961
|
+
}
|
|
1869
1962
|
/** 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 */
|
|
1870
1963
|
export interface CustomerMetadata {
|
|
1871
1964
|
/**
|
|
@@ -1981,6 +2074,13 @@ export type CustomerObject = {
|
|
|
1981
2074
|
* @example "Belson"
|
|
1982
2075
|
*/
|
|
1983
2076
|
lastname?: string | null;
|
|
2077
|
+
/**
|
|
2078
|
+
* The type of the account. It can have one of the following values:
|
|
2079
|
+
* - `customer`: the account is a customer.
|
|
2080
|
+
* - `partner`: the account is a partner.
|
|
2081
|
+
* @example "customer"
|
|
2082
|
+
*/
|
|
2083
|
+
account_type?: "customer" | "partner";
|
|
1984
2084
|
/**
|
|
1985
2085
|
* The type of the customer. It can have one of the following values:
|
|
1986
2086
|
* - `company`: the customer is a company.
|
|
@@ -2112,10 +2212,58 @@ export interface CustomerPastUsage {
|
|
|
2112
2212
|
usage_periods: CustomerUsage[];
|
|
2113
2213
|
meta: PaginationMeta;
|
|
2114
2214
|
}
|
|
2215
|
+
export interface CustomerPaymentProvidernErrorObject {
|
|
2216
|
+
/**
|
|
2217
|
+
* Unique identifier assigned to the customer within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the customer's record within the Lago system.
|
|
2218
|
+
* @format uuid
|
|
2219
|
+
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
2220
|
+
*/
|
|
2221
|
+
lago_customer_id: string;
|
|
2222
|
+
/**
|
|
2223
|
+
* The customer external unique identifier (provided by your own application)
|
|
2224
|
+
* @example "5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba"
|
|
2225
|
+
*/
|
|
2226
|
+
external_customer_id: string;
|
|
2227
|
+
/**
|
|
2228
|
+
* The type of payment provider
|
|
2229
|
+
* @example "stripe"
|
|
2230
|
+
*/
|
|
2231
|
+
payment_provider: "adyen" | "cashfree" | "gocardless" | "stripe";
|
|
2232
|
+
/**
|
|
2233
|
+
* Code of the payment provider
|
|
2234
|
+
* @example "Stripe Prod"
|
|
2235
|
+
*/
|
|
2236
|
+
payment_provider_code: string;
|
|
2237
|
+
provider_error: string | Record<string, any>;
|
|
2238
|
+
}
|
|
2115
2239
|
export interface CustomersPaginated {
|
|
2116
2240
|
customers: CustomerObjectExtended[];
|
|
2117
2241
|
meta: PaginationMeta;
|
|
2118
2242
|
}
|
|
2243
|
+
export interface CustomerTaxProviderErrorObject {
|
|
2244
|
+
/**
|
|
2245
|
+
* Unique identifier assigned to the customer within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the customer's record within the Lago system.
|
|
2246
|
+
* @format uuid
|
|
2247
|
+
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
2248
|
+
*/
|
|
2249
|
+
lago_customer_id: string;
|
|
2250
|
+
/**
|
|
2251
|
+
* The customer external unique identifier (provided by your own application)
|
|
2252
|
+
* @example "5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba"
|
|
2253
|
+
*/
|
|
2254
|
+
external_customer_id: string;
|
|
2255
|
+
/**
|
|
2256
|
+
* The type of tax provider
|
|
2257
|
+
* @example "anrock"
|
|
2258
|
+
*/
|
|
2259
|
+
tax_provider: "anrock" | "hubspot" | "netsuite" | "okta" | "salesforce" | "xero";
|
|
2260
|
+
/**
|
|
2261
|
+
* Code of the tax provider
|
|
2262
|
+
* @example "Stripe Prod"
|
|
2263
|
+
*/
|
|
2264
|
+
tax_provider_code: string;
|
|
2265
|
+
provider_error: string | Record<string, any>;
|
|
2266
|
+
}
|
|
2119
2267
|
export interface CustomerUsage {
|
|
2120
2268
|
customer_usage: CustomerUsageObject;
|
|
2121
2269
|
}
|
|
@@ -2167,6 +2315,15 @@ export interface CustomerUsageObject {
|
|
|
2167
2315
|
/** Array of charges that comprise the current usage. It contains detailed information about individual charge items associated with the usage. */
|
|
2168
2316
|
charges_usage: CustomerChargeUsageObject[];
|
|
2169
2317
|
}
|
|
2318
|
+
export type CustomerViesCheckObject = {
|
|
2319
|
+
vies_check?: {
|
|
2320
|
+
/**
|
|
2321
|
+
* Whether the VIES check was successful
|
|
2322
|
+
* @example true
|
|
2323
|
+
*/
|
|
2324
|
+
valid?: boolean;
|
|
2325
|
+
};
|
|
2326
|
+
};
|
|
2170
2327
|
export interface Event {
|
|
2171
2328
|
event: EventObject;
|
|
2172
2329
|
}
|
|
@@ -2286,6 +2443,37 @@ export interface EventObject {
|
|
|
2286
2443
|
*/
|
|
2287
2444
|
created_at: string;
|
|
2288
2445
|
}
|
|
2446
|
+
export interface EventErrorsObject {
|
|
2447
|
+
/**
|
|
2448
|
+
* HTTP status code. It will always be 422
|
|
2449
|
+
* @example 422
|
|
2450
|
+
*/
|
|
2451
|
+
status: number;
|
|
2452
|
+
/**
|
|
2453
|
+
* HTTP error description. It will always be "Unprocessable Entity"
|
|
2454
|
+
* @example "Unprocessable Entity"
|
|
2455
|
+
*/
|
|
2456
|
+
error: string;
|
|
2457
|
+
message: string | Record<string, any>;
|
|
2458
|
+
event: EventObject;
|
|
2459
|
+
}
|
|
2460
|
+
export interface EventsErrorsObject {
|
|
2461
|
+
/**
|
|
2462
|
+
* List of event transaction_id with an invalid code
|
|
2463
|
+
* @example ["transaction_1234567890"]
|
|
2464
|
+
*/
|
|
2465
|
+
invalid_code: string[];
|
|
2466
|
+
/**
|
|
2467
|
+
* List of event transaction_id with a missing aggregation property
|
|
2468
|
+
* @example ["transaction_1234567890"]
|
|
2469
|
+
*/
|
|
2470
|
+
missing_aggregation_property: string[];
|
|
2471
|
+
/**
|
|
2472
|
+
* List of event transaction_id with invalid filter values
|
|
2473
|
+
* @example ["transaction_1234567890"]
|
|
2474
|
+
*/
|
|
2475
|
+
invalid_filter_values: string[];
|
|
2476
|
+
}
|
|
2289
2477
|
export interface Fee {
|
|
2290
2478
|
fee: FeeObject;
|
|
2291
2479
|
}
|
|
@@ -2649,6 +2837,11 @@ export interface FeeObject {
|
|
|
2649
2837
|
per_unit_total_amount: string;
|
|
2650
2838
|
}[];
|
|
2651
2839
|
};
|
|
2840
|
+
/**
|
|
2841
|
+
* Indicates if the fee belongs to self-billed invoice. Self-billing is a process where an organization creates the invoice on behalf of the partner.
|
|
2842
|
+
* @example false
|
|
2843
|
+
*/
|
|
2844
|
+
self_billed?: boolean;
|
|
2652
2845
|
/** Item attached to the fee */
|
|
2653
2846
|
item: {
|
|
2654
2847
|
/**
|
|
@@ -2701,6 +2894,25 @@ export interface Fees {
|
|
|
2701
2894
|
export type FeesPaginated = Fees & {
|
|
2702
2895
|
meta: PaginationMeta;
|
|
2703
2896
|
};
|
|
2897
|
+
export interface FeeTaxProviderErrorObject {
|
|
2898
|
+
/**
|
|
2899
|
+
* Code of the tax provider
|
|
2900
|
+
* @example "Stripe Prod"
|
|
2901
|
+
*/
|
|
2902
|
+
tax_provider_code: string;
|
|
2903
|
+
/**
|
|
2904
|
+
* Unique identifier assigned to the charge that the fee belongs to
|
|
2905
|
+
* @format uuid
|
|
2906
|
+
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
2907
|
+
*/
|
|
2908
|
+
lago_charge_id: string | null;
|
|
2909
|
+
/**
|
|
2910
|
+
* Unique identifier assigned to the transaction. This field is specifically displayed when the fee type is `charge`.
|
|
2911
|
+
* @example "transaction_1234567890"
|
|
2912
|
+
*/
|
|
2913
|
+
event_transaction_id: string | null;
|
|
2914
|
+
provider_error: string | Record<string, any>;
|
|
2915
|
+
}
|
|
2704
2916
|
export interface FeeUpdateInput {
|
|
2705
2917
|
fee: {
|
|
2706
2918
|
/**
|
|
@@ -3116,6 +3328,11 @@ export type InvoiceObject = {
|
|
|
3116
3328
|
total_amount_cents: number;
|
|
3117
3329
|
/** @example 3 */
|
|
3118
3330
|
version_number: number;
|
|
3331
|
+
/**
|
|
3332
|
+
* Indicates if the invoice is self-billed. Self-billing is a process where an organization creates the invoice on behalf of the partner. This field specifies whether the invoice is self-billed or not.
|
|
3333
|
+
* @example false
|
|
3334
|
+
*/
|
|
3335
|
+
self_billed?: boolean;
|
|
3119
3336
|
/**
|
|
3120
3337
|
* Contains the URL that provides direct access to the invoice PDF file. You can use this URL to download or view the PDF document of the invoice
|
|
3121
3338
|
* @format uri
|
|
@@ -3137,6 +3354,54 @@ export type InvoiceObject = {
|
|
|
3137
3354
|
} & {
|
|
3138
3355
|
/** The customer on which the invoice applies. It refers to the customer account or entity associated with the invoice. */
|
|
3139
3356
|
customer?: CustomerObject;
|
|
3357
|
+
billing_period?: {
|
|
3358
|
+
/**
|
|
3359
|
+
* Unique identifier assigned to the subscription, created by Lago.
|
|
3360
|
+
* @format uuid
|
|
3361
|
+
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
3362
|
+
*/
|
|
3363
|
+
lago_subscription_id: string;
|
|
3364
|
+
/**
|
|
3365
|
+
* Unique identifier assigned to the subscription in your application.
|
|
3366
|
+
* @example "external_id"
|
|
3367
|
+
*/
|
|
3368
|
+
external_subscription_id: string;
|
|
3369
|
+
/**
|
|
3370
|
+
* Unique identifier assigned to the plan, created by Lago.
|
|
3371
|
+
* @format uuid
|
|
3372
|
+
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
3373
|
+
*/
|
|
3374
|
+
lago_plan_id?: string;
|
|
3375
|
+
/**
|
|
3376
|
+
* The beginning date of the subscription billing period. This field indicates the start date of the billing period associated with the subscription fee.
|
|
3377
|
+
* @format date-time
|
|
3378
|
+
* @example "2022-04-29T08:59:51Z"
|
|
3379
|
+
*/
|
|
3380
|
+
subscription_from_datetime: string;
|
|
3381
|
+
/**
|
|
3382
|
+
* The ending date of the subscription billing period. This field indicates the end date of the billing period associated with the subscription fee.
|
|
3383
|
+
* @format date-time
|
|
3384
|
+
* @example "2022-05-29T08:59:51Z"
|
|
3385
|
+
*/
|
|
3386
|
+
subscription_to_datetime: string;
|
|
3387
|
+
/**
|
|
3388
|
+
* The beginning date of the period that covers the charge fees. It is applicable only to the `charge` fees attached to the subscription. This field indicates the start date of the billing period or subscription period associated with the fees.
|
|
3389
|
+
* @format date-time
|
|
3390
|
+
* @example "2022-04-29T08:59:51Z"
|
|
3391
|
+
*/
|
|
3392
|
+
charges_from_datetime: string;
|
|
3393
|
+
/**
|
|
3394
|
+
* The ending date of the period that covers the charge fees. It is applicable only to the `charge` fees attached to the subscription. This field indicates the end date of the billing period or subscription period associated with the fees.
|
|
3395
|
+
* @format date-time
|
|
3396
|
+
* @example "2022-05-29T08:59:51Z"
|
|
3397
|
+
*/
|
|
3398
|
+
charges_to_datetime: string;
|
|
3399
|
+
/**
|
|
3400
|
+
* The reason explaining why this subscription appears on the invoice.
|
|
3401
|
+
* @example "subscription_starting"
|
|
3402
|
+
*/
|
|
3403
|
+
invoicing_reason: "subscription_starting" | "subscription_periodic" | "subscription_terminating" | "in_advance_charge" | "in_advance_charge_periodic" | "progressive_billing";
|
|
3404
|
+
}[];
|
|
3140
3405
|
metadata?: InvoiceMetadataObject[];
|
|
3141
3406
|
applied_taxes?: InvoiceAppliedTaxObject[];
|
|
3142
3407
|
applied_usage_thresholds?: AppliedUsageThresholdObject[] | null;
|
|
@@ -3211,6 +3476,41 @@ export interface InvoiceOneOffCreateInput {
|
|
|
3211
3476
|
}[];
|
|
3212
3477
|
};
|
|
3213
3478
|
}
|
|
3479
|
+
export interface InvoicePaymentFailureObject {
|
|
3480
|
+
/**
|
|
3481
|
+
* Unique identifier assigned to the invoice within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the invoice's record within the Lago system.
|
|
3482
|
+
* @format uuid
|
|
3483
|
+
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
3484
|
+
*/
|
|
3485
|
+
lago_invoice_id: string;
|
|
3486
|
+
/**
|
|
3487
|
+
* Unique identifier assigned to the customer within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the customer's record within the Lago system.
|
|
3488
|
+
* @format uuid
|
|
3489
|
+
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
3490
|
+
*/
|
|
3491
|
+
lago_customer_id: string;
|
|
3492
|
+
/**
|
|
3493
|
+
* The customer external unique identifier (provided by your own application)
|
|
3494
|
+
* @example "5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba"
|
|
3495
|
+
*/
|
|
3496
|
+
external_customer_id: string;
|
|
3497
|
+
/**
|
|
3498
|
+
* Unique identifier of the customer within the payment provider
|
|
3499
|
+
* @example "5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba"
|
|
3500
|
+
*/
|
|
3501
|
+
provider_customer_id?: string;
|
|
3502
|
+
/**
|
|
3503
|
+
* The type of payment provider code
|
|
3504
|
+
* @example "stripe"
|
|
3505
|
+
*/
|
|
3506
|
+
payment_provider: "adyen" | "cashfree" | "gocardless" | "stripe";
|
|
3507
|
+
/**
|
|
3508
|
+
* Code of the payment provider
|
|
3509
|
+
* @example "Stripe Prod"
|
|
3510
|
+
*/
|
|
3511
|
+
payment_provider_code?: string;
|
|
3512
|
+
provider_error?: string | Record<string, any>;
|
|
3513
|
+
}
|
|
3214
3514
|
export interface InvoicesPaginated {
|
|
3215
3515
|
invoices: InvoiceObject[];
|
|
3216
3516
|
meta: PaginationMeta;
|
|
@@ -3536,6 +3836,80 @@ export interface PaginationMeta {
|
|
|
3536
3836
|
*/
|
|
3537
3837
|
total_count: number;
|
|
3538
3838
|
}
|
|
3839
|
+
export interface PaymentObject {
|
|
3840
|
+
/**
|
|
3841
|
+
* The unique identifier of the paid resource, created by Lago.
|
|
3842
|
+
* @format uuid
|
|
3843
|
+
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
3844
|
+
*/
|
|
3845
|
+
lago_payable_id: string;
|
|
3846
|
+
/**
|
|
3847
|
+
* Unique identifier of the customer, created by Lago.
|
|
3848
|
+
* @format uuid
|
|
3849
|
+
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
3850
|
+
*/
|
|
3851
|
+
lago_customer_id: string;
|
|
3852
|
+
/**
|
|
3853
|
+
* The status of the payment within the payment provider
|
|
3854
|
+
* @example "processing"
|
|
3855
|
+
*/
|
|
3856
|
+
status: string;
|
|
3857
|
+
/**
|
|
3858
|
+
* The customer external unique identifier (provided by your own application)
|
|
3859
|
+
* @example "5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba"
|
|
3860
|
+
*/
|
|
3861
|
+
external_id: string;
|
|
3862
|
+
/**
|
|
3863
|
+
* Unique identifier of the customer within the payment provider
|
|
3864
|
+
* @example "5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba"
|
|
3865
|
+
*/
|
|
3866
|
+
provider_customer_id: string;
|
|
3867
|
+
/**
|
|
3868
|
+
* Code of the payment provider
|
|
3869
|
+
* @example "Stripe Prod"
|
|
3870
|
+
*/
|
|
3871
|
+
payment_provider_code?: string;
|
|
3872
|
+
/**
|
|
3873
|
+
* The type of payment provider
|
|
3874
|
+
* @example "stripe"
|
|
3875
|
+
*/
|
|
3876
|
+
payment_provider_type: "adyen" | "cashfree" | "gocardless" | "stripe";
|
|
3877
|
+
/**
|
|
3878
|
+
* Unique identifier of the payment within the payment provider
|
|
3879
|
+
* @example "5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba"
|
|
3880
|
+
*/
|
|
3881
|
+
provider_payment_id: string;
|
|
3882
|
+
next_action: Record<string, any>;
|
|
3883
|
+
}
|
|
3884
|
+
export interface PaymentProviderErrorObject {
|
|
3885
|
+
/**
|
|
3886
|
+
* Unique identifier assigned to the payment provider within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the payment provider's record within the Lago system.
|
|
3887
|
+
* @format uuid
|
|
3888
|
+
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
3889
|
+
*/
|
|
3890
|
+
lago_payment_provider_id: string;
|
|
3891
|
+
/**
|
|
3892
|
+
* The name of payment provider
|
|
3893
|
+
* @example "Stripe Prod"
|
|
3894
|
+
*/
|
|
3895
|
+
payment_provider_name: string;
|
|
3896
|
+
/**
|
|
3897
|
+
* Code of the payment provider
|
|
3898
|
+
* @example "stripe"
|
|
3899
|
+
*/
|
|
3900
|
+
payment_provider_code: string;
|
|
3901
|
+
/**
|
|
3902
|
+
* The source of the error
|
|
3903
|
+
* @example "stripe"
|
|
3904
|
+
*/
|
|
3905
|
+
source: "stripe";
|
|
3906
|
+
/**
|
|
3907
|
+
* The action that was being performed when the error occurred
|
|
3908
|
+
* @example "payment_provider.register_webhook"
|
|
3909
|
+
*/
|
|
3910
|
+
action?: "payment_provider.register_webhook";
|
|
3911
|
+
provider_error: string | Record<string, any>;
|
|
3912
|
+
}
|
|
3539
3913
|
export interface PaymentRequestObject {
|
|
3540
3914
|
/**
|
|
3541
3915
|
* Unique identifier of the payment request, created by Lago.
|
|
@@ -3577,6 +3951,46 @@ export interface PaymentRequestObject {
|
|
|
3577
3951
|
customer: any;
|
|
3578
3952
|
invoices: any[];
|
|
3579
3953
|
}
|
|
3954
|
+
export interface PaymentRequestPaymentFailureObject {
|
|
3955
|
+
/**
|
|
3956
|
+
* Unique identifier assigned to the payment request within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the payment request record within the Lago system.
|
|
3957
|
+
* @format uuid
|
|
3958
|
+
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
3959
|
+
*/
|
|
3960
|
+
lago_payment_request_id: string;
|
|
3961
|
+
/**
|
|
3962
|
+
* List of unique identifiers assigned to the invoices within the Lago application. These IDs are exclusively created by Lago and serve as unique identifiers for the invoices records within the Lago system.
|
|
3963
|
+
* @example ["1a901a90-1a90-1a90-1a90-1a901a901a90"]
|
|
3964
|
+
*/
|
|
3965
|
+
lago_invoice_ids: string[];
|
|
3966
|
+
/**
|
|
3967
|
+
* Unique identifier assigned to the customer within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the customer's record within the Lago system.
|
|
3968
|
+
* @format uuid
|
|
3969
|
+
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
3970
|
+
*/
|
|
3971
|
+
lago_customer_id: string;
|
|
3972
|
+
/**
|
|
3973
|
+
* The customer external unique identifier (provided by your own application)
|
|
3974
|
+
* @example "5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba"
|
|
3975
|
+
*/
|
|
3976
|
+
external_customer_id: string;
|
|
3977
|
+
/**
|
|
3978
|
+
* Unique identifier of the customer within the payment provider
|
|
3979
|
+
* @example "5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba"
|
|
3980
|
+
*/
|
|
3981
|
+
provider_customer_id?: string;
|
|
3982
|
+
/**
|
|
3983
|
+
* The type of payment provider code
|
|
3984
|
+
* @example "stripe"
|
|
3985
|
+
*/
|
|
3986
|
+
payment_provider: "adyen" | "cashfree" | "gocardless" | "stripe";
|
|
3987
|
+
/**
|
|
3988
|
+
* Code of the payment provider
|
|
3989
|
+
* @example "Stripe Prod"
|
|
3990
|
+
*/
|
|
3991
|
+
payment_provider_code?: string;
|
|
3992
|
+
provider_error?: string | Record<string, any>;
|
|
3993
|
+
}
|
|
3580
3994
|
export interface PaymentRequestsPaginated {
|
|
3581
3995
|
payment_requests: PaymentRequestObject[];
|
|
3582
3996
|
meta: PaginationMeta;
|
|
@@ -4076,6 +4490,15 @@ export interface SubscriptionUpdateInput {
|
|
|
4076
4490
|
plan_overrides?: PlanOverridesObject;
|
|
4077
4491
|
};
|
|
4078
4492
|
}
|
|
4493
|
+
export type SubscriptionWithCustomerObject = SubscriptionObject & {
|
|
4494
|
+
plan?: PlanObject;
|
|
4495
|
+
customer?: CustomerObject;
|
|
4496
|
+
};
|
|
4497
|
+
export type SubscriptionWithThresholdObject = SubscriptionObject & {
|
|
4498
|
+
plan?: PlanObject;
|
|
4499
|
+
customer?: CustomerObject;
|
|
4500
|
+
usage_threshold?: UsageThresholdObject;
|
|
4501
|
+
};
|
|
4079
4502
|
export interface SubscriptionObject {
|
|
4080
4503
|
/**
|
|
4081
4504
|
* Unique identifier assigned to the subscription within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the subscription's record within the Lago system
|
|
@@ -4774,6 +5197,41 @@ export interface WalletTransactionObject {
|
|
|
4774
5197
|
*/
|
|
4775
5198
|
created_at: string;
|
|
4776
5199
|
}
|
|
5200
|
+
export interface WalletTransactionPaymentFailureObject {
|
|
5201
|
+
/**
|
|
5202
|
+
* Unique identifier assigned to the wallet transaction within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the wallet transaction's record within the Lago system.
|
|
5203
|
+
* @format uuid
|
|
5204
|
+
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
5205
|
+
*/
|
|
5206
|
+
lago_wallet_transaction_id: string;
|
|
5207
|
+
/**
|
|
5208
|
+
* Unique identifier assigned to the customer within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the customer's record within the Lago system.
|
|
5209
|
+
* @format uuid
|
|
5210
|
+
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
5211
|
+
*/
|
|
5212
|
+
lago_customer_id: string;
|
|
5213
|
+
/**
|
|
5214
|
+
* The customer external unique identifier (provided by your own application)
|
|
5215
|
+
* @example "5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba"
|
|
5216
|
+
*/
|
|
5217
|
+
external_customer_id: string;
|
|
5218
|
+
/**
|
|
5219
|
+
* Unique identifier of the customer within the payment provider
|
|
5220
|
+
* @example "5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba"
|
|
5221
|
+
*/
|
|
5222
|
+
provider_customer_id?: string;
|
|
5223
|
+
/**
|
|
5224
|
+
* The type of payment provider code
|
|
5225
|
+
* @example "stripe"
|
|
5226
|
+
*/
|
|
5227
|
+
payment_provider: "adyen" | "cashfree" | "gocardless" | "stripe";
|
|
5228
|
+
/**
|
|
5229
|
+
* Code of the payment provider
|
|
5230
|
+
* @example "Stripe Prod"
|
|
5231
|
+
*/
|
|
5232
|
+
payment_provider_code?: string;
|
|
5233
|
+
provider_error?: string | Record<string, any>;
|
|
5234
|
+
}
|
|
4777
5235
|
export interface WalletTransactions {
|
|
4778
5236
|
wallet_transactions: WalletTransactionObject[];
|
|
4779
5237
|
}
|
|
@@ -4994,7 +5452,7 @@ export declare class HttpClient<SecurityDataType = unknown> {
|
|
|
4994
5452
|
}
|
|
4995
5453
|
/**
|
|
4996
5454
|
* @title Lago API documentation
|
|
4997
|
-
* @version 1.
|
|
5455
|
+
* @version 1.20.0
|
|
4998
5456
|
* @license AGPLv3
|
|
4999
5457
|
* @baseUrl https://api.getlago.com/api/v1
|
|
5000
5458
|
* @externalDocs https://github.com/getlago
|
|
@@ -5433,6 +5891,11 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
5433
5891
|
* @example 100000
|
|
5434
5892
|
*/
|
|
5435
5893
|
amount_to?: number;
|
|
5894
|
+
/**
|
|
5895
|
+
* Filter credit notes belonging to a self billed invoice. Possible values are `true` or `false`.
|
|
5896
|
+
* @example true
|
|
5897
|
+
*/
|
|
5898
|
+
self_billed?: boolean;
|
|
5436
5899
|
}, params?: RequestParams) => Promise<HttpResponse<CreditNotes, ApiErrorUnauthorized>>;
|
|
5437
5900
|
/**
|
|
5438
5901
|
* @description This endpoint updates an existing credit note.
|
|
@@ -5516,6 +5979,11 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
5516
5979
|
* @example 20
|
|
5517
5980
|
*/
|
|
5518
5981
|
per_page?: number;
|
|
5982
|
+
/**
|
|
5983
|
+
* Filter customers by account type.
|
|
5984
|
+
* @example ["customer","partner"]
|
|
5985
|
+
*/
|
|
5986
|
+
account_type?: ("customer" | "partner")[];
|
|
5519
5987
|
}, params?: RequestParams) => Promise<HttpResponse<CustomersPaginated, ApiErrorUnauthorized>>;
|
|
5520
5988
|
/**
|
|
5521
5989
|
* @description This endpoint retrieves an existing customer.
|
|
@@ -5632,17 +6100,22 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
5632
6100
|
* Unique identifier assigned to the customer within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the customer's record within the Lago system
|
|
5633
6101
|
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
5634
6102
|
*/
|
|
5635
|
-
lago_customer_id
|
|
6103
|
+
lago_customer_id: string;
|
|
5636
6104
|
/**
|
|
5637
6105
|
* The customer external unique identifier (provided by your own application)
|
|
5638
6106
|
* @example "5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba"
|
|
5639
6107
|
*/
|
|
5640
|
-
external_customer_id
|
|
6108
|
+
external_customer_id: string;
|
|
5641
6109
|
/**
|
|
5642
6110
|
* The Payment Provider name linked to the Customer.
|
|
5643
6111
|
* @example "stripe"
|
|
5644
6112
|
*/
|
|
5645
|
-
payment_provider
|
|
6113
|
+
payment_provider: string;
|
|
6114
|
+
/**
|
|
6115
|
+
* Code of the payment provider
|
|
6116
|
+
* @example "Stripe Prod"
|
|
6117
|
+
*/
|
|
6118
|
+
payment_provider_code?: string | undefined;
|
|
5646
6119
|
/**
|
|
5647
6120
|
* The new generated Payment Provider Checkout URL for the Customer.
|
|
5648
6121
|
* @example "https://foo.bar"
|
|
@@ -5908,6 +6381,16 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
5908
6381
|
* @example "5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba"
|
|
5909
6382
|
*/
|
|
5910
6383
|
external_customer_id?: string;
|
|
6384
|
+
/**
|
|
6385
|
+
* Filter invoices of at least a specific amount. This parameter must be defined in cents to ensure consistent handling for all currency types.
|
|
6386
|
+
* @example 9000
|
|
6387
|
+
*/
|
|
6388
|
+
amount_from?: number;
|
|
6389
|
+
/**
|
|
6390
|
+
* Filter invoices up to a specific amount. This parameter must be defined in cents to ensure consistent handling for all currency types.
|
|
6391
|
+
* @example 100000
|
|
6392
|
+
*/
|
|
6393
|
+
amount_to?: number;
|
|
5911
6394
|
/**
|
|
5912
6395
|
* Filter invoices starting from a specific date.
|
|
5913
6396
|
* @format date
|
|
@@ -5946,6 +6429,16 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
5946
6429
|
payment_dispute_lost?: boolean;
|
|
5947
6430
|
/** Filter invoices by invoice type. Possible values are `subscription`, `add_on`, `credit`, `one_off` or `advance_charges` */
|
|
5948
6431
|
invoice_type?: "subscription" | "add_on" | "credit" | "one_off" | "advance_charges";
|
|
6432
|
+
/**
|
|
6433
|
+
* Filter invoices by self billed. Possible values are `true` or `false`.
|
|
6434
|
+
* @example true
|
|
6435
|
+
*/
|
|
6436
|
+
self_billed?: boolean;
|
|
6437
|
+
/**
|
|
6438
|
+
* Filter invoices by metadata. Replace `key` with the actual metadata key you want to match, and provide the corresponding value. Providing empty value will search for invoice without given metadata key. For example, `metadata[color]=blue`.
|
|
6439
|
+
* @example "someValue"
|
|
6440
|
+
*/
|
|
6441
|
+
"metadata[key]"?: string;
|
|
5949
6442
|
}, params?: RequestParams) => Promise<HttpResponse<InvoicesPaginated, ApiErrorUnauthorized>>;
|
|
5950
6443
|
/**
|
|
5951
6444
|
* @description This endpoint is used for updating an existing invoice.
|
|
@@ -6104,7 +6597,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
6104
6597
|
* The customer external unique identifier (provided by your own application)
|
|
6105
6598
|
* @example "5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba"
|
|
6106
6599
|
*/
|
|
6107
|
-
|
|
6600
|
+
external_customer_id: string;
|
|
6108
6601
|
/**
|
|
6109
6602
|
* The customer's email address used for sending dunning notifications
|
|
6110
6603
|
* @format email
|
package/esm/openapi/client.js
CHANGED