@channelpayments/node-sdk 1.190.0 → 1.192.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.
Files changed (59) hide show
  1. package/dist/cjs/apis/ChannelPaymentsApi.d.ts +14 -6
  2. package/dist/cjs/apis/ChannelPaymentsApi.js +142 -8
  3. package/dist/cjs/models/AuthorizedPaymentInstrumentsEntity.d.ts +32 -0
  4. package/dist/cjs/models/AuthorizedPaymentInstrumentsEntity.js +49 -0
  5. package/dist/cjs/models/ConnectorServiceTokenEntity.d.ts +1 -2
  6. package/dist/cjs/models/ConnectorServiceTokenEntity.js +2 -3
  7. package/dist/cjs/models/CreatePaymentMethodSessionDto.d.ts +38 -0
  8. package/dist/cjs/models/CreatePaymentMethodSessionDto.js +50 -0
  9. package/dist/cjs/models/CreateProvisionedCardTokenByMerchantDto.d.ts +7 -2
  10. package/dist/cjs/models/CreateProvisionedCardTokenByMerchantDto.js +3 -2
  11. package/dist/cjs/models/CreateProvisionedCardTokenDto.d.ts +0 -2
  12. package/dist/cjs/models/CreateProvisionedCardTokenDto.js +1 -3
  13. package/dist/cjs/models/CreateServicePaymentMethodDto.d.ts +6 -0
  14. package/dist/cjs/models/CreateServicePaymentMethodDto.js +2 -0
  15. package/dist/cjs/models/PaymentMethodEntity.d.ts +0 -2
  16. package/dist/cjs/models/PaymentMethodEntity.js +1 -3
  17. package/dist/cjs/models/PaymentMethodServiceEntity.d.ts +0 -2
  18. package/dist/cjs/models/PaymentMethodServiceEntity.js +1 -3
  19. package/dist/cjs/models/PaymentMethodSessionAttemptEntity.d.ts +60 -0
  20. package/dist/cjs/models/PaymentMethodSessionAttemptEntity.js +69 -0
  21. package/dist/cjs/models/PaymentMethodSessionBaseEntity.d.ts +148 -0
  22. package/dist/cjs/models/PaymentMethodSessionBaseEntity.js +107 -0
  23. package/dist/cjs/models/PaymentMethodSessionEntity.d.ts +154 -0
  24. package/dist/cjs/models/PaymentMethodSessionEntity.js +110 -0
  25. package/dist/cjs/models/SessionPaymentMethodEntity.d.ts +177 -0
  26. package/dist/cjs/models/SessionPaymentMethodEntity.js +119 -0
  27. package/dist/cjs/models/index.d.ts +6 -0
  28. package/dist/cjs/models/index.js +6 -0
  29. package/dist/cjs/runtime.js +1 -1
  30. package/dist/mjs/apis/ChannelPaymentsApi.d.ts +14 -6
  31. package/dist/mjs/apis/ChannelPaymentsApi.js +139 -9
  32. package/dist/mjs/models/AuthorizedPaymentInstrumentsEntity.d.ts +32 -0
  33. package/dist/mjs/models/AuthorizedPaymentInstrumentsEntity.js +43 -0
  34. package/dist/mjs/models/ConnectorServiceTokenEntity.d.ts +1 -2
  35. package/dist/mjs/models/ConnectorServiceTokenEntity.js +2 -3
  36. package/dist/mjs/models/CreatePaymentMethodSessionDto.d.ts +38 -0
  37. package/dist/mjs/models/CreatePaymentMethodSessionDto.js +44 -0
  38. package/dist/mjs/models/CreateProvisionedCardTokenByMerchantDto.d.ts +7 -2
  39. package/dist/mjs/models/CreateProvisionedCardTokenByMerchantDto.js +3 -2
  40. package/dist/mjs/models/CreateProvisionedCardTokenDto.d.ts +0 -2
  41. package/dist/mjs/models/CreateProvisionedCardTokenDto.js +1 -3
  42. package/dist/mjs/models/CreateServicePaymentMethodDto.d.ts +6 -0
  43. package/dist/mjs/models/CreateServicePaymentMethodDto.js +2 -0
  44. package/dist/mjs/models/PaymentMethodEntity.d.ts +0 -2
  45. package/dist/mjs/models/PaymentMethodEntity.js +1 -3
  46. package/dist/mjs/models/PaymentMethodServiceEntity.d.ts +0 -2
  47. package/dist/mjs/models/PaymentMethodServiceEntity.js +1 -3
  48. package/dist/mjs/models/PaymentMethodSessionAttemptEntity.d.ts +60 -0
  49. package/dist/mjs/models/PaymentMethodSessionAttemptEntity.js +62 -0
  50. package/dist/mjs/models/PaymentMethodSessionBaseEntity.d.ts +148 -0
  51. package/dist/mjs/models/PaymentMethodSessionBaseEntity.js +100 -0
  52. package/dist/mjs/models/PaymentMethodSessionEntity.d.ts +154 -0
  53. package/dist/mjs/models/PaymentMethodSessionEntity.js +103 -0
  54. package/dist/mjs/models/SessionPaymentMethodEntity.d.ts +177 -0
  55. package/dist/mjs/models/SessionPaymentMethodEntity.js +112 -0
  56. package/dist/mjs/models/index.d.ts +6 -0
  57. package/dist/mjs/models/index.js +6 -0
  58. package/dist/mjs/runtime.js +1 -1
  59. package/package.json +1 -1
