lago-javascript-client 1.43.0 → 1.45.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.
@@ -148,8 +148,8 @@ export class HttpClient {
148
148
  }
149
149
  /**
150
150
  * @title Lago API documentation
151
- * @version 1.42.0
152
- * @license AGPLv3
151
+ * @version 1.45.0
152
+ * @license AGPLv3 (https://github.com/getlago/lago-openapi/blob/main/LICENSE)
153
153
  * @baseUrl https://api.getlago.com/api/v1
154
154
  * @externalDocs https://github.com/getlago
155
155
  * @contact <tech@getlago.com>
@@ -1211,10 +1211,28 @@ export class Api extends HttpClient {
1211
1211
  format: "json",
1212
1212
  ...params,
1213
1213
  }),
1214
+ /**
1215
+ * @description This endpoint is used to create a wallet with prepaid credits.
1216
+ *
1217
+ * @tags wallets
1218
+ * @name CreateCustomerWallet
1219
+ * @summary Create a wallet
1220
+ * @request POST:/customers/{external_customer_id}/wallets
1221
+ * @secure
1222
+ */
1223
+ createCustomerWallet: (externalCustomerId, data, params = {}) => this.request({
1224
+ path: `/customers/${externalCustomerId}/wallets`,
1225
+ method: "POST",
1226
+ body: data,
1227
+ secure: true,
1228
+ type: ContentType.Json,
1229
+ format: "json",
1230
+ ...params,
1231
+ }),
1214
1232
  /**
1215
1233
  * @description This endpoint is used to list all wallets with prepaid credits of a customer
1216
1234
  *
1217
- * @tags customers, wallets
1235
+ * @tags wallets
1218
1236
  * @name FindAllCustomerWallets
1219
1237
  * @summary List all customer's wallets
1220
1238
  * @request GET:/customers/{external_customer_id}/wallets
@@ -1228,6 +1246,223 @@ export class Api extends HttpClient {
1228
1246
  format: "json",
1229
1247
  ...params,
1230
1248
  }),
1249
+ /**
1250
+ * @description This endpoint is used to update an existing wallet with prepaid credits.
1251
+ *
1252
+ * @tags wallets
1253
+ * @name UpdateCustomerWallet
1254
+ * @summary Update a wallet
1255
+ * @request PUT:/customers/{external_customer_id}/wallets/{code}
1256
+ * @secure
1257
+ */
1258
+ updateCustomerWallet: (externalCustomerId, code, data, params = {}) => this.request({
1259
+ path: `/customers/${externalCustomerId}/wallets/${code}`,
1260
+ method: "PUT",
1261
+ body: data,
1262
+ secure: true,
1263
+ type: ContentType.Json,
1264
+ format: "json",
1265
+ ...params,
1266
+ }),
1267
+ /**
1268
+ * @description This endpoint is used to retrieve an existing wallet with prepaid credits.
1269
+ *
1270
+ * @tags wallets
1271
+ * @name FindCustomerWallet
1272
+ * @summary Retrieve a wallet
1273
+ * @request GET:/customers/{external_customer_id}/wallets/{code}
1274
+ * @secure
1275
+ */
1276
+ findCustomerWallet: (externalCustomerId, code, params = {}) => this.request({
1277
+ path: `/customers/${externalCustomerId}/wallets/${code}`,
1278
+ method: "GET",
1279
+ secure: true,
1280
+ format: "json",
1281
+ ...params,
1282
+ }),
1283
+ /**
1284
+ * @description This endpoint is used to terminate an existing wallet with prepaid credits.
1285
+ *
1286
+ * @tags wallets
1287
+ * @name DestroyCustomerWallet
1288
+ * @summary Terminate a wallet
1289
+ * @request DELETE:/customers/{external_customer_id}/wallets/{code}
1290
+ * @secure
1291
+ */
1292
+ destroyCustomerWallet: (externalCustomerId, code, params = {}) => this.request({
1293
+ path: `/customers/${externalCustomerId}/wallets/${code}`,
1294
+ method: "DELETE",
1295
+ secure: true,
1296
+ format: "json",
1297
+ ...params,
1298
+ }),
1299
+ /**
1300
+ * @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.
1301
+ *
1302
+ * @tags wallets
1303
+ * @name ReplaceCustomerWalletMetadata
1304
+ * @summary Replace wallet metadata
1305
+ * @request POST:/customers/{external_customer_id}/wallets/{wallet_code}/metadata
1306
+ * @secure
1307
+ */
1308
+ replaceCustomerWalletMetadata: (externalCustomerId, walletCode, data, params = {}) => this.request({
1309
+ path: `/customers/${externalCustomerId}/wallets/${walletCode}/metadata`,
1310
+ method: "POST",
1311
+ body: data,
1312
+ secure: true,
1313
+ type: ContentType.Json,
1314
+ format: "json",
1315
+ ...params,
1316
+ }),
1317
+ /**
1318
+ * @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.
1319
+ *
1320
+ * @tags wallets
1321
+ * @name MergeCustomerWalletMetadata
1322
+ * @summary Merge wallet metadata
1323
+ * @request PATCH:/customers/{external_customer_id}/wallets/{wallet_code}/metadata
1324
+ * @secure
1325
+ */
1326
+ mergeCustomerWalletMetadata: (externalCustomerId, walletCode, data, params = {}) => this.request({
1327
+ path: `/customers/${externalCustomerId}/wallets/${walletCode}/metadata`,
1328
+ method: "PATCH",
1329
+ body: data,
1330
+ secure: true,
1331
+ type: ContentType.Json,
1332
+ format: "json",
1333
+ ...params,
1334
+ }),
1335
+ /**
1336
+ * @description This endpoint removes all metadata from a wallet.
1337
+ *
1338
+ * @tags wallets
1339
+ * @name DeleteAllCustomerWalletMetadata
1340
+ * @summary Delete all wallet metadata
1341
+ * @request DELETE:/customers/{external_customer_id}/wallets/{wallet_code}/metadata
1342
+ * @secure
1343
+ */
1344
+ deleteAllCustomerWalletMetadata: (externalCustomerId, walletCode, params = {}) => this.request({
1345
+ path: `/customers/${externalCustomerId}/wallets/${walletCode}/metadata`,
1346
+ method: "DELETE",
1347
+ secure: true,
1348
+ format: "json",
1349
+ ...params,
1350
+ }),
1351
+ /**
1352
+ * @description This endpoint removes a single metadata key from a wallet.
1353
+ *
1354
+ * @tags wallets
1355
+ * @name DeleteCustomerWalletMetadataKey
1356
+ * @summary Delete a metadata key
1357
+ * @request DELETE:/customers/{external_customer_id}/wallets/{wallet_code}/metadata/{key}
1358
+ * @secure
1359
+ */
1360
+ deleteCustomerWalletMetadataKey: (externalCustomerId, walletCode, key, params = {}) => this.request({
1361
+ path: `/customers/${externalCustomerId}/wallets/${walletCode}/metadata/${key}`,
1362
+ method: "DELETE",
1363
+ secure: true,
1364
+ format: "json",
1365
+ ...params,
1366
+ }),
1367
+ /**
1368
+ * @description This endpoint enables the retrieval of all alerts for a wallet.
1369
+ *
1370
+ * @tags wallets
1371
+ * @name GetCustomerWalletAlerts
1372
+ * @summary List wallet alerts
1373
+ * @request GET:/customers/{external_customer_id}/wallets/{wallet_code}/alerts
1374
+ * @secure
1375
+ */
1376
+ getCustomerWalletAlerts: (externalCustomerId, walletCode, params = {}) => this.request({
1377
+ path: `/customers/${externalCustomerId}/wallets/${walletCode}/alerts`,
1378
+ method: "GET",
1379
+ secure: true,
1380
+ format: "json",
1381
+ ...params,
1382
+ }),
1383
+ /**
1384
+ * @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.
1385
+ *
1386
+ * @tags wallets
1387
+ * @name CreateCustomerWalletAlert
1388
+ * @summary Create wallet alert(s)
1389
+ * @request POST:/customers/{external_customer_id}/wallets/{wallet_code}/alerts
1390
+ * @secure
1391
+ */
1392
+ createCustomerWalletAlert: (externalCustomerId, walletCode, data, params = {}) => this.request({
1393
+ path: `/customers/${externalCustomerId}/wallets/${walletCode}/alerts`,
1394
+ method: "POST",
1395
+ body: data,
1396
+ secure: true,
1397
+ type: ContentType.Json,
1398
+ format: "json",
1399
+ ...params,
1400
+ }),
1401
+ /**
1402
+ * @description This endpoint allows you to delete all alerts for a wallet.
1403
+ *
1404
+ * @tags wallets
1405
+ * @name DeleteAllCustomerWalletAlerts
1406
+ * @summary Delete all wallet alerts
1407
+ * @request DELETE:/customers/{external_customer_id}/wallets/{wallet_code}/alerts
1408
+ * @secure
1409
+ */
1410
+ deleteAllCustomerWalletAlerts: (externalCustomerId, walletCode, params = {}) => this.request({
1411
+ path: `/customers/${externalCustomerId}/wallets/${walletCode}/alerts`,
1412
+ method: "DELETE",
1413
+ secure: true,
1414
+ ...params,
1415
+ }),
1416
+ /**
1417
+ * @description This endpoint enables the retrieval of a specific alert for a wallet.
1418
+ *
1419
+ * @tags wallets
1420
+ * @name GetCustomerWalletAlert
1421
+ * @summary Retrieve a wallet alert
1422
+ * @request GET:/customers/{external_customer_id}/wallets/{wallet_code}/alerts/{code}
1423
+ * @secure
1424
+ */
1425
+ getCustomerWalletAlert: (externalCustomerId, walletCode, code, params = {}) => this.request({
1426
+ path: `/customers/${externalCustomerId}/wallets/${walletCode}/alerts/${code}`,
1427
+ method: "GET",
1428
+ secure: true,
1429
+ format: "json",
1430
+ ...params,
1431
+ }),
1432
+ /**
1433
+ * @description This endpoint allows you to update an existing alert for a wallet.
1434
+ *
1435
+ * @tags wallets
1436
+ * @name UpdateCustomerWalletAlert
1437
+ * @summary Update a wallet alert
1438
+ * @request PUT:/customers/{external_customer_id}/wallets/{wallet_code}/alerts/{code}
1439
+ * @secure
1440
+ */
1441
+ updateCustomerWalletAlert: (externalCustomerId, walletCode, code, data, params = {}) => this.request({
1442
+ path: `/customers/${externalCustomerId}/wallets/${walletCode}/alerts/${code}`,
1443
+ method: "PUT",
1444
+ body: data,
1445
+ secure: true,
1446
+ type: ContentType.Json,
1447
+ format: "json",
1448
+ ...params,
1449
+ }),
1450
+ /**
1451
+ * @description This endpoint allows you to delete an existing alert for a wallet.
1452
+ *
1453
+ * @tags wallets
1454
+ * @name DeleteCustomerWalletAlert
1455
+ * @summary Delete a wallet alert
1456
+ * @request DELETE:/customers/{external_customer_id}/wallets/{wallet_code}/alerts/{code}
1457
+ * @secure
1458
+ */
1459
+ deleteCustomerWalletAlert: (externalCustomerId, walletCode, code, params = {}) => this.request({
1460
+ path: `/customers/${externalCustomerId}/wallets/${walletCode}/alerts/${code}`,
1461
+ method: "DELETE",
1462
+ secure: true,
1463
+ format: "json",
1464
+ ...params,
1465
+ }),
1231
1466
  /**
1232
1467
  * @description This endpoint enables the retrieval of the usage-based billing data for a customer within the current period.
1233
1468
  *
@@ -2174,6 +2409,267 @@ export class Api extends HttpClient {
2174
2409
  format: "json",
2175
2410
  ...params,
2176
2411
  }),
2412
+ /**
2413
+ * @description This endpoint creates a new charge for a specific plan.
2414
+ *
2415
+ * @tags plans
2416
+ * @name CreatePlanCharge
2417
+ * @summary Create a charge
2418
+ * @request POST:/plans/{code}/charges
2419
+ * @secure
2420
+ */
2421
+ createPlanCharge: (code, data, params = {}) => this.request({
2422
+ path: `/plans/${code}/charges`,
2423
+ method: "POST",
2424
+ body: data,
2425
+ secure: true,
2426
+ type: ContentType.Json,
2427
+ format: "json",
2428
+ ...params,
2429
+ }),
2430
+ /**
2431
+ * @description This endpoint retrieves all charges for a specific plan.
2432
+ *
2433
+ * @tags plans
2434
+ * @name FindAllPlanCharges
2435
+ * @summary List all charges for a plan
2436
+ * @request GET:/plans/{code}/charges
2437
+ * @secure
2438
+ */
2439
+ findAllPlanCharges: (code, query, params = {}) => this.request({
2440
+ path: `/plans/${code}/charges`,
2441
+ method: "GET",
2442
+ query: query,
2443
+ secure: true,
2444
+ format: "json",
2445
+ ...params,
2446
+ }),
2447
+ /**
2448
+ * @description This endpoint retrieves a specific charge for a plan.
2449
+ *
2450
+ * @tags plans
2451
+ * @name FindPlanCharge
2452
+ * @summary Retrieve a charge
2453
+ * @request GET:/plans/{code}/charges/{charge_code}
2454
+ * @secure
2455
+ */
2456
+ findPlanCharge: (code, chargeCode, params = {}) => this.request({
2457
+ path: `/plans/${code}/charges/${chargeCode}`,
2458
+ method: "GET",
2459
+ secure: true,
2460
+ format: "json",
2461
+ ...params,
2462
+ }),
2463
+ /**
2464
+ * @description This endpoint updates a specific charge for a plan.
2465
+ *
2466
+ * @tags plans
2467
+ * @name UpdatePlanCharge
2468
+ * @summary Update a charge
2469
+ * @request PUT:/plans/{code}/charges/{charge_code}
2470
+ * @secure
2471
+ */
2472
+ updatePlanCharge: (code, chargeCode, data, params = {}) => this.request({
2473
+ path: `/plans/${code}/charges/${chargeCode}`,
2474
+ method: "PUT",
2475
+ body: data,
2476
+ secure: true,
2477
+ type: ContentType.Json,
2478
+ format: "json",
2479
+ ...params,
2480
+ }),
2481
+ /**
2482
+ * @description This endpoint deletes a specific charge from a plan.
2483
+ *
2484
+ * @tags plans
2485
+ * @name DestroyPlanCharge
2486
+ * @summary Delete a charge
2487
+ * @request DELETE:/plans/{code}/charges/{charge_code}
2488
+ * @secure
2489
+ */
2490
+ destroyPlanCharge: (code, chargeCode, data, params = {}) => this.request({
2491
+ path: `/plans/${code}/charges/${chargeCode}`,
2492
+ method: "DELETE",
2493
+ body: data,
2494
+ secure: true,
2495
+ type: ContentType.Json,
2496
+ format: "json",
2497
+ ...params,
2498
+ }),
2499
+ /**
2500
+ * @description This endpoint creates a new filter for a specific charge.
2501
+ *
2502
+ * @tags plans
2503
+ * @name CreatePlanChargeFilter
2504
+ * @summary Create a charge filter
2505
+ * @request POST:/plans/{code}/charges/{charge_code}/filters
2506
+ * @secure
2507
+ */
2508
+ createPlanChargeFilter: (code, chargeCode, data, params = {}) => this.request({
2509
+ path: `/plans/${code}/charges/${chargeCode}/filters`,
2510
+ method: "POST",
2511
+ body: data,
2512
+ secure: true,
2513
+ type: ContentType.Json,
2514
+ format: "json",
2515
+ ...params,
2516
+ }),
2517
+ /**
2518
+ * @description This endpoint retrieves all filters for a specific charge.
2519
+ *
2520
+ * @tags plans
2521
+ * @name FindAllPlanChargeFilters
2522
+ * @summary List all filters for a charge
2523
+ * @request GET:/plans/{code}/charges/{charge_code}/filters
2524
+ * @secure
2525
+ */
2526
+ findAllPlanChargeFilters: (code, chargeCode, query, params = {}) => this.request({
2527
+ path: `/plans/${code}/charges/${chargeCode}/filters`,
2528
+ method: "GET",
2529
+ query: query,
2530
+ secure: true,
2531
+ format: "json",
2532
+ ...params,
2533
+ }),
2534
+ /**
2535
+ * @description This endpoint retrieves a specific filter for a charge.
2536
+ *
2537
+ * @tags plans
2538
+ * @name FindPlanChargeFilter
2539
+ * @summary Retrieve a charge filter
2540
+ * @request GET:/plans/{code}/charges/{charge_code}/filters/{filter_id}
2541
+ * @secure
2542
+ */
2543
+ findPlanChargeFilter: (code, chargeCode, filterId, params = {}) => this.request({
2544
+ path: `/plans/${code}/charges/${chargeCode}/filters/${filterId}`,
2545
+ method: "GET",
2546
+ secure: true,
2547
+ format: "json",
2548
+ ...params,
2549
+ }),
2550
+ /**
2551
+ * @description This endpoint updates a specific filter for a charge.
2552
+ *
2553
+ * @tags plans
2554
+ * @name UpdatePlanChargeFilter
2555
+ * @summary Update a charge filter
2556
+ * @request PUT:/plans/{code}/charges/{charge_code}/filters/{filter_id}
2557
+ * @secure
2558
+ */
2559
+ updatePlanChargeFilter: (code, chargeCode, filterId, data, params = {}) => this.request({
2560
+ path: `/plans/${code}/charges/${chargeCode}/filters/${filterId}`,
2561
+ method: "PUT",
2562
+ body: data,
2563
+ secure: true,
2564
+ type: ContentType.Json,
2565
+ format: "json",
2566
+ ...params,
2567
+ }),
2568
+ /**
2569
+ * @description This endpoint deletes a specific filter from a charge.
2570
+ *
2571
+ * @tags plans
2572
+ * @name DestroyPlanChargeFilter
2573
+ * @summary Delete a charge filter
2574
+ * @request DELETE:/plans/{code}/charges/{charge_code}/filters/{filter_id}
2575
+ * @secure
2576
+ */
2577
+ destroyPlanChargeFilter: (code, chargeCode, filterId, data, params = {}) => this.request({
2578
+ path: `/plans/${code}/charges/${chargeCode}/filters/${filterId}`,
2579
+ method: "DELETE",
2580
+ body: data,
2581
+ secure: true,
2582
+ type: ContentType.Json,
2583
+ format: "json",
2584
+ ...params,
2585
+ }),
2586
+ /**
2587
+ * @description This endpoint creates a new fixed charge for a specific plan.
2588
+ *
2589
+ * @tags plans
2590
+ * @name CreatePlanFixedCharge
2591
+ * @summary Create a fixed charge
2592
+ * @request POST:/plans/{code}/fixed_charges
2593
+ * @secure
2594
+ */
2595
+ createPlanFixedCharge: (code, data, params = {}) => this.request({
2596
+ path: `/plans/${code}/fixed_charges`,
2597
+ method: "POST",
2598
+ body: data,
2599
+ secure: true,
2600
+ type: ContentType.Json,
2601
+ format: "json",
2602
+ ...params,
2603
+ }),
2604
+ /**
2605
+ * @description This endpoint retrieves all fixed charges for a specific plan.
2606
+ *
2607
+ * @tags plans
2608
+ * @name FindAllPlanFixedCharges
2609
+ * @summary List all fixed charges for a plan
2610
+ * @request GET:/plans/{code}/fixed_charges
2611
+ * @secure
2612
+ */
2613
+ findAllPlanFixedCharges: (code, query, params = {}) => this.request({
2614
+ path: `/plans/${code}/fixed_charges`,
2615
+ method: "GET",
2616
+ query: query,
2617
+ secure: true,
2618
+ format: "json",
2619
+ ...params,
2620
+ }),
2621
+ /**
2622
+ * @description This endpoint retrieves a specific fixed charge for a plan.
2623
+ *
2624
+ * @tags plans
2625
+ * @name FindPlanFixedCharge
2626
+ * @summary Retrieve a fixed charge
2627
+ * @request GET:/plans/{code}/fixed_charges/{fixed_charge_code}
2628
+ * @secure
2629
+ */
2630
+ findPlanFixedCharge: (code, fixedChargeCode, params = {}) => this.request({
2631
+ path: `/plans/${code}/fixed_charges/${fixedChargeCode}`,
2632
+ method: "GET",
2633
+ secure: true,
2634
+ format: "json",
2635
+ ...params,
2636
+ }),
2637
+ /**
2638
+ * @description This endpoint updates a specific fixed charge for a plan.
2639
+ *
2640
+ * @tags plans
2641
+ * @name UpdatePlanFixedCharge
2642
+ * @summary Update a fixed charge
2643
+ * @request PUT:/plans/{code}/fixed_charges/{fixed_charge_code}
2644
+ * @secure
2645
+ */
2646
+ updatePlanFixedCharge: (code, fixedChargeCode, data, params = {}) => this.request({
2647
+ path: `/plans/${code}/fixed_charges/${fixedChargeCode}`,
2648
+ method: "PUT",
2649
+ body: data,
2650
+ secure: true,
2651
+ type: ContentType.Json,
2652
+ format: "json",
2653
+ ...params,
2654
+ }),
2655
+ /**
2656
+ * @description This endpoint deletes a specific fixed charge from a plan.
2657
+ *
2658
+ * @tags plans
2659
+ * @name DestroyPlanFixedCharge
2660
+ * @summary Delete a fixed charge
2661
+ * @request DELETE:/plans/{code}/fixed_charges/{fixed_charge_code}
2662
+ * @secure
2663
+ */
2664
+ destroyPlanFixedCharge: (code, fixedChargeCode, data, params = {}) => this.request({
2665
+ path: `/plans/${code}/fixed_charges/${fixedChargeCode}`,
2666
+ method: "DELETE",
2667
+ body: data,
2668
+ secure: true,
2669
+ type: ContentType.Json,
2670
+ format: "json",
2671
+ ...params,
2672
+ }),
2177
2673
  };
