@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.
Files changed (59) hide show
  1. package/dist/cjs/apis/ChannelPaymentsApi.d.ts +9 -1
  2. package/dist/cjs/apis/ChannelPaymentsApi.js +70 -0
  3. package/dist/cjs/models/BillingAddressDto.d.ts +56 -0
  4. package/dist/cjs/models/{BuyerAddressDto.js → BillingAddressDto.js} +16 -18
  5. package/dist/cjs/models/CheckoutSessionBaseEntity.d.ts +185 -0
  6. package/dist/cjs/models/CheckoutSessionBaseEntity.js +127 -0
  7. package/dist/cjs/models/CheckoutSessionEntity.d.ts +11 -5
  8. package/dist/cjs/models/CheckoutSessionEntity.js +4 -2
  9. package/dist/cjs/models/CheckoutSessionItemBaseEntity.d.ts +80 -0
  10. package/dist/cjs/models/CheckoutSessionItemBaseEntity.js +69 -0
  11. package/dist/cjs/models/CreateCheckoutSessionPaymentMethodDto.d.ts +12 -0
  12. package/dist/cjs/models/CreateCheckoutSessionPaymentMethodDto.js +4 -0
  13. package/dist/cjs/models/CreateCheckoutSessionTransactionDto.d.ts +4 -4
  14. package/dist/cjs/models/CreateCheckoutSessionTransactionDto.js +4 -4
  15. package/dist/cjs/models/FeeDetailsEntity.d.ts +53 -0
  16. package/dist/cjs/models/FeeDetailsEntity.js +66 -0
  17. package/dist/cjs/models/MerchantFeeDetailsEntity.d.ts +39 -0
  18. package/dist/cjs/models/MerchantFeeDetailsEntity.js +53 -0
  19. package/dist/cjs/models/PaymentMethodFeeDetailsEntity.d.ts +54 -0
  20. package/dist/cjs/models/PaymentMethodFeeDetailsEntity.js +65 -0
  21. package/dist/cjs/models/TransactionEntity.d.ts +3 -9
  22. package/dist/cjs/models/TransactionEntity.js +3 -5
  23. package/dist/cjs/models/TransactionPaymentInstrumentBaseEntity.d.ts +136 -0
  24. package/dist/cjs/models/{PaymentMethodBaseEntity.js → TransactionPaymentInstrumentBaseEntity.js} +14 -14
  25. package/dist/cjs/models/index.d.ts +7 -2
  26. package/dist/cjs/models/index.js +7 -2
  27. package/dist/cjs/runtime.js +1 -1
  28. package/dist/mjs/apis/ChannelPaymentsApi.d.ts +9 -1
  29. package/dist/mjs/apis/ChannelPaymentsApi.js +69 -1
  30. package/dist/mjs/models/BillingAddressDto.d.ts +56 -0
  31. package/dist/mjs/models/{BuyerAddressDto.js → BillingAddressDto.js} +12 -14
  32. package/dist/mjs/models/CheckoutSessionBaseEntity.d.ts +185 -0
  33. package/dist/mjs/models/CheckoutSessionBaseEntity.js +120 -0
  34. package/dist/mjs/models/CheckoutSessionEntity.d.ts +11 -5
  35. package/dist/mjs/models/CheckoutSessionEntity.js +4 -2
  36. package/dist/mjs/models/CheckoutSessionItemBaseEntity.d.ts +80 -0
  37. package/dist/mjs/models/CheckoutSessionItemBaseEntity.js +63 -0
  38. package/dist/mjs/models/CreateCheckoutSessionPaymentMethodDto.d.ts +12 -0
  39. package/dist/mjs/models/CreateCheckoutSessionPaymentMethodDto.js +4 -0
  40. package/dist/mjs/models/CreateCheckoutSessionTransactionDto.d.ts +4 -4
  41. package/dist/mjs/models/CreateCheckoutSessionTransactionDto.js +4 -4
  42. package/dist/mjs/models/FeeDetailsEntity.d.ts +53 -0
  43. package/dist/mjs/models/FeeDetailsEntity.js +59 -0
  44. package/dist/mjs/models/MerchantFeeDetailsEntity.d.ts +39 -0
  45. package/dist/mjs/models/MerchantFeeDetailsEntity.js +47 -0
  46. package/dist/mjs/models/PaymentMethodFeeDetailsEntity.d.ts +54 -0
  47. package/dist/mjs/models/PaymentMethodFeeDetailsEntity.js +58 -0
  48. package/dist/mjs/models/TransactionEntity.d.ts +3 -9
  49. package/dist/mjs/models/TransactionEntity.js +3 -5
  50. package/dist/mjs/models/TransactionPaymentInstrumentBaseEntity.d.ts +136 -0
  51. package/dist/mjs/models/{PaymentMethodBaseEntity.js → TransactionPaymentInstrumentBaseEntity.js} +9 -9
  52. package/dist/mjs/models/index.d.ts +7 -2
  53. package/dist/mjs/models/index.js +7 -2
  54. package/dist/mjs/runtime.js +1 -1
  55. package/package.json +1 -1
  56. package/dist/cjs/models/BuyerAddressDto.d.ts +0 -56
  57. package/dist/cjs/models/PaymentMethodBaseEntity.d.ts +0 -136
  58. package/dist/mjs/models/BuyerAddressDto.d.ts +0 -56
  59. package/dist/mjs/models/PaymentMethodBaseEntity.d.ts +0 -136
