@channelpayments/node-sdk 1.181.0 → 1.183.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 (75) 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/CreateMerchantDto.d.ts +7 -0
  4. package/dist/cjs/models/CreateMerchantDto.js +3 -0
  5. package/dist/cjs/models/FeeDetailsEntity.d.ts +53 -0
  6. package/dist/cjs/models/FeeDetailsEntity.js +66 -0
  7. package/dist/cjs/models/LogoUploadEntity.d.ts +32 -0
  8. package/dist/cjs/models/LogoUploadEntity.js +49 -0
  9. package/dist/cjs/models/MerchantColorsDto.d.ts +38 -0
  10. package/dist/cjs/models/MerchantColorsDto.js +49 -0
  11. package/dist/cjs/models/MerchantColorsEntity.d.ts +38 -0
  12. package/dist/cjs/models/MerchantColorsEntity.js +49 -0
  13. package/dist/cjs/models/MerchantEntity.d.ts +7 -0
  14. package/dist/cjs/models/MerchantEntity.js +3 -0
  15. package/dist/cjs/models/MerchantFeeDetailsEntity.d.ts +39 -0
  16. package/dist/cjs/models/MerchantFeeDetailsEntity.js +53 -0
  17. package/dist/cjs/models/MerchantServiceEntity.d.ts +7 -0
  18. package/dist/cjs/models/MerchantServiceEntity.js +3 -0
  19. package/dist/cjs/models/MerchantSettingsDto.d.ts +33 -0
  20. package/dist/cjs/models/MerchantSettingsDto.js +48 -0
  21. package/dist/cjs/models/MerchantSettingsEntity.d.ts +39 -0
  22. package/dist/cjs/models/MerchantSettingsEntity.js +52 -0
  23. package/dist/cjs/models/MerchantThemeDto.d.ts +40 -0
  24. package/dist/cjs/models/MerchantThemeDto.js +53 -0
  25. package/dist/cjs/models/MerchantThemeEntity.d.ts +40 -0
  26. package/dist/cjs/models/MerchantThemeEntity.js +53 -0
  27. package/dist/cjs/models/MerchantThemeLogoDto.d.ts +41 -0
  28. package/dist/cjs/models/MerchantThemeLogoDto.js +57 -0
  29. package/dist/cjs/models/MerchantThemeLogoEntity.d.ts +41 -0
  30. package/dist/cjs/models/MerchantThemeLogoEntity.js +57 -0
  31. package/dist/cjs/models/PaymentMethodFeeDetailsEntity.d.ts +54 -0
  32. package/dist/cjs/models/PaymentMethodFeeDetailsEntity.js +65 -0
  33. package/dist/cjs/models/TransactionEntity.d.ts +0 -6
  34. package/dist/cjs/models/TransactionEntity.js +0 -2
  35. package/dist/cjs/models/index.d.ts +12 -0
  36. package/dist/cjs/models/index.js +12 -0
  37. package/dist/cjs/runtime.js +1 -1
  38. package/dist/mjs/apis/ChannelPaymentsApi.d.ts +9 -1
  39. package/dist/mjs/apis/ChannelPaymentsApi.js +69 -1
  40. package/dist/mjs/models/CreateMerchantDto.d.ts +7 -0
  41. package/dist/mjs/models/CreateMerchantDto.js +3 -0
  42. package/dist/mjs/models/FeeDetailsEntity.d.ts +53 -0
  43. package/dist/mjs/models/FeeDetailsEntity.js +59 -0
  44. package/dist/mjs/models/LogoUploadEntity.d.ts +32 -0
  45. package/dist/mjs/models/LogoUploadEntity.js +43 -0
  46. package/dist/mjs/models/MerchantColorsDto.d.ts +38 -0
  47. package/dist/mjs/models/MerchantColorsDto.js +43 -0
  48. package/dist/mjs/models/MerchantColorsEntity.d.ts +38 -0
  49. package/dist/mjs/models/MerchantColorsEntity.js +43 -0
  50. package/dist/mjs/models/MerchantEntity.d.ts +7 -0
  51. package/dist/mjs/models/MerchantEntity.js +3 -0
  52. package/dist/mjs/models/MerchantFeeDetailsEntity.d.ts +39 -0
  53. package/dist/mjs/models/MerchantFeeDetailsEntity.js +47 -0
  54. package/dist/mjs/models/MerchantServiceEntity.d.ts +7 -0
  55. package/dist/mjs/models/MerchantServiceEntity.js +3 -0
  56. package/dist/mjs/models/MerchantSettingsDto.d.ts +33 -0
  57. package/dist/mjs/models/MerchantSettingsDto.js +42 -0
  58. package/dist/mjs/models/MerchantSettingsEntity.d.ts +39 -0
  59. package/dist/mjs/models/MerchantSettingsEntity.js +46 -0
  60. package/dist/mjs/models/MerchantThemeDto.d.ts +40 -0
  61. package/dist/mjs/models/MerchantThemeDto.js +47 -0
  62. package/dist/mjs/models/MerchantThemeEntity.d.ts +40 -0
  63. package/dist/mjs/models/MerchantThemeEntity.js +47 -0
  64. package/dist/mjs/models/MerchantThemeLogoDto.d.ts +41 -0
  65. package/dist/mjs/models/MerchantThemeLogoDto.js +50 -0
  66. package/dist/mjs/models/MerchantThemeLogoEntity.d.ts +41 -0
  67. package/dist/mjs/models/MerchantThemeLogoEntity.js +50 -0
  68. package/dist/mjs/models/PaymentMethodFeeDetailsEntity.d.ts +54 -0
  69. package/dist/mjs/models/PaymentMethodFeeDetailsEntity.js +58 -0
  70. package/dist/mjs/models/TransactionEntity.d.ts +0 -6
  71. package/dist/mjs/models/TransactionEntity.js +0 -2
  72. package/dist/mjs/models/index.d.ts +12 -0
  73. package/dist/mjs/models/index.js +12 -0
  74. package/dist/mjs/runtime.js +1 -1
  75. package/package.json +2 -2
