lago-javascript-client 1.43.0 → 1.44.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 +2327 -1035
- package/esm/openapi/client.js +735 -16
- package/package.json +1 -1
- package/script/openapi/client.d.ts +2327 -1035
- package/script/openapi/client.js +735 -16
package/esm/openapi/client.d.ts
CHANGED
|
@@ -2323,241 +2323,6 @@ export type CreditNoteAppliedTaxObject = BaseAppliedTax & {
|
|
|
2323
2323
|
/** @example 100 */
|
|
2324
2324
|
base_amount_cents?: number;
|
|
2325
2325
|
};
|
|
2326
|
-
/**
|
|
2327
|
-
* Custom metadata stored as key-value pairs.
|
|
2328
|
-
* Keys are strings (max 100 characters), values can be strings (max 255 characters) or null.
|
|
2329
|
-
* @example {"external_id":"ext-123","synced_at":"2024-01-15","source":null}
|
|
2330
|
-
*/
|
|
2331
|
-
export type MetadataObject = object | null;
|
|
2332
|
-
export interface CreditNoteErrorDetailsObject {
|
|
2333
|
-
/**
|
|
2334
|
-
* The credit note error details unique identifier, created by Lago.
|
|
2335
|
-
* @format uuid
|
|
2336
|
-
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
2337
|
-
*/
|
|
2338
|
-
lago_id: string;
|
|
2339
|
-
/**
|
|
2340
|
-
* The type of the error.
|
|
2341
|
-
* @example "tax_error"
|
|
2342
|
-
*/
|
|
2343
|
-
error_code: "not_provided" | "tax_error" | "tax_voiding_error" | "invoice_generation_error";
|
|
2344
|
-
/** The details of the error. */
|
|
2345
|
-
details: object;
|
|
2346
|
-
}
|
|
2347
|
-
export interface CreditNoteObject {
|
|
2348
|
-
/**
|
|
2349
|
-
* The credit note unique identifier, created by Lago.
|
|
2350
|
-
* @format uuid
|
|
2351
|
-
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
2352
|
-
*/
|
|
2353
|
-
lago_id: string;
|
|
2354
|
-
/**
|
|
2355
|
-
* The unique code of the billing entity associated with the credit note.
|
|
2356
|
-
* @example "acme_corp"
|
|
2357
|
-
*/
|
|
2358
|
-
billing_entity_code: string;
|
|
2359
|
-
/**
|
|
2360
|
-
* The sequential identifier of the credit note, specifically scoped on the associated invoice. It provides a unique numerical identifier for the credit note within the context of the invoice.
|
|
2361
|
-
* @example 2
|
|
2362
|
-
*/
|
|
2363
|
-
sequential_id: number;
|
|
2364
|
-
/**
|
|
2365
|
-
* The credit note unique number.
|
|
2366
|
-
* @example "LAG-1234-CN2"
|
|
2367
|
-
*/
|
|
2368
|
-
number: string;
|
|
2369
|
-
/**
|
|
2370
|
-
* Unique identifier assigned to the invoice that the credit note belongs to
|
|
2371
|
-
* @format uuid
|
|
2372
|
-
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
2373
|
-
*/
|
|
2374
|
-
lago_invoice_id: string;
|
|
2375
|
-
/**
|
|
2376
|
-
* The invoice unique number, related to the credit note.
|
|
2377
|
-
* @example "LAG-1234"
|
|
2378
|
-
*/
|
|
2379
|
-
invoice_number: string;
|
|
2380
|
-
/**
|
|
2381
|
-
* The date of creation of the credit note. It follows the ISO 8601 date format and provides the specific date when the credit note was created.
|
|
2382
|
-
* @format date
|
|
2383
|
-
* @example "2022-12-06"
|
|
2384
|
-
*/
|
|
2385
|
-
issuing_date: string;
|
|
2386
|
-
/**
|
|
2387
|
-
* The status of the credit portion of the credit note. It indicates the current state or condition of the credit amount associated with the credit note. The possible values for this field are:
|
|
2388
|
-
*
|
|
2389
|
-
* - `available`: this status indicates that an amount remains available for future usage. The credit can be applied towards future transactions or invoices.
|
|
2390
|
-
* - `consumed`: this status indicates that the credit amount has been fully consumed. The remaining amount is 0, indicating that the credit has been utilized in its entirety.
|
|
2391
|
-
* - `voided`: this status indicates that the remaining amount of the credit cannot be used any further. The credit has been voided and is no longer available for application or redemption.
|
|
2392
|
-
* @example "available"
|
|
2393
|
-
*/
|
|
2394
|
-
credit_status?: "available" | "consumed" | "voided";
|
|
2395
|
-
/**
|
|
2396
|
-
* The status of the refund portion of the credit note. It indicates the current state or condition of the refund associated with the credit note. The possible values for this field are:
|
|
2397
|
-
*
|
|
2398
|
-
* - `pending`: this status indicates that the refund is pending execution. The refund request has been initiated but has not been processed or completed yet.
|
|
2399
|
-
* - `succeeded`: this status indicates that the refund has been successfully executed. The refund amount has been processed and returned to the customer or the designated recipient.
|
|
2400
|
-
* - `failed`: this status indicates that the refund failed to execute. The refund request encountered an error or unsuccessful processing, and the refund amount could not be returned.
|
|
2401
|
-
* @example "pending"
|
|
2402
|
-
*/
|
|
2403
|
-
refund_status?: "pending" | "succeeded" | "failed";
|
|
2404
|
-
/**
|
|
2405
|
-
* The reason of the credit note creation.
|
|
2406
|
-
* Possible values are `duplicated_charge`, `product_unsatisfactory`, `order_change`, `order_cancellation`, `fraudulent_charge` or `other`.
|
|
2407
|
-
* @example "other"
|
|
2408
|
-
*/
|
|
2409
|
-
reason: "duplicated_charge" | "product_unsatisfactory" | "order_change" | "order_cancellation" | "fraudulent_charge" | "other";
|
|
2410
|
-
/**
|
|
2411
|
-
* The description of the credit note.
|
|
2412
|
-
* @example "Free text"
|
|
2413
|
-
*/
|
|
2414
|
-
description?: string | null;
|
|
2415
|
-
/**
|
|
2416
|
-
* The currency of the credit note.
|
|
2417
|
-
* @example "EUR"
|
|
2418
|
-
*/
|
|
2419
|
-
currency: Currency;
|
|
2420
|
-
/**
|
|
2421
|
-
* The total amount of the credit note, expressed in cents.
|
|
2422
|
-
* @example 120
|
|
2423
|
-
*/
|
|
2424
|
-
total_amount_cents: number;
|
|
2425
|
-
/**
|
|
2426
|
-
* The tax amount of the credit note, expressed in cents.
|
|
2427
|
-
* @example 20
|
|
2428
|
-
*/
|
|
2429
|
-
taxes_amount_cents: number;
|
|
2430
|
-
/**
|
|
2431
|
-
* The tax rate associated with this specific credit note.
|
|
2432
|
-
* @example 20
|
|
2433
|
-
*/
|
|
2434
|
-
taxes_rate: number;
|
|
2435
|
-
/**
|
|
2436
|
-
* The subtotal of the credit note excluding any applicable taxes, expressed in cents.
|
|
2437
|
-
* @example 100
|
|
2438
|
-
*/
|
|
2439
|
-
sub_total_excluding_taxes_amount_cents: number;
|
|
2440
|
-
/**
|
|
2441
|
-
* The remaining credit note amount, expressed in cents.
|
|
2442
|
-
* @example 100
|
|
2443
|
-
*/
|
|
2444
|
-
balance_amount_cents: number;
|
|
2445
|
-
/**
|
|
2446
|
-
* The credited amount of the credit note, expressed in cents.
|
|
2447
|
-
* @example 100
|
|
2448
|
-
*/
|
|
2449
|
-
credit_amount_cents: number;
|
|
2450
|
-
/**
|
|
2451
|
-
* The refunded amount of the credit note, expressed in cents.
|
|
2452
|
-
* @example 0
|
|
2453
|
-
*/
|
|
2454
|
-
refund_amount_cents: number;
|
|
2455
|
-
/**
|
|
2456
|
-
* The ofsetted amount (deducted from the invoice balance) of the credit note, expressed in cents.
|
|
2457
|
-
* @example 0
|
|
2458
|
-
*/
|
|
2459
|
-
offset_amount_cents: number;
|
|
2460
|
-
/**
|
|
2461
|
-
* The pro-rated amount of the coupons applied to the source invoice.
|
|
2462
|
-
* @example 20
|
|
2463
|
-
*/
|
|
2464
|
-
coupons_adjustment_amount_cents: number;
|
|
2465
|
-
/**
|
|
2466
|
-
* The date when the credit note was created. It is expressed in Coordinated Universal Time (UTC).
|
|
2467
|
-
* @format date-time
|
|
2468
|
-
* @example "2022-09-14T16:35:31Z"
|
|
2469
|
-
*/
|
|
2470
|
-
created_at: string;
|
|
2471
|
-
/**
|
|
2472
|
-
* The date when the credit note was last updated. It is expressed in Coordinated Universal Time (UTC).
|
|
2473
|
-
* @format date-time
|
|
2474
|
-
* @example "2022-09-14T16:35:31Z"
|
|
2475
|
-
*/
|
|
2476
|
-
updated_at: string;
|
|
2477
|
-
/**
|
|
2478
|
-
* The PDF file of the credit note.
|
|
2479
|
-
* @example "https://getlago.com/credit_note/file"
|
|
2480
|
-
*/
|
|
2481
|
-
file_url?: string | null;
|
|
2482
|
-
/** Array of credit note's items. */
|
|
2483
|
-
items?: CreditNoteItemObject[];
|
|
2484
|
-
applied_taxes?: CreditNoteAppliedTaxObject[];
|
|
2485
|
-
/**
|
|
2486
|
-
* 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.
|
|
2487
|
-
* @example false
|
|
2488
|
-
*/
|
|
2489
|
-
self_billed?: boolean;
|
|
2490
|
-
/**
|
|
2491
|
-
* Custom metadata stored as key-value pairs.
|
|
2492
|
-
* Keys are strings (max 100 characters), values can be strings (max 255 characters) or null.
|
|
2493
|
-
*/
|
|
2494
|
-
metadata?: MetadataObject;
|
|
2495
|
-
error_details?: any[] | null;
|
|
2496
|
-
}
|
|
2497
|
-
export interface CreditNotesPaginated {
|
|
2498
|
-
credit_notes: CreditNoteObject[];
|
|
2499
|
-
meta: PaginationMeta;
|
|
2500
|
-
}
|
|
2501
|
-
/**
|
|
2502
|
-
* Metadata to set as key-value pairs. Keys are strings (max 100 characters), values can be strings (max 255 characters) or null.
|
|
2503
|
-
* @example {"external_id":"ext-123","synced_at":"2024-01-15"}
|
|
2504
|
-
*/
|
|
2505
|
-
export type MetadataInput = Record<string, string | null>;
|
|
2506
|
-
export interface CreditNoteCreateInput {
|
|
2507
|
-
credit_note: {
|
|
2508
|
-
/**
|
|
2509
|
-
* The invoice unique identifier, created by Lago.
|
|
2510
|
-
* @format uuid
|
|
2511
|
-
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
2512
|
-
*/
|
|
2513
|
-
invoice_id: string;
|
|
2514
|
-
/**
|
|
2515
|
-
* The reason of the credit note creation.
|
|
2516
|
-
* Possible values are `duplicated_charge`, `product_unsatisfactory`, `order_change`, `order_cancellation`, `fraudulent_charge` or `other`.
|
|
2517
|
-
* @example "duplicated_charge"
|
|
2518
|
-
*/
|
|
2519
|
-
reason?: "duplicated_charge" | "product_unsatisfactory" | "order_change" | "order_cancellation" | "fraudulent_charge" | "other";
|
|
2520
|
-
/**
|
|
2521
|
-
* The description of the credit note.
|
|
2522
|
-
* @example "description"
|
|
2523
|
-
*/
|
|
2524
|
-
description?: string;
|
|
2525
|
-
/**
|
|
2526
|
-
* The total amount to be credited to the customer balance for discounts on future invoices. For a total or partial refund, credit or offset, the amount in cents must include both the item amount and the applicable tax. The refunded, credited and offsetted amounts should always balance. The total, including taxes, cannot exceed the invoice’s total fees.”
|
|
2527
|
-
* @example 100
|
|
2528
|
-
*/
|
|
2529
|
-
credit_amount_cents?: number | null;
|
|
2530
|
-
/**
|
|
2531
|
-
* The total amount to be refunded immediately to the payment method used by the customer. For a total or partial refund, credit or offset, the amount in cents must include both the item amount and the applicable tax. The refunded, credited and offsetted amounts should always balance. The total, including taxes, cannot exceed the invoice’s total fees.”
|
|
2532
|
-
* @example 500
|
|
2533
|
-
*/
|
|
2534
|
-
refund_amount_cents?: number | null;
|
|
2535
|
-
/**
|
|
2536
|
-
* The total amount to be immediately deducted from the invoice balance. For a total or partial refund, credit or offset, the amount in cents must include both the item amount and the applicable tax. The refunded, credited and offsetted amounts should always balance. The total, including taxes, cannot exceed the invoice’s total fees.”
|
|
2537
|
-
* @example 200
|
|
2538
|
-
*/
|
|
2539
|
-
offset_amount_cents?: number | null;
|
|
2540
|
-
/**
|
|
2541
|
-
* The list of credit note's items.
|
|
2542
|
-
* @example [{"fee_id":"1a901a90-1a90-1a90-1a90-1a901a901a90","amount_cents":100},{"fee_id":"1a901a90-1a90-1a90-1a90-1a901a901a91","amount_cents":500},{"fee_id":"1a901a90-1a90-1a90-1a90-1a901a901a92","amount_cents":200}]
|
|
2543
|
-
*/
|
|
2544
|
-
items: {
|
|
2545
|
-
/**
|
|
2546
|
-
* The fee unique identifier, created by Lago.
|
|
2547
|
-
* @format uuid
|
|
2548
|
-
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
2549
|
-
*/
|
|
2550
|
-
fee_id: string;
|
|
2551
|
-
/**
|
|
2552
|
-
* This is the amount of the credit note item excluding taxes, expressed in cents.
|
|
2553
|
-
* @example 100
|
|
2554
|
-
*/
|
|
2555
|
-
amount_cents: number;
|
|
2556
|
-
}[];
|
|
2557
|
-
/** Metadata to set as key-value pairs. Keys are strings (max 100 characters), values can be strings (max 255 characters) or null. */
|
|
2558
|
-
metadata?: MetadataInput;
|
|
2559
|
-
};
|
|
2560
|
-
}
|
|
2561
2326
|
/** @example "US" */
|
|
2562
2327
|
export type CountryOrNull = "AD" | "AE" | "AF" | "AG" | "AI" | "AL" | "AM" | "AO" | "AQ" | "AR" | "AS" | "AT" | "AU" | "AW" | "AX" | "AZ" | "BA" | "BB" | "BD" | "BE" | "BF" | "BG" | "BH" | "BI" | "BJ" | "BL" | "BM" | "BN" | "BO" | "BQ" | "BR" | "BS" | "BT" | "BV" | "BW" | "BY" | "BZ" | "CA" | "CC" | "CD" | "CF" | "CG" | "CH" | "CI" | "CK" | "CL" | "CM" | "CN" | "CO" | "CR" | "CU" | "CV" | "CW" | "CX" | "CY" | "CZ" | "DE" | "DJ" | "DK" | "DM" | "DO" | "DZ" | "EC" | "EE" | "EG" | "EH" | "ER" | "ES" | "ET" | "FI" | "FJ" | "FK" | "FM" | "FO" | "FR" | "GA" | "GB" | "GD" | "GE" | "GF" | "GG" | "GH" | "GI" | "GL" | "GM" | "GN" | "GP" | "GQ" | "GR" | "GS" | "GT" | "GU" | "GW" | "GY" | "HK" | "HM" | "HN" | "HR" | "HT" | "HU" | "ID" | "IE" | "IL" | "IM" | "IN" | "IO" | "IQ" | "IR" | "IS" | "IT" | "JE" | "JM" | "JO" | "JP" | "KE" | "KG" | "KH" | "KI" | "KM" | "KN" | "KP" | "KR" | "KW" | "KY" | "KZ" | "LA" | "LB" | "LC" | "LI" | "LK" | "LR" | "LS" | "LT" | "LU" | "LV" | "LY" | "MA" | "MC" | "MD" | "ME" | "MF" | "MG" | "MH" | "MK" | "ML" | "MM" | "MN" | "MO" | "MP" | "MQ" | "MR" | "MS" | "MT" | "MU" | "MV" | "MW" | "MX" | "MY" | "MZ" | "NA" | "NC" | "NE" | "NF" | "NG" | "NI" | "NL" | "NO" | "NP" | "NR" | "NU" | "NZ" | "OM" | "PA" | "PE" | "PF" | "PG" | "PH" | "PK" | "PL" | "PM" | "PN" | "PR" | "PS" | "PT" | "PW" | "PY" | "QA" | "RE" | "RO" | "RS" | "RU" | "RW" | "SA" | "SB" | "SC" | "SD" | "SE" | "SG" | "SH" | "SI" | "SJ" | "SK" | "SL" | "SM" | "SN" | "SO" | "SR" | "SS" | "ST" | "SV" | "SX" | "SY" | "SZ" | "TC" | "TD" | "TF" | "TG" | "TH" | "TJ" | "TK" | "TL" | "TM" | "TN" | "TO" | "TR" | "TT" | "TV" | "TW" | "TZ" | "UA" | "UG" | "UM" | "US" | "UY" | "UZ" | "VA" | "VC" | "VE" | "VG" | "VI" | "VN" | "VU" | "WF" | "WS" | "YE" | "YT" | "ZA" | "ZM" | "ZW";
|
|
2563
2328
|
/** @example "America/Los_Angeles" */
|
|
@@ -2847,31 +2612,188 @@ export interface CustomerBaseObject {
|
|
|
2847
2612
|
shipping_address?: Address;
|
|
2848
2613
|
metadata?: CustomerMetadata[];
|
|
2849
2614
|
}
|
|
2850
|
-
|
|
2851
|
-
|
|
2852
|
-
|
|
2853
|
-
|
|
2854
|
-
|
|
2855
|
-
|
|
2856
|
-
export interface
|
|
2857
|
-
|
|
2858
|
-
|
|
2859
|
-
|
|
2860
|
-
|
|
2861
|
-
|
|
2862
|
-
|
|
2863
|
-
|
|
2864
|
-
|
|
2865
|
-
|
|
2866
|
-
|
|
2867
|
-
|
|
2868
|
-
|
|
2869
|
-
|
|
2870
|
-
}
|
|
2871
|
-
export interface CreditNote {
|
|
2872
|
-
credit_note: CreditNoteObject;
|
|
2615
|
+
/**
|
|
2616
|
+
* Custom metadata stored as key-value pairs.
|
|
2617
|
+
* Keys are strings (max 100 characters), values can be strings (max 255 characters) or null.
|
|
2618
|
+
* @example {"external_id":"ext-123","synced_at":"2024-01-15","source":null}
|
|
2619
|
+
*/
|
|
2620
|
+
export type MetadataObject = object | null;
|
|
2621
|
+
export interface CreditNoteErrorDetailsObject {
|
|
2622
|
+
/**
|
|
2623
|
+
* The credit note error details unique identifier, created by Lago.
|
|
2624
|
+
* @format uuid
|
|
2625
|
+
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
2626
|
+
*/
|
|
2627
|
+
lago_id: string;
|
|
2628
|
+
/**
|
|
2629
|
+
* The type of the error.
|
|
2630
|
+
* @example "tax_error"
|
|
2631
|
+
*/
|
|
2632
|
+
error_code: "not_provided" | "tax_error" | "tax_voiding_error" | "invoice_generation_error";
|
|
2633
|
+
/** The details of the error. */
|
|
2634
|
+
details: object;
|
|
2873
2635
|
}
|
|
2874
|
-
export interface
|
|
2636
|
+
export interface CreditNoteObject {
|
|
2637
|
+
/**
|
|
2638
|
+
* The credit note unique identifier, created by Lago.
|
|
2639
|
+
* @format uuid
|
|
2640
|
+
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
2641
|
+
*/
|
|
2642
|
+
lago_id: string;
|
|
2643
|
+
/**
|
|
2644
|
+
* The unique code of the billing entity associated with the credit note.
|
|
2645
|
+
* @example "acme_corp"
|
|
2646
|
+
*/
|
|
2647
|
+
billing_entity_code: string;
|
|
2648
|
+
/**
|
|
2649
|
+
* The sequential identifier of the credit note, specifically scoped on the associated invoice. It provides a unique numerical identifier for the credit note within the context of the invoice.
|
|
2650
|
+
* @example 2
|
|
2651
|
+
*/
|
|
2652
|
+
sequential_id: number;
|
|
2653
|
+
/**
|
|
2654
|
+
* The credit note unique number.
|
|
2655
|
+
* @example "LAG-1234-CN2"
|
|
2656
|
+
*/
|
|
2657
|
+
number: string;
|
|
2658
|
+
/**
|
|
2659
|
+
* Unique identifier assigned to the invoice that the credit note belongs to
|
|
2660
|
+
* @format uuid
|
|
2661
|
+
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
2662
|
+
*/
|
|
2663
|
+
lago_invoice_id: string;
|
|
2664
|
+
/**
|
|
2665
|
+
* The invoice unique number, related to the credit note.
|
|
2666
|
+
* @example "LAG-1234"
|
|
2667
|
+
*/
|
|
2668
|
+
invoice_number: string;
|
|
2669
|
+
/**
|
|
2670
|
+
* The date of creation of the credit note. It follows the ISO 8601 date format and provides the specific date when the credit note was created.
|
|
2671
|
+
* @format date
|
|
2672
|
+
* @example "2022-12-06"
|
|
2673
|
+
*/
|
|
2674
|
+
issuing_date: string;
|
|
2675
|
+
/**
|
|
2676
|
+
* The status of the credit portion of the credit note. It indicates the current state or condition of the credit amount associated with the credit note. The possible values for this field are:
|
|
2677
|
+
*
|
|
2678
|
+
* - `available`: this status indicates that an amount remains available for future usage. The credit can be applied towards future transactions or invoices.
|
|
2679
|
+
* - `consumed`: this status indicates that the credit amount has been fully consumed. The remaining amount is 0, indicating that the credit has been utilized in its entirety.
|
|
2680
|
+
* - `voided`: this status indicates that the remaining amount of the credit cannot be used any further. The credit has been voided and is no longer available for application or redemption.
|
|
2681
|
+
* @example "available"
|
|
2682
|
+
*/
|
|
2683
|
+
credit_status?: "available" | "consumed" | "voided";
|
|
2684
|
+
/**
|
|
2685
|
+
* The status of the refund portion of the credit note. It indicates the current state or condition of the refund associated with the credit note. The possible values for this field are:
|
|
2686
|
+
*
|
|
2687
|
+
* - `pending`: this status indicates that the refund is pending execution. The refund request has been initiated but has not been processed or completed yet.
|
|
2688
|
+
* - `succeeded`: this status indicates that the refund has been successfully executed. The refund amount has been processed and returned to the customer or the designated recipient.
|
|
2689
|
+
* - `failed`: this status indicates that the refund failed to execute. The refund request encountered an error or unsuccessful processing, and the refund amount could not be returned.
|
|
2690
|
+
* @example "pending"
|
|
2691
|
+
*/
|
|
2692
|
+
refund_status?: "pending" | "succeeded" | "failed";
|
|
2693
|
+
/**
|
|
2694
|
+
* The reason of the credit note creation.
|
|
2695
|
+
* Possible values are `duplicated_charge`, `product_unsatisfactory`, `order_change`, `order_cancellation`, `fraudulent_charge` or `other`.
|
|
2696
|
+
* @example "other"
|
|
2697
|
+
*/
|
|
2698
|
+
reason: "duplicated_charge" | "product_unsatisfactory" | "order_change" | "order_cancellation" | "fraudulent_charge" | "other";
|
|
2699
|
+
/**
|
|
2700
|
+
* The description of the credit note.
|
|
2701
|
+
* @example "Free text"
|
|
2702
|
+
*/
|
|
2703
|
+
description?: string | null;
|
|
2704
|
+
/**
|
|
2705
|
+
* The currency of the credit note.
|
|
2706
|
+
* @example "EUR"
|
|
2707
|
+
*/
|
|
2708
|
+
currency: Currency;
|
|
2709
|
+
/**
|
|
2710
|
+
* The total amount of the credit note, expressed in cents.
|
|
2711
|
+
* @example 120
|
|
2712
|
+
*/
|
|
2713
|
+
total_amount_cents: number;
|
|
2714
|
+
/**
|
|
2715
|
+
* The tax amount of the credit note, expressed in cents.
|
|
2716
|
+
* @example 20
|
|
2717
|
+
*/
|
|
2718
|
+
taxes_amount_cents: number;
|
|
2719
|
+
/**
|
|
2720
|
+
* The tax rate associated with this specific credit note.
|
|
2721
|
+
* @example 20
|
|
2722
|
+
*/
|
|
2723
|
+
taxes_rate: number;
|
|
2724
|
+
/**
|
|
2725
|
+
* The subtotal of the credit note excluding any applicable taxes, expressed in cents.
|
|
2726
|
+
* @example 100
|
|
2727
|
+
*/
|
|
2728
|
+
sub_total_excluding_taxes_amount_cents: number;
|
|
2729
|
+
/**
|
|
2730
|
+
* The remaining credit note amount, expressed in cents.
|
|
2731
|
+
* @example 100
|
|
2732
|
+
*/
|
|
2733
|
+
balance_amount_cents: number;
|
|
2734
|
+
/**
|
|
2735
|
+
* The credited amount of the credit note, expressed in cents.
|
|
2736
|
+
* @example 100
|
|
2737
|
+
*/
|
|
2738
|
+
credit_amount_cents: number;
|
|
2739
|
+
/**
|
|
2740
|
+
* The refunded amount of the credit note, expressed in cents.
|
|
2741
|
+
* @example 0
|
|
2742
|
+
*/
|
|
2743
|
+
refund_amount_cents: number;
|
|
2744
|
+
/**
|
|
2745
|
+
* The ofsetted amount (deducted from the invoice balance) of the credit note, expressed in cents.
|
|
2746
|
+
* @example 0
|
|
2747
|
+
*/
|
|
2748
|
+
offset_amount_cents: number;
|
|
2749
|
+
/**
|
|
2750
|
+
* The pro-rated amount of the coupons applied to the source invoice.
|
|
2751
|
+
* @example 20
|
|
2752
|
+
*/
|
|
2753
|
+
coupons_adjustment_amount_cents: number;
|
|
2754
|
+
/**
|
|
2755
|
+
* The date when the credit note was created. It is expressed in Coordinated Universal Time (UTC).
|
|
2756
|
+
* @format date-time
|
|
2757
|
+
* @example "2022-09-14T16:35:31Z"
|
|
2758
|
+
*/
|
|
2759
|
+
created_at: string;
|
|
2760
|
+
/**
|
|
2761
|
+
* The date when the credit note was last updated. It is expressed in Coordinated Universal Time (UTC).
|
|
2762
|
+
* @format date-time
|
|
2763
|
+
* @example "2022-09-14T16:35:31Z"
|
|
2764
|
+
*/
|
|
2765
|
+
updated_at: string;
|
|
2766
|
+
/**
|
|
2767
|
+
* The PDF file of the credit note.
|
|
2768
|
+
* @example "https://getlago.com/credit_note/file"
|
|
2769
|
+
*/
|
|
2770
|
+
file_url?: string | null;
|
|
2771
|
+
/** Array of credit note's items. */
|
|
2772
|
+
items?: CreditNoteItemObject[];
|
|
2773
|
+
applied_taxes?: CreditNoteAppliedTaxObject[];
|
|
2774
|
+
/**
|
|
2775
|
+
* 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.
|
|
2776
|
+
* @example false
|
|
2777
|
+
*/
|
|
2778
|
+
self_billed?: boolean;
|
|
2779
|
+
customer?: CustomerBaseObject;
|
|
2780
|
+
/**
|
|
2781
|
+
* Custom metadata stored as key-value pairs.
|
|
2782
|
+
* Keys are strings (max 100 characters), values can be strings (max 255 characters) or null.
|
|
2783
|
+
*/
|
|
2784
|
+
metadata?: MetadataObject;
|
|
2785
|
+
error_details?: any[] | null;
|
|
2786
|
+
}
|
|
2787
|
+
export interface CreditNotesPaginated {
|
|
2788
|
+
credit_notes: CreditNoteObject[];
|
|
2789
|
+
meta: PaginationMeta;
|
|
2790
|
+
}
|
|
2791
|
+
/**
|
|
2792
|
+
* Metadata to set as key-value pairs. Keys are strings (max 100 characters), values can be strings (max 255 characters) or null.
|
|
2793
|
+
* @example {"external_id":"ext-123","synced_at":"2024-01-15"}
|
|
2794
|
+
*/
|
|
2795
|
+
export type MetadataInput = Record<string, string | null>;
|
|
2796
|
+
export interface CreditNoteCreateInput {
|
|
2875
2797
|
credit_note: {
|
|
2876
2798
|
/**
|
|
2877
2799
|
* The invoice unique identifier, created by Lago.
|
|
@@ -2879,9 +2801,35 @@ export interface CreditNoteEstimateInput {
|
|
|
2879
2801
|
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
2880
2802
|
*/
|
|
2881
2803
|
invoice_id: string;
|
|
2804
|
+
/**
|
|
2805
|
+
* The reason of the credit note creation.
|
|
2806
|
+
* Possible values are `duplicated_charge`, `product_unsatisfactory`, `order_change`, `order_cancellation`, `fraudulent_charge` or `other`.
|
|
2807
|
+
* @example "duplicated_charge"
|
|
2808
|
+
*/
|
|
2809
|
+
reason?: "duplicated_charge" | "product_unsatisfactory" | "order_change" | "order_cancellation" | "fraudulent_charge" | "other";
|
|
2810
|
+
/**
|
|
2811
|
+
* The description of the credit note.
|
|
2812
|
+
* @example "description"
|
|
2813
|
+
*/
|
|
2814
|
+
description?: string;
|
|
2815
|
+
/**
|
|
2816
|
+
* The total amount to be credited to the customer balance for discounts on future invoices. For a total or partial refund, credit or offset, the amount in cents must include both the item amount and the applicable tax. The refunded, credited and offsetted amounts should always balance. The total, including taxes, cannot exceed the invoice’s total fees.”
|
|
2817
|
+
* @example 100
|
|
2818
|
+
*/
|
|
2819
|
+
credit_amount_cents?: number | null;
|
|
2820
|
+
/**
|
|
2821
|
+
* The total amount to be refunded immediately to the payment method used by the customer. For a total or partial refund, credit or offset, the amount in cents must include both the item amount and the applicable tax. The refunded, credited and offsetted amounts should always balance. The total, including taxes, cannot exceed the invoice’s total fees.”
|
|
2822
|
+
* @example 500
|
|
2823
|
+
*/
|
|
2824
|
+
refund_amount_cents?: number | null;
|
|
2825
|
+
/**
|
|
2826
|
+
* The total amount to be immediately deducted from the invoice balance. For a total or partial refund, credit or offset, the amount in cents must include both the item amount and the applicable tax. The refunded, credited and offsetted amounts should always balance. The total, including taxes, cannot exceed the invoice’s total fees.”
|
|
2827
|
+
* @example 200
|
|
2828
|
+
*/
|
|
2829
|
+
offset_amount_cents?: number | null;
|
|
2882
2830
|
/**
|
|
2883
2831
|
* The list of credit note's items.
|
|
2884
|
-
* @example [{"fee_id":"1a901a90-1a90-1a90-1a90-1a901a901a90","amount_cents":
|
|
2832
|
+
* @example [{"fee_id":"1a901a90-1a90-1a90-1a90-1a901a901a90","amount_cents":100},{"fee_id":"1a901a90-1a90-1a90-1a90-1a901a901a91","amount_cents":500},{"fee_id":"1a901a90-1a90-1a90-1a90-1a901a901a92","amount_cents":200}]
|
|
2885
2833
|
*/
|
|
2886
2834
|
items: {
|
|
2887
2835
|
/**
|
|
@@ -2891,27 +2839,80 @@ export interface CreditNoteEstimateInput {
|
|
|
2891
2839
|
*/
|
|
2892
2840
|
fee_id: string;
|
|
2893
2841
|
/**
|
|
2894
|
-
*
|
|
2895
|
-
* @example
|
|
2842
|
+
* This is the amount of the credit note item excluding taxes, expressed in cents.
|
|
2843
|
+
* @example 100
|
|
2896
2844
|
*/
|
|
2897
2845
|
amount_cents: number;
|
|
2898
2846
|
}[];
|
|
2847
|
+
/** Metadata to set as key-value pairs. Keys are strings (max 100 characters), values can be strings (max 255 characters) or null. */
|
|
2848
|
+
metadata?: MetadataInput;
|
|
2899
2849
|
};
|
|
2900
2850
|
}
|
|
2901
|
-
export
|
|
2902
|
-
|
|
2851
|
+
export type CreditNoteExtendedObject = CreditNoteObject & {
|
|
2852
|
+
customer?: CustomerBaseObject;
|
|
2853
|
+
};
|
|
2854
|
+
export interface CreditNoteExtended {
|
|
2855
|
+
credit_note: CreditNoteExtendedObject;
|
|
2856
|
+
}
|
|
2857
|
+
export interface CreditNoteUpdateInput {
|
|
2858
|
+
credit_note: {
|
|
2903
2859
|
/**
|
|
2904
|
-
*
|
|
2860
|
+
* The status of the refund portion of the credit note. It indicates the current state or condition of the refund associated with the credit note. The possible values for this field are:
|
|
2861
|
+
*
|
|
2862
|
+
* - `pending`: this status indicates that the refund is pending execution. The refund request has been initiated but has not been processed or completed yet.
|
|
2863
|
+
* - `succeeded`: this status indicates that the refund has been successfully executed. The refund amount has been processed and returned to the customer or the designated recipient.
|
|
2864
|
+
* - `failed`: this status indicates that the refund failed to execute. The refund request encountered an error or unsuccessful processing, and the refund amount could not be returned.
|
|
2865
|
+
* @example "succeeded"
|
|
2866
|
+
*/
|
|
2867
|
+
refund_status: "pending" | "succeeded" | "failed";
|
|
2868
|
+
/** Metadata to set as key-value pairs. Keys are strings (max 100 characters), values can be strings (max 255 characters) or null. */
|
|
2869
|
+
metadata?: MetadataInput;
|
|
2870
|
+
};
|
|
2871
|
+
}
|
|
2872
|
+
export interface CreditNote {
|
|
2873
|
+
credit_note: CreditNoteObject;
|
|
2874
|
+
}
|
|
2875
|
+
export interface CreditNoteEstimateInput {
|
|
2876
|
+
credit_note: {
|
|
2877
|
+
/**
|
|
2878
|
+
* The invoice unique identifier, created by Lago.
|
|
2905
2879
|
* @format uuid
|
|
2906
2880
|
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
2907
2881
|
*/
|
|
2908
|
-
|
|
2882
|
+
invoice_id: string;
|
|
2909
2883
|
/**
|
|
2910
|
-
* The
|
|
2911
|
-
* @example "
|
|
2884
|
+
* The list of credit note's items.
|
|
2885
|
+
* @example [{"fee_id":"1a901a90-1a90-1a90-1a90-1a901a901a90","amount_cents":10},{"fee_id":"1a901a90-1a90-1a90-1a90-1a901a901a91","amount_cents":5}]
|
|
2912
2886
|
*/
|
|
2913
|
-
|
|
2914
|
-
|
|
2887
|
+
items: {
|
|
2888
|
+
/**
|
|
2889
|
+
* The fee unique identifier, created by Lago.
|
|
2890
|
+
* @format uuid
|
|
2891
|
+
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
2892
|
+
*/
|
|
2893
|
+
fee_id: string;
|
|
2894
|
+
/**
|
|
2895
|
+
* The amount of the credit note item, expressed in cents.
|
|
2896
|
+
* @example 10
|
|
2897
|
+
*/
|
|
2898
|
+
amount_cents: number;
|
|
2899
|
+
}[];
|
|
2900
|
+
};
|
|
2901
|
+
}
|
|
2902
|
+
export interface CreditNoteEstimated {
|
|
2903
|
+
estimated_credit_note: {
|
|
2904
|
+
/**
|
|
2905
|
+
* Unique identifier assigned to the invoice that the credit note belongs to
|
|
2906
|
+
* @format uuid
|
|
2907
|
+
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
2908
|
+
*/
|
|
2909
|
+
lago_invoice_id: string;
|
|
2910
|
+
/**
|
|
2911
|
+
* The invoice unique number, related to the credit note.
|
|
2912
|
+
* @example "LAG-1234"
|
|
2913
|
+
*/
|
|
2914
|
+
invoice_number: string;
|
|
2915
|
+
/**
|
|
2915
2916
|
* The currency of the credit note.
|
|
2916
2917
|
* @example "EUR"
|
|
2917
2918
|
*/
|
|
@@ -3083,12 +3084,32 @@ export interface IntegrationCustomer {
|
|
|
3083
3084
|
export type CustomerObject = CustomerBaseObject & {
|
|
3084
3085
|
integration_customers?: IntegrationCustomer[];
|
|
3085
3086
|
};
|
|
3087
|
+
export interface ErrorDetailObject {
|
|
3088
|
+
/**
|
|
3089
|
+
* Unique identifier assigned to the error_detail within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the error's record within the Lago system.
|
|
3090
|
+
* @format uuid
|
|
3091
|
+
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
3092
|
+
*/
|
|
3093
|
+
lago_id: string | null;
|
|
3094
|
+
/**
|
|
3095
|
+
* Code that specifies part of the application / connection, where the error originally happened
|
|
3096
|
+
* @example "tax_error"
|
|
3097
|
+
*/
|
|
3098
|
+
error_code: string;
|
|
3099
|
+
/**
|
|
3100
|
+
* Key value list of more elaborated error detail, where by the key of error_code an external service error details are stored
|
|
3101
|
+
* @example {"tax_error":"taxDateTooFarInFuture"}
|
|
3102
|
+
*/
|
|
3103
|
+
details: Record<string, string>;
|
|
3104
|
+
}
|
|
3086
3105
|
export type CustomerObjectExtended = CustomerObject & {
|
|
3087
3106
|
metadata?: CustomerMetadata[];
|
|
3088
3107
|
/** List of customer taxes */
|
|
3089
3108
|
taxes?: TaxObject[];
|
|
3090
3109
|
/** The customer’s invoice custom section used for generating invoices. */
|
|
3091
3110
|
applicable_invoice_custom_sections?: InvoiceCustomSectionObject[];
|
|
3111
|
+
/** List of errors with details that might have been raised while processing backgroud actions for the customers */
|
|
3112
|
+
error_details?: ErrorDetailObject[];
|
|
3092
3113
|
};
|
|
3093
3114
|
export interface CustomersPaginated {
|
|
3094
3115
|
customers: CustomerObjectExtended[];
|
|
@@ -3417,6 +3438,16 @@ export interface InvoiceBaseObject {
|
|
|
3417
3438
|
* @example 0
|
|
3418
3439
|
*/
|
|
3419
3440
|
prepaid_credit_amount_cents: number;
|
|
3441
|
+
/**
|
|
3442
|
+
* The portion of prepaid credits discounted on the invoice that originated from granted (free) credits, expressed in cents. Only populated for invoices associated with traceable wallets.
|
|
3443
|
+
* @example 0
|
|
3444
|
+
*/
|
|
3445
|
+
prepaid_granted_credit_amount_cents?: number | null;
|
|
3446
|
+
/**
|
|
3447
|
+
* The portion of prepaid credits discounted on the invoice that originated from purchased (paid) credits, expressed in cents. Only populated for invoices associated with traceable wallets.
|
|
3448
|
+
* @example 0
|
|
3449
|
+
*/
|
|
3450
|
+
prepaid_purchased_credit_amount_cents?: number | null;
|
|
3420
3451
|
/**
|
|
3421
3452
|
* The usage already billed in previous invoices. Only apply to `progressive_billing` and `subscription` invoices.
|
|
3422
3453
|
* @example 0
|
|
@@ -3538,6 +3569,41 @@ export type InvoiceAppliedTaxObject = BaseAppliedTax & {
|
|
|
3538
3569
|
*/
|
|
3539
3570
|
fees_amount_cents?: number;
|
|
3540
3571
|
};
|
|
3572
|
+
export interface InvoiceAppliedInvoiceCustomSectionObject {
|
|
3573
|
+
/**
|
|
3574
|
+
* Unique identifier of the applied invoice custom section in the Lago application.
|
|
3575
|
+
* @format uuid
|
|
3576
|
+
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
3577
|
+
*/
|
|
3578
|
+
lago_id: string;
|
|
3579
|
+
/**
|
|
3580
|
+
* Unique identifier of the invoice this custom section is applied to.
|
|
3581
|
+
* @format uuid
|
|
3582
|
+
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
3583
|
+
*/
|
|
3584
|
+
lago_invoice_id: string;
|
|
3585
|
+
/**
|
|
3586
|
+
* Unique code identifying the invoice custom section.
|
|
3587
|
+
* @example "eu_bank_details"
|
|
3588
|
+
*/
|
|
3589
|
+
code: string;
|
|
3590
|
+
/**
|
|
3591
|
+
* The value shown on the invoice PDF.
|
|
3592
|
+
* @example "Bank Name: Lago Bank, IBAN: FR7630004000031234567890143"
|
|
3593
|
+
*/
|
|
3594
|
+
details: string;
|
|
3595
|
+
/**
|
|
3596
|
+
* The name of the invoice custom section displayed on the invoice.
|
|
3597
|
+
* @example "Bank Details:"
|
|
3598
|
+
*/
|
|
3599
|
+
display_name: string;
|
|
3600
|
+
/**
|
|
3601
|
+
* The date of the applied invoice custom section creation, represented in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC).
|
|
3602
|
+
* @format date-time
|
|
3603
|
+
* @example "2023-07-06T14:35:58Z"
|
|
3604
|
+
*/
|
|
3605
|
+
created_at: string;
|
|
3606
|
+
}
|
|
3541
3607
|
export interface UsageThresholdObject {
|
|
3542
3608
|
/**
|
|
3543
3609
|
* Unique identifier of the usage threshold created by Lago.
|
|
@@ -3593,6 +3659,8 @@ export type InvoiceObject = InvoiceBaseObject & {
|
|
|
3593
3659
|
billing_periods?: BillingPeriodObject[];
|
|
3594
3660
|
metadata?: InvoiceMetadataObject[];
|
|
3595
3661
|
applied_taxes?: InvoiceAppliedTaxObject[];
|
|
3662
|
+
/** The invoice custom sections applied to this invoice for PDF generation. */
|
|
3663
|
+
applied_invoice_custom_sections?: InvoiceAppliedInvoiceCustomSectionObject[];
|
|
3596
3664
|
applied_usage_thresholds?: AppliedUsageThresholdObject[];
|
|
3597
3665
|
};
|
|
3598
3666
|
export interface InvoicesPaginated {
|
|
@@ -3619,6 +3687,8 @@ export interface PaymentObject {
|
|
|
3619
3687
|
external_customer_id: string;
|
|
3620
3688
|
/** List of invoice IDs associated with the payment. */
|
|
3621
3689
|
invoice_ids: string[];
|
|
3690
|
+
/** List of invoice numbers associated with the payment. */
|
|
3691
|
+
invoice_numbers?: string[];
|
|
3622
3692
|
/**
|
|
3623
3693
|
* The unique identifier of the paid resource, created by Lago.
|
|
3624
3694
|
* @format uuid
|
|
@@ -3749,6 +3819,26 @@ export interface PaymentRequestsPaginated {
|
|
|
3749
3819
|
payment_requests: PaymentRequestObject[];
|
|
3750
3820
|
meta: PaginationMeta;
|
|
3751
3821
|
}
|
|
3822
|
+
export interface AppliedInvoiceCustomSectionObject {
|
|
3823
|
+
/**
|
|
3824
|
+
* Unique identifier of the applied invoice custom section in the Lago application.
|
|
3825
|
+
* @format uuid
|
|
3826
|
+
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
3827
|
+
*/
|
|
3828
|
+
lago_id: string;
|
|
3829
|
+
/**
|
|
3830
|
+
* Unique identifier of the invoice custom section that was applied.
|
|
3831
|
+
* @format uuid
|
|
3832
|
+
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
3833
|
+
*/
|
|
3834
|
+
invoice_custom_section_id: string;
|
|
3835
|
+
/**
|
|
3836
|
+
* The date of the applied invoice custom section creation, represented in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC).
|
|
3837
|
+
* @format date-time
|
|
3838
|
+
* @example "2023-07-06T14:35:58Z"
|
|
3839
|
+
*/
|
|
3840
|
+
created_at: string;
|
|
3841
|
+
}
|
|
3752
3842
|
/** Reference to a specific payment method for processing the payment. */
|
|
3753
3843
|
export interface PaymentMethodReference {
|
|
3754
3844
|
/**
|
|
@@ -3913,6 +4003,8 @@ export interface SubscriptionObject {
|
|
|
3913
4003
|
* @example "generate"
|
|
3914
4004
|
*/
|
|
3915
4005
|
on_termination_invoice: "generate" | "skip";
|
|
4006
|
+
/** The invoice custom sections applied to invoices generated by this subscription. */
|
|
4007
|
+
applied_invoice_custom_sections?: AppliedInvoiceCustomSectionObject[];
|
|
3916
4008
|
/** The payment method assigned to this subscription for processing payments. */
|
|
3917
4009
|
payment_method?: PaymentMethodReference;
|
|
3918
4010
|
}
|
|
@@ -3979,206 +4071,651 @@ export interface WalletRecurringTransactionRule {
|
|
|
3979
4071
|
*/
|
|
3980
4072
|
target_ongoing_balance: string | null;
|
|
3981
4073
|
/**
|
|
3982
|
-
* The date of the metadata object creation, represented in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC). The creation_date provides a standardized and internationally recognized timestamp for when the metadata object was created
|
|
3983
|
-
* @format date-time
|
|
3984
|
-
* @example "2022-04-29T08:59:51Z"
|
|
4074
|
+
* The date of the metadata object creation, represented in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC). The creation_date provides a standardized and internationally recognized timestamp for when the metadata object was created
|
|
4075
|
+
* @format date-time
|
|
4076
|
+
* @example "2022-04-29T08:59:51Z"
|
|
4077
|
+
*/
|
|
4078
|
+
created_at: string;
|
|
4079
|
+
/**
|
|
4080
|
+
* The expiration date and time for this specific recurring transaction rule. It follows the ISO 8601 datetime format and is expressed in Coordinated Universal Time (UTC).
|
|
4081
|
+
* @format date-time
|
|
4082
|
+
* @example "2023-09-30T23:59:59Z"
|
|
4083
|
+
*/
|
|
4084
|
+
expiration_at: string | null;
|
|
4085
|
+
/**
|
|
4086
|
+
* 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.
|
|
4087
|
+
* @example false
|
|
4088
|
+
*/
|
|
4089
|
+
invoice_requires_successful_payment: boolean;
|
|
4090
|
+
/**
|
|
4091
|
+
* 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.
|
|
4092
|
+
* @example [{"key":"example_key","value":"example_value"},{"key":"another_key","value":"another_value"}]
|
|
4093
|
+
*/
|
|
4094
|
+
transaction_metadata: {
|
|
4095
|
+
/** The unique identifier for the attribute. */
|
|
4096
|
+
key?: string;
|
|
4097
|
+
/** The value associated with the key. */
|
|
4098
|
+
value?: string;
|
|
4099
|
+
}[];
|
|
4100
|
+
/**
|
|
4101
|
+
* The name of the wallet transactions triggered by this rule. It will appear on the invoice as the label for the fee. If not set, the label on the invoice will fallback to either `Prepaid credits - {{wallet_name}}` if the wallet name is set, or `Prepaid credits`.
|
|
4102
|
+
* @example "Tokens for models 'high-fidelity-boost'"
|
|
4103
|
+
*/
|
|
4104
|
+
transaction_name: string | null;
|
|
4105
|
+
/**
|
|
4106
|
+
* When true, allows rule to topped up wallet with transactions that exceed the paid top-up limits. Defaults to false.
|
|
4107
|
+
* @example false
|
|
4108
|
+
*/
|
|
4109
|
+
ignore_paid_top_up_limits: boolean;
|
|
4110
|
+
/** The invoice custom sections applied to invoices generated by this recurring transaction rule. */
|
|
4111
|
+
applied_invoice_custom_sections?: AppliedInvoiceCustomSectionObject[];
|
|
4112
|
+
/** The payment method assigned to this recurring transaction rule for processing top-up payments. */
|
|
4113
|
+
payment_method?: PaymentMethodReference;
|
|
4114
|
+
}
|
|
4115
|
+
export interface WalletObject {
|
|
4116
|
+
/**
|
|
4117
|
+
* 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 wallet's record within the Lago system.
|
|
4118
|
+
* @format uuid
|
|
4119
|
+
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
4120
|
+
*/
|
|
4121
|
+
lago_id: string;
|
|
4122
|
+
/**
|
|
4123
|
+
* 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.
|
|
4124
|
+
* @format uuid
|
|
4125
|
+
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
4126
|
+
*/
|
|
4127
|
+
lago_customer_id: string;
|
|
4128
|
+
/**
|
|
4129
|
+
* The customer external unique identifier (provided by your own application)
|
|
4130
|
+
* @example "hooli_1234"
|
|
4131
|
+
*/
|
|
4132
|
+
external_customer_id: string;
|
|
4133
|
+
/**
|
|
4134
|
+
* The status of the wallet. Possible values are `active` or `terminated`.
|
|
4135
|
+
* @example "active"
|
|
4136
|
+
*/
|
|
4137
|
+
status: "active" | "terminated";
|
|
4138
|
+
/**
|
|
4139
|
+
* The currency of the wallet.
|
|
4140
|
+
* @example "USD"
|
|
4141
|
+
*/
|
|
4142
|
+
currency: Currency;
|
|
4143
|
+
/**
|
|
4144
|
+
* The name of the wallet.
|
|
4145
|
+
* @example "Prepaid"
|
|
4146
|
+
*/
|
|
4147
|
+
name?: string | null;
|
|
4148
|
+
/**
|
|
4149
|
+
* The code of the wallet.
|
|
4150
|
+
* @example "prepaid"
|
|
4151
|
+
*/
|
|
4152
|
+
code?: string | null;
|
|
4153
|
+
/**
|
|
4154
|
+
* Wallet priority for ordering when a customer has multiple wallets. Allowed values: 1-50, where 1 is highest priority and 50 is lowest. Defaults to 50.
|
|
4155
|
+
* @min 1
|
|
4156
|
+
* @max 50
|
|
4157
|
+
* @example 50
|
|
4158
|
+
*/
|
|
4159
|
+
priority?: number;
|
|
4160
|
+
/**
|
|
4161
|
+
* The rate of conversion between credits and the amount in the specified currency. It indicates the ratio or factor used to convert credits into the corresponding monetary value in the currency of the transaction.
|
|
4162
|
+
* @pattern ^[0-9]+.?[0-9]*$
|
|
4163
|
+
* @example "1.5"
|
|
4164
|
+
*/
|
|
4165
|
+
rate_amount: string;
|
|
4166
|
+
/**
|
|
4167
|
+
* The current wallet balance expressed in credits. This reflects the available balance after all transactions are settled.
|
|
4168
|
+
* @pattern ^[0-9]+.?[0-9]*$
|
|
4169
|
+
* @example "28.0"
|
|
4170
|
+
*/
|
|
4171
|
+
credits_balance: string;
|
|
4172
|
+
/**
|
|
4173
|
+
* The current wallet balance expressed in cents. This reflects the available balance after all transactions are settled.
|
|
4174
|
+
* @example 1000
|
|
4175
|
+
*/
|
|
4176
|
+
balance_cents: number;
|
|
4177
|
+
/**
|
|
4178
|
+
* The number of consumed credits.
|
|
4179
|
+
* @pattern ^[0-9]+.?[0-9]*$
|
|
4180
|
+
* @example "2.0"
|
|
4181
|
+
*/
|
|
4182
|
+
consumed_credits: string;
|
|
4183
|
+
/**
|
|
4184
|
+
* The date of the wallet creation, represented in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC).
|
|
4185
|
+
* @format date-time
|
|
4186
|
+
* @example "2022-04-29T08:59:51Z"
|
|
4187
|
+
*/
|
|
4188
|
+
created_at: string;
|
|
4189
|
+
/**
|
|
4190
|
+
* The date and time that determines when the wallet will expire. It follows the ISO 8601 datetime format and is expressed in Coordinated Universal Time (UTC).
|
|
4191
|
+
* @format date-time
|
|
4192
|
+
* @example null
|
|
4193
|
+
*/
|
|
4194
|
+
expiration_at?: string | null;
|
|
4195
|
+
/**
|
|
4196
|
+
* The date and time of the last balance top-up. It follows the ISO 8601 datetime format and is expressed in Coordinated Universal Time (UTC).
|
|
4197
|
+
* @format date-time
|
|
4198
|
+
* @example "2022-04-29T08:59:51Z"
|
|
4199
|
+
*/
|
|
4200
|
+
last_balance_sync_at?: string | null;
|
|
4201
|
+
/**
|
|
4202
|
+
* The date and time of the last credits consumption. It follows the ISO 8601 datetime format and is expressed in Coordinated Universal Time (UTC).
|
|
4203
|
+
* @format date-time
|
|
4204
|
+
* @example "2022-04-29T08:59:51Z"
|
|
4205
|
+
*/
|
|
4206
|
+
last_consumed_credit_at?: string | null;
|
|
4207
|
+
/**
|
|
4208
|
+
* The date of terminaison of the wallet. It follows the ISO 8601 datetime format and is expressed in Coordinated Universal Time (UTC).
|
|
4209
|
+
* @format date-time
|
|
4210
|
+
* @example "2022-09-14T16:35:31Z"
|
|
4211
|
+
*/
|
|
4212
|
+
terminated_at?: string | null;
|
|
4213
|
+
/**
|
|
4214
|
+
* 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.
|
|
4215
|
+
* @example false
|
|
4216
|
+
*/
|
|
4217
|
+
invoice_requires_successful_payment: boolean;
|
|
4218
|
+
/** Set wallet limitations to fee types. */
|
|
4219
|
+
applies_to?: {
|
|
4220
|
+
/**
|
|
4221
|
+
* An array of fee types to which the wallet is applicable. By specifying the fee types in this field, you can restrict the wallet's usage to specific fee types only.
|
|
4222
|
+
* @example ["charge"]
|
|
4223
|
+
*/
|
|
4224
|
+
fee_types?: ("charge" | "subscription" | "commitment")[];
|
|
4225
|
+
/**
|
|
4226
|
+
* An array of billable metric codes to which the wallet is applicable. By specifying the billable metric codes in this field, you can restrict the wallet's usage to specific metrics only.
|
|
4227
|
+
* @example ["bm1"]
|
|
4228
|
+
*/
|
|
4229
|
+
billable_metric_codes?: string[];
|
|
4230
|
+
};
|
|
4231
|
+
/** List of recurring transaction rules. Currently, we only allow one recurring rule per wallet. */
|
|
4232
|
+
recurring_transaction_rules?: WalletRecurringTransactionRule[];
|
|
4233
|
+
/**
|
|
4234
|
+
* The ongoing wallet balance expressed in cents. This represents the `balance_cents` minus the `ongoing_usage_balance_cents`, showing the real time balance after accounting for current usage including taxes.
|
|
4235
|
+
* @example 800
|
|
4236
|
+
*/
|
|
4237
|
+
ongoing_balance_cents: number;
|
|
4238
|
+
/**
|
|
4239
|
+
* The ongoing usage balance of the wallet, expressed in cents. This reflects all current usage and draft invoices including taxes.
|
|
4240
|
+
* @example 200
|
|
4241
|
+
*/
|
|
4242
|
+
ongoing_usage_balance_cents: number;
|
|
4243
|
+
/**
|
|
4244
|
+
* The ongoing wallet balance expressed in credits. This represents the `credits_balance` minus the `credits_ongoing_usage_balance`, showing the real time balance after accounting for current usage including taxes.
|
|
4245
|
+
* @pattern ^[0-9]+.?[0-9]*$
|
|
4246
|
+
* @example "8.0"
|
|
4247
|
+
*/
|
|
4248
|
+
credits_ongoing_balance: string;
|
|
4249
|
+
/**
|
|
4250
|
+
* The ongoing usage balance of the wallet, expressed in credits. This reflects all current usage and draft invoices including taxes.
|
|
4251
|
+
* @pattern ^[0-9]+.?[0-9]*$
|
|
4252
|
+
* @example "2.0"
|
|
4253
|
+
*/
|
|
4254
|
+
credits_ongoing_usage_balance: string;
|
|
4255
|
+
/**
|
|
4256
|
+
* Minimum amount of cents that can be top-up with a single paid transaction.
|
|
4257
|
+
* @example 100
|
|
4258
|
+
*/
|
|
4259
|
+
paid_top_up_min_amount_cents?: number | null;
|
|
4260
|
+
/**
|
|
4261
|
+
* Maximum amount of cents that can be top-up with a single paid transaction.
|
|
4262
|
+
* @example 1000
|
|
4263
|
+
*/
|
|
4264
|
+
paid_top_up_max_amount_cents?: number | null;
|
|
4265
|
+
/** The invoice custom sections applied to invoices generated by this wallet. */
|
|
4266
|
+
applied_invoice_custom_sections?: AppliedInvoiceCustomSectionObject[];
|
|
4267
|
+
/** The payment method assigned to this wallet for processing top-up payments. */
|
|
4268
|
+
payment_method?: PaymentMethodReference;
|
|
4269
|
+
/**
|
|
4270
|
+
* Custom metadata stored as key-value pairs.
|
|
4271
|
+
* Keys are strings (max 100 characters), values can be strings (max 255 characters) or null.
|
|
4272
|
+
*/
|
|
4273
|
+
metadata?: MetadataObject;
|
|
4274
|
+
}
|
|
4275
|
+
export interface WalletsPaginated {
|
|
4276
|
+
wallets: WalletObject[];
|
|
4277
|
+
meta: PaginationMeta;
|
|
4278
|
+
}
|
|
4279
|
+
/** Configuration for invoice custom sections to apply to invoices generated by this resource. */
|
|
4280
|
+
export interface InvoiceCustomSectionInput {
|
|
4281
|
+
/**
|
|
4282
|
+
* Set to `true` to exclude all invoice custom sections from PDF generation for invoices related to this resource. When `true`, `invoice_custom_section_codes` is ignored.
|
|
4283
|
+
* @example false
|
|
4284
|
+
*/
|
|
4285
|
+
skip_invoice_custom_sections?: boolean;
|
|
4286
|
+
/**
|
|
4287
|
+
* List of unique codes identifying the invoice custom sections to apply. These override the default invoice custom sections configured at the customer or billing entity level.
|
|
4288
|
+
* @example ["eu_bank_details"]
|
|
4289
|
+
*/
|
|
4290
|
+
invoice_custom_section_codes?: string[];
|
|
4291
|
+
}
|
|
4292
|
+
export interface WalletCreateInput {
|
|
4293
|
+
wallet?: {
|
|
4294
|
+
/**
|
|
4295
|
+
* The name of the wallet.
|
|
4296
|
+
* @example "Prepaid"
|
|
4297
|
+
*/
|
|
4298
|
+
name?: string | null;
|
|
4299
|
+
/**
|
|
4300
|
+
* The code of the wallet.
|
|
4301
|
+
* @example "prepaid"
|
|
4302
|
+
*/
|
|
4303
|
+
code?: string | null;
|
|
4304
|
+
/**
|
|
4305
|
+
* Wallet priority for ordering when a customer has multiple wallets. Allowed values: 1-50, where 1 is highest priority and 50 is lowest. Defaults to 50.
|
|
4306
|
+
* @min 1
|
|
4307
|
+
* @max 50
|
|
4308
|
+
* @example 50
|
|
4309
|
+
*/
|
|
4310
|
+
priority?: number;
|
|
4311
|
+
/**
|
|
4312
|
+
* The rate of conversion between credits and the amount in the specified currency. It indicates the ratio or factor used to convert credits into the corresponding monetary value in the currency of the transaction.
|
|
4313
|
+
* @pattern ^[0-9]+.?[0-9]*$
|
|
4314
|
+
* @example "1.5"
|
|
4315
|
+
*/
|
|
4316
|
+
rate_amount: string;
|
|
4317
|
+
/**
|
|
4318
|
+
* The currency of the wallet.
|
|
4319
|
+
* @example "USD"
|
|
4320
|
+
*/
|
|
4321
|
+
currency: Currency;
|
|
4322
|
+
/**
|
|
4323
|
+
* The number of paid credits. Required only if there is no granted credits.
|
|
4324
|
+
* @pattern ^[0-9]+.?[0-9]*$
|
|
4325
|
+
* @example "20.0"
|
|
4326
|
+
*/
|
|
4327
|
+
paid_credits?: string | null;
|
|
4328
|
+
/**
|
|
4329
|
+
* The number of free granted credits. Required only if there is no paid credits.
|
|
4330
|
+
* @pattern ^[0-9]+.?[0-9]*$
|
|
4331
|
+
* @example "10.0"
|
|
4332
|
+
*/
|
|
4333
|
+
granted_credits?: string | null;
|
|
4334
|
+
/**
|
|
4335
|
+
* The customer external unique identifier (provided by your own application)
|
|
4336
|
+
* @example "hooli_1234"
|
|
4337
|
+
*/
|
|
4338
|
+
external_customer_id: string;
|
|
4339
|
+
/**
|
|
4340
|
+
* The date and time that determines when the wallet will expire. It follows the ISO 8601 datetime format and is expressed in Coordinated Universal Time (UTC).
|
|
4341
|
+
* @format date-time
|
|
4342
|
+
* @example "2022-07-07T23:59:59Z"
|
|
4343
|
+
*/
|
|
4344
|
+
expiration_at?: string | null;
|
|
4345
|
+
/**
|
|
4346
|
+
* 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.
|
|
4347
|
+
* @example false
|
|
4348
|
+
*/
|
|
4349
|
+
invoice_requires_successful_payment?: boolean;
|
|
4350
|
+
/**
|
|
4351
|
+
* 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.
|
|
4352
|
+
* @example [{"key":"example_key","value":"example_value"},{"key":"another_key","value":"another_value"}]
|
|
4353
|
+
*/
|
|
4354
|
+
transaction_metadata?: any[] | null;
|
|
4355
|
+
/**
|
|
4356
|
+
* The name of the wallet transactions triggered when creating the wallet. It will appear on the invoice as the label for the fee. If not set, the label on the invoice will fallback to either `Prepaid credits - {{wallet_name}}` if the wallet name is set, or `Prepaid credits`.
|
|
4357
|
+
* @example "Tokens for models 'high-fidelity-boost'"
|
|
4358
|
+
*/
|
|
4359
|
+
transaction_name?: string | null;
|
|
4360
|
+
/** Set wallet limitations to fee types. */
|
|
4361
|
+
applies_to?: {
|
|
4362
|
+
/**
|
|
4363
|
+
* An array of fee types to which the wallet is applicable. By specifying the fee types in this field, you can restrict the wallet's usage to specific fee types only.
|
|
4364
|
+
* @example ["charge"]
|
|
4365
|
+
*/
|
|
4366
|
+
fee_types?: any[] | null;
|
|
4367
|
+
/**
|
|
4368
|
+
* An array of billable metric codes to which the wallet is applicable. By specifying the billable metric codes in this field, you can restrict the wallet's usage to specific metrics only.
|
|
4369
|
+
* @example []
|
|
4370
|
+
*/
|
|
4371
|
+
billable_metric_codes?: any[] | null;
|
|
4372
|
+
};
|
|
4373
|
+
/**
|
|
4374
|
+
* Minimum amount of cents that can be top-up with a single paid transaction.
|
|
4375
|
+
* @example 100
|
|
4376
|
+
*/
|
|
4377
|
+
paid_top_up_min_amount_cents?: number | null;
|
|
4378
|
+
/**
|
|
4379
|
+
* Maximum amount of cents that can be top-up with a single paid transaction.
|
|
4380
|
+
* @example 1000
|
|
4381
|
+
*/
|
|
4382
|
+
paid_top_up_max_amount_cents?: number | null;
|
|
4383
|
+
/**
|
|
4384
|
+
* If set to true, the wallet will ignore paid top-up limits on creation.
|
|
4385
|
+
* @example false
|
|
4386
|
+
*/
|
|
4387
|
+
ignore_paid_top_up_limits_on_creation?: boolean | null;
|
|
4388
|
+
/** Configuration for invoice custom sections to apply to invoices generated by this resource. */
|
|
4389
|
+
invoice_custom_section?: InvoiceCustomSectionInput;
|
|
4390
|
+
/** List of recurring transaction rules. Currently, we only allow one recurring rule per wallet. */
|
|
4391
|
+
recurring_transaction_rules?: any[] | null;
|
|
4392
|
+
/** Optional payment method to use for processing wallet top-up payments. */
|
|
4393
|
+
payment_method?: PaymentMethodReference;
|
|
4394
|
+
/** Metadata to set as key-value pairs. Keys are strings (max 100 characters), values can be strings (max 255 characters) or null. */
|
|
4395
|
+
metadata?: MetadataInput;
|
|
4396
|
+
};
|
|
4397
|
+
}
|
|
4398
|
+
export interface Wallet {
|
|
4399
|
+
wallet: WalletObject;
|
|
4400
|
+
}
|
|
4401
|
+
export interface WalletUpdateInput {
|
|
4402
|
+
wallet: {
|
|
4403
|
+
/**
|
|
4404
|
+
* The name of the wallet.
|
|
4405
|
+
* @example "new_name"
|
|
4406
|
+
*/
|
|
4407
|
+
name?: string | null;
|
|
4408
|
+
/**
|
|
4409
|
+
* The code of the wallet.
|
|
4410
|
+
* @example "prepaid"
|
|
4411
|
+
*/
|
|
4412
|
+
code?: string | null;
|
|
4413
|
+
/**
|
|
4414
|
+
* Wallet priority for ordering when a customer has multiple wallets. Allowed values: 1-50, where 1 is highest priority and 50 is lowest. Defaults to 50.
|
|
4415
|
+
* @min 1
|
|
4416
|
+
* @max 50
|
|
4417
|
+
* @example 50
|
|
4418
|
+
*/
|
|
4419
|
+
priority?: number;
|
|
4420
|
+
/**
|
|
4421
|
+
* The date and time that determines when the wallet will expire. It follows the ISO 8601 datetime format and is expressed in Coordinated Universal Time (UTC).
|
|
4422
|
+
* @format date-time
|
|
4423
|
+
* @example "2022-07-07T23:59:59Z"
|
|
4424
|
+
*/
|
|
4425
|
+
expiration_at?: string | null;
|
|
4426
|
+
/**
|
|
4427
|
+
* 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.
|
|
4428
|
+
* @example false
|
|
4429
|
+
*/
|
|
4430
|
+
invoice_requires_successful_payment?: boolean;
|
|
4431
|
+
/** Configuration for invoice custom sections to apply to invoices generated by this resource. */
|
|
4432
|
+
invoice_custom_section?: InvoiceCustomSectionInput;
|
|
4433
|
+
/** List of recurring transaction rules. Currently, we only allow one recurring rule per wallet. */
|
|
4434
|
+
recurring_transaction_rules?: {
|
|
4435
|
+
/**
|
|
4436
|
+
* A unique identifier for the recurring transaction rule in the Lago application. Can be used to update a recurring transaction rule.
|
|
4437
|
+
* @format uuid
|
|
4438
|
+
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
4439
|
+
*/
|
|
4440
|
+
lago_id?: string;
|
|
4441
|
+
/**
|
|
4442
|
+
* The trigger. Possible values are `interval` or `threshold`.
|
|
4443
|
+
* @example "interval"
|
|
4444
|
+
*/
|
|
4445
|
+
trigger?: "interval" | "threshold";
|
|
4446
|
+
/**
|
|
4447
|
+
* The method used for recurring top-up. Possible values are `fixed` or `target`.
|
|
4448
|
+
* @example "target"
|
|
4449
|
+
*/
|
|
4450
|
+
method?: "fixed" | "target";
|
|
4451
|
+
/**
|
|
4452
|
+
* The interval used for recurring top-up. It represents the frequency at which automatic top-up occurs. The interval can be one of the following values: `weekly`, `monthly`, `quarterly`, `semiannual` or `yearly`. Required only when trigger is set to `interval`.
|
|
4453
|
+
* @example "monthly"
|
|
4454
|
+
*/
|
|
4455
|
+
interval?: "weekly" | "monthly" | "quarterly" | "semiannual" | "yearly";
|
|
4456
|
+
/**
|
|
4457
|
+
* The threshold for recurring top-ups is the value at which an automatic top-up is triggered. For example, if this threshold is set at 10 credits, an automatic top-up will occur whenever the wallet balance falls to or below 10 credits. Required only when trigger is set to `threshold`.
|
|
4458
|
+
* @pattern ^[0-9]+.?[0-9]*$
|
|
4459
|
+
* @example "20.0"
|
|
4460
|
+
*/
|
|
4461
|
+
threshold_credits?: string;
|
|
4462
|
+
/**
|
|
4463
|
+
* The number of paid credits. Required only if there is no granted credits.
|
|
4464
|
+
* @pattern ^[0-9]+.?[0-9]*$
|
|
4465
|
+
* @example "20.0"
|
|
4466
|
+
*/
|
|
4467
|
+
paid_credits?: string | null;
|
|
4468
|
+
/**
|
|
4469
|
+
* The number of free granted credits. Required only if there is no paid credits.
|
|
4470
|
+
* @pattern ^[0-9]+.?[0-9]*$
|
|
4471
|
+
* @example "10.0"
|
|
4472
|
+
*/
|
|
4473
|
+
granted_credits?: string | null;
|
|
4474
|
+
/**
|
|
4475
|
+
* The effective start date for recurring top-ups. This date should be provided in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC).
|
|
4476
|
+
* @format date-time
|
|
4477
|
+
* @example "2022-08-08T00:00:00Z"
|
|
4478
|
+
*/
|
|
4479
|
+
started_at?: string | null;
|
|
4480
|
+
/**
|
|
4481
|
+
* The expiration date and time for this specific recurring transaction rule. It follows the ISO 8601 datetime format and is expressed in Coordinated Universal Time (UTC).
|
|
4482
|
+
* @format date-time
|
|
4483
|
+
* @example "2023-09-30T23:59:59Z"
|
|
4484
|
+
*/
|
|
4485
|
+
expiration_at?: string | null;
|
|
4486
|
+
/**
|
|
4487
|
+
* The target ongoing balance is the value set for the ongoing balance to be reached by the automatic top-up. Required only when trigger is set to `target`.
|
|
4488
|
+
* @pattern ^[0-9]+.?[0-9]*$
|
|
4489
|
+
* @example "200.0"
|
|
4490
|
+
*/
|
|
4491
|
+
target_ongoing_balance?: string;
|
|
4492
|
+
/**
|
|
4493
|
+
* 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.
|
|
4494
|
+
* @example false
|
|
4495
|
+
*/
|
|
4496
|
+
invoice_requires_successful_payment?: boolean;
|
|
4497
|
+
/**
|
|
4498
|
+
* 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.
|
|
4499
|
+
* @example [{"key":"example_key","value":"example_value"},{"key":"another_key","value":"another_value"}]
|
|
4500
|
+
*/
|
|
4501
|
+
transaction_metadata?: {
|
|
4502
|
+
/** The unique identifier for the attribute. */
|
|
4503
|
+
key?: string;
|
|
4504
|
+
/** The value associated with the key. */
|
|
4505
|
+
value?: string;
|
|
4506
|
+
}[];
|
|
4507
|
+
/**
|
|
4508
|
+
* The name of the wallet transactions triggered by this rule. It will appear on the invoice as the label for the fee. If not set, the label on the invoice will fallback to either `Prepaid credits - {{wallet_name}}` if the wallet name is set, or `Prepaid credits`.
|
|
4509
|
+
* @example "Tokens for models 'high-fidelity-boost'"
|
|
4510
|
+
*/
|
|
4511
|
+
transaction_name?: string | null;
|
|
4512
|
+
/** Configuration for invoice custom sections to apply to invoices generated by this resource. */
|
|
4513
|
+
invoice_custom_section?: InvoiceCustomSectionInput;
|
|
4514
|
+
/** Optional payment method to use for processing recurring top-up payments. */
|
|
4515
|
+
payment_method?: PaymentMethodReference;
|
|
4516
|
+
}[];
|
|
4517
|
+
/** Optional payment method to use for processing wallet top-up payments. */
|
|
4518
|
+
payment_method?: PaymentMethodReference;
|
|
4519
|
+
/** Set wallet limitations to fee types. */
|
|
4520
|
+
applies_to?: {
|
|
4521
|
+
/**
|
|
4522
|
+
* An array of fee types to which the wallet is applicable. By specifying the fee types in this field, you can restrict the wallet's usage to specific fee types only.
|
|
4523
|
+
* @example ["charge"]
|
|
4524
|
+
*/
|
|
4525
|
+
fee_types?: any[] | null;
|
|
4526
|
+
/**
|
|
4527
|
+
* An array of billable metric codes to which the wallet is applicable. By specifying the billable metric codes in this field, you can restrict the wallet's usage to specific metrics only.
|
|
4528
|
+
* @example []
|
|
4529
|
+
*/
|
|
4530
|
+
billable_metric_codes?: any[] | null;
|
|
4531
|
+
};
|
|
4532
|
+
/** Metadata to set as key-value pairs. Keys are strings (max 100 characters), values can be strings (max 255 characters) or null. */
|
|
4533
|
+
metadata?: MetadataInput;
|
|
4534
|
+
};
|
|
4535
|
+
}
|
|
4536
|
+
export interface WalletMetadataResponse {
|
|
4537
|
+
/**
|
|
4538
|
+
* Custom metadata stored as key-value pairs.
|
|
4539
|
+
* Keys are strings (max 100 characters), values can be strings (max 255 characters) or null.
|
|
3985
4540
|
*/
|
|
3986
|
-
|
|
4541
|
+
metadata: MetadataObject;
|
|
4542
|
+
}
|
|
4543
|
+
export interface AlertThresholdBaseObject {
|
|
3987
4544
|
/**
|
|
3988
|
-
*
|
|
3989
|
-
* @
|
|
3990
|
-
* @example "2023-09-30T23:59:59Z"
|
|
4545
|
+
* Unique identifier of the usage threshold created by Lago.
|
|
4546
|
+
* @example "warn"
|
|
3991
4547
|
*/
|
|
3992
|
-
|
|
4548
|
+
code?: string | null;
|
|
3993
4549
|
/**
|
|
3994
|
-
*
|
|
4550
|
+
* This field when set to `true` indicates that the alert will be retrigger when this threshold is reached after the last non-recurring threshold. Only one recurring threshold per alert allowed.
|
|
4551
|
+
* @default false
|
|
3995
4552
|
* @example false
|
|
3996
4553
|
*/
|
|
3997
|
-
|
|
3998
|
-
|
|
3999
|
-
|
|
4000
|
-
* @example [{"key":"example_key","value":"example_value"},{"key":"another_key","value":"another_value"}]
|
|
4001
|
-
*/
|
|
4002
|
-
transaction_metadata: {
|
|
4003
|
-
/** The unique identifier for the attribute. */
|
|
4004
|
-
key?: string;
|
|
4005
|
-
/** The value associated with the key. */
|
|
4006
|
-
value?: string;
|
|
4007
|
-
}[];
|
|
4008
|
-
/**
|
|
4009
|
-
* The name of the wallet transactions triggered by this rule. It will appear on the invoice as the label for the fee. If not set, the label on the invoice will fallback to either `Prepaid credits - {{wallet_name}}` if the wallet name is set, or `Prepaid credits`.
|
|
4010
|
-
* @example "Tokens for models 'high-fidelity-boost'"
|
|
4011
|
-
*/
|
|
4012
|
-
transaction_name: string | null;
|
|
4554
|
+
recurring?: boolean;
|
|
4555
|
+
}
|
|
4556
|
+
export type AlertThresholdObject = AlertThresholdBaseObject & {
|
|
4013
4557
|
/**
|
|
4014
|
-
*
|
|
4015
|
-
* @
|
|
4558
|
+
* A value that should trigger this alert, formatted as a BigDecimal.
|
|
4559
|
+
* @pattern ^[0-9]+.?[0-9]*$
|
|
4560
|
+
* @example "99.0"
|
|
4016
4561
|
*/
|
|
4017
|
-
|
|
4018
|
-
|
|
4019
|
-
|
|
4020
|
-
}
|
|
4021
|
-
export interface WalletObject {
|
|
4562
|
+
value: string;
|
|
4563
|
+
};
|
|
4564
|
+
export interface AlertObject {
|
|
4022
4565
|
/**
|
|
4023
|
-
* Unique identifier
|
|
4566
|
+
* Unique identifier of the alert, created by Lago.
|
|
4024
4567
|
* @format uuid
|
|
4025
4568
|
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
4026
4569
|
*/
|
|
4027
4570
|
lago_id: string;
|
|
4028
4571
|
/**
|
|
4029
|
-
* Unique identifier
|
|
4572
|
+
* Unique identifier of the organization, created by Lago.
|
|
4030
4573
|
* @format uuid
|
|
4031
4574
|
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
4032
4575
|
*/
|
|
4033
|
-
|
|
4576
|
+
lago_organization_id: string;
|
|
4034
4577
|
/**
|
|
4035
|
-
* The
|
|
4036
|
-
* @example "
|
|
4578
|
+
* The subscription external unique identifier (provided by your own application).
|
|
4579
|
+
* @example "sub_1234567890"
|
|
4037
4580
|
*/
|
|
4038
|
-
|
|
4581
|
+
external_subscription_id: string | null;
|
|
4039
4582
|
/**
|
|
4040
|
-
* The
|
|
4041
|
-
* @example "
|
|
4583
|
+
* The customer external unique identifier (provided by your own application).
|
|
4584
|
+
* @example "cus_0987654321"
|
|
4042
4585
|
*/
|
|
4043
|
-
|
|
4586
|
+
external_customer_id: string;
|
|
4044
4587
|
/**
|
|
4045
|
-
*
|
|
4046
|
-
* @example "
|
|
4588
|
+
* Unique identifier of the wallet, created by Lago.
|
|
4589
|
+
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
4047
4590
|
*/
|
|
4048
|
-
|
|
4591
|
+
lago_wallet_id?: string | null;
|
|
4049
4592
|
/**
|
|
4050
|
-
* The
|
|
4051
|
-
* @example "
|
|
4593
|
+
* The wallet external unique identifier (provided by your own application).
|
|
4594
|
+
* @example "wallet_code"
|
|
4052
4595
|
*/
|
|
4053
|
-
|
|
4596
|
+
wallet_code?: string | null;
|
|
4597
|
+
/** The billable metric associated with the alert. Only for alerts based on a billable metric. */
|
|
4598
|
+
billable_metric: BillableMetricObject;
|
|
4054
4599
|
/**
|
|
4055
|
-
* The
|
|
4056
|
-
* @example "
|
|
4600
|
+
* The type of alert.
|
|
4601
|
+
* @example "billable_metric_current_usage_amount"
|
|
4057
4602
|
*/
|
|
4058
|
-
|
|
4603
|
+
alert_type: "current_usage_amount" | "billable_metric_current_usage_amount" | "billable_metric_current_usage_units" | "lifetime_usage_amount";
|
|
4059
4604
|
/**
|
|
4060
|
-
*
|
|
4061
|
-
* @
|
|
4062
|
-
* @max 50
|
|
4063
|
-
* @example 50
|
|
4605
|
+
* Unique code used to identify the alert.
|
|
4606
|
+
* @example "storage_threshold_alert"
|
|
4064
4607
|
*/
|
|
4065
|
-
|
|
4608
|
+
code: string;
|
|
4066
4609
|
/**
|
|
4067
|
-
* The
|
|
4068
|
-
* @
|
|
4069
|
-
* @example "1.5"
|
|
4610
|
+
* The name of the alert.
|
|
4611
|
+
* @example "Storage Usage Alert"
|
|
4070
4612
|
*/
|
|
4071
|
-
|
|
4613
|
+
name: string | null;
|
|
4072
4614
|
/**
|
|
4073
|
-
*
|
|
4074
|
-
* @
|
|
4075
|
-
* @example "28.0"
|
|
4615
|
+
* Indicates whether the alert is triggered when the monitored metric goes above or below the threshold.
|
|
4616
|
+
* @example "increasing"
|
|
4076
4617
|
*/
|
|
4077
|
-
|
|
4618
|
+
direction?: "increasing" | "decreasing";
|
|
4078
4619
|
/**
|
|
4079
|
-
*
|
|
4620
|
+
* When the system checked if this alert should be triggered, this value was retrieved and checked against the thresholds.
|
|
4080
4621
|
* @example 1000
|
|
4081
4622
|
*/
|
|
4082
|
-
|
|
4083
|
-
/**
|
|
4084
|
-
* The number of consumed credits.
|
|
4085
|
-
* @pattern ^[0-9]+.?[0-9]*$
|
|
4086
|
-
* @example "2.0"
|
|
4087
|
-
*/
|
|
4088
|
-
consumed_credits: string;
|
|
4089
|
-
/**
|
|
4090
|
-
* The date of the wallet creation, represented in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC).
|
|
4091
|
-
* @format date-time
|
|
4092
|
-
* @example "2022-04-29T08:59:51Z"
|
|
4093
|
-
*/
|
|
4094
|
-
created_at: string;
|
|
4623
|
+
previous_value: number;
|
|
4095
4624
|
/**
|
|
4096
|
-
* The date and time
|
|
4625
|
+
* The date and time in UTC (ISO 8601) when the system checked if this alert should be triggered. Null until it's processed for the first time.
|
|
4097
4626
|
* @format date-time
|
|
4098
|
-
* @example
|
|
4627
|
+
* @example "2025-05-19T10:04:21Z"
|
|
4099
4628
|
*/
|
|
4100
|
-
|
|
4629
|
+
last_processed_at: string | null;
|
|
4630
|
+
/** Array of thresholds associated with the alert. */
|
|
4631
|
+
thresholds: AlertThresholdObject[];
|
|
4101
4632
|
/**
|
|
4102
|
-
* The date and time
|
|
4633
|
+
* The date and time in UTC (ISO 8601) when the alert was created.
|
|
4103
4634
|
* @format date-time
|
|
4104
|
-
* @example "
|
|
4635
|
+
* @example "2025-03-20T10:00:00Z"
|
|
4105
4636
|
*/
|
|
4106
|
-
|
|
4637
|
+
created_at: string;
|
|
4638
|
+
}
|
|
4639
|
+
export interface Alerts {
|
|
4640
|
+
alerts: AlertObject[];
|
|
4641
|
+
meta?: PaginationMeta;
|
|
4642
|
+
}
|
|
4643
|
+
export type AlertThresholdInput = AlertThresholdBaseObject & {
|
|
4107
4644
|
/**
|
|
4108
|
-
*
|
|
4109
|
-
* @
|
|
4110
|
-
* @example "2022-04-29T08:59:51Z"
|
|
4645
|
+
* A value that should trigger this alert. This can be an integer or a string formatted as a BigDecimal.
|
|
4646
|
+
* @example 99
|
|
4111
4647
|
*/
|
|
4112
|
-
|
|
4648
|
+
value: number | string;
|
|
4649
|
+
};
|
|
4650
|
+
export interface AlertBaseInput {
|
|
4113
4651
|
/**
|
|
4114
|
-
*
|
|
4115
|
-
* @
|
|
4116
|
-
* @example "2022-09-14T16:35:31Z"
|
|
4652
|
+
* Unique code used to identify the alert.
|
|
4653
|
+
* @example "storage_threshold_alert"
|
|
4117
4654
|
*/
|
|
4118
|
-
|
|
4655
|
+
code?: string;
|
|
4119
4656
|
/**
|
|
4120
|
-
*
|
|
4121
|
-
* @example
|
|
4657
|
+
* The name of the alert.
|
|
4658
|
+
* @example "Storage Usage Alert"
|
|
4122
4659
|
*/
|
|
4123
|
-
|
|
4124
|
-
/**
|
|
4125
|
-
|
|
4660
|
+
name?: string | null;
|
|
4661
|
+
/** Array of thresholds associated with the alert. */
|
|
4662
|
+
thresholds?: AlertThresholdInput[];
|
|
4663
|
+
}
|
|
4664
|
+
export interface WalletAlertCreateInput {
|
|
4665
|
+
alert: AlertBaseInput & {
|
|
4126
4666
|
/**
|
|
4127
|
-
*
|
|
4128
|
-
* @example
|
|
4667
|
+
* The type of alert.
|
|
4668
|
+
* @example "wallet_balance_amount"
|
|
4129
4669
|
*/
|
|
4130
|
-
|
|
4670
|
+
alert_type: "wallet_balance_amount" | "wallet_credits_balance";
|
|
4131
4671
|
/**
|
|
4132
|
-
*
|
|
4133
|
-
* @example
|
|
4672
|
+
* Unique code used to identify the alert.
|
|
4673
|
+
* @example "wallet_balance_alert"
|
|
4134
4674
|
*/
|
|
4135
|
-
|
|
4675
|
+
code: string;
|
|
4676
|
+
/**
|
|
4677
|
+
* The name of the alert.
|
|
4678
|
+
* @example "Wallet Balance Alert"
|
|
4679
|
+
*/
|
|
4680
|
+
name?: string | null;
|
|
4136
4681
|
};
|
|
4137
|
-
/** List of recurring transaction rules. Currently, we only allow one recurring rule per wallet. */
|
|
4138
|
-
recurring_transaction_rules?: WalletRecurringTransactionRule[];
|
|
4139
|
-
/**
|
|
4140
|
-
* The ongoing wallet balance expressed in cents. This represents the `balance_cents` minus the `ongoing_usage_balance_cents`, showing the real time balance after accounting for current usage including taxes.
|
|
4141
|
-
* @example 800
|
|
4142
|
-
*/
|
|
4143
|
-
ongoing_balance_cents: number;
|
|
4144
|
-
/**
|
|
4145
|
-
* The ongoing usage balance of the wallet, expressed in cents. This reflects all current usage and draft invoices including taxes.
|
|
4146
|
-
* @example 200
|
|
4147
|
-
*/
|
|
4148
|
-
ongoing_usage_balance_cents: number;
|
|
4149
|
-
/**
|
|
4150
|
-
* The ongoing wallet balance expressed in credits. This represents the `credits_balance` minus the `credits_ongoing_usage_balance`, showing the real time balance after accounting for current usage including taxes.
|
|
4151
|
-
* @pattern ^[0-9]+.?[0-9]*$
|
|
4152
|
-
* @example "8.0"
|
|
4153
|
-
*/
|
|
4154
|
-
credits_ongoing_balance: string;
|
|
4155
|
-
/**
|
|
4156
|
-
* The ongoing usage balance of the wallet, expressed in credits. This reflects all current usage and draft invoices including taxes.
|
|
4157
|
-
* @pattern ^[0-9]+.?[0-9]*$
|
|
4158
|
-
* @example "2.0"
|
|
4159
|
-
*/
|
|
4160
|
-
credits_ongoing_usage_balance: string;
|
|
4161
|
-
/**
|
|
4162
|
-
* Minimum amount of cents that can be top-up with a single paid transaction.
|
|
4163
|
-
* @example 100
|
|
4164
|
-
*/
|
|
4165
|
-
paid_top_up_min_amount_cents?: number | null;
|
|
4166
|
-
/**
|
|
4167
|
-
* Maximum amount of cents that can be top-up with a single paid transaction.
|
|
4168
|
-
* @example 1000
|
|
4169
|
-
*/
|
|
4170
|
-
paid_top_up_max_amount_cents?: number | null;
|
|
4171
|
-
/** The payment method assigned to this wallet for processing top-up payments. */
|
|
4172
|
-
payment_method?: PaymentMethodReference;
|
|
4173
|
-
/**
|
|
4174
|
-
* Custom metadata stored as key-value pairs.
|
|
4175
|
-
* Keys are strings (max 100 characters), values can be strings (max 255 characters) or null.
|
|
4176
|
-
*/
|
|
4177
|
-
metadata?: MetadataObject;
|
|
4178
4682
|
}
|
|
4179
|
-
export interface
|
|
4180
|
-
|
|
4181
|
-
|
|
4683
|
+
export interface WalletAlertBatchCreateInput {
|
|
4684
|
+
/** Array of alerts to create. All alerts are created atomically - if any fail validation, none are created. */
|
|
4685
|
+
alerts: (AlertBaseInput & {
|
|
4686
|
+
/**
|
|
4687
|
+
* The type of alert.
|
|
4688
|
+
* @example "wallet_balance_amount"
|
|
4689
|
+
*/
|
|
4690
|
+
alert_type: "wallet_balance_amount" | "wallet_credits_balance";
|
|
4691
|
+
/**
|
|
4692
|
+
* Unique code used to identify the alert.
|
|
4693
|
+
* @example "wallet_balance_alert"
|
|
4694
|
+
*/
|
|
4695
|
+
code: string;
|
|
4696
|
+
/**
|
|
4697
|
+
* The name of the alert.
|
|
4698
|
+
* @example "Wallet Balance Alert"
|
|
4699
|
+
*/
|
|
4700
|
+
name?: string | null;
|
|
4701
|
+
})[];
|
|
4702
|
+
}
|
|
4703
|
+
export interface Alert {
|
|
4704
|
+
alert: AlertObject;
|
|
4705
|
+
}
|
|
4706
|
+
export interface WalletAlertUpdateInput {
|
|
4707
|
+
alert: AlertBaseInput & {
|
|
4708
|
+
/**
|
|
4709
|
+
* Unique code used to identify the alert.
|
|
4710
|
+
* @example "wallet_balance_alert"
|
|
4711
|
+
*/
|
|
4712
|
+
code?: string;
|
|
4713
|
+
/**
|
|
4714
|
+
* The name of the alert.
|
|
4715
|
+
* @example "Wallet Balance Alert"
|
|
4716
|
+
*/
|
|
4717
|
+
name?: string | null;
|
|
4718
|
+
};
|
|
4182
4719
|
}
|
|
4183
4720
|
/** Details about the pricing unit used for charge usage. */
|
|
4184
4721
|
export interface UsagePricingUnitDetailsObject {
|
|
@@ -4960,28 +5497,12 @@ export interface InvoiceOneOffCreateInput {
|
|
|
4960
5497
|
*/
|
|
4961
5498
|
skip_psp?: boolean | null;
|
|
4962
5499
|
}[];
|
|
5500
|
+
/** Configuration for invoice custom sections to apply to invoices generated by this resource. */
|
|
5501
|
+
invoice_custom_section?: InvoiceCustomSectionInput;
|
|
4963
5502
|
/** Optional payment method to use for processing the invoice payment. */
|
|
4964
5503
|
payment_method?: PaymentMethodReference;
|
|
4965
5504
|
};
|
|
4966
5505
|
}
|
|
4967
|
-
export interface ErrorDetailObject {
|
|
4968
|
-
/**
|
|
4969
|
-
* Unique identifier assigned to the error_detail within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the error's record within the Lago system.
|
|
4970
|
-
* @format uuid
|
|
4971
|
-
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
4972
|
-
*/
|
|
4973
|
-
lago_id: string | null;
|
|
4974
|
-
/**
|
|
4975
|
-
* Code that specifies part of the application / connection, where the error originally happened
|
|
4976
|
-
* @example "tax_error"
|
|
4977
|
-
*/
|
|
4978
|
-
error_code: string;
|
|
4979
|
-
/**
|
|
4980
|
-
* Key value list of more elaborated error detail, where by the key of error_code an external service error details are stored
|
|
4981
|
-
* @example {"tax_error":"taxDateTooFarInFuture"}
|
|
4982
|
-
*/
|
|
4983
|
-
details: object;
|
|
4984
|
-
}
|
|
4985
5506
|
export type InvoiceObjectExtended = InvoiceObject & {
|
|
4986
5507
|
credits?: CreditObject[];
|
|
4987
5508
|
fees?: FeeObject[];
|
|
@@ -5756,6 +6277,11 @@ export interface ChargeObject {
|
|
|
5756
6277
|
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
5757
6278
|
*/
|
|
5758
6279
|
lago_billable_metric_id: string;
|
|
6280
|
+
/**
|
|
6281
|
+
* Unique code identifying the charge within the plan.
|
|
6282
|
+
* @example "api_requests_charge"
|
|
6283
|
+
*/
|
|
6284
|
+
code?: string | null;
|
|
5759
6285
|
/**
|
|
5760
6286
|
* Unique code identifying a billable metric.
|
|
5761
6287
|
* @example "requests"
|
|
@@ -5765,7 +6291,7 @@ export interface ChargeObject {
|
|
|
5765
6291
|
* 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.
|
|
5766
6292
|
* @example "Setup"
|
|
5767
6293
|
*/
|
|
5768
|
-
invoice_display_name
|
|
6294
|
+
invoice_display_name?: string | null;
|
|
5769
6295
|
/**
|
|
5770
6296
|
* The date and time when the charge was created. It is expressed in UTC format according to the ISO 8601 datetime standard.
|
|
5771
6297
|
* @format date-time
|
|
@@ -5840,6 +6366,12 @@ export interface ChargeObject {
|
|
|
5840
6366
|
* @example false
|
|
5841
6367
|
*/
|
|
5842
6368
|
accepts_target_wallet?: boolean | null;
|
|
6369
|
+
/**
|
|
6370
|
+
* Unique identifier of the parent charge (if this is an override).
|
|
6371
|
+
* @format uuid
|
|
6372
|
+
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
6373
|
+
*/
|
|
6374
|
+
lago_parent_id?: string | null;
|
|
5843
6375
|
}
|
|
5844
6376
|
export interface FixedChargeProperties {
|
|
5845
6377
|
/**
|
|
@@ -5937,7 +6469,7 @@ export interface FixedChargeObject {
|
|
|
5937
6469
|
* Unique code for the fixed charge.
|
|
5938
6470
|
* @example "setup_fee"
|
|
5939
6471
|
*/
|
|
5940
|
-
code
|
|
6472
|
+
code: string;
|
|
5941
6473
|
/**
|
|
5942
6474
|
* The charge model for the fixed charge. Only `standard`, `graduated`, and `volume` models are supported for fixed charges.
|
|
5943
6475
|
* @example "standard"
|
|
@@ -6220,6 +6752,11 @@ export interface PlanCreateInput {
|
|
|
6220
6752
|
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
6221
6753
|
*/
|
|
6222
6754
|
billable_metric_id: string;
|
|
6755
|
+
/**
|
|
6756
|
+
* Unique code identifying the charge within the plan.
|
|
6757
|
+
* @example "api_requests_charge"
|
|
6758
|
+
*/
|
|
6759
|
+
code?: string;
|
|
6223
6760
|
/**
|
|
6224
6761
|
* Specifies the pricing model used for the calculation of the final fee. It can be any of the following values:
|
|
6225
6762
|
* - [`dynamic`](https://docs.getlago.com/guide/plans/charges/charge-models/dynamic)
|
|
@@ -6438,6 +6975,11 @@ export interface PlanUpdateInput {
|
|
|
6438
6975
|
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
6439
6976
|
*/
|
|
6440
6977
|
billable_metric_id?: string;
|
|
6978
|
+
/**
|
|
6979
|
+
* Unique code identifying the charge within the plan.
|
|
6980
|
+
* @example "api_requests_charge"
|
|
6981
|
+
*/
|
|
6982
|
+
code?: string;
|
|
6441
6983
|
/**
|
|
6442
6984
|
* Specifies the pricing model used for the calculation of the final fee. It can be any of the following values:
|
|
6443
6985
|
* - [`dynamic`](https://docs.getlago.com/guide/plans/charges/charge-models/dynamic)
|
|
@@ -6596,12 +7138,318 @@ export interface EntitlementUpdateInput {
|
|
|
6596
7138
|
*/
|
|
6597
7139
|
entitlements: Record<string, Record<string, number | boolean | string>>;
|
|
6598
7140
|
}
|
|
6599
|
-
export interface PlanMetadataResponse {
|
|
6600
|
-
/**
|
|
6601
|
-
* Custom metadata stored as key-value pairs.
|
|
6602
|
-
* Keys are strings (max 100 characters), values can be strings (max 255 characters) or null.
|
|
6603
|
-
*/
|
|
6604
|
-
metadata: MetadataObject;
|
|
7141
|
+
export interface PlanMetadataResponse {
|
|
7142
|
+
/**
|
|
7143
|
+
* Custom metadata stored as key-value pairs.
|
|
7144
|
+
* Keys are strings (max 100 characters), values can be strings (max 255 characters) or null.
|
|
7145
|
+
*/
|
|
7146
|
+
metadata: MetadataObject;
|
|
7147
|
+
}
|
|
7148
|
+
export interface ChargesPaginated {
|
|
7149
|
+
charges: ChargeObject[];
|
|
7150
|
+
meta: PaginationMeta;
|
|
7151
|
+
}
|
|
7152
|
+
/** Properties of a charge that can be overridden at the subscription level. */
|
|
7153
|
+
export interface ChargeOverridableInput {
|
|
7154
|
+
/**
|
|
7155
|
+
* 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.
|
|
7156
|
+
* @example "Setup"
|
|
7157
|
+
*/
|
|
7158
|
+
invoice_display_name?: string;
|
|
7159
|
+
/**
|
|
7160
|
+
* 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.
|
|
7161
|
+
* @example 0
|
|
7162
|
+
*/
|
|
7163
|
+
min_amount_cents?: number;
|
|
7164
|
+
/** List of all thresholds utilized for calculating the charge. */
|
|
7165
|
+
properties?: ChargeProperties;
|
|
7166
|
+
/** List of filters used to apply differentiated pricing based on additional event properties. */
|
|
7167
|
+
filters?: ChargeFilterInput[];
|
|
7168
|
+
/** List of unique code used to identify the taxes. */
|
|
7169
|
+
tax_codes?: TaxCodes;
|
|
7170
|
+
/** The pricing unit to apply to the charge. */
|
|
7171
|
+
applied_pricing_unit?: {
|
|
7172
|
+
/**
|
|
7173
|
+
* The code of the pricing unit.
|
|
7174
|
+
* @example "credits"
|
|
7175
|
+
*/
|
|
7176
|
+
code?: string;
|
|
7177
|
+
/**
|
|
7178
|
+
* The conversion rate from pricing units to the plan's currency.
|
|
7179
|
+
* This rate determines how many currency units (in the plan's base currency) equal one pricing unit.
|
|
7180
|
+
* For example, if the plan uses USD and the conversion rate is 0.5, then 1 pricing unit = $0.50.
|
|
7181
|
+
* @example "0.5"
|
|
7182
|
+
*/
|
|
7183
|
+
conversion_rate?: string;
|
|
7184
|
+
};
|
|
7185
|
+
}
|
|
7186
|
+
export type ChargeInput = ChargeOverridableInput & {
|
|
7187
|
+
/**
|
|
7188
|
+
* Unique identifier of the billable metric created by Lago.
|
|
7189
|
+
* @format uuid
|
|
7190
|
+
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
7191
|
+
*/
|
|
7192
|
+
billable_metric_id?: string;
|
|
7193
|
+
/**
|
|
7194
|
+
* Unique code identifying the charge within the plan.
|
|
7195
|
+
* @example "api_requests_charge"
|
|
7196
|
+
*/
|
|
7197
|
+
code?: string;
|
|
7198
|
+
/**
|
|
7199
|
+
* Specifies the pricing model used for the calculation of the final fee. It can be any of the following values:
|
|
7200
|
+
* - [`dynamic`](https://docs.getlago.com/guide/plans/charges/charge-models/dynamic)
|
|
7201
|
+
* - [`graduated_percentage`](https://docs.getlago.com/guide/plans/charges/charge-models/graduated-percentage)
|
|
7202
|
+
* - [`graduated`](https://docs.getlago.com/guide/plans/charges/charge-models/graduated)
|
|
7203
|
+
* - [`package`](https://docs.getlago.com/guide/plans/charges/charge-models/package)
|
|
7204
|
+
* - [`percentage`](https://docs.getlago.com/guide/plans/charges/charge-models/percentage)
|
|
7205
|
+
* - [`standard`](https://docs.getlago.com/guide/plans/charges/charge-models/standard)
|
|
7206
|
+
* - [`volume`](https://docs.getlago.com/guide/plans/charges/charge-models/volume)
|
|
7207
|
+
*/
|
|
7208
|
+
charge_model?: ChargeModelEnum;
|
|
7209
|
+
/**
|
|
7210
|
+
* 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.
|
|
7211
|
+
* @example false
|
|
7212
|
+
*/
|
|
7213
|
+
pay_in_advance?: boolean;
|
|
7214
|
+
/**
|
|
7215
|
+
* 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`.
|
|
7216
|
+
* @example true
|
|
7217
|
+
*/
|
|
7218
|
+
invoiceable?: boolean;
|
|
7219
|
+
/**
|
|
7220
|
+
* This setting can only be configured if `pay_in_advance` is `true` and `invoiceable` is `false`.
|
|
7221
|
+
* This field determines whether and when the charge fee should be included in
|
|
7222
|
+
* the invoice. If `null`, no invoice will be issued for this charge fee.
|
|
7223
|
+
* If `invoice`, an invoice will be generated at the end of the period,
|
|
7224
|
+
* consolidating all charge fees with a succeeded payment status.
|
|
7225
|
+
* @example null
|
|
7226
|
+
*/
|
|
7227
|
+
regroup_paid_fees?: "invoice";
|
|
7228
|
+
/**
|
|
7229
|
+
* Specifies whether a charge is prorated based on the remaining number of days in the billing period or billed fully.
|
|
7230
|
+
*
|
|
7231
|
+
* - If set to `true`, the charge is prorated based on the remaining days in the current billing period.
|
|
7232
|
+
* - If set to `false`, the charge is billed in full.
|
|
7233
|
+
* - If not defined in the request, default value is `false`.
|
|
7234
|
+
* @example false
|
|
7235
|
+
*/
|
|
7236
|
+
prorated?: boolean;
|
|
7237
|
+
};
|
|
7238
|
+
export interface ChargeCreateInput {
|
|
7239
|
+
charge: ChargeInput & {
|
|
7240
|
+
/**
|
|
7241
|
+
* This field determines whether the creation of the charge should be cascaded to the children plans. When set to `true`, the charge will be created in children plans. Conversely, when set to `false`, the charge will only be created in the plan itself. If not defined in the request, default value is `false`.
|
|
7242
|
+
* @example true
|
|
7243
|
+
*/
|
|
7244
|
+
cascade_updates?: boolean;
|
|
7245
|
+
};
|
|
7246
|
+
}
|
|
7247
|
+
export interface Charge {
|
|
7248
|
+
charge: ChargeObject;
|
|
7249
|
+
}
|
|
7250
|
+
export interface ChargeUpdateInput {
|
|
7251
|
+
charge: ChargeInput & {
|
|
7252
|
+
/**
|
|
7253
|
+
* This field determines whether the changes made to the charge should be cascaded to the children plans. When set to `true`, the changes will be cascaded into children. Conversely, when set to `false`, the changes will only be applied to the plan itself. If not defined in the request, default value is `false`.
|
|
7254
|
+
* @example true
|
|
7255
|
+
*/
|
|
7256
|
+
cascade_updates?: boolean;
|
|
7257
|
+
};
|
|
7258
|
+
}
|
|
7259
|
+
export interface ChargeDeleteInput {
|
|
7260
|
+
charge?: {
|
|
7261
|
+
/**
|
|
7262
|
+
* When set to `true`, the deletion will be cascaded to the children plans.
|
|
7263
|
+
* @example true
|
|
7264
|
+
*/
|
|
7265
|
+
cascade_updates?: boolean;
|
|
7266
|
+
};
|
|
7267
|
+
}
|
|
7268
|
+
/** Charge filter values used to apply differentiated pricing based on additional event properties. */
|
|
7269
|
+
export interface ChargeFilterFullObject {
|
|
7270
|
+
/**
|
|
7271
|
+
* Unique identifier of the charge filter, created by Lago.
|
|
7272
|
+
* @format uuid
|
|
7273
|
+
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
7274
|
+
*/
|
|
7275
|
+
lago_id: string;
|
|
7276
|
+
/**
|
|
7277
|
+
* Unique code identifying the charge this filter belongs to.
|
|
7278
|
+
* @example "api_requests_charge"
|
|
7279
|
+
*/
|
|
7280
|
+
charge_code: string;
|
|
7281
|
+
/**
|
|
7282
|
+
* Specifies the name that will be displayed on an invoice. If no value is set for this field, the values of the filter will be used as the default display name.
|
|
7283
|
+
* @example "AWS"
|
|
7284
|
+
*/
|
|
7285
|
+
invoice_display_name: string | null;
|
|
7286
|
+
/** List of all thresholds utilized for calculating the charge. */
|
|
7287
|
+
properties: ChargeProperties;
|
|
7288
|
+
/**
|
|
7289
|
+
* List of possible filter values. The key and values must match one of the billable metric filters.
|
|
7290
|
+
* @example {"region":["us-east-1"]}
|
|
7291
|
+
*/
|
|
7292
|
+
values: Record<string, string[]>;
|
|
7293
|
+
}
|
|
7294
|
+
export interface ChargeFiltersPaginated {
|
|
7295
|
+
filters: ChargeFilterFullObject[];
|
|
7296
|
+
meta: PaginationMeta;
|
|
7297
|
+
}
|
|
7298
|
+
export interface ChargeFilterCreateInput {
|
|
7299
|
+
filter: {
|
|
7300
|
+
/**
|
|
7301
|
+
* This field determines whether the creation of the filter should be cascaded to the children plans. When set to `true`, the changes will be cascaded into children. Conversely, when set to `false`, the changes will only be applied to the plan itself. If not defined in the request, default value is `false`.
|
|
7302
|
+
* @example true
|
|
7303
|
+
*/
|
|
7304
|
+
cascade_updates?: boolean;
|
|
7305
|
+
/**
|
|
7306
|
+
* Specifies the name that will be displayed on an invoice. If no value is set for this field, the values of the filter will be used as the default display name.
|
|
7307
|
+
* @example "AWS"
|
|
7308
|
+
*/
|
|
7309
|
+
invoice_display_name?: string | null;
|
|
7310
|
+
/** List of all thresholds utilized for calculating the charge. */
|
|
7311
|
+
properties: ChargeProperties;
|
|
7312
|
+
/**
|
|
7313
|
+
* List of possible filter values. The key and values must match one of the billable metric filters.
|
|
7314
|
+
* @example {"region":["us-east-1"]}
|
|
7315
|
+
*/
|
|
7316
|
+
values: Record<string, string[]>;
|
|
7317
|
+
};
|
|
7318
|
+
}
|
|
7319
|
+
export interface ChargeFilterResponse {
|
|
7320
|
+
/** Charge filter values used to apply differentiated pricing based on additional event properties. */
|
|
7321
|
+
filter: ChargeFilterFullObject;
|
|
7322
|
+
}
|
|
7323
|
+
export interface ChargeFilterUpdateInput {
|
|
7324
|
+
filter: {
|
|
7325
|
+
/**
|
|
7326
|
+
* This field determines whether the changes made to the filter should be cascaded to the children plans. When set to `true`, the changes will be cascaded into children. Conversely, when set to `false`, the changes will only be applied to the plan itself. If not defined in the request, default value is `false`.
|
|
7327
|
+
* @example true
|
|
7328
|
+
*/
|
|
7329
|
+
cascade_updates?: boolean;
|
|
7330
|
+
/**
|
|
7331
|
+
* Specifies the name that will be displayed on an invoice. If no value is set for this field, the values of the filter will be used as the default display name.
|
|
7332
|
+
* @example "AWS"
|
|
7333
|
+
*/
|
|
7334
|
+
invoice_display_name?: string | null;
|
|
7335
|
+
/** List of all thresholds utilized for calculating the charge. */
|
|
7336
|
+
properties?: ChargeProperties;
|
|
7337
|
+
/**
|
|
7338
|
+
* List of possible filter values. The key and values must match one of the billable metric filters.
|
|
7339
|
+
* @example {"region":["us-east-1"]}
|
|
7340
|
+
*/
|
|
7341
|
+
values?: Record<string, string[]>;
|
|
7342
|
+
};
|
|
7343
|
+
}
|
|
7344
|
+
export interface ChargeFilterDeleteInput {
|
|
7345
|
+
filter?: {
|
|
7346
|
+
/**
|
|
7347
|
+
* When set to `true`, the deletion will be cascaded to the children plans.
|
|
7348
|
+
* @example true
|
|
7349
|
+
*/
|
|
7350
|
+
cascade_updates?: boolean;
|
|
7351
|
+
};
|
|
7352
|
+
}
|
|
7353
|
+
export interface FixedChargesPaginated {
|
|
7354
|
+
fixed_charges: FixedChargeObject[];
|
|
7355
|
+
meta: PaginationMeta;
|
|
7356
|
+
}
|
|
7357
|
+
/** Properties of a fixed charge that can be overridden at the subscription level. */
|
|
7358
|
+
export interface FixedChargeOverridableInput {
|
|
7359
|
+
/**
|
|
7360
|
+
* Specifies the name that will be displayed on an invoice. If no value is set for this field, the name of the add-on will be used as the default display name.
|
|
7361
|
+
* @example "Setup Fee"
|
|
7362
|
+
*/
|
|
7363
|
+
invoice_display_name?: string | null;
|
|
7364
|
+
/**
|
|
7365
|
+
* The quantity of units for the fixed charge.
|
|
7366
|
+
* @example "1.0"
|
|
7367
|
+
*/
|
|
7368
|
+
units?: string;
|
|
7369
|
+
/**
|
|
7370
|
+
* When set to `true`, the fixed charge units are applied immediately for active subscriptions. When set to `false`, the units are applied at the next billing period.
|
|
7371
|
+
* @example false
|
|
7372
|
+
*/
|
|
7373
|
+
apply_units_immediately?: boolean;
|
|
7374
|
+
/** List of all thresholds utilized for calculating the fixed charge. */
|
|
7375
|
+
properties?: ChargeProperties;
|
|
7376
|
+
/** List of unique code used to identify the taxes. */
|
|
7377
|
+
tax_codes?: TaxCodes;
|
|
7378
|
+
}
|
|
7379
|
+
/**
|
|
7380
|
+
* Specifies the pricing model used for the calculation of the fixed charge fee. It can be any of the following values:
|
|
7381
|
+
* - `standard`
|
|
7382
|
+
* - `graduated`
|
|
7383
|
+
* - `volume`
|
|
7384
|
+
*/
|
|
7385
|
+
export type FixedChargeModelEnum = "standard" | "graduated" | "volume";
|
|
7386
|
+
export type FixedChargeInput = FixedChargeOverridableInput & {
|
|
7387
|
+
/**
|
|
7388
|
+
* Unique identifier of the add-on. Either add_on_id or add_on_code is required.
|
|
7389
|
+
* @format uuid
|
|
7390
|
+
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
7391
|
+
*/
|
|
7392
|
+
add_on_id?: string;
|
|
7393
|
+
/**
|
|
7394
|
+
* Unique code identifying an add-on. Either add_on_id or add_on_code is required.
|
|
7395
|
+
* @example "setup_fee"
|
|
7396
|
+
*/
|
|
7397
|
+
add_on_code?: string;
|
|
7398
|
+
/**
|
|
7399
|
+
* Unique code identifying the fixed charge within the plan.
|
|
7400
|
+
* @example "setup_fee_charge"
|
|
7401
|
+
*/
|
|
7402
|
+
code?: string;
|
|
7403
|
+
/**
|
|
7404
|
+
* Specifies the pricing model used for the calculation of the fixed charge fee. It can be any of the following values:
|
|
7405
|
+
* - `standard`
|
|
7406
|
+
* - `graduated`
|
|
7407
|
+
* - `volume`
|
|
7408
|
+
*/
|
|
7409
|
+
charge_model?: FixedChargeModelEnum;
|
|
7410
|
+
/**
|
|
7411
|
+
* This field determines the billing timing for this fixed charge. When set to `true`, the charge is due and invoiced immediately at the beginning of the billing period. When set to `false`, the charge is due and invoiced at the end of the billing period.
|
|
7412
|
+
* @example true
|
|
7413
|
+
*/
|
|
7414
|
+
pay_in_advance?: boolean;
|
|
7415
|
+
/**
|
|
7416
|
+
* Specifies whether a fixed charge is prorated based on the remaining number of days in the billing period or billed fully.
|
|
7417
|
+
*
|
|
7418
|
+
* - If set to `true`, the charge is prorated based on the remaining days in the current billing period.
|
|
7419
|
+
* - If set to `false`, the charge is billed in full.
|
|
7420
|
+
* @example false
|
|
7421
|
+
*/
|
|
7422
|
+
prorated?: boolean;
|
|
7423
|
+
};
|
|
7424
|
+
export interface FixedChargeCreateInput {
|
|
7425
|
+
fixed_charge: FixedChargeInput & {
|
|
7426
|
+
/**
|
|
7427
|
+
* This field determines whether the creation of the fixed charge should be cascaded to the children plans. When set to `true`, the fixed charge will be created in children plans. Conversely, when set to `false`, the fixed charge will only be created in the plan itself. If not defined in the request, default value is `false`.
|
|
7428
|
+
* @example true
|
|
7429
|
+
*/
|
|
7430
|
+
cascade_updates?: boolean;
|
|
7431
|
+
};
|
|
7432
|
+
}
|
|
7433
|
+
export interface FixedCharge {
|
|
7434
|
+
fixed_charge: FixedChargeObject;
|
|
7435
|
+
}
|
|
7436
|
+
export interface FixedChargeUpdateInput {
|
|
7437
|
+
fixed_charge: FixedChargeInput & {
|
|
7438
|
+
/**
|
|
7439
|
+
* This field determines whether the changes made to the fixed charge should be cascaded to the children plans. When set to `true`, the changes will be cascaded into children. Conversely, when set to `false`, the changes will only be applied to the plan itself. If not defined in the request, default value is `false`.
|
|
7440
|
+
* @example true
|
|
7441
|
+
*/
|
|
7442
|
+
cascade_updates?: boolean;
|
|
7443
|
+
};
|
|
7444
|
+
}
|
|
7445
|
+
export interface FixedChargeDeleteInput {
|
|
7446
|
+
fixed_charge?: {
|
|
7447
|
+
/**
|
|
7448
|
+
* When set to `true`, the deletion will be cascaded to the children plans.
|
|
7449
|
+
* @example true
|
|
7450
|
+
*/
|
|
7451
|
+
cascade_updates?: boolean;
|
|
7452
|
+
};
|
|
6605
7453
|
}
|
|
6606
7454
|
/** Based plan overrides. */
|
|
6607
7455
|
export interface PlanOverridesObject {
|
|
@@ -6653,6 +7501,11 @@ export interface PlanOverridesObject {
|
|
|
6653
7501
|
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
6654
7502
|
*/
|
|
6655
7503
|
billable_metric_id?: string;
|
|
7504
|
+
/**
|
|
7505
|
+
* Unique code identifying the charge within the plan.
|
|
7506
|
+
* @example "api_requests_charge"
|
|
7507
|
+
*/
|
|
7508
|
+
code?: string;
|
|
6656
7509
|
/**
|
|
6657
7510
|
* Specifies the pricing model used for the calculation of the final fee. It can be any of the following values:
|
|
6658
7511
|
* - [`dynamic`](https://docs.getlago.com/guide/plans/charges/charge-models/dynamic)
|
|
@@ -6792,14 +7645,35 @@ export interface SubscriptionCreateInput {
|
|
|
6792
7645
|
subscription_at?: string;
|
|
6793
7646
|
/** Based plan overrides. */
|
|
6794
7647
|
plan_overrides?: PlanOverridesObject;
|
|
7648
|
+
/** Configuration for invoice custom sections to apply to invoices generated by this resource. */
|
|
7649
|
+
invoice_custom_section?: InvoiceCustomSectionInput;
|
|
6795
7650
|
/** Optional payment method to use for processing subscription payments. */
|
|
6796
7651
|
payment_method?: PaymentMethodReference;
|
|
6797
7652
|
};
|
|
6798
7653
|
}
|
|
7654
|
+
export interface ApplicableUsageThreshold {
|
|
7655
|
+
/**
|
|
7656
|
+
* The display name of the usage threshold.
|
|
7657
|
+
* @example "Threshold 1"
|
|
7658
|
+
*/
|
|
7659
|
+
threshold_display_name: string | null;
|
|
7660
|
+
/**
|
|
7661
|
+
* The amount to reach to trigger a `progressive_billing` invoice.
|
|
7662
|
+
* @example 10000
|
|
7663
|
+
*/
|
|
7664
|
+
amount_cents: number;
|
|
7665
|
+
/**
|
|
7666
|
+
* This field when set to `true` indicates that a `progressive_billing` invoice will be created every time the lifetime usage increases by the specified amount.
|
|
7667
|
+
* @example true
|
|
7668
|
+
*/
|
|
7669
|
+
recurring: boolean;
|
|
7670
|
+
}
|
|
6799
7671
|
export type SubscriptionObjectExtended = SubscriptionObject & {
|
|
6800
7672
|
plan?: PlanObject;
|
|
7673
|
+
/** List of usage thresholds applicable to this subscription. */
|
|
7674
|
+
applicable_usage_thresholds?: ApplicableUsageThreshold[];
|
|
6801
7675
|
};
|
|
6802
|
-
export interface
|
|
7676
|
+
export interface SubscriptionExtended {
|
|
6803
7677
|
subscription: SubscriptionObjectExtended;
|
|
6804
7678
|
}
|
|
6805
7679
|
export interface SubscriptionUpdateInput {
|
|
@@ -6813,585 +7687,247 @@ export interface SubscriptionUpdateInput {
|
|
|
6813
7687
|
* The display name of the subscription on an invoice. This field allows for customization of the subscription's name for billing purposes, especially useful when a single customer has multiple subscriptions using the same plan.
|
|
6814
7688
|
* @example "Repository B"
|
|
6815
7689
|
*/
|
|
6816
|
-
name?: string | null;
|
|
6817
|
-
/**
|
|
6818
|
-
* The effective end date of the subscription. If this field is set to null, the subscription will automatically renew. This date should be provided in ISO 8601 datetime format, and use Coordinated Universal Time (UTC).
|
|
6819
|
-
* @format date-time
|
|
6820
|
-
* @example "2022-10-08T00:00:00Z"
|
|
6821
|
-
*/
|
|
6822
|
-
ending_at: string | null;
|
|
6823
|
-
/**
|
|
6824
|
-
* The start date and time of the subscription. This field can only be modified for pending subscriptions that have not yet started. This date should be provided in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC).
|
|
6825
|
-
* @format date-time
|
|
6826
|
-
* @example "2022-08-08T00:00:00Z"
|
|
6827
|
-
*/
|
|
6828
|
-
subscription_at?: string;
|
|
6829
|
-
/** Based plan overrides. */
|
|
6830
|
-
plan_overrides?: PlanOverridesObject;
|
|
6831
|
-
/** Optional payment method to use for processing subscription payments. */
|
|
6832
|
-
payment_method?: PaymentMethodReference;
|
|
6833
|
-
};
|
|
6834
|
-
}
|
|
6835
|
-
export interface LifetimeUsageThresholdObject {
|
|
6836
|
-
/**
|
|
6837
|
-
* The usage threshold amount in cents.
|
|
6838
|
-
* @example 100
|
|
6839
|
-
*/
|
|
6840
|
-
amount_cents: number;
|
|
6841
|
-
/**
|
|
6842
|
-
* The completion ratio of the usage threshold.
|
|
6843
|
-
* @example 0.5
|
|
6844
|
-
*/
|
|
6845
|
-
completion_ratio: number;
|
|
6846
|
-
/**
|
|
6847
|
-
* The date and time when the usage threshold was reached. The date and time must be in ISO 8601 format.
|
|
6848
|
-
* @format date-time
|
|
6849
|
-
* @example "2024-01-01T00:00:00Z"
|
|
6850
|
-
*/
|
|
6851
|
-
reached_at: string | null;
|
|
6852
|
-
}
|
|
6853
|
-
export interface LifetimeUsageObject {
|
|
6854
|
-
/**
|
|
6855
|
-
* Unique identifier assigned to the lifetime usage record within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the lifetime usage record within the Lago system
|
|
6856
|
-
* @format uuid
|
|
6857
|
-
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
6858
|
-
*/
|
|
6859
|
-
lago_id: string;
|
|
6860
|
-
/**
|
|
6861
|
-
* Unique identifier assigned to the subscription record within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the subscription record within the Lago system
|
|
6862
|
-
* @format uuid
|
|
6863
|
-
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
6864
|
-
*/
|
|
6865
|
-
lago_subscription_id: string;
|
|
6866
|
-
/**
|
|
6867
|
-
* The subscription external unique identifier (provided by your own application).
|
|
6868
|
-
* @example "5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba"
|
|
6869
|
-
*/
|
|
6870
|
-
external_subscription_id: string;
|
|
6871
|
-
/**
|
|
6872
|
-
* The historical usage amount in cents for the subscription (provided by your own application).
|
|
6873
|
-
* @example 100
|
|
6874
|
-
*/
|
|
6875
|
-
external_historical_usage_amount_cents: number;
|
|
6876
|
-
/**
|
|
6877
|
-
* The total invoiced usage amount in cents for the subscription.
|
|
6878
|
-
* @example 100
|
|
6879
|
-
*/
|
|
6880
|
-
invoiced_usage_amount_cents: number;
|
|
6881
|
-
/**
|
|
6882
|
-
* The current usage amount in cents for the subscription on the current billing period.
|
|
6883
|
-
* @example 100
|
|
6884
|
-
*/
|
|
6885
|
-
current_usage_amount_cents: number;
|
|
6886
|
-
/**
|
|
6887
|
-
* The recording start date and time of the subscription lifetime usage. The date and time must be in ISO 8601 format.
|
|
6888
|
-
* @format date-time
|
|
6889
|
-
* @example "2024-01-01T00:00:00Z"
|
|
6890
|
-
*/
|
|
6891
|
-
from_datetime: string | null;
|
|
6892
|
-
/**
|
|
6893
|
-
* The recording end date and time of the subscription lifetime usage. The date and time must be in ISO 8601 format.
|
|
6894
|
-
* @format date-time
|
|
6895
|
-
* @example "2024-12-31T23:59:59Z"
|
|
6896
|
-
*/
|
|
6897
|
-
to_datetime: string;
|
|
6898
|
-
/** Array of usage thresholds attached to the subscription's plan. */
|
|
6899
|
-
usage_thresholds?: LifetimeUsageThresholdObject[];
|
|
6900
|
-
}
|
|
6901
|
-
export interface LifetimeUsage {
|
|
6902
|
-
lifetime_usage: LifetimeUsageObject;
|
|
6903
|
-
}
|
|
6904
|
-
export interface LifetimeUsageInput {
|
|
6905
|
-
lifetime_usage: {
|
|
6906
|
-
/**
|
|
6907
|
-
* The historical usage amount in cents for the subscription (provided by your own application).
|
|
6908
|
-
* @example 100
|
|
6909
|
-
*/
|
|
6910
|
-
external_historical_usage_amount_cents: number;
|
|
6911
|
-
};
|
|
6912
|
-
}
|
|
6913
|
-
export interface AlertThresholdBaseObject {
|
|
6914
|
-
/**
|
|
6915
|
-
* Unique identifier of the usage threshold created by Lago.
|
|
6916
|
-
* @example "warn"
|
|
6917
|
-
*/
|
|
6918
|
-
code?: string | null;
|
|
6919
|
-
/**
|
|
6920
|
-
* This field when set to `true` indicates that the alert will be retrigger when this threshold is reached after the last non-recurring threshold. Only one recurring threshold per alert allowed.
|
|
6921
|
-
* @default false
|
|
6922
|
-
* @example false
|
|
6923
|
-
*/
|
|
6924
|
-
recurring?: boolean;
|
|
6925
|
-
}
|
|
6926
|
-
export type AlertThresholdObject = AlertThresholdBaseObject & {
|
|
6927
|
-
/**
|
|
6928
|
-
* A value that should trigger this alert, formatted as a BigDecimal.
|
|
6929
|
-
* @pattern ^[0-9]+.?[0-9]*$
|
|
6930
|
-
* @example "99.0"
|
|
6931
|
-
*/
|
|
6932
|
-
value: string;
|
|
6933
|
-
};
|
|
6934
|
-
export interface AlertObject {
|
|
6935
|
-
/**
|
|
6936
|
-
* Unique identifier of the alert, created by Lago.
|
|
6937
|
-
* @format uuid
|
|
6938
|
-
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
6939
|
-
*/
|
|
6940
|
-
lago_id: string;
|
|
6941
|
-
/**
|
|
6942
|
-
* Unique identifier of the organization, created by Lago.
|
|
6943
|
-
* @format uuid
|
|
6944
|
-
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
6945
|
-
*/
|
|
6946
|
-
lago_organization_id: string;
|
|
6947
|
-
/**
|
|
6948
|
-
* The subscription external unique identifier (provided by your own application).
|
|
6949
|
-
* @example "sub_1234567890"
|
|
6950
|
-
*/
|
|
6951
|
-
external_subscription_id: string;
|
|
6952
|
-
/**
|
|
6953
|
-
* The customer external unique identifier (provided by your own application).
|
|
6954
|
-
* @example "cus_0987654321"
|
|
6955
|
-
*/
|
|
6956
|
-
external_customer_id: string;
|
|
6957
|
-
/** The billable metric associated with the alert. Only for alerts based on a billable metric. */
|
|
6958
|
-
billable_metric: BillableMetricObject;
|
|
6959
|
-
/**
|
|
6960
|
-
* The type of alert.
|
|
6961
|
-
* @example "billable_metric_current_usage_amount"
|
|
6962
|
-
*/
|
|
6963
|
-
alert_type: "current_usage_amount" | "billable_metric_current_usage_amount" | "billable_metric_current_usage_units" | "lifetime_usage_amount";
|
|
6964
|
-
/**
|
|
6965
|
-
* Unique code used to identify the alert.
|
|
6966
|
-
* @example "storage_threshold_alert"
|
|
6967
|
-
*/
|
|
6968
|
-
code: string;
|
|
6969
|
-
/**
|
|
6970
|
-
* The name of the alert.
|
|
6971
|
-
* @example "Storage Usage Alert"
|
|
6972
|
-
*/
|
|
6973
|
-
name: string | null;
|
|
6974
|
-
/**
|
|
6975
|
-
* When the system checked if this alert should be triggered, this value was retrieved and checked against the thresholds.
|
|
6976
|
-
* @example 1000
|
|
6977
|
-
*/
|
|
6978
|
-
previous_value: number;
|
|
6979
|
-
/**
|
|
6980
|
-
* The date and time in UTC (ISO 8601) when the system checked if this alert should be triggered. Null until it's processed for the first time.
|
|
6981
|
-
* @format date-time
|
|
6982
|
-
* @example "2025-05-19T10:04:21Z"
|
|
6983
|
-
*/
|
|
6984
|
-
last_processed_at: string | null;
|
|
6985
|
-
/** Array of thresholds associated with the alert. */
|
|
6986
|
-
thresholds: AlertThresholdObject[];
|
|
6987
|
-
/**
|
|
6988
|
-
* The date and time in UTC (ISO 8601) when the alert was created.
|
|
6989
|
-
* @format date-time
|
|
6990
|
-
* @example "2025-03-20T10:00:00Z"
|
|
6991
|
-
*/
|
|
6992
|
-
created_at: string;
|
|
6993
|
-
}
|
|
6994
|
-
export interface Alerts {
|
|
6995
|
-
alerts: AlertObject[];
|
|
6996
|
-
meta?: PaginationMeta;
|
|
6997
|
-
}
|
|
6998
|
-
export type AlertThresholdInput = AlertThresholdBaseObject & {
|
|
6999
|
-
/**
|
|
7000
|
-
* A value that should trigger this alert. This can be an integer or a string formatted as a BigDecimal.
|
|
7001
|
-
* @example 99
|
|
7002
|
-
*/
|
|
7003
|
-
value: number | string;
|
|
7004
|
-
};
|
|
7005
|
-
export interface AlertBaseInput {
|
|
7006
|
-
/**
|
|
7007
|
-
* Unique code used to identify the alert.
|
|
7008
|
-
* @example "storage_threshold_alert"
|
|
7009
|
-
*/
|
|
7010
|
-
code?: string;
|
|
7011
|
-
/**
|
|
7012
|
-
* The code of the billable metric associated with the alert. Only for alerts based on a billable metric.
|
|
7013
|
-
* @example "storage_usage"
|
|
7014
|
-
*/
|
|
7015
|
-
billable_metric_code?: string | null;
|
|
7016
|
-
/**
|
|
7017
|
-
* The name of the alert.
|
|
7018
|
-
* @example "Storage Usage Alert"
|
|
7019
|
-
*/
|
|
7020
|
-
name?: string | null;
|
|
7021
|
-
/** Array of thresholds associated with the alert. */
|
|
7022
|
-
thresholds?: AlertThresholdInput[];
|
|
7023
|
-
}
|
|
7024
|
-
export interface AlertCreateInput {
|
|
7025
|
-
alert: AlertBaseInput & {
|
|
7026
|
-
/**
|
|
7027
|
-
* The type of alert.
|
|
7028
|
-
* @example "billable_metric_current_usage_amount"
|
|
7029
|
-
*/
|
|
7030
|
-
alert_type: "current_usage_amount" | "billable_metric_current_usage_amount" | "billable_metric_current_usage_units" | "lifetime_usage_amount";
|
|
7031
|
-
/**
|
|
7032
|
-
* Unique code used to identify the alert.
|
|
7033
|
-
* @example "storage_threshold_alert"
|
|
7034
|
-
*/
|
|
7035
|
-
code: string;
|
|
7036
|
-
};
|
|
7037
|
-
}
|
|
7038
|
-
export interface AlertBatchCreateInput {
|
|
7039
|
-
/** Array of alerts to create. All alerts are created atomically - if any fail validation, none are created. */
|
|
7040
|
-
alerts: (AlertBaseInput & {
|
|
7690
|
+
name?: string | null;
|
|
7041
7691
|
/**
|
|
7042
|
-
* The
|
|
7043
|
-
* @
|
|
7692
|
+
* The effective end date of the subscription. If this field is set to null, the subscription will automatically renew. This date should be provided in ISO 8601 datetime format, and use Coordinated Universal Time (UTC).
|
|
7693
|
+
* @format date-time
|
|
7694
|
+
* @example "2022-10-08T00:00:00Z"
|
|
7044
7695
|
*/
|
|
7045
|
-
|
|
7696
|
+
ending_at: string | null;
|
|
7046
7697
|
/**
|
|
7047
|
-
*
|
|
7048
|
-
* @
|
|
7698
|
+
* The start date and time of the subscription. This field can only be modified for pending subscriptions that have not yet started. This date should be provided in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC).
|
|
7699
|
+
* @format date-time
|
|
7700
|
+
* @example "2022-08-08T00:00:00Z"
|
|
7049
7701
|
*/
|
|
7050
|
-
|
|
7051
|
-
|
|
7052
|
-
|
|
7053
|
-
|
|
7054
|
-
|
|
7702
|
+
subscription_at?: string;
|
|
7703
|
+
/** Based plan overrides. */
|
|
7704
|
+
plan_overrides?: PlanOverridesObject;
|
|
7705
|
+
/** Configuration for invoice custom sections to apply to invoices generated by this resource. */
|
|
7706
|
+
invoice_custom_section?: InvoiceCustomSectionInput;
|
|
7707
|
+
/** Optional payment method to use for processing subscription payments. */
|
|
7708
|
+
payment_method?: PaymentMethodReference;
|
|
7709
|
+
};
|
|
7055
7710
|
}
|
|
7056
|
-
export interface
|
|
7057
|
-
|
|
7711
|
+
export interface Subscription {
|
|
7712
|
+
subscription: SubscriptionObject;
|
|
7058
7713
|
}
|
|
7059
|
-
export
|
|
7060
|
-
/**
|
|
7061
|
-
* Applicable value this this subscription (override_value if set, plan_value otherwise). Type depends on the privilege's value_type.
|
|
7062
|
-
* @example 10
|
|
7063
|
-
*/
|
|
7064
|
-
value: number | boolean | string;
|
|
7714
|
+
export interface LifetimeUsageThresholdObject {
|
|
7065
7715
|
/**
|
|
7066
|
-
*
|
|
7067
|
-
* @example
|
|
7716
|
+
* The usage threshold amount in cents.
|
|
7717
|
+
* @example 100
|
|
7068
7718
|
*/
|
|
7069
|
-
|
|
7719
|
+
amount_cents: number;
|
|
7070
7720
|
/**
|
|
7071
|
-
*
|
|
7072
|
-
* @example
|
|
7721
|
+
* The completion ratio of the usage threshold.
|
|
7722
|
+
* @example 0.5
|
|
7073
7723
|
*/
|
|
7074
|
-
|
|
7075
|
-
};
|
|
7076
|
-
export interface SubscriptionEntitlementObject {
|
|
7724
|
+
completion_ratio: number;
|
|
7077
7725
|
/**
|
|
7078
|
-
*
|
|
7079
|
-
* @
|
|
7726
|
+
* The date and time when the usage threshold was reached. The date and time must be in ISO 8601 format.
|
|
7727
|
+
* @format date-time
|
|
7728
|
+
* @example "2024-01-01T00:00:00Z"
|
|
7080
7729
|
*/
|
|
7081
|
-
|
|
7730
|
+
reached_at: string | null;
|
|
7731
|
+
}
|
|
7732
|
+
export interface LifetimeUsageObject {
|
|
7082
7733
|
/**
|
|
7083
|
-
*
|
|
7084
|
-
* @
|
|
7734
|
+
* Unique identifier assigned to the lifetime usage record within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the lifetime usage record within the Lago system
|
|
7735
|
+
* @format uuid
|
|
7736
|
+
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
7085
7737
|
*/
|
|
7086
|
-
|
|
7738
|
+
lago_id: string;
|
|
7087
7739
|
/**
|
|
7088
|
-
*
|
|
7089
|
-
* @
|
|
7740
|
+
* Unique identifier assigned to the subscription record within the Lago application. This ID is exclusively created by Lago and serves as a unique identifier for the subscription record within the Lago system
|
|
7741
|
+
* @format uuid
|
|
7742
|
+
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
7090
7743
|
*/
|
|
7091
|
-
|
|
7744
|
+
lago_subscription_id: string;
|
|
7092
7745
|
/**
|
|
7093
|
-
*
|
|
7094
|
-
* @example
|
|
7746
|
+
* The subscription external unique identifier (provided by your own application).
|
|
7747
|
+
* @example "5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba"
|
|
7095
7748
|
*/
|
|
7096
|
-
|
|
7097
|
-
/** @example {"max":15,"provider":"okta"} */
|
|
7098
|
-
overrides: Record<string, any>;
|
|
7099
|
-
}
|
|
7100
|
-
export interface SubscriptionEntitlements {
|
|
7101
|
-
entitlements: SubscriptionEntitlementObject[];
|
|
7102
|
-
}
|
|
7103
|
-
export interface SubscriptionEntitlement {
|
|
7104
|
-
entitlement: SubscriptionEntitlementObject;
|
|
7105
|
-
}
|
|
7106
|
-
export interface FixedCharges {
|
|
7107
|
-
fixed_charges: FixedChargeObject[];
|
|
7108
|
-
}
|
|
7109
|
-
export interface TaxesPaginated {
|
|
7110
|
-
taxes: TaxObject[];
|
|
7111
|
-
meta: PaginationMeta;
|
|
7112
|
-
}
|
|
7113
|
-
export interface TaxBaseInput {
|
|
7749
|
+
external_subscription_id: string;
|
|
7114
7750
|
/**
|
|
7115
|
-
*
|
|
7116
|
-
* @example
|
|
7751
|
+
* The historical usage amount in cents for the subscription (provided by your own application).
|
|
7752
|
+
* @example 100
|
|
7117
7753
|
*/
|
|
7118
|
-
|
|
7754
|
+
external_historical_usage_amount_cents: number;
|
|
7119
7755
|
/**
|
|
7120
|
-
*
|
|
7121
|
-
* @example
|
|
7756
|
+
* The total invoiced usage amount in cents for the subscription.
|
|
7757
|
+
* @example 100
|
|
7122
7758
|
*/
|
|
7123
|
-
|
|
7759
|
+
invoiced_usage_amount_cents: number;
|
|
7124
7760
|
/**
|
|
7125
|
-
* The
|
|
7126
|
-
* @
|
|
7127
|
-
* @example "20.0"
|
|
7761
|
+
* The current usage amount in cents for the subscription on the current billing period.
|
|
7762
|
+
* @example 100
|
|
7128
7763
|
*/
|
|
7129
|
-
|
|
7764
|
+
current_usage_amount_cents: number;
|
|
7130
7765
|
/**
|
|
7131
|
-
*
|
|
7132
|
-
* @
|
|
7766
|
+
* The recording start date and time of the subscription lifetime usage. The date and time must be in ISO 8601 format.
|
|
7767
|
+
* @format date-time
|
|
7768
|
+
* @example "2024-01-01T00:00:00Z"
|
|
7133
7769
|
*/
|
|
7134
|
-
|
|
7770
|
+
from_datetime: string | null;
|
|
7135
7771
|
/**
|
|
7136
|
-
*
|
|
7137
|
-
* @
|
|
7138
|
-
* @example
|
|
7772
|
+
* The recording end date and time of the subscription lifetime usage. The date and time must be in ISO 8601 format.
|
|
7773
|
+
* @format date-time
|
|
7774
|
+
* @example "2024-12-31T23:59:59Z"
|
|
7139
7775
|
*/
|
|
7140
|
-
|
|
7141
|
-
|
|
7142
|
-
|
|
7143
|
-
tax: TaxBaseInput;
|
|
7144
|
-
}
|
|
7145
|
-
export interface Tax {
|
|
7146
|
-
tax: TaxObject;
|
|
7776
|
+
to_datetime: string;
|
|
7777
|
+
/** Array of usage thresholds attached to the subscription's plan. */
|
|
7778
|
+
usage_thresholds?: LifetimeUsageThresholdObject[];
|
|
7147
7779
|
}
|
|
7148
|
-
export interface
|
|
7149
|
-
|
|
7780
|
+
export interface LifetimeUsage {
|
|
7781
|
+
lifetime_usage: LifetimeUsageObject;
|
|
7150
7782
|
}
|
|
7151
|
-
export interface
|
|
7152
|
-
|
|
7153
|
-
/**
|
|
7154
|
-
* The name of the wallet.
|
|
7155
|
-
* @example "Prepaid"
|
|
7156
|
-
*/
|
|
7157
|
-
name?: string | null;
|
|
7158
|
-
/**
|
|
7159
|
-
* The code of the wallet.
|
|
7160
|
-
* @example "prepaid"
|
|
7161
|
-
*/
|
|
7162
|
-
code?: string | null;
|
|
7163
|
-
/**
|
|
7164
|
-
* Wallet priority for ordering when a customer has multiple wallets. Allowed values: 1-50, where 1 is highest priority and 50 is lowest. Defaults to 50.
|
|
7165
|
-
* @min 1
|
|
7166
|
-
* @max 50
|
|
7167
|
-
* @example 50
|
|
7168
|
-
*/
|
|
7169
|
-
priority?: number;
|
|
7170
|
-
/**
|
|
7171
|
-
* The rate of conversion between credits and the amount in the specified currency. It indicates the ratio or factor used to convert credits into the corresponding monetary value in the currency of the transaction.
|
|
7172
|
-
* @pattern ^[0-9]+.?[0-9]*$
|
|
7173
|
-
* @example "1.5"
|
|
7174
|
-
*/
|
|
7175
|
-
rate_amount: string;
|
|
7176
|
-
/**
|
|
7177
|
-
* The currency of the wallet.
|
|
7178
|
-
* @example "USD"
|
|
7179
|
-
*/
|
|
7180
|
-
currency: Currency;
|
|
7181
|
-
/**
|
|
7182
|
-
* The number of paid credits. Required only if there is no granted credits.
|
|
7183
|
-
* @pattern ^[0-9]+.?[0-9]*$
|
|
7184
|
-
* @example "20.0"
|
|
7185
|
-
*/
|
|
7186
|
-
paid_credits?: string | null;
|
|
7187
|
-
/**
|
|
7188
|
-
* The number of free granted credits. Required only if there is no paid credits.
|
|
7189
|
-
* @pattern ^[0-9]+.?[0-9]*$
|
|
7190
|
-
* @example "10.0"
|
|
7191
|
-
*/
|
|
7192
|
-
granted_credits?: string | null;
|
|
7193
|
-
/**
|
|
7194
|
-
* The customer external unique identifier (provided by your own application)
|
|
7195
|
-
* @example "hooli_1234"
|
|
7196
|
-
*/
|
|
7197
|
-
external_customer_id: string;
|
|
7198
|
-
/**
|
|
7199
|
-
* The date and time that determines when the wallet will expire. It follows the ISO 8601 datetime format and is expressed in Coordinated Universal Time (UTC).
|
|
7200
|
-
* @format date-time
|
|
7201
|
-
* @example "2022-07-07T23:59:59Z"
|
|
7202
|
-
*/
|
|
7203
|
-
expiration_at?: string | null;
|
|
7204
|
-
/**
|
|
7205
|
-
* 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.
|
|
7206
|
-
* @example false
|
|
7207
|
-
*/
|
|
7208
|
-
invoice_requires_successful_payment?: boolean;
|
|
7209
|
-
/**
|
|
7210
|
-
* 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.
|
|
7211
|
-
* @example [{"key":"example_key","value":"example_value"},{"key":"another_key","value":"another_value"}]
|
|
7212
|
-
*/
|
|
7213
|
-
transaction_metadata?: any[] | null;
|
|
7214
|
-
/**
|
|
7215
|
-
* The name of the wallet transactions triggered when creating the wallet. It will appear on the invoice as the label for the fee. If not set, the label on the invoice will fallback to either `Prepaid credits - {{wallet_name}}` if the wallet name is set, or `Prepaid credits`.
|
|
7216
|
-
* @example "Tokens for models 'high-fidelity-boost'"
|
|
7217
|
-
*/
|
|
7218
|
-
transaction_name?: string | null;
|
|
7219
|
-
/** Set wallet limitations to fee types. */
|
|
7220
|
-
applies_to?: {
|
|
7221
|
-
/**
|
|
7222
|
-
* An array of fee types to which the wallet is applicable. By specifying the fee types in this field, you can restrict the wallet's usage to specific fee types only.
|
|
7223
|
-
* @example ["charge"]
|
|
7224
|
-
*/
|
|
7225
|
-
fee_types?: any[] | null;
|
|
7226
|
-
/**
|
|
7227
|
-
* An array of billable metric codes to which the wallet is applicable. By specifying the billable metric codes in this field, you can restrict the wallet's usage to specific metrics only.
|
|
7228
|
-
* @example []
|
|
7229
|
-
*/
|
|
7230
|
-
billable_metric_codes?: any[] | null;
|
|
7231
|
-
};
|
|
7783
|
+
export interface LifetimeUsageInput {
|
|
7784
|
+
lifetime_usage: {
|
|
7232
7785
|
/**
|
|
7233
|
-
*
|
|
7786
|
+
* The historical usage amount in cents for the subscription (provided by your own application).
|
|
7234
7787
|
* @example 100
|
|
7235
7788
|
*/
|
|
7236
|
-
|
|
7237
|
-
/**
|
|
7238
|
-
* Maximum amount of cents that can be top-up with a single paid transaction.
|
|
7239
|
-
* @example 1000
|
|
7240
|
-
*/
|
|
7241
|
-
paid_top_up_max_amount_cents?: number | null;
|
|
7242
|
-
/**
|
|
7243
|
-
* If set to true, the wallet will ignore paid top-up limits on creation.
|
|
7244
|
-
* @example false
|
|
7245
|
-
*/
|
|
7246
|
-
ignore_paid_top_up_limits_on_creation?: boolean | null;
|
|
7247
|
-
/** List of recurring transaction rules. Currently, we only allow one recurring rule per wallet. */
|
|
7248
|
-
recurring_transaction_rules?: any[] | null;
|
|
7249
|
-
/** Optional payment method to use for processing wallet top-up payments. */
|
|
7250
|
-
payment_method?: PaymentMethodReference;
|
|
7251
|
-
/** Metadata to set as key-value pairs. Keys are strings (max 100 characters), values can be strings (max 255 characters) or null. */
|
|
7252
|
-
metadata?: MetadataInput;
|
|
7789
|
+
external_historical_usage_amount_cents: number;
|
|
7253
7790
|
};
|
|
7254
7791
|
}
|
|
7255
|
-
export interface
|
|
7256
|
-
|
|
7257
|
-
}
|
|
7258
|
-
export interface WalletUpdateInput {
|
|
7259
|
-
wallet: {
|
|
7792
|
+
export interface AlertCreateInput {
|
|
7793
|
+
alert: AlertBaseInput & {
|
|
7260
7794
|
/**
|
|
7261
|
-
* The
|
|
7262
|
-
* @example "
|
|
7795
|
+
* The type of alert.
|
|
7796
|
+
* @example "billable_metric_current_usage_amount"
|
|
7797
|
+
*/
|
|
7798
|
+
alert_type: "current_usage_amount" | "billable_metric_current_usage_amount" | "billable_metric_current_usage_units" | "lifetime_usage_amount";
|
|
7799
|
+
/**
|
|
7800
|
+
* Unique code used to identify the alert.
|
|
7801
|
+
* @example "storage_threshold_alert"
|
|
7263
7802
|
*/
|
|
7264
|
-
|
|
7803
|
+
code: string;
|
|
7265
7804
|
/**
|
|
7266
|
-
* The code of the
|
|
7267
|
-
* @example "
|
|
7805
|
+
* The code of the billable metric associated with the alert. Only for alerts based on a billable metric.
|
|
7806
|
+
* @example "storage_usage"
|
|
7268
7807
|
*/
|
|
7269
|
-
|
|
7808
|
+
billable_metric_code?: string | null;
|
|
7809
|
+
};
|
|
7810
|
+
}
|
|
7811
|
+
export interface AlertBatchCreateInput {
|
|
7812
|
+
/** Array of alerts to create. All alerts are created atomically - if any fail validation, none are created. */
|
|
7813
|
+
alerts: (AlertBaseInput & {
|
|
7270
7814
|
/**
|
|
7271
|
-
*
|
|
7272
|
-
* @
|
|
7273
|
-
* @max 50
|
|
7274
|
-
* @example 50
|
|
7815
|
+
* The type of alert.
|
|
7816
|
+
* @example "billable_metric_current_usage_amount"
|
|
7275
7817
|
*/
|
|
7276
|
-
|
|
7818
|
+
alert_type: "current_usage_amount" | "billable_metric_current_usage_amount" | "billable_metric_current_usage_units" | "lifetime_usage_amount";
|
|
7277
7819
|
/**
|
|
7278
|
-
*
|
|
7279
|
-
* @
|
|
7280
|
-
* @example "2022-07-07T23:59:59Z"
|
|
7820
|
+
* Unique code used to identify the alert.
|
|
7821
|
+
* @example "storage_threshold_alert"
|
|
7281
7822
|
*/
|
|
7282
|
-
|
|
7823
|
+
code: string;
|
|
7824
|
+
})[];
|
|
7825
|
+
}
|
|
7826
|
+
export interface AlertUpdateInput {
|
|
7827
|
+
alert: AlertBaseInput & {
|
|
7283
7828
|
/**
|
|
7284
|
-
*
|
|
7285
|
-
* @example
|
|
7829
|
+
* The code of the billable metric associated with the alert. Only for alerts based on a billable metric.
|
|
7830
|
+
* @example "storage_usage"
|
|
7286
7831
|
*/
|
|
7287
|
-
|
|
7288
|
-
/** List of recurring transaction rules. Currently, we only allow one recurring rule per wallet. */
|
|
7289
|
-
recurring_transaction_rules?: {
|
|
7290
|
-
/**
|
|
7291
|
-
* A unique identifier for the recurring transaction rule in the Lago application. Can be used to update a recurring transaction rule.
|
|
7292
|
-
* @format uuid
|
|
7293
|
-
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
7294
|
-
*/
|
|
7295
|
-
lago_id?: string;
|
|
7296
|
-
/**
|
|
7297
|
-
* The trigger. Possible values are `interval` or `threshold`.
|
|
7298
|
-
* @example "interval"
|
|
7299
|
-
*/
|
|
7300
|
-
trigger?: "interval" | "threshold";
|
|
7301
|
-
/**
|
|
7302
|
-
* The method used for recurring top-up. Possible values are `fixed` or `target`.
|
|
7303
|
-
* @example "target"
|
|
7304
|
-
*/
|
|
7305
|
-
method?: "fixed" | "target";
|
|
7306
|
-
/**
|
|
7307
|
-
* The interval used for recurring top-up. It represents the frequency at which automatic top-up occurs. The interval can be one of the following values: `weekly`, `monthly`, `quarterly`, `semiannual` or `yearly`. Required only when trigger is set to `interval`.
|
|
7308
|
-
* @example "monthly"
|
|
7309
|
-
*/
|
|
7310
|
-
interval?: "weekly" | "monthly" | "quarterly" | "semiannual" | "yearly";
|
|
7311
|
-
/**
|
|
7312
|
-
* The threshold for recurring top-ups is the value at which an automatic top-up is triggered. For example, if this threshold is set at 10 credits, an automatic top-up will occur whenever the wallet balance falls to or below 10 credits. Required only when trigger is set to `threshold`.
|
|
7313
|
-
* @pattern ^[0-9]+.?[0-9]*$
|
|
7314
|
-
* @example "20.0"
|
|
7315
|
-
*/
|
|
7316
|
-
threshold_credits?: string;
|
|
7317
|
-
/**
|
|
7318
|
-
* The number of paid credits. Required only if there is no granted credits.
|
|
7319
|
-
* @pattern ^[0-9]+.?[0-9]*$
|
|
7320
|
-
* @example "20.0"
|
|
7321
|
-
*/
|
|
7322
|
-
paid_credits?: string | null;
|
|
7323
|
-
/**
|
|
7324
|
-
* The number of free granted credits. Required only if there is no paid credits.
|
|
7325
|
-
* @pattern ^[0-9]+.?[0-9]*$
|
|
7326
|
-
* @example "10.0"
|
|
7327
|
-
*/
|
|
7328
|
-
granted_credits?: string | null;
|
|
7329
|
-
/**
|
|
7330
|
-
* The effective start date for recurring top-ups. This date should be provided in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC).
|
|
7331
|
-
* @format date-time
|
|
7332
|
-
* @example "2022-08-08T00:00:00Z"
|
|
7333
|
-
*/
|
|
7334
|
-
started_at?: string | null;
|
|
7335
|
-
/**
|
|
7336
|
-
* The expiration date and time for this specific recurring transaction rule. It follows the ISO 8601 datetime format and is expressed in Coordinated Universal Time (UTC).
|
|
7337
|
-
* @format date-time
|
|
7338
|
-
* @example "2023-09-30T23:59:59Z"
|
|
7339
|
-
*/
|
|
7340
|
-
expiration_at?: string | null;
|
|
7341
|
-
/**
|
|
7342
|
-
* The target ongoing balance is the value set for the ongoing balance to be reached by the automatic top-up. Required only when trigger is set to `target`.
|
|
7343
|
-
* @pattern ^[0-9]+.?[0-9]*$
|
|
7344
|
-
* @example "200.0"
|
|
7345
|
-
*/
|
|
7346
|
-
target_ongoing_balance?: string;
|
|
7347
|
-
/**
|
|
7348
|
-
* 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.
|
|
7349
|
-
* @example false
|
|
7350
|
-
*/
|
|
7351
|
-
invoice_requires_successful_payment?: boolean;
|
|
7352
|
-
/**
|
|
7353
|
-
* 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.
|
|
7354
|
-
* @example [{"key":"example_key","value":"example_value"},{"key":"another_key","value":"another_value"}]
|
|
7355
|
-
*/
|
|
7356
|
-
transaction_metadata?: {
|
|
7357
|
-
/** The unique identifier for the attribute. */
|
|
7358
|
-
key?: string;
|
|
7359
|
-
/** The value associated with the key. */
|
|
7360
|
-
value?: string;
|
|
7361
|
-
}[];
|
|
7362
|
-
/**
|
|
7363
|
-
* The name of the wallet transactions triggered by this rule. It will appear on the invoice as the label for the fee. If not set, the label on the invoice will fallback to either `Prepaid credits - {{wallet_name}}` if the wallet name is set, or `Prepaid credits`.
|
|
7364
|
-
* @example "Tokens for models 'high-fidelity-boost'"
|
|
7365
|
-
*/
|
|
7366
|
-
transaction_name?: string | null;
|
|
7367
|
-
/** Optional payment method to use for processing recurring top-up payments. */
|
|
7368
|
-
payment_method?: PaymentMethodReference;
|
|
7369
|
-
}[];
|
|
7370
|
-
/** Optional payment method to use for processing wallet top-up payments. */
|
|
7371
|
-
payment_method?: PaymentMethodReference;
|
|
7372
|
-
/** Set wallet limitations to fee types. */
|
|
7373
|
-
applies_to?: {
|
|
7374
|
-
/**
|
|
7375
|
-
* An array of fee types to which the wallet is applicable. By specifying the fee types in this field, you can restrict the wallet's usage to specific fee types only.
|
|
7376
|
-
* @example ["charge"]
|
|
7377
|
-
*/
|
|
7378
|
-
fee_types?: any[] | null;
|
|
7379
|
-
/**
|
|
7380
|
-
* An array of billable metric codes to which the wallet is applicable. By specifying the billable metric codes in this field, you can restrict the wallet's usage to specific metrics only.
|
|
7381
|
-
* @example []
|
|
7382
|
-
*/
|
|
7383
|
-
billable_metric_codes?: any[] | null;
|
|
7384
|
-
};
|
|
7385
|
-
/** Metadata to set as key-value pairs. Keys are strings (max 100 characters), values can be strings (max 255 characters) or null. */
|
|
7386
|
-
metadata?: MetadataInput;
|
|
7832
|
+
billable_metric_code?: string | null;
|
|
7387
7833
|
};
|
|
7388
7834
|
}
|
|
7389
|
-
export
|
|
7835
|
+
export type SubscriptionEntitlementPrivilegeObject = FeaturePrivilegeObject & {
|
|
7390
7836
|
/**
|
|
7391
|
-
*
|
|
7392
|
-
*
|
|
7837
|
+
* Applicable value this this subscription (override_value if set, plan_value otherwise). Type depends on the privilege's value_type.
|
|
7838
|
+
* @example 10
|
|
7393
7839
|
*/
|
|
7394
|
-
|
|
7840
|
+
value: number | boolean | string;
|
|
7841
|
+
/**
|
|
7842
|
+
* Value assigned to this privilege in the plan. Type depends on the privilege's value_type.
|
|
7843
|
+
* @example 10
|
|
7844
|
+
*/
|
|
7845
|
+
plan_value: number | boolean | string;
|
|
7846
|
+
/**
|
|
7847
|
+
* Value assigned to this subscription specifically. Type depends on the privilege's value_type. Null if no override is set.
|
|
7848
|
+
* @example 10
|
|
7849
|
+
*/
|
|
7850
|
+
override_value: number | boolean | string | null;
|
|
7851
|
+
};
|
|
7852
|
+
export interface SubscriptionEntitlementObject {
|
|
7853
|
+
/**
|
|
7854
|
+
* Unique code used to identify the feature. Max 255 characters.
|
|
7855
|
+
* @example "seats"
|
|
7856
|
+
*/
|
|
7857
|
+
code: string;
|
|
7858
|
+
/**
|
|
7859
|
+
* Name of the feature. Max 255 characters.
|
|
7860
|
+
* @example "Number of seats"
|
|
7861
|
+
*/
|
|
7862
|
+
name: string | null;
|
|
7863
|
+
/**
|
|
7864
|
+
* Description of the feature. Max 600 characters.
|
|
7865
|
+
* @example "Number of users of the account"
|
|
7866
|
+
*/
|
|
7867
|
+
description: string | null;
|
|
7868
|
+
/**
|
|
7869
|
+
* Privileges associated with this feature. Each privilege shows the plan value and any subscription override.
|
|
7870
|
+
* @example [{"code":"max","name":"Maximum","value_type":"integer","config":{},"value":15,"plan_value":10,"override_value":15},{"code":"max_admins","name":"Max Admins","value_type":"integer","config":{},"value":5,"plan_value":5,"override_value":null},{"code":"root","name":"Allow root user","value_type":"boolean","config":{},"value":true,"plan_value":true,"override_value":null},{"code":"provider","name":"SSO Provider","value_type":"select","value":"okta","plan_value":"google","override_value":"okta","config":{"select_options":["google","okta"]}}]
|
|
7871
|
+
*/
|
|
7872
|
+
privileges: SubscriptionEntitlementPrivilegeObject[];
|
|
7873
|
+
/** @example {"max":15,"provider":"okta"} */
|
|
7874
|
+
overrides: Record<string, any>;
|
|
7875
|
+
}
|
|
7876
|
+
export interface SubscriptionEntitlements {
|
|
7877
|
+
entitlements: SubscriptionEntitlementObject[];
|
|
7878
|
+
}
|
|
7879
|
+
export interface SubscriptionEntitlement {
|
|
7880
|
+
entitlement: SubscriptionEntitlementObject;
|
|
7881
|
+
}
|
|
7882
|
+
export interface SubscriptionChargeOverride {
|
|
7883
|
+
/** Properties of a charge that can be overridden at the subscription level. */
|
|
7884
|
+
charge: ChargeOverridableInput;
|
|
7885
|
+
}
|
|
7886
|
+
export interface SubscriptionFixedChargeOverride {
|
|
7887
|
+
/** Properties of a fixed charge that can be overridden at the subscription level. */
|
|
7888
|
+
fixed_charge: FixedChargeOverridableInput;
|
|
7889
|
+
}
|
|
7890
|
+
export interface TaxesPaginated {
|
|
7891
|
+
taxes: TaxObject[];
|
|
7892
|
+
meta: PaginationMeta;
|
|
7893
|
+
}
|
|
7894
|
+
export interface TaxBaseInput {
|
|
7895
|
+
/**
|
|
7896
|
+
* Name of the tax.
|
|
7897
|
+
* @example "TVA"
|
|
7898
|
+
*/
|
|
7899
|
+
name?: string;
|
|
7900
|
+
/**
|
|
7901
|
+
* Unique code used to identify the tax associated with the API request.
|
|
7902
|
+
* @example "french_standard_vat"
|
|
7903
|
+
*/
|
|
7904
|
+
code?: string;
|
|
7905
|
+
/**
|
|
7906
|
+
* The percentage rate of the tax
|
|
7907
|
+
* @pattern ^[0-9]+.?[0-9]*$
|
|
7908
|
+
* @example "20.0"
|
|
7909
|
+
*/
|
|
7910
|
+
rate?: string;
|
|
7911
|
+
/**
|
|
7912
|
+
* Internal description of the taxe
|
|
7913
|
+
* @example "French standard VAT"
|
|
7914
|
+
*/
|
|
7915
|
+
description?: string | null;
|
|
7916
|
+
/**
|
|
7917
|
+
* This field is deprecated and will be removed in a future version. When set to true, it applies the tax to the organization's default billing entity. To apply or remove a tax from any billing entity (including the default one), please use the `PUT /billing_entities/:code` endpoint instead.
|
|
7918
|
+
* @deprecated
|
|
7919
|
+
* @example true
|
|
7920
|
+
*/
|
|
7921
|
+
applied_to_organization?: boolean;
|
|
7922
|
+
}
|
|
7923
|
+
export interface TaxCreateInput {
|
|
7924
|
+
tax: TaxBaseInput;
|
|
7925
|
+
}
|
|
7926
|
+
export interface Tax {
|
|
7927
|
+
tax: TaxObject;
|
|
7928
|
+
}
|
|
7929
|
+
export interface TaxUpdateInput {
|
|
7930
|
+
tax: TaxBaseInput;
|
|
7395
7931
|
}
|
|
7396
7932
|
export interface WalletTransactionCreateInput {
|
|
7397
7933
|
wallet_transaction: {
|
|
@@ -7436,6 +7972,8 @@ export interface WalletTransactionCreateInput {
|
|
|
7436
7972
|
* @example false
|
|
7437
7973
|
*/
|
|
7438
7974
|
ignore_paid_top_up_limits?: boolean;
|
|
7975
|
+
/** Configuration for invoice custom sections to apply to invoices generated by this resource. */
|
|
7976
|
+
invoice_custom_section?: InvoiceCustomSectionInput;
|
|
7439
7977
|
/** Optional payment method to use for processing the wallet transaction payment. */
|
|
7440
7978
|
payment_method?: PaymentMethodReference;
|
|
7441
7979
|
/**
|
|
@@ -7458,6 +7996,12 @@ export interface WalletTransactionObject {
|
|
|
7458
7996
|
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
7459
7997
|
*/
|
|
7460
7998
|
lago_wallet_id: string;
|
|
7999
|
+
/**
|
|
8000
|
+
* Unique identifier of the invoice that was voided and triggered the creation of this inbound wallet transaction. Only present for inbound transactions on traceable wallets that were created as a result of an invoice void.
|
|
8001
|
+
* @format uuid
|
|
8002
|
+
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
8003
|
+
*/
|
|
8004
|
+
lago_voided_invoice_id?: string | null;
|
|
7461
8005
|
/**
|
|
7462
8006
|
* The status of the wallet transaction. Possible values are `pending`, `settled` or `failed`.
|
|
7463
8007
|
* @example "settled"
|
|
@@ -7505,6 +8049,17 @@ export interface WalletTransactionObject {
|
|
|
7505
8049
|
/** The value associated with the key. */
|
|
7506
8050
|
value?: string;
|
|
7507
8051
|
}[];
|
|
8052
|
+
/**
|
|
8053
|
+
* The remaining unconsumed amount of an inbound wallet transaction, expressed in cents. Only present for inbound transactions on traceable wallets. Tracks how much of the original credited amount has not yet been consumed by outbound transactions.
|
|
8054
|
+
* @example 5000
|
|
8055
|
+
*/
|
|
8056
|
+
remaining_amount_cents?: number | null;
|
|
8057
|
+
/**
|
|
8058
|
+
* The remaining unconsumed amount of an inbound wallet transaction, expressed in credits. Only present for inbound transactions on traceable wallets.
|
|
8059
|
+
* @pattern ^[0-9]+.?[0-9]*$
|
|
8060
|
+
* @example "5.0"
|
|
8061
|
+
*/
|
|
8062
|
+
remaining_credit_amount?: string | null;
|
|
7508
8063
|
/**
|
|
7509
8064
|
* The date when wallet transaction is settled, represented in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC).
|
|
7510
8065
|
* @format date-time
|
|
@@ -7528,6 +8083,8 @@ export interface WalletTransactionObject {
|
|
|
7528
8083
|
* @example "Tokens for models 'high-fidelity-boost'"
|
|
7529
8084
|
*/
|
|
7530
8085
|
name: string | null;
|
|
8086
|
+
/** The invoice custom sections applied to invoices generated by this wallet transaction. */
|
|
8087
|
+
applied_invoice_custom_sections?: AppliedInvoiceCustomSectionObject[];
|
|
7531
8088
|
/** The payment method assigned to this wallet transaction for processing the payment. */
|
|
7532
8089
|
payment_method?: PaymentMethodReference;
|
|
7533
8090
|
}
|
|
@@ -7564,6 +8121,70 @@ export interface WalletTransactionPaymentUrl {
|
|
|
7564
8121
|
payment_url?: string;
|
|
7565
8122
|
};
|
|
7566
8123
|
}
|
|
8124
|
+
export interface WalletTransactionConsumptionObject {
|
|
8125
|
+
/**
|
|
8126
|
+
* Unique identifier assigned to the wallet transaction consumption within the Lago application.
|
|
8127
|
+
* @format uuid
|
|
8128
|
+
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
8129
|
+
*/
|
|
8130
|
+
lago_id: string;
|
|
8131
|
+
/**
|
|
8132
|
+
* The amount consumed from the inbound wallet transaction, expressed in cents.
|
|
8133
|
+
* @example 5000
|
|
8134
|
+
*/
|
|
8135
|
+
amount_cents: number;
|
|
8136
|
+
/**
|
|
8137
|
+
* The amount consumed from the inbound wallet transaction, expressed in credits.
|
|
8138
|
+
* @pattern ^[0-9]+.?[0-9]*$
|
|
8139
|
+
* @example "5.0"
|
|
8140
|
+
*/
|
|
8141
|
+
credit_amount: string;
|
|
8142
|
+
/**
|
|
8143
|
+
* The date of the consumption record creation, represented in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC).
|
|
8144
|
+
* @format date-time
|
|
8145
|
+
* @example "2022-04-29T08:59:51Z"
|
|
8146
|
+
*/
|
|
8147
|
+
created_at: string;
|
|
8148
|
+
wallet_transaction: WalletTransactionObject;
|
|
8149
|
+
}
|
|
8150
|
+
export interface WalletTransactionConsumptions {
|
|
8151
|
+
wallet_transaction_consumptions: WalletTransactionConsumptionObject[];
|
|
8152
|
+
}
|
|
8153
|
+
export type WalletTransactionConsumptionsPaginated = WalletTransactionConsumptions & {
|
|
8154
|
+
meta: PaginationMeta;
|
|
8155
|
+
};
|
|
8156
|
+
export interface WalletTransactionFundingObject {
|
|
8157
|
+
/**
|
|
8158
|
+
* Unique identifier assigned to the wallet transaction funding within the Lago application.
|
|
8159
|
+
* @format uuid
|
|
8160
|
+
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
8161
|
+
*/
|
|
8162
|
+
lago_id: string;
|
|
8163
|
+
/**
|
|
8164
|
+
* The amount funded from the inbound wallet transaction, expressed in cents.
|
|
8165
|
+
* @example 5000
|
|
8166
|
+
*/
|
|
8167
|
+
amount_cents: number;
|
|
8168
|
+
/**
|
|
8169
|
+
* The amount funded from the inbound wallet transaction, expressed in credits.
|
|
8170
|
+
* @pattern ^[0-9]+.?[0-9]*$
|
|
8171
|
+
* @example "5.0"
|
|
8172
|
+
*/
|
|
8173
|
+
credit_amount: string;
|
|
8174
|
+
/**
|
|
8175
|
+
* The date of the funding record creation, represented in ISO 8601 datetime format and expressed in Coordinated Universal Time (UTC).
|
|
8176
|
+
* @format date-time
|
|
8177
|
+
* @example "2022-04-29T08:59:51Z"
|
|
8178
|
+
*/
|
|
8179
|
+
created_at: string;
|
|
8180
|
+
wallet_transaction: WalletTransactionObject;
|
|
8181
|
+
}
|
|
8182
|
+
export interface WalletTransactionFundings {
|
|
8183
|
+
wallet_transaction_fundings: WalletTransactionFundingObject[];
|
|
8184
|
+
}
|
|
8185
|
+
export type WalletTransactionFundingsPaginated = WalletTransactionFundings & {
|
|
8186
|
+
meta: PaginationMeta;
|
|
8187
|
+
};
|
|
7567
8188
|
export type WalletTransactionsPaginated = WalletTransactions & {
|
|
7568
8189
|
meta: PaginationMeta;
|
|
7569
8190
|
};
|
|
@@ -7662,6 +8283,11 @@ export interface TriggeredAlertObject {
|
|
|
7662
8283
|
* @example "sub_1234567890"
|
|
7663
8284
|
*/
|
|
7664
8285
|
external_subscription_id: string;
|
|
8286
|
+
/**
|
|
8287
|
+
* The customer external unique identifier (provided by your own application).
|
|
8288
|
+
* @example "cust_1234567890"
|
|
8289
|
+
*/
|
|
8290
|
+
external_customer_id: string;
|
|
7665
8291
|
/**
|
|
7666
8292
|
* The code of the billable metric associated with the alert. Only for alerts based on a billable metric.
|
|
7667
8293
|
* @example "storage_usage"
|
|
@@ -8025,6 +8651,8 @@ export type SubscriptionWithThresholdObject = SubscriptionObject & {
|
|
|
8025
8651
|
plan: PlanObject;
|
|
8026
8652
|
customer: CustomerObject;
|
|
8027
8653
|
usage_threshold: UsageThresholdObject;
|
|
8654
|
+
/** List of usage thresholds applicable to this subscription. */
|
|
8655
|
+
applicable_usage_thresholds?: ApplicableUsageThreshold[];
|
|
8028
8656
|
};
|
|
8029
8657
|
export type WalletTransactionObjectExtended = WalletTransactionObject & {
|
|
8030
8658
|
wallet?: WalletObject;
|
|
@@ -8125,8 +8753,8 @@ export declare class HttpClient<SecurityDataType = unknown> {
|
|
|
8125
8753
|
}
|
|
8126
8754
|
/**
|
|
8127
8755
|
* @title Lago API documentation
|
|
8128
|
-
* @version 1.
|
|
8129
|
-
* @license AGPLv3
|
|
8756
|
+
* @version 1.44.0
|
|
8757
|
+
* @license AGPLv3 (https://github.com/getlago/lago-openapi/blob/main/LICENSE)
|
|
8130
8758
|
* @baseUrl https://api.getlago.com/api/v1
|
|
8131
8759
|
* @externalDocs https://github.com/getlago
|
|
8132
8760
|
* @contact <tech@getlago.com>
|
|
@@ -9388,10 +10016,20 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
9388
10016
|
*/
|
|
9389
10017
|
"status[]"?: ("pending" | "canceled" | "terminated" | "active")[];
|
|
9390
10018
|
}, params?: RequestParams) => Promise<HttpResponse<SubscriptionsPaginated, ApiErrorUnauthorized | ApiErrorNotFound>>;
|
|
10019
|
+
/**
|
|
10020
|
+
* @description This endpoint is used to create a wallet with prepaid credits.
|
|
10021
|
+
*
|
|
10022
|
+
* @tags wallets
|
|
10023
|
+
* @name CreateCustomerWallet
|
|
10024
|
+
* @summary Create a wallet
|
|
10025
|
+
* @request POST:/customers/{external_customer_id}/wallets
|
|
10026
|
+
* @secure
|
|
10027
|
+
*/
|
|
10028
|
+
createCustomerWallet: (externalCustomerId: string, data: WalletCreateInput, params?: RequestParams) => Promise<HttpResponse<Wallet, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorBadRequest | ApiErrorForbidden>>;
|
|
9391
10029
|
/**
|
|
9392
10030
|
* @description This endpoint is used to list all wallets with prepaid credits of a customer
|
|
9393
10031
|
*
|
|
9394
|
-
* @tags
|
|
10032
|
+
* @tags wallets
|
|
9395
10033
|
* @name FindAllCustomerWallets
|
|
9396
10034
|
* @summary List all customer's wallets
|
|
9397
10035
|
* @request GET:/customers/{external_customer_id}/wallets
|
|
@@ -9409,6 +10047,136 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
9409
10047
|
*/
|
|
9410
10048
|
per_page?: number;
|
|
9411
10049
|
}, params?: RequestParams) => Promise<HttpResponse<WalletsPaginated, ApiErrorUnauthorized | ApiErrorForbidden | ApiErrorNotFound>>;
|
|
10050
|
+
/**
|
|
10051
|
+
* @description This endpoint is used to update an existing wallet with prepaid credits.
|
|
10052
|
+
*
|
|
10053
|
+
* @tags wallets
|
|
10054
|
+
* @name UpdateCustomerWallet
|
|
10055
|
+
* @summary Update a wallet
|
|
10056
|
+
* @request PUT:/customers/{external_customer_id}/wallets/{code}
|
|
10057
|
+
* @secure
|
|
10058
|
+
*/
|
|
10059
|
+
updateCustomerWallet: (externalCustomerId: string, code: string, data: WalletUpdateInput, params?: RequestParams) => Promise<HttpResponse<Wallet, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorBadRequest | ApiErrorForbidden | ApiErrorNotFound>>;
|
|
10060
|
+
/**
|
|
10061
|
+
* @description This endpoint is used to retrieve an existing wallet with prepaid credits.
|
|
10062
|
+
*
|
|
10063
|
+
* @tags wallets
|
|
10064
|
+
* @name FindCustomerWallet
|
|
10065
|
+
* @summary Retrieve a wallet
|
|
10066
|
+
* @request GET:/customers/{external_customer_id}/wallets/{code}
|
|
10067
|
+
* @secure
|
|
10068
|
+
*/
|
|
10069
|
+
findCustomerWallet: (externalCustomerId: string, code: string, params?: RequestParams) => Promise<HttpResponse<Wallet, ApiErrorUnauthorized | ApiErrorForbidden | ApiErrorNotFound>>;
|
|
10070
|
+
/**
|
|
10071
|
+
* @description This endpoint is used to terminate an existing wallet with prepaid credits.
|
|
10072
|
+
*
|
|
10073
|
+
* @tags wallets
|
|
10074
|
+
* @name DestroyCustomerWallet
|
|
10075
|
+
* @summary Terminate a wallet
|
|
10076
|
+
* @request DELETE:/customers/{external_customer_id}/wallets/{code}
|
|
10077
|
+
* @secure
|
|
10078
|
+
*/
|
|
10079
|
+
destroyCustomerWallet: (externalCustomerId: string, code: string, params?: RequestParams) => Promise<HttpResponse<Wallet, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorForbidden | ApiErrorNotFound>>;
|
|
10080
|
+
/**
|
|
10081
|
+
* @description This endpoint replaces all existing metadata on a wallet with the provided key-value pairs. Any existing metadata keys not included in the request will be removed.
|
|
10082
|
+
*
|
|
10083
|
+
* @tags wallets
|
|
10084
|
+
* @name ReplaceCustomerWalletMetadata
|
|
10085
|
+
* @summary Replace wallet metadata
|
|
10086
|
+
* @request POST:/customers/{external_customer_id}/wallets/{wallet_code}/metadata
|
|
10087
|
+
* @secure
|
|
10088
|
+
*/
|
|
10089
|
+
replaceCustomerWalletMetadata: (externalCustomerId: string, walletCode: string, data: WalletMetadataResponse, params?: RequestParams) => Promise<HttpResponse<WalletMetadataResponse, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorNotFound>>;
|
|
10090
|
+
/**
|
|
10091
|
+
* @description This endpoint merges the provided metadata with existing metadata on the wallet. Existing keys not in the request are preserved. New keys are added, existing keys are updated.
|
|
10092
|
+
*
|
|
10093
|
+
* @tags wallets
|
|
10094
|
+
* @name MergeCustomerWalletMetadata
|
|
10095
|
+
* @summary Merge wallet metadata
|
|
10096
|
+
* @request PATCH:/customers/{external_customer_id}/wallets/{wallet_code}/metadata
|
|
10097
|
+
* @secure
|
|
10098
|
+
*/
|
|
10099
|
+
mergeCustomerWalletMetadata: (externalCustomerId: string, walletCode: string, data: WalletMetadataResponse, params?: RequestParams) => Promise<HttpResponse<WalletMetadataResponse, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorNotFound>>;
|
|
10100
|
+
/**
|
|
10101
|
+
* @description This endpoint removes all metadata from a wallet.
|
|
10102
|
+
*
|
|
10103
|
+
* @tags wallets
|
|
10104
|
+
* @name DeleteAllCustomerWalletMetadata
|
|
10105
|
+
* @summary Delete all wallet metadata
|
|
10106
|
+
* @request DELETE:/customers/{external_customer_id}/wallets/{wallet_code}/metadata
|
|
10107
|
+
* @secure
|
|
10108
|
+
*/
|
|
10109
|
+
deleteAllCustomerWalletMetadata: (externalCustomerId: string, walletCode: string, params?: RequestParams) => Promise<HttpResponse<WalletMetadataResponse, ApiErrorUnauthorized | ApiErrorNotFound>>;
|
|
10110
|
+
/**
|
|
10111
|
+
* @description This endpoint removes a single metadata key from a wallet.
|
|
10112
|
+
*
|
|
10113
|
+
* @tags wallets
|
|
10114
|
+
* @name DeleteCustomerWalletMetadataKey
|
|
10115
|
+
* @summary Delete a metadata key
|
|
10116
|
+
* @request DELETE:/customers/{external_customer_id}/wallets/{wallet_code}/metadata/{key}
|
|
10117
|
+
* @secure
|
|
10118
|
+
*/
|
|
10119
|
+
deleteCustomerWalletMetadataKey: (externalCustomerId: string, walletCode: string, key: string, params?: RequestParams) => Promise<HttpResponse<WalletMetadataResponse, ApiErrorUnauthorized | ApiErrorNotFound>>;
|
|
10120
|
+
/**
|
|
10121
|
+
* @description This endpoint enables the retrieval of all alerts for a wallet.
|
|
10122
|
+
*
|
|
10123
|
+
* @tags wallets
|
|
10124
|
+
* @name GetCustomerWalletAlerts
|
|
10125
|
+
* @summary List wallet alerts
|
|
10126
|
+
* @request GET:/customers/{external_customer_id}/wallets/{wallet_code}/alerts
|
|
10127
|
+
* @secure
|
|
10128
|
+
*/
|
|
10129
|
+
getCustomerWalletAlerts: (externalCustomerId: string, walletCode: string, params?: RequestParams) => Promise<HttpResponse<Alerts, ApiErrorUnauthorized | ApiErrorNotFound>>;
|
|
10130
|
+
/**
|
|
10131
|
+
* @description This endpoint allows you to create new alerts for a wallet. Send a single alert object wrapped in `alert` key to create one alert, or an array of alert objects wrapped in `alerts` key to create multiple alerts atomically.
|
|
10132
|
+
*
|
|
10133
|
+
* @tags wallets
|
|
10134
|
+
* @name CreateCustomerWalletAlert
|
|
10135
|
+
* @summary Create wallet alert(s)
|
|
10136
|
+
* @request POST:/customers/{external_customer_id}/wallets/{wallet_code}/alerts
|
|
10137
|
+
* @secure
|
|
10138
|
+
*/
|
|
10139
|
+
createCustomerWalletAlert: (externalCustomerId: string, walletCode: string, data: WalletAlertCreateInput | WalletAlertBatchCreateInput, params?: RequestParams) => Promise<HttpResponse<Alerts | Alert, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorBadRequest | ApiErrorNotFound>>;
|
|
10140
|
+
/**
|
|
10141
|
+
* @description This endpoint allows you to delete all alerts for a wallet.
|
|
10142
|
+
*
|
|
10143
|
+
* @tags wallets
|
|
10144
|
+
* @name DeleteAllCustomerWalletAlerts
|
|
10145
|
+
* @summary Delete all wallet alerts
|
|
10146
|
+
* @request DELETE:/customers/{external_customer_id}/wallets/{wallet_code}/alerts
|
|
10147
|
+
* @secure
|
|
10148
|
+
*/
|
|
10149
|
+
deleteAllCustomerWalletAlerts: (externalCustomerId: string, walletCode: string, params?: RequestParams) => Promise<HttpResponse<void, ApiErrorUnauthorized | ApiErrorNotFound>>;
|
|
10150
|
+
/**
|
|
10151
|
+
* @description This endpoint enables the retrieval of a specific alert for a wallet.
|
|
10152
|
+
*
|
|
10153
|
+
* @tags wallets
|
|
10154
|
+
* @name GetCustomerWalletAlert
|
|
10155
|
+
* @summary Retrieve a wallet alert
|
|
10156
|
+
* @request GET:/customers/{external_customer_id}/wallets/{wallet_code}/alerts/{code}
|
|
10157
|
+
* @secure
|
|
10158
|
+
*/
|
|
10159
|
+
getCustomerWalletAlert: (externalCustomerId: string, walletCode: string, code: string, params?: RequestParams) => Promise<HttpResponse<Alert, ApiErrorUnauthorized | ApiErrorNotFound>>;
|
|
10160
|
+
/**
|
|
10161
|
+
* @description This endpoint allows you to update an existing alert for a wallet.
|
|
10162
|
+
*
|
|
10163
|
+
* @tags wallets
|
|
10164
|
+
* @name UpdateCustomerWalletAlert
|
|
10165
|
+
* @summary Update a wallet alert
|
|
10166
|
+
* @request PUT:/customers/{external_customer_id}/wallets/{wallet_code}/alerts/{code}
|
|
10167
|
+
* @secure
|
|
10168
|
+
*/
|
|
10169
|
+
updateCustomerWalletAlert: (externalCustomerId: string, walletCode: string, code: string, data: WalletAlertUpdateInput, params?: RequestParams) => Promise<HttpResponse<Alert, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorBadRequest | ApiErrorNotFound>>;
|
|
10170
|
+
/**
|
|
10171
|
+
* @description This endpoint allows you to delete an existing alert for a wallet.
|
|
10172
|
+
*
|
|
10173
|
+
* @tags wallets
|
|
10174
|
+
* @name DeleteCustomerWalletAlert
|
|
10175
|
+
* @summary Delete a wallet alert
|
|
10176
|
+
* @request DELETE:/customers/{external_customer_id}/wallets/{wallet_code}/alerts/{code}
|
|
10177
|
+
* @secure
|
|
10178
|
+
*/
|
|
10179
|
+
deleteCustomerWalletAlert: (externalCustomerId: string, walletCode: string, code: string, params?: RequestParams) => Promise<HttpResponse<Alert, ApiErrorUnauthorized | ApiErrorNotFound>>;
|
|
9412
10180
|
/**
|
|
9413
10181
|
* @description This endpoint enables the retrieval of the usage-based billing data for a customer within the current period.
|
|
9414
10182
|
*
|
|
@@ -9430,6 +10198,28 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
9430
10198
|
* @example true
|
|
9431
10199
|
*/
|
|
9432
10200
|
apply_taxes?: boolean;
|
|
10201
|
+
/**
|
|
10202
|
+
* Filter usage to a specific charge by its Lago ID (UUID).
|
|
10203
|
+
* @format uuid
|
|
10204
|
+
* @example "1a901a90-1a90-1a90-1a90-1a901a901a90"
|
|
10205
|
+
*/
|
|
10206
|
+
filter_by_charge_id?: string;
|
|
10207
|
+
/**
|
|
10208
|
+
* Filter usage to a specific charge by its code.
|
|
10209
|
+
* @example "storage"
|
|
10210
|
+
*/
|
|
10211
|
+
filter_by_charge_code?: string;
|
|
10212
|
+
/**
|
|
10213
|
+
* Filter usage by pricing group. Pass key/value pairs as query parameters, e.g. `filter_by_group[cloud]=aws`.
|
|
10214
|
+
* @example {"cloud":"aws"}
|
|
10215
|
+
*/
|
|
10216
|
+
filter_by_group?: Record<string, string>;
|
|
10217
|
+
/**
|
|
10218
|
+
* When `true`, returns usage since subscription start instead of the current billing period. Requires either `filter_by_charge_id`, `filter_by_charge_code`, or `filter_by_group` to be set.
|
|
10219
|
+
* @default false
|
|
10220
|
+
* @example true
|
|
10221
|
+
*/
|
|
10222
|
+
full_usage?: boolean;
|
|
9433
10223
|
}, params?: RequestParams) => Promise<HttpResponse<CustomerUsage, ApiErrorUnauthorized | ApiErrorNotFound>>;
|
|
9434
10224
|
/**
|
|
9435
10225
|
* @description This endpoint enables the retrieval of the usage-based billing data for a customer within the current period. It also returns the projected usage for the current period based on the current usage.
|
|
@@ -10238,85 +11028,268 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
10238
11028
|
*/
|
|
10239
11029
|
findAllEntitlements: (code: string, params?: RequestParams) => Promise<HttpResponse<PlanEntitlements, ApiErrorUnauthorized | ApiErrorNotFound>>;
|
|
10240
11030
|
/**
|
|
10241
|
-
* @description This accepts a list of entitlements to update. If the feature isn't part of the plan yet, it's added with all the privileges from the payload. If the feature is already part of the plan, the privilege and values are updated or added. All privileges must be valid for the feature. All features and privileges not part of the payload are left untouched. To remove privileges or features, use the DELETE endpoints.
|
|
11031
|
+
* @description This accepts a list of entitlements to update. If the feature isn't part of the plan yet, it's added with all the privileges from the payload. If the feature is already part of the plan, the privilege and values are updated or added. All privileges must be valid for the feature. All features and privileges not part of the payload are left untouched. To remove privileges or features, use the DELETE endpoints.
|
|
11032
|
+
*
|
|
11033
|
+
* @tags entitlements
|
|
11034
|
+
* @name UpdateEntitlement
|
|
11035
|
+
* @summary Partial update of an entitlement
|
|
11036
|
+
* @request PATCH:/plans/{code}/entitlements
|
|
11037
|
+
* @secure
|
|
11038
|
+
*/
|
|
11039
|
+
updateEntitlement: (code: string, data: EntitlementUpdateInput, params?: RequestParams) => Promise<HttpResponse<PlanEntitlements, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorBadRequest | ApiErrorNotFound>>;
|
|
11040
|
+
/**
|
|
11041
|
+
* @description This endpoint retrieves a specific entitlement for a plan.
|
|
11042
|
+
*
|
|
11043
|
+
* @tags entitlements
|
|
11044
|
+
* @name FindEntitlement
|
|
11045
|
+
* @summary Retrieve an entitlement
|
|
11046
|
+
* @request GET:/plans/{code}/entitlements/{feature_code}
|
|
11047
|
+
* @secure
|
|
11048
|
+
*/
|
|
11049
|
+
findEntitlement: (code: string, featureCode: string, params?: RequestParams) => Promise<HttpResponse<PlanEntitlement, ApiErrorUnauthorized | ApiErrorNotFound>>;
|
|
11050
|
+
/**
|
|
11051
|
+
* @description This endpoint deletes an existing entitlement by removing the feature from the plan.
|
|
11052
|
+
*
|
|
11053
|
+
* @tags entitlements
|
|
11054
|
+
* @name DestroyEntitlement
|
|
11055
|
+
* @summary Delete an entitlement
|
|
11056
|
+
* @request DELETE:/plans/{code}/entitlements/{feature_code}
|
|
11057
|
+
* @secure
|
|
11058
|
+
*/
|
|
11059
|
+
destroyEntitlement: (code: string, featureCode: string, params?: RequestParams) => Promise<HttpResponse<PlanEntitlement, ApiErrorUnauthorized | ApiErrorNotFound>>;
|
|
11060
|
+
/**
|
|
11061
|
+
* @description This endpoint removes a specific privilege and its value from an entitlement. The privilege remains untouched on the original feature.
|
|
11062
|
+
*
|
|
11063
|
+
* @tags entitlements
|
|
11064
|
+
* @name RemoveEntitlementPrivilege
|
|
11065
|
+
* @summary Remove a privilege from an entitlement
|
|
11066
|
+
* @request DELETE:/plans/{code}/entitlements/{feature_code}/privileges/{privilege_code}
|
|
11067
|
+
* @secure
|
|
11068
|
+
*/
|
|
11069
|
+
removeEntitlementPrivilege: (code: string, featureCode: string, privilegeCode: string, params?: RequestParams) => Promise<HttpResponse<PlanEntitlement, ApiErrorUnauthorized | ApiErrorNotFound>>;
|
|
11070
|
+
/**
|
|
11071
|
+
* @description This endpoint replaces all existing metadata on a plan with the provided key-value pairs. Any existing metadata keys not included in the request will be removed.
|
|
11072
|
+
*
|
|
11073
|
+
* @tags plans
|
|
11074
|
+
* @name ReplacePlanMetadata
|
|
11075
|
+
* @summary Replace plan metadata
|
|
11076
|
+
* @request POST:/plans/{code}/metadata
|
|
11077
|
+
* @secure
|
|
11078
|
+
*/
|
|
11079
|
+
replacePlanMetadata: (code: string, data: PlanMetadataResponse, params?: RequestParams) => Promise<HttpResponse<PlanMetadataResponse, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorNotFound>>;
|
|
11080
|
+
/**
|
|
11081
|
+
* @description This endpoint merges the provided metadata with existing metadata on the plan. Existing keys not in the request are preserved. New keys are added, existing keys are updated.
|
|
11082
|
+
*
|
|
11083
|
+
* @tags plans
|
|
11084
|
+
* @name MergePlanMetadata
|
|
11085
|
+
* @summary Merge plan metadata
|
|
11086
|
+
* @request PATCH:/plans/{code}/metadata
|
|
11087
|
+
* @secure
|
|
11088
|
+
*/
|
|
11089
|
+
mergePlanMetadata: (code: string, data: PlanMetadataResponse, params?: RequestParams) => Promise<HttpResponse<PlanMetadataResponse, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorNotFound>>;
|
|
11090
|
+
/**
|
|
11091
|
+
* @description This endpoint removes all metadata from a plan.
|
|
11092
|
+
*
|
|
11093
|
+
* @tags plans
|
|
11094
|
+
* @name DeleteAllPlanMetadata
|
|
11095
|
+
* @summary Delete all plan metadata
|
|
11096
|
+
* @request DELETE:/plans/{code}/metadata
|
|
11097
|
+
* @secure
|
|
11098
|
+
*/
|
|
11099
|
+
deleteAllPlanMetadata: (code: string, params?: RequestParams) => Promise<HttpResponse<PlanMetadataResponse, ApiErrorUnauthorized | ApiErrorNotFound>>;
|
|
11100
|
+
/**
|
|
11101
|
+
* @description This endpoint removes a single metadata key from a plan.
|
|
11102
|
+
*
|
|
11103
|
+
* @tags plans
|
|
11104
|
+
* @name DeletePlanMetadataKey
|
|
11105
|
+
* @summary Delete a metadata key
|
|
11106
|
+
* @request DELETE:/plans/{code}/metadata/{key}
|
|
11107
|
+
* @secure
|
|
11108
|
+
*/
|
|
11109
|
+
deletePlanMetadataKey: (code: string, key: string, params?: RequestParams) => Promise<HttpResponse<PlanMetadataResponse, ApiErrorUnauthorized | ApiErrorNotFound>>;
|
|
11110
|
+
/**
|
|
11111
|
+
* @description This endpoint creates a new charge for a specific plan.
|
|
11112
|
+
*
|
|
11113
|
+
* @tags plans
|
|
11114
|
+
* @name CreatePlanCharge
|
|
11115
|
+
* @summary Create a charge
|
|
11116
|
+
* @request POST:/plans/{code}/charges
|
|
11117
|
+
* @secure
|
|
11118
|
+
*/
|
|
11119
|
+
createPlanCharge: (code: string, data: ChargeCreateInput, params?: RequestParams) => Promise<HttpResponse<Charge, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorBadRequest | ApiErrorNotFound>>;
|
|
11120
|
+
/**
|
|
11121
|
+
* @description This endpoint retrieves all charges for a specific plan.
|
|
11122
|
+
*
|
|
11123
|
+
* @tags plans
|
|
11124
|
+
* @name FindAllPlanCharges
|
|
11125
|
+
* @summary List all charges for a plan
|
|
11126
|
+
* @request GET:/plans/{code}/charges
|
|
11127
|
+
* @secure
|
|
11128
|
+
*/
|
|
11129
|
+
findAllPlanCharges: (code: string, query?: {
|
|
11130
|
+
/**
|
|
11131
|
+
* Page number.
|
|
11132
|
+
* @example 1
|
|
11133
|
+
*/
|
|
11134
|
+
page?: number;
|
|
11135
|
+
/**
|
|
11136
|
+
* Number of records per page.
|
|
11137
|
+
* @example 20
|
|
11138
|
+
*/
|
|
11139
|
+
per_page?: number;
|
|
11140
|
+
}, params?: RequestParams) => Promise<HttpResponse<ChargesPaginated, ApiErrorUnauthorized | ApiErrorNotFound>>;
|
|
11141
|
+
/**
|
|
11142
|
+
* @description This endpoint retrieves a specific charge for a plan.
|
|
11143
|
+
*
|
|
11144
|
+
* @tags plans
|
|
11145
|
+
* @name FindPlanCharge
|
|
11146
|
+
* @summary Retrieve a charge
|
|
11147
|
+
* @request GET:/plans/{code}/charges/{charge_code}
|
|
11148
|
+
* @secure
|
|
11149
|
+
*/
|
|
11150
|
+
findPlanCharge: (code: string, chargeCode: string, params?: RequestParams) => Promise<HttpResponse<Charge, ApiErrorUnauthorized | ApiErrorNotFound>>;
|
|
11151
|
+
/**
|
|
11152
|
+
* @description This endpoint updates a specific charge for a plan.
|
|
11153
|
+
*
|
|
11154
|
+
* @tags plans
|
|
11155
|
+
* @name UpdatePlanCharge
|
|
11156
|
+
* @summary Update a charge
|
|
11157
|
+
* @request PUT:/plans/{code}/charges/{charge_code}
|
|
11158
|
+
* @secure
|
|
11159
|
+
*/
|
|
11160
|
+
updatePlanCharge: (code: string, chargeCode: string, data: ChargeUpdateInput, params?: RequestParams) => Promise<HttpResponse<Charge, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorBadRequest | ApiErrorNotFound>>;
|
|
11161
|
+
/**
|
|
11162
|
+
* @description This endpoint deletes a specific charge from a plan.
|
|
11163
|
+
*
|
|
11164
|
+
* @tags plans
|
|
11165
|
+
* @name DestroyPlanCharge
|
|
11166
|
+
* @summary Delete a charge
|
|
11167
|
+
* @request DELETE:/plans/{code}/charges/{charge_code}
|
|
11168
|
+
* @secure
|
|
11169
|
+
*/
|
|
11170
|
+
destroyPlanCharge: (code: string, chargeCode: string, data: ChargeDeleteInput, params?: RequestParams) => Promise<HttpResponse<Charge, ApiErrorUnauthorized | ApiErrorNotFound>>;
|
|
11171
|
+
/**
|
|
11172
|
+
* @description This endpoint creates a new filter for a specific charge.
|
|
11173
|
+
*
|
|
11174
|
+
* @tags plans
|
|
11175
|
+
* @name CreatePlanChargeFilter
|
|
11176
|
+
* @summary Create a charge filter
|
|
11177
|
+
* @request POST:/plans/{code}/charges/{charge_code}/filters
|
|
11178
|
+
* @secure
|
|
11179
|
+
*/
|
|
11180
|
+
createPlanChargeFilter: (code: string, chargeCode: string, data: ChargeFilterCreateInput, params?: RequestParams) => Promise<HttpResponse<ChargeFilterResponse, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorBadRequest | ApiErrorNotFound>>;
|
|
11181
|
+
/**
|
|
11182
|
+
* @description This endpoint retrieves all filters for a specific charge.
|
|
11183
|
+
*
|
|
11184
|
+
* @tags plans
|
|
11185
|
+
* @name FindAllPlanChargeFilters
|
|
11186
|
+
* @summary List all filters for a charge
|
|
11187
|
+
* @request GET:/plans/{code}/charges/{charge_code}/filters
|
|
11188
|
+
* @secure
|
|
11189
|
+
*/
|
|
11190
|
+
findAllPlanChargeFilters: (code: string, chargeCode: string, query?: {
|
|
11191
|
+
/**
|
|
11192
|
+
* Page number.
|
|
11193
|
+
* @example 1
|
|
11194
|
+
*/
|
|
11195
|
+
page?: number;
|
|
11196
|
+
/**
|
|
11197
|
+
* Number of records per page.
|
|
11198
|
+
* @example 20
|
|
11199
|
+
*/
|
|
11200
|
+
per_page?: number;
|
|
11201
|
+
}, params?: RequestParams) => Promise<HttpResponse<ChargeFiltersPaginated, ApiErrorUnauthorized | ApiErrorNotFound>>;
|
|
11202
|
+
/**
|
|
11203
|
+
* @description This endpoint retrieves a specific filter for a charge.
|
|
10242
11204
|
*
|
|
10243
|
-
* @tags
|
|
10244
|
-
* @name
|
|
10245
|
-
* @summary
|
|
10246
|
-
* @request
|
|
11205
|
+
* @tags plans
|
|
11206
|
+
* @name FindPlanChargeFilter
|
|
11207
|
+
* @summary Retrieve a charge filter
|
|
11208
|
+
* @request GET:/plans/{code}/charges/{charge_code}/filters/{filter_id}
|
|
10247
11209
|
* @secure
|
|
10248
11210
|
*/
|
|
10249
|
-
|
|
11211
|
+
findPlanChargeFilter: (code: string, chargeCode: string, filterId: string, params?: RequestParams) => Promise<HttpResponse<ChargeFilterResponse, ApiErrorUnauthorized | ApiErrorNotFound>>;
|
|
10250
11212
|
/**
|
|
10251
|
-
* @description This endpoint
|
|
11213
|
+
* @description This endpoint updates a specific filter for a charge.
|
|
10252
11214
|
*
|
|
10253
|
-
* @tags
|
|
10254
|
-
* @name
|
|
10255
|
-
* @summary
|
|
10256
|
-
* @request
|
|
11215
|
+
* @tags plans
|
|
11216
|
+
* @name UpdatePlanChargeFilter
|
|
11217
|
+
* @summary Update a charge filter
|
|
11218
|
+
* @request PUT:/plans/{code}/charges/{charge_code}/filters/{filter_id}
|
|
10257
11219
|
* @secure
|
|
10258
11220
|
*/
|
|
10259
|
-
|
|
11221
|
+
updatePlanChargeFilter: (code: string, chargeCode: string, filterId: string, data: ChargeFilterUpdateInput, params?: RequestParams) => Promise<HttpResponse<ChargeFilterResponse, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorBadRequest | ApiErrorNotFound>>;
|
|
10260
11222
|
/**
|
|
10261
|
-
* @description This endpoint deletes
|
|
11223
|
+
* @description This endpoint deletes a specific filter from a charge.
|
|
10262
11224
|
*
|
|
10263
|
-
* @tags
|
|
10264
|
-
* @name
|
|
10265
|
-
* @summary Delete
|
|
10266
|
-
* @request DELETE:/plans/{code}/
|
|
11225
|
+
* @tags plans
|
|
11226
|
+
* @name DestroyPlanChargeFilter
|
|
11227
|
+
* @summary Delete a charge filter
|
|
11228
|
+
* @request DELETE:/plans/{code}/charges/{charge_code}/filters/{filter_id}
|
|
10267
11229
|
* @secure
|
|
10268
11230
|
*/
|
|
10269
|
-
|
|
11231
|
+
destroyPlanChargeFilter: (code: string, chargeCode: string, filterId: string, data: ChargeFilterDeleteInput, params?: RequestParams) => Promise<HttpResponse<ChargeFilterResponse, ApiErrorUnauthorized | ApiErrorNotFound>>;
|
|
10270
11232
|
/**
|
|
10271
|
-
* @description This endpoint
|
|
11233
|
+
* @description This endpoint creates a new fixed charge for a specific plan.
|
|
10272
11234
|
*
|
|
10273
|
-
* @tags
|
|
10274
|
-
* @name
|
|
10275
|
-
* @summary
|
|
10276
|
-
* @request
|
|
11235
|
+
* @tags plans
|
|
11236
|
+
* @name CreatePlanFixedCharge
|
|
11237
|
+
* @summary Create a fixed charge
|
|
11238
|
+
* @request POST:/plans/{code}/fixed_charges
|
|
10277
11239
|
* @secure
|
|
10278
11240
|
*/
|
|
10279
|
-
|
|
11241
|
+
createPlanFixedCharge: (code: string, data: FixedChargeCreateInput, params?: RequestParams) => Promise<HttpResponse<FixedCharge, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorBadRequest | ApiErrorNotFound>>;
|
|
10280
11242
|
/**
|
|
10281
|
-
* @description This endpoint
|
|
11243
|
+
* @description This endpoint retrieves all fixed charges for a specific plan.
|
|
10282
11244
|
*
|
|
10283
11245
|
* @tags plans
|
|
10284
|
-
* @name
|
|
10285
|
-
* @summary
|
|
10286
|
-
* @request
|
|
11246
|
+
* @name FindAllPlanFixedCharges
|
|
11247
|
+
* @summary List all fixed charges for a plan
|
|
11248
|
+
* @request GET:/plans/{code}/fixed_charges
|
|
10287
11249
|
* @secure
|
|
10288
11250
|
*/
|
|
10289
|
-
|
|
11251
|
+
findAllPlanFixedCharges: (code: string, query?: {
|
|
11252
|
+
/**
|
|
11253
|
+
* Page number.
|
|
11254
|
+
* @example 1
|
|
11255
|
+
*/
|
|
11256
|
+
page?: number;
|
|
11257
|
+
/**
|
|
11258
|
+
* Number of records per page.
|
|
11259
|
+
* @example 20
|
|
11260
|
+
*/
|
|
11261
|
+
per_page?: number;
|
|
11262
|
+
}, params?: RequestParams) => Promise<HttpResponse<FixedChargesPaginated, ApiErrorUnauthorized | ApiErrorNotFound>>;
|
|
10290
11263
|
/**
|
|
10291
|
-
* @description This endpoint
|
|
11264
|
+
* @description This endpoint retrieves a specific fixed charge for a plan.
|
|
10292
11265
|
*
|
|
10293
11266
|
* @tags plans
|
|
10294
|
-
* @name
|
|
10295
|
-
* @summary
|
|
10296
|
-
* @request
|
|
11267
|
+
* @name FindPlanFixedCharge
|
|
11268
|
+
* @summary Retrieve a fixed charge
|
|
11269
|
+
* @request GET:/plans/{code}/fixed_charges/{fixed_charge_code}
|
|
10297
11270
|
* @secure
|
|
10298
11271
|
*/
|
|
10299
|
-
|
|
11272
|
+
findPlanFixedCharge: (code: string, fixedChargeCode: string, params?: RequestParams) => Promise<HttpResponse<FixedCharge, ApiErrorUnauthorized | ApiErrorNotFound>>;
|
|
10300
11273
|
/**
|
|
10301
|
-
* @description This endpoint
|
|
11274
|
+
* @description This endpoint updates a specific fixed charge for a plan.
|
|
10302
11275
|
*
|
|
10303
11276
|
* @tags plans
|
|
10304
|
-
* @name
|
|
10305
|
-
* @summary
|
|
10306
|
-
* @request
|
|
11277
|
+
* @name UpdatePlanFixedCharge
|
|
11278
|
+
* @summary Update a fixed charge
|
|
11279
|
+
* @request PUT:/plans/{code}/fixed_charges/{fixed_charge_code}
|
|
10307
11280
|
* @secure
|
|
10308
11281
|
*/
|
|
10309
|
-
|
|
11282
|
+
updatePlanFixedCharge: (code: string, fixedChargeCode: string, data: FixedChargeUpdateInput, params?: RequestParams) => Promise<HttpResponse<FixedCharge, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorBadRequest | ApiErrorNotFound>>;
|
|
10310
11283
|
/**
|
|
10311
|
-
* @description This endpoint
|
|
11284
|
+
* @description This endpoint deletes a specific fixed charge from a plan.
|
|
10312
11285
|
*
|
|
10313
11286
|
* @tags plans
|
|
10314
|
-
* @name
|
|
10315
|
-
* @summary Delete a
|
|
10316
|
-
* @request DELETE:/plans/{code}/
|
|
11287
|
+
* @name DestroyPlanFixedCharge
|
|
11288
|
+
* @summary Delete a fixed charge
|
|
11289
|
+
* @request DELETE:/plans/{code}/fixed_charges/{fixed_charge_code}
|
|
10317
11290
|
* @secure
|
|
10318
11291
|
*/
|
|
10319
|
-
|
|
11292
|
+
destroyPlanFixedCharge: (code: string, fixedChargeCode: string, data: FixedChargeDeleteInput, params?: RequestParams) => Promise<HttpResponse<FixedCharge, ApiErrorUnauthorized | ApiErrorNotFound>>;
|
|
10320
11293
|
};
|
|
10321
11294
|
subscriptions: {
|
|
10322
11295
|
/**
|
|
@@ -10328,7 +11301,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
10328
11301
|
* @request POST:/subscriptions
|
|
10329
11302
|
* @secure
|
|
10330
11303
|
*/
|
|
10331
|
-
createSubscription: (data: SubscriptionCreateInput, params?: RequestParams) => Promise<HttpResponse<
|
|
11304
|
+
createSubscription: (data: SubscriptionCreateInput, params?: RequestParams) => Promise<HttpResponse<SubscriptionExtended, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorBadRequest | ApiErrorNotFound>>;
|
|
10332
11305
|
/**
|
|
10333
11306
|
* @description This endpoint retrieves all active subscriptions.
|
|
10334
11307
|
*
|
|
@@ -10383,7 +11356,7 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
10383
11356
|
* @example "active"
|
|
10384
11357
|
*/
|
|
10385
11358
|
status?: "active" | "terminated" | "pending" | "canceled";
|
|
10386
|
-
}, params?: RequestParams) => Promise<HttpResponse<
|
|
11359
|
+
}, params?: RequestParams) => Promise<HttpResponse<SubscriptionExtended, ApiErrorUnauthorized | ApiErrorNotFound>>;
|
|
10387
11360
|
/**
|
|
10388
11361
|
* @description This endpoint allows you to update a subscription.
|
|
10389
11362
|
*
|
|
@@ -10467,7 +11440,14 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
10467
11440
|
* @request GET:/subscriptions/{external_id}/alerts
|
|
10468
11441
|
* @secure
|
|
10469
11442
|
*/
|
|
10470
|
-
getSubscriptionAlerts: (externalId: string,
|
|
11443
|
+
getSubscriptionAlerts: (externalId: string, query?: {
|
|
11444
|
+
/**
|
|
11445
|
+
* Filter by subscription status. When provided, the subscription is looked up with this status instead of the default `active` status. Possible values are `pending`, `active`, `terminated`, or `canceled`.
|
|
11446
|
+
* @default "active"
|
|
11447
|
+
* @example "active"
|
|
11448
|
+
*/
|
|
11449
|
+
subscription_status?: "pending" | "active" | "terminated" | "canceled";
|
|
11450
|
+
}, params?: RequestParams) => Promise<HttpResponse<Alerts, ApiErrorUnauthorized | ApiErrorNotFound>>;
|
|
10471
11451
|
/**
|
|
10472
11452
|
* @description This endpoint allows you to create alerts for a subscription. Send a single alert object wrapped in `alert` key to create one alert, or an array of alert objects wrapped in `alerts` key to create multiple alerts atomically.
|
|
10473
11453
|
*
|
|
@@ -10477,7 +11457,14 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
10477
11457
|
* @request POST:/subscriptions/{external_id}/alerts
|
|
10478
11458
|
* @secure
|
|
10479
11459
|
*/
|
|
10480
|
-
createSubscriptionAlert: (externalId: string, data: AlertCreateInput | AlertBatchCreateInput,
|
|
11460
|
+
createSubscriptionAlert: (externalId: string, data: AlertCreateInput | AlertBatchCreateInput, query?: {
|
|
11461
|
+
/**
|
|
11462
|
+
* Filter by subscription status. When provided, the subscription is looked up with this status instead of the default `active` status. Possible values are `pending`, `active`, `terminated`, or `canceled`.
|
|
11463
|
+
* @default "active"
|
|
11464
|
+
* @example "active"
|
|
11465
|
+
*/
|
|
11466
|
+
subscription_status?: "pending" | "active" | "terminated" | "canceled";
|
|
11467
|
+
}, params?: RequestParams) => Promise<HttpResponse<Alerts | Alert, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorBadRequest | ApiErrorNotFound>>;
|
|
10481
11468
|
/**
|
|
10482
11469
|
* @description This endpoint allows you to delete all alerts for a subscription.
|
|
10483
11470
|
*
|
|
@@ -10487,7 +11474,14 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
10487
11474
|
* @request DELETE:/subscriptions/{external_id}/alerts
|
|
10488
11475
|
* @secure
|
|
10489
11476
|
*/
|
|
10490
|
-
deleteAllSubscriptionAlerts: (externalId: string,
|
|
11477
|
+
deleteAllSubscriptionAlerts: (externalId: string, query?: {
|
|
11478
|
+
/**
|
|
11479
|
+
* Filter by subscription status. When provided, the subscription is looked up with this status instead of the default `active` status. Possible values are `pending`, `active`, `terminated`, or `canceled`.
|
|
11480
|
+
* @default "active"
|
|
11481
|
+
* @example "active"
|
|
11482
|
+
*/
|
|
11483
|
+
subscription_status?: "pending" | "active" | "terminated" | "canceled";
|
|
11484
|
+
}, params?: RequestParams) => Promise<HttpResponse<void, ApiErrorUnauthorized | ApiErrorNotFound>>;
|
|
10491
11485
|
/**
|
|
10492
11486
|
* @description This endpoint enables the retrieval of a specific alert for a subscription.
|
|
10493
11487
|
*
|
|
@@ -10497,7 +11491,14 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
10497
11491
|
* @request GET:/subscriptions/{external_id}/alerts/{code}
|
|
10498
11492
|
* @secure
|
|
10499
11493
|
*/
|
|
10500
|
-
getSubscriptionAlert: (externalId: string, code: string,
|
|
11494
|
+
getSubscriptionAlert: (externalId: string, code: string, query?: {
|
|
11495
|
+
/**
|
|
11496
|
+
* Filter by subscription status. When provided, the subscription is looked up with this status instead of the default `active` status. Possible values are `pending`, `active`, `terminated`, or `canceled`.
|
|
11497
|
+
* @default "active"
|
|
11498
|
+
* @example "active"
|
|
11499
|
+
*/
|
|
11500
|
+
subscription_status?: "pending" | "active" | "terminated" | "canceled";
|
|
11501
|
+
}, params?: RequestParams) => Promise<HttpResponse<Alert, ApiErrorUnauthorized | ApiErrorNotFound>>;
|
|
10501
11502
|
/**
|
|
10502
11503
|
* @description This endpoint allows you to update an existing alert for a subscription.
|
|
10503
11504
|
*
|
|
@@ -10507,7 +11508,14 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
10507
11508
|
* @request PUT:/subscriptions/{external_id}/alerts/{code}
|
|
10508
11509
|
* @secure
|
|
10509
11510
|
*/
|
|
10510
|
-
updateSubscriptionAlert: (externalId: string, code: string, data: AlertUpdateInput,
|
|
11511
|
+
updateSubscriptionAlert: (externalId: string, code: string, data: AlertUpdateInput, query?: {
|
|
11512
|
+
/**
|
|
11513
|
+
* Filter by subscription status. When provided, the subscription is looked up with this status instead of the default `active` status. Possible values are `pending`, `active`, `terminated`, or `canceled`.
|
|
11514
|
+
* @default "active"
|
|
11515
|
+
* @example "active"
|
|
11516
|
+
*/
|
|
11517
|
+
subscription_status?: "pending" | "active" | "terminated" | "canceled";
|
|
11518
|
+
}, params?: RequestParams) => Promise<HttpResponse<Alert, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorBadRequest | ApiErrorNotFound>>;
|
|
10511
11519
|
/**
|
|
10512
11520
|
* @description This endpoint allows you to delete an existing alert for a subscription.
|
|
10513
11521
|
*
|
|
@@ -10517,7 +11525,14 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
10517
11525
|
* @request DELETE:/subscriptions/{external_id}/alerts/{code}
|
|
10518
11526
|
* @secure
|
|
10519
11527
|
*/
|
|
10520
|
-
deleteSubscriptionAlert: (externalId: string, code: string,
|
|
11528
|
+
deleteSubscriptionAlert: (externalId: string, code: string, query?: {
|
|
11529
|
+
/**
|
|
11530
|
+
* Filter by subscription status. When provided, the subscription is looked up with this status instead of the default `active` status. Possible values are `pending`, `active`, `terminated`, or `canceled`.
|
|
11531
|
+
* @default "active"
|
|
11532
|
+
* @example "active"
|
|
11533
|
+
*/
|
|
11534
|
+
subscription_status?: "pending" | "active" | "terminated" | "canceled";
|
|
11535
|
+
}, params?: RequestParams) => Promise<HttpResponse<Alert, ApiErrorUnauthorized | ApiErrorNotFound>>;
|
|
10521
11536
|
/**
|
|
10522
11537
|
* @description This endpoint retrieves all entitlements for a specific subscription, including both plan entitlements and any subscription-specific overrides.
|
|
10523
11538
|
*
|
|
@@ -10527,7 +11542,14 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
10527
11542
|
* @request GET:/subscriptions/{external_id}/entitlements
|
|
10528
11543
|
* @secure
|
|
10529
11544
|
*/
|
|
10530
|
-
findAllSubscriptionEntitlements: (externalId: string,
|
|
11545
|
+
findAllSubscriptionEntitlements: (externalId: string, query?: {
|
|
11546
|
+
/**
|
|
11547
|
+
* Filter by subscription status. When provided, the subscription is looked up with this status instead of the default `active` status. Possible values are `pending`, `active`, `terminated`, or `canceled`.
|
|
11548
|
+
* @default "active"
|
|
11549
|
+
* @example "active"
|
|
11550
|
+
*/
|
|
11551
|
+
subscription_status?: "pending" | "active" | "terminated" | "canceled";
|
|
11552
|
+
}, params?: RequestParams) => Promise<HttpResponse<SubscriptionEntitlements, ApiErrorUnauthorized | ApiErrorNotFound>>;
|
|
10531
11553
|
/**
|
|
10532
11554
|
* @description This accepts a list of entitlements to update. If the feature isn't part of the subscription yet, it's added with all the privileges from the payload. If the feature is already part of the subscription (via plan or via override), the privilege and values are updated or added. All privileges must be valid for the feature. All features and privileges not part of the payload are left untouched. To remove privileges or features, use the DELETE endpoints.
|
|
10533
11555
|
*
|
|
@@ -10537,7 +11559,14 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
10537
11559
|
* @request PATCH:/subscriptions/{external_id}/entitlements
|
|
10538
11560
|
* @secure
|
|
10539
11561
|
*/
|
|
10540
|
-
updateSubscriptionEntitlements: (externalId: string, data: EntitlementUpdateInput,
|
|
11562
|
+
updateSubscriptionEntitlements: (externalId: string, data: EntitlementUpdateInput, query?: {
|
|
11563
|
+
/**
|
|
11564
|
+
* Filter by subscription status. When provided, the subscription is looked up with this status instead of the default `active` status. Possible values are `pending`, `active`, `terminated`, or `canceled`.
|
|
11565
|
+
* @default "active"
|
|
11566
|
+
* @example "active"
|
|
11567
|
+
*/
|
|
11568
|
+
subscription_status?: "pending" | "active" | "terminated" | "canceled";
|
|
11569
|
+
}, params?: RequestParams) => Promise<HttpResponse<SubscriptionEntitlements, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorBadRequest | ApiErrorNotFound>>;
|
|
10541
11570
|
/**
|
|
10542
11571
|
* @description This endpoint removes a specific feature entitlement from a subscription. The entitlement remains available from the plan.
|
|
10543
11572
|
*
|
|
@@ -10547,7 +11576,14 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
10547
11576
|
* @request DELETE:/subscriptions/{external_id}/entitlements/{feature_code}
|
|
10548
11577
|
* @secure
|
|
10549
11578
|
*/
|
|
10550
|
-
destroySubscriptionEntitlement: (externalId: string, featureCode: string,
|
|
11579
|
+
destroySubscriptionEntitlement: (externalId: string, featureCode: string, query?: {
|
|
11580
|
+
/**
|
|
11581
|
+
* Filter by subscription status. When provided, the subscription is looked up with this status instead of the default `active` status. Possible values are `pending`, `active`, `terminated`, or `canceled`.
|
|
11582
|
+
* @default "active"
|
|
11583
|
+
* @example "active"
|
|
11584
|
+
*/
|
|
11585
|
+
subscription_status?: "pending" | "active" | "terminated" | "canceled";
|
|
11586
|
+
}, params?: RequestParams) => Promise<HttpResponse<SubscriptionEntitlement, ApiErrorUnauthorized | ApiErrorNotFound>>;
|
|
10551
11587
|
/**
|
|
10552
11588
|
* @description This endpoint removes a specific privilege from a subscription entitlement. The privilege entitlement remains available from the plan.
|
|
10553
11589
|
*
|
|
@@ -10557,17 +11593,231 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
10557
11593
|
* @request DELETE:/subscriptions/{external_id}/entitlements/{feature_code}/privileges/{privilege_code}
|
|
10558
11594
|
* @secure
|
|
10559
11595
|
*/
|
|
10560
|
-
destroySubscriptionEntitlementPrivilege: (externalId: string, featureCode: string, privilegeCode: string,
|
|
11596
|
+
destroySubscriptionEntitlementPrivilege: (externalId: string, featureCode: string, privilegeCode: string, query?: {
|
|
11597
|
+
/**
|
|
11598
|
+
* Filter by subscription status. When provided, the subscription is looked up with this status instead of the default `active` status. Possible values are `pending`, `active`, `terminated`, or `canceled`.
|
|
11599
|
+
* @default "active"
|
|
11600
|
+
* @example "active"
|
|
11601
|
+
*/
|
|
11602
|
+
subscription_status?: "pending" | "active" | "terminated" | "canceled";
|
|
11603
|
+
}, params?: RequestParams) => Promise<HttpResponse<SubscriptionEntitlement, ApiErrorUnauthorized | ApiErrorBadRequest | ApiErrorNotFound>>;
|
|
10561
11604
|
/**
|
|
10562
|
-
* @description This endpoint retrieves all fixed charges for a specific subscription.
|
|
11605
|
+
* @description This endpoint retrieves all effective fixed charges for a specific subscription. If the subscription has plan overrides with fixed charge overrides, the overridden fixed charges are returned.
|
|
10563
11606
|
*
|
|
10564
11607
|
* @tags subscriptions
|
|
10565
11608
|
* @name FindAllSubscriptionFixedCharges
|
|
10566
|
-
* @summary List
|
|
11609
|
+
* @summary List all fixed charges for a subscription
|
|
10567
11610
|
* @request GET:/subscriptions/{external_id}/fixed_charges
|
|
10568
11611
|
* @secure
|
|
10569
11612
|
*/
|
|
10570
|
-
findAllSubscriptionFixedCharges: (externalId: string,
|
|
11613
|
+
findAllSubscriptionFixedCharges: (externalId: string, query?: {
|
|
11614
|
+
/**
|
|
11615
|
+
* Page number.
|
|
11616
|
+
* @example 1
|
|
11617
|
+
*/
|
|
11618
|
+
page?: number;
|
|
11619
|
+
/**
|
|
11620
|
+
* Number of records per page.
|
|
11621
|
+
* @example 20
|
|
11622
|
+
*/
|
|
11623
|
+
per_page?: number;
|
|
11624
|
+
/**
|
|
11625
|
+
* Filter by subscription status. When provided, the subscription is looked up with this status instead of the default `active` status. Possible values are `pending`, `active`, `terminated`, or `canceled`.
|
|
11626
|
+
* @default "active"
|
|
11627
|
+
* @example "active"
|
|
11628
|
+
*/
|
|
11629
|
+
subscription_status?: "pending" | "active" | "terminated" | "canceled";
|
|
11630
|
+
}, params?: RequestParams) => Promise<HttpResponse<FixedChargesPaginated, ApiErrorUnauthorized | ApiErrorNotFound>>;
|
|
11631
|
+
/**
|
|
11632
|
+
* @description This endpoint retrieves all effective charges for a specific subscription. If the subscription has plan overrides with charge overrides, the overridden charges are returned.
|
|
11633
|
+
*
|
|
11634
|
+
* @tags subscriptions
|
|
11635
|
+
* @name FindAllSubscriptionCharges
|
|
11636
|
+
* @summary List all charges for a subscription
|
|
11637
|
+
* @request GET:/subscriptions/{external_id}/charges
|
|
11638
|
+
* @secure
|
|
11639
|
+
*/
|
|
11640
|
+
findAllSubscriptionCharges: (externalId: string, query?: {
|
|
11641
|
+
/**
|
|
11642
|
+
* Page number.
|
|
11643
|
+
* @example 1
|
|
11644
|
+
*/
|
|
11645
|
+
page?: number;
|
|
11646
|
+
/**
|
|
11647
|
+
* Number of records per page.
|
|
11648
|
+
* @example 20
|
|
11649
|
+
*/
|
|
11650
|
+
per_page?: number;
|
|
11651
|
+
/**
|
|
11652
|
+
* Filter by subscription status. When provided, the subscription is looked up with this status instead of the default `active` status. Possible values are `pending`, `active`, `terminated`, or `canceled`.
|
|
11653
|
+
* @default "active"
|
|
11654
|
+
* @example "active"
|
|
11655
|
+
*/
|
|
11656
|
+
subscription_status?: "pending" | "active" | "terminated" | "canceled";
|
|
11657
|
+
}, params?: RequestParams) => Promise<HttpResponse<ChargesPaginated, ApiErrorUnauthorized | ApiErrorNotFound>>;
|
|
11658
|
+
/**
|
|
11659
|
+
* @description This endpoint retrieves a specific effective charge for a subscription. If the subscription has a plan override with a charge override, the overridden charge is returned.
|
|
11660
|
+
*
|
|
11661
|
+
* @tags subscriptions
|
|
11662
|
+
* @name FindSubscriptionCharge
|
|
11663
|
+
* @summary Retrieve a charge for a subscription
|
|
11664
|
+
* @request GET:/subscriptions/{external_id}/charges/{charge_code}
|
|
11665
|
+
* @secure
|
|
11666
|
+
*/
|
|
11667
|
+
findSubscriptionCharge: (externalId: string, chargeCode: string, query?: {
|
|
11668
|
+
/**
|
|
11669
|
+
* Filter by subscription status. When provided, the subscription is looked up with this status instead of the default `active` status. Possible values are `pending`, `active`, `terminated`, or `canceled`.
|
|
11670
|
+
* @default "active"
|
|
11671
|
+
* @example "active"
|
|
11672
|
+
*/
|
|
11673
|
+
subscription_status?: "pending" | "active" | "terminated" | "canceled";
|
|
11674
|
+
}, params?: RequestParams) => Promise<HttpResponse<Charge, ApiErrorUnauthorized | ApiErrorNotFound>>;
|
|
11675
|
+
/**
|
|
11676
|
+
* @description This endpoint creates or updates a charge override for a specific subscription. If the subscription does not have a plan override yet, one will be created automatically. The charge override allows customizing specific charge properties (invoice_display_name, min_amount_cents, properties, filters, taxes, applied_pricing_unit) without affecting the original plan charge. This is a premium feature.
|
|
11677
|
+
*
|
|
11678
|
+
* @tags subscriptions
|
|
11679
|
+
* @name OverrideSubscriptionCharge
|
|
11680
|
+
* @summary Override a charge for a subscription
|
|
11681
|
+
* @request PUT:/subscriptions/{external_id}/charges/{charge_code}
|
|
11682
|
+
* @secure
|
|
11683
|
+
*/
|
|
11684
|
+
overrideSubscriptionCharge: (externalId: string, chargeCode: string, data: SubscriptionChargeOverride, query?: {
|
|
11685
|
+
/**
|
|
11686
|
+
* Filter by subscription status. When provided, the subscription is looked up with this status instead of the default `active` status. Possible values are `pending`, `active`, `terminated`, or `canceled`.
|
|
11687
|
+
* @default "active"
|
|
11688
|
+
* @example "active"
|
|
11689
|
+
*/
|
|
11690
|
+
subscription_status?: "pending" | "active" | "terminated" | "canceled";
|
|
11691
|
+
}, params?: RequestParams) => Promise<HttpResponse<Charge, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorBadRequest | ApiErrorForbidden | ApiErrorNotFound>>;
|
|
11692
|
+
/**
|
|
11693
|
+
* @description This endpoint creates a new filter for a specific charge on a subscription.
|
|
11694
|
+
*
|
|
11695
|
+
* @tags subscriptions
|
|
11696
|
+
* @name CreateSubscriptionChargeFilter
|
|
11697
|
+
* @summary Create a charge filter
|
|
11698
|
+
* @request POST:/subscriptions/{external_id}/charges/{charge_code}/filters
|
|
11699
|
+
* @secure
|
|
11700
|
+
*/
|
|
11701
|
+
createSubscriptionChargeFilter: (externalId: string, chargeCode: string, data: ChargeFilterCreateInput, query?: {
|
|
11702
|
+
/**
|
|
11703
|
+
* Filter by subscription status. When provided, the subscription is looked up with this status instead of the default `active` status. Possible values are `pending`, `active`, `terminated`, or `canceled`.
|
|
11704
|
+
* @default "active"
|
|
11705
|
+
* @example "active"
|
|
11706
|
+
*/
|
|
11707
|
+
subscription_status?: "pending" | "active" | "terminated" | "canceled";
|
|
11708
|
+
}, params?: RequestParams) => Promise<HttpResponse<ChargeFilterResponse, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorBadRequest | ApiErrorNotFound>>;
|
|
11709
|
+
/**
|
|
11710
|
+
* @description This endpoint retrieves all filters for a specific charge on a subscription.
|
|
11711
|
+
*
|
|
11712
|
+
* @tags subscriptions
|
|
11713
|
+
* @name FindAllSubscriptionChargeFilters
|
|
11714
|
+
* @summary List all filters for a charge
|
|
11715
|
+
* @request GET:/subscriptions/{external_id}/charges/{charge_code}/filters
|
|
11716
|
+
* @secure
|
|
11717
|
+
*/
|
|
11718
|
+
findAllSubscriptionChargeFilters: (externalId: string, chargeCode: string, query?: {
|
|
11719
|
+
/**
|
|
11720
|
+
* Page number.
|
|
11721
|
+
* @example 1
|
|
11722
|
+
*/
|
|
11723
|
+
page?: number;
|
|
11724
|
+
/**
|
|
11725
|
+
* Number of records per page.
|
|
11726
|
+
* @example 20
|
|
11727
|
+
*/
|
|
11728
|
+
per_page?: number;
|
|
11729
|
+
/**
|
|
11730
|
+
* Filter by subscription status. When provided, the subscription is looked up with this status instead of the default `active` status. Possible values are `pending`, `active`, `terminated`, or `canceled`.
|
|
11731
|
+
* @default "active"
|
|
11732
|
+
* @example "active"
|
|
11733
|
+
*/
|
|
11734
|
+
subscription_status?: "pending" | "active" | "terminated" | "canceled";
|
|
11735
|
+
}, params?: RequestParams) => Promise<HttpResponse<ChargeFiltersPaginated, ApiErrorUnauthorized | ApiErrorNotFound>>;
|
|
11736
|
+
/**
|
|
11737
|
+
* @description This endpoint retrieves a specific filter for a charge on a subscription.
|
|
11738
|
+
*
|
|
11739
|
+
* @tags subscriptions
|
|
11740
|
+
* @name FindSubscriptionChargeFilter
|
|
11741
|
+
* @summary Retrieve a charge filter
|
|
11742
|
+
* @request GET:/subscriptions/{external_id}/charges/{charge_code}/filters/{filter_id}
|
|
11743
|
+
* @secure
|
|
11744
|
+
*/
|
|
11745
|
+
findSubscriptionChargeFilter: (externalId: string, chargeCode: string, filterId: string, query?: {
|
|
11746
|
+
/**
|
|
11747
|
+
* Filter by subscription status. When provided, the subscription is looked up with this status instead of the default `active` status. Possible values are `pending`, `active`, `terminated`, or `canceled`.
|
|
11748
|
+
* @default "active"
|
|
11749
|
+
* @example "active"
|
|
11750
|
+
*/
|
|
11751
|
+
subscription_status?: "pending" | "active" | "terminated" | "canceled";
|
|
11752
|
+
}, params?: RequestParams) => Promise<HttpResponse<ChargeFilterResponse, ApiErrorUnauthorized | ApiErrorNotFound>>;
|
|
11753
|
+
/**
|
|
11754
|
+
* @description This endpoint updates a specific filter for a charge on a subscription.
|
|
11755
|
+
*
|
|
11756
|
+
* @tags subscriptions
|
|
11757
|
+
* @name UpdateSubscriptionChargeFilter
|
|
11758
|
+
* @summary Update a charge filter
|
|
11759
|
+
* @request PUT:/subscriptions/{external_id}/charges/{charge_code}/filters/{filter_id}
|
|
11760
|
+
* @secure
|
|
11761
|
+
*/
|
|
11762
|
+
updateSubscriptionChargeFilter: (externalId: string, chargeCode: string, filterId: string, data: ChargeFilterUpdateInput, query?: {
|
|
11763
|
+
/**
|
|
11764
|
+
* Filter by subscription status. When provided, the subscription is looked up with this status instead of the default `active` status. Possible values are `pending`, `active`, `terminated`, or `canceled`.
|
|
11765
|
+
* @default "active"
|
|
11766
|
+
* @example "active"
|
|
11767
|
+
*/
|
|
11768
|
+
subscription_status?: "pending" | "active" | "terminated" | "canceled";
|
|
11769
|
+
}, params?: RequestParams) => Promise<HttpResponse<ChargeFilterResponse, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorBadRequest | ApiErrorNotFound>>;
|
|
11770
|
+
/**
|
|
11771
|
+
* @description This endpoint deletes a specific filter from a charge on a subscription.
|
|
11772
|
+
*
|
|
11773
|
+
* @tags subscriptions
|
|
11774
|
+
* @name DestroySubscriptionChargeFilter
|
|
11775
|
+
* @summary Delete a charge filter
|
|
11776
|
+
* @request DELETE:/subscriptions/{external_id}/charges/{charge_code}/filters/{filter_id}
|
|
11777
|
+
* @secure
|
|
11778
|
+
*/
|
|
11779
|
+
destroySubscriptionChargeFilter: (externalId: string, chargeCode: string, filterId: string, query?: {
|
|
11780
|
+
/**
|
|
11781
|
+
* Filter by subscription status. When provided, the subscription is looked up with this status instead of the default `active` status. Possible values are `pending`, `active`, `terminated`, or `canceled`.
|
|
11782
|
+
* @default "active"
|
|
11783
|
+
* @example "active"
|
|
11784
|
+
*/
|
|
11785
|
+
subscription_status?: "pending" | "active" | "terminated" | "canceled";
|
|
11786
|
+
}, params?: RequestParams) => Promise<HttpResponse<ChargeFilterResponse, ApiErrorUnauthorized | ApiErrorNotFound>>;
|
|
11787
|
+
/**
|
|
11788
|
+
* @description This endpoint retrieves a specific effective fixed charge for a subscription. If the subscription has a plan override with a fixed charge override, the overridden fixed charge is returned.
|
|
11789
|
+
*
|
|
11790
|
+
* @tags subscriptions
|
|
11791
|
+
* @name FindSubscriptionFixedCharge
|
|
11792
|
+
* @summary Retrieve a fixed charge for a subscription
|
|
11793
|
+
* @request GET:/subscriptions/{external_id}/fixed_charges/{fixed_charge_code}
|
|
11794
|
+
* @secure
|
|
11795
|
+
*/
|
|
11796
|
+
findSubscriptionFixedCharge: (externalId: string, fixedChargeCode: string, query?: {
|
|
11797
|
+
/**
|
|
11798
|
+
* Filter by subscription status. When provided, the subscription is looked up with this status instead of the default `active` status. Possible values are `pending`, `active`, `terminated`, or `canceled`.
|
|
11799
|
+
* @default "active"
|
|
11800
|
+
* @example "active"
|
|
11801
|
+
*/
|
|
11802
|
+
subscription_status?: "pending" | "active" | "terminated" | "canceled";
|
|
11803
|
+
}, params?: RequestParams) => Promise<HttpResponse<FixedCharge, ApiErrorUnauthorized | ApiErrorNotFound>>;
|
|
11804
|
+
/**
|
|
11805
|
+
* @description This endpoint creates or updates a fixed charge override for a specific subscription. If the subscription does not have a plan override yet, one will be created automatically. The fixed charge override allows customizing specific fixed charge properties (invoice_display_name, units, properties, taxes) without affecting the original plan fixed charge. This is a premium feature.
|
|
11806
|
+
*
|
|
11807
|
+
* @tags subscriptions
|
|
11808
|
+
* @name OverrideSubscriptionFixedCharge
|
|
11809
|
+
* @summary Override a fixed charge for a subscription
|
|
11810
|
+
* @request PUT:/subscriptions/{external_id}/fixed_charges/{fixed_charge_code}
|
|
11811
|
+
* @secure
|
|
11812
|
+
*/
|
|
11813
|
+
overrideSubscriptionFixedCharge: (externalId: string, fixedChargeCode: string, data: SubscriptionFixedChargeOverride, query?: {
|
|
11814
|
+
/**
|
|
11815
|
+
* Filter by subscription status. When provided, the subscription is looked up with this status instead of the default `active` status. Possible values are `pending`, `active`, `terminated`, or `canceled`.
|
|
11816
|
+
* @default "active"
|
|
11817
|
+
* @example "active"
|
|
11818
|
+
*/
|
|
11819
|
+
subscription_status?: "pending" | "active" | "terminated" | "canceled";
|
|
11820
|
+
}, params?: RequestParams) => Promise<HttpResponse<FixedCharge, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorBadRequest | ApiErrorForbidden | ApiErrorNotFound>>;
|
|
10571
11821
|
};
|
|
10572
11822
|
taxes: {
|
|
10573
11823
|
/**
|
|
@@ -10807,6 +12057,48 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
|
|
|
10807
12057
|
* @secure
|
|
10808
12058
|
*/
|
|
10809
12059
|
walletTransactionPaymentUrl: (lagoId: string, params?: RequestParams) => Promise<HttpResponse<WalletTransactionPaymentUrl, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorForbidden | ApiErrorNotFound>>;
|
|
12060
|
+
/**
|
|
12061
|
+
* @description This endpoint is used to list all consumption records for an inbound wallet transaction. It shows how the credits from this inbound transaction were consumed by outbound transactions. Only available for traceable wallets.
|
|
12062
|
+
*
|
|
12063
|
+
* @tags wallets
|
|
12064
|
+
* @name FindAllWalletTransactionConsumptions
|
|
12065
|
+
* @summary List all consumptions for a wallet transaction
|
|
12066
|
+
* @request GET:/wallet_transactions/{lago_id}/consumptions
|
|
12067
|
+
* @secure
|
|
12068
|
+
*/
|
|
12069
|
+
findAllWalletTransactionConsumptions: (lagoId: string, query?: {
|
|
12070
|
+
/**
|
|
12071
|
+
* Page number.
|
|
12072
|
+
* @example 1
|
|
12073
|
+
*/
|
|
12074
|
+
page?: number;
|
|
12075
|
+
/**
|
|
12076
|
+
* Number of records per page.
|
|
12077
|
+
* @example 20
|
|
12078
|
+
*/
|
|
12079
|
+
per_page?: number;
|
|
12080
|
+
}, params?: RequestParams) => Promise<HttpResponse<WalletTransactionConsumptionsPaginated, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorForbidden | ApiErrorNotFound>>;
|
|
12081
|
+
/**
|
|
12082
|
+
* @description This endpoint is used to list all funding records for an outbound wallet transaction. It shows which inbound transactions funded this outbound transaction. Only available for traceable wallets.
|
|
12083
|
+
*
|
|
12084
|
+
* @tags wallets
|
|
12085
|
+
* @name FindAllWalletTransactionFundings
|
|
12086
|
+
* @summary List all fundings for a wallet transaction
|
|
12087
|
+
* @request GET:/wallet_transactions/{lago_id}/fundings
|
|
12088
|
+
* @secure
|
|
12089
|
+
*/
|
|
12090
|
+
findAllWalletTransactionFundings: (lagoId: string, query?: {
|
|
12091
|
+
/**
|
|
12092
|
+
* Page number.
|
|
12093
|
+
* @example 1
|
|
12094
|
+
*/
|
|
12095
|
+
page?: number;
|
|
12096
|
+
/**
|
|
12097
|
+
* Number of records per page.
|
|
12098
|
+
* @example 20
|
|
12099
|
+
*/
|
|
12100
|
+
per_page?: number;
|
|
12101
|
+
}, params?: RequestParams) => Promise<HttpResponse<WalletTransactionFundingsPaginated, ApiErrorUnauthorized | ApiErrorUnprocessableEntity | ApiErrorForbidden | ApiErrorNotFound>>;
|
|
10810
12102
|
};
|
|
10811
12103
|
webhooks: {
|
|
10812
12104
|
/**
|