@@ -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;
@@ -8,16 +8,16 @@
8
8
  *
9
9
  */
10
10
  Object.defineProperty(exports, "__esModule", { value: true });
11
- exports.PaymentMethodBaseEntityAccountTypeEnum = exports.PaymentMethodBaseEntityCardTypeEnum = exports.PaymentMethodBaseEntityMethodEnum = void 0;
12
- exports.instanceOfPaymentMethodBaseEntity = instanceOfPaymentMethodBaseEntity;
13
- exports.PaymentMethodBaseEntityFromJSON = PaymentMethodBaseEntityFromJSON;
14
- exports.PaymentMethodBaseEntityFromJSONTyped = PaymentMethodBaseEntityFromJSONTyped;
15
- exports.PaymentMethodBaseEntityToJSON = PaymentMethodBaseEntityToJSON;
11
+ exports.TransactionPaymentInstrumentBaseEntityAccountTypeEnum = exports.TransactionPaymentInstrumentBaseEntityCardTypeEnum = exports.TransactionPaymentInstrumentBaseEntityMethodEnum = void 0;
12
+ exports.instanceOfTransactionPaymentInstrumentBaseEntity = instanceOfTransactionPaymentInstrumentBaseEntity;
13
+ exports.TransactionPaymentInstrumentBaseEntityFromJSON = TransactionPaymentInstrumentBaseEntityFromJSON;
14
+ exports.TransactionPaymentInstrumentBaseEntityFromJSONTyped = TransactionPaymentInstrumentBaseEntityFromJSONTyped;
15
+ exports.TransactionPaymentInstrumentBaseEntityToJSON = TransactionPaymentInstrumentBaseEntityToJSON;
16
16
  const runtime_1 = require("../runtime");
17
17
  /**
18
18
  * @export
19
19
  */