@@ -0,0 +1,65 @@
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.PaymentMethodFeeDetailsEntityMethodEnum = void 0;
12
+ exports.instanceOfPaymentMethodFeeDetailsEntity = instanceOfPaymentMethodFeeDetailsEntity;
13
+ exports.PaymentMethodFeeDetailsEntityFromJSON = PaymentMethodFeeDetailsEntityFromJSON;
14
+ exports.PaymentMethodFeeDetailsEntityFromJSONTyped = PaymentMethodFeeDetailsEntityFromJSONTyped;
15
+ exports.PaymentMethodFeeDetailsEntityToJSON = PaymentMethodFeeDetailsEntityToJSON;
16
+ const runtime_1 = require("../runtime");
17
+ const FeeDetailsEntity_1 = require("./FeeDetailsEntity");
18
+ /**
19
+ * @export
20
+ */
21
+ exports.PaymentMethodFeeDetailsEntityMethodEnum = {
22
+ Ach: 'ACH',
23
+ Bank: 'BANK',
24
+ Card: 'CARD'
25
+ };
26
+ /**
27
+ * Check if a given object implements the PaymentMethodFeeDetailsEntity interface.
28
+ */
29
+ function instanceOfPaymentMethodFeeDetailsEntity(value) {
30
+ let isInstance = true;
31
+ isInstance = isInstance && "method" in value;
32
+ isInstance = isInstance && "fees" in value;
33
+ isInstance = isInstance && "feesTotal" in value;
34
+ isInstance = isInstance && "adjustedTotal" in value;
35
+ return isInstance;
36
+ }
37
+ function PaymentMethodFeeDetailsEntityFromJSON(json) {
38
+ return PaymentMethodFeeDetailsEntityFromJSONTyped(json, false);
39
+ }
40
+ function PaymentMethodFeeDetailsEntityFromJSONTyped(json, ignoreDiscriminator) {
41
+ if ((json === undefined) || (json === null)) {
42
+ return json;
43
+ }
44
+ const typed = {
45
+ 'method': json['method'],
46
+ 'fees': (json['fees'].map(FeeDetailsEntity_1.FeeDetailsEntityFromJSON)),
47
+ 'feesTotal': json['feesTotal'],
48
+ 'adjustedTotal': json['adjustedTotal'],
49
+ };
50
+ return (0, runtime_1.removeNullUndefined)(typed);
51
+ }
52
+ function PaymentMethodFeeDetailsEntityToJSON(value) {
53
+ if (value === undefined) {
54
+ return undefined;
55
+ }
56
+ if (value === null) {
57
+ return null;
58
+ }
59
+ return {
60
+ 'method': value.method,
61
+ 'fees': (value.fees.map(FeeDetailsEntity_1.FeeDetailsEntityToJSON)),
62
+ 'feesTotal': value.feesTotal,
63
+ 'adjustedTotal': value.adjustedTotal,
64
+ };
65
+ }
@@ -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
@@ -125,7 +125,6 @@ function TransactionEntityFromJSONTyped(json, ignoreDiscriminator) {
125
125
  'settledAt': !(0, runtime_1.exists)(json, 'settledAt') ? undefined : (new Date(json['settledAt'])),
126
126
  'returnedAt': !(0, runtime_1.exists)(json, 'returnedAt') ? undefined : (new Date(json['returnedAt'])),
127
127
  'tags': !(0, runtime_1.exists)(json, 'tags') ? undefined : (json['tags'].map(TagEntity_1.TagEntityFromJSON)),
128
- 'declineReason': !(0, runtime_1.exists)(json, 'declineReason') ? undefined : json['declineReason'],
129
128
  };
