lago-javascript-client 1.40.0 → 1.43.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,7 +148,7 @@ export class HttpClient {
148
148
  }
149
149
  /**
150
150
  * @title Lago API documentation
151
- * @version 1.40.0
151
+ * @version 1.42.0
152
152
  * @license AGPLv3
153
153
  * @baseUrl https://api.getlago.com/api/v1
154
154
  * @externalDocs https://github.com/getlago
@@ -1295,6 +1295,55 @@ export class Api extends HttpClient {
1295
1295
  format: "json",
1296
1296
  ...params,
1297
1297
  }),
1298
+ /**
1299
+ * @description This endpoint retrieves all payment methods of a Customer.
1300
+ *
1301
+ * @tags payment_methods
1302
+ * @name FindAllCustomersPaymentMethods
1303
+ * @summary List all customer payment methods
1304
+ * @request GET:/customers/{external_customer_id}/payment_methods
1305
+ * @secure
1306
+ */
1307
+ findAllCustomersPaymentMethods: (externalCustomerId, query, params = {}) => this.request({
1308
+ path: `/customers/${externalCustomerId}/payment_methods`,
1309
+ method: "GET",
1310
+ query: query,
1311
+ secure: true,
1312
+ format: "json",
1313
+ ...params,
1314
+ }),
1315
+ /**
1316
+ * @description Use the payment method as default when not selected a payment method
1317
+ *
1318
+ * @tags payment_methods
1319
+ * @name PaymentMethodSetAsDefault
1320
+ * @summary Set the payment method as default
1321
+ * @request PUT:/customers/{external_customer_id}/payment_methods/{lago_id}/set_as_default
1322
+ * @secure
1323
+ */
1324
+ paymentMethodSetAsDefault: (lagoId, externalCustomerId, params = {}) => this.request({
1325
+ path: `/customers/${externalCustomerId}/payment_methods/${lagoId}/set_as_default`,
1326
+ method: "PUT",
1327
+ secure: true,
1328
+ format: "json",
1329
+ ...params,
1330
+ }),
1331
+ /**
1332
+ * @description This endpoint deletes a specific payment method for a customer.
1333
+ *
1334
+ * @tags payment_methods
1335
+ * @name DestroyPaymentMethod
1336
+ * @summary Delete a payment method
1337
+ * @request DELETE:/customers/{external_customer_id}/payment_methods/{lago_id}
1338
+ * @secure
1339
+ */
1340
+ destroyPaymentMethod: (lagoId, externalCustomerId, params = {}) => this.request({
1341
+ path: `/customers/${externalCustomerId}/payment_methods/${lagoId}`,
1342
+ method: "DELETE",
1343
+ secure: true,
1344
+ format: "json",
1345
+ ...params,
1346
+ }),
1298
1347
  };
1299
1348
  events = {
1300
1349
  /**
@@ -1683,10 +1732,12 @@ export class Api extends HttpClient {
1683
1732
  * @request POST:/invoices/{lago_id}/retry_payment
1684
1733
  * @secure
1685
1734
  */
1686
- retryPayment: (lagoId, params = {}) => this.request({
1735
+ retryPayment: (lagoId, data, params = {}) => this.request({
1687
1736
  path: `/invoices/${lagoId}/retry_payment`,
1688
1737
  method: "POST",
1738
+ body: data,
1689
1739
  secure: true,
1740
+ type: ContentType.Json,
1690
1741
  ...params,
1691
1742
  }),
1692
1743
  /**
@@ -2264,11 +2315,11 @@ export class Api extends HttpClient {
2264
2315
  ...params,
2265
2316
  }),
2266
2317
  /**
2267
- * @description This endpoint allows you to create a new alert for a subscription.
2318
+ * @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.
2268
2319
  *
2269
2320
  * @tags subscriptions
2270
2321
  * @name CreateSubscriptionAlert
2271
- * @summary Create a subscription alert
2322
+ * @summary Create subscription alert(s)
2272
2323
  * @request POST:/subscriptions/{external_id}/alerts
2273
2324
  * @secure
2274
2325
  */
@@ -2281,6 +2332,21 @@ export class Api extends HttpClient {
2281
2332
  format: "json",
2282
2333
  ...params,
2283
2334
  }),
2335
+ /**
2336
+ * @description This endpoint allows you to delete all alerts for a subscription.
2337
+ *
2338
+ * @tags subscriptions
2339
+ * @name DeleteAllSubscriptionAlerts
2340
+ * @summary Delete all subscription alerts
2341
+ * @request DELETE:/subscriptions/{external_id}/alerts
2342
+ * @secure
2343
+ */
2344
+ deleteAllSubscriptionAlerts: (externalId, params = {}) => this.request({
2345
+ path: `/subscriptions/${externalId}/alerts`,
2346
+ method: "DELETE",
2347
+ secure: true,
2348
+ ...params,
2349
+ }),
2284
2350
  /**
2285
2351
  * @description This endpoint enables the retrieval of a specific alert for a subscription.
2286
2352
  *
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "main": "./script/mod.js",
4
4
  "name": "lago-javascript-client",
5
5
  "sideEffects": false,
6
- "version": "v1.40.0",
6
+ "version": "v1.43.0",
7
7
  "description": "Lago JavaScript API Client",
8
8
  "repository": {
9
9
  "type": "git",