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.
@@ -152,7 +152,7 @@ class HttpClient {
152
152
  exports.HttpClient = HttpClient;
153
153
  /**
154
154
  * @title Lago API documentation
155
- * @version 1.40.0
155
+ * @version 1.42.0
156
156
  * @license AGPLv3
157
157
  * @baseUrl https://api.getlago.com/api/v1
158
158
  * @externalDocs https://github.com/getlago
@@ -1299,6 +1299,55 @@ class Api extends HttpClient {
1299
1299
  format: "json",
1300
1300
  ...params,
1301
1301
  }),
1302
+ /**
1303
+ * @description This endpoint retrieves all payment methods of a Customer.
1304
+ *
1305
+ * @tags payment_methods
1306
+ * @name FindAllCustomersPaymentMethods
1307
+ * @summary List all customer payment methods
1308
+ * @request GET:/customers/{external_customer_id}/payment_methods
1309
+ * @secure
1310
+ */
1311
+ findAllCustomersPaymentMethods: (externalCustomerId, query, params = {}) => this.request({
1312
+ path: `/customers/${externalCustomerId}/payment_methods`,
1313
+ method: "GET",
1314
+ query: query,
1315
+ secure: true,
1316
+ format: "json",
1317
+ ...params,
1318
+ }),
1319
+ /**
1320
+ * @description Use the payment method as default when not selected a payment method
1321
+ *
1322
+ * @tags payment_methods
1323
+ * @name PaymentMethodSetAsDefault
1324
+ * @summary Set the payment method as default
1325
+ * @request PUT:/customers/{external_customer_id}/payment_methods/{lago_id}/set_as_default
1326
+ * @secure
1327
+ */
1328
+ paymentMethodSetAsDefault: (lagoId, externalCustomerId, params = {}) => this.request({
1329
+ path: `/customers/${externalCustomerId}/payment_methods/${lagoId}/set_as_default`,
1330
+ method: "PUT",
1331
+ secure: true,
1332
+ format: "json",
1333
+ ...params,
1334
+ }),
1335
+ /**
1336
+ * @description This endpoint deletes a specific payment method for a customer.
1337
+ *
1338
+ * @tags payment_methods
1339
+ * @name DestroyPaymentMethod
1340
+ * @summary Delete a payment method
1341
+ * @request DELETE:/customers/{external_customer_id}/payment_methods/{lago_id}
1342
+ * @secure
1343
+ */
1344
+ destroyPaymentMethod: (lagoId, externalCustomerId, params = {}) => this.request({
1345
+ path: `/customers/${externalCustomerId}/payment_methods/${lagoId}`,
1346
+ method: "DELETE",
1347
+ secure: true,
1348
+ format: "json",
1349
+ ...params,
1350
+ }),
1302
1351
  };
1303
1352
  events = {
1304
1353
  /**
@@ -1687,10 +1736,12 @@ class Api extends HttpClient {
1687
1736
  * @request POST:/invoices/{lago_id}/retry_payment
1688
1737
  * @secure
1689
1738
  */
1690
- retryPayment: (lagoId, params = {}) => this.request({
1739
+ retryPayment: (lagoId, data, params = {}) => this.request({
1691
1740
  path: `/invoices/${lagoId}/retry_payment`,
1692
1741
  method: "POST",
1742
+ body: data,
1693
1743
  secure: true,
1744
+ type: ContentType.Json,
1694
1745
  ...params,
1695
1746
  }),
1696
1747
  /**
@@ -2268,11 +2319,11 @@ class Api extends HttpClient {
2268
2319
  ...params,
2269
2320
  }),
2270
2321
  /**
2271
- * @description This endpoint allows you to create a new alert for a subscription.
2322
+ * @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
2323
  *
2273
2324
  * @tags subscriptions
2274
2325
  * @name CreateSubscriptionAlert
2275
- * @summary Create a subscription alert
2326
+ * @summary Create subscription alert(s)
2276
2327
  * @request POST:/subscriptions/{external_id}/alerts
2277
2328
  * @secure
2278
2329
  */
@@ -2285,6 +2336,21 @@ class Api extends HttpClient {
2285
2336
  format: "json",
2286
2337
  ...params,
2287
2338
  }),
2339
+ /**
2340
+ * @description This endpoint allows you to delete all alerts for a subscription.
2341
+ *
2342
+ * @tags subscriptions
2343
+ * @name DeleteAllSubscriptionAlerts
2344
+ * @summary Delete all subscription alerts
2345
+ * @request DELETE:/subscriptions/{external_id}/alerts
2346
+ * @secure
2347
+ */
2348
+ deleteAllSubscriptionAlerts: (externalId, params = {}) => this.request({
2349
+ path: `/subscriptions/${externalId}/alerts`,
2350
+ method: "DELETE",
2351
+ secure: true,
2352
+ ...params,
2353
+ }),
2288
2354
  /**
2289
2355
  * @description This endpoint enables the retrieval of a specific alert for a subscription.
2290
2356
  *