@channelpayments/node-sdk 1.190.0 → 1.193.0
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/cjs/apis/ChannelPaymentsApi.d.ts +14 -6
- package/dist/cjs/apis/ChannelPaymentsApi.js +142 -8
- package/dist/cjs/models/AuthorizedPaymentInstrumentsEntity.d.ts +32 -0
- package/dist/cjs/models/AuthorizedPaymentInstrumentsEntity.js +49 -0
- package/dist/cjs/models/CheckoutSessionBaseEntity.d.ts +15 -0
- package/dist/cjs/models/CheckoutSessionBaseEntity.js +11 -1
- package/dist/cjs/models/CheckoutSessionEntity.d.ts +15 -0
- package/dist/cjs/models/CheckoutSessionEntity.js +11 -1
- package/dist/cjs/models/ConnectorServiceTokenEntity.d.ts +1 -2
- package/dist/cjs/models/ConnectorServiceTokenEntity.js +2 -3
- package/dist/cjs/models/CreatePaymentMethodSessionDto.d.ts +38 -0
- package/dist/cjs/models/CreatePaymentMethodSessionDto.js +50 -0
- package/dist/cjs/models/CreateProvisionedCardTokenByMerchantDto.d.ts +7 -2
- package/dist/cjs/models/CreateProvisionedCardTokenByMerchantDto.js +3 -2
- package/dist/cjs/models/CreateProvisionedCardTokenDto.d.ts +0 -2
- package/dist/cjs/models/CreateProvisionedCardTokenDto.js +1 -3
- package/dist/cjs/models/CreateServicePaymentMethodDto.d.ts +6 -0
- package/dist/cjs/models/CreateServicePaymentMethodDto.js +2 -0
- package/dist/cjs/models/PaymentMethodEntity.d.ts +0 -2
- package/dist/cjs/models/PaymentMethodEntity.js +1 -3
- package/dist/cjs/models/PaymentMethodServiceEntity.d.ts +0 -2
- package/dist/cjs/models/PaymentMethodServiceEntity.js +1 -3
- package/dist/cjs/models/PaymentMethodSessionAttemptEntity.d.ts +60 -0
- package/dist/cjs/models/PaymentMethodSessionAttemptEntity.js +69 -0
- package/dist/cjs/models/PaymentMethodSessionBaseEntity.d.ts +148 -0
- package/dist/cjs/models/PaymentMethodSessionBaseEntity.js +107 -0
- package/dist/cjs/models/PaymentMethodSessionEntity.d.ts +154 -0
- package/dist/cjs/models/PaymentMethodSessionEntity.js +110 -0
- package/dist/cjs/models/SessionPaymentMethodEntity.d.ts +177 -0
- package/dist/cjs/models/SessionPaymentMethodEntity.js +119 -0
- package/dist/cjs/models/index.d.ts +6 -0
- package/dist/cjs/models/index.js +6 -0
- package/dist/cjs/runtime.js +1 -1
- package/dist/mjs/apis/ChannelPaymentsApi.d.ts +14 -6
- package/dist/mjs/apis/ChannelPaymentsApi.js +139 -9
- package/dist/mjs/models/AuthorizedPaymentInstrumentsEntity.d.ts +32 -0
- package/dist/mjs/models/AuthorizedPaymentInstrumentsEntity.js +43 -0
- package/dist/mjs/models/CheckoutSessionBaseEntity.d.ts +15 -0
- package/dist/mjs/models/CheckoutSessionBaseEntity.js +10 -0
- package/dist/mjs/models/CheckoutSessionEntity.d.ts +15 -0
- package/dist/mjs/models/CheckoutSessionEntity.js +10 -0
- package/dist/mjs/models/ConnectorServiceTokenEntity.d.ts +1 -2
- package/dist/mjs/models/ConnectorServiceTokenEntity.js +2 -3
- package/dist/mjs/models/CreatePaymentMethodSessionDto.d.ts +38 -0
- package/dist/mjs/models/CreatePaymentMethodSessionDto.js +44 -0
- package/dist/mjs/models/CreateProvisionedCardTokenByMerchantDto.d.ts +7 -2
- package/dist/mjs/models/CreateProvisionedCardTokenByMerchantDto.js +3 -2
- package/dist/mjs/models/CreateProvisionedCardTokenDto.d.ts +0 -2
- package/dist/mjs/models/CreateProvisionedCardTokenDto.js +1 -3
- package/dist/mjs/models/CreateServicePaymentMethodDto.d.ts +6 -0
- package/dist/mjs/models/CreateServicePaymentMethodDto.js +2 -0
- package/dist/mjs/models/PaymentMethodEntity.d.ts +0 -2
- package/dist/mjs/models/PaymentMethodEntity.js +1 -3
- package/dist/mjs/models/PaymentMethodServiceEntity.d.ts +0 -2
- package/dist/mjs/models/PaymentMethodServiceEntity.js +1 -3
- package/dist/mjs/models/PaymentMethodSessionAttemptEntity.d.ts +60 -0
- package/dist/mjs/models/PaymentMethodSessionAttemptEntity.js +62 -0
- package/dist/mjs/models/PaymentMethodSessionBaseEntity.d.ts +148 -0
- package/dist/mjs/models/PaymentMethodSessionBaseEntity.js +100 -0
- package/dist/mjs/models/PaymentMethodSessionEntity.d.ts +154 -0
- package/dist/mjs/models/PaymentMethodSessionEntity.js +103 -0
- package/dist/mjs/models/SessionPaymentMethodEntity.d.ts +177 -0
- package/dist/mjs/models/SessionPaymentMethodEntity.js +112 -0
- package/dist/mjs/models/index.d.ts +6 -0
- package/dist/mjs/models/index.js +6 -0
- package/dist/mjs/runtime.js +1 -1
- package/package.json +1 -1
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
*
|
|
8
8
|
*/
|
|
9
9
|
import * as runtime from '../runtime';
|
|
10
|
-
import { BuyersEntityFromJSON, BuyersSearchEntityFromJSON, CaptureTransactionDtoToJSON, ChangeNotificationEntityFromJSON, ChangeNotificationsSearchEntityFromJSON, CheckoutSessionEntityFromJSON, ConnectorServiceTokenEntityFromJSON, CreateBuyerDtoToJSON, CreateCheckoutSessionDtoToJSON, CreatePaymentMethodDtoToJSON, CreateProvisionedCardTokenDtoToJSON, CreateTransactionRefundDtoToJSON, CreateTransactionRequestDtoToJSON, ErrorEntityFromJSON, MerchantEntityFromJSON, MerchantFeeDetailsEntityFromJSON, PaymentMethodEntityFromJSON, PaymentMethodsSearchEntityFromJSON, ReturnNotificationEntityFromJSON, ReturnNotificationsSearchEntityFromJSON, TransactionEntityFromJSON, TransactionRefundEntityFromJSON, TransactionRefundsSearchEntityFromJSON, TransactionsSearchEntityFromJSON, UpdateBuyerDtoToJSON, } from '../models';
|
|
10
|
+
import { BuyersEntityFromJSON, BuyersSearchEntityFromJSON, CaptureTransactionDtoToJSON, ChangeNotificationEntityFromJSON, ChangeNotificationsSearchEntityFromJSON, CheckoutSessionEntityFromJSON, ConnectorServiceTokenEntityFromJSON, CreateBuyerDtoToJSON, CreateCheckoutSessionDtoToJSON, CreatePaymentMethodDtoToJSON, CreatePaymentMethodSessionDtoToJSON, CreateProvisionedCardTokenDtoToJSON, CreateTransactionRefundDtoToJSON, CreateTransactionRequestDtoToJSON, ErrorEntityFromJSON, MerchantEntityFromJSON, MerchantFeeDetailsEntityFromJSON, PaymentMethodEntityFromJSON, PaymentMethodSessionEntityFromJSON, PaymentMethodsSearchEntityFromJSON, ReturnNotificationEntityFromJSON, ReturnNotificationsSearchEntityFromJSON, TransactionEntityFromJSON, TransactionRefundEntityFromJSON, TransactionRefundsSearchEntityFromJSON, TransactionsSearchEntityFromJSON, UpdateBuyerDtoToJSON, } from '../models';
|
|
11
11
|
/**
|
|
12
12
|
*
|
|
13
13
|
*/
|
|
@@ -373,6 +373,76 @@ export class ChannelPaymentsApi extends runtime.BaseAPI {
|
|
|
373
373
|
}
|
|
374
374
|
return await response.value();
|
|
375
375
|
}
|
|
376
|
+
/**
|
|
377
|
+
* Create a new payment method session.
|
|
378
|
+
* Create payment method session.
|
|
379
|
+
*/
|
|
380
|
+
async createPaymentMethodSession(createPaymentMethodSessionDto) {
|
|
381
|
+
if (createPaymentMethodSessionDto === null || createPaymentMethodSessionDto === undefined) {
|
|
382
|
+
throw new runtime.RequiredError('createPaymentMethodSessionDto', 'Required parameter \'createPaymentMethodSessionDto\' was null or undefined when calling createPaymentMethodSession.');
|
|
383
|
+
}
|
|
384
|
+
if (createPaymentMethodSessionDto.origin === null || createPaymentMethodSessionDto.origin === undefined) {
|
|
385
|
+
throw new runtime.RequiredError('createPaymentMethodSessionDto.origin', 'Required parameter \'createPaymentMethodSessionDto.origin\' was null or undefined when calling createPaymentMethodSession.');
|
|
386
|
+
}
|
|
387
|
+
const queryParameters = {};
|
|
388
|
+
const headerParameters = {};
|
|
389
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
390
|
+
const rawResponse = await this.request({
|
|
391
|
+
path: `/payment-method-sessions`,
|
|
392
|
+
method: 'POST',
|
|
393
|
+
headers: headerParameters,
|
|
394
|
+
query: queryParameters,
|
|
395
|
+
body: CreatePaymentMethodSessionDtoToJSON(createPaymentMethodSessionDto),
|
|
396
|
+
});
|
|
397
|
+
let response;
|
|
398
|
+
if (rawResponse.status === 201) {
|
|
399
|
+
response = new runtime.JSONApiResponse(rawResponse, (jsonValue) => PaymentMethodSessionEntityFromJSON(jsonValue));
|
|
400
|
+
}
|
|
401
|
+
if (rawResponse.status === 400) {
|
|
402
|
+
const errorResponse = new runtime.JSONApiResponse(rawResponse, (jsonValue) => ErrorEntityFromJSON(jsonValue));
|
|
403
|
+
const error = await errorResponse.value();
|
|
404
|
+
throw error;
|
|
405
|
+
}
|
|
406
|
+
if (rawResponse.status === 401) {
|
|
407
|
+
const errorResponse = new runtime.JSONApiResponse(rawResponse, (jsonValue) => ErrorEntityFromJSON(jsonValue));
|
|
408
|
+
const error = await errorResponse.value();
|
|
409
|
+
throw error;
|
|
410
|
+
}
|
|
411
|
+
if (rawResponse.status === 403) {
|
|
412
|
+
const errorResponse = new runtime.JSONApiResponse(rawResponse, (jsonValue) => ErrorEntityFromJSON(jsonValue));
|
|
413
|
+
const error = await errorResponse.value();
|
|
414
|
+
throw error;
|
|
415
|
+
}
|
|
416
|
+
if (rawResponse.status === 404) {
|
|
417
|
+
const errorResponse = new runtime.JSONApiResponse(rawResponse, (jsonValue) => ErrorEntityFromJSON(jsonValue));
|
|
418
|
+
const error = await errorResponse.value();
|
|
419
|
+
throw error;
|
|
420
|
+
}
|
|
421
|
+
if (rawResponse.status === 500) {
|
|
422
|
+
const errorResponse = new runtime.JSONApiResponse(rawResponse, (jsonValue) => ErrorEntityFromJSON(jsonValue));
|
|
423
|
+
const error = await errorResponse.value();
|
|
424
|
+
throw error;
|
|
425
|
+
}
|
|
426
|
+
if (rawResponse.status === 502) {
|
|
427
|
+
const errorResponse = new runtime.JSONApiResponse(rawResponse, (jsonValue) => ErrorEntityFromJSON(jsonValue));
|
|
428
|
+
const error = await errorResponse.value();
|
|
429
|
+
throw error;
|
|
430
|
+
}
|
|
431
|
+
if (rawResponse.status === 503) {
|
|
432
|
+
const errorResponse = new runtime.JSONApiResponse(rawResponse, (jsonValue) => ErrorEntityFromJSON(jsonValue));
|
|
433
|
+
const error = await errorResponse.value();
|
|
434
|
+
throw error;
|
|
435
|
+
}
|
|
436
|
+
if (rawResponse.status === 504) {
|
|
437
|
+
const errorResponse = new runtime.JSONApiResponse(rawResponse, (jsonValue) => ErrorEntityFromJSON(jsonValue));
|
|
438
|
+
const error = await errorResponse.value();
|
|
439
|
+
throw error;
|
|
440
|
+
}
|
|
441
|
+
if (!response) {
|
|
442
|
+
response = new runtime.TextApiResponse(rawResponse);
|
|
443
|
+
}
|
|
444
|
+
return await response.value();
|
|
445
|
+
}
|
|
376
446
|
/**
|
|
377
447
|
* Attempts to create a new transaction by specified intent for a given payment method
|
|
378
448
|
* Create transaction
|
|
@@ -456,8 +526,8 @@ export class ChannelPaymentsApi extends runtime.BaseAPI {
|
|
|
456
526
|
return await response.value();
|
|
457
527
|
}
|
|
458
528
|
/**
|
|
459
|
-
*
|
|
460
|
-
*
|
|
529
|
+
* Deletes a buyer by buyer ID.
|
|
530
|
+
* Delete buyer.
|
|
461
531
|
*/
|
|
462
532
|
async deleteBuyer(buyerId) {
|
|
463
533
|
if (buyerId === null || buyerId === undefined) {
|
|
@@ -1167,6 +1237,71 @@ export class ChannelPaymentsApi extends runtime.BaseAPI {
|
|
|
1167
1237
|
}
|
|
1168
1238
|
return await response.value();
|
|
1169
1239
|
}
|
|
1240
|
+
/**
|
|
1241
|
+
* Find a payment method session by session ID.
|
|
1242
|
+
* Find payment method session.
|
|
1243
|
+
*/
|
|
1244
|
+
async getPaymentMethodSession(sessionId) {
|
|
1245
|
+
if (sessionId === null || sessionId === undefined) {
|
|
1246
|
+
throw new runtime.RequiredError('sessionId', 'Required parameter \'sessionId\' was null or undefined when calling getPaymentMethodSession.');
|
|
1247
|
+
}
|
|
1248
|
+
const queryParameters = {};
|
|
1249
|
+
const headerParameters = {};
|
|
1250
|
+
const rawResponse = await this.request({
|
|
1251
|
+
path: `/payment-method-sessions/{sessionId}`.replace(`{${"sessionId"}}`, encodeURIComponent(sessionId)),
|
|
1252
|
+
method: 'GET',
|
|
1253
|
+
headers: headerParameters,
|
|
1254
|
+
query: queryParameters,
|
|
1255
|
+
});
|
|
1256
|
+
let response;
|
|
1257
|
+
if (rawResponse.status === 200) {
|
|
1258
|
+
response = new runtime.JSONApiResponse(rawResponse, (jsonValue) => PaymentMethodSessionEntityFromJSON(jsonValue));
|
|
1259
|
+
}
|
|
1260
|
+
if (rawResponse.status === 400) {
|
|
1261
|
+
const errorResponse = new runtime.JSONApiResponse(rawResponse, (jsonValue) => ErrorEntityFromJSON(jsonValue));
|
|
1262
|
+
const error = await errorResponse.value();
|
|
1263
|
+
throw error;
|
|
1264
|
+
}
|
|
1265
|
+
if (rawResponse.status === 401) {
|
|
1266
|
+
const errorResponse = new runtime.JSONApiResponse(rawResponse, (jsonValue) => ErrorEntityFromJSON(jsonValue));
|
|
1267
|
+
const error = await errorResponse.value();
|
|
1268
|
+
throw error;
|
|
1269
|
+
}
|
|
1270
|
+
if (rawResponse.status === 403) {
|
|
1271
|
+
const errorResponse = new runtime.JSONApiResponse(rawResponse, (jsonValue) => ErrorEntityFromJSON(jsonValue));
|
|
1272
|
+
const error = await errorResponse.value();
|
|
1273
|
+
throw error;
|
|
1274
|
+
}
|
|
1275
|
+
if (rawResponse.status === 404) {
|
|
1276
|
+
const errorResponse = new runtime.JSONApiResponse(rawResponse, (jsonValue) => ErrorEntityFromJSON(jsonValue));
|
|
1277
|
+
const error = await errorResponse.value();
|
|
1278
|
+
throw error;
|
|
1279
|
+
}
|
|
1280
|
+
if (rawResponse.status === 500) {
|
|
1281
|
+
const errorResponse = new runtime.JSONApiResponse(rawResponse, (jsonValue) => ErrorEntityFromJSON(jsonValue));
|
|
1282
|
+
const error = await errorResponse.value();
|
|
1283
|
+
throw error;
|
|
1284
|
+
}
|
|
1285
|
+
if (rawResponse.status === 502) {
|
|
1286
|
+
const errorResponse = new runtime.JSONApiResponse(rawResponse, (jsonValue) => ErrorEntityFromJSON(jsonValue));
|
|
1287
|
+
const error = await errorResponse.value();
|
|
1288
|
+
throw error;
|
|
1289
|
+
}
|
|
1290
|
+
if (rawResponse.status === 503) {
|
|
1291
|
+
const errorResponse = new runtime.JSONApiResponse(rawResponse, (jsonValue) => ErrorEntityFromJSON(jsonValue));
|
|
1292
|
+
const error = await errorResponse.value();
|
|
1293
|
+
throw error;
|
|
1294
|
+
}
|
|
1295
|
+
if (rawResponse.status === 504) {
|
|
1296
|
+
const errorResponse = new runtime.JSONApiResponse(rawResponse, (jsonValue) => ErrorEntityFromJSON(jsonValue));
|
|
1297
|
+
const error = await errorResponse.value();
|
|
1298
|
+
throw error;
|
|
1299
|
+
}
|
|
1300
|
+
if (!response) {
|
|
1301
|
+
response = new runtime.TextApiResponse(rawResponse);
|
|
1302
|
+
}
|
|
1303
|
+
return await response.value();
|
|
1304
|
+
}
|
|
1170
1305
|
/**
|
|
1171
1306
|
* Attempts to find refund by transaction ID and refund ID
|
|
1172
1307
|
* Find refund
|
|
@@ -1451,9 +1586,6 @@ export class ChannelPaymentsApi extends runtime.BaseAPI {
|
|
|
1451
1586
|
* Search a buyer
|
|
1452
1587
|
*/
|
|
1453
1588
|
async searchBuyers(requestParameters) {
|
|
1454
|
-
if (requestParameters.merchantId === null || requestParameters.merchantId === undefined) {
|
|
1455
|
-
throw new runtime.RequiredError('merchantId', 'Required parameter \'merchantId\' was null or undefined when calling searchBuyers.');
|
|
1456
|
-
}
|
|
1457
1589
|
const queryParameters = {};
|
|
1458
1590
|
if (requestParameters.merchantId !== undefined) {
|
|
1459
1591
|
queryParameters['merchantId'] = requestParameters.merchantId;
|
|
@@ -2289,9 +2421,7 @@ export const SearchPaymentMethodsMethodEnum = {
|
|
|
2289
2421
|
* @export
|
|
2290
2422
|
*/
|
|
2291
2423
|
export const SearchPaymentMethodsCurrencyEnum = {
|
|
2292
|
-
Usd: 'USD'
|
|
2293
|
-
Aud: 'AUD',
|
|
2294
|
-
Cad: 'CAD'
|
|
2424
|
+
Usd: 'USD'
|
|
2295
2425
|
};
|
|
2296
2426
|
/**
|
|
2297
2427
|
* @export
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Channel Payments API
|
|
3
|
+
*
|
|
4
|
+
* NOTE: This class is auto generated. Do not edit the class manually.
|
|
5
|
+
*
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
*
|
|
9
|
+
* @export
|
|
10
|
+
* @interface AuthorizedPaymentInstrumentsEntity
|
|
11
|
+
*/
|
|
12
|
+
export interface AuthorizedPaymentInstrumentsEntity {
|
|
13
|
+
/**
|
|
14
|
+
* Indicates if card payment methods are authorized.
|
|
15
|
+
* @type {boolean}
|
|
16
|
+
* @memberof AuthorizedPaymentInstrumentsEntity
|
|
17
|
+
*/
|
|
18
|
+
card: boolean;
|
|
19
|
+
/**
|
|
20
|
+
* Indicates if ACH payment methods are authorized.
|
|
21
|
+
* @type {boolean}
|
|
22
|
+
* @memberof AuthorizedPaymentInstrumentsEntity
|
|
23
|
+
*/
|
|
24
|
+
ach: boolean;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Check if a given object implements the AuthorizedPaymentInstrumentsEntity interface.
|
|
28
|
+
*/
|
|
29
|
+
export declare function instanceOfAuthorizedPaymentInstrumentsEntity(value: object): boolean;
|
|
30
|
+
export declare function AuthorizedPaymentInstrumentsEntityFromJSON(json: any): AuthorizedPaymentInstrumentsEntity;
|
|
31
|
+
export declare function AuthorizedPaymentInstrumentsEntityFromJSONTyped(json: any, ignoreDiscriminator: boolean): AuthorizedPaymentInstrumentsEntity;
|
|
32
|
+
export declare function AuthorizedPaymentInstrumentsEntityToJSON(value?: AuthorizedPaymentInstrumentsEntity | null): any;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Channel Payments API
|
|
5
|
+
*
|
|
6
|
+
* NOTE: This class is auto generated. Do not edit the class manually.
|
|
7
|
+
*
|
|
8
|
+
*/
|
|
9
|
+
import { removeNullUndefined } from '../runtime';
|
|
10
|
+
/**
|
|
11
|
+
* Check if a given object implements the AuthorizedPaymentInstrumentsEntity interface.
|
|
12
|
+
*/
|
|
13
|
+
export function instanceOfAuthorizedPaymentInstrumentsEntity(value) {
|
|
14
|
+
let isInstance = true;
|
|
15
|
+
isInstance = isInstance && "card" in value;
|
|
16
|
+
isInstance = isInstance && "ach" in value;
|
|
17
|
+
return isInstance;
|
|
18
|
+
}
|
|
19
|
+
export function AuthorizedPaymentInstrumentsEntityFromJSON(json) {
|
|
20
|
+
return AuthorizedPaymentInstrumentsEntityFromJSONTyped(json, false);
|
|
21
|
+
}
|
|
22
|
+
export function AuthorizedPaymentInstrumentsEntityFromJSONTyped(json, ignoreDiscriminator) {
|
|
23
|
+
if ((json === undefined) || (json === null)) {
|
|
24
|
+
return json;
|
|
25
|
+
}
|
|
26
|
+
const typed = {
|
|
27
|
+
'card': json['card'],
|
|
28
|
+
'ach': json['ach'],
|
|
29
|
+
};
|
|
30
|
+
return removeNullUndefined(typed);
|
|
31
|
+
}
|
|
32
|
+
export function AuthorizedPaymentInstrumentsEntityToJSON(value) {
|
|
33
|
+
if (value === undefined) {
|
|
34
|
+
return undefined;
|
|
35
|
+
}
|
|
36
|
+
if (value === null) {
|
|
37
|
+
return null;
|
|
38
|
+
}
|
|
39
|
+
return {
|
|
40
|
+
'card': value.card,
|
|
41
|
+
'ach': value.ach,
|
|
42
|
+
};
|
|
43
|
+
}
|
|
@@ -157,6 +157,12 @@ export interface CheckoutSessionBaseEntity {
|
|
|
157
157
|
* @memberof CheckoutSessionBaseEntity
|
|
158
158
|
*/
|
|
159
159
|
externalBuyerId?: string;
|
|
160
|
+
/**
|
|
161
|
+
* Who should initiate the transaction.
|
|
162
|
+
* @type {string}
|
|
163
|
+
* @memberof CheckoutSessionBaseEntity
|
|
164
|
+
*/
|
|
165
|
+
transactionInitiator?: CheckoutSessionBaseEntityTransactionInitiatorEnum;
|
|
160
166
|
}
|
|
161
167
|
/**
|
|
162
168
|
* @export
|
|
@@ -176,6 +182,15 @@ export declare const CheckoutSessionBaseEntityStatusEnum: {
|
|
|
176
182
|
readonly Completed: "COMPLETED";
|
|
177
183
|
};
|
|
178
184
|
export type CheckoutSessionBaseEntityStatusEnum = typeof CheckoutSessionBaseEntityStatusEnum[keyof typeof CheckoutSessionBaseEntityStatusEnum];
|
|
185
|
+
/**
|
|
186
|
+
* @export
|
|
187
|
+
*/
|
|
188
|
+
export declare const CheckoutSessionBaseEntityTransactionInitiatorEnum: {
|
|
189
|
+
readonly Mit: "MIT";
|
|
190
|
+
readonly Cit: "CIT";
|
|
191
|
+
readonly Sit: "SIT";
|
|
192
|
+
};
|
|
193
|
+
export type CheckoutSessionBaseEntityTransactionInitiatorEnum = typeof CheckoutSessionBaseEntityTransactionInitiatorEnum[keyof typeof CheckoutSessionBaseEntityTransactionInitiatorEnum];
|
|
179
194
|
/**
|
|
180
195
|
* Check if a given object implements the CheckoutSessionBaseEntity interface.
|
|
181
196
|
*/
|
|
@@ -26,6 +26,14 @@ export const CheckoutSessionBaseEntityStatusEnum = {
|
|
|
26
26
|
Expired: 'EXPIRED',
|
|
27
27
|
Completed: 'COMPLETED'
|
|
28
28
|
};
|
|
29
|
+
/**
|
|
30
|
+
* @export
|
|
31
|
+
*/
|
|
32
|
+
export const CheckoutSessionBaseEntityTransactionInitiatorEnum = {
|
|
33
|
+
Mit: 'MIT',
|
|
34
|
+
Cit: 'CIT',
|
|
35
|
+
Sit: 'SIT'
|
|
36
|
+
};
|
|
29
37
|
/**
|
|
30
38
|
* Check if a given object implements the CheckoutSessionBaseEntity interface.
|
|
31
39
|
*/
|
|
@@ -81,6 +89,7 @@ export function CheckoutSessionBaseEntityFromJSONTyped(json, ignoreDiscriminator
|
|
|
81
89
|
'canStore': !exists(json, 'canStore') ? undefined : json['canStore'],
|
|
82
90
|
'buyerId': !exists(json, 'buyerId') ? undefined : json['buyerId'],
|
|
83
91
|
'externalBuyerId': !exists(json, 'externalBuyerId') ? undefined : json['externalBuyerId'],
|
|
92
|
+
'transactionInitiator': !exists(json, 'transactionInitiator') ? undefined : json['transactionInitiator'],
|
|
84
93
|
};
|
|
85
94
|
return removeNullUndefined(typed);
|
|
86
95
|
}
|
|
@@ -116,5 +125,6 @@ export function CheckoutSessionBaseEntityToJSON(value) {
|
|
|
116
125
|
'canStore': value.canStore,
|
|
117
126
|
'buyerId': value.buyerId,
|
|
118
127
|
'externalBuyerId': value.externalBuyerId,
|
|
128
|
+
'transactionInitiator': value.transactionInitiator,
|
|
119
129
|
};
|
|
120
130
|
}
|
|
@@ -157,6 +157,12 @@ export interface CheckoutSessionEntity {
|
|
|
157
157
|
* @memberof CheckoutSessionEntity
|
|
158
158
|
*/
|
|
159
159
|
externalBuyerId?: string;
|
|
160
|
+
/**
|
|
161
|
+
* Who should initiate the transaction.
|
|
162
|
+
* @type {string}
|
|
163
|
+
* @memberof CheckoutSessionEntity
|
|
164
|
+
*/
|
|
165
|
+
transactionInitiator?: CheckoutSessionEntityTransactionInitiatorEnum;
|
|
160
166
|
/**
|
|
161
167
|
*
|
|
162
168
|
* @type {string}
|
|
@@ -200,6 +206,15 @@ export declare const CheckoutSessionEntityStatusEnum: {
|
|
|
200
206
|
readonly Completed: "COMPLETED";
|
|
201
207
|
};
|
|
202
208
|
export type CheckoutSessionEntityStatusEnum = typeof CheckoutSessionEntityStatusEnum[keyof typeof CheckoutSessionEntityStatusEnum];
|
|
209
|
+
/**
|
|
210
|
+
* @export
|
|
211
|
+
*/
|
|
212
|
+
export declare const CheckoutSessionEntityTransactionInitiatorEnum: {
|
|
213
|
+
readonly Mit: "MIT";
|
|
214
|
+
readonly Cit: "CIT";
|
|
215
|
+
readonly Sit: "SIT";
|
|
216
|
+
};
|
|
217
|
+
export type CheckoutSessionEntityTransactionInitiatorEnum = typeof CheckoutSessionEntityTransactionInitiatorEnum[keyof typeof CheckoutSessionEntityTransactionInitiatorEnum];
|
|
203
218
|
/**
|
|
204
219
|
* Check if a given object implements the CheckoutSessionEntity interface.
|
|
205
220
|
*/
|
|
@@ -26,6 +26,14 @@ export const CheckoutSessionEntityStatusEnum = {
|
|
|
26
26
|
Expired: 'EXPIRED',
|
|
27
27
|
Completed: 'COMPLETED'
|
|
28
28
|
};
|
|
29
|
+
/**
|
|
30
|
+
* @export
|
|
31
|
+
*/
|
|
32
|
+
export const CheckoutSessionEntityTransactionInitiatorEnum = {
|
|
33
|
+
Mit: 'MIT',
|
|
34
|
+
Cit: 'CIT',
|
|
35
|
+
Sit: 'SIT'
|
|
36
|
+
};
|
|
29
37
|
/**
|
|
30
38
|
* Check if a given object implements the CheckoutSessionEntity interface.
|
|
31
39
|
*/
|
|
@@ -83,6 +91,7 @@ export function CheckoutSessionEntityFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
83
91
|
'canStore': !exists(json, 'canStore') ? undefined : json['canStore'],
|
|
84
92
|
'buyerId': !exists(json, 'buyerId') ? undefined : json['buyerId'],
|
|
85
93
|
'externalBuyerId': !exists(json, 'externalBuyerId') ? undefined : json['externalBuyerId'],
|
|
94
|
+
'transactionInitiator': !exists(json, 'transactionInitiator') ? undefined : json['transactionInitiator'],
|
|
86
95
|
'redirectUrl': !exists(json, 'redirectUrl') ? undefined : json['redirectUrl'],
|
|
87
96
|
'externalTransactionId': !exists(json, 'externalTransactionId') ? undefined : json['externalTransactionId'],
|
|
88
97
|
'secCode': !exists(json, 'secCode') ? undefined : json['secCode'],
|
|
@@ -122,6 +131,7 @@ export function CheckoutSessionEntityToJSON(value) {
|
|
|
122
131
|
'canStore': value.canStore,
|
|
123
132
|
'buyerId': value.buyerId,
|
|
124
133
|
'externalBuyerId': value.externalBuyerId,
|
|
134
|
+
'transactionInitiator': value.transactionInitiator,
|
|
125
135
|
'redirectUrl': value.redirectUrl,
|
|
126
136
|
'externalTransactionId': value.externalTransactionId,
|
|
127
137
|
'secCode': value.secCode,
|
|
@@ -64,9 +64,8 @@ export interface ConnectorServiceTokenEntity {
|
|
|
64
64
|
*/
|
|
65
65
|
export declare const ConnectorServiceTokenEntityConnectorEnum: {
|
|
66
66
|
readonly Epay: "EPAY";
|
|
67
|
-
readonly Nmi: "NMI";
|
|
68
|
-
readonly AuthorizeNet: "AUTHORIZE_NET";
|
|
69
67
|
readonly ChannelPayments: "CHANNEL_PAYMENTS";
|
|
68
|
+
readonly Tsys: "TSYS";
|
|
70
69
|
};
|
|
71
70
|
export type ConnectorServiceTokenEntityConnectorEnum = typeof ConnectorServiceTokenEntityConnectorEnum[keyof typeof ConnectorServiceTokenEntityConnectorEnum];
|
|
72
71
|
/**
|
|
@@ -12,9 +12,8 @@ import { exists, removeNullUndefined } from '../runtime';
|
|
|
12
12
|
*/
|
|
13
13
|
export const ConnectorServiceTokenEntityConnectorEnum = {
|
|
14
14
|
Epay: 'EPAY',
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
ChannelPayments: 'CHANNEL_PAYMENTS'
|
|
15
|
+
ChannelPayments: 'CHANNEL_PAYMENTS',
|
|
16
|
+
Tsys: 'TSYS'
|
|
18
17
|
};
|
|
19
18
|
/**
|
|
20
19
|
* Check if a given object implements the ConnectorServiceTokenEntity interface.
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Channel Payments API
|
|
3
|
+
*
|
|
4
|
+
* NOTE: This class is auto generated. Do not edit the class manually.
|
|
5
|
+
*
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
*
|
|
9
|
+
* @export
|
|
10
|
+
* @interface CreatePaymentMethodSessionDto
|
|
11
|
+
*/
|
|
12
|
+
export interface CreatePaymentMethodSessionDto {
|
|
13
|
+
/**
|
|
14
|
+
* The fully qualified origin (scheme + host) of the embedding website, e.g., https://merchant.com
|
|
15
|
+
* @type {string}
|
|
16
|
+
* @memberof CreatePaymentMethodSessionDto
|
|
17
|
+
*/
|
|
18
|
+
origin: string;
|
|
19
|
+
/**
|
|
20
|
+
* Unique identifier for the buyer.
|
|
21
|
+
* @type {string}
|
|
22
|
+
* @memberof CreatePaymentMethodSessionDto
|
|
23
|
+
*/
|
|
24
|
+
buyerId?: string;
|
|
25
|
+
/**
|
|
26
|
+
* Unique identifier for the external buyer.
|
|
27
|
+
* @type {string}
|
|
28
|
+
* @memberof CreatePaymentMethodSessionDto
|
|
29
|
+
*/
|
|
30
|
+
externalBuyerId?: string;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Check if a given object implements the CreatePaymentMethodSessionDto interface.
|
|
34
|
+
*/
|
|
35
|
+
export declare function instanceOfCreatePaymentMethodSessionDto(value: object): boolean;
|
|
36
|
+
export declare function CreatePaymentMethodSessionDtoFromJSON(json: any): CreatePaymentMethodSessionDto;
|
|
37
|
+
export declare function CreatePaymentMethodSessionDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreatePaymentMethodSessionDto;
|
|
38
|
+
export declare function CreatePaymentMethodSessionDtoToJSON(value?: CreatePaymentMethodSessionDto | null): any;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Channel Payments API
|
|
5
|
+
*
|
|
6
|
+
* NOTE: This class is auto generated. Do not edit the class manually.
|
|
7
|
+
*
|
|
8
|
+
*/
|
|
9
|
+
import { exists, removeNullUndefined } from '../runtime';
|
|
10
|
+
/**
|
|
11
|
+
* Check if a given object implements the CreatePaymentMethodSessionDto interface.
|
|
12
|
+
*/
|
|
13
|
+
export function instanceOfCreatePaymentMethodSessionDto(value) {
|
|
14
|
+
let isInstance = true;
|
|
15
|
+
isInstance = isInstance && "origin" in value;
|
|
16
|
+
return isInstance;
|
|
17
|
+
}
|
|
18
|
+
export function CreatePaymentMethodSessionDtoFromJSON(json) {
|
|
19
|
+
return CreatePaymentMethodSessionDtoFromJSONTyped(json, false);
|
|
20
|
+
}
|
|
21
|
+
export function CreatePaymentMethodSessionDtoFromJSONTyped(json, ignoreDiscriminator) {
|
|
22
|
+
if ((json === undefined) || (json === null)) {
|
|
23
|
+
return json;
|
|
24
|
+
}
|
|
25
|
+
const typed = {
|
|
26
|
+
'origin': json['origin'],
|
|
27
|
+
'buyerId': !exists(json, 'buyerId') ? undefined : json['buyerId'],
|
|
28
|
+
'externalBuyerId': !exists(json, 'externalBuyerId') ? undefined : json['externalBuyerId'],
|
|
29
|
+
};
|
|
30
|
+
return removeNullUndefined(typed);
|
|
31
|
+
}
|
|
32
|
+
export function CreatePaymentMethodSessionDtoToJSON(value) {
|
|
33
|
+
if (value === undefined) {
|
|
34
|
+
return undefined;
|
|
35
|
+
}
|
|
36
|
+
if (value === null) {
|
|
37
|
+
return null;
|
|
38
|
+
}
|
|
39
|
+
return {
|
|
40
|
+
'origin': value.origin,
|
|
41
|
+
'buyerId': value.buyerId,
|
|
42
|
+
'externalBuyerId': value.externalBuyerId,
|
|
43
|
+
};
|
|
44
|
+
}
|
|
@@ -40,14 +40,19 @@ export interface CreateProvisionedCardTokenByMerchantDto {
|
|
|
40
40
|
* @memberof CreateProvisionedCardTokenByMerchantDto
|
|
41
41
|
*/
|
|
42
42
|
merchantId: string;
|
|
43
|
+
/**
|
|
44
|
+
* The token representing the provisioned card.
|
|
45
|
+
* @type {string}
|
|
46
|
+
* @memberof CreateProvisionedCardTokenByMerchantDto
|
|
47
|
+
*/
|
|
48
|
+
token?: string;
|
|
43
49
|
}
|
|
44
50
|
/**
|
|
45
51
|
* @export
|
|
46
52
|
*/
|
|
47
53
|
export declare const CreateProvisionedCardTokenByMerchantDtoConnectorEnum: {
|
|
48
54
|
readonly Epay: "EPAY";
|
|
49
|
-
readonly
|
|
50
|
-
readonly AuthorizeNet: "AUTHORIZE_NET";
|
|
55
|
+
readonly Tsys: "TSYS";
|
|
51
56
|
};
|
|
52
57
|
export type CreateProvisionedCardTokenByMerchantDtoConnectorEnum = typeof CreateProvisionedCardTokenByMerchantDtoConnectorEnum[keyof typeof CreateProvisionedCardTokenByMerchantDtoConnectorEnum];
|
|
53
58
|
/**
|
|
@@ -12,8 +12,7 @@ import { exists, removeNullUndefined } from '../runtime';
|
|
|
12
12
|
*/
|
|
13
13
|
export const CreateProvisionedCardTokenByMerchantDtoConnectorEnum = {
|
|
14
14
|
Epay: 'EPAY',
|
|
15
|
-
|
|
16
|
-
AuthorizeNet: 'AUTHORIZE_NET'
|
|
15
|
+
Tsys: 'TSYS'
|
|
17
16
|
};
|
|
18
17
|
/**
|
|
19
18
|
* Check if a given object implements the CreateProvisionedCardTokenByMerchantDto interface.
|
|
@@ -38,6 +37,7 @@ export function CreateProvisionedCardTokenByMerchantDtoFromJSONTyped(json, ignor
|
|
|
38
37
|
'connector': json['connector'],
|
|
39
38
|
'redirectUrl': !exists(json, 'redirectUrl') ? undefined : json['redirectUrl'],
|
|
40
39
|
'merchantId': json['merchantId'],
|
|
40
|
+
'token': !exists(json, 'token') ? undefined : json['token'],
|
|
41
41
|
};
|
|
42
42
|
return removeNullUndefined(typed);
|
|
43
43
|
}
|
|
@@ -54,5 +54,6 @@ export function CreateProvisionedCardTokenByMerchantDtoToJSON(value) {
|
|
|
54
54
|
'connector': value.connector,
|
|
55
55
|
'redirectUrl': value.redirectUrl,
|
|
56
56
|
'merchantId': value.merchantId,
|
|
57
|
+
'token': value.token,
|
|
57
58
|
};
|
|
58
59
|
}
|
|
@@ -40,8 +40,6 @@ export interface CreateProvisionedCardTokenDto {
|
|
|
40
40
|
*/
|
|
41
41
|
export declare const CreateProvisionedCardTokenDtoConnectorEnum: {
|
|
42
42
|
readonly Epay: "EPAY";
|
|
43
|
-
readonly Nmi: "NMI";
|
|
44
|
-
readonly AuthorizeNet: "AUTHORIZE_NET";
|
|
45
43
|
};
|
|
46
44
|
export type CreateProvisionedCardTokenDtoConnectorEnum = typeof CreateProvisionedCardTokenDtoConnectorEnum[keyof typeof CreateProvisionedCardTokenDtoConnectorEnum];
|
|
47
45
|
/**
|
|
@@ -11,9 +11,7 @@ import { exists, removeNullUndefined } from '../runtime';
|
|
|
11
11
|
* @export
|
|
12
12
|
*/
|
|
13
13
|
export const CreateProvisionedCardTokenDtoConnectorEnum = {
|
|
14
|
-
Epay: 'EPAY'
|
|
15
|
-
Nmi: 'NMI',
|
|
16
|
-
AuthorizeNet: 'AUTHORIZE_NET'
|
|
14
|
+
Epay: 'EPAY'
|
|
17
15
|
};
|
|
18
16
|
/**
|
|
19
17
|
* Check if a given object implements the CreateProvisionedCardTokenDto interface.
|
|
@@ -83,6 +83,12 @@ export interface CreateServicePaymentMethodDto {
|
|
|
83
83
|
* @memberof CreateServicePaymentMethodDto
|
|
84
84
|
*/
|
|
85
85
|
isCustomerStored?: boolean;
|
|
86
|
+
/**
|
|
87
|
+
* The ID of the merchant associated with this payment method.
|
|
88
|
+
* @type {string}
|
|
89
|
+
* @memberof CreateServicePaymentMethodDto
|
|
90
|
+
*/
|
|
91
|
+
merchantId?: string;
|
|
86
92
|
}
|
|
87
93
|
/**
|
|
88
94
|
* @export
|
|
@@ -50,6 +50,7 @@ export function CreateServicePaymentMethodDtoFromJSONTyped(json, ignoreDiscrimin
|
|
|
50
50
|
'externalPaymentMethodId': !exists(json, 'externalPaymentMethodId') ? undefined : json['externalPaymentMethodId'],
|
|
51
51
|
'billingDetails': !exists(json, 'billingDetails') ? undefined : BillingDetailsDtoFromJSON(json['billingDetails']),
|
|
52
52
|
'isCustomerStored': !exists(json, 'isCustomerStored') ? undefined : json['isCustomerStored'],
|
|
53
|
+
'merchantId': !exists(json, 'merchantId') ? undefined : json['merchantId'],
|
|
53
54
|
};
|
|
54
55
|
return removeNullUndefined(typed);
|
|
55
56
|
}
|
|
@@ -73,5 +74,6 @@ export function CreateServicePaymentMethodDtoToJSON(value) {
|
|
|
73
74
|
'externalPaymentMethodId': value.externalPaymentMethodId,
|
|
74
75
|
'billingDetails': BillingDetailsDtoToJSON(value.billingDetails),
|
|
75
76
|
'isCustomerStored': value.isCustomerStored,
|
|
77
|
+
'merchantId': value.merchantId,
|
|
76
78
|
};
|
|
77
79
|
}
|
|
@@ -166,8 +166,6 @@ export type PaymentMethodEntityMethodEnum = typeof PaymentMethodEntityMethodEnum
|
|
|
166
166
|
*/
|
|
167
167
|
export declare const PaymentMethodEntityCurrencyEnum: {
|
|
168
168
|
readonly Usd: "USD";
|
|
169
|
-
readonly Aud: "AUD";
|
|
170
|
-
readonly Cad: "CAD";
|
|
171
169
|
};
|
|
172
170
|
export type PaymentMethodEntityCurrencyEnum = typeof PaymentMethodEntityCurrencyEnum[keyof typeof PaymentMethodEntityCurrencyEnum];
|
|
173
171
|
/**
|
|
@@ -33,9 +33,7 @@ export const PaymentMethodEntityMethodEnum = {
|
|
|
33
33
|
* @export
|
|
34
34
|
*/
|
|
35
35
|
export const PaymentMethodEntityCurrencyEnum = {
|
|
36
|
-
Usd: 'USD'
|
|
37
|
-
Aud: 'AUD',
|
|
38
|
-
Cad: 'CAD'
|
|
36
|
+
Usd: 'USD'
|
|
39
37
|
};
|
|
40
38
|
/**
|
|
41
39
|
* Check if a given object implements the PaymentMethodEntity interface.
|
|
@@ -166,8 +166,6 @@ export type PaymentMethodServiceEntityMethodEnum = typeof PaymentMethodServiceEn
|
|
|
166
166
|
*/
|
|
167
167
|
export declare const PaymentMethodServiceEntityCurrencyEnum: {
|
|
168
168
|
readonly Usd: "USD";
|
|
169
|
-
readonly Aud: "AUD";
|
|
170
|
-
readonly Cad: "CAD";
|
|
171
169
|
};
|
|
172
170
|
export type PaymentMethodServiceEntityCurrencyEnum = typeof PaymentMethodServiceEntityCurrencyEnum[keyof typeof PaymentMethodServiceEntityCurrencyEnum];
|
|
173
171
|
/**
|
|
@@ -33,9 +33,7 @@ export const PaymentMethodServiceEntityMethodEnum = {
|
|
|
33
33
|
* @export
|
|
34
34
|
*/
|
|
35
35
|
export const PaymentMethodServiceEntityCurrencyEnum = {
|
|
36
|
-
Usd: 'USD'
|
|
37
|
-
Aud: 'AUD',
|
|
38
|
-
Cad: 'CAD'
|
|
36
|
+
Usd: 'USD'
|
|
39
37
|
};
|
|
40
38
|
/**
|
|
41
39
|
* Check if a given object implements the PaymentMethodServiceEntity interface.
|