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