@@ -5,12 +5,12 @@
5
5
  *
6
6
  */
7
7
  import * as runtime from '../runtime';
8
- import type { BuyersEntity, BuyersSearchEntity, CaptureTransactionDto, ChangeNotificationEntity, ChangeNotificationsSearchEntity, CheckoutSessionEntity, ConnectorServiceTokenEntity, CreateBuyerDto, CreateCheckoutSessionDto, CreatePaymentMethodDto, CreateProvisionedCardTokenDto, CreateTransactionRefundDto, CreateTransactionRequestDto, MerchantEntity, MerchantFeeDetailsEntity, PaymentMethodEntity, PaymentMethodsSearchEntity, ReturnNotificationEntity, ReturnNotificationsSearchEntity, TagDto, TransactionEntity, TransactionRefundEntity, TransactionRefundsSearchEntity, TransactionsSearchEntity, UpdateBuyerDto } from '../models';
8
+ import type { BuyersEntity, BuyersSearchEntity, CaptureTransactionDto, ChangeNotificationEntity, ChangeNotificationsSearchEntity, CheckoutSessionEntity, ConnectorServiceTokenEntity, CreateBuyerDto, CreateCheckoutSessionDto, CreatePaymentMethodDto, CreatePaymentMethodSessionDto, CreateProvisionedCardTokenDto, CreateTransactionRefundDto, CreateTransactionRequestDto, MerchantEntity, MerchantFeeDetailsEntity, PaymentMethodEntity, PaymentMethodSessionEntity, PaymentMethodsSearchEntity, ReturnNotificationEntity, ReturnNotificationsSearchEntity, TagDto, TransactionEntity, TransactionRefundEntity, TransactionRefundsSearchEntity, TransactionsSearchEntity, UpdateBuyerDto } from '../models';
9
9
  export interface GetFeeDetailsRequest {
10
10
  amount: string;
11
11
  }
