@izak0s/spacebring-api 4.0.0 → 5.1.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.
package/dist/index.js CHANGED
@@ -2478,6 +2478,27 @@ function createTransactions(client, defaults) {
2478
2478
  */
2479
2479
  async create(transaction, options) {
2480
2480
  return unwrapProp(await client.POST("/transactions/credits/v1", { body: { transaction }, signal: options?.signal }), "transaction", "POST /transactions/credits/v1");
2481
+ },
2482
+ scheduled: {
2483
+ /**
2484
+ * Retrieve scheduled credits transactions
2485
+ *
2486
+ * Retrieve scheduled credits transactions of a subscription or a customer.
2487
+ */
2488
+ async list(query, options) {
2489
+ return unwrap(await client.GET("/transactions/credits/scheduled/v1", { params: { query }, signal: options?.signal }), "GET /transactions/credits/scheduled/v1");
2490
+ },
2491
+ /**
2492
+ * Retrieve scheduled credits transactions — iterates every item across all pages.
2493
+ *
2494
+ * Retrieve scheduled credits transactions of a subscription or a customer.
2495
+ */
2496
+ iterate(query, options) {
2497
+ return paginate(
2498
+ async (nextPageToken) => unwrap(await client.GET("/transactions/credits/scheduled/v1", { params: { query: { ...query, nextPageToken } }, signal: options?.signal }), "GET /transactions/credits/scheduled/v1"),
2499
+ "scheduledTransactions"
2500
+ );
2501
+ }
2481
2502
  }
2482
2503
  },
2483
2504
  dayPasses: {