lago-javascript-client 0.48.0-beta → 0.51.0-beta

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 0.48.0-beta
151
+ * @version 0.49.0-beta
152
152
  * @license AGPLv3
153
153
  * @baseUrl https://api.getlago.com/api/v1
154
154
  * @externalDocs https://github.com/getlago
@@ -558,6 +558,24 @@ export class Api extends HttpClient {
558
558
  format: "json",
559
559
  ...params,
560
560
  }),
561
+ /**
562
+ * @description This endpoint allows you to retrieve amounts for a new credit note creation.
563
+ *
564
+ * @tags credit_notes
565
+ * @name EstimateCreditNote
566
+ * @summary Estimate amounts for a new credit note
567
+ * @request POST:/credit_notes/estimate
568
+ * @secure
569
+ */
570
+ estimateCreditNote: (data, params = {}) => this.request({
571
+ path: `/credit_notes/estimate`,
572
+ method: "POST",
573
+ body: data,
574
+ secure: true,
575
+ type: ContentType.Json,
576
+ format: "json",
577
+ ...params,
578
+ }),
561
579
  /**
562
580
  * @description This endpoint voids an existing credit note.
563
581
  *
@@ -692,6 +710,23 @@ export class Api extends HttpClient {
692
710
  format: "json",
693
711
  ...params,
694
712
  }),
713
+ /**
714
+ * @description This endpoint enables the retrieval of the usage-based billing data for a customer within past periods.
715
+ *
716
+ * @tags customers
717
+ * @name FindAllCustomerPastUsage
718
+ * @summary Retrieve customer past usage
719
+ * @request GET:/customers/{external_customer_id}/past_usage
720
+ * @secure
721
+ */
722
+ findAllCustomerPastUsage: (externalCustomerId, query, params = {}) => this.request({
723
+ path: `/customers/${externalCustomerId}/past_usage`,
724
+ method: "GET",
725
+ query: query,
726
+ secure: true,
727
+ format: "json",
728
+ ...params,
729
+ }),
695
730
  };
696
731
  events = {
697
732
  /**
@@ -709,6 +744,7 @@ export class Api extends HttpClient {
709
744
  body: data,
710
745
  secure: true,
711
746
  type: ContentType.Json,
747
+ format: "json",
712
748
  ...params,
713
749
  }),
714
750
  /**
@@ -718,6 +754,7 @@ export class Api extends HttpClient {
718
754
  * @name CreateBatchEvents
719
755
  * @summary Batch multiple events
720
756
  * @request POST:/events/batch
757
+ * @deprecated
721
758
  * @secure
722
759
  */
723
760
  createBatchEvents: (data, params = {}) => this.request({
@@ -1093,6 +1130,22 @@ export class Api extends HttpClient {
1093
1130
  format: "json",
1094
1131
  ...params,
1095
1132
  }),
1133
+ /**
1134
+ * @description This endpoint retrieves a specific subscription.
1135
+ *
1136
+ * @tags subscriptions
1137
+ * @name FindSubscription
1138
+ * @summary Retrieve a subscription
1139
+ * @request GET:/subscriptions/{external_id}
1140
+ * @secure
1141
+ */
1142
+ findSubscription: (externalId, params = {}) => this.request({
1143
+ path: `/subscriptions/${externalId}`,
1144
+ method: "GET",
1145
+ secure: true,
1146
+ format: "json",
1147
+ ...params,
1148
+ }),
1096
1149
  /**
1097
1150
  * @description This endpoint allows you to update a subscription.
1098
1151
  *
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": "v0.48.0-beta",
6
+ "version": "v0.51.0-beta",
7
7
  "description": "Lago JavaScript API Client",
8
8
  "repository": {
9
9
  "type": "git",