@channelpayments/node-sdk 1.195.0 → 1.196.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/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/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/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/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/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/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
|
@@ -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,56 @@
|
|
|
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.instanceOfBillingDetailsDto1 = instanceOfBillingDetailsDto1;
|
|
12
|
+
exports.BillingDetailsDto1FromJSON = BillingDetailsDto1FromJSON;
|
|
13
|
+
exports.BillingDetailsDto1FromJSONTyped = BillingDetailsDto1FromJSONTyped;
|
|
14
|
+
exports.BillingDetailsDto1ToJSON = BillingDetailsDto1ToJSON;
|
|
15
|
+
const runtime_1 = require("../runtime");
|
|
16
|
+
const BillingAddressDto_1 = require("./BillingAddressDto");
|
|
17
|
+
/**
|
|
18
|
+
* Check if a given object implements the BillingDetailsDto1 interface.
|
|
19
|
+
*/
|
|
20
|
+
function instanceOfBillingDetailsDto1(value) {
|
|
21
|
+
let isInstance = true;
|
|
22
|
+
isInstance = isInstance && "billingAddress" in value;
|
|
23
|
+
isInstance = isInstance && "email" in value;
|
|
24
|
+
isInstance = isInstance && "givenName" in value;
|
|
25
|
+
isInstance = isInstance && "familyName" in value;
|
|
26
|
+
return isInstance;
|
|
27
|
+
}
|
|
28
|
+
function BillingDetailsDto1FromJSON(json) {
|
|
29
|
+
return BillingDetailsDto1FromJSONTyped(json, false);
|
|
30
|
+
}
|
|
31
|
+
function BillingDetailsDto1FromJSONTyped(json, ignoreDiscriminator) {
|
|
32
|
+
if ((json === undefined) || (json === null)) {
|
|
33
|
+
return json;
|
|
34
|
+
}
|
|
35
|
+
const typed = {
|
|
36
|
+
'billingAddress': (0, BillingAddressDto_1.BillingAddressDtoFromJSON)(json['billingAddress']),
|
|
37
|
+
'email': json['email'],
|
|
38
|
+
'givenName': json['givenName'],
|
|
39
|
+
'familyName': json['familyName'],
|
|
40
|
+
};
|
|
41
|
+
return (0, runtime_1.removeNullUndefined)(typed);
|
|
42
|
+
}
|
|
43
|
+
function BillingDetailsDto1ToJSON(value) {
|
|
44
|
+
if (value === undefined) {
|
|
45
|
+
return undefined;
|
|
46
|
+
}
|
|
47
|
+
if (value === null) {
|
|
48
|
+
return null;
|
|
49
|
+
}
|
|
50
|
+
return {
|
|
51
|
+
'billingAddress': (0, BillingAddressDto_1.BillingAddressDtoToJSON)(value.billingAddress),
|
|
52
|
+
'email': value.email,
|
|
53
|
+
'givenName': value.givenName,
|
|
54
|
+
'familyName': value.familyName,
|
|
55
|
+
};
|
|
56
|
+
}
|
|
@@ -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
|
|
@@ -14,6 +14,7 @@ exports.CreateCheckoutSessionPaymentMethodDtoFromJSON = CreateCheckoutSessionPay
|
|
|
14
14
|
exports.CreateCheckoutSessionPaymentMethodDtoFromJSONTyped = CreateCheckoutSessionPaymentMethodDtoFromJSONTyped;
|
|
15
15
|
exports.CreateCheckoutSessionPaymentMethodDtoToJSON = CreateCheckoutSessionPaymentMethodDtoToJSON;
|
|
16
16
|
const runtime_1 = require("../runtime");
|
|
17
|
+
const BillingDetailsDto1_1 = require("./BillingDetailsDto1");
|
|
17
18
|
/**
|
|
18
19
|
* @export
|
|
19
20
|
*/
|
|
@@ -54,6 +55,7 @@ function CreateCheckoutSessionPaymentMethodDtoFromJSONTyped(json, ignoreDiscrimi
|
|
|
54
55
|
'abaNumber': !(0, runtime_1.exists)(json, 'abaNumber') ? undefined : json['abaNumber'],
|
|
55
56
|
'accountNumber': !(0, runtime_1.exists)(json, 'accountNumber') ? undefined : json['accountNumber'],
|
|
56
57
|
'accountType': !(0, runtime_1.exists)(json, 'accountType') ? undefined : json['accountType'],
|
|
58
|
+
'billingDetails': !(0, runtime_1.exists)(json, 'billingDetails') ? undefined : (0, BillingDetailsDto1_1.BillingDetailsDto1FromJSON)(json['billingDetails']),
|
|
57
59
|
};
|
|
58
60
|
return (0, runtime_1.removeNullUndefined)(typed);
|
|
59
61
|
}
|
|
@@ -74,5 +76,6 @@ function CreateCheckoutSessionPaymentMethodDtoToJSON(value) {
|
|
|
74
76
|
'abaNumber': value.abaNumber,
|
|
75
77
|
'accountNumber': value.accountNumber,
|
|
76
78
|
'accountType': value.accountType,
|
|
79
|
+
'billingDetails': (0, BillingDetailsDto1_1.BillingDetailsDto1ToJSON)(value.billingDetails),
|
|
77
80
|
};
|
|
78
81
|
}
|
|
@@ -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
|
|
@@ -61,14 +61,17 @@ function CreateTransactionRequestDtoFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
61
61
|
}
|
|
62
62
|
const typed = {
|
|
63
63
|
'amount': json['amount'],
|
|
64
|
+
'salesTax': !(0, runtime_1.exists)(json, 'salesTax') ? undefined : json['salesTax'],
|
|
64
65
|
'currency': json['currency'],
|
|
65
66
|
'paymentMethod': (0, PaymentMethodDto_1.PaymentMethodDtoFromJSON)(json['paymentMethod']),
|
|
66
67
|
'intent': json['intent'],
|
|
67
68
|
'excludeCFee': !(0, runtime_1.exists)(json, 'excludeCFee') ? undefined : json['excludeCFee'],
|
|
68
69
|
'country': !(0, runtime_1.exists)(json, 'country') ? undefined : json['country'],
|
|
69
70
|
'externalTransactionId': !(0, runtime_1.exists)(json, 'externalTransactionId') ? undefined : json['externalTransactionId'],
|
|
71
|
+
'purchaseOrderId': !(0, runtime_1.exists)(json, 'purchaseOrderId') ? undefined : json['purchaseOrderId'],
|
|
70
72
|
'secCode': !(0, runtime_1.exists)(json, 'secCode') ? undefined : json['secCode'],
|
|
71
73
|
'tags': !(0, runtime_1.exists)(json, 'tags') ? undefined : (json['tags'].map(TagDto_1.TagDtoFromJSON)),
|
|
74
|
+
'description': !(0, runtime_1.exists)(json, 'description') ? undefined : json['description'],
|
|
72
75
|
};
|
|
73
76
|
return (0, runtime_1.removeNullUndefined)(typed);
|
|
74
77
|
}
|
|
@@ -81,13 +84,16 @@ function CreateTransactionRequestDtoToJSON(value) {
|
|
|
81
84
|
}
|
|
82
85
|
return {
|
|
83
86
|
'amount': value.amount,
|
|
87
|
+
'salesTax': value.salesTax,
|
|
84
88
|
'currency': value.currency,
|
|
85
89
|
'paymentMethod': (0, PaymentMethodDto_1.PaymentMethodDtoToJSON)(value.paymentMethod),
|
|
86
90
|
'intent': value.intent,
|
|
87
91
|
'excludeCFee': value.excludeCFee,
|
|
88
92
|
'country': value.country,
|
|
89
93
|
'externalTransactionId': value.externalTransactionId,
|
|
94
|
+
'purchaseOrderId': value.purchaseOrderId,
|
|
90
95
|
'secCode': value.secCode,
|
|
91
96
|
'tags': value.tags === undefined ? undefined : (value.tags.map(TagDto_1.TagDtoToJSON)),
|
|
97
|
+
'description': value.description,
|
|
92
98
|
};
|
|
93
99
|
}
|
|
@@ -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
|
|
@@ -14,6 +14,7 @@ exports.PaymentMethodDtoFromJSON = PaymentMethodDtoFromJSON;
|
|
|
14
14
|
exports.PaymentMethodDtoFromJSONTyped = PaymentMethodDtoFromJSONTyped;
|
|
15
15
|
exports.PaymentMethodDtoToJSON = PaymentMethodDtoToJSON;
|
|
16
16
|
const runtime_1 = require("../runtime");
|
|
17
|
+
const BillingDetailsDto1_1 = require("./BillingDetailsDto1");
|
|
17
18
|
/**
|
|
18
19
|
* @export
|
|
19
20
|
*/
|
|
@@ -57,6 +58,7 @@ function PaymentMethodDtoFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
57
58
|
'accountNumber': !(0, runtime_1.exists)(json, 'accountNumber') ? undefined : json['accountNumber'],
|
|
58
59
|
'accountType': !(0, runtime_1.exists)(json, 'accountType') ? undefined : json['accountType'],
|
|
59
60
|
'accountHolderName': !(0, runtime_1.exists)(json, 'accountHolderName') ? undefined : json['accountHolderName'],
|
|
61
|
+
'billingDetails': !(0, runtime_1.exists)(json, 'billingDetails') ? undefined : (0, BillingDetailsDto1_1.BillingDetailsDto1FromJSON)(json['billingDetails']),
|
|
60
62
|
};
|
|
61
63
|
return (0, runtime_1.removeNullUndefined)(typed);
|
|
62
64
|
}
|
|
@@ -80,5 +82,6 @@ function PaymentMethodDtoToJSON(value) {
|
|
|
80
82
|
'accountNumber': value.accountNumber,
|
|
81
83
|
'accountType': value.accountType,
|
|
82
84
|
'accountHolderName': value.accountHolderName,
|
|
85
|
+
'billingDetails': (0, BillingDetailsDto1_1.BillingDetailsDto1ToJSON)(value.billingDetails),
|
|
83
86
|
};
|
|
84
87
|
}
|
|
@@ -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}
|
|
@@ -93,8 +93,16 @@ function TransactionEntityFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
93
93
|
'description': !(0, runtime_1.exists)(json, 'description') ? undefined : json['description'],
|
|
94
94
|
'amount': json['amount'],
|
|
95
95
|
'netAmount': json['netAmount'],
|
|
96
|
+
'salesTax': !(0, runtime_1.exists)(json, 'salesTax') ? undefined : json['salesTax'],
|
|
96
97
|
'fee': json['fee'],
|
|
97
98
|
'feeDetails': !(0, runtime_1.exists)(json, 'feeDetails') ? undefined : (json['feeDetails'].map(TransactionFeeDetailsEntity_1.TransactionFeeDetailsEntityFromJSON)),
|
|
99
|
+
'authorizedAmount': !(0, runtime_1.exists)(json, 'authorizedAmount') ? undefined : json['authorizedAmount'],
|
|
100
|
+
'capturedAmount': !(0, runtime_1.exists)(json, 'capturedAmount') ? undefined : json['capturedAmount'],
|
|
101
|
+
'settledAmount': !(0, runtime_1.exists)(json, 'settledAmount') ? undefined : json['settledAmount'],
|
|
102
|
+
'refundableAmount': !(0, runtime_1.exists)(json, 'refundableAmount') ? undefined : json['refundableAmount'],
|
|
103
|
+
'voidedAmount': !(0, runtime_1.exists)(json, 'voidedAmount') ? undefined : json['voidedAmount'],
|
|
104
|
+
'refundedAmount': !(0, runtime_1.exists)(json, 'refundedAmount') ? undefined : json['refundedAmount'],
|
|
105
|
+
'country': !(0, runtime_1.exists)(json, 'country') ? undefined : json['country'],
|
|
98
106
|
'currency': !(0, runtime_1.exists)(json, 'currency') ? undefined : json['currency'],
|
|
99
107
|
'secCode': !(0, runtime_1.exists)(json, 'secCode') ? undefined : json['secCode'],
|
|
100
108
|
'paymentMethod': !(0, runtime_1.exists)(json, 'paymentMethod') ? undefined : (0, TransactionPaymentInstrumentBaseEntity_1.TransactionPaymentInstrumentBaseEntityFromJSON)(json['paymentMethod']),
|
|
@@ -103,15 +111,11 @@ function TransactionEntityFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
103
111
|
'avsResponseCode': !(0, runtime_1.exists)(json, 'avsResponseCode') ? undefined : json['avsResponseCode'],
|
|
104
112
|
'cvvResponseCode': !(0, runtime_1.exists)(json, 'cvvResponseCode') ? undefined : json['cvvResponseCode'],
|
|
105
113
|
'authCode': !(0, runtime_1.exists)(json, 'authCode') ? undefined : json['authCode'],
|
|
106
|
-
'
|
|
107
|
-
'capturedAmount': !(0, runtime_1.exists)(json, 'capturedAmount') ? undefined : json['capturedAmount'],
|
|
108
|
-
'settledAmount': !(0, runtime_1.exists)(json, 'settledAmount') ? undefined : json['settledAmount'],
|
|
109
|
-
'refundableAmount': !(0, runtime_1.exists)(json, 'refundableAmount') ? undefined : json['refundableAmount'],
|
|
110
|
-
'refundedAmount': !(0, runtime_1.exists)(json, 'refundedAmount') ? undefined : json['refundedAmount'],
|
|
114
|
+
'purchaseOrderId': !(0, runtime_1.exists)(json, 'purchaseOrderId') ? undefined : json['purchaseOrderId'],
|
|
111
115
|
'externalTransactionId': !(0, runtime_1.exists)(json, 'externalTransactionId') ? undefined : json['externalTransactionId'],
|
|
112
|
-
'country': !(0, runtime_1.exists)(json, 'country') ? undefined : json['country'],
|
|
113
116
|
'externalBuyerId': !(0, runtime_1.exists)(json, 'externalBuyerId') ? undefined : json['externalBuyerId'],
|
|
114
117
|
'buyerId': !(0, runtime_1.exists)(json, 'buyerId') ? undefined : json['buyerId'],
|
|
118
|
+
'customerRefId': !(0, runtime_1.exists)(json, 'customerRefId') ? undefined : json['customerRefId'],
|
|
115
119
|
'createdAt': !(0, runtime_1.exists)(json, 'createdAt') ? undefined : (new Date(json['createdAt'])),
|
|
116
120
|
'updatedAt': !(0, runtime_1.exists)(json, 'updatedAt') ? undefined : (new Date(json['updatedAt'])),
|
|
117
121
|
'authorizedAt': !(0, runtime_1.exists)(json, 'authorizedAt') ? undefined : (new Date(json['authorizedAt'])),
|
|
@@ -143,8 +147,16 @@ function TransactionEntityToJSON(value) {
|
|
|
143
147
|
'description': value.description,
|
|
144
148
|
'amount': value.amount,
|
|
145
149
|
'netAmount': value.netAmount,
|
|
150
|
+
'salesTax': value.salesTax,
|
|
146
151
|
'fee': value.fee,
|
|
147
152
|
'feeDetails': value.feeDetails === undefined ? undefined : (value.feeDetails.map(TransactionFeeDetailsEntity_1.TransactionFeeDetailsEntityToJSON)),
|
|
153
|
+
'authorizedAmount': value.authorizedAmount,
|
|
154
|
+
'capturedAmount': value.capturedAmount,
|
|
155
|
+
'settledAmount': value.settledAmount,
|
|
156
|
+
'refundableAmount': value.refundableAmount,
|
|
157
|
+
'voidedAmount': value.voidedAmount,
|
|
158
|
+
'refundedAmount': value.refundedAmount,
|
|
159
|
+
'country': value.country,
|
|
148
160
|
'currency': value.currency,
|
|
149
161
|
'secCode': value.secCode,
|
|
150
162
|
'paymentMethod': (0, TransactionPaymentInstrumentBaseEntity_1.TransactionPaymentInstrumentBaseEntityToJSON)(value.paymentMethod),
|
|
@@ -153,15 +165,11 @@ function TransactionEntityToJSON(value) {
|
|
|
153
165
|
'avsResponseCode': value.avsResponseCode,
|
|
154
166
|
'cvvResponseCode': value.cvvResponseCode,
|
|
155
167
|
'authCode': value.authCode,
|
|
156
|
-
'
|
|
157
|
-
'capturedAmount': value.capturedAmount,
|
|
158
|
-
'settledAmount': value.settledAmount,
|
|
159
|
-
'refundableAmount': value.refundableAmount,
|
|
160
|
-
'refundedAmount': value.refundedAmount,
|
|
168
|
+
'purchaseOrderId': value.purchaseOrderId,
|
|
161
169
|
'externalTransactionId': value.externalTransactionId,
|
|
162
|
-
'country': value.country,
|
|
163
170
|
'externalBuyerId': value.externalBuyerId,
|
|
164
171
|
'buyerId': value.buyerId,
|
|
172
|
+
'customerRefId': value.customerRefId,
|
|
165
173
|
'createdAt': value.createdAt === undefined ? undefined : (value.createdAt.toISOString()),
|
|
166
174
|
'updatedAt': value.updatedAt === undefined ? undefined : (value.updatedAt.toISOString()),
|
|
167
175
|
'authorizedAt': value.authorizedAt === undefined ? undefined : (value.authorizedAt.toISOString()),
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
export * from './AddressEntity';
|
|
2
|
-
export * from './AdminCreateTransactionRefundDto';
|
|
3
|
-
export * from './AdminVoidTransactionDto';
|
|
4
2
|
export * from './AuthorizedPaymentInstrumentsEntity';
|
|
5
3
|
export * from './AvailablePaymentMethodEntity';
|
|
6
4
|
export * from './BankDetailsServiceEntity';
|
|
7
5
|
export * from './BillingAddressDto';
|
|
8
6
|
export * from './BillingAddressEntity';
|
|
9
7
|
export * from './BillingDetailsDto';
|
|
8
|
+
export * from './BillingDetailsDto1';
|
|
10
9
|
export * from './BillingDetailsEntity';
|
|
11
10
|
export * from './BuyerEntity';
|
|
12
11
|
export * from './BuyersAddressEntity';
|
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.196.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
|
+
}
|
|
@@ -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
|