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.
@@ -152,7 +152,7 @@ class HttpClient {
152
152
  exports.HttpClient = HttpClient;
153
153
  /**
154
154
  * @title Lago API documentation
155
- * @version 0.48.0-beta
155
+ * @version 0.49.0-beta
156
156
  * @license AGPLv3
157
157
  * @baseUrl https://api.getlago.com/api/v1
158
158
  * @externalDocs https://github.com/getlago
@@ -562,6 +562,24 @@ class Api extends HttpClient {
562
562
  format: "json",
563
563
  ...params,
564
564
  }),
565
+ /**
566
+ * @description This endpoint allows you to retrieve amounts for a new credit note creation.
567
+ *
568
+ * @tags credit_notes
569
+ * @name EstimateCreditNote
570
+ * @summary Estimate amounts for a new credit note
571
+ * @request POST:/credit_notes/estimate
572
+ * @secure
573
+ */
574
+ estimateCreditNote: (data, params = {}) => this.request({
575
+ path: `/credit_notes/estimate`,
576
+ method: "POST",
577
+ body: data,
578
+ secure: true,
579
+ type: ContentType.Json,
580
+ format: "json",
581
+ ...params,
582
+ }),
565
583
  /**
566
584
  * @description This endpoint voids an existing credit note.
567
585
  *
@@ -696,6 +714,23 @@ class Api extends HttpClient {
696
714
  format: "json",
697
715
  ...params,
698
716
  }),
717
+ /**
718
+ * @description This endpoint enables the retrieval of the usage-based billing data for a customer within past periods.
719
+ *
720
+ * @tags customers
721
+ * @name FindAllCustomerPastUsage
722
+ * @summary Retrieve customer past usage
723
+ * @request GET:/customers/{external_customer_id}/past_usage
724
+ * @secure
725
+ */
726
+ findAllCustomerPastUsage: (externalCustomerId, query, params = {}) => this.request({
727
+ path: `/customers/${externalCustomerId}/past_usage`,
728
+ method: "GET",
729
+ query: query,
730
+ secure: true,
731
+ format: "json",
732
+ ...params,
733
+ }),
699
734
  };
700
735
  events = {
701
736
  /**
@@ -713,6 +748,7 @@ class Api extends HttpClient {
713
748
  body: data,
714
749
  secure: true,
715
750
  type: ContentType.Json,
751
+ format: "json",
716
752
  ...params,
717
753
  }),
718
754
  /**
@@ -722,6 +758,7 @@ class Api extends HttpClient {
722
758
  * @name CreateBatchEvents
723
759
  * @summary Batch multiple events
724
760
  * @request POST:/events/batch
761
+ * @deprecated
725
762
  * @secure
726
763
  */
727
764
  createBatchEvents: (data, params = {}) => this.request({
@@ -1097,6 +1134,22 @@ class Api extends HttpClient {
1097
1134
  format: "json",
1098
1135
  ...params,
1099
1136
  }),
1137
+ /**
1138
+ * @description This endpoint retrieves a specific subscription.
1139
+ *
1140
+ * @tags subscriptions
1141
+ * @name FindSubscription
1142
+ * @summary Retrieve a subscription
1143
+ * @request GET:/subscriptions/{external_id}
1144
+ * @secure
1145
+ */
1146
+ findSubscription: (externalId, params = {}) => this.request({
1147
+ path: `/subscriptions/${externalId}`,
1148
+ method: "GET",
1149
+ secure: true,
1150
+ format: "json",
1151
+ ...params,
1152
+ }),
1100
1153
  /**
1101
1154
  * @description This endpoint allows you to update a subscription.
1102
1155
  *