130
129
  return (0, runtime_1.removeNullUndefined)(typed);
131
130
  }
@@ -176,6 +175,5 @@ function TransactionEntityToJSON(value) {
176
175
  'settledAt': value.settledAt === undefined ? undefined : (value.settledAt.toISOString()),
177
176
  'returnedAt': value.returnedAt === undefined ? undefined : (value.returnedAt.toISOString()),
178
177
  'tags': value.tags === undefined ? undefined : (value.tags.map(TagEntity_1.TagEntityToJSON)),
179
- 'declineReason': value.declineReason,
180
178
  };
181
179
  }
@@ -48,18 +48,30 @@ export * from './ErrorEntity';
48
48
  export * from './FeatureEntity';
49
49
  export * from './FeatureTargetEntity';
50
50
  export * from './FeaturesEntity';
51
+ export * from './FeeDetailsEntity';
52
+ export * from './LogoUploadEntity';
51
53
  export * from './MerchantAccountEntity';
52
54
  export * from './MerchantAccountServiceEntity';
53
55
  export * from './MerchantAccountsSearchEntity';
54
56
  export * from './MerchantAddressEntity';
57
+ export * from './MerchantColorsDto';
58
+ export * from './MerchantColorsEntity';
55
59
  export * from './MerchantConnectorCredentialsServiceEntity';
56
60
  export * from './MerchantConnectorServiceEntity';
57
61
  export * from './MerchantCredentialsEntity';
58
62
  export * from './MerchantEntity';
63
+ export * from './MerchantFeeDetailsEntity';
59
64
  export * from './MerchantServiceEntity';
65
+ export * from './MerchantSettingsDto';
66
+ export * from './MerchantSettingsEntity';
67
+ export * from './MerchantThemeDto';
68
+ export * from './MerchantThemeEntity';
69
+ export * from './MerchantThemeLogoDto';
70
+ export * from './MerchantThemeLogoEntity';
60
71
  export * from './PaymentMethodBaseEntity';
61
72
  export * from './PaymentMethodDto';
62
73
  export * from './PaymentMethodEntity';
74
+ export * from './PaymentMethodFeeDetailsEntity';
63
75
  export * from './PaymentMethodServiceEntity';
64
76
  export * from './PaymentMethodsSearchEntity';
65
77
  export * from './ReturnNotificationEntity';
@@ -66,18 +66,30 @@ __exportStar(require("./ErrorEntity"), exports);
66
66
  __exportStar(require("./FeatureEntity"), exports);
67
67
  __exportStar(require("./FeatureTargetEntity"), exports);
68
68
  __exportStar(require("./FeaturesEntity"), exports);
69
+ __exportStar(require("./FeeDetailsEntity"), exports);
70
+ __exportStar(require("./LogoUploadEntity"), exports);
69
71
  __exportStar(require("./MerchantAccountEntity"), exports);
70
72
  __exportStar(require("./MerchantAccountServiceEntity"), exports);
71
73
  __exportStar(require("./MerchantAccountsSearchEntity"), exports);
72
74
  __exportStar(require("./MerchantAddressEntity"), exports);
75
+ __exportStar(require("./MerchantColorsDto"), exports);
76
+ __exportStar(require("./MerchantColorsEntity"), exports);
73
77
  __exportStar(require("./MerchantConnectorCredentialsServiceEntity"), exports);
74
78
  __exportStar(require("./MerchantConnectorServiceEntity"), exports);
75
79
  __exportStar(require("./MerchantCredentialsEntity"), exports);
76
80
  __exportStar(require("./MerchantEntity"), exports);