20
- exports.PaymentMethodBaseEntityMethodEnum = {
20
+ exports.TransactionPaymentInstrumentBaseEntityMethodEnum = {
21
21
  Ach: 'ACH',
22
22
  Bank: 'BANK',
23
23
  Card: 'CARD'
@@ -25,7 +25,7 @@ exports.PaymentMethodBaseEntityMethodEnum = {
25
25
  /**
26
26
  * @export
27
27
  */
28
- exports.PaymentMethodBaseEntityCardTypeEnum = {
28
+ exports.TransactionPaymentInstrumentBaseEntityCardTypeEnum = {
29
29
  Credit: 'CREDIT',
30
30
  Debit: 'DEBIT',
31
31
  Prepaid: 'PREPAID'
@@ -33,23 +33,23 @@ exports.PaymentMethodBaseEntityCardTypeEnum = {
33
33
  /**
34
34
  * @export
35
35
  */
36
- exports.PaymentMethodBaseEntityAccountTypeEnum = {
36
+ exports.TransactionPaymentInstrumentBaseEntityAccountTypeEnum = {
37
37
  Checking: 'CHECKING',
38
38
  Savings: 'SAVINGS'
39
39
  };
40
40
  /**
41
- * Check if a given object implements the PaymentMethodBaseEntity interface.
41
+ * Check if a given object implements the TransactionPaymentInstrumentBaseEntity interface.
42
42
  */
43
- function instanceOfPaymentMethodBaseEntity(value) {
43
+ function instanceOfTransactionPaymentInstrumentBaseEntity(value) {
44
44
  let isInstance = true;
45
45
  isInstance = isInstance && "paymentMethodId" in value;
46
46
  isInstance = isInstance && "method" in value;
47
47
  return isInstance;
48
48
  }
49
- function PaymentMethodBaseEntityFromJSON(json) {
50
- return PaymentMethodBaseEntityFromJSONTyped(json, false);
49
+ function TransactionPaymentInstrumentBaseEntityFromJSON(json) {
50
+ return TransactionPaymentInstrumentBaseEntityFromJSONTyped(json, false);
51
51
  }
52
- function PaymentMethodBaseEntityFromJSONTyped(json, ignoreDiscriminator) {
52
+ function TransactionPaymentInstrumentBaseEntityFromJSONTyped(json, ignoreDiscriminator) {
53
53
  if ((json === undefined) || (json === null)) {
54
54
  return json;
55
55
  }
@@ -72,7 +72,7 @@ function PaymentMethodBaseEntityFromJSONTyped(json, ignoreDiscriminator) {
72
72
  };
73
73
  return (0, runtime_1.removeNullUndefined)(typed);
74
74
  }
75
- function PaymentMethodBaseEntityToJSON(value) {
75
+ function TransactionPaymentInstrumentBaseEntityToJSON(value) {
76
76
  if (value === undefined) {
77
77
  return undefined;
78
78
  }
@@ -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 './BuyerAddressDto';
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';
@@ -21,7 +21,7 @@ __exportStar(require("./AdminCreateTransactionRefundDto"), exports);
21
21
  __exportStar(require("./AdminVoidTransactionDto"), exports);
22
22
  __exportStar(require("./AvailablePaymentMethodEntity"), exports);
23
23
  __exportStar(require("./BankDetailsServiceEntity"), exports);
24
- __exportStar(require("./BuyerAddressDto"), exports);
24
+ __exportStar(require("./BillingAddressDto"), exports);
25
25
  __exportStar(require("./BuyerEntity"), exports);
26
26
  __exportStar(require("./BuyersAddressEntity"), exports);
27
27
  __exportStar(require("./BuyersEntity"), exports);
@@ -32,7 +32,9 @@ __exportStar(require("./CaptureTransactionDto"), exports);
32
32
  __exportStar(require("./CardDetailsServiceEntity"), exports);
33
33
  __exportStar(require("./ChangeNotificationEntity"), exports);
34
34
  __exportStar(require("./ChangeNotificationsSearchEntity"), exports);
35
+ __exportStar(require("./CheckoutSessionBaseEntity"), exports);
35
36
  __exportStar(require("./CheckoutSessionEntity"), exports);
37
+ __exportStar(require("./CheckoutSessionItemBaseEntity"), exports);
36
38
  __exportStar(require("./CheckoutSessionItemEntity"), exports);
37
39
  __exportStar(require("./ConnectorServiceTokenEntity"), exports);
38
40
  __exportStar(require("./CreateBuyerAddressDto"), exports);
@@ -66,6 +68,7 @@ __exportStar(require("./ErrorEntity"), exports);
66
68
  __exportStar(require("./FeatureEntity"), exports);
67
69
  __exportStar(require("./FeatureTargetEntity"), exports);
68
70
  __exportStar(require("./FeaturesEntity"), exports);
71
+ __exportStar(require("./FeeDetailsEntity"), exports);
69
72
  __exportStar(require("./LogoUploadEntity"), exports);
70
73
  __exportStar(require("./MerchantAccountEntity"), exports);
71
74
  __exportStar(require("./MerchantAccountServiceEntity"), exports);
@@ -77,6 +80,7 @@ __exportStar(require("./MerchantConnectorCredentialsServiceEntity"), exports);
77
80
  __exportStar(require("./MerchantConnectorServiceEntity"), exports);
78
81
  __exportStar(require("./MerchantCredentialsEntity"), exports);
79
82
  __exportStar(require("./MerchantEntity"), exports);
83
+ __exportStar(require("./MerchantFeeDetailsEntity"), exports);
80
84
  __exportStar(require("./MerchantServiceEntity"), exports);
81
85
  __exportStar(require("./MerchantSettingsDto"), exports);
82
86
  __exportStar(require("./MerchantSettingsEntity"), exports);
@@ -84,9 +88,9 @@ __exportStar(require("./MerchantThemeDto"), exports);
84
88
  __exportStar(require("./MerchantThemeEntity"), exports);
85
89
  __exportStar(require("./MerchantThemeLogoDto"), exports);
86
90
  __exportStar(require("./MerchantThemeLogoEntity"), exports);
87
- __exportStar(require("./PaymentMethodBaseEntity"), exports);
88
91
  __exportStar(require("./PaymentMethodDto"), exports);
89
92
  __exportStar(require("./PaymentMethodEntity"), exports);
93
+ __exportStar(require("./PaymentMethodFeeDetailsEntity"), exports);
90
94
  __exportStar(require("./PaymentMethodServiceEntity"), exports);
91
95
  __exportStar(require("./PaymentMethodsSearchEntity"), exports);
92
96
  __exportStar(require("./ReturnNotificationEntity"), exports);
@@ -97,6 +101,7 @@ __exportStar(require("./TransactionEntity"), exports);
97
101
  __exportStar(require("./TransactionFeeDetailsEntity"), exports);
98
102
  __exportStar(require("./TransactionNoteEntity"), exports);
99
103
  __exportStar(require("./TransactionNoteHistoryEntity"), exports);
104
+ __exportStar(require("./TransactionPaymentInstrumentBaseEntity"), exports);
100
105
  __exportStar(require("./TransactionRefundBaseEntity"), exports);
101
106
  __exportStar(require("./TransactionRefundEntity"), exports);
102
107
  __exportStar(require("./TransactionRefundsSearchEntity"), exports);
@@ -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.182.0";
117
+ context.headers['user-agent'] = "@channelpayments/node-sdk/v1.184.0";
118
118
  const token = this.generateAuthToken();
119
119
  context.headers['Authorization'] = `Bearer ${token}`;
120
120
  let url = this.url + context.path;
@@ -5,7 +5,10 @@
5
5
  *
6
6
  */
7
7
  import * as runtime from '../runtime';
8
- import type { BuyersEntity, BuyersSearchEntity, CaptureTransactionDto, ChangeNotificationEntity, ChangeNotificationsSearchEntity, CheckoutSessionEntity, ConnectorServiceTokenEntity, CreateBuyerDto, CreateCheckoutSessionDto, CreatePaymentMethodDto, CreateProvisionedCardTokenDto, CreateTransactionRefundDto, CreateTransactionRequestDto, MerchantEntity, PaymentMethodEntity, PaymentMethodsSearchEntity, ReturnNotificationEntity, ReturnNotificationsSearchEntity, TagDto, TransactionEntity, TransactionRefundEntity, TransactionRefundsSearchEntity, TransactionsSearchEntity, UpdateBuyerDto } from '../models';
8
+ import type { BuyersEntity, BuyersSearchEntity, CaptureTransactionDto, ChangeNotificationEntity, ChangeNotificationsSearchEntity, CheckoutSessionEntity, ConnectorServiceTokenEntity, CreateBuyerDto, CreateCheckoutSessionDto, CreatePaymentMethodDto, CreateProvisionedCardTokenDto, CreateTransactionRefundDto, CreateTransactionRequestDto, MerchantEntity, MerchantFeeDetailsEntity, PaymentMethodEntity, PaymentMethodsSearchEntity, ReturnNotificationEntity, ReturnNotificationsSearchEntity, TagDto, TransactionEntity, TransactionRefundEntity, TransactionRefundsSearchEntity, TransactionsSearchEntity, UpdateBuyerDto } from '../models';
9
+ export interface GetFeeDetailsRequest {
10
+ amount: string;
11
+ }
9
12
  export interface SearchBuyersRequest {
10
13
  merchantId: string;
11
14
  buyerId?: string;
@@ -168,6 +171,11 @@ export declare class ChannelPaymentsApi extends runtime.BaseAPI {
168
171
  * Find connector service tokens.
169
172
  */
170
173
  getConnectorServiceTokens(paymentMethodId: string): Promise<Array<ConnectorServiceTokenEntity>>;
174
+ /**
175
+ * Get fee details by amount
176
+ * Get fee details
177
+ */
178
+ getFeeDetails(requestParameters: GetFeeDetailsRequest): Promise<MerchantFeeDetailsEntity>;
171
179
  /**
172
180
  * Retrieve the merchant associated with the user making the request.
173
181
  * Find merchant
@@ -7,7 +7,7 @@
7
7
  *
8
8
  */
9
9
  import * as runtime from '../runtime';
10
- import { BuyersEntityFromJSON, BuyersSearchEntityFromJSON, CaptureTransactionDtoToJSON, ChangeNotificationEntityFromJSON, ChangeNotificationsSearchEntityFromJSON, CheckoutSessionEntityFromJSON, ConnectorServiceTokenEntityFromJSON, CreateBuyerDtoToJSON, CreateCheckoutSessionDtoToJSON, CreatePaymentMethodDtoToJSON, CreateProvisionedCardTokenDtoToJSON, CreateTransactionRefundDtoToJSON, CreateTransactionRequestDtoToJSON, ErrorEntityFromJSON, MerchantEntityFromJSON, PaymentMethodEntityFromJSON, PaymentMethodsSearchEntityFromJSON, ReturnNotificationEntityFromJSON, ReturnNotificationsSearchEntityFromJSON, TransactionEntityFromJSON, TransactionRefundEntityFromJSON, TransactionRefundsSearchEntityFromJSON, TransactionsSearchEntityFromJSON, UpdateBuyerDtoToJSON, } from '../models';
10
+ import { BuyersEntityFromJSON, BuyersSearchEntityFromJSON, CaptureTransactionDtoToJSON, ChangeNotificationEntityFromJSON, ChangeNotificationsSearchEntityFromJSON, CheckoutSessionEntityFromJSON, ConnectorServiceTokenEntityFromJSON, CreateBuyerDtoToJSON, CreateCheckoutSessionDtoToJSON, CreatePaymentMethodDtoToJSON, CreateProvisionedCardTokenDtoToJSON, CreateTransactionRefundDtoToJSON, CreateTransactionRequestDtoToJSON, ErrorEntityFromJSON, MerchantEntityFromJSON, MerchantFeeDetailsEntityFromJSON, PaymentMethodEntityFromJSON, PaymentMethodsSearchEntityFromJSON, ReturnNotificationEntityFromJSON, ReturnNotificationsSearchEntityFromJSON, TransactionEntityFromJSON, TransactionRefundEntityFromJSON, TransactionRefundsSearchEntityFromJSON, TransactionsSearchEntityFromJSON, UpdateBuyerDtoToJSON, } from '../models';
11
11
  /**
12
12
  *
13
13
  */
@@ -972,6 +972,74 @@ export class ChannelPaymentsApi extends runtime.BaseAPI {
972
972
  }
973
973
  return await response.value();
974
974
  }
975
+ /**
976
+ * Get fee details by amount
977
+ * Get fee details
978
+ */
979
+ async getFeeDetails(requestParameters) {
980
+ if (requestParameters.amount === null || requestParameters.amount === undefined) {
981
+ throw new runtime.RequiredError('amount', 'Required parameter \'amount\' was null or undefined when calling getFeeDetails.');
982
+ }
983
+ const queryParameters = {};
984
+ if (requestParameters.amount !== undefined) {
985
+ queryParameters['amount'] = requestParameters.amount;
986
+ }
987
+ const headerParameters = {};
988
+ const rawResponse = await this.request({
989
+ path: `/transactions/fee-details`,
990
+ method: 'GET',
991
+ headers: headerParameters,
992
+ query: queryParameters,
993
+ });
994
+ let response;
995
+ if (rawResponse.status === 200) {
996
+ response = new runtime.JSONApiResponse(rawResponse, (jsonValue) => MerchantFeeDetailsEntityFromJSON(jsonValue));
997
+ }
998
+ if (rawResponse.status === 400) {
999
+ const errorResponse = new runtime.JSONApiResponse(rawResponse, (jsonValue) => ErrorEntityFromJSON(jsonValue));
1000
+ const error = await errorResponse.value();
1001
+ throw error;
1002
+ }
1003
+ if (rawResponse.status === 401) {
1004
+ const errorResponse = new runtime.JSONApiResponse(rawResponse, (jsonValue) => ErrorEntityFromJSON(jsonValue));
1005
+ const error = await errorResponse.value();
1006
+ throw error;
1007
+ }
1008
+ if (rawResponse.status === 403) {
1009
+ const errorResponse = new runtime.JSONApiResponse(rawResponse, (jsonValue) => ErrorEntityFromJSON(jsonValue));
1010
+ const error = await errorResponse.value();
1011
+ throw error;
1012
+ }
1013
+ if (rawResponse.status === 404) {
1014
+ const errorResponse = new runtime.JSONApiResponse(rawResponse, (jsonValue) => ErrorEntityFromJSON(jsonValue));
1015
+ const error = await errorResponse.value();
1016
+ throw error;
1017
+ }
1018
+ if (rawResponse.status === 500) {
1019
+ const errorResponse = new runtime.JSONApiResponse(rawResponse, (jsonValue) => ErrorEntityFromJSON(jsonValue));
1020
+ const error = await errorResponse.value();
1021
+ throw error;
1022
+ }
1023
+ if (rawResponse.status === 502) {
1024
+ const errorResponse = new runtime.JSONApiResponse(rawResponse, (jsonValue) => ErrorEntityFromJSON(jsonValue));
1025
+ const error = await errorResponse.value();
1026
+ throw error;
1027
+ }
1028
+ if (rawResponse.status === 503) {
1029
+ const errorResponse = new runtime.JSONApiResponse(rawResponse, (jsonValue) => ErrorEntityFromJSON(jsonValue));
1030
+ const error = await errorResponse.value();
1031
+ throw error;
1032
+ }
1033
+ if (rawResponse.status === 504) {
1034
+ const errorResponse = new runtime.JSONApiResponse(rawResponse, (jsonValue) => ErrorEntityFromJSON(jsonValue));
1035
+ const error = await errorResponse.value();
1036
+ throw error;
1037
+ }
1038
+ if (!response) {
1039
+ response = new runtime.TextApiResponse(rawResponse);
1040
+ }
1041
+ return await response.value();
1042
+ }
975
1043
  /**
976
1044
  * Retrieve the merchant associated with the user making the request.
977
1045
  * Find merchant
@@ -0,0 +1,56 @@
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 BillingAddressDto
11
+ */
12
+ export interface BillingAddressDto {
13
+ /**
14
+ * The city of the account holder address.
15
+ * @type {string}
16
+ * @memberof BillingAddressDto
17
+ */
18
+ city: string;
19
+ /**
20
+ * The street address of the account holder.
21
+ * @type {string}
22
+ * @memberof BillingAddressDto
23
+ */
24
+ streetAddress: string;
25
+ /**
26
+ * The postal code of the account holder address.
27
+ * @type {string}
28
+ * @memberof BillingAddressDto
29
+ */
30
+ postalCode: string;
31
+ /**
32
+ * The country code of the account holder address.
33
+ * @type {string}
34
+ * @memberof BillingAddressDto
35
+ */
36
+ countryCode?: string;
37
+ /**
38
+ * The state code of the account holder address.
39
+ * @type {string}
40
+ * @memberof BillingAddressDto
41
+ */
42
+ subdivisionCode?: string;
43
+ /**
44
+ * The second line of the street address of the account holder.
45
+ * @type {string}
46
+ * @memberof BillingAddressDto
47
+ */
48
+ streetAddress2?: string;
49
+ }
50
+ /**
51
+ * Check if a given object implements the BillingAddressDto interface.
52
+ */
53
+ export declare function instanceOfBillingAddressDto(value: object): boolean;
54
+ export declare function BillingAddressDtoFromJSON(json: any): BillingAddressDto;
55
+ export declare function BillingAddressDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean): BillingAddressDto;
56
+ export declare function BillingAddressDtoToJSON(value?: BillingAddressDto | null): any;
@@ -8,35 +8,33 @@
8
8
  */
9
9
  import { exists, removeNullUndefined } from '../runtime';
10
10
  /**
11
- * Check if a given object implements the BuyerAddressDto interface.
11
+ * Check if a given object implements the BillingAddressDto interface.
12
12
  */
13
- export function instanceOfBuyerAddressDto(value) {
13
+ export function instanceOfBillingAddressDto(value) {
14
14
  let isInstance = true;
15
- isInstance = isInstance && "streetAddress" in value;
16
15
  isInstance = isInstance && "city" in value;
17
- isInstance = isInstance && "subdivision" in value;
16
+ isInstance = isInstance && "streetAddress" in value;
18
17
  isInstance = isInstance && "postalCode" in value;
19
- isInstance = isInstance && "countryCode" in value;
20
18
  return isInstance;
21
19
  }
22
- export function BuyerAddressDtoFromJSON(json) {
23
- return BuyerAddressDtoFromJSONTyped(json, false);
20
+ export function BillingAddressDtoFromJSON(json) {
21
+ return BillingAddressDtoFromJSONTyped(json, false);
24
22
  }
25
- export function BuyerAddressDtoFromJSONTyped(json, ignoreDiscriminator) {
23
+ export function BillingAddressDtoFromJSONTyped(json, ignoreDiscriminator) {
26
24
  if ((json === undefined) || (json === null)) {
27
25
  return json;
28
26
  }
29
27
  const typed = {
30
- 'streetAddress': json['streetAddress'],
31
28
  'city': json['city'],
32
- 'subdivision': json['subdivision'],
29
+ 'streetAddress': json['streetAddress'],
33
30
  'postalCode': json['postalCode'],
34
- 'countryCode': json['countryCode'],
31
+ 'countryCode': !exists(json, 'countryCode') ? undefined : json['countryCode'],
32
+ 'subdivisionCode': !exists(json, 'subdivisionCode') ? undefined : json['subdivisionCode'],
35
33
  'streetAddress2': !exists(json, 'streetAddress2') ? undefined : json['streetAddress2'],
36
34
  };
37
35
  return removeNullUndefined(typed);
38
36
  }
39
- export function BuyerAddressDtoToJSON(value) {
37
+ export function BillingAddressDtoToJSON(value) {
40
38
  if (value === undefined) {
41
39
  return undefined;
42
40
  }
@@ -44,11 +42,11 @@ export function BuyerAddressDtoToJSON(value) {
44
42
  return null;
45
43
  }
46
44
  return {
47
- 'streetAddress': value.streetAddress,
48
45
  'city': value.city,
49
- 'subdivision': value.subdivision,
46
+ 'streetAddress': value.streetAddress,
50
47
  'postalCode': value.postalCode,
51
48
  'countryCode': value.countryCode,
49
+ 'subdivisionCode': value.subdivisionCode,
52
50
  'streetAddress2': value.streetAddress2,
53
51
  };
54
52
  }