12
12
  export interface SearchBuyersRequest {
13
- merchantId: string;
13
+ merchantId?: string;
14
14
  buyerId?: string;
15
15
  externalBuyerId?: string;
16
16
  startDate?: string;
@@ -126,14 +126,19 @@ export declare class ChannelPaymentsApi extends runtime.BaseAPI {
126
126
  * Create checkout session
127
127
  */
128
128
  createCheckoutSession(createCheckoutSessionDto: CreateCheckoutSessionDto): Promise<CheckoutSessionEntity>;
129
+ /**
130
+ * Create a new payment method session.
131
+ * Create payment method session.
132
+ */
133
+ createPaymentMethodSession(createPaymentMethodSessionDto: CreatePaymentMethodSessionDto): Promise<PaymentMethodSessionEntity>;
129
134
  /**
130
135
  * Attempts to create a new transaction by specified intent for a given payment method
131
136
  * Create transaction
132
137
  */
133
138
  createTransaction(createTransactionRequestDto: CreateTransactionRequestDto, idempotencyKey?: string): Promise<TransactionEntity>;
134
139
  /**
135
- * Removes a buyer ID.
136
- * Remove buyer.
140
+ * Deletes a buyer by buyer ID.
141
+ * Delete buyer.
137
142
  */
138
143
  deleteBuyer(buyerId: string): Promise<BuyersEntity>;
139
144
  /**
@@ -186,6 +191,11 @@ export declare class ChannelPaymentsApi extends runtime.BaseAPI {
186
191
  * Find by payment method.
187
192
  */
188
193
  getPaymentMethod(paymentMethodId: string): Promise<PaymentMethodEntity>;
194
+ /**
195
+ * Find a payment method session by session ID.
196
+ * Find payment method session.
197
+ */
198
+ getPaymentMethodSession(sessionId: string): Promise<PaymentMethodSessionEntity>;
189
199
  /**
190
200
  * Attempts to find refund by transaction ID and refund ID
191
201
  * Find refund
@@ -281,8 +291,6 @@ export type SearchPaymentMethodsMethodEnum = typeof SearchPaymentMethodsMethodEn
281
291
  */
282
292
  export declare const SearchPaymentMethodsCurrencyEnum: {
283
293
  readonly Usd: "USD";
284
- readonly Aud: "AUD";
285
- readonly Cad: "CAD";
286
294
  };
287
295
  export type SearchPaymentMethodsCurrencyEnum = typeof SearchPaymentMethodsCurrencyEnum[keyof typeof SearchPaymentMethodsCurrencyEnum];
288
296
  /**
@@ -428,6 +428,78 @@ class ChannelPaymentsApi extends runtime.BaseAPI {
428
428
  return yield response.value();
429
429
  });
430
430
  }
431
+ /**
432
+ * Create a new payment method session.
433
+ * Create payment method session.
434
+ */
435
+ createPaymentMethodSession(createPaymentMethodSessionDto) {
436
+ return __awaiter(this, void 0, void 0, function* () {
437
+ if (createPaymentMethodSessionDto === null || createPaymentMethodSessionDto === undefined) {
438
+ throw new runtime.RequiredError('createPaymentMethodSessionDto', 'Required parameter \'createPaymentMethodSessionDto\' was null or undefined when calling createPaymentMethodSession.');
439
+ }
440
+ if (createPaymentMethodSessionDto.origin === null || createPaymentMethodSessionDto.origin === undefined) {
441
+ throw new runtime.RequiredError('createPaymentMethodSessionDto.origin', 'Required parameter \'createPaymentMethodSessionDto.origin\' was null or undefined when calling createPaymentMethodSession.');
442
+ }
443
+ const queryParameters = {};
444
+ const headerParameters = {};
445
+ headerParameters['Content-Type'] = 'application/json';
446
+ const rawResponse = yield this.request({
447
+ path: `/payment-method-sessions`,
448
+ method: 'POST',
449
+ headers: headerParameters,
450
+ query: queryParameters,
451
+ body: (0, models_1.CreatePaymentMethodSessionDtoToJSON)(createPaymentMethodSessionDto),
452
+ });
453
+ let response;
454
+ if (rawResponse.status === 201) {
455
+ response = new runtime.JSONApiResponse(rawResponse, (jsonValue) => (0, models_1.PaymentMethodSessionEntityFromJSON)(jsonValue));
456
+ }
457
+ if (rawResponse.status === 400) {
458
+ const errorResponse = new runtime.JSONApiResponse(rawResponse, (jsonValue) => (0, models_1.ErrorEntityFromJSON)(jsonValue));
459
+ const error = yield errorResponse.value();
460
+ throw error;
461
+ }
462
+ if (rawResponse.status === 401) {
463
+ const errorResponse = new runtime.JSONApiResponse(rawResponse, (jsonValue) => (0, models_1.ErrorEntityFromJSON)(jsonValue));
464
+ const error = yield errorResponse.value();
465
+ throw error;
466
+ }
467
+ if (rawResponse.status === 403) {
468
+ const errorResponse = new runtime.JSONApiResponse(rawResponse, (jsonValue) => (0, models_1.ErrorEntityFromJSON)(jsonValue));
469
+ const error = yield errorResponse.value();
470
+ throw error;
471
+ }
472
+ if (rawResponse.status === 404) {
473
+ const errorResponse = new runtime.JSONApiResponse(rawResponse, (jsonValue) => (0, models_1.ErrorEntityFromJSON)(jsonValue));
474
+ const error = yield errorResponse.value();
475
+ throw error;
476
+ }
477
+ if (rawResponse.status === 500) {
478
+ const errorResponse = new runtime.JSONApiResponse(rawResponse, (jsonValue) => (0, models_1.ErrorEntityFromJSON)(jsonValue));
479
+ const error = yield errorResponse.value();
480
+ throw error;
481
+ }
482
+ if (rawResponse.status === 502) {
483
+ const errorResponse = new runtime.JSONApiResponse(rawResponse, (jsonValue) => (0, models_1.ErrorEntityFromJSON)(jsonValue));
484
+ const error = yield errorResponse.value();
485
+ throw error;
486
+ }
487
+ if (rawResponse.status === 503) {
488
+ const errorResponse = new runtime.JSONApiResponse(rawResponse, (jsonValue) => (0, models_1.ErrorEntityFromJSON)(jsonValue));
489
+ const error = yield errorResponse.value();
490
+ throw error;
491
+ }
492
+ if (rawResponse.status === 504) {
493
+ const errorResponse = new runtime.JSONApiResponse(rawResponse, (jsonValue) => (0, models_1.ErrorEntityFromJSON)(jsonValue));
494
+ const error = yield errorResponse.value();
495
+ throw error;
496
+ }
497
+ if (!response) {
498
+ response = new runtime.TextApiResponse(rawResponse);
499
+ }
500
+ return yield response.value();
501
+ });
502
+ }
431
503
  /**
432
504
  * Attempts to create a new transaction by specified intent for a given payment method
433
505
  * Create transaction
@@ -513,8 +585,8 @@ class ChannelPaymentsApi extends runtime.BaseAPI {
513
585
  });
514
586
  }
515
587
  /**
516
- * Removes a buyer ID.
517
- * Remove buyer.
588
+ * Deletes a buyer by buyer ID.
589
+ * Delete buyer.
518
590
  */
519
591
  deleteBuyer(buyerId) {
520
592
  return __awaiter(this, void 0, void 0, function* () {
@@ -1246,6 +1318,73 @@ class ChannelPaymentsApi extends runtime.BaseAPI {
1246
1318
  return yield response.value();
1247
1319
  });
1248
1320
  }
1321
+ /**
1322
+ * Find a payment method session by session ID.
1323
+ * Find payment method session.
1324
+ */
1325
+ getPaymentMethodSession(sessionId) {
1326
+ return __awaiter(this, void 0, void 0, function* () {
1327
+ if (sessionId === null || sessionId === undefined) {
1328
+ throw new runtime.RequiredError('sessionId', 'Required parameter \'sessionId\' was null or undefined when calling getPaymentMethodSession.');
1329
+ }
1330
+ const queryParameters = {};
1331
+ const headerParameters = {};
1332
+ const rawResponse = yield this.request({
1333
+ path: `/payment-method-sessions/{sessionId}`.replace(`{${"sessionId"}}`, encodeURIComponent(sessionId)),
1334
+ method: 'GET',
1335
+ headers: headerParameters,
1336
+ query: queryParameters,
1337
+ });
1338
+ let response;
1339
+ if (rawResponse.status === 200) {
1340
+ response = new runtime.JSONApiResponse(rawResponse, (jsonValue) => (0, models_1.PaymentMethodSessionEntityFromJSON)(jsonValue));
1341
+ }
1342
+ if (rawResponse.status === 400) {
1343
+ const errorResponse = new runtime.JSONApiResponse(rawResponse, (jsonValue) => (0, models_1.ErrorEntityFromJSON)(jsonValue));
1344
+ const error = yield errorResponse.value();
1345
+ throw error;
1346
+ }
1347
+ if (rawResponse.status === 401) {
1348
+ const errorResponse = new runtime.JSONApiResponse(rawResponse, (jsonValue) => (0, models_1.ErrorEntityFromJSON)(jsonValue));
1349
+ const error = yield errorResponse.value();
1350
+ throw error;
1351
+ }
1352
+ if (rawResponse.status === 403) {
1353
+ const errorResponse = new runtime.JSONApiResponse(rawResponse, (jsonValue) => (0, models_1.ErrorEntityFromJSON)(jsonValue));
1354
+ const error = yield errorResponse.value();
1355
+ throw error;
1356
+ }
1357
+ if (rawResponse.status === 404) {
1358
+ const errorResponse = new runtime.JSONApiResponse(rawResponse, (jsonValue) => (0, models_1.ErrorEntityFromJSON)(jsonValue));
1359
+ const error = yield errorResponse.value();
1360
+ throw error;
1361
+ }
1362
+ if (rawResponse.status === 500) {
1363
+ const errorResponse = new runtime.JSONApiResponse(rawResponse, (jsonValue) => (0, models_1.ErrorEntityFromJSON)(jsonValue));
1364
+ const error = yield errorResponse.value();
1365
+ throw error;
1366
+ }
1367
+ if (rawResponse.status === 502) {
1368
+ const errorResponse = new runtime.JSONApiResponse(rawResponse, (jsonValue) => (0, models_1.ErrorEntityFromJSON)(jsonValue));
1369
+ const error = yield errorResponse.value();
1370
+ throw error;
1371
+ }
1372
+ if (rawResponse.status === 503) {
1373
+ const errorResponse = new runtime.JSONApiResponse(rawResponse, (jsonValue) => (0, models_1.ErrorEntityFromJSON)(jsonValue));
1374
+ const error = yield errorResponse.value();
1375
+ throw error;
1376
+ }
1377
+ if (rawResponse.status === 504) {
1378
+ const errorResponse = new runtime.JSONApiResponse(rawResponse, (jsonValue) => (0, models_1.ErrorEntityFromJSON)(jsonValue));
1379
+ const error = yield errorResponse.value();
1380
+ throw error;
1381
+ }
1382
+ if (!response) {
1383
+ response = new runtime.TextApiResponse(rawResponse);
1384
+ }
1385
+ return yield response.value();
1386
+ });
1387
+ }
1249
1388
  /**
1250
1389
  * Attempts to find refund by transaction ID and refund ID
1251
1390
  * Find refund
@@ -1539,9 +1678,6 @@ class ChannelPaymentsApi extends runtime.BaseAPI {
1539
1678
  */
1540
1679
  searchBuyers(requestParameters) {
1541
1680
  return __awaiter(this, void 0, void 0, function* () {
1542
- if (requestParameters.merchantId === null || requestParameters.merchantId === undefined) {
1543
- throw new runtime.RequiredError('merchantId', 'Required parameter \'merchantId\' was null or undefined when calling searchBuyers.');
1544
- }
1545
1681
  const queryParameters = {};
1546
1682
  if (requestParameters.merchantId !== undefined) {
1547
1683
  queryParameters['merchantId'] = requestParameters.merchantId;
@@ -2395,9 +2531,7 @@ exports.SearchPaymentMethodsMethodEnum = {
2395
2531
  * @export
2396
2532
  */
2397
2533
  exports.SearchPaymentMethodsCurrencyEnum = {
2398
- Usd: 'USD',
2399
- Aud: 'AUD',
2400
- Cad: 'CAD'
2534
+ Usd: 'USD'
2401
2535
  };
2402
2536
  /**
2403
2537
  * @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,49 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * Channel Payments API
6
+ *
7
+ * NOTE: This class is auto generated. Do not edit the class manually.
8
+ *
9
+ */
10
+ Object.defineProperty(exports, "__esModule", { value: true });
11
+ exports.instanceOfAuthorizedPaymentInstrumentsEntity = instanceOfAuthorizedPaymentInstrumentsEntity;
12
+ exports.AuthorizedPaymentInstrumentsEntityFromJSON = AuthorizedPaymentInstrumentsEntityFromJSON;
13
+ exports.AuthorizedPaymentInstrumentsEntityFromJSONTyped = AuthorizedPaymentInstrumentsEntityFromJSONTyped;
14
+ exports.AuthorizedPaymentInstrumentsEntityToJSON = AuthorizedPaymentInstrumentsEntityToJSON;
15
+ const runtime_1 = require("../runtime");
16
+ /**
17
+ * Check if a given object implements the AuthorizedPaymentInstrumentsEntity interface.
18
+ */
19
+ function instanceOfAuthorizedPaymentInstrumentsEntity(value) {
20
+ let isInstance = true;
21
+ isInstance = isInstance && "card" in value;
22
+ isInstance = isInstance && "ach" in value;
23
+ return isInstance;
24
+ }
25
+ function AuthorizedPaymentInstrumentsEntityFromJSON(json) {
26
+ return AuthorizedPaymentInstrumentsEntityFromJSONTyped(json, false);
27
+ }
28
+ function AuthorizedPaymentInstrumentsEntityFromJSONTyped(json, ignoreDiscriminator) {
29
+ if ((json === undefined) || (json === null)) {
30
+ return json;
31
+ }
32
+ const typed = {
33
+ 'card': json['card'],
34
+ 'ach': json['ach'],
35
+ };
36
+ return (0, runtime_1.removeNullUndefined)(typed);
37
+ }
38
+ function AuthorizedPaymentInstrumentsEntityToJSON(value) {
39
+ if (value === undefined) {
40
+ return undefined;
41
+ }
42
+ if (value === null) {
43
+ return null;
44
+ }
45
+ return {
46
+ 'card': value.card,
47
+ 'ach': value.ach,
48
+ };
49
+ }
@@ -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
  /**
@@ -19,9 +19,8 @@ const runtime_1 = require("../runtime");
19
19
  */
20
20
  exports.ConnectorServiceTokenEntityConnectorEnum = {
21
21
  Epay: 'EPAY',
22
- Nmi: 'NMI',
23
- AuthorizeNet: 'AUTHORIZE_NET',
24
- ChannelPayments: 'CHANNEL_PAYMENTS'
22
+ ChannelPayments: 'CHANNEL_PAYMENTS',
23
+ Tsys: 'TSYS'
25
24
  };
26
25
  /**
27
26
  * 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,50 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * Channel Payments API
6
+ *
7
+ * NOTE: This class is auto generated. Do not edit the class manually.
8
+ *
9
+ */
10
+ Object.defineProperty(exports, "__esModule", { value: true });
11
+ exports.instanceOfCreatePaymentMethodSessionDto = instanceOfCreatePaymentMethodSessionDto;
12
+ exports.CreatePaymentMethodSessionDtoFromJSON = CreatePaymentMethodSessionDtoFromJSON;
13
+ exports.CreatePaymentMethodSessionDtoFromJSONTyped = CreatePaymentMethodSessionDtoFromJSONTyped;
14
+ exports.CreatePaymentMethodSessionDtoToJSON = CreatePaymentMethodSessionDtoToJSON;
15
+ const runtime_1 = require("../runtime");
16
+ /**
17
+ * Check if a given object implements the CreatePaymentMethodSessionDto interface.
18
+ */
19
+ function instanceOfCreatePaymentMethodSessionDto(value) {
20
+ let isInstance = true;
21
+ isInstance = isInstance && "origin" in value;
22
+ return isInstance;
23
+ }
24
+ function CreatePaymentMethodSessionDtoFromJSON(json) {
25
+ return CreatePaymentMethodSessionDtoFromJSONTyped(json, false);
26
+ }
27
+ function CreatePaymentMethodSessionDtoFromJSONTyped(json, ignoreDiscriminator) {
28
+ if ((json === undefined) || (json === null)) {
29
+ return json;
30
+ }
31
+ const typed = {
32
+ 'origin': json['origin'],
33
+ 'buyerId': !(0, runtime_1.exists)(json, 'buyerId') ? undefined : json['buyerId'],
34
+ 'externalBuyerId': !(0, runtime_1.exists)(json, 'externalBuyerId') ? undefined : json['externalBuyerId'],
35
+ };
36
+ return (0, runtime_1.removeNullUndefined)(typed);
37
+ }
38
+ function CreatePaymentMethodSessionDtoToJSON(value) {
39
+ if (value === undefined) {
40
+ return undefined;
41
+ }
42
+ if (value === null) {
43
+ return null;
44
+ }
45
+ return {
46
+ 'origin': value.origin,
47
+ 'buyerId': value.buyerId,
48
+ 'externalBuyerId': value.externalBuyerId,
49
+ };
50
+ }
@@ -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 Nmi: "NMI";
50
- readonly AuthorizeNet: "AUTHORIZE_NET";
55
+ readonly Tsys: "TSYS";
51
56
  };
52
57
  export type CreateProvisionedCardTokenByMerchantDtoConnectorEnum = typeof CreateProvisionedCardTokenByMerchantDtoConnectorEnum[keyof typeof CreateProvisionedCardTokenByMerchantDtoConnectorEnum];
53
58
  /**
@@ -19,8 +19,7 @@ const runtime_1 = require("../runtime");
19
19
  */
20
20
  exports.CreateProvisionedCardTokenByMerchantDtoConnectorEnum = {
21
21
  Epay: 'EPAY',
22
- Nmi: 'NMI',
23
- AuthorizeNet: 'AUTHORIZE_NET'
22
+ Tsys: 'TSYS'
24
23
  };
25
24
  /**
26
25
  * Check if a given object implements the CreateProvisionedCardTokenByMerchantDto interface.
@@ -45,6 +44,7 @@ function CreateProvisionedCardTokenByMerchantDtoFromJSONTyped(json, ignoreDiscri
45
44
  'connector': json['connector'],
46
45
  'redirectUrl': !(0, runtime_1.exists)(json, 'redirectUrl') ? undefined : json['redirectUrl'],
47
46
  'merchantId': json['merchantId'],
47
+ 'token': !(0, runtime_1.exists)(json, 'token') ? undefined : json['token'],
48
48
  };
49
49
  return (0, runtime_1.removeNullUndefined)(typed);
50
50
  }
@@ -61,5 +61,6 @@ function CreateProvisionedCardTokenByMerchantDtoToJSON(value) {
61
61
  'connector': value.connector,
62
62
  'redirectUrl': value.redirectUrl,
63
63
  'merchantId': value.merchantId,
64
+ 'token': value.token,
64
65
  };
65
66
  }
@@ -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
  /**
@@ -18,9 +18,7 @@ const runtime_1 = require("../runtime");
18
18
  * @export
19
19
  */
20
20
  exports.CreateProvisionedCardTokenDtoConnectorEnum = {
21
- Epay: 'EPAY',
22
- Nmi: 'NMI',
23
- AuthorizeNet: 'AUTHORIZE_NET'
21
+ Epay: 'EPAY'
24
22
  };
25
23
  /**
26
24
  * 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
@@ -57,6 +57,7 @@ function CreateServicePaymentMethodDtoFromJSONTyped(json, ignoreDiscriminator) {
57
57
  'externalPaymentMethodId': !(0, runtime_1.exists)(json, 'externalPaymentMethodId') ? undefined : json['externalPaymentMethodId'],
58
58
  'billingDetails': !(0, runtime_1.exists)(json, 'billingDetails') ? undefined : (0, BillingDetailsDto_1.BillingDetailsDtoFromJSON)(json['billingDetails']),
59
59
  'isCustomerStored': !(0, runtime_1.exists)(json, 'isCustomerStored') ? undefined : json['isCustomerStored'],
60
+ 'merchantId': !(0, runtime_1.exists)(json, 'merchantId') ? undefined : json['merchantId'],
60
61
  };
61
62
  return (0, runtime_1.removeNullUndefined)(typed);
62
63
  }
@@ -80,5 +81,6 @@ function CreateServicePaymentMethodDtoToJSON(value) {
80
81
  'externalPaymentMethodId': value.externalPaymentMethodId,
81
82
  'billingDetails': (0, BillingDetailsDto_1.BillingDetailsDtoToJSON)(value.billingDetails),
82
83
  'isCustomerStored': value.isCustomerStored,
84
+ 'merchantId': value.merchantId,
83
85
  };
84
86
  }
@@ -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
  /**
@@ -40,9 +40,7 @@ exports.PaymentMethodEntityMethodEnum = {
40
40
  * @export
41
41
  */
42
42
  exports.PaymentMethodEntityCurrencyEnum = {
43
- Usd: 'USD',
44
- Aud: 'AUD',
45
- Cad: 'CAD'
43
+ Usd: 'USD'
46
44
  };
47
45
  /**
48
46
  * 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
  /**
@@ -40,9 +40,7 @@ exports.PaymentMethodServiceEntityMethodEnum = {
40
40
  * @export
41
41
  */
42
42
  exports.PaymentMethodServiceEntityCurrencyEnum = {
43
- Usd: 'USD',
44
- Aud: 'AUD',
45
- Cad: 'CAD'
43
+ Usd: 'USD'
46
44
  };
47
45
  /**
48
46
  * Check if a given object implements the PaymentMethodServiceEntity interface.
@@ -0,0 +1,60 @@
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 PaymentMethodSessionAttemptEntity
11
+ */
12
+ export interface PaymentMethodSessionAttemptEntity {
13
+ /**
14
+ * The payment instrument used for the session attempt
15
+ * @type {string}
16
+ * @memberof PaymentMethodSessionAttemptEntity
17
+ */
18
+ method: PaymentMethodSessionAttemptEntityMethodEnum;
19
+ /**
20
+ * The status of the session attempt
21
+ * @type {string}
22
+ * @memberof PaymentMethodSessionAttemptEntity
23
+ */
24
+ status: PaymentMethodSessionAttemptEntityStatusEnum;
25
+ /**
26
+ * The date and time when the session attempt was made
27
+ * @type {Date}
28
+ * @memberof PaymentMethodSessionAttemptEntity
29
+ */
30
+ attemptedAt: Date;
31
+ /**
32
+ * The reason for the session attempt, if applicable
33
+ * @type {string}
34
+ * @memberof PaymentMethodSessionAttemptEntity
35
+ */
36
+ reason?: string;
37
+ }
38
+ /**
39
+ * @export
40
+ */
41
+ export declare const PaymentMethodSessionAttemptEntityMethodEnum: {
42
+ readonly Card: "CARD";
43
+ readonly Bank: "BANK";
44
+ };
45
+ export type PaymentMethodSessionAttemptEntityMethodEnum = typeof PaymentMethodSessionAttemptEntityMethodEnum[keyof typeof PaymentMethodSessionAttemptEntityMethodEnum];
46
+ /**
47
+ * @export
48
+ */
49
+ export declare const PaymentMethodSessionAttemptEntityStatusEnum: {
50
+ readonly Success: "SUCCESS";
51
+ readonly Failed: "FAILED";
52
+ };
53
+ export type PaymentMethodSessionAttemptEntityStatusEnum = typeof PaymentMethodSessionAttemptEntityStatusEnum[keyof typeof PaymentMethodSessionAttemptEntityStatusEnum];
54
+ /**
55
+ * Check if a given object implements the PaymentMethodSessionAttemptEntity interface.
56
+ */
57
+ export declare function instanceOfPaymentMethodSessionAttemptEntity(value: object): boolean;
58
+ export declare function PaymentMethodSessionAttemptEntityFromJSON(json: any): PaymentMethodSessionAttemptEntity;
59
+ export declare function PaymentMethodSessionAttemptEntityFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaymentMethodSessionAttemptEntity;
60
+ export declare function PaymentMethodSessionAttemptEntityToJSON(value?: PaymentMethodSessionAttemptEntity | null): any;