81
+ __exportStar(require("./MerchantFeeDetailsEntity"), exports);
77
82
  __exportStar(require("./MerchantServiceEntity"), exports);
83
+ __exportStar(require("./MerchantSettingsDto"), exports);
84
+ __exportStar(require("./MerchantSettingsEntity"), exports);
85
+ __exportStar(require("./MerchantThemeDto"), exports);
86
+ __exportStar(require("./MerchantThemeEntity"), exports);
87
+ __exportStar(require("./MerchantThemeLogoDto"), exports);
88
+ __exportStar(require("./MerchantThemeLogoEntity"), exports);
78
89
  __exportStar(require("./PaymentMethodBaseEntity"), exports);
79
90
  __exportStar(require("./PaymentMethodDto"), exports);
80
91
  __exportStar(require("./PaymentMethodEntity"), exports);
92
+ __exportStar(require("./PaymentMethodFeeDetailsEntity"), exports);
81
93
  __exportStar(require("./PaymentMethodServiceEntity"), exports);
82
94
  __exportStar(require("./PaymentMethodsSearchEntity"), exports);
83
95
  __exportStar(require("./ReturnNotificationEntity"), 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.181.0";
117
+ context.headers['user-agent'] = "@channelpayments/node-sdk/v1.183.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
@@ -6,6 +6,7 @@
6
6
  */
7
7
  import type { CreateMerchantAccountWithoutMerchantIdDto } from './CreateMerchantAccountWithoutMerchantIdDto';
8
8
  import type { CreateMerchantAddressDto } from './CreateMerchantAddressDto';
9
+ import type { MerchantSettingsDto } from './MerchantSettingsDto';
9
10
  /**
10
11
  *
11
12
  * @export
@@ -54,6 +55,12 @@ export interface CreateMerchantDto {
54
55
  * @memberof CreateMerchantDto
55
56
  */
56
57
  merchantAccounts?: Array<CreateMerchantAccountWithoutMerchantIdDto>;
58
+ /**
59
+ * The merchant settings.
60
+ * @type {MerchantSettingsDto}
61
+ * @memberof CreateMerchantDto
62
+ */
63
+ merchantSettings?: MerchantSettingsDto;
57
64
  }
58
65
  /**
59
66
  * Check if a given object implements the CreateMerchantDto interface.
@@ -9,6 +9,7 @@
9
9
  import { exists, removeNullUndefined } from '../runtime';
10
10
  import { CreateMerchantAccountWithoutMerchantIdDtoFromJSON, CreateMerchantAccountWithoutMerchantIdDtoToJSON, } from './CreateMerchantAccountWithoutMerchantIdDto';
11
11
  import { CreateMerchantAddressDtoFromJSON, CreateMerchantAddressDtoToJSON, } from './CreateMerchantAddressDto';
12
+ import { MerchantSettingsDtoFromJSON, MerchantSettingsDtoToJSON, } from './MerchantSettingsDto';
12
13
  /**
13
14
  * Check if a given object implements the CreateMerchantDto interface.
14
15
  */
@@ -35,6 +36,7 @@ export function CreateMerchantDtoFromJSONTyped(json, ignoreDiscriminator) {
35
36
  'website': !exists(json, 'website') ? undefined : json['website'],
36
37
  'parentMerchantId': !exists(json, 'parentMerchantId') ? undefined : json['parentMerchantId'],
37
38
  'merchantAccounts': !exists(json, 'merchantAccounts') ? undefined : (json['merchantAccounts'].map(CreateMerchantAccountWithoutMerchantIdDtoFromJSON)),
39
+ 'merchantSettings': !exists(json, 'merchantSettings') ? undefined : MerchantSettingsDtoFromJSON(json['merchantSettings']),
38
40
  };
39
41
  return removeNullUndefined(typed);
40
42
  }
@@ -53,5 +55,6 @@ export function CreateMerchantDtoToJSON(value) {
53
55
  'website': value.website,
54
56
  'parentMerchantId': value.parentMerchantId,
55
57
  'merchantAccounts': value.merchantAccounts === undefined ? undefined : (value.merchantAccounts.map(CreateMerchantAccountWithoutMerchantIdDtoToJSON)),
58
+ 'merchantSettings': MerchantSettingsDtoToJSON(value.merchantSettings),
56
59
  };
57
60
  }
