@internxt/sdk 1.9.19 → 1.9.21
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.
|
@@ -14,21 +14,21 @@ export declare class ObjectStorage {
|
|
|
14
14
|
static client(apiUrl: ApiUrl, appDetails: AppDetails): ObjectStorage;
|
|
15
15
|
private constructor();
|
|
16
16
|
getObjectStoragePlanById(priceId: string, currency?: string): Promise<ObjectStoragePlan>;
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
getObjectStorageCustomerId({ customerName, email, country, postalCode, companyVatId, }: {
|
|
18
|
+
customerName: string;
|
|
19
19
|
email: string;
|
|
20
|
-
country
|
|
20
|
+
country: string;
|
|
21
|
+
postalCode: string;
|
|
21
22
|
companyVatId?: string;
|
|
22
23
|
}): Promise<{
|
|
23
24
|
customerId: string;
|
|
24
25
|
token: string;
|
|
25
26
|
}>;
|
|
26
|
-
createObjectStorageSubscription({ customerId,
|
|
27
|
+
createObjectStorageSubscription({ customerId, priceId, currency, token, promoCodeId, }: {
|
|
27
28
|
customerId: string;
|
|
28
|
-
|
|
29
|
+
priceId: string;
|
|
30
|
+
currency: string;
|
|
29
31
|
token: string;
|
|
30
|
-
companyName: string;
|
|
31
|
-
vatId: string;
|
|
32
32
|
promoCodeId?: string;
|
|
33
33
|
}): Promise<CreatedSubscriptionData>;
|
|
34
34
|
private headers;
|
|
@@ -15,27 +15,25 @@ var ObjectStorage = /** @class */ (function () {
|
|
|
15
15
|
var query = new URLSearchParams();
|
|
16
16
|
priceId !== undefined && query.set('planId', priceId);
|
|
17
17
|
currency !== undefined && query.set('currency', currency);
|
|
18
|
-
return this.client.get("/object-storage
|
|
18
|
+
return this.client.get("/object-storage/price?".concat(query.toString()), this.headers());
|
|
19
19
|
};
|
|
20
|
-
ObjectStorage.prototype.
|
|
21
|
-
var
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
20
|
+
ObjectStorage.prototype.getObjectStorageCustomerId = function (_a) {
|
|
21
|
+
var customerName = _a.customerName, email = _a.email, country = _a.country, postalCode = _a.postalCode, companyVatId = _a.companyVatId;
|
|
22
|
+
var query = new URLSearchParams();
|
|
23
|
+
query.set('customerName', customerName);
|
|
24
|
+
query.set('email', email);
|
|
25
|
+
query.set('postalCode', postalCode);
|
|
26
|
+
query.set('country', country);
|
|
27
|
+
companyVatId !== undefined && query.set('companyVatId', companyVatId);
|
|
28
|
+
return this.client.get("/object-storage/customer?".concat(query.toString()), this.headers());
|
|
28
29
|
};
|
|
29
30
|
ObjectStorage.prototype.createObjectStorageSubscription = function (_a) {
|
|
30
|
-
var customerId = _a.customerId,
|
|
31
|
-
|
|
32
|
-
return this.client.post('/create-subscription-for-object-storage', {
|
|
31
|
+
var customerId = _a.customerId, priceId = _a.priceId, currency = _a.currency, token = _a.token, promoCodeId = _a.promoCodeId;
|
|
32
|
+
return this.client.post('/object-storage/subscription', {
|
|
33
33
|
customerId: customerId,
|
|
34
34
|
priceId: priceId,
|
|
35
|
-
token: token,
|
|
36
35
|
currency: currency,
|
|
37
|
-
|
|
38
|
-
companyVatId: vatId,
|
|
36
|
+
token: token,
|
|
39
37
|
promoCodeId: promoCodeId,
|
|
40
38
|
}, this.headers());
|
|
41
39
|
};
|
|
@@ -58,7 +58,7 @@ export declare class Checkout {
|
|
|
58
58
|
* @param currency - The currency of the price (optional)
|
|
59
59
|
* @returns The price object containing the details of the requested price
|
|
60
60
|
*/
|
|
61
|
-
getPriceById({ priceId, promoCodeName, currency, postalCode, country, }: GetPriceByIdPayload): Promise<PriceWithTax>;
|
|
61
|
+
getPriceById({ priceId, promoCodeName, userAddress, currency, postalCode, country, }: GetPriceByIdPayload): Promise<PriceWithTax>;
|
|
62
62
|
/**
|
|
63
63
|
* Returns the needed headers with authorization header for the module requests
|
|
64
64
|
* @private
|
|
@@ -95,11 +95,13 @@ var Checkout = /** @class */ (function () {
|
|
|
95
95
|
* @returns The price object containing the details of the requested price
|
|
96
96
|
*/
|
|
97
97
|
Checkout.prototype.getPriceById = function (_a) {
|
|
98
|
-
var priceId = _a.priceId, promoCodeName = _a.promoCodeName, currency = _a.currency, postalCode = _a.postalCode, country = _a.country;
|
|
98
|
+
var priceId = _a.priceId, promoCodeName = _a.promoCodeName, userAddress = _a.userAddress, currency = _a.currency, postalCode = _a.postalCode, country = _a.country;
|
|
99
99
|
var query = new URLSearchParams();
|
|
100
100
|
query.set('priceId', priceId);
|
|
101
101
|
if (promoCodeName !== undefined)
|
|
102
102
|
query.set('promoCodeName', promoCodeName);
|
|
103
|
+
if (userAddress !== undefined)
|
|
104
|
+
query.set('userAddress', userAddress);
|
|
103
105
|
if (currency !== undefined)
|
|
104
106
|
query.set('currency', currency);
|
|
105
107
|
if (postalCode !== undefined)
|