@delopay/sdk 0.32.0 → 0.33.1
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/{chunk-ML3Z6JBP.js → chunk-33ZLHH3I.js} +33 -23
- package/dist/chunk-33ZLHH3I.js.map +1 -0
- package/dist/index.cjs +32 -22
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +24 -12
- package/dist/index.d.ts +24 -12
- package/dist/index.js +1 -1
- package/dist/internal.cjs +32 -22
- package/dist/internal.cjs.map +1 -1
- package/dist/internal.d.cts +1 -1
- package/dist/internal.d.ts +1 -1
- package/dist/internal.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-ML3Z6JBP.js.map +0 -1
|
@@ -2533,16 +2533,18 @@ var Subscriptions = class {
|
|
|
2533
2533
|
* For billing processors that require buyer approval (e.g. PayPal), the
|
|
2534
2534
|
* response carries a `redirect_url` the customer must be sent to.
|
|
2535
2535
|
*/
|
|
2536
|
-
async createAndConfirm(params) {
|
|
2537
|
-
return this.request("POST", "/subscriptions", { body: params });
|
|
2536
|
+
async createAndConfirm(params, options) {
|
|
2537
|
+
return this.request("POST", "/subscriptions", { body: params, ...options });
|
|
2538
2538
|
}
|
|
2539
2539
|
/** Create a subscription without confirming it. `POST /subscriptions/create` */
|
|
2540
|
-
async create(params) {
|
|
2541
|
-
return this.request("POST", "/subscriptions/create", { body: params });
|
|
2540
|
+
async create(params, options) {
|
|
2541
|
+
return this.request("POST", "/subscriptions/create", { body: params, ...options });
|
|
2542
2542
|
}
|
|
2543
2543
|
/** Retrieve a subscription by ID. `GET /subscriptions/{subscriptionId}` */
|
|
2544
|
-
async retrieve(subscriptionId) {
|
|
2545
|
-
return this.request("GET", `/subscriptions/${encodeURIComponent(subscriptionId)}
|
|
2544
|
+
async retrieve(subscriptionId, options) {
|
|
2545
|
+
return this.request("GET", `/subscriptions/${encodeURIComponent(subscriptionId)}`, {
|
|
2546
|
+
...options
|
|
2547
|
+
});
|
|
2546
2548
|
}
|
|
2547
2549
|
/**
|
|
2548
2550
|
* Confirm a previously created subscription. `POST /subscriptions/{subscriptionId}/confirm`
|
|
@@ -2550,51 +2552,59 @@ var Subscriptions = class {
|
|
|
2550
2552
|
* Like {@link createAndConfirm}, the response may carry a `redirect_url` for
|
|
2551
2553
|
* processors that require buyer approval.
|
|
2552
2554
|
*/
|
|
2553
|
-
async confirm(subscriptionId, params) {
|
|
2555
|
+
async confirm(subscriptionId, params, options) {
|
|
2554
2556
|
return this.request("POST", `/subscriptions/${encodeURIComponent(subscriptionId)}/confirm`, {
|
|
2555
|
-
body: params
|
|
2557
|
+
body: params,
|
|
2558
|
+
...options
|
|
2556
2559
|
});
|
|
2557
2560
|
}
|
|
2558
2561
|
/** Update a subscription's plan/price. `PUT /subscriptions/{subscriptionId}/update` */
|
|
2559
|
-
async update(subscriptionId, params) {
|
|
2562
|
+
async update(subscriptionId, params, options) {
|
|
2560
2563
|
return this.request("PUT", `/subscriptions/${encodeURIComponent(subscriptionId)}/update`, {
|
|
2561
|
-
body: params
|
|
2564
|
+
body: params,
|
|
2565
|
+
...options
|
|
2562
2566
|
});
|
|
2563
2567
|
}
|
|
2564
2568
|
/** List subscriptions for the profile. `GET /subscriptions/list` */
|
|
2565
|
-
async list(params) {
|
|
2569
|
+
async list(params, options) {
|
|
2566
2570
|
return this.request("GET", "/subscriptions/list", {
|
|
2567
|
-
query: params
|
|
2571
|
+
query: params,
|
|
2572
|
+
...options
|
|
2568
2573
|
});
|
|
2569
2574
|
}
|
|
2570
2575
|
/** Estimate the cost of a subscription before creating it. `GET /subscriptions/estimate` */
|
|
2571
|
-
async getEstimate(params) {
|
|
2576
|
+
async getEstimate(params, options) {
|
|
2572
2577
|
return this.request("GET", "/subscriptions/estimate", {
|
|
2573
|
-
query: params
|
|
2578
|
+
query: params,
|
|
2579
|
+
...options
|
|
2574
2580
|
});
|
|
2575
2581
|
}
|
|
2576
2582
|
/** List purchasable subscription items (plans/addons). `GET /subscriptions/items` */
|
|
2577
|
-
async getItems(params) {
|
|
2583
|
+
async getItems(params, options) {
|
|
2578
2584
|
return this.request("GET", "/subscriptions/items", {
|
|
2579
|
-
query: params
|
|
2585
|
+
query: params,
|
|
2586
|
+
...options
|
|
2580
2587
|
});
|
|
2581
2588
|
}
|
|
2582
2589
|
/** Pause a subscription. `POST /subscriptions/{subscriptionId}/pause` */
|
|
2583
|
-
async pause(subscriptionId, params) {
|
|
2590
|
+
async pause(subscriptionId, params, options) {
|
|
2584
2591
|
return this.request("POST", `/subscriptions/${encodeURIComponent(subscriptionId)}/pause`, {
|
|
2585
|
-
body: params
|
|
2592
|
+
body: params,
|
|
2593
|
+
...options
|
|
2586
2594
|
});
|
|
2587
2595
|
}
|
|
2588
2596
|
/** Resume a paused subscription. `POST /subscriptions/{subscriptionId}/resume` */
|
|
2589
|
-
async resume(subscriptionId, params) {
|
|
2597
|
+
async resume(subscriptionId, params, options) {
|
|
2590
2598
|
return this.request("POST", `/subscriptions/${encodeURIComponent(subscriptionId)}/resume`, {
|
|
2591
|
-
body: params
|
|
2599
|
+
body: params,
|
|
2600
|
+
...options
|
|
2592
2601
|
});
|
|
2593
2602
|
}
|
|
2594
2603
|
/** Cancel a subscription. `POST /subscriptions/{subscriptionId}/cancel` */
|
|
2595
|
-
async cancel(subscriptionId, params) {
|
|
2604
|
+
async cancel(subscriptionId, params, options) {
|
|
2596
2605
|
return this.request("POST", `/subscriptions/${encodeURIComponent(subscriptionId)}/cancel`, {
|
|
2597
|
-
body: params
|
|
2606
|
+
body: params,
|
|
2607
|
+
...options
|
|
2598
2608
|
});
|
|
2599
2609
|
}
|
|
2600
2610
|
};
|
|
@@ -3676,4 +3686,4 @@ export {
|
|
|
3676
3686
|
applyBrandingVariables,
|
|
3677
3687
|
shadowFor
|
|
3678
3688
|
};
|
|
3679
|
-
//# sourceMappingURL=chunk-
|
|
3689
|
+
//# sourceMappingURL=chunk-33ZLHH3I.js.map
|