lago-javascript-client 1.18.0 → 1.22.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.18.0
155
+ * @version 1.22.0
156
156
  * @license AGPLv3
157
157
  * @baseUrl https://api.getlago.com/api/v1
158
158
  * @externalDocs https://github.com/getlago
@@ -727,11 +727,11 @@ class Api extends HttpClient {
727
727
  * @tags customers
728
728
  * @name FindCustomer
729
729
  * @summary Retrieve a customer
730
- * @request GET:/customers/{external_id}
730
+ * @request GET:/customers/{external_customer_id}
731
731
  * @secure
732
732
  */
733
- findCustomer: (externalId, params = {}) => this.request({
734
- path: `/customers/${externalId}`,
733
+ findCustomer: (externalCustomerId, params = {}) => this.request({
734
+ path: `/customers/${externalCustomerId}`,
735
735
  method: "GET",
736
736
  secure: true,
737
737
  format: "json",
@@ -743,11 +743,11 @@ class Api extends HttpClient {
743
743
  * @tags customers
744
744
  * @name DestroyCustomer
745
745
  * @summary Delete a customer
746
- * @request DELETE:/customers/{external_id}
746
+ * @request DELETE:/customers/{external_customer_id}
747
747
  * @secure
748
748
  */
749
- destroyCustomer: (externalId, params = {}) => this.request({
750
- path: `/customers/${externalId}`,
749
+ destroyCustomer: (externalCustomerId, params = {}) => this.request({
750
+ path: `/customers/${externalCustomerId}`,
751
751
  method: "DELETE",
752
752
  secure: true,
753
753
  format: "json",
@@ -1159,6 +1159,24 @@ class Api extends HttpClient {
1159
1159
  format: "json",
1160
1160
  ...params,
1161
1161
  }),
1162
+ /**
1163
+ * @description This endpoint is used for generating invoice preview.
1164
+ *
1165
+ * @tags invoices
1166
+ * @name InvoicePreview
1167
+ * @summary Create an invoice preview
1168
+ * @request POST:/invoices/preview
1169
+ * @secure
1170
+ */
1171
+ invoicePreview: (data, params = {}) => this.request({
1172
+ path: `/invoices/preview`,
1173
+ method: "POST",
1174
+ body: data,
1175
+ secure: true,
1176
+ type: ContentType.Json,
1177
+ format: "json",
1178
+ ...params,
1179
+ }),
1162
1180
  /**
1163
1181
  * @description This endpoint resends an invoice for collection and retry a payment.
1164
1182
  *
@@ -1248,6 +1266,43 @@ class Api extends HttpClient {
1248
1266
  ...params,
1249
1267
  }),
1250
1268
  };
1269
+ payments = {
1270
+ /**
1271
+ * @description This endpoint is used to create a manual payment
1272
+ *
1273
+ * @tags payments
1274
+ * @name CreatePayment
1275
+ * @summary Create a payment
1276
+ * @request POST:/payments
1277
+ * @secure
1278
+ */
1279
+ createPayment: (data, params = {}) => this.request({
1280
+ path: `/payments`,
1281
+ method: "POST",
1282
+ body: data,
1283
+ secure: true,
1284
+ type: ContentType.Json,
1285
+ format: "json",
1286
+ ...params,
1287
+ }),
1288
+ /**
1289
+ * @description This endpoint is used to list all payments
1290
+ *
1291
+ * @tags payments
1292
+ * @name FindAllPayments
1293
+ * @summary List all payments
1294
+ * @request GET:/payments
1295
+ * @secure
1296
+ */
1297
+ findAllPayments: (query, params = {}) => this.request({
1298
+ path: `/payments`,
1299
+ method: "GET",
1300
+ query: query,
1301
+ secure: true,
1302
+ format: "json",
1303
+ ...params,
1304
+ }),
1305
+ };
1251
1306
  plans = {
1252
1307
  /**
1253
1308
  * @description This endpoint creates a plan with subscription and usage-based charges. It supports flexible billing cadence (in-advance or in-arrears) and allows for both recurring and metered charges.
@@ -1667,6 +1722,22 @@ class Api extends HttpClient {
1667
1722
  format: "json",
1668
1723
  ...params,
1669
1724
  }),
1725
+ /**
1726
+ * @description This endpoint is used to retrieve a specific wallet transactions.
1727
+ *
1728
+ * @tags wallets
1729
+ * @name FindWalletTransaction
1730
+ * @summary Retrieve a wallet transaction
1731
+ * @request GET:/wallet_transactions/{lago_id}
1732
+ * @secure
1733
+ */
1734
+ findWalletTransaction: (lagoId, params = {}) => this.request({
1735
+ path: `/wallet_transactions/${lagoId}`,
1736
+ method: "GET",
1737
+ secure: true,
1738
+ format: "json",
1739
+ ...params,
1740
+ }),
1670
1741
  };
1671
1742
  webhooks = {
1672
1743
  /**