2178
2674
  subscriptions = {
2179
2675
  /**
@@ -2307,9 +2803,10 @@ export class Api extends HttpClient {
2307
2803
  * @request GET:/subscriptions/{external_id}/alerts
2308
2804
  * @secure
2309
2805
  */
2310
- getSubscriptionAlerts: (externalId, params = {}) => this.request({
2806
+ getSubscriptionAlerts: (externalId, query, params = {}) => this.request({
2311
2807
  path: `/subscriptions/${externalId}/alerts`,
2312
2808
  method: "GET",
2809
+ query: query,
2313
2810
  secure: true,
2314
2811
  format: "json",
2315
2812
  ...params,
@@ -2323,9 +2820,10 @@ export class Api extends HttpClient {
2323
2820
  * @request POST:/subscriptions/{external_id}/alerts
2324
2821
  * @secure
2325
2822
  */
2326
- createSubscriptionAlert: (externalId, data, params = {}) => this.request({
2823
+ createSubscriptionAlert: (externalId, data, query, params = {}) => this.request({
2327
2824
  path: `/subscriptions/${externalId}/alerts`,
2328
2825
  method: "POST",
2826
+ query: query,
2329
2827
  body: data,
2330
2828
  secure: true,
2331
2829
  type: ContentType.Json,
@@ -2341,9 +2839,10 @@ export class Api extends HttpClient {
2341
2839
  * @request DELETE:/subscriptions/{external_id}/alerts
2342
2840
  * @secure
2343
2841
  */
2344
- deleteAllSubscriptionAlerts: (externalId, params = {}) => this.request({
2842
+ deleteAllSubscriptionAlerts: (externalId, query, params = {}) => this.request({
2345
2843
  path: `/subscriptions/${externalId}/alerts`,
2346
2844
  method: "DELETE",
2845
+ query: query,
2347
2846
  secure: true,
2348
2847
  ...params,
2349
2848
  }),
@@ -2356,9 +2855,10 @@ export class Api extends HttpClient {
2356
2855
  * @request GET:/subscriptions/{external_id}/alerts/{code}
2357
2856
  * @secure
2358
2857
  */
2359
- getSubscriptionAlert: (externalId, code, params = {}) => this.request({
2858
+ getSubscriptionAlert: (externalId, code, query, params = {}) => this.request({
2360
2859
  path: `/subscriptions/${externalId}/alerts/${code}`,
2361
2860
  method: "GET",
2861
+ query: query,
2362
2862
  secure: true,
2363
2863
  format: "json",
2364
2864
  ...params,
@@ -2372,9 +2872,10 @@ export class Api extends HttpClient {
2372
2872
  * @request PUT:/subscriptions/{external_id}/alerts/{code}
2373
2873
  * @secure
2374
2874
  */
2375
- updateSubscriptionAlert: (externalId, code, data, params = {}) => this.request({
2875
+ updateSubscriptionAlert: (externalId, code, data, query, params = {}) => this.request({
2376
2876
  path: `/subscriptions/${externalId}/alerts/${code}`,
2377
2877
  method: "PUT",
2878
+ query: query,
2378
2879
  body: data,
2379
2880
  secure: true,
2380
2881
  type: ContentType.Json,
@@ -2390,9 +2891,10 @@ export class Api extends HttpClient {
2390
2891
  * @request DELETE:/subscriptions/{external_id}/alerts/{code}
2391
2892
  * @secure
2392
2893
  */
2393
- deleteSubscriptionAlert: (externalId, code, params = {}) => this.request({
2894
+ deleteSubscriptionAlert: (externalId, code, query, params = {}) => this.request({
2394
2895
  path: `/subscriptions/${externalId}/alerts/${code}`,
2395
2896
  method: "DELETE",
2897
+ query: query,
2396
2898
  secure: true,
2397
2899
  format: "json",
2398
2900
  ...params,
@@ -2406,9 +2908,10 @@ export class Api extends HttpClient {
2406
2908
  * @request GET:/subscriptions/{external_id}/entitlements
2407
2909
  * @secure
2408
2910
  */
2409
- findAllSubscriptionEntitlements: (externalId, params = {}) => this.request({
2911
+ findAllSubscriptionEntitlements: (externalId, query, params = {}) => this.request({
2410
2912
  path: `/subscriptions/${externalId}/entitlements`,
2411
2913
  method: "GET",
2914
+ query: query,
2412
2915
  secure: true,
2413
2916
  format: "json",
2414
2917
  ...params,
@@ -2422,9 +2925,10 @@ export class Api extends HttpClient {
2422
2925
  * @request PATCH:/subscriptions/{external_id}/entitlements
2423
2926
  * @secure
2424
2927
  */
2425
- updateSubscriptionEntitlements: (externalId, data, params = {}) => this.request({
2928
+ updateSubscriptionEntitlements: (externalId, data, query, params = {}) => this.request({
2426
2929
  path: `/subscriptions/${externalId}/entitlements`,
2427
2930
  method: "PATCH",
2931
+ query: query,
2428
2932
  body: data,
2429
2933
  secure: true,
2430
2934
  type: ContentType.Json,
@@ -2440,9 +2944,10 @@ export class Api extends HttpClient {
2440
2944
  * @request DELETE:/subscriptions/{external_id}/entitlements/{feature_code}
2441
2945
  * @secure
2442
2946
  */
2443
- destroySubscriptionEntitlement: (externalId, featureCode, params = {}) => this.request({
2947
+ destroySubscriptionEntitlement: (externalId, featureCode, query, params = {}) => this.request({
2444
2948
  path: `/subscriptions/${externalId}/entitlements/${featureCode}`,
2445
2949
  method: "DELETE",
2950
+ query: query,
2446
2951
  secure: true,
2447
2952
  format: "json",
2448
2953
  ...params,
@@ -2456,29 +2961,209 @@ export class Api extends HttpClient {
2456
2961
  * @request DELETE:/subscriptions/{external_id}/entitlements/{feature_code}/privileges/{privilege_code}
2457
2962
  * @secure
2458
2963
  */
2459
- destroySubscriptionEntitlementPrivilege: (externalId, featureCode, privilegeCode, params = {}) => this.request({
2964
+ destroySubscriptionEntitlementPrivilege: (externalId, featureCode, privilegeCode, query, params = {}) => this.request({
2460
2965
  path: `/subscriptions/${externalId}/entitlements/${featureCode}/privileges/${privilegeCode}`,
2461
2966
  method: "DELETE",
2967
+ query: query,
2462
2968
  secure: true,
2463
2969
  format: "json",
2464
2970
  ...params,
2465
2971
  }),
2466
2972
  /**
2467
- * @description This endpoint retrieves all fixed charges for a specific subscription.
2973
+ * @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.
2468
2974
  *
2469
2975
  * @tags subscriptions
2470
2976
  * @name FindAllSubscriptionFixedCharges
2471
- * @summary List subscription fixed charges
2977
+ * @summary List all fixed charges for a subscription
2472
2978
  * @request GET:/subscriptions/{external_id}/fixed_charges
2473
2979
  * @secure
2474
2980
  */
2475
- findAllSubscriptionFixedCharges: (externalId, params = {}) => this.request({
2981
+ findAllSubscriptionFixedCharges: (externalId, query, params = {}) => this.request({
2476
2982
  path: `/subscriptions/${externalId}/fixed_charges`,
2477
2983
  method: "GET",
2984
+ query: query,
2985
+ secure: true,
2986
+ format: "json",
2987
+ ...params,
2988
+ }),
2989
+ /**
2990
+ * @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.
2991
+ *
2992
+ * @tags subscriptions
2993
+ * @name FindAllSubscriptionCharges
2994
+ * @summary List all charges for a subscription
2995
+ * @request GET:/subscriptions/{external_id}/charges
2996
+ * @secure
2997
+ */
2998
+ findAllSubscriptionCharges: (externalId, query, params = {}) => this.request({
2999
+ path: `/subscriptions/${externalId}/charges`,
3000
+ method: "GET",
3001
+ query: query,
2478
3002
  secure: true,
2479
3003
  format: "json",
2480
3004
  ...params,
2481
3005
  }),
3006
+ /**
3007
+ * @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.
3008
+ *
3009
+ * @tags subscriptions
3010
+ * @name FindSubscriptionCharge
3011
+ * @summary Retrieve a charge for a subscription
3012
+ * @request GET:/subscriptions/{external_id}/charges/{charge_code}
3013
+ * @secure
3014
+ */
3015
+ findSubscriptionCharge: (externalId, chargeCode, query, params = {}) => this.request({
3016
+ path: `/subscriptions/${externalId}/charges/${chargeCode}`,
3017
+ method: "GET",
3018
+ query: query,
3019
+ secure: true,
3020
+ format: "json",
3021
+ ...params,
3022
+ }),
3023
+ /**
3024
+ * @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.
3025
+ *
3026
+ * @tags subscriptions
3027
+ * @name OverrideSubscriptionCharge
3028
+ * @summary Override a charge for a subscription
3029
+ * @request PUT:/subscriptions/{external_id}/charges/{charge_code}
3030
+ * @secure
3031
+ */
3032
+ overrideSubscriptionCharge: (externalId, chargeCode, data, query, params = {}) => this.request({
3033
+ path: `/subscriptions/${externalId}/charges/${chargeCode}`,
3034
+ method: "PUT",
3035
+ query: query,
3036
+ body: data,
3037
+ secure: true,
3038
+ type: ContentType.Json,
3039
+ format: "json",
3040
+ ...params,
3041
+ }),
3042
+ /**
3043
+ * @description This endpoint creates a new filter for a specific charge on a subscription.
3044
+ *
3045
+ * @tags subscriptions
3046
+ * @name CreateSubscriptionChargeFilter
3047
+ * @summary Create a charge filter
3048
+ * @request POST:/subscriptions/{external_id}/charges/{charge_code}/filters
3049
+ * @secure
3050
+ */
3051
+ createSubscriptionChargeFilter: (externalId, chargeCode, data, query, params = {}) => this.request({
3052
+ path: `/subscriptions/${externalId}/charges/${chargeCode}/filters`,
3053
+ method: "POST",
3054
+ query: query,
3055
+ body: data,
3056
+ secure: true,
3057
+ type: ContentType.Json,
3058
+ format: "json",
3059
+ ...params,
3060
+ }),
3061
+ /**
3062
+ * @description This endpoint retrieves all filters for a specific charge on a subscription.
3063
+ *
3064
+ * @tags subscriptions
3065
+ * @name FindAllSubscriptionChargeFilters
3066
+ * @summary List all filters for a charge
3067
+ * @request GET:/subscriptions/{external_id}/charges/{charge_code}/filters
3068
+ * @secure
3069
+ */
3070
+ findAllSubscriptionChargeFilters: (externalId, chargeCode, query, params = {}) => this.request({
3071
+ path: `/subscriptions/${externalId}/charges/${chargeCode}/filters`,
3072
+ method: "GET",
3073
+ query: query,
3074
+ secure: true,
3075
+ format: "json",
3076
+ ...params,
3077
+ }),
3078
+ /**
3079
+ * @description This endpoint retrieves a specific filter for a charge on a subscription.
3080
+ *
3081
+ * @tags subscriptions
3082
+ * @name FindSubscriptionChargeFilter
3083
+ * @summary Retrieve a charge filter
3084
+ * @request GET:/subscriptions/{external_id}/charges/{charge_code}/filters/{filter_id}
3085
+ * @secure
3086
+ */
3087
+ findSubscriptionChargeFilter: (externalId, chargeCode, filterId, query, params = {}) => this.request({
3088
+ path: `/subscriptions/${externalId}/charges/${chargeCode}/filters/${filterId}`,
3089
+ method: "GET",
3090
+ query: query,
3091
+ secure: true,
3092
+ format: "json",
3093
+ ...params,
3094
+ }),
3095
+ /**
3096
+ * @description This endpoint updates a specific filter for a charge on a subscription.
3097
+ *
3098
+ * @tags subscriptions
3099
+ * @name UpdateSubscriptionChargeFilter
3100
+ * @summary Update a charge filter
3101
+ * @request PUT:/subscriptions/{external_id}/charges/{charge_code}/filters/{filter_id}
3102
+ * @secure
3103
+ */
3104
+ updateSubscriptionChargeFilter: (externalId, chargeCode, filterId, data, query, params = {}) => this.request({
3105
+ path: `/subscriptions/${externalId}/charges/${chargeCode}/filters/${filterId}`,
3106
+ method: "PUT",
3107
+ query: query,
3108
+ body: data,
3109
+ secure: true,
3110
+ type: ContentType.Json,
3111
+ format: "json",
3112
+ ...params,
3113
+ }),
3114
+ /**
3115
+ * @description This endpoint deletes a specific filter from a charge on a subscription.
3116
+ *
3117
+ * @tags subscriptions
3118
+ * @name DestroySubscriptionChargeFilter
3119
+ * @summary Delete a charge filter
3120
+ * @request DELETE:/subscriptions/{external_id}/charges/{charge_code}/filters/{filter_id}
3121
+ * @secure
3122
+ */
3123
+ destroySubscriptionChargeFilter: (externalId, chargeCode, filterId, query, params = {}) => this.request({
3124
+ path: `/subscriptions/${externalId}/charges/${chargeCode}/filters/${filterId}`,
3125
+ method: "DELETE",
3126
+ query: query,
3127
+ secure: true,
3128
+ format: "json",
3129
+ ...params,
3130
+ }),
3131
+ /**
3132
+ * @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.
3133
+ *
3134
+ * @tags subscriptions
3135
+ * @name FindSubscriptionFixedCharge
3136
+ * @summary Retrieve a fixed charge for a subscription
3137
+ * @request GET:/subscriptions/{external_id}/fixed_charges/{fixed_charge_code}
3138
+ * @secure
3139
+ */
3140
+ findSubscriptionFixedCharge: (externalId, fixedChargeCode, query, params = {}) => this.request({
3141
+ path: `/subscriptions/${externalId}/fixed_charges/${fixedChargeCode}`,
3142
+ method: "GET",
3143
+ query: query,
3144
+ secure: true,
3145
+ format: "json",
3146
+ ...params,
3147
+ }),
3148
+ /**
3149
+ * @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.
3150
+ *
3151
+ * @tags subscriptions
3152
+ * @name OverrideSubscriptionFixedCharge
3153
+ * @summary Override a fixed charge for a subscription
3154
+ * @request PUT:/subscriptions/{external_id}/fixed_charges/{fixed_charge_code}
3155
+ * @secure
3156
+ */
3157
+ overrideSubscriptionFixedCharge: (externalId, fixedChargeCode, data, query, params = {}) => this.request({
3158
+ path: `/subscriptions/${externalId}/fixed_charges/${fixedChargeCode}`,
3159
+ method: "PUT",
3160
+ query: query,
3161
+ body: data,
3162
+ secure: true,
3163
+ type: ContentType.Json,
3164
+ format: "json",
3165
+ ...params,
3166
+ }),
2482
3167
  };
2483
3168
  taxes = {
2484
3169
  /**
@@ -2790,6 +3475,40 @@ export class Api extends HttpClient {
2790
3475
  format: "json",
2791
3476
  ...params,
2792
3477
  }),
3478
+ /**
3479
+ * @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.
3480
+ *
3481
+ * @tags wallets
3482
+ * @name FindAllWalletTransactionConsumptions
3483
+ * @summary List all consumptions for a wallet transaction
3484
+ * @request GET:/wallet_transactions/{lago_id}/consumptions
3485
+ * @secure
3486
+ */
3487
+ findAllWalletTransactionConsumptions: (lagoId, query, params = {}) => this.request({
3488
+ path: `/wallet_transactions/${lagoId}/consumptions`,
3489
+ method: "GET",
3490
+ query: query,
3491
+ secure: true,
3492
+ format: "json",
3493
+ ...params,
3494
+ }),
3495
+ /**
3496
+ * @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.
3497
+ *
3498
+ * @tags wallets
3499
+ * @name FindAllWalletTransactionFundings
3500
+ * @summary List all fundings for a wallet transaction
3501
+ * @request GET:/wallet_transactions/{lago_id}/fundings
3502
+ * @secure
3503
+ */
3504
+ findAllWalletTransactionFundings: (lagoId, query, params = {}) => this.request({
3505
+ path: `/wallet_transactions/${lagoId}/fundings`,
3506
+ method: "GET",
3507
+ query: query,
3508
+ secure: true,
3509
+ format: "json",
3510
+ ...params,
3511
+ }),
2793
3512
  };
2794
3513
  webhooks = {
2795
3514
  /**