@internxt/sdk 1.9.26 → 1.9.27
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.
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { PaymentMethodVerification, PaymentMethodVerificationPayload } from 'src/payments/types';
|
|
1
2
|
import { ApiUrl, AppDetails } from '../../shared';
|
|
2
3
|
import { CreatedSubscriptionData } from './types/types';
|
|
3
4
|
interface ObjectStoragePlan {
|
|
@@ -31,6 +32,7 @@ export declare class ObjectStorage {
|
|
|
31
32
|
token: string;
|
|
32
33
|
promoCodeId?: string;
|
|
33
34
|
}): Promise<CreatedSubscriptionData>;
|
|
35
|
+
paymentMethodVerification({ customerId, token, currency, priceId, paymentMethod, }: PaymentMethodVerificationPayload): Promise<PaymentMethodVerification>;
|
|
34
36
|
private headers;
|
|
35
37
|
}
|
|
36
38
|
export {};
|
|
@@ -13,7 +13,7 @@ var ObjectStorage = /** @class */ (function () {
|
|
|
13
13
|
};
|
|
14
14
|
ObjectStorage.prototype.getObjectStoragePlanById = function (priceId, currency) {
|
|
15
15
|
var query = new URLSearchParams();
|
|
16
|
-
|
|
16
|
+
query.set('planId', priceId);
|
|
17
17
|
currency !== undefined && query.set('currency', currency);
|
|
18
18
|
return this.client.get("/object-storage/price?".concat(query.toString()), this.headers());
|
|
19
19
|
};
|
|
@@ -37,6 +37,16 @@ var ObjectStorage = /** @class */ (function () {
|
|
|
37
37
|
promoCodeId: promoCodeId,
|
|
38
38
|
}, this.headers());
|
|
39
39
|
};
|
|
40
|
+
ObjectStorage.prototype.paymentMethodVerification = function (_a) {
|
|
41
|
+
var customerId = _a.customerId, token = _a.token, _b = _a.currency, currency = _b === void 0 ? 'eur' : _b, priceId = _a.priceId, paymentMethod = _a.paymentMethod;
|
|
42
|
+
return this.client.post('/payment-method-verification', {
|
|
43
|
+
customerId: customerId,
|
|
44
|
+
token: token,
|
|
45
|
+
currency: currency,
|
|
46
|
+
priceId: priceId,
|
|
47
|
+
paymentMethod: paymentMethod,
|
|
48
|
+
}, this.headers());
|
|
49
|
+
};
|
|
40
50
|
ObjectStorage.prototype.headers = function () {
|
|
41
51
|
return (0, headers_1.basicHeaders)(this.appDetails.clientName, this.appDetails.clientVersion);
|
|
42
52
|
};
|
|
@@ -14,6 +14,18 @@ export interface CreatePaymentIntentPayload {
|
|
|
14
14
|
currency?: string;
|
|
15
15
|
promoCodeId?: string;
|
|
16
16
|
}
|
|
17
|
+
export interface PaymentMethodVerificationPayload {
|
|
18
|
+
customerId: string;
|
|
19
|
+
token: string;
|
|
20
|
+
paymentMethod: string;
|
|
21
|
+
priceId: string;
|
|
22
|
+
currency?: string;
|
|
23
|
+
}
|
|
24
|
+
export interface PaymentMethodVerification {
|
|
25
|
+
intentId: string;
|
|
26
|
+
verified: boolean;
|
|
27
|
+
clientSecret?: string;
|
|
28
|
+
}
|
|
17
29
|
export interface GetPriceByIdPayload {
|
|
18
30
|
priceId: string;
|
|
19
31
|
promoCodeName?: string;
|