@channelpayments/node-sdk 1.182.0 → 1.184.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 +9 -1
- package/dist/cjs/apis/ChannelPaymentsApi.js +70 -0
- package/dist/cjs/models/BillingAddressDto.d.ts +56 -0
- package/dist/cjs/models/{BuyerAddressDto.js → BillingAddressDto.js} +16 -18
- package/dist/cjs/models/CheckoutSessionBaseEntity.d.ts +185 -0
- package/dist/cjs/models/CheckoutSessionBaseEntity.js +127 -0
- package/dist/cjs/models/CheckoutSessionEntity.d.ts +11 -5
- package/dist/cjs/models/CheckoutSessionEntity.js +4 -2
- package/dist/cjs/models/CheckoutSessionItemBaseEntity.d.ts +80 -0
- package/dist/cjs/models/CheckoutSessionItemBaseEntity.js +69 -0
- package/dist/cjs/models/CreateCheckoutSessionPaymentMethodDto.d.ts +12 -0
- package/dist/cjs/models/CreateCheckoutSessionPaymentMethodDto.js +4 -0
- package/dist/cjs/models/CreateCheckoutSessionTransactionDto.d.ts +4 -4
- package/dist/cjs/models/CreateCheckoutSessionTransactionDto.js +4 -4
- package/dist/cjs/models/FeeDetailsEntity.d.ts +53 -0
- package/dist/cjs/models/FeeDetailsEntity.js +66 -0
- package/dist/cjs/models/MerchantFeeDetailsEntity.d.ts +39 -0
- package/dist/cjs/models/MerchantFeeDetailsEntity.js +53 -0
- package/dist/cjs/models/PaymentMethodFeeDetailsEntity.d.ts +54 -0
- package/dist/cjs/models/PaymentMethodFeeDetailsEntity.js +65 -0
- package/dist/cjs/models/TransactionEntity.d.ts +3 -9
- package/dist/cjs/models/TransactionEntity.js +3 -5
- package/dist/cjs/models/TransactionPaymentInstrumentBaseEntity.d.ts +136 -0
- package/dist/cjs/models/{PaymentMethodBaseEntity.js → TransactionPaymentInstrumentBaseEntity.js} +14 -14
- package/dist/cjs/models/index.d.ts +7 -2
- package/dist/cjs/models/index.js +7 -2
- package/dist/cjs/runtime.js +1 -1
- package/dist/mjs/apis/ChannelPaymentsApi.d.ts +9 -1
- package/dist/mjs/apis/ChannelPaymentsApi.js +69 -1
- package/dist/mjs/models/BillingAddressDto.d.ts +56 -0
- package/dist/mjs/models/{BuyerAddressDto.js → BillingAddressDto.js} +12 -14
- package/dist/mjs/models/CheckoutSessionBaseEntity.d.ts +185 -0
- package/dist/mjs/models/CheckoutSessionBaseEntity.js +120 -0
- package/dist/mjs/models/CheckoutSessionEntity.d.ts +11 -5
- package/dist/mjs/models/CheckoutSessionEntity.js +4 -2
- package/dist/mjs/models/CheckoutSessionItemBaseEntity.d.ts +80 -0
- package/dist/mjs/models/CheckoutSessionItemBaseEntity.js +63 -0
- package/dist/mjs/models/CreateCheckoutSessionPaymentMethodDto.d.ts +12 -0
- package/dist/mjs/models/CreateCheckoutSessionPaymentMethodDto.js +4 -0
- package/dist/mjs/models/CreateCheckoutSessionTransactionDto.d.ts +4 -4
- package/dist/mjs/models/CreateCheckoutSessionTransactionDto.js +4 -4
- package/dist/mjs/models/FeeDetailsEntity.d.ts +53 -0
- package/dist/mjs/models/FeeDetailsEntity.js +59 -0
- package/dist/mjs/models/MerchantFeeDetailsEntity.d.ts +39 -0
- package/dist/mjs/models/MerchantFeeDetailsEntity.js +47 -0
- package/dist/mjs/models/PaymentMethodFeeDetailsEntity.d.ts +54 -0
- package/dist/mjs/models/PaymentMethodFeeDetailsEntity.js +58 -0
- package/dist/mjs/models/TransactionEntity.d.ts +3 -9
- package/dist/mjs/models/TransactionEntity.js +3 -5
- package/dist/mjs/models/TransactionPaymentInstrumentBaseEntity.d.ts +136 -0
- package/dist/mjs/models/{PaymentMethodBaseEntity.js → TransactionPaymentInstrumentBaseEntity.js} +9 -9
- package/dist/mjs/models/index.d.ts +7 -2
- package/dist/mjs/models/index.js +7 -2
- package/dist/mjs/runtime.js +1 -1
- package/package.json +1 -1
- package/dist/cjs/models/BuyerAddressDto.d.ts +0 -56
- package/dist/cjs/models/PaymentMethodBaseEntity.d.ts +0 -136
- package/dist/mjs/models/BuyerAddressDto.d.ts +0 -56
- package/dist/mjs/models/PaymentMethodBaseEntity.d.ts +0 -136
|
@@ -0,0 +1,59 @@
|
|
|
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
|
+
* @export
|
|
12
|
+
*/
|
|
13
|
+
export const FeeDetailsEntityTypeEnum = {
|
|
14
|
+
ConvenienceFee: 'CONVENIENCE_FEE'
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* @export
|
|
18
|
+
*/
|
|
19
|
+
export const FeeDetailsEntityChargeTypeEnum = {
|
|
20
|
+
IncludedInAmount: 'INCLUDED_IN_AMOUNT',
|
|
21
|
+
ChargedSeparately: 'CHARGED_SEPARATELY'
|
|
22
|
+
};
|
|
23
|
+
/**
|
|
24
|
+
* Check if a given object implements the FeeDetailsEntity interface.
|
|
25
|
+
*/
|
|
26
|
+
export function instanceOfFeeDetailsEntity(value) {
|
|
27
|
+
let isInstance = true;
|
|
28
|
+
isInstance = isInstance && "type" in value;
|
|
29
|
+
isInstance = isInstance && "chargeType" in value;
|
|
30
|
+
isInstance = isInstance && "amount" in value;
|
|
31
|
+
return isInstance;
|
|
32
|
+
}
|
|
33
|
+
export function FeeDetailsEntityFromJSON(json) {
|
|
34
|
+
return FeeDetailsEntityFromJSONTyped(json, false);
|
|
35
|
+
}
|
|
36
|
+
export function FeeDetailsEntityFromJSONTyped(json, ignoreDiscriminator) {
|
|
37
|
+
if ((json === undefined) || (json === null)) {
|
|
38
|
+
return json;
|
|
39
|
+
}
|
|
40
|
+
const typed = {
|
|
41
|
+
'type': json['type'],
|
|
42
|
+
'chargeType': json['chargeType'],
|
|
43
|
+
'amount': json['amount'],
|
|
44
|
+
};
|
|
45
|
+
return removeNullUndefined(typed);
|
|
46
|
+
}
|
|
47
|
+
export function FeeDetailsEntityToJSON(value) {
|
|
48
|
+
if (value === undefined) {
|
|
49
|
+
return undefined;
|
|
50
|
+
}
|
|
51
|
+
if (value === null) {
|
|
52
|
+
return null;
|
|
53
|
+
}
|
|
54
|
+
return {
|
|
55
|
+
'type': value.type,
|
|
56
|
+
'chargeType': value.chargeType,
|
|
57
|
+
'amount': value.amount,
|
|
58
|
+
};
|
|
59
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Channel Payments API
|
|
3
|
+
*
|
|
4
|
+
* NOTE: This class is auto generated. Do not edit the class manually.
|
|
5
|
+
*
|
|
6
|
+
*/
|
|
7
|
+
import type { PaymentMethodFeeDetailsEntity } from './PaymentMethodFeeDetailsEntity';
|
|
8
|
+
/**
|
|
9
|
+
*
|
|
10
|
+
* @export
|
|
11
|
+
* @interface MerchantFeeDetailsEntity
|
|
12
|
+
*/
|
|
13
|
+
export interface MerchantFeeDetailsEntity {
|
|
14
|
+
/**
|
|
15
|
+
* The ID of the merchant.
|
|
16
|
+
* @type {string}
|
|
17
|
+
* @memberof MerchantFeeDetailsEntity
|
|
18
|
+
*/
|
|
19
|
+
merchantId: string;
|
|
20
|
+
/**
|
|
21
|
+
* The merchant specified total of the transaction.
|
|
22
|
+
* @type {string}
|
|
23
|
+
* @memberof MerchantFeeDetailsEntity
|
|
24
|
+
*/
|
|
25
|
+
subtotal: string;
|
|
26
|
+
/**
|
|
27
|
+
* The details of the payment method fees.
|
|
28
|
+
* @type {Array<PaymentMethodFeeDetailsEntity>}
|
|
29
|
+
* @memberof MerchantFeeDetailsEntity
|
|
30
|
+
*/
|
|
31
|
+
feeDetails: Array<PaymentMethodFeeDetailsEntity>;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Check if a given object implements the MerchantFeeDetailsEntity interface.
|
|
35
|
+
*/
|
|
36
|
+
export declare function instanceOfMerchantFeeDetailsEntity(value: object): boolean;
|
|
37
|
+
export declare function MerchantFeeDetailsEntityFromJSON(json: any): MerchantFeeDetailsEntity;
|
|
38
|
+
export declare function MerchantFeeDetailsEntityFromJSONTyped(json: any, ignoreDiscriminator: boolean): MerchantFeeDetailsEntity;
|
|
39
|
+
export declare function MerchantFeeDetailsEntityToJSON(value?: MerchantFeeDetailsEntity | null): any;
|
|
@@ -0,0 +1,47 @@
|
|
|
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 { PaymentMethodFeeDetailsEntityFromJSON, PaymentMethodFeeDetailsEntityToJSON, } from './PaymentMethodFeeDetailsEntity';
|
|
11
|
+
/**
|
|
12
|
+
* Check if a given object implements the MerchantFeeDetailsEntity interface.
|
|
13
|
+
*/
|
|
14
|
+
export function instanceOfMerchantFeeDetailsEntity(value) {
|
|
15
|
+
let isInstance = true;
|
|
16
|
+
isInstance = isInstance && "merchantId" in value;
|
|
17
|
+
isInstance = isInstance && "subtotal" in value;
|
|
18
|
+
isInstance = isInstance && "feeDetails" in value;
|
|
19
|
+
return isInstance;
|
|
20
|
+
}
|
|
21
|
+
export function MerchantFeeDetailsEntityFromJSON(json) {
|
|
22
|
+
return MerchantFeeDetailsEntityFromJSONTyped(json, false);
|
|
23
|
+
}
|
|
24
|
+
export function MerchantFeeDetailsEntityFromJSONTyped(json, ignoreDiscriminator) {
|
|
25
|
+
if ((json === undefined) || (json === null)) {
|
|
26
|
+
return json;
|
|
27
|
+
}
|
|
28
|
+
const typed = {
|
|
29
|
+
'merchantId': json['merchantId'],
|
|
30
|
+
'subtotal': json['subtotal'],
|
|
31
|
+
'feeDetails': (json['feeDetails'].map(PaymentMethodFeeDetailsEntityFromJSON)),
|
|
32
|
+
};
|
|
33
|
+
return removeNullUndefined(typed);
|
|
34
|
+
}
|
|
35
|
+
export function MerchantFeeDetailsEntityToJSON(value) {
|
|
36
|
+
if (value === undefined) {
|
|
37
|
+
return undefined;
|
|
38
|
+
}
|
|
39
|
+
if (value === null) {
|
|
40
|
+
return null;
|
|
41
|
+
}
|
|
42
|
+
return {
|
|
43
|
+
'merchantId': value.merchantId,
|
|
44
|
+
'subtotal': value.subtotal,
|
|
45
|
+
'feeDetails': (value.feeDetails.map(PaymentMethodFeeDetailsEntityToJSON)),
|
|
46
|
+
};
|
|
47
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Channel Payments API
|
|
3
|
+
*
|
|
4
|
+
* NOTE: This class is auto generated. Do not edit the class manually.
|
|
5
|
+
*
|
|
6
|
+
*/
|
|
7
|
+
import type { FeeDetailsEntity } from './FeeDetailsEntity';
|
|
8
|
+
/**
|
|
9
|
+
*
|
|
10
|
+
* @export
|
|
11
|
+
* @interface PaymentMethodFeeDetailsEntity
|
|
12
|
+
*/
|
|
13
|
+
export interface PaymentMethodFeeDetailsEntity {
|
|
14
|
+
/**
|
|
15
|
+
* The payment method used for the transaction fee calculation.
|
|
16
|
+
* @type {string}
|
|
17
|
+
* @memberof PaymentMethodFeeDetailsEntity
|
|
18
|
+
*/
|
|
19
|
+
method: PaymentMethodFeeDetailsEntityMethodEnum;
|
|
20
|
+
/**
|
|
21
|
+
* The details of the transaction fees.
|
|
22
|
+
* @type {Array<FeeDetailsEntity>}
|
|
23
|
+
* @memberof PaymentMethodFeeDetailsEntity
|
|
24
|
+
*/
|
|
25
|
+
fees: Array<FeeDetailsEntity>;
|
|
26
|
+
/**
|
|
27
|
+
* The total amount of fees applied.
|
|
28
|
+
* @type {number}
|
|
29
|
+
* @memberof PaymentMethodFeeDetailsEntity
|
|
30
|
+
*/
|
|
31
|
+
feesTotal: number;
|
|
32
|
+
/**
|
|
33
|
+
* The adjusted total after applying the fees.
|
|
34
|
+
* @type {number}
|
|
35
|
+
* @memberof PaymentMethodFeeDetailsEntity
|
|
36
|
+
*/
|
|
37
|
+
adjustedTotal: number;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* @export
|
|
41
|
+
*/
|
|
42
|
+
export declare const PaymentMethodFeeDetailsEntityMethodEnum: {
|
|
43
|
+
readonly Ach: "ACH";
|
|
44
|
+
readonly Bank: "BANK";
|
|
45
|
+
readonly Card: "CARD";
|
|
46
|
+
};
|
|
47
|
+
export type PaymentMethodFeeDetailsEntityMethodEnum = typeof PaymentMethodFeeDetailsEntityMethodEnum[keyof typeof PaymentMethodFeeDetailsEntityMethodEnum];
|
|
48
|
+
/**
|
|
49
|
+
* Check if a given object implements the PaymentMethodFeeDetailsEntity interface.
|
|
50
|
+
*/
|
|
51
|
+
export declare function instanceOfPaymentMethodFeeDetailsEntity(value: object): boolean;
|
|
52
|
+
export declare function PaymentMethodFeeDetailsEntityFromJSON(json: any): PaymentMethodFeeDetailsEntity;
|
|
53
|
+
export declare function PaymentMethodFeeDetailsEntityFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaymentMethodFeeDetailsEntity;
|
|
54
|
+
export declare function PaymentMethodFeeDetailsEntityToJSON(value?: PaymentMethodFeeDetailsEntity | null): any;
|
|
@@ -0,0 +1,58 @@
|
|
|
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 { FeeDetailsEntityFromJSON, FeeDetailsEntityToJSON, } from './FeeDetailsEntity';
|
|
11
|
+
/**
|
|
12
|
+
* @export
|
|
13
|
+
*/
|
|
14
|
+
export const PaymentMethodFeeDetailsEntityMethodEnum = {
|
|
15
|
+
Ach: 'ACH',
|
|
16
|
+
Bank: 'BANK',
|
|
17
|
+
Card: 'CARD'
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* Check if a given object implements the PaymentMethodFeeDetailsEntity interface.
|
|
21
|
+
*/
|
|
22
|
+
export function instanceOfPaymentMethodFeeDetailsEntity(value) {
|
|
23
|
+
let isInstance = true;
|
|
24
|
+
isInstance = isInstance && "method" in value;
|
|
25
|
+
isInstance = isInstance && "fees" in value;
|
|
26
|
+
isInstance = isInstance && "feesTotal" in value;
|
|
27
|
+
isInstance = isInstance && "adjustedTotal" in value;
|
|
28
|
+
return isInstance;
|
|
29
|
+
}
|
|
30
|
+
export function PaymentMethodFeeDetailsEntityFromJSON(json) {
|
|
31
|
+
return PaymentMethodFeeDetailsEntityFromJSONTyped(json, false);
|
|
32
|
+
}
|
|
33
|
+
export function PaymentMethodFeeDetailsEntityFromJSONTyped(json, ignoreDiscriminator) {
|
|
34
|
+
if ((json === undefined) || (json === null)) {
|
|
35
|
+
return json;
|
|
36
|
+
}
|
|
37
|
+
const typed = {
|
|
38
|
+
'method': json['method'],
|
|
39
|
+
'fees': (json['fees'].map(FeeDetailsEntityFromJSON)),
|
|
40
|
+
'feesTotal': json['feesTotal'],
|
|
41
|
+
'adjustedTotal': json['adjustedTotal'],
|
|
42
|
+
};
|
|
43
|
+
return removeNullUndefined(typed);
|
|
44
|
+
}
|
|
45
|
+
export function PaymentMethodFeeDetailsEntityToJSON(value) {
|
|
46
|
+
if (value === undefined) {
|
|
47
|
+
return undefined;
|
|
48
|
+
}
|
|
49
|
+
if (value === null) {
|
|
50
|
+
return null;
|
|
51
|
+
}
|
|
52
|
+
return {
|
|
53
|
+
'method': value.method,
|
|
54
|
+
'fees': (value.fees.map(FeeDetailsEntityToJSON)),
|
|
55
|
+
'feesTotal': value.feesTotal,
|
|
56
|
+
'adjustedTotal': value.adjustedTotal,
|
|
57
|
+
};
|
|
58
|
+
}
|
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
* NOTE: This class is auto generated. Do not edit the class manually.
|
|
5
5
|
*
|
|
6
6
|
*/
|
|
7
|
-
import type { PaymentMethodBaseEntity } from './PaymentMethodBaseEntity';
|
|
8
7
|
import type { TagEntity } from './TagEntity';
|
|
9
8
|
import type { TransactionFeeDetailsEntity } from './TransactionFeeDetailsEntity';
|
|
9
|
+
import type { TransactionPaymentInstrumentBaseEntity } from './TransactionPaymentInstrumentBaseEntity';
|
|
10
10
|
/**
|
|
11
11
|
*
|
|
12
12
|
* @export
|
|
@@ -81,10 +81,10 @@ export interface TransactionEntity {
|
|
|
81
81
|
secCode?: TransactionEntitySecCodeEnum;
|
|
82
82
|
/**
|
|
83
83
|
* The payment method of the transaction.
|
|
84
|
-
* @type {
|
|
84
|
+
* @type {TransactionPaymentInstrumentBaseEntity}
|
|
85
85
|
* @memberof TransactionEntity
|
|
86
86
|
*/
|
|
87
|
-
paymentMethod?:
|
|
87
|
+
paymentMethod?: TransactionPaymentInstrumentBaseEntity;
|
|
88
88
|
/**
|
|
89
89
|
* The raw response code of the transaction.
|
|
90
90
|
* @type {string}
|
|
@@ -247,12 +247,6 @@ export interface TransactionEntity {
|
|
|
247
247
|
* @memberof TransactionEntity
|
|
248
248
|
*/
|
|
249
249
|
tags?: Array<TagEntity>;
|
|
250
|
-
/**
|
|
251
|
-
*
|
|
252
|
-
* @type {string}
|
|
253
|
-
* @memberof TransactionEntity
|
|
254
|
-
*/
|
|
255
|
-
declineReason?: string;
|
|
256
250
|
}
|
|
257
251
|
/**
|
|
258
252
|
* @export
|
|
@@ -7,9 +7,9 @@
|
|
|
7
7
|
*
|
|
8
8
|
*/
|
|
9
9
|
import { exists, removeNullUndefined } from '../runtime';
|
|
10
|
-
import { PaymentMethodBaseEntityFromJSON, PaymentMethodBaseEntityToJSON, } from './PaymentMethodBaseEntity';
|
|
11
10
|
import { TagEntityFromJSON, TagEntityToJSON, } from './TagEntity';
|
|
12
11
|
import { TransactionFeeDetailsEntityFromJSON, TransactionFeeDetailsEntityToJSON, } from './TransactionFeeDetailsEntity';
|
|
12
|
+
import { TransactionPaymentInstrumentBaseEntityFromJSON, TransactionPaymentInstrumentBaseEntityToJSON, } from './TransactionPaymentInstrumentBaseEntity';
|
|
13
13
|
/**
|
|
14
14
|
* @export
|
|
15
15
|
*/
|
|
@@ -90,7 +90,7 @@ export function TransactionEntityFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
90
90
|
'feeDetails': !exists(json, 'feeDetails') ? undefined : (json['feeDetails'].map(TransactionFeeDetailsEntityFromJSON)),
|
|
91
91
|
'currency': !exists(json, 'currency') ? undefined : json['currency'],
|
|
92
92
|
'secCode': !exists(json, 'secCode') ? undefined : json['secCode'],
|
|
93
|
-
'paymentMethod': !exists(json, 'paymentMethod') ? undefined :
|
|
93
|
+
'paymentMethod': !exists(json, 'paymentMethod') ? undefined : TransactionPaymentInstrumentBaseEntityFromJSON(json['paymentMethod']),
|
|
94
94
|
'rawResponseCode': !exists(json, 'rawResponseCode') ? undefined : json['rawResponseCode'],
|
|
95
95
|
'rawResponseDescription': !exists(json, 'rawResponseDescription') ? undefined : json['rawResponseDescription'],
|
|
96
96
|
'avsResponseCode': !exists(json, 'avsResponseCode') ? undefined : json['avsResponseCode'],
|
|
@@ -118,7 +118,6 @@ export function TransactionEntityFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
118
118
|
'settledAt': !exists(json, 'settledAt') ? undefined : (new Date(json['settledAt'])),
|
|
119
119
|
'returnedAt': !exists(json, 'returnedAt') ? undefined : (new Date(json['returnedAt'])),
|
|
120
120
|
'tags': !exists(json, 'tags') ? undefined : (json['tags'].map(TagEntityFromJSON)),
|
|
121
|
-
'declineReason': !exists(json, 'declineReason') ? undefined : json['declineReason'],
|
|
122
121
|
};
|
|
123
122
|
return removeNullUndefined(typed);
|
|
124
123
|
}
|
|
@@ -141,7 +140,7 @@ export function TransactionEntityToJSON(value) {
|
|
|
141
140
|
'feeDetails': value.feeDetails === undefined ? undefined : (value.feeDetails.map(TransactionFeeDetailsEntityToJSON)),
|
|
142
141
|
'currency': value.currency,
|
|
143
142
|
'secCode': value.secCode,
|
|
144
|
-
'paymentMethod':
|
|
143
|
+
'paymentMethod': TransactionPaymentInstrumentBaseEntityToJSON(value.paymentMethod),
|
|
145
144
|
'rawResponseCode': value.rawResponseCode,
|
|
146
145
|
'rawResponseDescription': value.rawResponseDescription,
|
|
147
146
|
'avsResponseCode': value.avsResponseCode,
|
|
@@ -169,6 +168,5 @@ export function TransactionEntityToJSON(value) {
|
|
|
169
168
|
'settledAt': value.settledAt === undefined ? undefined : (value.settledAt.toISOString()),
|
|
170
169
|
'returnedAt': value.returnedAt === undefined ? undefined : (value.returnedAt.toISOString()),
|
|
171
170
|
'tags': value.tags === undefined ? undefined : (value.tags.map(TagEntityToJSON)),
|
|
172
|
-
'declineReason': value.declineReason,
|
|
173
171
|
};
|
|
174
172
|
}
|
|
@@ -0,0 +1,136 @@
|
|
|
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 TransactionPaymentInstrumentBaseEntity
|
|
11
|
+
*/
|
|
12
|
+
export interface TransactionPaymentInstrumentBaseEntity {
|
|
13
|
+
/**
|
|
14
|
+
* The unique identifier of the payment method.
|
|
15
|
+
* @type {string}
|
|
16
|
+
* @memberof TransactionPaymentInstrumentBaseEntity
|
|
17
|
+
*/
|
|
18
|
+
paymentMethodId: string;
|
|
19
|
+
/**
|
|
20
|
+
* The method for the payment method.
|
|
21
|
+
* @type {string}
|
|
22
|
+
* @memberof TransactionPaymentInstrumentBaseEntity
|
|
23
|
+
*/
|
|
24
|
+
method: TransactionPaymentInstrumentBaseEntityMethodEnum;
|
|
25
|
+
/**
|
|
26
|
+
* The unique identifier of the external payment method.
|
|
27
|
+
* @type {string}
|
|
28
|
+
* @memberof TransactionPaymentInstrumentBaseEntity
|
|
29
|
+
*/
|
|
30
|
+
externalPaymentMethodId?: string;
|
|
31
|
+
/**
|
|
32
|
+
* The label of the payment method.
|
|
33
|
+
* @type {string}
|
|
34
|
+
* @memberof TransactionPaymentInstrumentBaseEntity
|
|
35
|
+
*/
|
|
36
|
+
label?: string;
|
|
37
|
+
/**
|
|
38
|
+
* The scheme of the payment method.
|
|
39
|
+
* @type {string}
|
|
40
|
+
* @memberof TransactionPaymentInstrumentBaseEntity
|
|
41
|
+
*/
|
|
42
|
+
scheme?: string;
|
|
43
|
+
/**
|
|
44
|
+
* The expiration date of the payment method.
|
|
45
|
+
* @type {string}
|
|
46
|
+
* @memberof TransactionPaymentInstrumentBaseEntity
|
|
47
|
+
*/
|
|
48
|
+
expirationDate?: string;
|
|
49
|
+
/**
|
|
50
|
+
* The currency of the payment method.
|
|
51
|
+
* @type {string}
|
|
52
|
+
* @memberof TransactionPaymentInstrumentBaseEntity
|
|
53
|
+
*/
|
|
54
|
+
currency?: string;
|
|
55
|
+
/**
|
|
56
|
+
* The country of the payment method.
|
|
57
|
+
* @type {string}
|
|
58
|
+
* @memberof TransactionPaymentInstrumentBaseEntity
|
|
59
|
+
*/
|
|
60
|
+
country?: string;
|
|
61
|
+
/**
|
|
62
|
+
* The bin of the payment method.
|
|
63
|
+
* @type {string}
|
|
64
|
+
* @memberof TransactionPaymentInstrumentBaseEntity
|
|
65
|
+
*/
|
|
66
|
+
bin?: string;
|
|
67
|
+
/**
|
|
68
|
+
* The card type of the payment method.
|
|
69
|
+
* @type {string}
|
|
70
|
+
* @memberof TransactionPaymentInstrumentBaseEntity
|
|
71
|
+
*/
|
|
72
|
+
cardType?: TransactionPaymentInstrumentBaseEntityCardTypeEnum;
|
|
73
|
+
/**
|
|
74
|
+
* The account holder name of the payment method.
|
|
75
|
+
* @type {string}
|
|
76
|
+
* @memberof TransactionPaymentInstrumentBaseEntity
|
|
77
|
+
*/
|
|
78
|
+
accountHolderName?: string;
|
|
79
|
+
/**
|
|
80
|
+
* The account number of the payment method.
|
|
81
|
+
* @type {string}
|
|
82
|
+
* @memberof TransactionPaymentInstrumentBaseEntity
|
|
83
|
+
*/
|
|
84
|
+
accountNumber?: string;
|
|
85
|
+
/**
|
|
86
|
+
* The last 4 digits of the bank account.
|
|
87
|
+
* @type {string}
|
|
88
|
+
* @memberof TransactionPaymentInstrumentBaseEntity
|
|
89
|
+
*/
|
|
90
|
+
accountEnding?: string;
|
|
91
|
+
/**
|
|
92
|
+
* The account type of the payment method.
|
|
93
|
+
* @type {string}
|
|
94
|
+
* @memberof TransactionPaymentInstrumentBaseEntity
|
|
95
|
+
*/
|
|
96
|
+
accountType?: TransactionPaymentInstrumentBaseEntityAccountTypeEnum;
|
|
97
|
+
/**
|
|
98
|
+
* The aba number of the payment method.
|
|
99
|
+
* @type {string}
|
|
100
|
+
* @memberof TransactionPaymentInstrumentBaseEntity
|
|
101
|
+
*/
|
|
102
|
+
abaNumber?: string;
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* @export
|
|
106
|
+
*/
|
|
107
|
+
export declare const TransactionPaymentInstrumentBaseEntityMethodEnum: {
|
|
108
|
+
readonly Ach: "ACH";
|
|
109
|
+
readonly Bank: "BANK";
|
|
110
|
+
readonly Card: "CARD";
|
|
111
|
+
};
|
|
112
|
+
export type TransactionPaymentInstrumentBaseEntityMethodEnum = typeof TransactionPaymentInstrumentBaseEntityMethodEnum[keyof typeof TransactionPaymentInstrumentBaseEntityMethodEnum];
|
|
113
|
+
/**
|
|
114
|
+
* @export
|
|
115
|
+
*/
|
|
116
|
+
export declare const TransactionPaymentInstrumentBaseEntityCardTypeEnum: {
|
|
117
|
+
readonly Credit: "CREDIT";
|
|
118
|
+
readonly Debit: "DEBIT";
|
|
119
|
+
readonly Prepaid: "PREPAID";
|
|
120
|
+
};
|
|
121
|
+
export type TransactionPaymentInstrumentBaseEntityCardTypeEnum = typeof TransactionPaymentInstrumentBaseEntityCardTypeEnum[keyof typeof TransactionPaymentInstrumentBaseEntityCardTypeEnum];
|
|
122
|
+
/**
|
|
123
|
+
* @export
|
|
124
|
+
*/
|
|
125
|
+
export declare const TransactionPaymentInstrumentBaseEntityAccountTypeEnum: {
|
|
126
|
+
readonly Checking: "CHECKING";
|
|
127
|
+
readonly Savings: "SAVINGS";
|
|
128
|
+
};
|
|
129
|
+
export type TransactionPaymentInstrumentBaseEntityAccountTypeEnum = typeof TransactionPaymentInstrumentBaseEntityAccountTypeEnum[keyof typeof TransactionPaymentInstrumentBaseEntityAccountTypeEnum];
|
|
130
|
+
/**
|
|
131
|
+
* Check if a given object implements the TransactionPaymentInstrumentBaseEntity interface.
|
|
132
|
+
*/
|
|
133
|
+
export declare function instanceOfTransactionPaymentInstrumentBaseEntity(value: object): boolean;
|
|
134
|
+
export declare function TransactionPaymentInstrumentBaseEntityFromJSON(json: any): TransactionPaymentInstrumentBaseEntity;
|
|
135
|
+
export declare function TransactionPaymentInstrumentBaseEntityFromJSONTyped(json: any, ignoreDiscriminator: boolean): TransactionPaymentInstrumentBaseEntity;
|
|
136
|
+
export declare function TransactionPaymentInstrumentBaseEntityToJSON(value?: TransactionPaymentInstrumentBaseEntity | null): any;
|
package/dist/mjs/models/{PaymentMethodBaseEntity.js → TransactionPaymentInstrumentBaseEntity.js}
RENAMED
|
@@ -10,7 +10,7 @@ import { exists, removeNullUndefined } from '../runtime';
|
|
|
10
10
|
/**
|
|
11
11
|
* @export
|
|
12
12
|
*/
|
|
13
|
-
export const
|
|
13
|
+
export const TransactionPaymentInstrumentBaseEntityMethodEnum = {
|
|
14
14
|
Ach: 'ACH',
|
|
15
15
|
Bank: 'BANK',
|
|
16
16
|
Card: 'CARD'
|
|
@@ -18,7 +18,7 @@ export const PaymentMethodBaseEntityMethodEnum = {
|
|
|
18
18
|
/**
|
|
19
19
|
* @export
|
|
20
20
|
*/
|
|
21
|
-
export const
|
|
21
|
+
export const TransactionPaymentInstrumentBaseEntityCardTypeEnum = {
|
|
22
22
|
Credit: 'CREDIT',
|
|
23
23
|
Debit: 'DEBIT',
|
|
24
24
|
Prepaid: 'PREPAID'
|
|
@@ -26,23 +26,23 @@ export const PaymentMethodBaseEntityCardTypeEnum = {
|
|
|
26
26
|
/**
|
|
27
27
|
* @export
|
|
28
28
|
*/
|
|
29
|
-
export const
|
|
29
|
+
export const TransactionPaymentInstrumentBaseEntityAccountTypeEnum = {
|
|
30
30
|
Checking: 'CHECKING',
|
|
31
31
|
Savings: 'SAVINGS'
|
|
32
32
|
};
|
|
33
33
|
/**
|
|
34
|
-
* Check if a given object implements the
|
|
34
|
+
* Check if a given object implements the TransactionPaymentInstrumentBaseEntity interface.
|
|
35
35
|
*/
|
|
36
|
-
export function
|
|
36
|
+
export function instanceOfTransactionPaymentInstrumentBaseEntity(value) {
|
|
37
37
|
let isInstance = true;
|
|
38
38
|
isInstance = isInstance && "paymentMethodId" in value;
|
|
39
39
|
isInstance = isInstance && "method" in value;
|
|
40
40
|
return isInstance;
|
|
41
41
|
}
|
|
42
|
-
export function
|
|
43
|
-
return
|
|
42
|
+
export function TransactionPaymentInstrumentBaseEntityFromJSON(json) {
|
|
43
|
+
return TransactionPaymentInstrumentBaseEntityFromJSONTyped(json, false);
|
|
44
44
|
}
|
|
45
|
-
export function
|
|
45
|
+
export function TransactionPaymentInstrumentBaseEntityFromJSONTyped(json, ignoreDiscriminator) {
|
|
46
46
|
if ((json === undefined) || (json === null)) {
|
|
47
47
|
return json;
|
|
48
48
|
}
|
|
@@ -65,7 +65,7 @@ export function PaymentMethodBaseEntityFromJSONTyped(json, ignoreDiscriminator)
|
|
|
65
65
|
};
|
|
66
66
|
return removeNullUndefined(typed);
|
|
67
67
|
}
|
|
68
|
-
export function
|
|
68
|
+
export function TransactionPaymentInstrumentBaseEntityToJSON(value) {
|
|
69
69
|
if (value === undefined) {
|
|
70
70
|
return undefined;
|
|
71
71
|
}
|
|
@@ -3,7 +3,7 @@ export * from './AdminCreateTransactionRefundDto';
|
|
|
3
3
|
export * from './AdminVoidTransactionDto';
|
|
4
4
|
export * from './AvailablePaymentMethodEntity';
|
|
5
5
|
export * from './BankDetailsServiceEntity';
|
|
6
|
-
export * from './
|
|
6
|
+
export * from './BillingAddressDto';
|
|
7
7
|
export * from './BuyerEntity';
|
|
8
8
|
export * from './BuyersAddressEntity';
|
|
9
9
|
export * from './BuyersEntity';
|
|
@@ -14,7 +14,9 @@ export * from './CaptureTransactionDto';
|
|
|
14
14
|
export * from './CardDetailsServiceEntity';
|
|
15
15
|
export * from './ChangeNotificationEntity';
|
|
16
16
|
export * from './ChangeNotificationsSearchEntity';
|
|
17
|
+
export * from './CheckoutSessionBaseEntity';
|
|
17
18
|
export * from './CheckoutSessionEntity';
|
|
19
|
+
export * from './CheckoutSessionItemBaseEntity';
|
|
18
20
|
export * from './CheckoutSessionItemEntity';
|
|
19
21
|
export * from './ConnectorServiceTokenEntity';
|
|
20
22
|
export * from './CreateBuyerAddressDto';
|
|
@@ -48,6 +50,7 @@ export * from './ErrorEntity';
|
|
|
48
50
|
export * from './FeatureEntity';
|
|
49
51
|
export * from './FeatureTargetEntity';
|
|
50
52
|
export * from './FeaturesEntity';
|
|
53
|
+
export * from './FeeDetailsEntity';
|
|
51
54
|
export * from './LogoUploadEntity';
|
|
52
55
|
export * from './MerchantAccountEntity';
|
|
53
56
|
export * from './MerchantAccountServiceEntity';
|
|
@@ -59,6 +62,7 @@ export * from './MerchantConnectorCredentialsServiceEntity';
|
|
|
59
62
|
export * from './MerchantConnectorServiceEntity';
|
|
60
63
|
export * from './MerchantCredentialsEntity';
|
|
61
64
|
export * from './MerchantEntity';
|
|
65
|
+
export * from './MerchantFeeDetailsEntity';
|
|
62
66
|
export * from './MerchantServiceEntity';
|
|
63
67
|
export * from './MerchantSettingsDto';
|
|
64
68
|
export * from './MerchantSettingsEntity';
|
|
@@ -66,9 +70,9 @@ export * from './MerchantThemeDto';
|
|
|
66
70
|
export * from './MerchantThemeEntity';
|
|
67
71
|
export * from './MerchantThemeLogoDto';
|
|
68
72
|
export * from './MerchantThemeLogoEntity';
|
|
69
|
-
export * from './PaymentMethodBaseEntity';
|
|
70
73
|
export * from './PaymentMethodDto';
|
|
71
74
|
export * from './PaymentMethodEntity';
|
|
75
|
+
export * from './PaymentMethodFeeDetailsEntity';
|
|
72
76
|
export * from './PaymentMethodServiceEntity';
|
|
73
77
|
export * from './PaymentMethodsSearchEntity';
|
|
74
78
|
export * from './ReturnNotificationEntity';
|
|
@@ -79,6 +83,7 @@ export * from './TransactionEntity';
|
|
|
79
83
|
export * from './TransactionFeeDetailsEntity';
|
|
80
84
|
export * from './TransactionNoteEntity';
|
|
81
85
|
export * from './TransactionNoteHistoryEntity';
|
|
86
|
+
export * from './TransactionPaymentInstrumentBaseEntity';
|
|
82
87
|
export * from './TransactionRefundBaseEntity';
|
|
83
88
|
export * from './TransactionRefundEntity';
|
|
84
89
|
export * from './TransactionRefundsSearchEntity';
|
package/dist/mjs/models/index.js
CHANGED
|
@@ -5,7 +5,7 @@ export * from './AdminCreateTransactionRefundDto';
|
|
|
5
5
|
export * from './AdminVoidTransactionDto';
|
|
6
6
|
export * from './AvailablePaymentMethodEntity';
|
|
7
7
|
export * from './BankDetailsServiceEntity';
|
|
8
|
-
export * from './
|
|
8
|
+
export * from './BillingAddressDto';
|
|
9
9
|
export * from './BuyerEntity';
|
|
10
10
|
export * from './BuyersAddressEntity';
|
|
11
11
|
export * from './BuyersEntity';
|
|
@@ -16,7 +16,9 @@ export * from './CaptureTransactionDto';
|
|
|
16
16
|
export * from './CardDetailsServiceEntity';
|
|
17
17
|
export * from './ChangeNotificationEntity';
|
|
18
18
|
export * from './ChangeNotificationsSearchEntity';
|
|
19
|
+
export * from './CheckoutSessionBaseEntity';
|
|
19
20
|
export * from './CheckoutSessionEntity';
|
|
21
|
+
export * from './CheckoutSessionItemBaseEntity';
|
|
20
22
|
export * from './CheckoutSessionItemEntity';
|
|
21
23
|
export * from './ConnectorServiceTokenEntity';
|
|
22
24
|
export * from './CreateBuyerAddressDto';
|
|
@@ -50,6 +52,7 @@ export * from './ErrorEntity';
|
|
|
50
52
|
export * from './FeatureEntity';
|
|
51
53
|
export * from './FeatureTargetEntity';
|
|
52
54
|
export * from './FeaturesEntity';
|
|
55
|
+
export * from './FeeDetailsEntity';
|
|
53
56
|
export * from './LogoUploadEntity';
|
|
54
57
|
export * from './MerchantAccountEntity';
|
|
55
58
|
export * from './MerchantAccountServiceEntity';
|
|
@@ -61,6 +64,7 @@ export * from './MerchantConnectorCredentialsServiceEntity';
|
|
|
61
64
|
export * from './MerchantConnectorServiceEntity';
|
|
62
65
|
export * from './MerchantCredentialsEntity';
|
|
63
66
|
export * from './MerchantEntity';
|
|
67
|
+
export * from './MerchantFeeDetailsEntity';
|
|
64
68
|
export * from './MerchantServiceEntity';
|
|
65
69
|
export * from './MerchantSettingsDto';
|
|
66
70
|
export * from './MerchantSettingsEntity';
|
|
@@ -68,9 +72,9 @@ export * from './MerchantThemeDto';
|
|
|
68
72
|
export * from './MerchantThemeEntity';
|
|
69
73
|
export * from './MerchantThemeLogoDto';
|
|
70
74
|
export * from './MerchantThemeLogoEntity';
|
|
71
|
-
export * from './PaymentMethodBaseEntity';
|
|
72
75
|
export * from './PaymentMethodDto';
|
|
73
76
|
export * from './PaymentMethodEntity';
|
|
77
|
+
export * from './PaymentMethodFeeDetailsEntity';
|
|
74
78
|
export * from './PaymentMethodServiceEntity';
|
|
75
79
|
export * from './PaymentMethodsSearchEntity';
|
|
76
80
|
export * from './ReturnNotificationEntity';
|
|
@@ -81,6 +85,7 @@ export * from './TransactionEntity';
|
|
|
81
85
|
export * from './TransactionFeeDetailsEntity';
|
|
82
86
|
export * from './TransactionNoteEntity';
|
|
83
87
|
export * from './TransactionNoteHistoryEntity';
|
|
88
|
+
export * from './TransactionPaymentInstrumentBaseEntity';
|
|
84
89
|
export * from './TransactionRefundBaseEntity';
|
|
85
90
|
export * from './TransactionRefundEntity';
|
|
86
91
|
export * from './TransactionRefundsSearchEntity';
|
package/dist/mjs/runtime.js
CHANGED
|
@@ -64,7 +64,7 @@ export class BaseAPI {
|
|
|
64
64
|
}
|
|
65
65
|
async createFetchParams(context) {
|
|
66
66
|
Object.keys(context.headers).forEach(key => context.headers[key] === undefined ? delete context.headers[key] : {});
|
|
67
|
-
context.headers['user-agent'] = "@channelpayments/node-sdk/v1.
|
|
67
|
+
context.headers['user-agent'] = "@channelpayments/node-sdk/v1.184.0";
|
|
68
68
|
const token = this.generateAuthToken();
|
|
69
69
|
context.headers['Authorization'] = `Bearer ${token}`;
|
|
70
70
|
let url = this.url + context.path;
|