@parra/parra-js-sdk 0.2.38 → 0.2.39
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/ParraAPI.d.ts +4 -0
- package/dist/ParraAPI.js +5 -0
- package/package.json +1 -1
package/dist/ParraAPI.d.ts
CHANGED
|
@@ -5,6 +5,9 @@ export interface CreateCheckoutSessionRequestBody {
|
|
|
5
5
|
export interface CheckoutSession {
|
|
6
6
|
url: string;
|
|
7
7
|
}
|
|
8
|
+
export interface BillingPortalSession {
|
|
9
|
+
url: string;
|
|
10
|
+
}
|
|
8
11
|
export interface CreateCustomerRequestBody {
|
|
9
12
|
name: string;
|
|
10
13
|
tenant_id: string;
|
|
@@ -381,6 +384,7 @@ declare class ParraAPI {
|
|
|
381
384
|
baseUrl: string;
|
|
382
385
|
});
|
|
383
386
|
createCustomer: (body?: CreateCustomerRequestBody | undefined) => Promise<Customer>;
|
|
387
|
+
createBillingPortalSession: (tenant_id: string) => Promise<BillingPortalSession>;
|
|
384
388
|
createCheckoutSession: (body?: CreateCheckoutSessionRequestBody | undefined) => Promise<CheckoutSession>;
|
|
385
389
|
getPlansForTenantById: (tenant_id: string) => Promise<TenantPlansResponse>;
|
|
386
390
|
getTenantById: (tenant_id: string) => Promise<Tenant>;
|
package/dist/ParraAPI.js
CHANGED
|
@@ -54,6 +54,11 @@ var ParraAPI = /** @class */ (function () {
|
|
|
54
54
|
},
|
|
55
55
|
});
|
|
56
56
|
};
|
|
57
|
+
this.createBillingPortalSession = function (tenant_id) {
|
|
58
|
+
return _this.http.execute(_this.options.baseUrl + "/v1/tenants/" + tenant_id + "/billing-portal/sessions", {
|
|
59
|
+
method: "post",
|
|
60
|
+
});
|
|
61
|
+
};
|
|
57
62
|
this.createCheckoutSession = function (body) {
|
|
58
63
|
return _this.http.execute(_this.options.baseUrl + "/v1/checkout/sessions", {
|
|
59
64
|
method: "post",
|