@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.
- 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/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/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
|
@@ -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
|
+
}
|
|
@@ -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.
|
|
@@ -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;
|
|
@@ -0,0 +1,62 @@
|
|
|
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
|
+
* @export
|
|
12
|
+
*/
|
|
13
|
+
export const PaymentMethodSessionAttemptEntityMethodEnum = {
|
|
14
|
+
Card: 'CARD',
|
|
15
|
+
Bank: 'BANK'
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* @export
|
|
19
|
+
*/
|
|
20
|
+
export const PaymentMethodSessionAttemptEntityStatusEnum = {
|
|
21
|
+
Success: 'SUCCESS',
|
|
22
|
+
Failed: 'FAILED'
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* Check if a given object implements the PaymentMethodSessionAttemptEntity interface.
|
|
26
|
+
*/
|
|
27
|
+
export function instanceOfPaymentMethodSessionAttemptEntity(value) {
|
|
28
|
+
let isInstance = true;
|
|
29
|
+
isInstance = isInstance && "method" in value;
|
|
30
|
+
isInstance = isInstance && "status" in value;
|
|
31
|
+
isInstance = isInstance && "attemptedAt" in value;
|
|
32
|
+
return isInstance;
|
|
33
|
+
}
|
|
34
|
+
export function PaymentMethodSessionAttemptEntityFromJSON(json) {
|
|
35
|
+
return PaymentMethodSessionAttemptEntityFromJSONTyped(json, false);
|
|
36
|
+
}
|
|
37
|
+
export function PaymentMethodSessionAttemptEntityFromJSONTyped(json, ignoreDiscriminator) {
|
|
38
|
+
if ((json === undefined) || (json === null)) {
|
|
39
|
+
return json;
|
|
40
|
+
}
|
|
41
|
+
const typed = {
|
|
42
|
+
'method': json['method'],
|
|
43
|
+
'status': json['status'],
|
|
44
|
+
'attemptedAt': (new Date(json['attemptedAt'])),
|
|
45
|
+
'reason': !exists(json, 'reason') ? undefined : json['reason'],
|
|
46
|
+
};
|
|
47
|
+
return removeNullUndefined(typed);
|
|
48
|
+
}
|
|
49
|
+
export function PaymentMethodSessionAttemptEntityToJSON(value) {
|
|
50
|
+
if (value === undefined) {
|
|
51
|
+
return undefined;
|
|
52
|
+
}
|
|
53
|
+
if (value === null) {
|
|
54
|
+
return null;
|
|
55
|
+
}
|
|
56
|
+
return {
|
|
57
|
+
'method': value.method,
|
|
58
|
+
'status': value.status,
|
|
59
|
+
'attemptedAt': (value.attemptedAt.toISOString()),
|
|
60
|
+
'reason': value.reason,
|
|
61
|
+
};
|
|
62
|
+
}
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Channel Payments API
|
|
3
|
+
*
|
|
4
|
+
* NOTE: This class is auto generated. Do not edit the class manually.
|
|
5
|
+
*
|
|
6
|
+
*/
|
|
7
|
+
import type { AuthorizedPaymentInstrumentsEntity } from './AuthorizedPaymentInstrumentsEntity';
|
|
8
|
+
import type { PaymentMethodSessionAttemptEntity } from './PaymentMethodSessionAttemptEntity';
|
|
9
|
+
/**
|
|
10
|
+
*
|
|
11
|
+
* @export
|
|
12
|
+
* @interface PaymentMethodSessionBaseEntity
|
|
13
|
+
*/
|
|
14
|
+
export interface PaymentMethodSessionBaseEntity {
|
|
15
|
+
/**
|
|
16
|
+
* Unique identifier for the session
|
|
17
|
+
* @type {string}
|
|
18
|
+
* @memberof PaymentMethodSessionBaseEntity
|
|
19
|
+
*/
|
|
20
|
+
sessionId: string;
|
|
21
|
+
/**
|
|
22
|
+
* Unique Identifier for the merchant associated with the session
|
|
23
|
+
* @type {string}
|
|
24
|
+
* @memberof PaymentMethodSessionBaseEntity
|
|
25
|
+
*/
|
|
26
|
+
merchantId: string;
|
|
27
|
+
/**
|
|
28
|
+
* List of attempts made during the session
|
|
29
|
+
* @type {Array<PaymentMethodSessionAttemptEntity>}
|
|
30
|
+
* @memberof PaymentMethodSessionBaseEntity
|
|
31
|
+
*/
|
|
32
|
+
attempts: Array<PaymentMethodSessionAttemptEntity>;
|
|
33
|
+
/**
|
|
34
|
+
* Current status of the payment method session
|
|
35
|
+
* @type {string}
|
|
36
|
+
* @memberof PaymentMethodSessionBaseEntity
|
|
37
|
+
*/
|
|
38
|
+
status: PaymentMethodSessionBaseEntityStatusEnum;
|
|
39
|
+
/**
|
|
40
|
+
* The fully qualified origin (scheme + host) of the embedding website, e.g., https://merchant.com
|
|
41
|
+
* @type {string}
|
|
42
|
+
* @memberof PaymentMethodSessionBaseEntity
|
|
43
|
+
*/
|
|
44
|
+
origin: string;
|
|
45
|
+
/**
|
|
46
|
+
* The date and time when the session expires
|
|
47
|
+
* @type {Date}
|
|
48
|
+
* @memberof PaymentMethodSessionBaseEntity
|
|
49
|
+
*/
|
|
50
|
+
expiresAt: Date;
|
|
51
|
+
/**
|
|
52
|
+
* The date and time when the session was created
|
|
53
|
+
* @type {Date}
|
|
54
|
+
* @memberof PaymentMethodSessionBaseEntity
|
|
55
|
+
*/
|
|
56
|
+
createdAt: Date;
|
|
57
|
+
/**
|
|
58
|
+
* The date and time when the session was last updated
|
|
59
|
+
* @type {Date}
|
|
60
|
+
* @memberof PaymentMethodSessionBaseEntity
|
|
61
|
+
*/
|
|
62
|
+
updatedAt: Date;
|
|
63
|
+
/**
|
|
64
|
+
* Indicates whether the session has been deleted
|
|
65
|
+
* @type {boolean}
|
|
66
|
+
* @memberof PaymentMethodSessionBaseEntity
|
|
67
|
+
*/
|
|
68
|
+
deleted: boolean;
|
|
69
|
+
/**
|
|
70
|
+
* Signed token used to authenticate and validate the session from the client-side.
|
|
71
|
+
* @type {string}
|
|
72
|
+
* @memberof PaymentMethodSessionBaseEntity
|
|
73
|
+
*/
|
|
74
|
+
sessionToken?: string;
|
|
75
|
+
/**
|
|
76
|
+
* List of authorized payment instruments associated with the session
|
|
77
|
+
* @type {AuthorizedPaymentInstrumentsEntity}
|
|
78
|
+
* @memberof PaymentMethodSessionBaseEntity
|
|
79
|
+
*/
|
|
80
|
+
authorizedPaymentInstruments?: AuthorizedPaymentInstrumentsEntity;
|
|
81
|
+
/**
|
|
82
|
+
* The unique identifier for the payment method created by the session
|
|
83
|
+
* @type {string}
|
|
84
|
+
* @memberof PaymentMethodSessionBaseEntity
|
|
85
|
+
*/
|
|
86
|
+
paymentMethodId?: string;
|
|
87
|
+
/**
|
|
88
|
+
* The unique identifier for the buyer associated with the session
|
|
89
|
+
* @type {string}
|
|
90
|
+
* @memberof PaymentMethodSessionBaseEntity
|
|
91
|
+
*/
|
|
92
|
+
buyerId?: string;
|
|
93
|
+
/**
|
|
94
|
+
* The external identifier for the buyer associated with the session
|
|
95
|
+
* @type {string}
|
|
96
|
+
* @memberof PaymentMethodSessionBaseEntity
|
|
97
|
+
*/
|
|
98
|
+
externalBuyerId?: string;
|
|
99
|
+
/**
|
|
100
|
+
* Reason for session expiration, if applicable
|
|
101
|
+
* @type {string}
|
|
102
|
+
* @memberof PaymentMethodSessionBaseEntity
|
|
103
|
+
*/
|
|
104
|
+
expiredReason?: PaymentMethodSessionBaseEntityExpiredReasonEnum;
|
|
105
|
+
/**
|
|
106
|
+
* The date and time when the session expired, if applicable
|
|
107
|
+
* @type {Date}
|
|
108
|
+
* @memberof PaymentMethodSessionBaseEntity
|
|
109
|
+
*/
|
|
110
|
+
expiredAt?: Date;
|
|
111
|
+
/**
|
|
112
|
+
* The date and time when the session was completed, if applicable
|
|
113
|
+
* @type {Date}
|
|
114
|
+
* @memberof PaymentMethodSessionBaseEntity
|
|
115
|
+
*/
|
|
116
|
+
completedAt?: Date;
|
|
117
|
+
/**
|
|
118
|
+
* The date and time when the session was deleted, if applicable
|
|
119
|
+
* @type {Date}
|
|
120
|
+
* @memberof PaymentMethodSessionBaseEntity
|
|
121
|
+
*/
|
|
122
|
+
deletedAt?: Date;
|
|
123
|
+
}
|
|
124
|
+
/**
|
|
125
|
+
* @export
|
|
126
|
+
*/
|
|
127
|
+
export declare const PaymentMethodSessionBaseEntityStatusEnum: {
|
|
128
|
+
readonly Pending: "PENDING";
|
|
129
|
+
readonly Expired: "EXPIRED";
|
|
130
|
+
readonly Completed: "COMPLETED";
|
|
131
|
+
};
|
|
132
|
+
export type PaymentMethodSessionBaseEntityStatusEnum = typeof PaymentMethodSessionBaseEntityStatusEnum[keyof typeof PaymentMethodSessionBaseEntityStatusEnum];
|
|
133
|
+
/**
|
|
134
|
+
* @export
|
|
135
|
+
*/
|
|
136
|
+
export declare const PaymentMethodSessionBaseEntityExpiredReasonEnum: {
|
|
137
|
+
readonly Timeout: "TIMEOUT";
|
|
138
|
+
readonly MaxAttempts: "MAX_ATTEMPTS";
|
|
139
|
+
readonly UserCancelled: "USER_CANCELLED";
|
|
140
|
+
};
|
|
141
|
+
export type PaymentMethodSessionBaseEntityExpiredReasonEnum = typeof PaymentMethodSessionBaseEntityExpiredReasonEnum[keyof typeof PaymentMethodSessionBaseEntityExpiredReasonEnum];
|
|
142
|
+
/**
|
|
143
|
+
* Check if a given object implements the PaymentMethodSessionBaseEntity interface.
|
|
144
|
+
*/
|
|
145
|
+
export declare function instanceOfPaymentMethodSessionBaseEntity(value: object): boolean;
|
|
146
|
+
export declare function PaymentMethodSessionBaseEntityFromJSON(json: any): PaymentMethodSessionBaseEntity;
|
|
147
|
+
export declare function PaymentMethodSessionBaseEntityFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaymentMethodSessionBaseEntity;
|
|
148
|
+
export declare function PaymentMethodSessionBaseEntityToJSON(value?: PaymentMethodSessionBaseEntity | null): any;
|
|
@@ -0,0 +1,100 @@
|
|
|
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
|
+
import { AuthorizedPaymentInstrumentsEntityFromJSON, AuthorizedPaymentInstrumentsEntityToJSON, } from './AuthorizedPaymentInstrumentsEntity';
|
|
11
|
+
import { PaymentMethodSessionAttemptEntityFromJSON, PaymentMethodSessionAttemptEntityToJSON, } from './PaymentMethodSessionAttemptEntity';
|
|
12
|
+
/**
|
|
13
|
+
* @export
|
|
14
|
+
*/
|
|
15
|
+
export const PaymentMethodSessionBaseEntityStatusEnum = {
|
|
16
|
+
Pending: 'PENDING',
|
|
17
|
+
Expired: 'EXPIRED',
|
|
18
|
+
Completed: 'COMPLETED'
|
|
19
|
+
};
|
|
20
|
+
/**
|
|
21
|
+
* @export
|
|
22
|
+
*/
|
|
23
|
+
export const PaymentMethodSessionBaseEntityExpiredReasonEnum = {
|
|
24
|
+
Timeout: 'TIMEOUT',
|
|
25
|
+
MaxAttempts: 'MAX_ATTEMPTS',
|
|
26
|
+
UserCancelled: 'USER_CANCELLED'
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
|
+
* Check if a given object implements the PaymentMethodSessionBaseEntity interface.
|
|
30
|
+
*/
|
|
31
|
+
export function instanceOfPaymentMethodSessionBaseEntity(value) {
|
|
32
|
+
let isInstance = true;
|
|
33
|
+
isInstance = isInstance && "sessionId" in value;
|
|
34
|
+
isInstance = isInstance && "merchantId" in value;
|
|
35
|
+
isInstance = isInstance && "attempts" in value;
|
|
36
|
+
isInstance = isInstance && "status" in value;
|
|
37
|
+
isInstance = isInstance && "origin" in value;
|
|
38
|
+
isInstance = isInstance && "expiresAt" in value;
|
|
39
|
+
isInstance = isInstance && "createdAt" in value;
|
|
40
|
+
isInstance = isInstance && "updatedAt" in value;
|
|
41
|
+
isInstance = isInstance && "deleted" in value;
|
|
42
|
+
return isInstance;
|
|
43
|
+
}
|
|
44
|
+
export function PaymentMethodSessionBaseEntityFromJSON(json) {
|
|
45
|
+
return PaymentMethodSessionBaseEntityFromJSONTyped(json, false);
|
|
46
|
+
}
|
|
47
|
+
export function PaymentMethodSessionBaseEntityFromJSONTyped(json, ignoreDiscriminator) {
|
|
48
|
+
if ((json === undefined) || (json === null)) {
|
|
49
|
+
return json;
|
|
50
|
+
}
|
|
51
|
+
const typed = {
|
|
52
|
+
'sessionId': json['sessionId'],
|
|
53
|
+
'merchantId': json['merchantId'],
|
|
54
|
+
'attempts': (json['attempts'].map(PaymentMethodSessionAttemptEntityFromJSON)),
|
|
55
|
+
'status': json['status'],
|
|
56
|
+
'origin': json['origin'],
|
|
57
|
+
'expiresAt': (new Date(json['expiresAt'])),
|
|
58
|
+
'createdAt': (new Date(json['createdAt'])),
|
|
59
|
+
'updatedAt': (new Date(json['updatedAt'])),
|
|
60
|
+
'deleted': json['deleted'],
|
|
61
|
+
'sessionToken': !exists(json, 'sessionToken') ? undefined : json['sessionToken'],
|
|
62
|
+
'authorizedPaymentInstruments': !exists(json, 'authorizedPaymentInstruments') ? undefined : AuthorizedPaymentInstrumentsEntityFromJSON(json['authorizedPaymentInstruments']),
|
|
63
|
+
'paymentMethodId': !exists(json, 'paymentMethodId') ? undefined : json['paymentMethodId'],
|
|
64
|
+
'buyerId': !exists(json, 'buyerId') ? undefined : json['buyerId'],
|
|
65
|
+
'externalBuyerId': !exists(json, 'externalBuyerId') ? undefined : json['externalBuyerId'],
|
|
66
|
+
'expiredReason': !exists(json, 'expiredReason') ? undefined : json['expiredReason'],
|
|
67
|
+
'expiredAt': !exists(json, 'expiredAt') ? undefined : (new Date(json['expiredAt'])),
|
|
68
|
+
'completedAt': !exists(json, 'completedAt') ? undefined : (new Date(json['completedAt'])),
|
|
69
|
+
'deletedAt': !exists(json, 'deletedAt') ? undefined : (new Date(json['deletedAt'])),
|
|
70
|
+
};
|
|
71
|
+
return removeNullUndefined(typed);
|
|
72
|
+
}
|
|
73
|
+
export function PaymentMethodSessionBaseEntityToJSON(value) {
|
|
74
|
+
if (value === undefined) {
|
|
75
|
+
return undefined;
|
|
76
|
+
}
|
|
77
|
+
if (value === null) {
|
|
78
|
+
return null;
|
|
79
|
+
}
|
|
80
|
+
return {
|
|
81
|
+
'sessionId': value.sessionId,
|
|
82
|
+
'merchantId': value.merchantId,
|
|
83
|
+
'attempts': (value.attempts.map(PaymentMethodSessionAttemptEntityToJSON)),
|
|
84
|
+
'status': value.status,
|
|
85
|
+
'origin': value.origin,
|
|
86
|
+
'expiresAt': (value.expiresAt.toISOString()),
|
|
87
|
+
'createdAt': (value.createdAt.toISOString()),
|
|
88
|
+
'updatedAt': (value.updatedAt.toISOString()),
|
|
89
|
+
'deleted': value.deleted,
|
|
90
|
+
'sessionToken': value.sessionToken,
|
|
91
|
+
'authorizedPaymentInstruments': AuthorizedPaymentInstrumentsEntityToJSON(value.authorizedPaymentInstruments),
|
|
92
|
+
'paymentMethodId': value.paymentMethodId,
|
|
93
|
+
'buyerId': value.buyerId,
|
|
94
|
+
'externalBuyerId': value.externalBuyerId,
|
|
95
|
+
'expiredReason': value.expiredReason,
|
|
96
|
+
'expiredAt': value.expiredAt === undefined ? undefined : (value.expiredAt.toISOString()),
|
|
97
|
+
'completedAt': value.completedAt === undefined ? undefined : (value.completedAt.toISOString()),
|
|
98
|
+
'deletedAt': value.deletedAt === undefined ? undefined : (value.deletedAt.toISOString()),
|
|
99
|
+
};
|
|
100
|
+
}
|