@@ -0,0 +1,53 @@
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 FeeDetailsEntity
11
+ */
12
+ export interface FeeDetailsEntity {
13
+ /**
14
+ * The type of the transaction fee.
15
+ * @type {string}
16
+ * @memberof FeeDetailsEntity
17
+ */
18
+ type: FeeDetailsEntityTypeEnum;
19
+ /**
20
+ * The type of charge for the transaction fee.
21
+ * @type {string}
22
+ * @memberof FeeDetailsEntity
23
+ */
24
+ chargeType: FeeDetailsEntityChargeTypeEnum;
25
+ /**
26
+ * The amount of the transaction fee.
27
+ * @type {number}
28
+ * @memberof FeeDetailsEntity
29
+ */
30
+ amount: number;
31
+ }
32
+ /**
33
+ * @export
34
+ */
35
+ export declare const FeeDetailsEntityTypeEnum: {
36
+ readonly ConvenienceFee: "CONVENIENCE_FEE";
37
+ };
38
+ export type FeeDetailsEntityTypeEnum = typeof FeeDetailsEntityTypeEnum[keyof typeof FeeDetailsEntityTypeEnum];
39
+ /**
40
+ * @export
41
+ */
42
+ export declare const FeeDetailsEntityChargeTypeEnum: {
43
+ readonly IncludedInAmount: "INCLUDED_IN_AMOUNT";
44
+ readonly ChargedSeparately: "CHARGED_SEPARATELY";
45
+ };
46
+ export type FeeDetailsEntityChargeTypeEnum = typeof FeeDetailsEntityChargeTypeEnum[keyof typeof FeeDetailsEntityChargeTypeEnum];
47
+ /**
48
+ * Check if a given object implements the FeeDetailsEntity interface.
49
+ */
50
+ export declare function instanceOfFeeDetailsEntity(value: object): boolean;
51
+ export declare function FeeDetailsEntityFromJSON(json: any): FeeDetailsEntity;
52
+ export declare function FeeDetailsEntityFromJSONTyped(json: any, ignoreDiscriminator: boolean): FeeDetailsEntity;
53
+ export declare function FeeDetailsEntityToJSON(value?: FeeDetailsEntity | null): any;
@@ -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,32 @@
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 LogoUploadEntity
11
+ */
12
+ export interface LogoUploadEntity {
13
+ /**
14
+ * The public url to the image once uploaded.
15
+ * @type {string}
16
+ * @memberof LogoUploadEntity
17
+ */
18
+ imageUrl: string;
19
+ /**
20
+ * The temporary S3 url to upload the image to.
21
+ * @type {string}
22
+ * @memberof LogoUploadEntity
23
+ */
24
+ uploadUrl: string;
25
+ }
26
+ /**
27
+ * Check if a given object implements the LogoUploadEntity interface.
28
+ */
29
+ export declare function instanceOfLogoUploadEntity(value: object): boolean;
30
+ export declare function LogoUploadEntityFromJSON(json: any): LogoUploadEntity;
31
+ export declare function LogoUploadEntityFromJSONTyped(json: any, ignoreDiscriminator: boolean): LogoUploadEntity;
32
+ export declare function LogoUploadEntityToJSON(value?: LogoUploadEntity | null): any;
@@ -0,0 +1,43 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Channel Payments API
5
+ *
6
+ * NOTE: This class is auto generated. Do not edit the class manually.
7
+ *
8
+ */
9
+ import { removeNullUndefined } from '../runtime';
10
+ /**
11
+ * Check if a given object implements the LogoUploadEntity interface.
12
+ */
13
+ export function instanceOfLogoUploadEntity(value) {
14
+ let isInstance = true;
15
+ isInstance = isInstance && "imageUrl" in value;
16
+ isInstance = isInstance && "uploadUrl" in value;
17
+ return isInstance;
18
+ }
19
+ export function LogoUploadEntityFromJSON(json) {
20
+ return LogoUploadEntityFromJSONTyped(json, false);
21
+ }
22
+ export function LogoUploadEntityFromJSONTyped(json, ignoreDiscriminator) {
23
+ if ((json === undefined) || (json === null)) {
24
+ return json;
25
+ }
26
+ const typed = {
27
+ 'imageUrl': json['imageUrl'],
28
+ 'uploadUrl': json['uploadUrl'],
29
+ };
30
+ return removeNullUndefined(typed);
31
+ }
32
+ export function LogoUploadEntityToJSON(value) {
33
+ if (value === undefined) {
34
+ return undefined;
35
+ }
36
+ if (value === null) {
37
+ return null;
38
+ }
39
+ return {
40
+ 'imageUrl': value.imageUrl,
41
+ 'uploadUrl': value.uploadUrl,
42
+ };
43
+ }
@@ -0,0 +1,38 @@
1
+ /**
2
+ * Channel Payments API
3
+ *
4
+ * NOTE: This class is auto generated. Do not edit the class manually.
5
+ *
6
+ */
7
+ /**
8
+ *
9
+ * @export
10
+ * @interface MerchantColorsDto
11
+ */
12
+ export interface MerchantColorsDto {
13
+ /**
14
+ * The palette's primary color
15
+ * @type {string}
16
+ * @memberof MerchantColorsDto
17
+ */
18
+ primary?: string;
19
+ /**
20
+ * The palette's secondary color
21
+ * @type {string}
22
+ * @memberof MerchantColorsDto
23
+ */
24
+ secondary?: string;
25
+ /**
26
+ * The palette's tertiary color
27
+ * @type {string}
28
+ * @memberof MerchantColorsDto
29
+ */
30
+ tertiary?: string;
31
+ }
32
+ /**
33
+ * Check if a given object implements the MerchantColorsDto interface.
34
+ */
35
+ export declare function instanceOfMerchantColorsDto(value: object): boolean;
36
+ export declare function MerchantColorsDtoFromJSON(json: any): MerchantColorsDto;
37
+ export declare function MerchantColorsDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean): MerchantColorsDto;
38
+ export declare function MerchantColorsDtoToJSON(value?: MerchantColorsDto | null): any;
@@ -0,0 +1,43 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Channel Payments API
5
+ *
6
+ * NOTE: This class is auto generated. Do not edit the class manually.
7
+ *
8
+ */
9
+ import { exists, removeNullUndefined } from '../runtime';
10
+ /**
11
+ * Check if a given object implements the MerchantColorsDto interface.
12
+ */
13
+ export function instanceOfMerchantColorsDto(value) {
14
+ let isInstance = true;
15
+ return isInstance;
16
+ }
17
+ export function MerchantColorsDtoFromJSON(json) {
18
+ return MerchantColorsDtoFromJSONTyped(json, false);
19
+ }
20
+ export function MerchantColorsDtoFromJSONTyped(json, ignoreDiscriminator) {
21
+ if ((json === undefined) || (json === null)) {
22
+ return json;
23
+ }
24
+ const typed = {
25
+ 'primary': !exists(json, 'primary') ? undefined : json['primary'],
26
+ 'secondary': !exists(json, 'secondary') ? undefined : json['secondary'],
27
+ 'tertiary': !exists(json, 'tertiary') ? undefined : json['tertiary'],
28
+ };
29
+ return removeNullUndefined(typed);
30
+ }
31
+ export function MerchantColorsDtoToJSON(value) {
32
+ if (value === undefined) {
33
+ return undefined;
34
+ }
35
+ if (value === null) {
36
+ return null;
37
+ }
38
+ return {
39
+ 'primary': value.primary,
40
+ 'secondary': value.secondary,
41
+ 'tertiary': value.tertiary,
42
+ };
43
+ }
@@ -0,0 +1,38 @@
1
+ /**
2
+ * Channel Payments API
3
+ *
4
+ * NOTE: This class is auto generated. Do not edit the class manually.
5
+ *
6
+ */
7
+ /**
8
+ *
9
+ * @export
10
+ * @interface MerchantColorsEntity
11
+ */
12
+ export interface MerchantColorsEntity {
13
+ /**
14
+ * The palette's primary color
15
+ * @type {string}
16
+ * @memberof MerchantColorsEntity
17
+ */
18
+ primary?: string;
19
+ /**
20
+ * The palette's secondary color
21
+ * @type {string}
22
+ * @memberof MerchantColorsEntity
23
+ */
24
+ secondary?: string;
25
+ /**
26
+ * The palette's tertiary color
27
+ * @type {string}
28
+ * @memberof MerchantColorsEntity
29
+ */
30
+ tertiary?: string;
31
+ }
32
+ /**
33
+ * Check if a given object implements the MerchantColorsEntity interface.
34
+ */
35
+ export declare function instanceOfMerchantColorsEntity(value: object): boolean;
36
+ export declare function MerchantColorsEntityFromJSON(json: any): MerchantColorsEntity;
37
+ export declare function MerchantColorsEntityFromJSONTyped(json: any, ignoreDiscriminator: boolean): MerchantColorsEntity;
38
+ export declare function MerchantColorsEntityToJSON(value?: MerchantColorsEntity | null): any;