lago-javascript-client 1.40.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 +2630 -1135
- package/esm/openapi/client.js +852 -67
- package/package.json +1 -1
- package/script/openapi/client.d.ts +2630 -1135
- package/script/openapi/client.js +852 -67
package/script/openapi/client.js
CHANGED
|
@@ -152,8 +152,8 @@ class HttpClient {
|
|
|
152
152
|
exports.HttpClient = HttpClient;
|
|
153
153
|
/**
|
|
154
154
|
* @title Lago API documentation
|
|
155
|
-
* @version 1.
|
|
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
|
|
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
|
*
|
|
@@ -1299,6 +1534,55 @@ class Api extends HttpClient {
|
|
|
1299
1534
|
format: "json",
|
|
1300
1535
|
...params,
|
|
1301
1536
|
}),
|
|
1537
|
+
/**
|
|
1538
|
+
* @description This endpoint retrieves all payment methods of a Customer.
|
|
1539
|
+
*
|
|
1540
|
+
* @tags payment_methods
|
|
1541
|
+
* @name FindAllCustomersPaymentMethods
|
|
1542
|
+
* @summary List all customer payment methods
|
|
1543
|
+
* @request GET:/customers/{external_customer_id}/payment_methods
|
|
1544
|
+
* @secure
|
|
1545
|
+
*/
|
|
1546
|
+
findAllCustomersPaymentMethods: (externalCustomerId, query, params = {}) => this.request({
|
|
1547
|
+
path: `/customers/${externalCustomerId}/payment_methods`,
|
|
1548
|
+
method: "GET",
|
|
1549
|
+
query: query,
|
|
1550
|
+
secure: true,
|
|
1551
|
+
format: "json",
|
|
1552
|
+
...params,
|
|
1553
|
+
}),
|
|
1554
|
+
/**
|
|
1555
|
+
* @description Use the payment method as default when not selected a payment method
|
|
1556
|
+
*
|
|
1557
|
+
* @tags payment_methods
|
|
1558
|
+
* @name PaymentMethodSetAsDefault
|
|
1559
|
+
* @summary Set the payment method as default
|
|
1560
|
+
* @request PUT:/customers/{external_customer_id}/payment_methods/{lago_id}/set_as_default
|
|
1561
|
+
* @secure
|
|
1562
|
+
*/
|
|
1563
|
+
paymentMethodSetAsDefault: (lagoId, externalCustomerId, params = {}) => this.request({
|
|
1564
|
+
path: `/customers/${externalCustomerId}/payment_methods/${lagoId}/set_as_default`,
|
|
1565
|
+
method: "PUT",
|
|
1566
|
+
secure: true,
|
|
1567
|
+
format: "json",
|
|
1568
|
+
...params,
|
|
1569
|
+
}),
|
|
1570
|
+
/**
|
|
1571
|
+
* @description This endpoint deletes a specific payment method for a customer.
|
|
1572
|
+
*
|
|
1573
|
+
* @tags payment_methods
|
|
1574
|
+
* @name DestroyPaymentMethod
|
|
1575
|
+
* @summary Delete a payment method
|
|
1576
|
+
* @request DELETE:/customers/{external_customer_id}/payment_methods/{lago_id}
|
|
1577
|
+
* @secure
|
|
1578
|
+
*/
|
|
1579
|
+
destroyPaymentMethod: (lagoId, externalCustomerId, params = {}) => this.request({
|
|
1580
|
+
path: `/customers/${externalCustomerId}/payment_methods/${lagoId}`,
|
|
1581
|
+
method: "DELETE",
|
|
1582
|
+
secure: true,
|
|
1583
|
+
format: "json",
|
|
1584
|
+
...params,
|
|
1585
|
+
}),
|
|
1302
1586
|
};
|
|
1303
1587
|
events = {
|
|
1304
1588
|
/**
|
|
@@ -1687,10 +1971,12 @@ class Api extends HttpClient {
|
|
|
1687
1971
|
* @request POST:/invoices/{lago_id}/retry_payment
|
|
1688
1972
|
* @secure
|
|
1689
1973
|
*/
|
|
1690
|
-
retryPayment: (lagoId, params = {}) => this.request({
|
|
1974
|
+
retryPayment: (lagoId, data, params = {}) => this.request({
|
|
1691
1975
|
path: `/invoices/${lagoId}/retry_payment`,
|
|
1692
1976
|
method: "POST",
|
|
1977
|
+
body: data,
|
|
1693
1978
|
secure: true,
|
|
1979
|
+
type: ContentType.Json,
|
|
1694
1980
|
...params,
|
|
1695
1981
|
}),
|
|
1696
1982
|
/**
|
|
@@ -2127,19 +2413,17 @@ class Api extends HttpClient {
|
|
|
2127
2413
|
format: "json",
|
|
2128
2414
|
...params,
|
|
2129
2415
|
}),
|
|
2130
|
-
};
|
|
2131
|
-
subscriptions = {
|
|
2132
2416
|
/**
|
|
2133
|
-
* @description This endpoint
|
|
2417
|
+
* @description This endpoint creates a new charge for a specific plan.
|
|
2134
2418
|
*
|
|
2135
|
-
* @tags
|
|
2136
|
-
* @name
|
|
2137
|
-
* @summary
|
|
2138
|
-
* @request POST:/
|
|
2419
|
+
* @tags plans
|
|
2420
|
+
* @name CreatePlanCharge
|
|
2421
|
+
* @summary Create a charge
|
|
2422
|
+
* @request POST:/plans/{code}/charges
|
|
2139
2423
|
* @secure
|
|
2140
2424
|
*/
|
|
2141
|
-
|
|
2142
|
-
path: `/
|
|
2425
|
+
createPlanCharge: (code, data, params = {}) => this.request({
|
|
2426
|
+
path: `/plans/${code}/charges`,
|
|
2143
2427
|
method: "POST",
|
|
2144
2428
|
body: data,
|
|
2145
2429
|
secure: true,
|
|
@@ -2148,16 +2432,16 @@ class Api extends HttpClient {
|
|
|
2148
2432
|
...params,
|
|
2149
2433
|
}),
|
|
2150
2434
|
/**
|
|
2151
|
-
* @description This endpoint retrieves all
|
|
2435
|
+
* @description This endpoint retrieves all charges for a specific plan.
|
|
2152
2436
|
*
|
|
2153
|
-
* @tags
|
|
2154
|
-
* @name
|
|
2155
|
-
* @summary List all
|
|
2156
|
-
* @request GET:/
|
|
2437
|
+
* @tags plans
|
|
2438
|
+
* @name FindAllPlanCharges
|
|
2439
|
+
* @summary List all charges for a plan
|
|
2440
|
+
* @request GET:/plans/{code}/charges
|
|
2157
2441
|
* @secure
|
|
2158
2442
|
*/
|
|
2159
|
-
|
|
2160
|
-
path: `/
|
|
2443
|
+
findAllPlanCharges: (code, query, params = {}) => this.request({
|
|
2444
|
+
path: `/plans/${code}/charges`,
|
|
2161
2445
|
method: "GET",
|
|
2162
2446
|
query: query,
|
|
2163
2447
|
secure: true,
|
|
@@ -2165,35 +2449,33 @@ class Api extends HttpClient {
|
|
|
2165
2449
|
...params,
|
|
2166
2450
|
}),
|
|
2167
2451
|
/**
|
|
2168
|
-
* @description This endpoint retrieves a specific
|
|
2452
|
+
* @description This endpoint retrieves a specific charge for a plan.
|
|
2169
2453
|
*
|
|
2170
|
-
* @tags
|
|
2171
|
-
* @name
|
|
2172
|
-
* @summary Retrieve a
|
|
2173
|
-
* @request GET:/
|
|
2454
|
+
* @tags plans
|
|
2455
|
+
* @name FindPlanCharge
|
|
2456
|
+
* @summary Retrieve a charge
|
|
2457
|
+
* @request GET:/plans/{code}/charges/{charge_code}
|
|
2174
2458
|
* @secure
|
|
2175
2459
|
*/
|
|
2176
|
-
|
|
2177
|
-
path: `/
|
|
2460
|
+
findPlanCharge: (code, chargeCode, params = {}) => this.request({
|
|
2461
|
+
path: `/plans/${code}/charges/${chargeCode}`,
|
|
2178
2462
|
method: "GET",
|
|
2179
|
-
query: query,
|
|
2180
2463
|
secure: true,
|
|
2181
2464
|
format: "json",
|
|
2182
2465
|
...params,
|
|
2183
2466
|
}),
|
|
2184
2467
|
/**
|
|
2185
|
-
* @description This endpoint
|
|
2468
|
+
* @description This endpoint updates a specific charge for a plan.
|
|
2186
2469
|
*
|
|
2187
|
-
* @tags
|
|
2188
|
-
* @name
|
|
2189
|
-
* @summary Update a
|
|
2190
|
-
* @request PUT:/
|
|
2470
|
+
* @tags plans
|
|
2471
|
+
* @name UpdatePlanCharge
|
|
2472
|
+
* @summary Update a charge
|
|
2473
|
+
* @request PUT:/plans/{code}/charges/{charge_code}
|
|
2191
2474
|
* @secure
|
|
2192
2475
|
*/
|
|
2193
|
-
|
|
2194
|
-
path: `/
|
|
2476
|
+
updatePlanCharge: (code, chargeCode, data, params = {}) => this.request({
|
|
2477
|
+
path: `/plans/${code}/charges/${chargeCode}`,
|
|
2195
2478
|
method: "PUT",
|
|
2196
|
-
query: query,
|
|
2197
2479
|
body: data,
|
|
2198
2480
|
secure: true,
|
|
2199
2481
|
type: ContentType.Json,
|
|
@@ -2201,35 +2483,300 @@ class Api extends HttpClient {
|
|
|
2201
2483
|
...params,
|
|
2202
2484
|
}),
|
|
2203
2485
|
/**
|
|
2204
|
-
* @description This endpoint
|
|
2486
|
+
* @description This endpoint deletes a specific charge from a plan.
|
|
2205
2487
|
*
|
|
2206
|
-
* @tags
|
|
2207
|
-
* @name
|
|
2208
|
-
* @summary
|
|
2209
|
-
* @request DELETE:/
|
|
2488
|
+
* @tags plans
|
|
2489
|
+
* @name DestroyPlanCharge
|
|
2490
|
+
* @summary Delete a charge
|
|
2491
|
+
* @request DELETE:/plans/{code}/charges/{charge_code}
|
|
2210
2492
|
* @secure
|
|
2211
2493
|
*/
|
|
2212
|
-
|
|
2213
|
-
path: `/
|
|
2494
|
+
destroyPlanCharge: (code, chargeCode, data, params = {}) => this.request({
|
|
2495
|
+
path: `/plans/${code}/charges/${chargeCode}`,
|
|
2214
2496
|
method: "DELETE",
|
|
2215
|
-
|
|
2497
|
+
body: data,
|
|
2216
2498
|
secure: true,
|
|
2499
|
+
type: ContentType.Json,
|
|
2217
2500
|
format: "json",
|
|
2218
2501
|
...params,
|
|
2219
2502
|
}),
|
|
2220
2503
|
/**
|
|
2221
|
-
* @description This endpoint
|
|
2504
|
+
* @description This endpoint creates a new filter for a specific charge.
|
|
2222
2505
|
*
|
|
2223
|
-
* @tags
|
|
2224
|
-
* @name
|
|
2225
|
-
* @summary
|
|
2226
|
-
* @request
|
|
2506
|
+
* @tags plans
|
|
2507
|
+
* @name CreatePlanChargeFilter
|
|
2508
|
+
* @summary Create a charge filter
|
|
2509
|
+
* @request POST:/plans/{code}/charges/{charge_code}/filters
|
|
2227
2510
|
* @secure
|
|
2228
2511
|
*/
|
|
2229
|
-
|
|
2230
|
-
path: `/
|
|
2231
|
-
method: "
|
|
2232
|
-
|
|
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
|
+
}),
|
|
2677
|
+
};
|
|
2678
|
+
subscriptions = {
|
|
2679
|
+
/**
|
|
2680
|
+
* @description This endpoint assigns a plan to a customer, creating or modifying a subscription. Ideal for initial subscriptions or plan changes (upgrades/downgrades).
|
|
2681
|
+
*
|
|
2682
|
+
* @tags subscriptions
|
|
2683
|
+
* @name CreateSubscription
|
|
2684
|
+
* @summary Assign a plan to a customer
|
|
2685
|
+
* @request POST:/subscriptions
|
|
2686
|
+
* @secure
|
|
2687
|
+
*/
|
|
2688
|
+
createSubscription: (data, params = {}) => this.request({
|
|
2689
|
+
path: `/subscriptions`,
|
|
2690
|
+
method: "POST",
|
|
2691
|
+
body: data,
|
|
2692
|
+
secure: true,
|
|
2693
|
+
type: ContentType.Json,
|
|
2694
|
+
format: "json",
|
|
2695
|
+
...params,
|
|
2696
|
+
}),
|
|
2697
|
+
/**
|
|
2698
|
+
* @description This endpoint retrieves all active subscriptions.
|
|
2699
|
+
*
|
|
2700
|
+
* @tags subscriptions
|
|
2701
|
+
* @name FindAllSubscriptions
|
|
2702
|
+
* @summary List all subscriptions
|
|
2703
|
+
* @request GET:/subscriptions
|
|
2704
|
+
* @secure
|
|
2705
|
+
*/
|
|
2706
|
+
findAllSubscriptions: (query, params = {}) => this.request({
|
|
2707
|
+
path: `/subscriptions`,
|
|
2708
|
+
method: "GET",
|
|
2709
|
+
query: query,
|
|
2710
|
+
secure: true,
|
|
2711
|
+
format: "json",
|
|
2712
|
+
...params,
|
|
2713
|
+
}),
|
|
2714
|
+
/**
|
|
2715
|
+
* @description This endpoint retrieves a specific subscription.
|
|
2716
|
+
*
|
|
2717
|
+
* @tags subscriptions
|
|
2718
|
+
* @name FindSubscription
|
|
2719
|
+
* @summary Retrieve a subscription
|
|
2720
|
+
* @request GET:/subscriptions/{external_id}
|
|
2721
|
+
* @secure
|
|
2722
|
+
*/
|
|
2723
|
+
findSubscription: (externalId, query, params = {}) => this.request({
|
|
2724
|
+
path: `/subscriptions/${externalId}`,
|
|
2725
|
+
method: "GET",
|
|
2726
|
+
query: query,
|
|
2727
|
+
secure: true,
|
|
2728
|
+
format: "json",
|
|
2729
|
+
...params,
|
|
2730
|
+
}),
|
|
2731
|
+
/**
|
|
2732
|
+
* @description This endpoint allows you to update a subscription.
|
|
2733
|
+
*
|
|
2734
|
+
* @tags subscriptions
|
|
2735
|
+
* @name UpdateSubscription
|
|
2736
|
+
* @summary Update a subscription
|
|
2737
|
+
* @request PUT:/subscriptions/{external_id}
|
|
2738
|
+
* @secure
|
|
2739
|
+
*/
|
|
2740
|
+
updateSubscription: (externalId, data, query, params = {}) => this.request({
|
|
2741
|
+
path: `/subscriptions/${externalId}`,
|
|
2742
|
+
method: "PUT",
|
|
2743
|
+
query: query,
|
|
2744
|
+
body: data,
|
|
2745
|
+
secure: true,
|
|
2746
|
+
type: ContentType.Json,
|
|
2747
|
+
format: "json",
|
|
2748
|
+
...params,
|
|
2749
|
+
}),
|
|
2750
|
+
/**
|
|
2751
|
+
* @description This endpoint allows you to terminate a subscription.
|
|
2752
|
+
*
|
|
2753
|
+
* @tags subscriptions
|
|
2754
|
+
* @name DestroySubscription
|
|
2755
|
+
* @summary Terminate a subscription
|
|
2756
|
+
* @request DELETE:/subscriptions/{external_id}
|
|
2757
|
+
* @secure
|
|
2758
|
+
*/
|
|
2759
|
+
destroySubscription: (externalId, query, params = {}) => this.request({
|
|
2760
|
+
path: `/subscriptions/${externalId}`,
|
|
2761
|
+
method: "DELETE",
|
|
2762
|
+
query: query,
|
|
2763
|
+
secure: true,
|
|
2764
|
+
format: "json",
|
|
2765
|
+
...params,
|
|
2766
|
+
}),
|
|
2767
|
+
/**
|
|
2768
|
+
* @description This endpoint enables the retrieval of the lifetime usage of a subscription.
|
|
2769
|
+
*
|
|
2770
|
+
* @tags subscriptions
|
|
2771
|
+
* @name GetSubscriptionLifetimeUsage
|
|
2772
|
+
* @summary Retrieve subscription lifetime usage
|
|
2773
|
+
* @request GET:/subscriptions/{external_id}/lifetime_usage
|
|
2774
|
+
* @secure
|
|
2775
|
+
*/
|
|
2776
|
+
getSubscriptionLifetimeUsage: (externalId, params = {}) => this.request({
|
|
2777
|
+
path: `/subscriptions/${externalId}/lifetime_usage`,
|
|
2778
|
+
method: "GET",
|
|
2779
|
+
secure: true,
|
|
2233
2780
|
format: "json",
|
|
2234
2781
|
...params,
|
|
2235
2782
|
}),
|
|
@@ -2260,31 +2807,49 @@ class Api extends HttpClient {
|
|
|
2260
2807
|
* @request GET:/subscriptions/{external_id}/alerts
|
|
2261
2808
|
* @secure
|
|
2262
2809
|
*/
|
|
2263
|
-
getSubscriptionAlerts: (externalId, params = {}) => this.request({
|
|
2810
|
+
getSubscriptionAlerts: (externalId, query, params = {}) => this.request({
|
|
2264
2811
|
path: `/subscriptions/${externalId}/alerts`,
|
|
2265
2812
|
method: "GET",
|
|
2813
|
+
query: query,
|
|
2266
2814
|
secure: true,
|
|
2267
2815
|
format: "json",
|
|
2268
2816
|
...params,
|
|
2269
2817
|
}),
|
|
2270
2818
|
/**
|
|
2271
|
-
* @description This endpoint allows you to create a
|
|
2819
|
+
* @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.
|
|
2272
2820
|
*
|
|
2273
2821
|
* @tags subscriptions
|
|
2274
2822
|
* @name CreateSubscriptionAlert
|
|
2275
|
-
* @summary Create
|
|
2823
|
+
* @summary Create subscription alert(s)
|
|
2276
2824
|
* @request POST:/subscriptions/{external_id}/alerts
|
|
2277
2825
|
* @secure
|
|
2278
2826
|
*/
|
|
2279
|
-
createSubscriptionAlert: (externalId, data, params = {}) => this.request({
|
|
2827
|
+
createSubscriptionAlert: (externalId, data, query, params = {}) => this.request({
|
|
2280
2828
|
path: `/subscriptions/${externalId}/alerts`,
|
|
2281
2829
|
method: "POST",
|
|
2830
|
+
query: query,
|
|
2282
2831
|
body: data,
|
|
2283
2832
|
secure: true,
|
|
2284
2833
|
type: ContentType.Json,
|
|
2285
2834
|
format: "json",
|
|
2286
2835
|
...params,
|
|
2287
2836
|
}),
|
|
2837
|
+
/**
|
|
2838
|
+
* @description This endpoint allows you to delete all alerts for a subscription.
|
|
2839
|
+
*
|
|
2840
|
+
* @tags subscriptions
|
|
2841
|
+
* @name DeleteAllSubscriptionAlerts
|
|
2842
|
+
* @summary Delete all subscription alerts
|
|
2843
|
+
* @request DELETE:/subscriptions/{external_id}/alerts
|
|
2844
|
+
* @secure
|
|
2845
|
+
*/
|
|
2846
|
+
deleteAllSubscriptionAlerts: (externalId, query, params = {}) => this.request({
|
|
2847
|
+
path: `/subscriptions/${externalId}/alerts`,
|
|
2848
|
+
method: "DELETE",
|
|
2849
|
+
query: query,
|
|
2850
|
+
secure: true,
|
|
2851
|
+
...params,
|
|
2852
|
+
}),
|
|
2288
2853
|
/**
|
|
2289
2854
|
* @description This endpoint enables the retrieval of a specific alert for a subscription.
|
|
2290
2855
|
*
|
|
@@ -2294,9 +2859,10 @@ class Api extends HttpClient {
|
|
|
2294
2859
|
* @request GET:/subscriptions/{external_id}/alerts/{code}
|
|
2295
2860
|
* @secure
|
|
2296
2861
|
*/
|
|
2297
|
-
getSubscriptionAlert: (externalId, code, params = {}) => this.request({
|
|
2862
|
+
getSubscriptionAlert: (externalId, code, query, params = {}) => this.request({
|
|
2298
2863
|
path: `/subscriptions/${externalId}/alerts/${code}`,
|
|
2299
2864
|
method: "GET",
|
|
2865
|
+
query: query,
|
|
2300
2866
|
secure: true,
|
|
2301
2867
|
format: "json",
|
|
2302
2868
|
...params,
|
|
@@ -2310,9 +2876,10 @@ class Api extends HttpClient {
|
|
|
2310
2876
|
* @request PUT:/subscriptions/{external_id}/alerts/{code}
|
|
2311
2877
|
* @secure
|
|
2312
2878
|
*/
|
|
2313
|
-
updateSubscriptionAlert: (externalId, code, data, params = {}) => this.request({
|
|
2879
|
+
updateSubscriptionAlert: (externalId, code, data, query, params = {}) => this.request({
|
|
2314
2880
|
path: `/subscriptions/${externalId}/alerts/${code}`,
|
|
2315
2881
|
method: "PUT",
|
|
2882
|
+
query: query,
|
|
2316
2883
|
body: data,
|
|
2317
2884
|
secure: true,
|
|
2318
2885
|
type: ContentType.Json,
|
|
@@ -2328,9 +2895,10 @@ class Api extends HttpClient {
|
|
|
2328
2895
|
* @request DELETE:/subscriptions/{external_id}/alerts/{code}
|
|
2329
2896
|
* @secure
|
|
2330
2897
|
*/
|
|
2331
|
-
deleteSubscriptionAlert: (externalId, code, params = {}) => this.request({
|
|
2898
|
+
deleteSubscriptionAlert: (externalId, code, query, params = {}) => this.request({
|
|
2332
2899
|
path: `/subscriptions/${externalId}/alerts/${code}`,
|
|
2333
2900
|
method: "DELETE",
|
|
2901
|
+
query: query,
|
|
2334
2902
|
secure: true,
|
|
2335
2903
|
format: "json",
|
|
2336
2904
|
...params,
|
|
@@ -2344,9 +2912,10 @@ class Api extends HttpClient {
|
|
|
2344
2912
|
* @request GET:/subscriptions/{external_id}/entitlements
|
|
2345
2913
|
* @secure
|
|
2346
2914
|
*/
|
|
2347
|
-
findAllSubscriptionEntitlements: (externalId, params = {}) => this.request({
|
|
2915
|
+
findAllSubscriptionEntitlements: (externalId, query, params = {}) => this.request({
|
|
2348
2916
|
path: `/subscriptions/${externalId}/entitlements`,
|
|
2349
2917
|
method: "GET",
|
|
2918
|
+
query: query,
|
|
2350
2919
|
secure: true,
|
|
2351
2920
|
format: "json",
|
|
2352
2921
|
...params,
|
|
@@ -2360,9 +2929,10 @@ class Api extends HttpClient {
|
|
|
2360
2929
|
* @request PATCH:/subscriptions/{external_id}/entitlements
|
|
2361
2930
|
* @secure
|
|
2362
2931
|
*/
|
|
2363
|
-
updateSubscriptionEntitlements: (externalId, data, params = {}) => this.request({
|
|
2932
|
+
updateSubscriptionEntitlements: (externalId, data, query, params = {}) => this.request({
|
|
2364
2933
|
path: `/subscriptions/${externalId}/entitlements`,
|
|
2365
2934
|
method: "PATCH",
|
|
2935
|
+
query: query,
|
|
2366
2936
|
body: data,
|
|
2367
2937
|
secure: true,
|
|
2368
2938
|
type: ContentType.Json,
|
|
@@ -2378,9 +2948,10 @@ class Api extends HttpClient {
|
|
|
2378
2948
|
* @request DELETE:/subscriptions/{external_id}/entitlements/{feature_code}
|
|
2379
2949
|
* @secure
|
|
2380
2950
|
*/
|
|
2381
|
-
destroySubscriptionEntitlement: (externalId, featureCode, params = {}) => this.request({
|
|
2951
|
+
destroySubscriptionEntitlement: (externalId, featureCode, query, params = {}) => this.request({
|
|
2382
2952
|
path: `/subscriptions/${externalId}/entitlements/${featureCode}`,
|
|
2383
2953
|
method: "DELETE",
|
|
2954
|
+
query: query,
|
|
2384
2955
|
secure: true,
|
|
2385
2956
|
format: "json",
|
|
2386
2957
|
...params,
|
|
@@ -2394,29 +2965,209 @@ class Api extends HttpClient {
|
|
|
2394
2965
|
* @request DELETE:/subscriptions/{external_id}/entitlements/{feature_code}/privileges/{privilege_code}
|
|
2395
2966
|
* @secure
|
|
2396
2967
|
*/
|
|
2397
|
-
destroySubscriptionEntitlementPrivilege: (externalId, featureCode, privilegeCode, params = {}) => this.request({
|
|
2968
|
+
destroySubscriptionEntitlementPrivilege: (externalId, featureCode, privilegeCode, query, params = {}) => this.request({
|
|
2398
2969
|
path: `/subscriptions/${externalId}/entitlements/${featureCode}/privileges/${privilegeCode}`,
|
|
2399
2970
|
method: "DELETE",
|
|
2971
|
+
query: query,
|
|
2400
2972
|
secure: true,
|
|
2401
2973
|
format: "json",
|
|
2402
2974
|
...params,
|
|
2403
2975
|
}),
|
|
2404
2976
|
/**
|
|
2405
|
-
* @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.
|
|
2406
2978
|
*
|
|
2407
2979
|
* @tags subscriptions
|
|
2408
2980
|
* @name FindAllSubscriptionFixedCharges
|
|
2409
|
-
* @summary List
|
|
2981
|
+
* @summary List all fixed charges for a subscription
|
|
2410
2982
|
* @request GET:/subscriptions/{external_id}/fixed_charges
|
|
2411
2983
|
* @secure
|
|
2412
2984
|
*/
|
|
2413
|
-
findAllSubscriptionFixedCharges: (externalId, params = {}) => this.request({
|
|
2985
|
+
findAllSubscriptionFixedCharges: (externalId, query, params = {}) => this.request({
|
|
2414
2986
|
path: `/subscriptions/${externalId}/fixed_charges`,
|
|
2415
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,
|
|
3006
|
+
secure: true,
|
|
3007
|
+
format: "json",
|
|
3008
|
+
...params,
|
|
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,
|
|
2416
3131
|
secure: true,
|
|
2417
3132
|
format: "json",
|
|
2418
3133
|
...params,
|
|
2419
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
|
+
}),
|
|
2420
3171
|
};
|
|
2421
3172
|
taxes = {
|
|
2422
3173
|
/**
|
|
@@ -2728,6 +3479,40 @@ class Api extends HttpClient {
|
|
|
2728
3479
|
format: "json",
|
|
2729
3480
|
...params,
|
|
2730
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
|
+
}),
|
|
2731
3516
|
};
|
|
2732
3517
|
webhooks = {
|
|
2733
3518
|
/**
|