@channelpayments/node-sdk 1.195.0 → 1.197.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/models/BillingDetailsDto1.d.ts +45 -0
- package/dist/cjs/models/BillingDetailsDto1.js +56 -0
- package/dist/cjs/models/ConnectorServiceTokenEntity.d.ts +6 -0
- package/dist/cjs/models/ConnectorServiceTokenEntity.js +2 -0
- package/dist/cjs/models/CreateCheckoutSessionItemDto.d.ts +1 -1
- package/dist/cjs/models/CreateCheckoutSessionPaymentMethodDto.d.ts +7 -0
- package/dist/cjs/models/CreateCheckoutSessionPaymentMethodDto.js +3 -0
- package/dist/cjs/models/CreateProvisionedCardTokenByMerchantDto.d.ts +6 -0
- package/dist/cjs/models/CreateProvisionedCardTokenByMerchantDto.js +2 -0
- package/dist/cjs/models/CreateTransactionRequestDto.d.ts +19 -1
- package/dist/cjs/models/CreateTransactionRequestDto.js +6 -0
- package/dist/cjs/models/PaymentMethodDto.d.ts +7 -0
- package/dist/cjs/models/PaymentMethodDto.js +3 -0
- package/dist/cjs/models/PaymentMethodEntity.d.ts +2 -2
- package/dist/cjs/models/PaymentMethodEntity.js +2 -2
- package/dist/cjs/models/PaymentMethodServiceEntity.d.ts +2 -2
- package/dist/cjs/models/PaymentMethodServiceEntity.js +2 -2
- package/dist/cjs/models/SessionPaymentMethodEntity.d.ts +2 -2
- package/dist/cjs/models/SessionPaymentMethodEntity.js +2 -2
- package/dist/cjs/models/TransactionEntity.d.ts +57 -33
- package/dist/cjs/models/TransactionEntity.js +20 -12
- package/dist/cjs/models/index.d.ts +1 -2
- package/dist/cjs/models/index.js +1 -2
- package/dist/cjs/runtime.js +1 -1
- package/dist/mjs/models/BillingDetailsDto1.d.ts +45 -0
- package/dist/mjs/models/BillingDetailsDto1.js +50 -0
- package/dist/mjs/models/ConnectorServiceTokenEntity.d.ts +6 -0
- package/dist/mjs/models/ConnectorServiceTokenEntity.js +2 -0
- package/dist/mjs/models/CreateCheckoutSessionItemDto.d.ts +1 -1
- package/dist/mjs/models/CreateCheckoutSessionPaymentMethodDto.d.ts +7 -0
- package/dist/mjs/models/CreateCheckoutSessionPaymentMethodDto.js +3 -0
- package/dist/mjs/models/CreateProvisionedCardTokenByMerchantDto.d.ts +6 -0
- package/dist/mjs/models/CreateProvisionedCardTokenByMerchantDto.js +2 -0
- package/dist/mjs/models/CreateTransactionRequestDto.d.ts +19 -1
- package/dist/mjs/models/CreateTransactionRequestDto.js +6 -0
- package/dist/mjs/models/PaymentMethodDto.d.ts +7 -0
- package/dist/mjs/models/PaymentMethodDto.js +3 -0
- package/dist/mjs/models/PaymentMethodEntity.d.ts +2 -2
- package/dist/mjs/models/PaymentMethodEntity.js +2 -2
- package/dist/mjs/models/PaymentMethodServiceEntity.d.ts +2 -2
- package/dist/mjs/models/PaymentMethodServiceEntity.js +2 -2
- package/dist/mjs/models/SessionPaymentMethodEntity.d.ts +2 -2
- package/dist/mjs/models/SessionPaymentMethodEntity.js +2 -2
- package/dist/mjs/models/TransactionEntity.d.ts +57 -33
- package/dist/mjs/models/TransactionEntity.js +20 -12
- package/dist/mjs/models/index.d.ts +1 -2
- package/dist/mjs/models/index.js +1 -2
- package/dist/mjs/runtime.js +1 -1
- package/package.json +1 -1
- package/dist/cjs/models/AdminCreateTransactionRefundDto.d.ts +0 -82
- package/dist/cjs/models/AdminCreateTransactionRefundDto.js +0 -84
- package/dist/cjs/models/AdminVoidTransactionDto.d.ts +0 -32
- package/dist/cjs/models/AdminVoidTransactionDto.js +0 -49
- package/dist/mjs/models/AdminCreateTransactionRefundDto.d.ts +0 -82
- package/dist/mjs/models/AdminCreateTransactionRefundDto.js +0 -77
- package/dist/mjs/models/AdminVoidTransactionDto.d.ts +0 -32
- package/dist/mjs/models/AdminVoidTransactionDto.js +0 -43
package/dist/cjs/models/index.js
CHANGED
|
@@ -17,14 +17,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
17
17
|
/* tslint:disable */
|
|
18
18
|
/* eslint-disable */
|
|
19
19
|
__exportStar(require("./AddressEntity"), exports);
|
|
20
|
-
__exportStar(require("./AdminCreateTransactionRefundDto"), exports);
|
|
21
|
-
__exportStar(require("./AdminVoidTransactionDto"), exports);
|
|
22
20
|
__exportStar(require("./AuthorizedPaymentInstrumentsEntity"), exports);
|
|
23
21
|
__exportStar(require("./AvailablePaymentMethodEntity"), exports);
|
|
24
22
|
__exportStar(require("./BankDetailsServiceEntity"), exports);
|
|
25
23
|
__exportStar(require("./BillingAddressDto"), exports);
|
|
26
24
|
__exportStar(require("./BillingAddressEntity"), exports);
|
|
27
25
|
__exportStar(require("./BillingDetailsDto"), exports);
|
|
26
|
+
__exportStar(require("./BillingDetailsDto1"), exports);
|
|
28
27
|
__exportStar(require("./BillingDetailsEntity"), exports);
|
|
29
28
|
__exportStar(require("./BuyerEntity"), exports);
|
|
30
29
|
__exportStar(require("./BuyersAddressEntity"), exports);
|
package/dist/cjs/runtime.js
CHANGED
|
@@ -114,7 +114,7 @@ class BaseAPI {
|
|
|
114
114
|
createFetchParams(context) {
|
|
115
115
|
return __awaiter(this, void 0, void 0, function* () {
|
|
116
116
|
Object.keys(context.headers).forEach(key => context.headers[key] === undefined ? delete context.headers[key] : {});
|
|
117
|
-
context.headers['user-agent'] = "@channelpayments/node-sdk/v1.
|
|
117
|
+
context.headers['user-agent'] = "@channelpayments/node-sdk/v1.197.0";
|
|
118
118
|
const token = this.generateAuthToken();
|
|
119
119
|
context.headers['Authorization'] = `Bearer ${token}`;
|
|
120
120
|
let url = this.url + context.path;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Channel Payments API
|
|
3
|
+
*
|
|
4
|
+
* NOTE: This class is auto generated. Do not edit the class manually.
|
|
5
|
+
*
|
|
6
|
+
*/
|
|
7
|
+
import type { BillingAddressDto } from './BillingAddressDto';
|
|
8
|
+
/**
|
|
9
|
+
*
|
|
10
|
+
* @export
|
|
11
|
+
* @interface BillingDetailsDto1
|
|
12
|
+
*/
|
|
13
|
+
export interface BillingDetailsDto1 {
|
|
14
|
+
/**
|
|
15
|
+
* The address of the account holder.
|
|
16
|
+
* @type {BillingAddressDto}
|
|
17
|
+
* @memberof BillingDetailsDto1
|
|
18
|
+
*/
|
|
19
|
+
billingAddress: BillingAddressDto;
|
|
20
|
+
/**
|
|
21
|
+
* The email address of the account holder.
|
|
22
|
+
* @type {string}
|
|
23
|
+
* @memberof BillingDetailsDto1
|
|
24
|
+
*/
|
|
25
|
+
email: string;
|
|
26
|
+
/**
|
|
27
|
+
* The first name of the account holder.
|
|
28
|
+
* @type {string}
|
|
29
|
+
* @memberof BillingDetailsDto1
|
|
30
|
+
*/
|
|
31
|
+
givenName: string;
|
|
32
|
+
/**
|
|
33
|
+
* The last name of the account holder.
|
|
34
|
+
* @type {string}
|
|
35
|
+
* @memberof BillingDetailsDto1
|
|
36
|
+
*/
|
|
37
|
+
familyName: string;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Check if a given object implements the BillingDetailsDto1 interface.
|
|
41
|
+
*/
|
|
42
|
+
export declare function instanceOfBillingDetailsDto1(value: object): boolean;
|
|
43
|
+
export declare function BillingDetailsDto1FromJSON(json: any): BillingDetailsDto1;
|
|
44
|
+
export declare function BillingDetailsDto1FromJSONTyped(json: any, ignoreDiscriminator: boolean): BillingDetailsDto1;
|
|
45
|
+
export declare function BillingDetailsDto1ToJSON(value?: BillingDetailsDto1 | null): any;
|
|
@@ -0,0 +1,50 @@
|
|
|
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
|
+
import { BillingAddressDtoFromJSON, BillingAddressDtoToJSON, } from './BillingAddressDto';
|
|
11
|
+
/**
|
|
12
|
+
* Check if a given object implements the BillingDetailsDto1 interface.
|
|
13
|
+
*/
|
|
14
|
+
export function instanceOfBillingDetailsDto1(value) {
|
|
15
|
+
let isInstance = true;
|
|
16
|
+
isInstance = isInstance && "billingAddress" in value;
|
|
17
|
+
isInstance = isInstance && "email" in value;
|
|
18
|
+
isInstance = isInstance && "givenName" in value;
|
|
19
|
+
isInstance = isInstance && "familyName" in value;
|
|
20
|
+
return isInstance;
|
|
21
|
+
}
|
|
22
|
+
export function BillingDetailsDto1FromJSON(json) {
|
|
23
|
+
return BillingDetailsDto1FromJSONTyped(json, false);
|
|
24
|
+
}
|
|
25
|
+
export function BillingDetailsDto1FromJSONTyped(json, ignoreDiscriminator) {
|
|
26
|
+
if ((json === undefined) || (json === null)) {
|
|
27
|
+
return json;
|
|
28
|
+
}
|
|
29
|
+
const typed = {
|
|
30
|
+
'billingAddress': BillingAddressDtoFromJSON(json['billingAddress']),
|
|
31
|
+
'email': json['email'],
|
|
32
|
+
'givenName': json['givenName'],
|
|
33
|
+
'familyName': json['familyName'],
|
|
34
|
+
};
|
|
35
|
+
return removeNullUndefined(typed);
|
|
36
|
+
}
|
|
37
|
+
export function BillingDetailsDto1ToJSON(value) {
|
|
38
|
+
if (value === undefined) {
|
|
39
|
+
return undefined;
|
|
40
|
+
}
|
|
41
|
+
if (value === null) {
|
|
42
|
+
return null;
|
|
43
|
+
}
|
|
44
|
+
return {
|
|
45
|
+
'billingAddress': BillingAddressDtoToJSON(value.billingAddress),
|
|
46
|
+
'email': value.email,
|
|
47
|
+
'givenName': value.givenName,
|
|
48
|
+
'familyName': value.familyName,
|
|
49
|
+
};
|
|
50
|
+
}
|
|
@@ -58,6 +58,12 @@ export interface ConnectorServiceTokenEntity {
|
|
|
58
58
|
* @memberof ConnectorServiceTokenEntity
|
|
59
59
|
*/
|
|
60
60
|
approvalUrl?: string;
|
|
61
|
+
/**
|
|
62
|
+
* The id of the connector service integration associated with the token.
|
|
63
|
+
* @type {string}
|
|
64
|
+
* @memberof ConnectorServiceTokenEntity
|
|
65
|
+
*/
|
|
66
|
+
connectorServiceIntegrationId?: string;
|
|
61
67
|
}
|
|
62
68
|
/**
|
|
63
69
|
* @export
|
|
@@ -45,6 +45,7 @@ export function ConnectorServiceTokenEntityFromJSONTyped(json, ignoreDiscriminat
|
|
|
45
45
|
'createdAt': (new Date(json['createdAt'])),
|
|
46
46
|
'updatedAt': (new Date(json['updatedAt'])),
|
|
47
47
|
'approvalUrl': !exists(json, 'approvalUrl') ? undefined : json['approvalUrl'],
|
|
48
|
+
'connectorServiceIntegrationId': !exists(json, 'connectorServiceIntegrationId') ? undefined : json['connectorServiceIntegrationId'],
|
|
48
49
|
};
|
|
49
50
|
return removeNullUndefined(typed);
|
|
50
51
|
}
|
|
@@ -64,5 +65,6 @@ export function ConnectorServiceTokenEntityToJSON(value) {
|
|
|
64
65
|
'createdAt': (value.createdAt.toISOString()),
|
|
65
66
|
'updatedAt': (value.updatedAt.toISOString()),
|
|
66
67
|
'approvalUrl': value.approvalUrl,
|
|
68
|
+
'connectorServiceIntegrationId': value.connectorServiceIntegrationId,
|
|
67
69
|
};
|
|
68
70
|
}
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
* NOTE: This class is auto generated. Do not edit the class manually.
|
|
5
5
|
*
|
|
6
6
|
*/
|
|
7
|
+
import type { BillingDetailsDto1 } from './BillingDetailsDto1';
|
|
7
8
|
/**
|
|
8
9
|
*
|
|
9
10
|
* @export
|
|
@@ -64,6 +65,12 @@ export interface CreateCheckoutSessionPaymentMethodDto {
|
|
|
64
65
|
* @memberof CreateCheckoutSessionPaymentMethodDto
|
|
65
66
|
*/
|
|
66
67
|
accountType?: CreateCheckoutSessionPaymentMethodDtoAccountTypeEnum;
|
|
68
|
+
/**
|
|
69
|
+
* The billing details.
|
|
70
|
+
* @type {BillingDetailsDto1}
|
|
71
|
+
* @memberof CreateCheckoutSessionPaymentMethodDto
|
|
72
|
+
*/
|
|
73
|
+
billingDetails?: BillingDetailsDto1;
|
|
67
74
|
}
|
|
68
75
|
/**
|
|
69
76
|
* @export
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
*
|
|
8
8
|
*/
|
|
9
9
|
import { exists, removeNullUndefined } from '../runtime';
|
|
10
|
+
import { BillingDetailsDto1FromJSON, BillingDetailsDto1ToJSON, } from './BillingDetailsDto1';
|
|
10
11
|
/**
|
|
11
12
|
* @export
|
|
12
13
|
*/
|
|
@@ -47,6 +48,7 @@ export function CreateCheckoutSessionPaymentMethodDtoFromJSONTyped(json, ignoreD
|
|
|
47
48
|
'abaNumber': !exists(json, 'abaNumber') ? undefined : json['abaNumber'],
|
|
48
49
|
'accountNumber': !exists(json, 'accountNumber') ? undefined : json['accountNumber'],
|
|
49
50
|
'accountType': !exists(json, 'accountType') ? undefined : json['accountType'],
|
|
51
|
+
'billingDetails': !exists(json, 'billingDetails') ? undefined : BillingDetailsDto1FromJSON(json['billingDetails']),
|
|
50
52
|
};
|
|
51
53
|
return removeNullUndefined(typed);
|
|
52
54
|
}
|
|
@@ -67,5 +69,6 @@ export function CreateCheckoutSessionPaymentMethodDtoToJSON(value) {
|
|
|
67
69
|
'abaNumber': value.abaNumber,
|
|
68
70
|
'accountNumber': value.accountNumber,
|
|
69
71
|
'accountType': value.accountType,
|
|
72
|
+
'billingDetails': BillingDetailsDto1ToJSON(value.billingDetails),
|
|
70
73
|
};
|
|
71
74
|
}
|
|
@@ -46,6 +46,12 @@ export interface CreateProvisionedCardTokenByMerchantDto {
|
|
|
46
46
|
* @memberof CreateProvisionedCardTokenByMerchantDto
|
|
47
47
|
*/
|
|
48
48
|
token?: string;
|
|
49
|
+
/**
|
|
50
|
+
* The card on file identifier for the provisioned card.
|
|
51
|
+
* @type {string}
|
|
52
|
+
* @memberof CreateProvisionedCardTokenByMerchantDto
|
|
53
|
+
*/
|
|
54
|
+
cardOnFileIdentifier?: string;
|
|
49
55
|
}
|
|
50
56
|
/**
|
|
51
57
|
* @export
|
|
@@ -38,6 +38,7 @@ export function CreateProvisionedCardTokenByMerchantDtoFromJSONTyped(json, ignor
|
|
|
38
38
|
'redirectUrl': !exists(json, 'redirectUrl') ? undefined : json['redirectUrl'],
|
|
39
39
|
'merchantId': json['merchantId'],
|
|
40
40
|
'token': !exists(json, 'token') ? undefined : json['token'],
|
|
41
|
+
'cardOnFileIdentifier': !exists(json, 'cardOnFileIdentifier') ? undefined : json['cardOnFileIdentifier'],
|
|
41
42
|
};
|
|
42
43
|
return removeNullUndefined(typed);
|
|
43
44
|
}
|
|
@@ -55,5 +56,6 @@ export function CreateProvisionedCardTokenByMerchantDtoToJSON(value) {
|
|
|
55
56
|
'redirectUrl': value.redirectUrl,
|
|
56
57
|
'merchantId': value.merchantId,
|
|
57
58
|
'token': value.token,
|
|
59
|
+
'cardOnFileIdentifier': value.cardOnFileIdentifier,
|
|
58
60
|
};
|
|
59
61
|
}
|
|
@@ -13,11 +13,17 @@ import type { TagDto } from './TagDto';
|
|
|
13
13
|
*/
|
|
14
14
|
export interface CreateTransactionRequestDto {
|
|
15
15
|
/**
|
|
16
|
-
* The amount to charge the buyer.
|
|
16
|
+
* The total amount to charge the buyer.
|
|
17
17
|
* @type {number}
|
|
18
18
|
* @memberof CreateTransactionRequestDto
|
|
19
19
|
*/
|
|
20
20
|
amount: number;
|
|
21
|
+
/**
|
|
22
|
+
* The total sales tax of the transaction.
|
|
23
|
+
* @type {number}
|
|
24
|
+
* @memberof CreateTransactionRequestDto
|
|
25
|
+
*/
|
|
26
|
+
salesTax?: number;
|
|
21
27
|
/**
|
|
22
28
|
* The ISO-4217 currency code of the amount to charge the buyer.
|
|
23
29
|
* @type {string}
|
|
@@ -54,6 +60,12 @@ export interface CreateTransactionRequestDto {
|
|
|
54
60
|
* @memberof CreateTransactionRequestDto
|
|
55
61
|
*/
|
|
56
62
|
externalTransactionId?: string;
|
|
63
|
+
/**
|
|
64
|
+
* Optional alphanumeric field (a-z, A-Z, 0-9, space).
|
|
65
|
+
* @type {string}
|
|
66
|
+
* @memberof CreateTransactionRequestDto
|
|
67
|
+
*/
|
|
68
|
+
purchaseOrderId?: string;
|
|
57
69
|
/**
|
|
58
70
|
* The SEC code of the ACH transaction. Must be unset if method is not BANK.
|
|
59
71
|
* @type {string}
|
|
@@ -66,6 +78,12 @@ export interface CreateTransactionRequestDto {
|
|
|
66
78
|
* @memberof CreateTransactionRequestDto
|
|
67
79
|
*/
|
|
68
80
|
tags?: Array<TagDto>;
|
|
81
|
+
/**
|
|
82
|
+
* Optional transaction descriptor.
|
|
83
|
+
* @type {string}
|
|
84
|
+
* @memberof CreateTransactionRequestDto
|
|
85
|
+
*/
|
|
86
|
+
description?: string;
|
|
69
87
|
}
|
|
70
88
|
/**
|
|
71
89
|
* @export
|
|
@@ -54,14 +54,17 @@ export function CreateTransactionRequestDtoFromJSONTyped(json, ignoreDiscriminat
|
|
|
54
54
|
}
|
|
55
55
|
const typed = {
|
|
56
56
|
'amount': json['amount'],
|
|
57
|
+
'salesTax': !exists(json, 'salesTax') ? undefined : json['salesTax'],
|
|
57
58
|
'currency': json['currency'],
|
|
58
59
|
'paymentMethod': PaymentMethodDtoFromJSON(json['paymentMethod']),
|
|
59
60
|
'intent': json['intent'],
|
|
60
61
|
'excludeCFee': !exists(json, 'excludeCFee') ? undefined : json['excludeCFee'],
|
|
61
62
|
'country': !exists(json, 'country') ? undefined : json['country'],
|
|
62
63
|
'externalTransactionId': !exists(json, 'externalTransactionId') ? undefined : json['externalTransactionId'],
|
|
64
|
+
'purchaseOrderId': !exists(json, 'purchaseOrderId') ? undefined : json['purchaseOrderId'],
|
|
63
65
|
'secCode': !exists(json, 'secCode') ? undefined : json['secCode'],
|
|
64
66
|
'tags': !exists(json, 'tags') ? undefined : (json['tags'].map(TagDtoFromJSON)),
|
|
67
|
+
'description': !exists(json, 'description') ? undefined : json['description'],
|
|
65
68
|
};
|
|
66
69
|
return removeNullUndefined(typed);
|
|
67
70
|
}
|
|
@@ -74,13 +77,16 @@ export function CreateTransactionRequestDtoToJSON(value) {
|
|
|
74
77
|
}
|
|
75
78
|
return {
|
|
76
79
|
'amount': value.amount,
|
|
80
|
+
'salesTax': value.salesTax,
|
|
77
81
|
'currency': value.currency,
|
|
78
82
|
'paymentMethod': PaymentMethodDtoToJSON(value.paymentMethod),
|
|
79
83
|
'intent': value.intent,
|
|
80
84
|
'excludeCFee': value.excludeCFee,
|
|
81
85
|
'country': value.country,
|
|
82
86
|
'externalTransactionId': value.externalTransactionId,
|
|
87
|
+
'purchaseOrderId': value.purchaseOrderId,
|
|
83
88
|
'secCode': value.secCode,
|
|
84
89
|
'tags': value.tags === undefined ? undefined : (value.tags.map(TagDtoToJSON)),
|
|
90
|
+
'description': value.description,
|
|
85
91
|
};
|
|
86
92
|
}
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
* NOTE: This class is auto generated. Do not edit the class manually.
|
|
5
5
|
*
|
|
6
6
|
*/
|
|
7
|
+
import type { BillingDetailsDto1 } from './BillingDetailsDto1';
|
|
7
8
|
/**
|
|
8
9
|
*
|
|
9
10
|
* @export
|
|
@@ -82,6 +83,12 @@ export interface PaymentMethodDto {
|
|
|
82
83
|
* @memberof PaymentMethodDto
|
|
83
84
|
*/
|
|
84
85
|
accountHolderName?: string;
|
|
86
|
+
/**
|
|
87
|
+
* The billing details.
|
|
88
|
+
* @type {BillingDetailsDto1}
|
|
89
|
+
* @memberof PaymentMethodDto
|
|
90
|
+
*/
|
|
91
|
+
billingDetails?: BillingDetailsDto1;
|
|
85
92
|
}
|
|
86
93
|
/**
|
|
87
94
|
* @export
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
*
|
|
8
8
|
*/
|
|
9
9
|
import { exists, removeNullUndefined } from '../runtime';
|
|
10
|
+
import { BillingDetailsDto1FromJSON, BillingDetailsDto1ToJSON, } from './BillingDetailsDto1';
|
|
10
11
|
/**
|
|
11
12
|
* @export
|
|
12
13
|
*/
|
|
@@ -50,6 +51,7 @@ export function PaymentMethodDtoFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
50
51
|
'accountNumber': !exists(json, 'accountNumber') ? undefined : json['accountNumber'],
|
|
51
52
|
'accountType': !exists(json, 'accountType') ? undefined : json['accountType'],
|
|
52
53
|
'accountHolderName': !exists(json, 'accountHolderName') ? undefined : json['accountHolderName'],
|
|
54
|
+
'billingDetails': !exists(json, 'billingDetails') ? undefined : BillingDetailsDto1FromJSON(json['billingDetails']),
|
|
53
55
|
};
|
|
54
56
|
return removeNullUndefined(typed);
|
|
55
57
|
}
|
|
@@ -73,5 +75,6 @@ export function PaymentMethodDtoToJSON(value) {
|
|
|
73
75
|
'accountNumber': value.accountNumber,
|
|
74
76
|
'accountType': value.accountType,
|
|
75
77
|
'accountHolderName': value.accountHolderName,
|
|
78
|
+
'billingDetails': BillingDetailsDto1ToJSON(value.billingDetails),
|
|
76
79
|
};
|
|
77
80
|
}
|
|
@@ -53,10 +53,10 @@ export interface PaymentMethodEntity {
|
|
|
53
53
|
externalPaymentMethodId?: string;
|
|
54
54
|
/**
|
|
55
55
|
* The connector service tokens.
|
|
56
|
-
* @type {ConnectorServiceTokenEntity}
|
|
56
|
+
* @type {Array<ConnectorServiceTokenEntity>}
|
|
57
57
|
* @memberof PaymentMethodEntity
|
|
58
58
|
*/
|
|
59
|
-
connectorServiceTokens?: ConnectorServiceTokenEntity
|
|
59
|
+
connectorServiceTokens?: Array<ConnectorServiceTokenEntity>;
|
|
60
60
|
/**
|
|
61
61
|
* The currency to use with this payment method.
|
|
62
62
|
* @type {string}
|
|
@@ -61,7 +61,7 @@ export function PaymentMethodEntityFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
61
61
|
'status': json['status'],
|
|
62
62
|
'method': json['method'],
|
|
63
63
|
'externalPaymentMethodId': !exists(json, 'externalPaymentMethodId') ? undefined : json['externalPaymentMethodId'],
|
|
64
|
-
'connectorServiceTokens': !exists(json, 'connectorServiceTokens') ? undefined :
|
|
64
|
+
'connectorServiceTokens': !exists(json, 'connectorServiceTokens') ? undefined : (json['connectorServiceTokens'].map(ConnectorServiceTokenEntityFromJSON)),
|
|
65
65
|
'currency': !exists(json, 'currency') ? undefined : json['currency'],
|
|
66
66
|
'countryCode': !exists(json, 'countryCode') ? undefined : json['countryCode'],
|
|
67
67
|
'cardDetails': !exists(json, 'cardDetails') ? undefined : CardDetailsServiceEntityFromJSON(json['cardDetails']),
|
|
@@ -93,7 +93,7 @@ export function PaymentMethodEntityToJSON(value) {
|
|
|
93
93
|
'status': value.status,
|
|
94
94
|
'method': value.method,
|
|
95
95
|
'externalPaymentMethodId': value.externalPaymentMethodId,
|
|
96
|
-
'connectorServiceTokens':
|
|
96
|
+
'connectorServiceTokens': value.connectorServiceTokens === undefined ? undefined : (value.connectorServiceTokens.map(ConnectorServiceTokenEntityToJSON)),
|
|
97
97
|
'currency': value.currency,
|
|
98
98
|
'countryCode': value.countryCode,
|
|
99
99
|
'cardDetails': CardDetailsServiceEntityToJSON(value.cardDetails),
|
|
@@ -53,10 +53,10 @@ export interface PaymentMethodServiceEntity {
|
|
|
53
53
|
externalPaymentMethodId?: string;
|
|
54
54
|
/**
|
|
55
55
|
* The connector service tokens.
|
|
56
|
-
* @type {ConnectorServiceTokenEntity}
|
|
56
|
+
* @type {Array<ConnectorServiceTokenEntity>}
|
|
57
57
|
* @memberof PaymentMethodServiceEntity
|
|
58
58
|
*/
|
|
59
|
-
connectorServiceTokens?: ConnectorServiceTokenEntity
|
|
59
|
+
connectorServiceTokens?: Array<ConnectorServiceTokenEntity>;
|
|
60
60
|
/**
|
|
61
61
|
* The currency to use with this payment method.
|
|
62
62
|
* @type {string}
|
|
@@ -61,7 +61,7 @@ export function PaymentMethodServiceEntityFromJSONTyped(json, ignoreDiscriminato
|
|
|
61
61
|
'status': json['status'],
|
|
62
62
|
'method': json['method'],
|
|
63
63
|
'externalPaymentMethodId': !exists(json, 'externalPaymentMethodId') ? undefined : json['externalPaymentMethodId'],
|
|
64
|
-
'connectorServiceTokens': !exists(json, 'connectorServiceTokens') ? undefined :
|
|
64
|
+
'connectorServiceTokens': !exists(json, 'connectorServiceTokens') ? undefined : (json['connectorServiceTokens'].map(ConnectorServiceTokenEntityFromJSON)),
|
|
65
65
|
'currency': !exists(json, 'currency') ? undefined : json['currency'],
|
|
66
66
|
'countryCode': !exists(json, 'countryCode') ? undefined : json['countryCode'],
|
|
67
67
|
'cardDetails': !exists(json, 'cardDetails') ? undefined : CardDetailsServiceEntityFromJSON(json['cardDetails']),
|
|
@@ -93,7 +93,7 @@ export function PaymentMethodServiceEntityToJSON(value) {
|
|
|
93
93
|
'status': value.status,
|
|
94
94
|
'method': value.method,
|
|
95
95
|
'externalPaymentMethodId': value.externalPaymentMethodId,
|
|
96
|
-
'connectorServiceTokens':
|
|
96
|
+
'connectorServiceTokens': value.connectorServiceTokens === undefined ? undefined : (value.connectorServiceTokens.map(ConnectorServiceTokenEntityToJSON)),
|
|
97
97
|
'currency': value.currency,
|
|
98
98
|
'countryCode': value.countryCode,
|
|
99
99
|
'cardDetails': CardDetailsServiceEntityToJSON(value.cardDetails),
|
|
@@ -53,10 +53,10 @@ export interface SessionPaymentMethodEntity {
|
|
|
53
53
|
externalPaymentMethodId?: string;
|
|
54
54
|
/**
|
|
55
55
|
* The connector service tokens.
|
|
56
|
-
* @type {ConnectorServiceTokenEntity}
|
|
56
|
+
* @type {Array<ConnectorServiceTokenEntity>}
|
|
57
57
|
* @memberof SessionPaymentMethodEntity
|
|
58
58
|
*/
|
|
59
|
-
connectorServiceTokens?: ConnectorServiceTokenEntity
|
|
59
|
+
connectorServiceTokens?: Array<ConnectorServiceTokenEntity>;
|
|
60
60
|
/**
|
|
61
61
|
* The currency to use with this payment method.
|
|
62
62
|
* @type {string}
|
|
@@ -61,7 +61,7 @@ export function SessionPaymentMethodEntityFromJSONTyped(json, ignoreDiscriminato
|
|
|
61
61
|
'status': json['status'],
|
|
62
62
|
'method': json['method'],
|
|
63
63
|
'externalPaymentMethodId': !exists(json, 'externalPaymentMethodId') ? undefined : json['externalPaymentMethodId'],
|
|
64
|
-
'connectorServiceTokens': !exists(json, 'connectorServiceTokens') ? undefined :
|
|
64
|
+
'connectorServiceTokens': !exists(json, 'connectorServiceTokens') ? undefined : (json['connectorServiceTokens'].map(ConnectorServiceTokenEntityFromJSON)),
|
|
65
65
|
'currency': !exists(json, 'currency') ? undefined : json['currency'],
|
|
66
66
|
'countryCode': !exists(json, 'countryCode') ? undefined : json['countryCode'],
|
|
67
67
|
'cardDetails': !exists(json, 'cardDetails') ? undefined : CardDetailsServiceEntityFromJSON(json['cardDetails']),
|
|
@@ -93,7 +93,7 @@ export function SessionPaymentMethodEntityToJSON(value) {
|
|
|
93
93
|
'status': value.status,
|
|
94
94
|
'method': value.method,
|
|
95
95
|
'externalPaymentMethodId': value.externalPaymentMethodId,
|
|
96
|
-
'connectorServiceTokens':
|
|
96
|
+
'connectorServiceTokens': value.connectorServiceTokens === undefined ? undefined : (value.connectorServiceTokens.map(ConnectorServiceTokenEntityToJSON)),
|
|
97
97
|
'currency': value.currency,
|
|
98
98
|
'countryCode': value.countryCode,
|
|
99
99
|
'cardDetails': CardDetailsServiceEntityToJSON(value.cardDetails),
|
|
@@ -55,6 +55,12 @@ export interface TransactionEntity {
|
|
|
55
55
|
* @memberof TransactionEntity
|
|
56
56
|
*/
|
|
57
57
|
netAmount: number;
|
|
58
|
+
/**
|
|
59
|
+
* The sales tax of the transaction.
|
|
60
|
+
* @type {number}
|
|
61
|
+
* @memberof TransactionEntity
|
|
62
|
+
*/
|
|
63
|
+
salesTax?: number;
|
|
58
64
|
/**
|
|
59
65
|
* The fee of the transaction.
|
|
60
66
|
* @type {number}
|
|
@@ -67,6 +73,48 @@ export interface TransactionEntity {
|
|
|
67
73
|
* @memberof TransactionEntity
|
|
68
74
|
*/
|
|
69
75
|
feeDetails?: Array<TransactionFeeDetailsEntity>;
|
|
76
|
+
/**
|
|
77
|
+
* The authorized amount of the transaction.
|
|
78
|
+
* @type {number}
|
|
79
|
+
* @memberof TransactionEntity
|
|
80
|
+
*/
|
|
81
|
+
authorizedAmount?: number;
|
|
82
|
+
/**
|
|
83
|
+
* The captured amount of the transaction.
|
|
84
|
+
* @type {number}
|
|
85
|
+
* @memberof TransactionEntity
|
|
86
|
+
*/
|
|
87
|
+
capturedAmount?: number;
|
|
88
|
+
/**
|
|
89
|
+
* The settled amount of the transaction.
|
|
90
|
+
* @type {number}
|
|
91
|
+
* @memberof TransactionEntity
|
|
92
|
+
*/
|
|
93
|
+
settledAmount?: number;
|
|
94
|
+
/**
|
|
95
|
+
* The refundable amount of the transaction.
|
|
96
|
+
* @type {number}
|
|
97
|
+
* @memberof TransactionEntity
|
|
98
|
+
*/
|
|
99
|
+
refundableAmount?: number;
|
|
100
|
+
/**
|
|
101
|
+
* The voided amount of the transaction.
|
|
102
|
+
* @type {number}
|
|
103
|
+
* @memberof TransactionEntity
|
|
104
|
+
*/
|
|
105
|
+
voidedAmount?: number;
|
|
106
|
+
/**
|
|
107
|
+
* The refunded amount of the transaction.
|
|
108
|
+
* @type {number}
|
|
109
|
+
* @memberof TransactionEntity
|
|
110
|
+
*/
|
|
111
|
+
refundedAmount?: number;
|
|
112
|
+
/**
|
|
113
|
+
* The country of the transaction.
|
|
114
|
+
* @type {string}
|
|
115
|
+
* @memberof TransactionEntity
|
|
116
|
+
*/
|
|
117
|
+
country?: string;
|
|
70
118
|
/**
|
|
71
119
|
* The currency of the transaction.
|
|
72
120
|
* @type {string}
|
|
@@ -116,47 +164,17 @@ export interface TransactionEntity {
|
|
|
116
164
|
*/
|
|
117
165
|
authCode?: string;
|
|
118
166
|
/**
|
|
119
|
-
* The
|
|
120
|
-
* @type {
|
|
121
|
-
* @memberof TransactionEntity
|
|
122
|
-
*/
|
|
123
|
-
authorizedAmount?: number;
|
|
124
|
-
/**
|
|
125
|
-
* The captured amount of the transaction.
|
|
126
|
-
* @type {number}
|
|
127
|
-
* @memberof TransactionEntity
|
|
128
|
-
*/
|
|
129
|
-
capturedAmount?: number;
|
|
130
|
-
/**
|
|
131
|
-
* The settled amount of the transaction.
|
|
132
|
-
* @type {number}
|
|
133
|
-
* @memberof TransactionEntity
|
|
134
|
-
*/
|
|
135
|
-
settledAmount?: number;
|
|
136
|
-
/**
|
|
137
|
-
* The refundable amount of the transaction.
|
|
138
|
-
* @type {number}
|
|
139
|
-
* @memberof TransactionEntity
|
|
140
|
-
*/
|
|
141
|
-
refundableAmount?: number;
|
|
142
|
-
/**
|
|
143
|
-
* The refunded amount of the transaction.
|
|
144
|
-
* @type {number}
|
|
167
|
+
* The purchase order ID of the transaction.
|
|
168
|
+
* @type {string}
|
|
145
169
|
* @memberof TransactionEntity
|
|
146
170
|
*/
|
|
147
|
-
|
|
171
|
+
purchaseOrderId?: string;
|
|
148
172
|
/**
|
|
149
173
|
* The external transaction ID of the transaction.
|
|
150
174
|
* @type {string}
|
|
151
175
|
* @memberof TransactionEntity
|
|
152
176
|
*/
|
|
153
177
|
externalTransactionId?: string;
|
|
154
|
-
/**
|
|
155
|
-
* The country of the transaction.
|
|
156
|
-
* @type {string}
|
|
157
|
-
* @memberof TransactionEntity
|
|
158
|
-
*/
|
|
159
|
-
country?: string;
|
|
160
178
|
/**
|
|
161
179
|
* The external buyer ID of the transaction.
|
|
162
180
|
* @type {string}
|
|
@@ -169,6 +187,12 @@ export interface TransactionEntity {
|
|
|
169
187
|
* @memberof TransactionEntity
|
|
170
188
|
*/
|
|
171
189
|
buyerId?: string;
|
|
190
|
+
/**
|
|
191
|
+
* The customer reference ID of the transaction used by the gateway.
|
|
192
|
+
* @type {string}
|
|
193
|
+
* @memberof TransactionEntity
|
|
194
|
+
*/
|
|
195
|
+
customerRefId?: string;
|
|
172
196
|
/**
|
|
173
197
|
* The created date of the transaction.
|
|
174
198
|
* @type {Date}
|
|
@@ -86,8 +86,16 @@ export function TransactionEntityFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
86
86
|
'description': !exists(json, 'description') ? undefined : json['description'],
|
|
87
87
|
'amount': json['amount'],
|
|
88
88
|
'netAmount': json['netAmount'],
|
|
89
|
+
'salesTax': !exists(json, 'salesTax') ? undefined : json['salesTax'],
|
|
89
90
|
'fee': json['fee'],
|
|
90
91
|
'feeDetails': !exists(json, 'feeDetails') ? undefined : (json['feeDetails'].map(TransactionFeeDetailsEntityFromJSON)),
|
|
92
|
+
'authorizedAmount': !exists(json, 'authorizedAmount') ? undefined : json['authorizedAmount'],
|
|
93
|
+
'capturedAmount': !exists(json, 'capturedAmount') ? undefined : json['capturedAmount'],
|
|
94
|
+
'settledAmount': !exists(json, 'settledAmount') ? undefined : json['settledAmount'],
|
|
95
|
+
'refundableAmount': !exists(json, 'refundableAmount') ? undefined : json['refundableAmount'],
|
|
96
|
+
'voidedAmount': !exists(json, 'voidedAmount') ? undefined : json['voidedAmount'],
|
|
97
|
+
'refundedAmount': !exists(json, 'refundedAmount') ? undefined : json['refundedAmount'],
|
|
98
|
+
'country': !exists(json, 'country') ? undefined : json['country'],
|
|
91
99
|
'currency': !exists(json, 'currency') ? undefined : json['currency'],
|
|
92
100
|
'secCode': !exists(json, 'secCode') ? undefined : json['secCode'],
|
|
93
101
|
'paymentMethod': !exists(json, 'paymentMethod') ? undefined : TransactionPaymentInstrumentBaseEntityFromJSON(json['paymentMethod']),
|
|
@@ -96,15 +104,11 @@ export function TransactionEntityFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
96
104
|
'avsResponseCode': !exists(json, 'avsResponseCode') ? undefined : json['avsResponseCode'],
|
|
97
105
|
'cvvResponseCode': !exists(json, 'cvvResponseCode') ? undefined : json['cvvResponseCode'],
|
|
98
106
|
'authCode': !exists(json, 'authCode') ? undefined : json['authCode'],
|
|
99
|
-
'
|
|
100
|
-
'capturedAmount': !exists(json, 'capturedAmount') ? undefined : json['capturedAmount'],
|
|
101
|
-
'settledAmount': !exists(json, 'settledAmount') ? undefined : json['settledAmount'],
|
|
102
|
-
'refundableAmount': !exists(json, 'refundableAmount') ? undefined : json['refundableAmount'],
|
|
103
|
-
'refundedAmount': !exists(json, 'refundedAmount') ? undefined : json['refundedAmount'],
|
|
107
|
+
'purchaseOrderId': !exists(json, 'purchaseOrderId') ? undefined : json['purchaseOrderId'],
|
|
104
108
|
'externalTransactionId': !exists(json, 'externalTransactionId') ? undefined : json['externalTransactionId'],
|
|
105
|
-
'country': !exists(json, 'country') ? undefined : json['country'],
|
|
106
109
|
'externalBuyerId': !exists(json, 'externalBuyerId') ? undefined : json['externalBuyerId'],
|
|
107
110
|
'buyerId': !exists(json, 'buyerId') ? undefined : json['buyerId'],
|
|
111
|
+
'customerRefId': !exists(json, 'customerRefId') ? undefined : json['customerRefId'],
|
|
108
112
|
'createdAt': !exists(json, 'createdAt') ? undefined : (new Date(json['createdAt'])),
|
|
109
113
|
'updatedAt': !exists(json, 'updatedAt') ? undefined : (new Date(json['updatedAt'])),
|
|
110
114
|
'authorizedAt': !exists(json, 'authorizedAt') ? undefined : (new Date(json['authorizedAt'])),
|
|
@@ -136,8 +140,16 @@ export function TransactionEntityToJSON(value) {
|
|
|
136
140
|
'description': value.description,
|
|
137
141
|
'amount': value.amount,
|
|
138
142
|
'netAmount': value.netAmount,
|
|
143
|
+
'salesTax': value.salesTax,
|
|
139
144
|
'fee': value.fee,
|
|
140
145
|
'feeDetails': value.feeDetails === undefined ? undefined : (value.feeDetails.map(TransactionFeeDetailsEntityToJSON)),
|
|
146
|
+
'authorizedAmount': value.authorizedAmount,
|
|
147
|
+
'capturedAmount': value.capturedAmount,
|
|
148
|
+
'settledAmount': value.settledAmount,
|
|
149
|
+
'refundableAmount': value.refundableAmount,
|
|
150
|
+
'voidedAmount': value.voidedAmount,
|
|
151
|
+
'refundedAmount': value.refundedAmount,
|
|
152
|
+
'country': value.country,
|
|
141
153
|
'currency': value.currency,
|
|
142
154
|
'secCode': value.secCode,
|
|
143
155
|
'paymentMethod': TransactionPaymentInstrumentBaseEntityToJSON(value.paymentMethod),
|
|
@@ -146,15 +158,11 @@ export function TransactionEntityToJSON(value) {
|
|
|
146
158
|
'avsResponseCode': value.avsResponseCode,
|
|
147
159
|
'cvvResponseCode': value.cvvResponseCode,
|
|
148
160
|
'authCode': value.authCode,
|
|
149
|
-
'
|
|
150
|
-
'capturedAmount': value.capturedAmount,
|
|
151
|
-
'settledAmount': value.settledAmount,
|
|
152
|
-
'refundableAmount': value.refundableAmount,
|
|
153
|
-
'refundedAmount': value.refundedAmount,
|
|
161
|
+
'purchaseOrderId': value.purchaseOrderId,
|
|
154
162
|
'externalTransactionId': value.externalTransactionId,
|
|
155
|
-
'country': value.country,
|
|
156
163
|
'externalBuyerId': value.externalBuyerId,
|
|
157
164
|
'buyerId': value.buyerId,
|
|
165
|
+
'customerRefId': value.customerRefId,
|
|
158
166
|
'createdAt': value.createdAt === undefined ? undefined : (value.createdAt.toISOString()),
|
|
159
167
|
'updatedAt': value.updatedAt === undefined ? undefined : (value.updatedAt.toISOString()),
|
|
160
168
|
'authorizedAt': value.authorizedAt === undefined ? undefined : (value.authorizedAt.toISOString()),
|