@tonder.io/ionic-lite-sdk 0.0.35-beta.0 → 0.0.35-beta.10
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/.idea/prettier.xml +6 -0
- package/.idea/workspace.xml +30 -29
- package/dist/classes/BaseInlineCheckout.d.ts +7 -8
- package/dist/classes/errorResponse.d.ts +1 -1
- package/dist/classes/liteCheckout.d.ts +7 -12
- package/dist/data/businessApi.d.ts +1 -1
- package/dist/data/cardApi.d.ts +1 -1
- package/dist/data/checkoutApi.d.ts +1 -2
- package/dist/data/customerApi.d.ts +1 -1
- package/dist/data/paymentMethodApi.d.ts +1 -1
- package/dist/helpers/skyflow.d.ts +2 -2
- package/dist/helpers/utils.d.ts +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +1 -1
- package/dist/types/commons.d.ts +11 -1
- package/dist/types/customer.d.ts +10 -0
- package/dist/types/requests.d.ts +8 -1
- package/dist/types/transaction.d.ts +101 -0
- package/package.json +2 -2
- package/src/classes/BaseInlineCheckout.ts +345 -303
- package/src/classes/errorResponse.ts +1 -1
- package/src/classes/liteCheckout.ts +278 -195
- package/src/data/businessApi.ts +17 -13
- package/src/data/cardApi.ts +70 -63
- package/src/data/checkoutApi.ts +75 -59
- package/src/data/customerApi.ts +27 -27
- package/src/data/openPayApi.ts +12 -7
- package/src/data/paymentMethodApi.ts +32 -29
- package/src/data/skyflowApi.ts +18 -14
- package/src/helpers/mercadopago.ts +14 -14
- package/src/helpers/skyflow.ts +36 -30
- package/src/helpers/utils.ts +51 -39
- package/src/helpers/validations.ts +35 -35
- package/src/index.ts +7 -1
- package/src/shared/catalog/paymentMethodsCatalog.ts +8 -8
- package/src/shared/constants/paymentMethodAPM.ts +59 -59
- package/src/shared/constants/tonderUrl.ts +4 -4
- package/src/types/commons.ts +11 -1
- package/src/types/customer.ts +10 -0
- package/src/types/liteInlineCheckout.d.ts +217 -176
- package/src/types/requests.ts +8 -1
- package/src/types/transaction.ts +101 -0
- package/tests/utils/mockClasses.ts +3 -4
|
@@ -1,183 +1,224 @@
|
|
|
1
|
-
import {IConfigureCheckout, IInlineCheckoutBaseOptions} from "./
|
|
2
|
-
import {ICustomerCardsResponse, ISaveCardRequest, ISaveCardResponse} from "./card";
|
|
3
|
-
import {IPaymentMethod} from "./paymentMethod";
|
|
4
|
-
import {IProcessPaymentRequest, IStartCheckoutResponse} from "./checkout";
|
|
5
|
-
import {ITransaction} from "./transaction";
|
|
6
|
-
import {APM} from "./commons";
|
|
7
|
-
import {ErrorResponse} from "../classes/errorResponse";
|
|
1
|
+
import { IConfigureCheckout, IInlineCheckoutBaseOptions } from "./commons";
|
|
8
2
|
import {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
3
|
+
ICustomerCardsResponse,
|
|
4
|
+
ISaveCardRequest,
|
|
5
|
+
ISaveCardResponse,
|
|
6
|
+
} from "./card";
|
|
7
|
+
import { IPaymentMethod } from "./paymentMethod";
|
|
8
|
+
import { IProcessPaymentRequest, IStartCheckoutResponse } from "./checkout";
|
|
9
|
+
import { ITransaction } from "./transaction";
|
|
10
|
+
import { APM } from "./commons";
|
|
11
|
+
import { ErrorResponse } from "../classes/errorResponse";
|
|
12
|
+
import {
|
|
13
|
+
CreateOrderRequest,
|
|
14
|
+
CreatePaymentRequest,
|
|
15
|
+
RegisterCustomerCardRequest,
|
|
16
|
+
StartCheckoutFullRequest,
|
|
17
|
+
StartCheckoutIdRequest,
|
|
18
|
+
StartCheckoutRequest,
|
|
19
|
+
TokensRequest,
|
|
15
20
|
} from "./requests";
|
|
16
21
|
import {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
22
|
+
CreateOrderResponse,
|
|
23
|
+
CreatePaymentResponse,
|
|
24
|
+
CustomerRegisterResponse,
|
|
25
|
+
GetBusinessResponse,
|
|
26
|
+
RegisterCustomerCardResponse,
|
|
27
|
+
StartCheckoutResponse,
|
|
21
28
|
} from "./responses";
|
|
22
29
|
|
|
23
|
-
export class
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
30
|
+
export class LiteCheckout {
|
|
31
|
+
constructor(options: IInlineLiteCheckoutOptions);
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* The configureCheckout function allows you to set initial information, such as the customer's email, which is used to retrieve a list of saved cards.
|
|
35
|
+
* @param {import("./index").IConfigureCheckout} data - Configuration data including customer information and potentially other settings.
|
|
36
|
+
* @returns {Promise<void>}.
|
|
37
|
+
* @public
|
|
38
|
+
*/
|
|
39
|
+
configureCheckout(data: IConfigureCheckout): void;
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Initializes and prepares the checkout for use.
|
|
43
|
+
* This method set up the initial environment.
|
|
44
|
+
* @returns {Promise<void>} A promise that resolves when the checkout has been initialized.
|
|
45
|
+
* @throws {Error} If there's any problem during the checkout initialization.
|
|
46
|
+
* @public
|
|
47
|
+
*/
|
|
48
|
+
injectCheckout(): Promise<void>;
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Processes a payment.
|
|
52
|
+
* @param {import("./index").IProcessPaymentRequest} data - Payment data including customer, cart, and other relevant information.
|
|
53
|
+
* @returns {Promise<import("./index").IStartCheckoutResponse>} A promise that resolves with the payment response or 3DS redirect or is rejected with an error.
|
|
54
|
+
*
|
|
55
|
+
* @throws {Error} Throws an error if the checkout process fails. The error object contains
|
|
56
|
+
* additional `details` property with the response from the server if available.
|
|
57
|
+
* @property {import("./index").IStartCheckoutErrorResponse} error.details - The response body from the server when an error occurs.
|
|
58
|
+
*
|
|
59
|
+
* @public
|
|
60
|
+
*/
|
|
61
|
+
payment(data: IProcessPaymentRequest): Promise<IStartCheckoutResponse>;
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* Verifies the 3DS transaction status.
|
|
65
|
+
* @returns {Promise<import("./index").ITransaction | void>} The result of the 3DS verification and checkout resumption.
|
|
66
|
+
* @public
|
|
67
|
+
*/
|
|
68
|
+
verify3dsTransaction(): Promise<ITransaction | void>;
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* Retrieves the list of cards associated with a customer.
|
|
72
|
+
* @returns {Promise<import("./index").ICustomerCardsResponse>} A promise that resolves with the customer's card data.
|
|
73
|
+
*
|
|
74
|
+
* @throws {import("./index").IPublicError} Throws an error object if the operation fails.
|
|
75
|
+
*
|
|
76
|
+
* @public
|
|
77
|
+
*/
|
|
78
|
+
getCustomerCards(): Promise<ICustomerCardsResponse>;
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* Saves a card to a customer's account. This method can be used to add a new card
|
|
82
|
+
* or update an existing one.
|
|
83
|
+
* @param {import("./index").ISaveCardRequest} card - The card information to be saved.
|
|
84
|
+
* @returns {Promise<import("./index").ISaveCardResponse>} A promise that resolves with the saved card data.
|
|
85
|
+
*
|
|
86
|
+
* @throws {import("./index").IPublicError} Throws an error object if the operation fails.
|
|
87
|
+
*
|
|
88
|
+
* @public
|
|
89
|
+
*/
|
|
90
|
+
saveCustomerCard(card: ISaveCardRequest): Promise<ISaveCardResponse>;
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* Removes a card from a customer's account.
|
|
94
|
+
* @param {string} skyflowId - The unique identifier of the card to be deleted.
|
|
95
|
+
* @returns {Promise<string>} A promise that resolves when the card is successfully deleted.
|
|
96
|
+
*
|
|
97
|
+
* @throws {import("./index").IPublicError} Throws an error object if the operation fails.
|
|
98
|
+
*
|
|
99
|
+
* @public
|
|
100
|
+
*/
|
|
101
|
+
removeCustomerCard(skyflowId: string): Promise<string>;
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* Retrieves the list of available Alternative Payment Methods (APMs).
|
|
105
|
+
* @returns {Promise<import("./index").IPaymentMethod[]>} A promise that resolves with the list of APMs.
|
|
106
|
+
*
|
|
107
|
+
* @throws {import("./index").IPublicError} Throws an error object if the operation fails.
|
|
108
|
+
*
|
|
109
|
+
* @public
|
|
110
|
+
*/
|
|
111
|
+
getCustomerPaymentMethods(): Promise<IPaymentMethod[]>;
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* Retrieves the business information.
|
|
115
|
+
* @returns {Promise<import("./index").GetBusinessResponse>} A promise that resolves with the business information.
|
|
116
|
+
*
|
|
117
|
+
* @throws {import("./index").IPublicError} Throws an error object if the operation fails.
|
|
118
|
+
*
|
|
119
|
+
* @public
|
|
120
|
+
*/
|
|
121
|
+
getBusiness(): Promise<GetBusinessResponse>;
|
|
122
|
+
|
|
123
|
+
// TODO: DEPRECATED
|
|
124
|
+
/**
|
|
125
|
+
* @deprecated This method is deprecated and will be removed in a future release.
|
|
126
|
+
* It is no longer necessary to use this method as customer registration is now automatically handled
|
|
127
|
+
* during the payment process or when using card management methods.
|
|
128
|
+
*/
|
|
129
|
+
customerRegister(
|
|
130
|
+
email: string,
|
|
131
|
+
): Promise<CustomerRegisterResponse | ErrorResponse>;
|
|
132
|
+
|
|
133
|
+
// TODO: DEPRECATED
|
|
134
|
+
/**
|
|
135
|
+
* @deprecated This method is deprecated and will be removed in a future release.
|
|
136
|
+
* It is no longer necessary to use this method as order creation is now automatically
|
|
137
|
+
* handled when making a payment through the `payment` function.
|
|
138
|
+
*/
|
|
139
|
+
createOrder(
|
|
140
|
+
orderItems: CreateOrderRequest,
|
|
141
|
+
): Promise<CreateOrderResponse | ErrorResponse>;
|
|
142
|
+
|
|
143
|
+
// TODO: DEPRECATED
|
|
144
|
+
/**
|
|
145
|
+
* @deprecated This method is deprecated and will be removed in a future release.
|
|
146
|
+
* It is no longer necessary to use this method as payment creation is now automatically
|
|
147
|
+
* handled when making a payment through the `payment` function.
|
|
148
|
+
*/
|
|
149
|
+
createPayment(
|
|
150
|
+
paymentItems: CreatePaymentRequest,
|
|
151
|
+
): Promise<CreatePaymentResponse | ErrorResponse>;
|
|
152
|
+
|
|
153
|
+
// TODO: DEPRECATED
|
|
154
|
+
/**
|
|
155
|
+
* @deprecated This method is deprecated and will be removed in a future release.
|
|
156
|
+
* Use the {@link payment} method
|
|
157
|
+
*/
|
|
158
|
+
startCheckoutRouter(
|
|
159
|
+
routerData: StartCheckoutRequest | StartCheckoutIdRequest,
|
|
160
|
+
): Promise<StartCheckoutResponse | ErrorResponse | undefined>;
|
|
161
|
+
|
|
162
|
+
// TODO: DEPRECATED
|
|
163
|
+
/**
|
|
164
|
+
* @deprecated This method is deprecated and will be removed in a future release.
|
|
165
|
+
* Use the {@link payment} method
|
|
166
|
+
*/
|
|
167
|
+
startCheckoutRouterFull(
|
|
168
|
+
routerFullData: StartCheckoutFullRequest,
|
|
169
|
+
): Promise<StartCheckoutResponse | ErrorResponse | undefined>;
|
|
170
|
+
|
|
171
|
+
// TODO: DEPRECATED
|
|
172
|
+
/**
|
|
173
|
+
* @deprecated This method is deprecated and will be removed in a future release.
|
|
174
|
+
* Use the {@link saveCustomerCard} method
|
|
175
|
+
*/
|
|
176
|
+
registerCustomerCard(
|
|
177
|
+
customerToken: string,
|
|
178
|
+
data: RegisterCustomerCardRequest,
|
|
179
|
+
): Promise<RegisterCustomerCardResponse | ErrorResponse>;
|
|
180
|
+
|
|
181
|
+
// TODO: DEPRECATED
|
|
182
|
+
/**
|
|
183
|
+
* @deprecated This method is deprecated and will be removed in a future release.
|
|
184
|
+
* Use the {@link removeCustomerCard} method
|
|
185
|
+
*/
|
|
186
|
+
deleteCustomerCard(
|
|
187
|
+
customerToken: string,
|
|
188
|
+
skyflowId: string,
|
|
189
|
+
): Promise<Boolean | ErrorResponse>;
|
|
190
|
+
|
|
191
|
+
// TODO: DEPRECATED
|
|
192
|
+
/**
|
|
193
|
+
* @deprecated This method is deprecated and will be removed in a future release.
|
|
194
|
+
* Use the {@link getCustomerPaymentMethods} method
|
|
195
|
+
*/
|
|
196
|
+
getActiveAPMs(): Promise<APM[]>;
|
|
197
|
+
|
|
198
|
+
// TODO: DEPRECATED
|
|
199
|
+
/**
|
|
200
|
+
* @deprecated This method is deprecated and will be removed in a future release.
|
|
201
|
+
* It is no longer necessary to use this method as customer registration is now automatically handled
|
|
202
|
+
* during the payment process or when using card management methods.
|
|
203
|
+
*/
|
|
204
|
+
getSkyflowTokens({
|
|
205
|
+
vault_id,
|
|
206
|
+
vault_url,
|
|
207
|
+
data,
|
|
208
|
+
}: TokensRequest): Promise<any | ErrorResponse>;
|
|
209
|
+
|
|
210
|
+
// TODO: DEPRECATED
|
|
211
|
+
/**
|
|
212
|
+
* @deprecated This method is deprecated and will be removed in a future release.
|
|
213
|
+
* It is no longer necessary to use this method is now automatically handled
|
|
214
|
+
* during the payment process.
|
|
215
|
+
*/
|
|
216
|
+
getOpenpayDeviceSessionID(
|
|
217
|
+
merchant_id: string,
|
|
218
|
+
public_key: string,
|
|
219
|
+
is_sandbox: boolean,
|
|
220
|
+
): Promise<string | ErrorResponse>;
|
|
180
221
|
}
|
|
181
222
|
|
|
182
|
-
|
|
183
|
-
|
|
223
|
+
export interface IInlineLiteCheckoutOptions
|
|
224
|
+
extends IInlineCheckoutBaseOptions {}
|
package/src/types/requests.ts
CHANGED
|
@@ -71,7 +71,7 @@ export type RegisterCustomerCardRequest = {
|
|
|
71
71
|
skyflow_id: string;
|
|
72
72
|
}
|
|
73
73
|
|
|
74
|
-
export type
|
|
74
|
+
export type TokensSkyflowRequest = {
|
|
75
75
|
baseUrl: string;
|
|
76
76
|
apiKey: string;
|
|
77
77
|
vault_id: string,
|
|
@@ -80,6 +80,13 @@ export type TokensRequest = {
|
|
|
80
80
|
[key: string]: any;
|
|
81
81
|
}
|
|
82
82
|
}
|
|
83
|
+
export type TokensRequest = {
|
|
84
|
+
vault_id: string,
|
|
85
|
+
vault_url: string,
|
|
86
|
+
data: {
|
|
87
|
+
[key: string]: any;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
83
90
|
|
|
84
91
|
export type StartCheckoutFullRequest = {
|
|
85
92
|
order: {
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
export interface ITransaction {
|
|
2
|
+
id: number;
|
|
3
|
+
provider: string;
|
|
4
|
+
country: string;
|
|
5
|
+
currency_code: string;
|
|
6
|
+
transaction_status: string;
|
|
7
|
+
created: string;
|
|
8
|
+
modified: string;
|
|
9
|
+
operation_date: string;
|
|
10
|
+
transaction_reference: string;
|
|
11
|
+
transaction_type: string;
|
|
12
|
+
status: string;
|
|
13
|
+
amount: string;
|
|
14
|
+
related_transaction_reference?: null | string;
|
|
15
|
+
reason?: null | string;
|
|
16
|
+
is_refunded?: null | boolean;
|
|
17
|
+
is_disputed?: null | boolean;
|
|
18
|
+
number_of_payment_attempts: number;
|
|
19
|
+
card_brand?: null | string;
|
|
20
|
+
number_of_installments: number;
|
|
21
|
+
payment?: {
|
|
22
|
+
id: number;
|
|
23
|
+
created: string;
|
|
24
|
+
modified: string;
|
|
25
|
+
amount: string;
|
|
26
|
+
status: string;
|
|
27
|
+
date: string;
|
|
28
|
+
paid_date: null | string;
|
|
29
|
+
source: null | string;
|
|
30
|
+
customer_order_reference: null | string;
|
|
31
|
+
client: number;
|
|
32
|
+
business: number;
|
|
33
|
+
shipping_address?: null | string;
|
|
34
|
+
billing_address?: null | string;
|
|
35
|
+
order: number;
|
|
36
|
+
};
|
|
37
|
+
checkout: {
|
|
38
|
+
id: string;
|
|
39
|
+
created: string;
|
|
40
|
+
modified: string;
|
|
41
|
+
checkout_data: {
|
|
42
|
+
name: string;
|
|
43
|
+
amount: number;
|
|
44
|
+
source: string;
|
|
45
|
+
id_ship: string;
|
|
46
|
+
currency: string;
|
|
47
|
+
order_id: number;
|
|
48
|
+
token_id: string;
|
|
49
|
+
last_name: string;
|
|
50
|
+
id_product: string;
|
|
51
|
+
ip_address: string;
|
|
52
|
+
payment_id: number;
|
|
53
|
+
return_url: string;
|
|
54
|
+
title_ship: string;
|
|
55
|
+
business_id: number;
|
|
56
|
+
checkout_id: string;
|
|
57
|
+
description: string;
|
|
58
|
+
browser_info: {
|
|
59
|
+
language: string;
|
|
60
|
+
time_zone: number;
|
|
61
|
+
user_agent: string;
|
|
62
|
+
color_depth: number;
|
|
63
|
+
screen_width: number;
|
|
64
|
+
screen_height: number;
|
|
65
|
+
javascript_enabled: boolean;
|
|
66
|
+
};
|
|
67
|
+
email_client: string;
|
|
68
|
+
phone_number: string;
|
|
69
|
+
instance_id_ship: string;
|
|
70
|
+
quantity_product: number;
|
|
71
|
+
device_session_id: null | string;
|
|
72
|
+
number_of_payment_attempts: number;
|
|
73
|
+
};
|
|
74
|
+
number_of_payment_attempts: number;
|
|
75
|
+
tried_psps: string[];
|
|
76
|
+
rejected_transactions: string[];
|
|
77
|
+
routing_step: number;
|
|
78
|
+
route_length: number;
|
|
79
|
+
last_status: string;
|
|
80
|
+
ip_address: string;
|
|
81
|
+
is_dynamic_routing: boolean;
|
|
82
|
+
is_route_finished: boolean;
|
|
83
|
+
business: number;
|
|
84
|
+
payment: number;
|
|
85
|
+
};
|
|
86
|
+
currency: {
|
|
87
|
+
id: number;
|
|
88
|
+
name: string;
|
|
89
|
+
code: string;
|
|
90
|
+
symbol: string;
|
|
91
|
+
country: null | string;
|
|
92
|
+
};
|
|
93
|
+
payment_method?: null | {
|
|
94
|
+
id: number;
|
|
95
|
+
name: string;
|
|
96
|
+
display_name: string;
|
|
97
|
+
category: string;
|
|
98
|
+
is_apm: boolean;
|
|
99
|
+
};
|
|
100
|
+
issuing_country?: null | string;
|
|
101
|
+
}
|
|
@@ -4,9 +4,8 @@ import {
|
|
|
4
4
|
CreatePaymentRequest,
|
|
5
5
|
RegisterCustomerCardRequest,
|
|
6
6
|
StartCheckoutRequest,
|
|
7
|
-
TokensRequest,
|
|
8
7
|
StartCheckoutFullRequest,
|
|
9
|
-
StartCheckoutRequestWithCard
|
|
8
|
+
StartCheckoutRequestWithCard, TokensSkyflowRequest
|
|
10
9
|
} from "../../src/types/requests";
|
|
11
10
|
import {
|
|
12
11
|
CreateOrderResponse,
|
|
@@ -556,14 +555,14 @@ export class StartCheckoutFullRequestClass implements StartCheckoutFullRequest {
|
|
|
556
555
|
}
|
|
557
556
|
}
|
|
558
557
|
|
|
559
|
-
export class TokensRequestClass implements
|
|
558
|
+
export class TokensRequestClass implements TokensSkyflowRequest {
|
|
560
559
|
baseUrl!: string;
|
|
561
560
|
apiKey!: string;
|
|
562
561
|
vault_id!: string;
|
|
563
562
|
vault_url!: string;
|
|
564
563
|
data: { [key: string]: any } = {};
|
|
565
564
|
|
|
566
|
-
get mockObject():
|
|
565
|
+
get mockObject(): TokensSkyflowRequest {
|
|
567
566
|
return {
|
|
568
567
|
baseUrl: "",
|
|
569
568
|
apiKey: "",
|