@vqnguyen1/piece-fis-horizon 0.0.2 → 0.0.4
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/package.json +2 -2
- package/project.json +22 -0
- package/src/index.ts +534 -0
- package/src/lib/actions/account-aggregation.ts +360 -0
- package/src/lib/actions/account-restrictions.ts +2427 -0
- package/src/lib/actions/bank-controls.ts +2328 -0
- package/src/lib/actions/card.ts +488 -0
- package/src/lib/actions/collateral.ts +696 -0
- package/src/lib/actions/customer.ts +1691 -0
- package/src/lib/actions/demand-deposit-savings.ts +731 -0
- package/src/lib/actions/get-authorization-token.ts +73 -0
- package/src/lib/actions/loans.ts +902 -0
- package/src/lib/actions/mortgage-loan.ts +1426 -0
- package/src/lib/actions/ready-reserve.ts +818 -0
- package/src/lib/actions/safe-deposit.ts +1506 -0
- package/src/lib/actions/search-customer-relationship-summary.ts +140 -0
- package/src/lib/actions/time-deposit.ts +2922 -0
- package/src/lib/actions/transactions.ts +1310 -0
- package/src/lib/actions/transfers.ts +1581 -0
- package/src/lib/actions/user-security.ts +1032 -0
- package/tsconfig.json +19 -0
- package/tsconfig.lib.json +10 -0
- package/src/index.d.ts +0 -12
- package/src/index.js +0 -62
- package/src/index.js.map +0 -1
- package/src/lib/actions/get-authorization-token.d.ts +0 -10
- package/src/lib/actions/get-authorization-token.js +0 -68
- package/src/lib/actions/get-authorization-token.js.map +0 -1
- package/src/lib/actions/search-customer-relationship-summary.d.ts +0 -15
- package/src/lib/actions/search-customer-relationship-summary.js +0 -122
- package/src/lib/actions/search-customer-relationship-summary.js.map +0 -1
|
@@ -0,0 +1,2922 @@
|
|
|
1
|
+
import {
|
|
2
|
+
createAction,
|
|
3
|
+
Property,
|
|
4
|
+
} from '@activepieces/pieces-framework';
|
|
5
|
+
import { httpClient, HttpMethod } from '@activepieces/pieces-common';
|
|
6
|
+
import { fisHorizonAuth } from '../..';
|
|
7
|
+
|
|
8
|
+
// Base URL path for Time Deposit API
|
|
9
|
+
const API_PATH = '/time-deposit/v1';
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Retrieve basic information relating to a Time Deposit account
|
|
13
|
+
*/
|
|
14
|
+
export const time_deposit_account_inquiry = createAction({
|
|
15
|
+
name: 'time_deposit_account_inquiry',
|
|
16
|
+
auth: fisHorizonAuth,
|
|
17
|
+
displayName: 'Time Deposit - Account Inquiry',
|
|
18
|
+
description: 'Retrieve basic information relating to a Time Deposit account (Certificate of Deposit or Retirement)',
|
|
19
|
+
props: {
|
|
20
|
+
xAuthorization: Property.ShortText({
|
|
21
|
+
displayName: 'Authorization Token (JWT)',
|
|
22
|
+
description: 'The JWT token obtained from the Authorization - Get Token action',
|
|
23
|
+
required: true,
|
|
24
|
+
}),
|
|
25
|
+
sourceId: Property.ShortText({
|
|
26
|
+
displayName: 'Source ID',
|
|
27
|
+
description: 'Optional: 6 character ID provided by FIS',
|
|
28
|
+
required: false,
|
|
29
|
+
}),
|
|
30
|
+
applicationCode: Property.StaticDropdown({
|
|
31
|
+
displayName: 'Application Code',
|
|
32
|
+
description: 'The application type',
|
|
33
|
+
required: true,
|
|
34
|
+
options: {
|
|
35
|
+
options: [
|
|
36
|
+
{ label: 'CD - Certificates of Deposit', value: 'CD' },
|
|
37
|
+
{ label: 'IR - Retirement', value: 'IR' },
|
|
38
|
+
],
|
|
39
|
+
},
|
|
40
|
+
}),
|
|
41
|
+
accountNumber: Property.ShortText({
|
|
42
|
+
displayName: 'Account Number',
|
|
43
|
+
description: 'Account Number (up to 20 characters)',
|
|
44
|
+
required: true,
|
|
45
|
+
}),
|
|
46
|
+
customerId: Property.ShortText({
|
|
47
|
+
displayName: 'Customer ID',
|
|
48
|
+
description: 'Optional: Customer ID, right-justified, zero filled (up to 14 digits)',
|
|
49
|
+
required: false,
|
|
50
|
+
}),
|
|
51
|
+
returnUppercase: Property.StaticDropdown({
|
|
52
|
+
displayName: 'Return Uppercase',
|
|
53
|
+
description: 'Whether to return data in uppercase',
|
|
54
|
+
required: false,
|
|
55
|
+
options: {
|
|
56
|
+
options: [
|
|
57
|
+
{ label: 'Yes', value: 'Y' },
|
|
58
|
+
{ label: 'No', value: 'N' },
|
|
59
|
+
],
|
|
60
|
+
},
|
|
61
|
+
}),
|
|
62
|
+
},
|
|
63
|
+
async run(context) {
|
|
64
|
+
const auth = context.auth as any;
|
|
65
|
+
const baseUrl = auth.baseUrl;
|
|
66
|
+
const organizationId = auth.organizationId;
|
|
67
|
+
const props = context.propsValue;
|
|
68
|
+
|
|
69
|
+
const uuid = crypto.randomUUID();
|
|
70
|
+
|
|
71
|
+
const headers: Record<string, string> = {
|
|
72
|
+
'accept': 'application/json',
|
|
73
|
+
'organization-id': organizationId,
|
|
74
|
+
'uuid': uuid,
|
|
75
|
+
'horizon-authorization': props.xAuthorization,
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
if (props.sourceId) {
|
|
79
|
+
headers['source-id'] = props.sourceId;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
const queryParams: Record<string, string> = {};
|
|
83
|
+
if (props.customerId) {
|
|
84
|
+
queryParams['customerId'] = props.customerId;
|
|
85
|
+
}
|
|
86
|
+
if (props.returnUppercase) {
|
|
87
|
+
queryParams['returnUppercase'] = props.returnUppercase;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
const queryString = Object.keys(queryParams).length > 0
|
|
91
|
+
? '?' + new URLSearchParams(queryParams).toString()
|
|
92
|
+
: '';
|
|
93
|
+
|
|
94
|
+
const response = await httpClient.sendRequest({
|
|
95
|
+
method: HttpMethod.GET,
|
|
96
|
+
url: `${baseUrl}${API_PATH}/accounts/${props.applicationCode}/${props.accountNumber}${queryString}`,
|
|
97
|
+
headers,
|
|
98
|
+
});
|
|
99
|
+
|
|
100
|
+
return response.body;
|
|
101
|
+
},
|
|
102
|
+
});
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* Retrieve a list of historic transactions relating to an account
|
|
106
|
+
*/
|
|
107
|
+
export const time_deposit_transaction_inquiry = createAction({
|
|
108
|
+
name: 'time_deposit_transaction_inquiry',
|
|
109
|
+
auth: fisHorizonAuth,
|
|
110
|
+
displayName: 'Time Deposit - Transaction Inquiry',
|
|
111
|
+
description: 'Retrieve a list of historic transactions for a Time Deposit account',
|
|
112
|
+
props: {
|
|
113
|
+
xAuthorization: Property.ShortText({
|
|
114
|
+
displayName: 'Authorization Token (JWT)',
|
|
115
|
+
description: 'The JWT token obtained from the Authorization - Get Token action',
|
|
116
|
+
required: true,
|
|
117
|
+
}),
|
|
118
|
+
sourceId: Property.ShortText({
|
|
119
|
+
displayName: 'Source ID',
|
|
120
|
+
description: 'Optional: 6 character ID provided by FIS',
|
|
121
|
+
required: false,
|
|
122
|
+
}),
|
|
123
|
+
applicationCode: Property.StaticDropdown({
|
|
124
|
+
displayName: 'Application Code',
|
|
125
|
+
description: 'The application type',
|
|
126
|
+
required: true,
|
|
127
|
+
options: {
|
|
128
|
+
options: [
|
|
129
|
+
{ label: 'CD - Certificates of Deposit', value: 'CD' },
|
|
130
|
+
{ label: 'IR - Retirement', value: 'IR' },
|
|
131
|
+
],
|
|
132
|
+
},
|
|
133
|
+
}),
|
|
134
|
+
accountNumber: Property.ShortText({
|
|
135
|
+
displayName: 'Account Number',
|
|
136
|
+
description: 'Account Number (up to 20 characters)',
|
|
137
|
+
required: true,
|
|
138
|
+
}),
|
|
139
|
+
dateSelectOption: Property.StaticDropdown({
|
|
140
|
+
displayName: 'Date Select Option',
|
|
141
|
+
description: 'Option for date selection',
|
|
142
|
+
required: false,
|
|
143
|
+
options: {
|
|
144
|
+
options: [
|
|
145
|
+
{ label: 'B - Both current and history', value: 'B' },
|
|
146
|
+
{ label: 'C - Current only', value: 'C' },
|
|
147
|
+
{ label: 'H - History only', value: 'H' },
|
|
148
|
+
],
|
|
149
|
+
},
|
|
150
|
+
}),
|
|
151
|
+
firstNext: Property.StaticDropdown({
|
|
152
|
+
displayName: 'First/Next',
|
|
153
|
+
description: 'Indicates first or next page of results',
|
|
154
|
+
required: false,
|
|
155
|
+
options: {
|
|
156
|
+
options: [
|
|
157
|
+
{ label: 'F - First', value: 'F' },
|
|
158
|
+
{ label: 'N - Next', value: 'N' },
|
|
159
|
+
],
|
|
160
|
+
},
|
|
161
|
+
}),
|
|
162
|
+
numberToReturn: Property.Number({
|
|
163
|
+
displayName: 'Number To Return',
|
|
164
|
+
description: 'Number of records to return (1-999)',
|
|
165
|
+
required: false,
|
|
166
|
+
}),
|
|
167
|
+
beginDate: Property.ShortText({
|
|
168
|
+
displayName: 'Begin Date',
|
|
169
|
+
description: 'Begin date for transaction search (MMDDYY)',
|
|
170
|
+
required: false,
|
|
171
|
+
}),
|
|
172
|
+
endDate: Property.ShortText({
|
|
173
|
+
displayName: 'End Date',
|
|
174
|
+
description: 'End date for transaction search (MMDDYY)',
|
|
175
|
+
required: false,
|
|
176
|
+
}),
|
|
177
|
+
returnMemoPostTransaction: Property.StaticDropdown({
|
|
178
|
+
displayName: 'Return Memo Post Transactions',
|
|
179
|
+
description: 'Whether to return memo post transactions',
|
|
180
|
+
required: false,
|
|
181
|
+
options: {
|
|
182
|
+
options: [
|
|
183
|
+
{ label: 'Yes', value: 'Y' },
|
|
184
|
+
{ label: 'No', value: 'N' },
|
|
185
|
+
],
|
|
186
|
+
},
|
|
187
|
+
}),
|
|
188
|
+
returnPackagePostItems: Property.StaticDropdown({
|
|
189
|
+
displayName: 'Return Package Post Items',
|
|
190
|
+
description: 'Whether to return package post items',
|
|
191
|
+
required: false,
|
|
192
|
+
options: {
|
|
193
|
+
options: [
|
|
194
|
+
{ label: 'Yes', value: 'Y' },
|
|
195
|
+
{ label: 'No', value: 'N' },
|
|
196
|
+
],
|
|
197
|
+
},
|
|
198
|
+
}),
|
|
199
|
+
returnScheduledExternalTransfers: Property.StaticDropdown({
|
|
200
|
+
displayName: 'Return Scheduled External Transfers',
|
|
201
|
+
description: 'Whether to return scheduled external transfers',
|
|
202
|
+
required: false,
|
|
203
|
+
options: {
|
|
204
|
+
options: [
|
|
205
|
+
{ label: 'Yes', value: 'Y' },
|
|
206
|
+
{ label: 'No', value: 'N' },
|
|
207
|
+
],
|
|
208
|
+
},
|
|
209
|
+
}),
|
|
210
|
+
sequenceOption: Property.StaticDropdown({
|
|
211
|
+
displayName: 'Sequence Option',
|
|
212
|
+
description: 'Sort order for transactions',
|
|
213
|
+
required: false,
|
|
214
|
+
options: {
|
|
215
|
+
options: [
|
|
216
|
+
{ label: 'A - Ascending', value: 'A' },
|
|
217
|
+
{ label: 'D - Descending', value: 'D' },
|
|
218
|
+
],
|
|
219
|
+
},
|
|
220
|
+
}),
|
|
221
|
+
searchToken: Property.ShortText({
|
|
222
|
+
displayName: 'Search Token',
|
|
223
|
+
description: 'Token for pagination (from previous response)',
|
|
224
|
+
required: false,
|
|
225
|
+
}),
|
|
226
|
+
},
|
|
227
|
+
async run(context) {
|
|
228
|
+
const auth = context.auth as any;
|
|
229
|
+
const baseUrl = auth.baseUrl;
|
|
230
|
+
const organizationId = auth.organizationId;
|
|
231
|
+
const props = context.propsValue;
|
|
232
|
+
|
|
233
|
+
const uuid = crypto.randomUUID();
|
|
234
|
+
|
|
235
|
+
const headers: Record<string, string> = {
|
|
236
|
+
'accept': 'application/json',
|
|
237
|
+
'organization-id': organizationId,
|
|
238
|
+
'uuid': uuid,
|
|
239
|
+
'horizon-authorization': props.xAuthorization,
|
|
240
|
+
};
|
|
241
|
+
|
|
242
|
+
if (props.sourceId) {
|
|
243
|
+
headers['source-id'] = props.sourceId;
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
const queryParams: Record<string, string> = {};
|
|
247
|
+
if (props.dateSelectOption) {
|
|
248
|
+
queryParams['dateSelectOption'] = props.dateSelectOption;
|
|
249
|
+
}
|
|
250
|
+
if (props.firstNext) {
|
|
251
|
+
queryParams['firstNext'] = props.firstNext;
|
|
252
|
+
}
|
|
253
|
+
if (props.numberToReturn !== undefined && props.numberToReturn !== null) {
|
|
254
|
+
queryParams['numberToReturn'] = props.numberToReturn.toString();
|
|
255
|
+
}
|
|
256
|
+
if (props.beginDate) {
|
|
257
|
+
queryParams['beginDate'] = props.beginDate;
|
|
258
|
+
}
|
|
259
|
+
if (props.endDate) {
|
|
260
|
+
queryParams['endDate'] = props.endDate;
|
|
261
|
+
}
|
|
262
|
+
if (props.returnMemoPostTransaction) {
|
|
263
|
+
queryParams['returnMemoPostTransaction'] = props.returnMemoPostTransaction;
|
|
264
|
+
}
|
|
265
|
+
if (props.returnPackagePostItems) {
|
|
266
|
+
queryParams['returnPackagePostItems'] = props.returnPackagePostItems;
|
|
267
|
+
}
|
|
268
|
+
if (props.returnScheduledExternalTransfers) {
|
|
269
|
+
queryParams['returnScheduledExternalTransfers'] = props.returnScheduledExternalTransfers;
|
|
270
|
+
}
|
|
271
|
+
if (props.sequenceOption) {
|
|
272
|
+
queryParams['sequenceOption'] = props.sequenceOption;
|
|
273
|
+
}
|
|
274
|
+
if (props.searchToken) {
|
|
275
|
+
queryParams['searchToken'] = props.searchToken;
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
const queryString = Object.keys(queryParams).length > 0
|
|
279
|
+
? '?' + new URLSearchParams(queryParams).toString()
|
|
280
|
+
: '';
|
|
281
|
+
|
|
282
|
+
const response = await httpClient.sendRequest({
|
|
283
|
+
method: HttpMethod.GET,
|
|
284
|
+
url: `${baseUrl}${API_PATH}/accounts/${props.applicationCode}/${props.accountNumber}/transactions${queryString}`,
|
|
285
|
+
headers,
|
|
286
|
+
});
|
|
287
|
+
|
|
288
|
+
return response.body;
|
|
289
|
+
},
|
|
290
|
+
});
|
|
291
|
+
|
|
292
|
+
/**
|
|
293
|
+
* Retrieve a Certificate or IRA renewal
|
|
294
|
+
*/
|
|
295
|
+
export const time_deposit_renewal_inquiry = createAction({
|
|
296
|
+
name: 'time_deposit_renewal_inquiry',
|
|
297
|
+
auth: fisHorizonAuth,
|
|
298
|
+
displayName: 'Time Deposit - Renewal Inquiry',
|
|
299
|
+
description: 'Retrieve a Certificate or IRA renewal information',
|
|
300
|
+
props: {
|
|
301
|
+
xAuthorization: Property.ShortText({
|
|
302
|
+
displayName: 'Authorization Token (JWT)',
|
|
303
|
+
description: 'The JWT token obtained from the Authorization - Get Token action',
|
|
304
|
+
required: true,
|
|
305
|
+
}),
|
|
306
|
+
sourceId: Property.ShortText({
|
|
307
|
+
displayName: 'Source ID',
|
|
308
|
+
description: 'Optional: 6 character ID provided by FIS',
|
|
309
|
+
required: false,
|
|
310
|
+
}),
|
|
311
|
+
accountNumber: Property.ShortText({
|
|
312
|
+
displayName: 'Account Number',
|
|
313
|
+
description: 'Account Number, right justified zero filled (up to 15 digits)',
|
|
314
|
+
required: true,
|
|
315
|
+
}),
|
|
316
|
+
applicationCode: Property.StaticDropdown({
|
|
317
|
+
displayName: 'Application Code',
|
|
318
|
+
description: 'The application type',
|
|
319
|
+
required: true,
|
|
320
|
+
options: {
|
|
321
|
+
options: [
|
|
322
|
+
{ label: 'C - Certificates', value: 'C' },
|
|
323
|
+
{ label: 'R - IRA', value: 'R' },
|
|
324
|
+
],
|
|
325
|
+
},
|
|
326
|
+
}),
|
|
327
|
+
userId: Property.ShortText({
|
|
328
|
+
displayName: 'User ID',
|
|
329
|
+
description: 'Optional: Account holder user ID (up to 10 digits)',
|
|
330
|
+
required: false,
|
|
331
|
+
}),
|
|
332
|
+
},
|
|
333
|
+
async run(context) {
|
|
334
|
+
const auth = context.auth as any;
|
|
335
|
+
const baseUrl = auth.baseUrl;
|
|
336
|
+
const organizationId = auth.organizationId;
|
|
337
|
+
const props = context.propsValue;
|
|
338
|
+
|
|
339
|
+
const uuid = crypto.randomUUID();
|
|
340
|
+
|
|
341
|
+
const headers: Record<string, string> = {
|
|
342
|
+
'accept': 'application/json',
|
|
343
|
+
'organization-id': organizationId,
|
|
344
|
+
'uuid': uuid,
|
|
345
|
+
'horizon-authorization': props.xAuthorization,
|
|
346
|
+
};
|
|
347
|
+
|
|
348
|
+
if (props.sourceId) {
|
|
349
|
+
headers['source-id'] = props.sourceId;
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
const queryParams: Record<string, string> = {
|
|
353
|
+
applicationCode: props.applicationCode,
|
|
354
|
+
};
|
|
355
|
+
if (props.userId) {
|
|
356
|
+
queryParams['userId'] = props.userId;
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
const queryString = '?' + new URLSearchParams(queryParams).toString();
|
|
360
|
+
|
|
361
|
+
const response = await httpClient.sendRequest({
|
|
362
|
+
method: HttpMethod.GET,
|
|
363
|
+
url: `${baseUrl}${API_PATH}/accounts/time-deposits/${props.accountNumber}/renewals${queryString}`,
|
|
364
|
+
headers,
|
|
365
|
+
});
|
|
366
|
+
|
|
367
|
+
return response.body;
|
|
368
|
+
},
|
|
369
|
+
});
|
|
370
|
+
|
|
371
|
+
/**
|
|
372
|
+
* Add a certificate or IRA renewal
|
|
373
|
+
*/
|
|
374
|
+
export const time_deposit_renewal_add = createAction({
|
|
375
|
+
name: 'time_deposit_renewal_add',
|
|
376
|
+
auth: fisHorizonAuth,
|
|
377
|
+
displayName: 'Time Deposit - Add Renewal',
|
|
378
|
+
description: 'Add a certificate or IRA renewal',
|
|
379
|
+
props: {
|
|
380
|
+
xAuthorization: Property.ShortText({
|
|
381
|
+
displayName: 'Authorization Token (JWT)',
|
|
382
|
+
description: 'The JWT token obtained from the Authorization - Get Token action',
|
|
383
|
+
required: true,
|
|
384
|
+
}),
|
|
385
|
+
sourceId: Property.ShortText({
|
|
386
|
+
displayName: 'Source ID',
|
|
387
|
+
description: 'Optional: 6 character ID provided by FIS',
|
|
388
|
+
required: false,
|
|
389
|
+
}),
|
|
390
|
+
accountNumber: Property.ShortText({
|
|
391
|
+
displayName: 'Account Number',
|
|
392
|
+
description: 'Account Number, right justified zero filled (up to 15 digits)',
|
|
393
|
+
required: true,
|
|
394
|
+
}),
|
|
395
|
+
applicationCode: Property.StaticDropdown({
|
|
396
|
+
displayName: 'Application Code',
|
|
397
|
+
description: 'The application type',
|
|
398
|
+
required: true,
|
|
399
|
+
options: {
|
|
400
|
+
options: [
|
|
401
|
+
{ label: 'C - Certificate', value: 'C' },
|
|
402
|
+
{ label: 'R - IRA', value: 'R' },
|
|
403
|
+
],
|
|
404
|
+
},
|
|
405
|
+
}),
|
|
406
|
+
productType: Property.ShortText({
|
|
407
|
+
displayName: 'Product Type',
|
|
408
|
+
description: 'Product type (up to 3 characters)',
|
|
409
|
+
required: false,
|
|
410
|
+
}),
|
|
411
|
+
currentMaturityDate: Property.ShortText({
|
|
412
|
+
displayName: 'Current Maturity Date',
|
|
413
|
+
description: 'Current maturity date (MMDDYY)',
|
|
414
|
+
required: false,
|
|
415
|
+
}),
|
|
416
|
+
maturityTermType: Property.StaticDropdown({
|
|
417
|
+
displayName: 'Maturity Term Type',
|
|
418
|
+
description: 'Maturity term type',
|
|
419
|
+
required: false,
|
|
420
|
+
options: {
|
|
421
|
+
options: [
|
|
422
|
+
{ label: 'D - Days', value: 'D' },
|
|
423
|
+
{ label: 'M - Months', value: 'M' },
|
|
424
|
+
{ label: 'O - Open Ended', value: 'O' },
|
|
425
|
+
],
|
|
426
|
+
},
|
|
427
|
+
}),
|
|
428
|
+
maturityOption: Property.StaticDropdown({
|
|
429
|
+
displayName: 'Maturity Option',
|
|
430
|
+
description: 'Maturity option',
|
|
431
|
+
required: false,
|
|
432
|
+
options: {
|
|
433
|
+
options: [
|
|
434
|
+
{ label: 'P - Principal only', value: 'P' },
|
|
435
|
+
{ label: 'I - Interest only', value: 'I' },
|
|
436
|
+
{ label: 'B - Both principal and interest', value: 'B' },
|
|
437
|
+
{ label: 'N - No auto renewal', value: 'N' },
|
|
438
|
+
],
|
|
439
|
+
},
|
|
440
|
+
}),
|
|
441
|
+
maturityTerm: Property.ShortText({
|
|
442
|
+
displayName: 'Maturity Term',
|
|
443
|
+
description: 'Maturity term (up to 5 characters)',
|
|
444
|
+
required: false,
|
|
445
|
+
}),
|
|
446
|
+
generalLedgerType: Property.ShortText({
|
|
447
|
+
displayName: 'General Ledger Type',
|
|
448
|
+
description: 'General ledger type (0001-9999)',
|
|
449
|
+
required: false,
|
|
450
|
+
}),
|
|
451
|
+
renewalProductType: Property.ShortText({
|
|
452
|
+
displayName: 'Renewal Product Type',
|
|
453
|
+
description: 'Renewal product type (up to 3 characters)',
|
|
454
|
+
required: false,
|
|
455
|
+
}),
|
|
456
|
+
penaltyType: Property.ShortText({
|
|
457
|
+
displayName: 'Penalty Type',
|
|
458
|
+
description: 'Penalty type (up to 3 characters)',
|
|
459
|
+
required: false,
|
|
460
|
+
}),
|
|
461
|
+
officerCode: Property.ShortText({
|
|
462
|
+
displayName: 'Officer Code',
|
|
463
|
+
description: 'Officer code (up to 3 characters)',
|
|
464
|
+
required: false,
|
|
465
|
+
}),
|
|
466
|
+
nextInterestPaymentDate: Property.ShortText({
|
|
467
|
+
displayName: 'Next Interest Payment Date',
|
|
468
|
+
description: 'Next interest payment date (MMDDYY)',
|
|
469
|
+
required: false,
|
|
470
|
+
}),
|
|
471
|
+
interestRate: Property.ShortText({
|
|
472
|
+
displayName: 'Interest Rate',
|
|
473
|
+
description: 'Interest rate',
|
|
474
|
+
required: false,
|
|
475
|
+
}),
|
|
476
|
+
plusMinusIndexRate: Property.ShortText({
|
|
477
|
+
displayName: 'Plus/Minus Index Rate',
|
|
478
|
+
description: 'Plus or minus index rate',
|
|
479
|
+
required: false,
|
|
480
|
+
}),
|
|
481
|
+
percentageIndexRate: Property.ShortText({
|
|
482
|
+
displayName: 'Percentage Index Rate',
|
|
483
|
+
description: 'Percentage of index rate',
|
|
484
|
+
required: false,
|
|
485
|
+
}),
|
|
486
|
+
interestPeriodTerm: Property.ShortText({
|
|
487
|
+
displayName: 'Interest Period Term',
|
|
488
|
+
description: 'Interest period term (up to 5 characters)',
|
|
489
|
+
required: false,
|
|
490
|
+
}),
|
|
491
|
+
interestPeriodType: Property.StaticDropdown({
|
|
492
|
+
displayName: 'Interest Period Type',
|
|
493
|
+
description: 'Interest period type',
|
|
494
|
+
required: false,
|
|
495
|
+
options: {
|
|
496
|
+
options: [
|
|
497
|
+
{ label: 'D - Days', value: 'D' },
|
|
498
|
+
{ label: 'M - Months', value: 'M' },
|
|
499
|
+
],
|
|
500
|
+
},
|
|
501
|
+
}),
|
|
502
|
+
interestRateType: Property.StaticDropdown({
|
|
503
|
+
displayName: 'Interest Rate Type',
|
|
504
|
+
description: 'Interest rate type',
|
|
505
|
+
required: false,
|
|
506
|
+
options: {
|
|
507
|
+
options: [
|
|
508
|
+
{ label: 'F - Fixed Rate', value: 'F' },
|
|
509
|
+
{ label: 'S - Step Rate', value: 'S' },
|
|
510
|
+
{ label: 'V - Variable Rate', value: 'V' },
|
|
511
|
+
],
|
|
512
|
+
},
|
|
513
|
+
}),
|
|
514
|
+
interestRateIndex: Property.ShortText({
|
|
515
|
+
displayName: 'Interest Rate Index',
|
|
516
|
+
description: 'Interest rate index',
|
|
517
|
+
required: false,
|
|
518
|
+
}),
|
|
519
|
+
interestPaymentMethod: Property.StaticDropdown({
|
|
520
|
+
displayName: 'Interest Payment Method',
|
|
521
|
+
description: 'Interest payment method',
|
|
522
|
+
required: false,
|
|
523
|
+
options: {
|
|
524
|
+
options: [
|
|
525
|
+
{ label: 'A - ACH Transfer', value: 'A' },
|
|
526
|
+
{ label: 'C - Capitalize', value: 'C' },
|
|
527
|
+
{ label: 'K - Check', value: 'K' },
|
|
528
|
+
{ label: 'T - Transfer', value: 'T' },
|
|
529
|
+
],
|
|
530
|
+
},
|
|
531
|
+
}),
|
|
532
|
+
gracePeriodInterestControl: Property.ShortText({
|
|
533
|
+
displayName: 'Grace Period Interest Control',
|
|
534
|
+
description: 'Grace period interest control',
|
|
535
|
+
required: false,
|
|
536
|
+
}),
|
|
537
|
+
gracePeriodRateType: Property.ShortText({
|
|
538
|
+
displayName: 'Grace Period Rate Type',
|
|
539
|
+
description: 'Grace period rate type',
|
|
540
|
+
required: false,
|
|
541
|
+
}),
|
|
542
|
+
userId: Property.ShortText({
|
|
543
|
+
displayName: 'User ID',
|
|
544
|
+
description: 'User ID (up to 10 characters)',
|
|
545
|
+
required: false,
|
|
546
|
+
}),
|
|
547
|
+
overrideMaturity: Property.StaticDropdown({
|
|
548
|
+
displayName: 'Override Maturity',
|
|
549
|
+
description: 'Override maturity date warning',
|
|
550
|
+
required: false,
|
|
551
|
+
options: {
|
|
552
|
+
options: [
|
|
553
|
+
{ label: 'Yes', value: 'Y' },
|
|
554
|
+
{ label: 'No', value: '' },
|
|
555
|
+
],
|
|
556
|
+
},
|
|
557
|
+
}),
|
|
558
|
+
overrideNextInterest: Property.StaticDropdown({
|
|
559
|
+
displayName: 'Override Next Interest',
|
|
560
|
+
description: 'Override next interest payment date warning',
|
|
561
|
+
required: false,
|
|
562
|
+
options: {
|
|
563
|
+
options: [
|
|
564
|
+
{ label: 'Yes', value: 'Y' },
|
|
565
|
+
{ label: 'No', value: '' },
|
|
566
|
+
],
|
|
567
|
+
},
|
|
568
|
+
}),
|
|
569
|
+
lastRenewalBalance: Property.ShortText({
|
|
570
|
+
displayName: 'Last Renewal Balance',
|
|
571
|
+
description: 'Last renewal balance',
|
|
572
|
+
required: false,
|
|
573
|
+
}),
|
|
574
|
+
interestTransferToApplication: Property.StaticDropdown({
|
|
575
|
+
displayName: 'Interest Transfer To Application',
|
|
576
|
+
description: 'Application for interest transfer',
|
|
577
|
+
required: false,
|
|
578
|
+
options: {
|
|
579
|
+
options: [
|
|
580
|
+
{ label: 'CD - Certificate of Deposit', value: 'CD' },
|
|
581
|
+
{ label: 'DD - Demand Deposit', value: 'DD' },
|
|
582
|
+
{ label: 'IR - Retirement', value: 'IR' },
|
|
583
|
+
{ label: 'LN - ELS Loan', value: 'LN' },
|
|
584
|
+
{ label: 'ML - Mortgage Loan', value: 'ML' },
|
|
585
|
+
{ label: 'SV - Savings', value: 'SV' },
|
|
586
|
+
],
|
|
587
|
+
},
|
|
588
|
+
}),
|
|
589
|
+
interestTransferToAccount: Property.ShortText({
|
|
590
|
+
displayName: 'Interest Transfer To Account',
|
|
591
|
+
description: 'Account number for interest transfer',
|
|
592
|
+
required: false,
|
|
593
|
+
}),
|
|
594
|
+
achTransactionCode: Property.StaticDropdown({
|
|
595
|
+
displayName: 'ACH Transaction Code',
|
|
596
|
+
description: 'ACH transaction code (required if payment method is ACH)',
|
|
597
|
+
required: false,
|
|
598
|
+
options: {
|
|
599
|
+
options: [
|
|
600
|
+
{ label: '22 - Demand Deposit', value: '22' },
|
|
601
|
+
{ label: '32 - Savings', value: '32' },
|
|
602
|
+
{ label: '42 - General Ledger Credit', value: '42' },
|
|
603
|
+
],
|
|
604
|
+
},
|
|
605
|
+
}),
|
|
606
|
+
achDestinationRdfi: Property.ShortText({
|
|
607
|
+
displayName: 'ACH Destination RDFI',
|
|
608
|
+
description: 'ACH destination routing number',
|
|
609
|
+
required: false,
|
|
610
|
+
}),
|
|
611
|
+
achBankName: Property.ShortText({
|
|
612
|
+
displayName: 'ACH Bank Name',
|
|
613
|
+
description: 'ACH bank name',
|
|
614
|
+
required: false,
|
|
615
|
+
}),
|
|
616
|
+
achDestinationAccountNumber: Property.ShortText({
|
|
617
|
+
displayName: 'ACH Destination Account Number',
|
|
618
|
+
description: 'ACH destination account number',
|
|
619
|
+
required: false,
|
|
620
|
+
}),
|
|
621
|
+
achDescription: Property.ShortText({
|
|
622
|
+
displayName: 'ACH Description',
|
|
623
|
+
description: 'ACH description',
|
|
624
|
+
required: false,
|
|
625
|
+
}),
|
|
626
|
+
externalCustomerType: Property.StaticDropdown({
|
|
627
|
+
displayName: 'External Customer Type',
|
|
628
|
+
description: 'External customer type (required if payment method is ACH)',
|
|
629
|
+
required: false,
|
|
630
|
+
options: {
|
|
631
|
+
options: [
|
|
632
|
+
{ label: 'C - Consumer', value: 'C' },
|
|
633
|
+
{ label: 'N - Non-Consumer', value: 'N' },
|
|
634
|
+
],
|
|
635
|
+
},
|
|
636
|
+
}),
|
|
637
|
+
additionalFields: Property.Json({
|
|
638
|
+
displayName: 'Additional Fields',
|
|
639
|
+
description: 'Additional fields to include in the request body as JSON object',
|
|
640
|
+
required: false,
|
|
641
|
+
}),
|
|
642
|
+
},
|
|
643
|
+
async run(context) {
|
|
644
|
+
const auth = context.auth as any;
|
|
645
|
+
const baseUrl = auth.baseUrl;
|
|
646
|
+
const organizationId = auth.organizationId;
|
|
647
|
+
const props = context.propsValue;
|
|
648
|
+
|
|
649
|
+
const uuid = crypto.randomUUID();
|
|
650
|
+
|
|
651
|
+
const headers: Record<string, string> = {
|
|
652
|
+
'accept': 'application/json',
|
|
653
|
+
'Content-Type': 'application/json',
|
|
654
|
+
'organization-id': organizationId,
|
|
655
|
+
'uuid': uuid,
|
|
656
|
+
'horizon-authorization': props.xAuthorization,
|
|
657
|
+
};
|
|
658
|
+
|
|
659
|
+
if (props.sourceId) {
|
|
660
|
+
headers['source-id'] = props.sourceId;
|
|
661
|
+
}
|
|
662
|
+
|
|
663
|
+
const body: Record<string, unknown> = {
|
|
664
|
+
applicationCode: props.applicationCode,
|
|
665
|
+
};
|
|
666
|
+
|
|
667
|
+
if (props.productType) {
|
|
668
|
+
body['productType'] = props.productType;
|
|
669
|
+
}
|
|
670
|
+
if (props.currentMaturityDate) {
|
|
671
|
+
body['currentMaturityDate'] = props.currentMaturityDate;
|
|
672
|
+
}
|
|
673
|
+
if (props.maturityTermType) {
|
|
674
|
+
body['maturityTermType'] = props.maturityTermType;
|
|
675
|
+
}
|
|
676
|
+
if (props.maturityOption) {
|
|
677
|
+
body['maturityOption'] = props.maturityOption;
|
|
678
|
+
}
|
|
679
|
+
if (props.maturityTerm) {
|
|
680
|
+
body['maturityTerm'] = props.maturityTerm;
|
|
681
|
+
}
|
|
682
|
+
if (props.generalLedgerType) {
|
|
683
|
+
body['generalLedgerType'] = props.generalLedgerType;
|
|
684
|
+
}
|
|
685
|
+
if (props.renewalProductType) {
|
|
686
|
+
body['renewalProductType'] = props.renewalProductType;
|
|
687
|
+
}
|
|
688
|
+
if (props.penaltyType) {
|
|
689
|
+
body['penaltyType'] = props.penaltyType;
|
|
690
|
+
}
|
|
691
|
+
if (props.officerCode) {
|
|
692
|
+
body['officerCode'] = props.officerCode;
|
|
693
|
+
}
|
|
694
|
+
if (props.nextInterestPaymentDate) {
|
|
695
|
+
body['nextInterestPaymentDate'] = props.nextInterestPaymentDate;
|
|
696
|
+
}
|
|
697
|
+
if (props.interestRate) {
|
|
698
|
+
body['interestRate'] = props.interestRate;
|
|
699
|
+
}
|
|
700
|
+
if (props.plusMinusIndexRate) {
|
|
701
|
+
body['plusMinusIndexRate'] = props.plusMinusIndexRate;
|
|
702
|
+
}
|
|
703
|
+
if (props.percentageIndexRate) {
|
|
704
|
+
body['percentageIndexRate'] = props.percentageIndexRate;
|
|
705
|
+
}
|
|
706
|
+
if (props.interestPeriodTerm) {
|
|
707
|
+
body['interestPeriodTerm'] = props.interestPeriodTerm;
|
|
708
|
+
}
|
|
709
|
+
if (props.interestPeriodType) {
|
|
710
|
+
body['interestPeriodType'] = props.interestPeriodType;
|
|
711
|
+
}
|
|
712
|
+
if (props.interestRateType) {
|
|
713
|
+
body['interestRateType'] = props.interestRateType;
|
|
714
|
+
}
|
|
715
|
+
if (props.interestRateIndex) {
|
|
716
|
+
body['interestRateIndex'] = props.interestRateIndex;
|
|
717
|
+
}
|
|
718
|
+
if (props.interestPaymentMethod) {
|
|
719
|
+
body['interestPaymentMethod'] = props.interestPaymentMethod;
|
|
720
|
+
}
|
|
721
|
+
if (props.gracePeriodInterestControl) {
|
|
722
|
+
body['gracePeriodInterestControl'] = props.gracePeriodInterestControl;
|
|
723
|
+
}
|
|
724
|
+
if (props.gracePeriodRateType) {
|
|
725
|
+
body['gracePeriodRateType'] = props.gracePeriodRateType;
|
|
726
|
+
}
|
|
727
|
+
if (props.userId) {
|
|
728
|
+
body['userId'] = props.userId;
|
|
729
|
+
}
|
|
730
|
+
if (props.overrideMaturity !== undefined && props.overrideMaturity !== null) {
|
|
731
|
+
body['overrideMaturity'] = props.overrideMaturity;
|
|
732
|
+
}
|
|
733
|
+
if (props.overrideNextInterest !== undefined && props.overrideNextInterest !== null) {
|
|
734
|
+
body['overrideNextInterest'] = props.overrideNextInterest;
|
|
735
|
+
}
|
|
736
|
+
if (props.lastRenewalBalance) {
|
|
737
|
+
body['lastRenewalBalance'] = props.lastRenewalBalance;
|
|
738
|
+
}
|
|
739
|
+
if (props.interestTransferToApplication) {
|
|
740
|
+
body['interestTransferToApplication'] = props.interestTransferToApplication;
|
|
741
|
+
}
|
|
742
|
+
if (props.interestTransferToAccount) {
|
|
743
|
+
body['interestTransferToAccount'] = props.interestTransferToAccount;
|
|
744
|
+
}
|
|
745
|
+
if (props.achTransactionCode) {
|
|
746
|
+
body['achTransactionCode'] = props.achTransactionCode;
|
|
747
|
+
}
|
|
748
|
+
if (props.achDestinationRdfi) {
|
|
749
|
+
body['achDestinationRdfi'] = props.achDestinationRdfi;
|
|
750
|
+
}
|
|
751
|
+
if (props.achBankName) {
|
|
752
|
+
body['achBankName'] = props.achBankName;
|
|
753
|
+
}
|
|
754
|
+
if (props.achDestinationAccountNumber) {
|
|
755
|
+
body['achDestinationAccountNumber'] = props.achDestinationAccountNumber;
|
|
756
|
+
}
|
|
757
|
+
if (props.achDescription) {
|
|
758
|
+
body['achDescription'] = props.achDescription;
|
|
759
|
+
}
|
|
760
|
+
if (props.externalCustomerType) {
|
|
761
|
+
body['externalCustomerType'] = props.externalCustomerType;
|
|
762
|
+
}
|
|
763
|
+
|
|
764
|
+
// Merge additional fields if provided
|
|
765
|
+
if (props.additionalFields && typeof props.additionalFields === 'object') {
|
|
766
|
+
Object.assign(body, props.additionalFields);
|
|
767
|
+
}
|
|
768
|
+
|
|
769
|
+
const response = await httpClient.sendRequest({
|
|
770
|
+
method: HttpMethod.POST,
|
|
771
|
+
url: `${baseUrl}${API_PATH}/accounts/time-deposits/${props.accountNumber}/renewals`,
|
|
772
|
+
headers,
|
|
773
|
+
body,
|
|
774
|
+
});
|
|
775
|
+
|
|
776
|
+
return response.body;
|
|
777
|
+
},
|
|
778
|
+
});
|
|
779
|
+
|
|
780
|
+
/**
|
|
781
|
+
* Maintain a certificate or IRA renewal
|
|
782
|
+
*/
|
|
783
|
+
export const time_deposit_renewal_maintain = createAction({
|
|
784
|
+
name: 'time_deposit_renewal_maintain',
|
|
785
|
+
auth: fisHorizonAuth,
|
|
786
|
+
displayName: 'Time Deposit - Maintain Renewal',
|
|
787
|
+
description: 'Maintain a certificate or IRA renewal',
|
|
788
|
+
props: {
|
|
789
|
+
xAuthorization: Property.ShortText({
|
|
790
|
+
displayName: 'Authorization Token (JWT)',
|
|
791
|
+
description: 'The JWT token obtained from the Authorization - Get Token action',
|
|
792
|
+
required: true,
|
|
793
|
+
}),
|
|
794
|
+
sourceId: Property.ShortText({
|
|
795
|
+
displayName: 'Source ID',
|
|
796
|
+
description: 'Optional: 6 character ID provided by FIS',
|
|
797
|
+
required: false,
|
|
798
|
+
}),
|
|
799
|
+
accountNumber: Property.ShortText({
|
|
800
|
+
displayName: 'Account Number',
|
|
801
|
+
description: 'Account Number, right justified zero filled (up to 15 digits)',
|
|
802
|
+
required: true,
|
|
803
|
+
}),
|
|
804
|
+
applicationCode: Property.StaticDropdown({
|
|
805
|
+
displayName: 'Application Code',
|
|
806
|
+
description: 'The application type',
|
|
807
|
+
required: true,
|
|
808
|
+
options: {
|
|
809
|
+
options: [
|
|
810
|
+
{ label: 'C - Certificate', value: 'C' },
|
|
811
|
+
{ label: 'R - IRA', value: 'R' },
|
|
812
|
+
],
|
|
813
|
+
},
|
|
814
|
+
}),
|
|
815
|
+
productType: Property.ShortText({
|
|
816
|
+
displayName: 'Product Type',
|
|
817
|
+
description: 'Product type (up to 3 characters)',
|
|
818
|
+
required: false,
|
|
819
|
+
}),
|
|
820
|
+
currentMaturityDate: Property.ShortText({
|
|
821
|
+
displayName: 'Current Maturity Date',
|
|
822
|
+
description: 'Current maturity date (MMDDYY)',
|
|
823
|
+
required: false,
|
|
824
|
+
}),
|
|
825
|
+
maturityTermType: Property.StaticDropdown({
|
|
826
|
+
displayName: 'Maturity Term Type',
|
|
827
|
+
description: 'Maturity term type',
|
|
828
|
+
required: false,
|
|
829
|
+
options: {
|
|
830
|
+
options: [
|
|
831
|
+
{ label: 'D - Days', value: 'D' },
|
|
832
|
+
{ label: 'M - Months', value: 'M' },
|
|
833
|
+
{ label: 'O - Open Ended', value: 'O' },
|
|
834
|
+
],
|
|
835
|
+
},
|
|
836
|
+
}),
|
|
837
|
+
maturityOption: Property.StaticDropdown({
|
|
838
|
+
displayName: 'Maturity Option',
|
|
839
|
+
description: 'Maturity option',
|
|
840
|
+
required: false,
|
|
841
|
+
options: {
|
|
842
|
+
options: [
|
|
843
|
+
{ label: 'P - Principal only', value: 'P' },
|
|
844
|
+
{ label: 'I - Interest only', value: 'I' },
|
|
845
|
+
{ label: 'B - Both principal and interest', value: 'B' },
|
|
846
|
+
{ label: 'N - No auto renewal', value: 'N' },
|
|
847
|
+
],
|
|
848
|
+
},
|
|
849
|
+
}),
|
|
850
|
+
maturityTerm: Property.ShortText({
|
|
851
|
+
displayName: 'Maturity Term',
|
|
852
|
+
description: 'Maturity term (up to 5 characters)',
|
|
853
|
+
required: false,
|
|
854
|
+
}),
|
|
855
|
+
generalLedgerType: Property.ShortText({
|
|
856
|
+
displayName: 'General Ledger Type',
|
|
857
|
+
description: 'General ledger type (0001-9999)',
|
|
858
|
+
required: false,
|
|
859
|
+
}),
|
|
860
|
+
renewalProductType: Property.ShortText({
|
|
861
|
+
displayName: 'Renewal Product Type',
|
|
862
|
+
description: 'Renewal product type (up to 3 characters)',
|
|
863
|
+
required: false,
|
|
864
|
+
}),
|
|
865
|
+
penaltyType: Property.ShortText({
|
|
866
|
+
displayName: 'Penalty Type',
|
|
867
|
+
description: 'Penalty type (up to 3 characters)',
|
|
868
|
+
required: false,
|
|
869
|
+
}),
|
|
870
|
+
officerCode: Property.ShortText({
|
|
871
|
+
displayName: 'Officer Code',
|
|
872
|
+
description: 'Officer code (up to 3 characters)',
|
|
873
|
+
required: false,
|
|
874
|
+
}),
|
|
875
|
+
nextInterestPaymentDate: Property.ShortText({
|
|
876
|
+
displayName: 'Next Interest Payment Date',
|
|
877
|
+
description: 'Next interest payment date (MMDDYY)',
|
|
878
|
+
required: false,
|
|
879
|
+
}),
|
|
880
|
+
interestRate: Property.ShortText({
|
|
881
|
+
displayName: 'Interest Rate',
|
|
882
|
+
description: 'Interest rate',
|
|
883
|
+
required: false,
|
|
884
|
+
}),
|
|
885
|
+
plusMinusIndexRate: Property.ShortText({
|
|
886
|
+
displayName: 'Plus/Minus Index Rate',
|
|
887
|
+
description: 'Plus or minus index rate',
|
|
888
|
+
required: false,
|
|
889
|
+
}),
|
|
890
|
+
percentageIndexRate: Property.ShortText({
|
|
891
|
+
displayName: 'Percentage Index Rate',
|
|
892
|
+
description: 'Percentage of index rate',
|
|
893
|
+
required: false,
|
|
894
|
+
}),
|
|
895
|
+
interestPeriodTerm: Property.ShortText({
|
|
896
|
+
displayName: 'Interest Period Term',
|
|
897
|
+
description: 'Interest period term (up to 5 characters)',
|
|
898
|
+
required: false,
|
|
899
|
+
}),
|
|
900
|
+
interestPeriodType: Property.StaticDropdown({
|
|
901
|
+
displayName: 'Interest Period Type',
|
|
902
|
+
description: 'Interest period type',
|
|
903
|
+
required: false,
|
|
904
|
+
options: {
|
|
905
|
+
options: [
|
|
906
|
+
{ label: 'D - Days', value: 'D' },
|
|
907
|
+
{ label: 'M - Months', value: 'M' },
|
|
908
|
+
],
|
|
909
|
+
},
|
|
910
|
+
}),
|
|
911
|
+
interestRateType: Property.StaticDropdown({
|
|
912
|
+
displayName: 'Interest Rate Type',
|
|
913
|
+
description: 'Interest rate type',
|
|
914
|
+
required: false,
|
|
915
|
+
options: {
|
|
916
|
+
options: [
|
|
917
|
+
{ label: 'F - Fixed Rate', value: 'F' },
|
|
918
|
+
{ label: 'S - Step Rate', value: 'S' },
|
|
919
|
+
{ label: 'V - Variable Rate', value: 'V' },
|
|
920
|
+
],
|
|
921
|
+
},
|
|
922
|
+
}),
|
|
923
|
+
interestRateIndex: Property.ShortText({
|
|
924
|
+
displayName: 'Interest Rate Index',
|
|
925
|
+
description: 'Interest rate index',
|
|
926
|
+
required: false,
|
|
927
|
+
}),
|
|
928
|
+
interestPaymentMethod: Property.StaticDropdown({
|
|
929
|
+
displayName: 'Interest Payment Method',
|
|
930
|
+
description: 'Interest payment method',
|
|
931
|
+
required: false,
|
|
932
|
+
options: {
|
|
933
|
+
options: [
|
|
934
|
+
{ label: 'A - ACH Transfer', value: 'A' },
|
|
935
|
+
{ label: 'C - Capitalize', value: 'C' },
|
|
936
|
+
{ label: 'K - Check', value: 'K' },
|
|
937
|
+
{ label: 'T - Transfer', value: 'T' },
|
|
938
|
+
],
|
|
939
|
+
},
|
|
940
|
+
}),
|
|
941
|
+
gracePeriodInterestControl: Property.ShortText({
|
|
942
|
+
displayName: 'Grace Period Interest Control',
|
|
943
|
+
description: 'Grace period interest control',
|
|
944
|
+
required: false,
|
|
945
|
+
}),
|
|
946
|
+
gracePeriodRateType: Property.ShortText({
|
|
947
|
+
displayName: 'Grace Period Rate Type',
|
|
948
|
+
description: 'Grace period rate type',
|
|
949
|
+
required: false,
|
|
950
|
+
}),
|
|
951
|
+
userId: Property.ShortText({
|
|
952
|
+
displayName: 'User ID',
|
|
953
|
+
description: 'User ID (up to 10 characters)',
|
|
954
|
+
required: false,
|
|
955
|
+
}),
|
|
956
|
+
overrideMaturity: Property.StaticDropdown({
|
|
957
|
+
displayName: 'Override Maturity',
|
|
958
|
+
description: 'Override maturity date warning',
|
|
959
|
+
required: false,
|
|
960
|
+
options: {
|
|
961
|
+
options: [
|
|
962
|
+
{ label: 'Yes', value: 'Y' },
|
|
963
|
+
{ label: 'No', value: '' },
|
|
964
|
+
],
|
|
965
|
+
},
|
|
966
|
+
}),
|
|
967
|
+
overrideNextInterest: Property.StaticDropdown({
|
|
968
|
+
displayName: 'Override Next Interest',
|
|
969
|
+
description: 'Override next interest payment date warning',
|
|
970
|
+
required: false,
|
|
971
|
+
options: {
|
|
972
|
+
options: [
|
|
973
|
+
{ label: 'Yes', value: 'Y' },
|
|
974
|
+
{ label: 'No', value: '' },
|
|
975
|
+
],
|
|
976
|
+
},
|
|
977
|
+
}),
|
|
978
|
+
lastRenewalBalance: Property.ShortText({
|
|
979
|
+
displayName: 'Last Renewal Balance',
|
|
980
|
+
description: 'Last renewal balance',
|
|
981
|
+
required: false,
|
|
982
|
+
}),
|
|
983
|
+
interestTransferToApplication: Property.StaticDropdown({
|
|
984
|
+
displayName: 'Interest Transfer To Application',
|
|
985
|
+
description: 'Application for interest transfer',
|
|
986
|
+
required: false,
|
|
987
|
+
options: {
|
|
988
|
+
options: [
|
|
989
|
+
{ label: 'CD - Certificate of Deposit', value: 'CD' },
|
|
990
|
+
{ label: 'DD - Demand Deposit', value: 'DD' },
|
|
991
|
+
{ label: 'IR - Retirement', value: 'IR' },
|
|
992
|
+
{ label: 'LN - ELS Loan', value: 'LN' },
|
|
993
|
+
{ label: 'ML - Mortgage Loan', value: 'ML' },
|
|
994
|
+
{ label: 'SV - Savings', value: 'SV' },
|
|
995
|
+
],
|
|
996
|
+
},
|
|
997
|
+
}),
|
|
998
|
+
interestTransferToAccount: Property.ShortText({
|
|
999
|
+
displayName: 'Interest Transfer To Account',
|
|
1000
|
+
description: 'Account number for interest transfer',
|
|
1001
|
+
required: false,
|
|
1002
|
+
}),
|
|
1003
|
+
achTransactionCode: Property.StaticDropdown({
|
|
1004
|
+
displayName: 'ACH Transaction Code',
|
|
1005
|
+
description: 'ACH transaction code (required if payment method is ACH)',
|
|
1006
|
+
required: false,
|
|
1007
|
+
options: {
|
|
1008
|
+
options: [
|
|
1009
|
+
{ label: '22 - Demand Deposit', value: '22' },
|
|
1010
|
+
{ label: '32 - Savings', value: '32' },
|
|
1011
|
+
{ label: '42 - General Ledger Credit', value: '42' },
|
|
1012
|
+
],
|
|
1013
|
+
},
|
|
1014
|
+
}),
|
|
1015
|
+
achDestinationRdfi: Property.ShortText({
|
|
1016
|
+
displayName: 'ACH Destination RDFI',
|
|
1017
|
+
description: 'ACH destination routing number',
|
|
1018
|
+
required: false,
|
|
1019
|
+
}),
|
|
1020
|
+
achBankName: Property.ShortText({
|
|
1021
|
+
displayName: 'ACH Bank Name',
|
|
1022
|
+
description: 'ACH bank name',
|
|
1023
|
+
required: false,
|
|
1024
|
+
}),
|
|
1025
|
+
achDestinationAccountNumber: Property.ShortText({
|
|
1026
|
+
displayName: 'ACH Destination Account Number',
|
|
1027
|
+
description: 'ACH destination account number',
|
|
1028
|
+
required: false,
|
|
1029
|
+
}),
|
|
1030
|
+
achDescription: Property.ShortText({
|
|
1031
|
+
displayName: 'ACH Description',
|
|
1032
|
+
description: 'ACH description',
|
|
1033
|
+
required: false,
|
|
1034
|
+
}),
|
|
1035
|
+
externalCustomerType: Property.StaticDropdown({
|
|
1036
|
+
displayName: 'External Customer Type',
|
|
1037
|
+
description: 'External customer type (required if payment method is ACH)',
|
|
1038
|
+
required: false,
|
|
1039
|
+
options: {
|
|
1040
|
+
options: [
|
|
1041
|
+
{ label: 'C - Consumer', value: 'C' },
|
|
1042
|
+
{ label: 'N - Non-Consumer', value: 'N' },
|
|
1043
|
+
],
|
|
1044
|
+
},
|
|
1045
|
+
}),
|
|
1046
|
+
additionalFields: Property.Json({
|
|
1047
|
+
displayName: 'Additional Fields',
|
|
1048
|
+
description: 'Additional fields to include in the request body as JSON object',
|
|
1049
|
+
required: false,
|
|
1050
|
+
}),
|
|
1051
|
+
},
|
|
1052
|
+
async run(context) {
|
|
1053
|
+
const auth = context.auth as any;
|
|
1054
|
+
const baseUrl = auth.baseUrl;
|
|
1055
|
+
const organizationId = auth.organizationId;
|
|
1056
|
+
const props = context.propsValue;
|
|
1057
|
+
|
|
1058
|
+
const uuid = crypto.randomUUID();
|
|
1059
|
+
|
|
1060
|
+
const headers: Record<string, string> = {
|
|
1061
|
+
'accept': 'application/json',
|
|
1062
|
+
'Content-Type': 'application/json',
|
|
1063
|
+
'organization-id': organizationId,
|
|
1064
|
+
'uuid': uuid,
|
|
1065
|
+
'horizon-authorization': props.xAuthorization,
|
|
1066
|
+
};
|
|
1067
|
+
|
|
1068
|
+
if (props.sourceId) {
|
|
1069
|
+
headers['source-id'] = props.sourceId;
|
|
1070
|
+
}
|
|
1071
|
+
|
|
1072
|
+
const body: Record<string, unknown> = {
|
|
1073
|
+
applicationCode: props.applicationCode,
|
|
1074
|
+
};
|
|
1075
|
+
|
|
1076
|
+
if (props.productType) {
|
|
1077
|
+
body['productType'] = props.productType;
|
|
1078
|
+
}
|
|
1079
|
+
if (props.currentMaturityDate) {
|
|
1080
|
+
body['currentMaturityDate'] = props.currentMaturityDate;
|
|
1081
|
+
}
|
|
1082
|
+
if (props.maturityTermType) {
|
|
1083
|
+
body['maturityTermType'] = props.maturityTermType;
|
|
1084
|
+
}
|
|
1085
|
+
if (props.maturityOption) {
|
|
1086
|
+
body['maturityOption'] = props.maturityOption;
|
|
1087
|
+
}
|
|
1088
|
+
if (props.maturityTerm) {
|
|
1089
|
+
body['maturityTerm'] = props.maturityTerm;
|
|
1090
|
+
}
|
|
1091
|
+
if (props.generalLedgerType) {
|
|
1092
|
+
body['generalLedgerType'] = props.generalLedgerType;
|
|
1093
|
+
}
|
|
1094
|
+
if (props.renewalProductType) {
|
|
1095
|
+
body['renewalProductType'] = props.renewalProductType;
|
|
1096
|
+
}
|
|
1097
|
+
if (props.penaltyType) {
|
|
1098
|
+
body['penaltyType'] = props.penaltyType;
|
|
1099
|
+
}
|
|
1100
|
+
if (props.officerCode) {
|
|
1101
|
+
body['officerCode'] = props.officerCode;
|
|
1102
|
+
}
|
|
1103
|
+
if (props.nextInterestPaymentDate) {
|
|
1104
|
+
body['nextInterestPaymentDate'] = props.nextInterestPaymentDate;
|
|
1105
|
+
}
|
|
1106
|
+
if (props.interestRate) {
|
|
1107
|
+
body['interestRate'] = props.interestRate;
|
|
1108
|
+
}
|
|
1109
|
+
if (props.plusMinusIndexRate) {
|
|
1110
|
+
body['plusMinusIndexRate'] = props.plusMinusIndexRate;
|
|
1111
|
+
}
|
|
1112
|
+
if (props.percentageIndexRate) {
|
|
1113
|
+
body['percentageIndexRate'] = props.percentageIndexRate;
|
|
1114
|
+
}
|
|
1115
|
+
if (props.interestPeriodTerm) {
|
|
1116
|
+
body['interestPeriodTerm'] = props.interestPeriodTerm;
|
|
1117
|
+
}
|
|
1118
|
+
if (props.interestPeriodType) {
|
|
1119
|
+
body['interestPeriodType'] = props.interestPeriodType;
|
|
1120
|
+
}
|
|
1121
|
+
if (props.interestRateType) {
|
|
1122
|
+
body['interestRateType'] = props.interestRateType;
|
|
1123
|
+
}
|
|
1124
|
+
if (props.interestRateIndex) {
|
|
1125
|
+
body['interestRateIndex'] = props.interestRateIndex;
|
|
1126
|
+
}
|
|
1127
|
+
if (props.interestPaymentMethod) {
|
|
1128
|
+
body['interestPaymentMethod'] = props.interestPaymentMethod;
|
|
1129
|
+
}
|
|
1130
|
+
if (props.gracePeriodInterestControl) {
|
|
1131
|
+
body['gracePeriodInterestControl'] = props.gracePeriodInterestControl;
|
|
1132
|
+
}
|
|
1133
|
+
if (props.gracePeriodRateType) {
|
|
1134
|
+
body['gracePeriodRateType'] = props.gracePeriodRateType;
|
|
1135
|
+
}
|
|
1136
|
+
if (props.userId) {
|
|
1137
|
+
body['userId'] = props.userId;
|
|
1138
|
+
}
|
|
1139
|
+
if (props.overrideMaturity !== undefined && props.overrideMaturity !== null) {
|
|
1140
|
+
body['overrideMaturity'] = props.overrideMaturity;
|
|
1141
|
+
}
|
|
1142
|
+
if (props.overrideNextInterest !== undefined && props.overrideNextInterest !== null) {
|
|
1143
|
+
body['overrideNextInterest'] = props.overrideNextInterest;
|
|
1144
|
+
}
|
|
1145
|
+
if (props.lastRenewalBalance) {
|
|
1146
|
+
body['lastRenewalBalance'] = props.lastRenewalBalance;
|
|
1147
|
+
}
|
|
1148
|
+
if (props.interestTransferToApplication) {
|
|
1149
|
+
body['interestTransferToApplication'] = props.interestTransferToApplication;
|
|
1150
|
+
}
|
|
1151
|
+
if (props.interestTransferToAccount) {
|
|
1152
|
+
body['interestTransferToAccount'] = props.interestTransferToAccount;
|
|
1153
|
+
}
|
|
1154
|
+
if (props.achTransactionCode) {
|
|
1155
|
+
body['achTransactionCode'] = props.achTransactionCode;
|
|
1156
|
+
}
|
|
1157
|
+
if (props.achDestinationRdfi) {
|
|
1158
|
+
body['achDestinationRdfi'] = props.achDestinationRdfi;
|
|
1159
|
+
}
|
|
1160
|
+
if (props.achBankName) {
|
|
1161
|
+
body['achBankName'] = props.achBankName;
|
|
1162
|
+
}
|
|
1163
|
+
if (props.achDestinationAccountNumber) {
|
|
1164
|
+
body['achDestinationAccountNumber'] = props.achDestinationAccountNumber;
|
|
1165
|
+
}
|
|
1166
|
+
if (props.achDescription) {
|
|
1167
|
+
body['achDescription'] = props.achDescription;
|
|
1168
|
+
}
|
|
1169
|
+
if (props.externalCustomerType) {
|
|
1170
|
+
body['externalCustomerType'] = props.externalCustomerType;
|
|
1171
|
+
}
|
|
1172
|
+
|
|
1173
|
+
// Merge additional fields if provided
|
|
1174
|
+
if (props.additionalFields && typeof props.additionalFields === 'object') {
|
|
1175
|
+
Object.assign(body, props.additionalFields);
|
|
1176
|
+
}
|
|
1177
|
+
|
|
1178
|
+
const response = await httpClient.sendRequest({
|
|
1179
|
+
method: HttpMethod.PUT,
|
|
1180
|
+
url: `${baseUrl}${API_PATH}/accounts/time-deposits/${props.accountNumber}/renewals`,
|
|
1181
|
+
headers,
|
|
1182
|
+
body,
|
|
1183
|
+
});
|
|
1184
|
+
|
|
1185
|
+
return response.body;
|
|
1186
|
+
},
|
|
1187
|
+
});
|
|
1188
|
+
|
|
1189
|
+
/**
|
|
1190
|
+
* Delete a certificate or IRA renewal
|
|
1191
|
+
*/
|
|
1192
|
+
export const time_deposit_renewal_delete = createAction({
|
|
1193
|
+
name: 'time_deposit_renewal_delete',
|
|
1194
|
+
auth: fisHorizonAuth,
|
|
1195
|
+
displayName: 'Time Deposit - Delete Renewal',
|
|
1196
|
+
description: 'Delete a certificate or IRA renewal',
|
|
1197
|
+
props: {
|
|
1198
|
+
xAuthorization: Property.ShortText({
|
|
1199
|
+
displayName: 'Authorization Token (JWT)',
|
|
1200
|
+
description: 'The JWT token obtained from the Authorization - Get Token action',
|
|
1201
|
+
required: true,
|
|
1202
|
+
}),
|
|
1203
|
+
sourceId: Property.ShortText({
|
|
1204
|
+
displayName: 'Source ID',
|
|
1205
|
+
description: 'Optional: 6 character ID provided by FIS',
|
|
1206
|
+
required: false,
|
|
1207
|
+
}),
|
|
1208
|
+
accountNumber: Property.ShortText({
|
|
1209
|
+
displayName: 'Account Number',
|
|
1210
|
+
description: 'Account Number, right justified zero filled (up to 15 digits)',
|
|
1211
|
+
required: true,
|
|
1212
|
+
}),
|
|
1213
|
+
applicationCode: Property.StaticDropdown({
|
|
1214
|
+
displayName: 'Application Code',
|
|
1215
|
+
description: 'The application type',
|
|
1216
|
+
required: true,
|
|
1217
|
+
options: {
|
|
1218
|
+
options: [
|
|
1219
|
+
{ label: 'C - Certificates', value: 'C' },
|
|
1220
|
+
{ label: 'R - IRA', value: 'R' },
|
|
1221
|
+
],
|
|
1222
|
+
},
|
|
1223
|
+
}),
|
|
1224
|
+
generalLedgerType: Property.ShortText({
|
|
1225
|
+
displayName: 'General Ledger Type',
|
|
1226
|
+
description: 'Optional: General ledger type (0001-9999)',
|
|
1227
|
+
required: false,
|
|
1228
|
+
}),
|
|
1229
|
+
},
|
|
1230
|
+
async run(context) {
|
|
1231
|
+
const auth = context.auth as any;
|
|
1232
|
+
const baseUrl = auth.baseUrl;
|
|
1233
|
+
const organizationId = auth.organizationId;
|
|
1234
|
+
const props = context.propsValue;
|
|
1235
|
+
|
|
1236
|
+
const uuid = crypto.randomUUID();
|
|
1237
|
+
|
|
1238
|
+
const headers: Record<string, string> = {
|
|
1239
|
+
'accept': 'application/json',
|
|
1240
|
+
'organization-id': organizationId,
|
|
1241
|
+
'uuid': uuid,
|
|
1242
|
+
'horizon-authorization': props.xAuthorization,
|
|
1243
|
+
};
|
|
1244
|
+
|
|
1245
|
+
if (props.sourceId) {
|
|
1246
|
+
headers['source-id'] = props.sourceId;
|
|
1247
|
+
}
|
|
1248
|
+
|
|
1249
|
+
const queryParams: Record<string, string> = {
|
|
1250
|
+
applicationCode: props.applicationCode,
|
|
1251
|
+
};
|
|
1252
|
+
if (props.generalLedgerType) {
|
|
1253
|
+
queryParams['generalLedgerType'] = props.generalLedgerType;
|
|
1254
|
+
}
|
|
1255
|
+
|
|
1256
|
+
const queryString = '?' + new URLSearchParams(queryParams).toString();
|
|
1257
|
+
|
|
1258
|
+
const response = await httpClient.sendRequest({
|
|
1259
|
+
method: HttpMethod.DELETE,
|
|
1260
|
+
url: `${baseUrl}${API_PATH}/accounts/time-deposits/${props.accountNumber}/renewals${queryString}`,
|
|
1261
|
+
headers,
|
|
1262
|
+
});
|
|
1263
|
+
|
|
1264
|
+
return response.body;
|
|
1265
|
+
},
|
|
1266
|
+
});
|
|
1267
|
+
|
|
1268
|
+
/**
|
|
1269
|
+
* Add a certificate account
|
|
1270
|
+
*/
|
|
1271
|
+
export const time_deposit_certificate_add = createAction({
|
|
1272
|
+
name: 'time_deposit_certificate_add',
|
|
1273
|
+
auth: fisHorizonAuth,
|
|
1274
|
+
displayName: 'Time Deposit - Add Certificate Account',
|
|
1275
|
+
description: 'Add a certificate account',
|
|
1276
|
+
props: {
|
|
1277
|
+
xAuthorization: Property.ShortText({
|
|
1278
|
+
displayName: 'Authorization Token (JWT)',
|
|
1279
|
+
description: 'The JWT token obtained from the Authorization - Get Token action',
|
|
1280
|
+
required: true,
|
|
1281
|
+
}),
|
|
1282
|
+
sourceId: Property.ShortText({
|
|
1283
|
+
displayName: 'Source ID',
|
|
1284
|
+
description: 'Optional: 6 character ID provided by FIS',
|
|
1285
|
+
required: false,
|
|
1286
|
+
}),
|
|
1287
|
+
customerId: Property.ShortText({
|
|
1288
|
+
displayName: 'Customer ID',
|
|
1289
|
+
description: 'Customer ID (up to 14 characters)',
|
|
1290
|
+
required: true,
|
|
1291
|
+
}),
|
|
1292
|
+
accountNumber: Property.ShortText({
|
|
1293
|
+
displayName: 'Account Number',
|
|
1294
|
+
description: 'Account Number (up to 15 characters)',
|
|
1295
|
+
required: true,
|
|
1296
|
+
}),
|
|
1297
|
+
productType: Property.ShortText({
|
|
1298
|
+
displayName: 'Product Type',
|
|
1299
|
+
description: 'Product type (up to 3 characters)',
|
|
1300
|
+
required: true,
|
|
1301
|
+
}),
|
|
1302
|
+
branchNumber: Property.ShortText({
|
|
1303
|
+
displayName: 'Branch Number',
|
|
1304
|
+
description: 'Branch number (up to 3 characters)',
|
|
1305
|
+
required: true,
|
|
1306
|
+
}),
|
|
1307
|
+
tinStatus: Property.StaticDropdown({
|
|
1308
|
+
displayName: 'TIN Status',
|
|
1309
|
+
description: 'Tax Identification Number status',
|
|
1310
|
+
required: true,
|
|
1311
|
+
options: {
|
|
1312
|
+
options: [
|
|
1313
|
+
{ label: 'B - B-Notice Received', value: 'B' },
|
|
1314
|
+
{ label: 'C - Certified', value: 'C' },
|
|
1315
|
+
{ label: 'E - Exempt', value: 'E' },
|
|
1316
|
+
{ label: 'N - Not Certified', value: 'N' },
|
|
1317
|
+
{ label: 'O - No TIN Number', value: 'O' },
|
|
1318
|
+
{ label: 'P - TIN Applied For', value: 'P' },
|
|
1319
|
+
{ label: 'U - IRS Notice of Under Reporting', value: 'U' },
|
|
1320
|
+
{ label: 'W - Exemption Expired', value: 'W' },
|
|
1321
|
+
{ label: 'X - Voluntary Withholding', value: 'X' },
|
|
1322
|
+
],
|
|
1323
|
+
},
|
|
1324
|
+
}),
|
|
1325
|
+
openingAmount: Property.ShortText({
|
|
1326
|
+
displayName: 'Opening Amount',
|
|
1327
|
+
description: 'Opening amount (e.g., 200.00)',
|
|
1328
|
+
required: true,
|
|
1329
|
+
}),
|
|
1330
|
+
effectiveOpenDate: Property.ShortText({
|
|
1331
|
+
displayName: 'Effective Open Date',
|
|
1332
|
+
description: 'Effective open date (MMDDYY)',
|
|
1333
|
+
required: true,
|
|
1334
|
+
}),
|
|
1335
|
+
shortName: Property.ShortText({
|
|
1336
|
+
displayName: 'Short Name',
|
|
1337
|
+
description: 'Customer short name (up to 20 characters)',
|
|
1338
|
+
required: true,
|
|
1339
|
+
}),
|
|
1340
|
+
generalLedgerType: Property.ShortText({
|
|
1341
|
+
displayName: 'General Ledger Type',
|
|
1342
|
+
description: 'General ledger type (0001-9999)',
|
|
1343
|
+
required: true,
|
|
1344
|
+
}),
|
|
1345
|
+
personalNonPersonal: Property.StaticDropdown({
|
|
1346
|
+
displayName: 'Personal/Non-Personal',
|
|
1347
|
+
description: 'Personal or non-personal account',
|
|
1348
|
+
required: true,
|
|
1349
|
+
options: {
|
|
1350
|
+
options: [
|
|
1351
|
+
{ label: 'P - Personal', value: 'P' },
|
|
1352
|
+
{ label: 'N - Non-Personal', value: 'N' },
|
|
1353
|
+
],
|
|
1354
|
+
},
|
|
1355
|
+
}),
|
|
1356
|
+
passbookAccount: Property.StaticDropdown({
|
|
1357
|
+
displayName: 'Passbook Account',
|
|
1358
|
+
description: 'Is this a passbook account?',
|
|
1359
|
+
required: true,
|
|
1360
|
+
options: {
|
|
1361
|
+
options: [
|
|
1362
|
+
{ label: 'N - Not a Passbook Account', value: 'N' },
|
|
1363
|
+
{ label: 'Y - Passbook Account', value: 'Y' },
|
|
1364
|
+
],
|
|
1365
|
+
},
|
|
1366
|
+
}),
|
|
1367
|
+
rateIndex: Property.ShortText({
|
|
1368
|
+
displayName: 'Rate Index',
|
|
1369
|
+
description: 'Rate index (up to 3 characters)',
|
|
1370
|
+
required: true,
|
|
1371
|
+
}),
|
|
1372
|
+
interestYearBase: Property.StaticDropdown({
|
|
1373
|
+
displayName: 'Interest Year Base',
|
|
1374
|
+
description: 'Interest year base calculation',
|
|
1375
|
+
required: true,
|
|
1376
|
+
options: {
|
|
1377
|
+
options: [
|
|
1378
|
+
{ label: '1 - 30/360', value: 1 },
|
|
1379
|
+
{ label: '2 - 30/365', value: 2 },
|
|
1380
|
+
{ label: '3 - Actual/360', value: 3 },
|
|
1381
|
+
{ label: '4 - Actual/365', value: 4 },
|
|
1382
|
+
],
|
|
1383
|
+
},
|
|
1384
|
+
}),
|
|
1385
|
+
maturityTerm: Property.ShortText({
|
|
1386
|
+
displayName: 'Maturity Term',
|
|
1387
|
+
description: 'Maturity term',
|
|
1388
|
+
required: true,
|
|
1389
|
+
}),
|
|
1390
|
+
maturityTermType: Property.StaticDropdown({
|
|
1391
|
+
displayName: 'Maturity Term Type',
|
|
1392
|
+
description: 'Maturity term type',
|
|
1393
|
+
required: true,
|
|
1394
|
+
options: {
|
|
1395
|
+
options: [
|
|
1396
|
+
{ label: 'D - Days', value: 'D' },
|
|
1397
|
+
{ label: 'M - Months', value: 'M' },
|
|
1398
|
+
{ label: 'O - Open Ended', value: 'O' },
|
|
1399
|
+
],
|
|
1400
|
+
},
|
|
1401
|
+
}),
|
|
1402
|
+
interestPeriodTerm: Property.ShortText({
|
|
1403
|
+
displayName: 'Interest Period Term',
|
|
1404
|
+
description: 'Interest period term',
|
|
1405
|
+
required: true,
|
|
1406
|
+
}),
|
|
1407
|
+
interestPeriodType: Property.StaticDropdown({
|
|
1408
|
+
displayName: 'Interest Period Type',
|
|
1409
|
+
description: 'Interest period type',
|
|
1410
|
+
required: true,
|
|
1411
|
+
options: {
|
|
1412
|
+
options: [
|
|
1413
|
+
{ label: 'D - Days', value: 'D' },
|
|
1414
|
+
{ label: 'M - Months', value: 'M' },
|
|
1415
|
+
],
|
|
1416
|
+
},
|
|
1417
|
+
}),
|
|
1418
|
+
paymentMethod: Property.StaticDropdown({
|
|
1419
|
+
displayName: 'Payment Method',
|
|
1420
|
+
description: 'Interest payment method',
|
|
1421
|
+
required: true,
|
|
1422
|
+
options: {
|
|
1423
|
+
options: [
|
|
1424
|
+
{ label: 'A - ACH Transfer', value: 'A' },
|
|
1425
|
+
{ label: 'C - Capitalize', value: 'C' },
|
|
1426
|
+
{ label: 'K - Check', value: 'K' },
|
|
1427
|
+
{ label: 'T - Transfer', value: 'T' },
|
|
1428
|
+
],
|
|
1429
|
+
},
|
|
1430
|
+
}),
|
|
1431
|
+
interestRate: Property.ShortText({
|
|
1432
|
+
displayName: 'Interest Rate',
|
|
1433
|
+
description: 'Interest rate (e.g., 6.2500)',
|
|
1434
|
+
required: true,
|
|
1435
|
+
}),
|
|
1436
|
+
interestRateType: Property.StaticDropdown({
|
|
1437
|
+
displayName: 'Interest Rate Type',
|
|
1438
|
+
description: 'Interest rate type',
|
|
1439
|
+
required: true,
|
|
1440
|
+
options: {
|
|
1441
|
+
options: [
|
|
1442
|
+
{ label: 'F - Fixed Rate', value: 'F' },
|
|
1443
|
+
{ label: 'S - Step Rate', value: 'S' },
|
|
1444
|
+
{ label: 'V - Variable Rate', value: 'V' },
|
|
1445
|
+
],
|
|
1446
|
+
},
|
|
1447
|
+
}),
|
|
1448
|
+
compoundFrequency: Property.StaticDropdown({
|
|
1449
|
+
displayName: 'Compound Frequency',
|
|
1450
|
+
description: 'Compound frequency',
|
|
1451
|
+
required: true,
|
|
1452
|
+
options: {
|
|
1453
|
+
options: [
|
|
1454
|
+
{ label: 'C - Daily', value: 'C' },
|
|
1455
|
+
{ label: 'P - Periodic', value: 'P' },
|
|
1456
|
+
{ label: 'S - Simple', value: 'S' },
|
|
1457
|
+
],
|
|
1458
|
+
},
|
|
1459
|
+
}),
|
|
1460
|
+
combinedChecks: Property.StaticDropdown({
|
|
1461
|
+
displayName: 'Combined Checks',
|
|
1462
|
+
description: 'Combined checks',
|
|
1463
|
+
required: true,
|
|
1464
|
+
options: {
|
|
1465
|
+
options: [
|
|
1466
|
+
{ label: 'Y - Yes', value: 'Y' },
|
|
1467
|
+
{ label: 'N - No', value: 'N' },
|
|
1468
|
+
],
|
|
1469
|
+
},
|
|
1470
|
+
}),
|
|
1471
|
+
combinedInterestNotices: Property.StaticDropdown({
|
|
1472
|
+
displayName: 'Combined Interest Notices',
|
|
1473
|
+
description: 'Combined interest notices',
|
|
1474
|
+
required: true,
|
|
1475
|
+
options: {
|
|
1476
|
+
options: [
|
|
1477
|
+
{ label: 'Y - Yes', value: 'Y' },
|
|
1478
|
+
{ label: 'N - No', value: 'N' },
|
|
1479
|
+
],
|
|
1480
|
+
},
|
|
1481
|
+
}),
|
|
1482
|
+
controlMaturity: Property.StaticDropdown({
|
|
1483
|
+
displayName: 'Control Maturity',
|
|
1484
|
+
description: 'Control maturity',
|
|
1485
|
+
required: true,
|
|
1486
|
+
options: {
|
|
1487
|
+
options: [
|
|
1488
|
+
{ label: 'Y - Yes', value: 'Y' },
|
|
1489
|
+
{ label: 'N - No', value: 'N' },
|
|
1490
|
+
],
|
|
1491
|
+
},
|
|
1492
|
+
}),
|
|
1493
|
+
maturityOption: Property.StaticDropdown({
|
|
1494
|
+
displayName: 'Maturity Option',
|
|
1495
|
+
description: 'Maturity option',
|
|
1496
|
+
required: true,
|
|
1497
|
+
options: {
|
|
1498
|
+
options: [
|
|
1499
|
+
{ label: 'P - Principal only', value: 'P' },
|
|
1500
|
+
{ label: 'I - Interest only', value: 'I' },
|
|
1501
|
+
{ label: 'B - Both principal and interest', value: 'B' },
|
|
1502
|
+
{ label: 'N - No auto renewal', value: 'N' },
|
|
1503
|
+
],
|
|
1504
|
+
},
|
|
1505
|
+
}),
|
|
1506
|
+
autoCloseCode: Property.StaticDropdown({
|
|
1507
|
+
displayName: 'Auto Close Code',
|
|
1508
|
+
description: 'Auto close code',
|
|
1509
|
+
required: true,
|
|
1510
|
+
options: {
|
|
1511
|
+
options: [
|
|
1512
|
+
{ label: 'Y - Yes', value: 'Y' },
|
|
1513
|
+
{ label: 'N - No', value: 'N' },
|
|
1514
|
+
],
|
|
1515
|
+
},
|
|
1516
|
+
}),
|
|
1517
|
+
mailSortCode: Property.ShortText({
|
|
1518
|
+
displayName: 'Mail Sort Code',
|
|
1519
|
+
description: 'Mail sort code',
|
|
1520
|
+
required: true,
|
|
1521
|
+
}),
|
|
1522
|
+
statementType: Property.ShortText({
|
|
1523
|
+
displayName: 'Statement Type',
|
|
1524
|
+
description: 'Statement type',
|
|
1525
|
+
required: true,
|
|
1526
|
+
}),
|
|
1527
|
+
printApyeOnStatement: Property.StaticDropdown({
|
|
1528
|
+
displayName: 'Print APYE On Statement',
|
|
1529
|
+
description: 'Print APYE on statement',
|
|
1530
|
+
required: true,
|
|
1531
|
+
options: {
|
|
1532
|
+
options: [
|
|
1533
|
+
{ label: 'Y - Yes', value: 'Y' },
|
|
1534
|
+
{ label: 'N - No', value: 'N' },
|
|
1535
|
+
],
|
|
1536
|
+
},
|
|
1537
|
+
}),
|
|
1538
|
+
purgeControlCode: Property.ShortText({
|
|
1539
|
+
displayName: 'Purge Control Code',
|
|
1540
|
+
description: 'Purge control code',
|
|
1541
|
+
required: true,
|
|
1542
|
+
}),
|
|
1543
|
+
alternateWithholdingMethod: Property.ShortText({
|
|
1544
|
+
displayName: 'Alternate Withholding Method',
|
|
1545
|
+
description: 'Alternate withholding method',
|
|
1546
|
+
required: true,
|
|
1547
|
+
}),
|
|
1548
|
+
additionalFields: Property.Json({
|
|
1549
|
+
displayName: 'Additional Fields',
|
|
1550
|
+
description: 'Additional fields to include in the request body as JSON object',
|
|
1551
|
+
required: false,
|
|
1552
|
+
}),
|
|
1553
|
+
},
|
|
1554
|
+
async run(context) {
|
|
1555
|
+
const auth = context.auth as any;
|
|
1556
|
+
const baseUrl = auth.baseUrl;
|
|
1557
|
+
const organizationId = auth.organizationId;
|
|
1558
|
+
const props = context.propsValue;
|
|
1559
|
+
|
|
1560
|
+
const uuid = crypto.randomUUID();
|
|
1561
|
+
|
|
1562
|
+
const headers: Record<string, string> = {
|
|
1563
|
+
'accept': 'application/json',
|
|
1564
|
+
'Content-Type': 'application/json',
|
|
1565
|
+
'organization-id': organizationId,
|
|
1566
|
+
'uuid': uuid,
|
|
1567
|
+
'horizon-authorization': props.xAuthorization,
|
|
1568
|
+
};
|
|
1569
|
+
|
|
1570
|
+
if (props.sourceId) {
|
|
1571
|
+
headers['source-id'] = props.sourceId;
|
|
1572
|
+
}
|
|
1573
|
+
|
|
1574
|
+
const body: Record<string, unknown> = {
|
|
1575
|
+
customerId: props.customerId,
|
|
1576
|
+
accountNumber: props.accountNumber,
|
|
1577
|
+
productType: props.productType,
|
|
1578
|
+
branchNumber: props.branchNumber,
|
|
1579
|
+
tinStatus: props.tinStatus,
|
|
1580
|
+
openingAmount: props.openingAmount,
|
|
1581
|
+
effectiveOpenDate: props.effectiveOpenDate,
|
|
1582
|
+
shortName: props.shortName,
|
|
1583
|
+
generalLedgerType: props.generalLedgerType,
|
|
1584
|
+
personalNonPersonal: props.personalNonPersonal,
|
|
1585
|
+
passbookAccount: props.passbookAccount,
|
|
1586
|
+
rateIndex: props.rateIndex,
|
|
1587
|
+
interestYearBase: props.interestYearBase,
|
|
1588
|
+
maturityTerm: props.maturityTerm,
|
|
1589
|
+
maturityTermType: props.maturityTermType,
|
|
1590
|
+
interestPeriodTerm: props.interestPeriodTerm,
|
|
1591
|
+
interestPeriodType: props.interestPeriodType,
|
|
1592
|
+
paymentMethod: props.paymentMethod,
|
|
1593
|
+
interestRate: props.interestRate,
|
|
1594
|
+
interestRateType: props.interestRateType,
|
|
1595
|
+
compoundFrequency: props.compoundFrequency,
|
|
1596
|
+
combinedChecks: props.combinedChecks,
|
|
1597
|
+
combinedInterestNotices: props.combinedInterestNotices,
|
|
1598
|
+
controlMaturity: props.controlMaturity,
|
|
1599
|
+
maturityOption: props.maturityOption,
|
|
1600
|
+
autoCloseCode: props.autoCloseCode,
|
|
1601
|
+
mailSortCode: props.mailSortCode,
|
|
1602
|
+
statementType: props.statementType,
|
|
1603
|
+
printApyeOnStatement: props.printApyeOnStatement,
|
|
1604
|
+
purgeControlCode: props.purgeControlCode,
|
|
1605
|
+
alternateWithholdingMethod: props.alternateWithholdingMethod,
|
|
1606
|
+
};
|
|
1607
|
+
|
|
1608
|
+
// Merge additional fields if provided
|
|
1609
|
+
if (props.additionalFields && typeof props.additionalFields === 'object') {
|
|
1610
|
+
Object.assign(body, props.additionalFields);
|
|
1611
|
+
}
|
|
1612
|
+
|
|
1613
|
+
const response = await httpClient.sendRequest({
|
|
1614
|
+
method: HttpMethod.POST,
|
|
1615
|
+
url: `${baseUrl}${API_PATH}/accounts/time-deposits/certificates`,
|
|
1616
|
+
headers,
|
|
1617
|
+
body,
|
|
1618
|
+
});
|
|
1619
|
+
|
|
1620
|
+
return response.body;
|
|
1621
|
+
},
|
|
1622
|
+
});
|
|
1623
|
+
|
|
1624
|
+
/**
|
|
1625
|
+
* Add a certificate account to staging
|
|
1626
|
+
*/
|
|
1627
|
+
export const time_deposit_certificate_add_staging = createAction({
|
|
1628
|
+
name: 'time_deposit_certificate_add_staging',
|
|
1629
|
+
auth: fisHorizonAuth,
|
|
1630
|
+
displayName: 'Time Deposit - Add Certificate Account to Staging',
|
|
1631
|
+
description: 'Add a certificate account to staging',
|
|
1632
|
+
props: {
|
|
1633
|
+
xAuthorization: Property.ShortText({
|
|
1634
|
+
displayName: 'Authorization Token (JWT)',
|
|
1635
|
+
description: 'The JWT token obtained from the Authorization - Get Token action',
|
|
1636
|
+
required: true,
|
|
1637
|
+
}),
|
|
1638
|
+
sourceId: Property.ShortText({
|
|
1639
|
+
displayName: 'Source ID',
|
|
1640
|
+
description: 'Optional: 6 character ID provided by FIS',
|
|
1641
|
+
required: false,
|
|
1642
|
+
}),
|
|
1643
|
+
customerId: Property.ShortText({
|
|
1644
|
+
displayName: 'Customer ID',
|
|
1645
|
+
description: 'Customer ID (up to 14 characters)',
|
|
1646
|
+
required: true,
|
|
1647
|
+
}),
|
|
1648
|
+
accountNumber: Property.ShortText({
|
|
1649
|
+
displayName: 'Account Number',
|
|
1650
|
+
description: 'Account Number (up to 15 characters)',
|
|
1651
|
+
required: true,
|
|
1652
|
+
}),
|
|
1653
|
+
productType: Property.ShortText({
|
|
1654
|
+
displayName: 'Product Type',
|
|
1655
|
+
description: 'Product type (up to 3 characters)',
|
|
1656
|
+
required: true,
|
|
1657
|
+
}),
|
|
1658
|
+
branchNumber: Property.ShortText({
|
|
1659
|
+
displayName: 'Branch Number',
|
|
1660
|
+
description: 'Branch number (up to 3 characters)',
|
|
1661
|
+
required: true,
|
|
1662
|
+
}),
|
|
1663
|
+
tinStatus: Property.StaticDropdown({
|
|
1664
|
+
displayName: 'TIN Status',
|
|
1665
|
+
description: 'Tax Identification Number status',
|
|
1666
|
+
required: true,
|
|
1667
|
+
options: {
|
|
1668
|
+
options: [
|
|
1669
|
+
{ label: 'B - B-Notice Received', value: 'B' },
|
|
1670
|
+
{ label: 'C - Certified', value: 'C' },
|
|
1671
|
+
{ label: 'E - Exempt', value: 'E' },
|
|
1672
|
+
{ label: 'N - Not Certified', value: 'N' },
|
|
1673
|
+
{ label: 'O - No TIN Number', value: 'O' },
|
|
1674
|
+
{ label: 'P - TIN Applied For', value: 'P' },
|
|
1675
|
+
{ label: 'U - IRS Notice of Under Reporting', value: 'U' },
|
|
1676
|
+
{ label: 'W - Exemption Expired', value: 'W' },
|
|
1677
|
+
{ label: 'X - Voluntary Withholding', value: 'X' },
|
|
1678
|
+
],
|
|
1679
|
+
},
|
|
1680
|
+
}),
|
|
1681
|
+
openingAmount: Property.ShortText({
|
|
1682
|
+
displayName: 'Opening Amount',
|
|
1683
|
+
description: 'Opening amount (e.g., 200.00)',
|
|
1684
|
+
required: true,
|
|
1685
|
+
}),
|
|
1686
|
+
effectiveOpenDate: Property.ShortText({
|
|
1687
|
+
displayName: 'Effective Open Date',
|
|
1688
|
+
description: 'Effective open date (MMDDYY)',
|
|
1689
|
+
required: true,
|
|
1690
|
+
}),
|
|
1691
|
+
shortName: Property.ShortText({
|
|
1692
|
+
displayName: 'Short Name',
|
|
1693
|
+
description: 'Customer short name (up to 20 characters)',
|
|
1694
|
+
required: true,
|
|
1695
|
+
}),
|
|
1696
|
+
generalLedgerType: Property.ShortText({
|
|
1697
|
+
displayName: 'General Ledger Type',
|
|
1698
|
+
description: 'General ledger type (0001-9999)',
|
|
1699
|
+
required: true,
|
|
1700
|
+
}),
|
|
1701
|
+
personalNonPersonal: Property.StaticDropdown({
|
|
1702
|
+
displayName: 'Personal/Non-Personal',
|
|
1703
|
+
description: 'Personal or non-personal account',
|
|
1704
|
+
required: true,
|
|
1705
|
+
options: {
|
|
1706
|
+
options: [
|
|
1707
|
+
{ label: 'P - Personal', value: 'P' },
|
|
1708
|
+
{ label: 'N - Non-Personal', value: 'N' },
|
|
1709
|
+
],
|
|
1710
|
+
},
|
|
1711
|
+
}),
|
|
1712
|
+
passbookAccount: Property.StaticDropdown({
|
|
1713
|
+
displayName: 'Passbook Account',
|
|
1714
|
+
description: 'Is this a passbook account?',
|
|
1715
|
+
required: true,
|
|
1716
|
+
options: {
|
|
1717
|
+
options: [
|
|
1718
|
+
{ label: 'N - Not a Passbook Account', value: 'N' },
|
|
1719
|
+
{ label: 'Y - Passbook Account', value: 'Y' },
|
|
1720
|
+
],
|
|
1721
|
+
},
|
|
1722
|
+
}),
|
|
1723
|
+
rateIndex: Property.ShortText({
|
|
1724
|
+
displayName: 'Rate Index',
|
|
1725
|
+
description: 'Rate index (up to 3 characters)',
|
|
1726
|
+
required: true,
|
|
1727
|
+
}),
|
|
1728
|
+
interestYearBase: Property.StaticDropdown({
|
|
1729
|
+
displayName: 'Interest Year Base',
|
|
1730
|
+
description: 'Interest year base calculation',
|
|
1731
|
+
required: true,
|
|
1732
|
+
options: {
|
|
1733
|
+
options: [
|
|
1734
|
+
{ label: '1 - 30/360', value: 1 },
|
|
1735
|
+
{ label: '2 - 30/365', value: 2 },
|
|
1736
|
+
{ label: '3 - Actual/360', value: 3 },
|
|
1737
|
+
{ label: '4 - Actual/365', value: 4 },
|
|
1738
|
+
],
|
|
1739
|
+
},
|
|
1740
|
+
}),
|
|
1741
|
+
maturityTerm: Property.ShortText({
|
|
1742
|
+
displayName: 'Maturity Term',
|
|
1743
|
+
description: 'Maturity term',
|
|
1744
|
+
required: true,
|
|
1745
|
+
}),
|
|
1746
|
+
maturityTermType: Property.StaticDropdown({
|
|
1747
|
+
displayName: 'Maturity Term Type',
|
|
1748
|
+
description: 'Maturity term type',
|
|
1749
|
+
required: true,
|
|
1750
|
+
options: {
|
|
1751
|
+
options: [
|
|
1752
|
+
{ label: 'D - Days', value: 'D' },
|
|
1753
|
+
{ label: 'M - Months', value: 'M' },
|
|
1754
|
+
{ label: 'O - Open Ended', value: 'O' },
|
|
1755
|
+
],
|
|
1756
|
+
},
|
|
1757
|
+
}),
|
|
1758
|
+
interestPeriodTerm: Property.ShortText({
|
|
1759
|
+
displayName: 'Interest Period Term',
|
|
1760
|
+
description: 'Interest period term',
|
|
1761
|
+
required: true,
|
|
1762
|
+
}),
|
|
1763
|
+
interestPeriodType: Property.StaticDropdown({
|
|
1764
|
+
displayName: 'Interest Period Type',
|
|
1765
|
+
description: 'Interest period type',
|
|
1766
|
+
required: true,
|
|
1767
|
+
options: {
|
|
1768
|
+
options: [
|
|
1769
|
+
{ label: 'D - Days', value: 'D' },
|
|
1770
|
+
{ label: 'M - Months', value: 'M' },
|
|
1771
|
+
],
|
|
1772
|
+
},
|
|
1773
|
+
}),
|
|
1774
|
+
paymentMethod: Property.StaticDropdown({
|
|
1775
|
+
displayName: 'Payment Method',
|
|
1776
|
+
description: 'Interest payment method',
|
|
1777
|
+
required: true,
|
|
1778
|
+
options: {
|
|
1779
|
+
options: [
|
|
1780
|
+
{ label: 'A - ACH Transfer', value: 'A' },
|
|
1781
|
+
{ label: 'C - Capitalize', value: 'C' },
|
|
1782
|
+
{ label: 'K - Check', value: 'K' },
|
|
1783
|
+
{ label: 'T - Transfer', value: 'T' },
|
|
1784
|
+
],
|
|
1785
|
+
},
|
|
1786
|
+
}),
|
|
1787
|
+
interestRate: Property.ShortText({
|
|
1788
|
+
displayName: 'Interest Rate',
|
|
1789
|
+
description: 'Interest rate (e.g., 6.2500)',
|
|
1790
|
+
required: true,
|
|
1791
|
+
}),
|
|
1792
|
+
interestRateType: Property.StaticDropdown({
|
|
1793
|
+
displayName: 'Interest Rate Type',
|
|
1794
|
+
description: 'Interest rate type',
|
|
1795
|
+
required: true,
|
|
1796
|
+
options: {
|
|
1797
|
+
options: [
|
|
1798
|
+
{ label: 'F - Fixed Rate', value: 'F' },
|
|
1799
|
+
{ label: 'S - Step Rate', value: 'S' },
|
|
1800
|
+
{ label: 'V - Variable Rate', value: 'V' },
|
|
1801
|
+
],
|
|
1802
|
+
},
|
|
1803
|
+
}),
|
|
1804
|
+
compoundFrequency: Property.StaticDropdown({
|
|
1805
|
+
displayName: 'Compound Frequency',
|
|
1806
|
+
description: 'Compound frequency',
|
|
1807
|
+
required: true,
|
|
1808
|
+
options: {
|
|
1809
|
+
options: [
|
|
1810
|
+
{ label: 'C - Daily', value: 'C' },
|
|
1811
|
+
{ label: 'P - Periodic', value: 'P' },
|
|
1812
|
+
{ label: 'S - Simple', value: 'S' },
|
|
1813
|
+
],
|
|
1814
|
+
},
|
|
1815
|
+
}),
|
|
1816
|
+
combinedChecks: Property.StaticDropdown({
|
|
1817
|
+
displayName: 'Combined Checks',
|
|
1818
|
+
description: 'Combined checks',
|
|
1819
|
+
required: true,
|
|
1820
|
+
options: {
|
|
1821
|
+
options: [
|
|
1822
|
+
{ label: 'Y - Yes', value: 'Y' },
|
|
1823
|
+
{ label: 'N - No', value: 'N' },
|
|
1824
|
+
],
|
|
1825
|
+
},
|
|
1826
|
+
}),
|
|
1827
|
+
combinedInterestNotices: Property.StaticDropdown({
|
|
1828
|
+
displayName: 'Combined Interest Notices',
|
|
1829
|
+
description: 'Combined interest notices',
|
|
1830
|
+
required: true,
|
|
1831
|
+
options: {
|
|
1832
|
+
options: [
|
|
1833
|
+
{ label: 'Y - Yes', value: 'Y' },
|
|
1834
|
+
{ label: 'N - No', value: 'N' },
|
|
1835
|
+
],
|
|
1836
|
+
},
|
|
1837
|
+
}),
|
|
1838
|
+
controlMaturity: Property.StaticDropdown({
|
|
1839
|
+
displayName: 'Control Maturity',
|
|
1840
|
+
description: 'Control maturity',
|
|
1841
|
+
required: true,
|
|
1842
|
+
options: {
|
|
1843
|
+
options: [
|
|
1844
|
+
{ label: 'Y - Yes', value: 'Y' },
|
|
1845
|
+
{ label: 'N - No', value: 'N' },
|
|
1846
|
+
],
|
|
1847
|
+
},
|
|
1848
|
+
}),
|
|
1849
|
+
maturityOption: Property.StaticDropdown({
|
|
1850
|
+
displayName: 'Maturity Option',
|
|
1851
|
+
description: 'Maturity option',
|
|
1852
|
+
required: true,
|
|
1853
|
+
options: {
|
|
1854
|
+
options: [
|
|
1855
|
+
{ label: 'P - Principal only', value: 'P' },
|
|
1856
|
+
{ label: 'I - Interest only', value: 'I' },
|
|
1857
|
+
{ label: 'B - Both principal and interest', value: 'B' },
|
|
1858
|
+
{ label: 'N - No auto renewal', value: 'N' },
|
|
1859
|
+
],
|
|
1860
|
+
},
|
|
1861
|
+
}),
|
|
1862
|
+
autoCloseCode: Property.StaticDropdown({
|
|
1863
|
+
displayName: 'Auto Close Code',
|
|
1864
|
+
description: 'Auto close code',
|
|
1865
|
+
required: true,
|
|
1866
|
+
options: {
|
|
1867
|
+
options: [
|
|
1868
|
+
{ label: 'Y - Yes', value: 'Y' },
|
|
1869
|
+
{ label: 'N - No', value: 'N' },
|
|
1870
|
+
],
|
|
1871
|
+
},
|
|
1872
|
+
}),
|
|
1873
|
+
mailSortCode: Property.ShortText({
|
|
1874
|
+
displayName: 'Mail Sort Code',
|
|
1875
|
+
description: 'Mail sort code',
|
|
1876
|
+
required: true,
|
|
1877
|
+
}),
|
|
1878
|
+
statementType: Property.ShortText({
|
|
1879
|
+
displayName: 'Statement Type',
|
|
1880
|
+
description: 'Statement type',
|
|
1881
|
+
required: true,
|
|
1882
|
+
}),
|
|
1883
|
+
printApyeOnStatement: Property.StaticDropdown({
|
|
1884
|
+
displayName: 'Print APYE On Statement',
|
|
1885
|
+
description: 'Print APYE on statement',
|
|
1886
|
+
required: true,
|
|
1887
|
+
options: {
|
|
1888
|
+
options: [
|
|
1889
|
+
{ label: 'Y - Yes', value: 'Y' },
|
|
1890
|
+
{ label: 'N - No', value: 'N' },
|
|
1891
|
+
],
|
|
1892
|
+
},
|
|
1893
|
+
}),
|
|
1894
|
+
purgeControlCode: Property.ShortText({
|
|
1895
|
+
displayName: 'Purge Control Code',
|
|
1896
|
+
description: 'Purge control code',
|
|
1897
|
+
required: true,
|
|
1898
|
+
}),
|
|
1899
|
+
alternateWithholdingMethod: Property.ShortText({
|
|
1900
|
+
displayName: 'Alternate Withholding Method',
|
|
1901
|
+
description: 'Alternate withholding method',
|
|
1902
|
+
required: true,
|
|
1903
|
+
}),
|
|
1904
|
+
additionalFields: Property.Json({
|
|
1905
|
+
displayName: 'Additional Fields',
|
|
1906
|
+
description: 'Additional fields to include in the request body as JSON object',
|
|
1907
|
+
required: false,
|
|
1908
|
+
}),
|
|
1909
|
+
},
|
|
1910
|
+
async run(context) {
|
|
1911
|
+
const auth = context.auth as any;
|
|
1912
|
+
const baseUrl = auth.baseUrl;
|
|
1913
|
+
const organizationId = auth.organizationId;
|
|
1914
|
+
const props = context.propsValue;
|
|
1915
|
+
|
|
1916
|
+
const uuid = crypto.randomUUID();
|
|
1917
|
+
|
|
1918
|
+
const headers: Record<string, string> = {
|
|
1919
|
+
'accept': 'application/json',
|
|
1920
|
+
'Content-Type': 'application/json',
|
|
1921
|
+
'organization-id': organizationId,
|
|
1922
|
+
'uuid': uuid,
|
|
1923
|
+
'horizon-authorization': props.xAuthorization,
|
|
1924
|
+
};
|
|
1925
|
+
|
|
1926
|
+
if (props.sourceId) {
|
|
1927
|
+
headers['source-id'] = props.sourceId;
|
|
1928
|
+
}
|
|
1929
|
+
|
|
1930
|
+
const body: Record<string, unknown> = {
|
|
1931
|
+
customerId: props.customerId,
|
|
1932
|
+
accountNumber: props.accountNumber,
|
|
1933
|
+
productType: props.productType,
|
|
1934
|
+
branchNumber: props.branchNumber,
|
|
1935
|
+
tinStatus: props.tinStatus,
|
|
1936
|
+
openingAmount: props.openingAmount,
|
|
1937
|
+
effectiveOpenDate: props.effectiveOpenDate,
|
|
1938
|
+
shortName: props.shortName,
|
|
1939
|
+
generalLedgerType: props.generalLedgerType,
|
|
1940
|
+
personalNonPersonal: props.personalNonPersonal,
|
|
1941
|
+
passbookAccount: props.passbookAccount,
|
|
1942
|
+
rateIndex: props.rateIndex,
|
|
1943
|
+
interestYearBase: props.interestYearBase,
|
|
1944
|
+
maturityTerm: props.maturityTerm,
|
|
1945
|
+
maturityTermType: props.maturityTermType,
|
|
1946
|
+
interestPeriodTerm: props.interestPeriodTerm,
|
|
1947
|
+
interestPeriodType: props.interestPeriodType,
|
|
1948
|
+
paymentMethod: props.paymentMethod,
|
|
1949
|
+
interestRate: props.interestRate,
|
|
1950
|
+
interestRateType: props.interestRateType,
|
|
1951
|
+
compoundFrequency: props.compoundFrequency,
|
|
1952
|
+
combinedChecks: props.combinedChecks,
|
|
1953
|
+
combinedInterestNotices: props.combinedInterestNotices,
|
|
1954
|
+
controlMaturity: props.controlMaturity,
|
|
1955
|
+
maturityOption: props.maturityOption,
|
|
1956
|
+
autoCloseCode: props.autoCloseCode,
|
|
1957
|
+
mailSortCode: props.mailSortCode,
|
|
1958
|
+
statementType: props.statementType,
|
|
1959
|
+
printApyeOnStatement: props.printApyeOnStatement,
|
|
1960
|
+
purgeControlCode: props.purgeControlCode,
|
|
1961
|
+
alternateWithholdingMethod: props.alternateWithholdingMethod,
|
|
1962
|
+
};
|
|
1963
|
+
|
|
1964
|
+
// Merge additional fields if provided
|
|
1965
|
+
if (props.additionalFields && typeof props.additionalFields === 'object') {
|
|
1966
|
+
Object.assign(body, props.additionalFields);
|
|
1967
|
+
}
|
|
1968
|
+
|
|
1969
|
+
const response = await httpClient.sendRequest({
|
|
1970
|
+
method: HttpMethod.POST,
|
|
1971
|
+
url: `${baseUrl}${API_PATH}/accounts/time-deposits/certificates/staging`,
|
|
1972
|
+
headers,
|
|
1973
|
+
body,
|
|
1974
|
+
});
|
|
1975
|
+
|
|
1976
|
+
return response.body;
|
|
1977
|
+
},
|
|
1978
|
+
});
|
|
1979
|
+
|
|
1980
|
+
/**
|
|
1981
|
+
* Add a retirement (IRA) account
|
|
1982
|
+
*/
|
|
1983
|
+
export const time_deposit_ira_add = createAction({
|
|
1984
|
+
name: 'time_deposit_ira_add',
|
|
1985
|
+
auth: fisHorizonAuth,
|
|
1986
|
+
displayName: 'Time Deposit - Add IRA Account',
|
|
1987
|
+
description: 'Add a retirement (IRA) account',
|
|
1988
|
+
props: {
|
|
1989
|
+
xAuthorization: Property.ShortText({
|
|
1990
|
+
displayName: 'Authorization Token (JWT)',
|
|
1991
|
+
description: 'The JWT token obtained from the Authorization - Get Token action',
|
|
1992
|
+
required: true,
|
|
1993
|
+
}),
|
|
1994
|
+
sourceId: Property.ShortText({
|
|
1995
|
+
displayName: 'Source ID',
|
|
1996
|
+
description: 'Optional: 6 character ID provided by FIS',
|
|
1997
|
+
required: false,
|
|
1998
|
+
}),
|
|
1999
|
+
customerId: Property.ShortText({
|
|
2000
|
+
displayName: 'Customer ID',
|
|
2001
|
+
description: 'Customer ID (up to 14 characters)',
|
|
2002
|
+
required: true,
|
|
2003
|
+
}),
|
|
2004
|
+
accountNumber: Property.ShortText({
|
|
2005
|
+
displayName: 'Account Number',
|
|
2006
|
+
description: 'Account Number (up to 15 characters)',
|
|
2007
|
+
required: true,
|
|
2008
|
+
}),
|
|
2009
|
+
productType: Property.ShortText({
|
|
2010
|
+
displayName: 'Product Type',
|
|
2011
|
+
description: 'Product type (up to 3 characters)',
|
|
2012
|
+
required: true,
|
|
2013
|
+
}),
|
|
2014
|
+
branchNumber: Property.ShortText({
|
|
2015
|
+
displayName: 'Branch Number',
|
|
2016
|
+
description: 'Branch number (up to 3 characters)',
|
|
2017
|
+
required: true,
|
|
2018
|
+
}),
|
|
2019
|
+
tinStatus: Property.StaticDropdown({
|
|
2020
|
+
displayName: 'TIN Status',
|
|
2021
|
+
description: 'Tax Identification Number status',
|
|
2022
|
+
required: true,
|
|
2023
|
+
options: {
|
|
2024
|
+
options: [
|
|
2025
|
+
{ label: 'B - B-Notice Received', value: 'B' },
|
|
2026
|
+
{ label: 'C - Certified', value: 'C' },
|
|
2027
|
+
{ label: 'E - Exempt', value: 'E' },
|
|
2028
|
+
{ label: 'N - Not Certified', value: 'N' },
|
|
2029
|
+
{ label: 'O - No TIN Number', value: 'O' },
|
|
2030
|
+
{ label: 'P - TIN Applied For', value: 'P' },
|
|
2031
|
+
{ label: 'U - IRS Notice of Under Reporting', value: 'U' },
|
|
2032
|
+
{ label: 'W - Exemption Expired', value: 'W' },
|
|
2033
|
+
{ label: 'X - Voluntary Withholding', value: 'X' },
|
|
2034
|
+
],
|
|
2035
|
+
},
|
|
2036
|
+
}),
|
|
2037
|
+
openingAmount: Property.ShortText({
|
|
2038
|
+
displayName: 'Opening Amount',
|
|
2039
|
+
description: 'Opening amount (e.g., 200.00)',
|
|
2040
|
+
required: true,
|
|
2041
|
+
}),
|
|
2042
|
+
effectiveOpenDate: Property.ShortText({
|
|
2043
|
+
displayName: 'Effective Open Date',
|
|
2044
|
+
description: 'Effective open date (MMDDYY)',
|
|
2045
|
+
required: true,
|
|
2046
|
+
}),
|
|
2047
|
+
shortName: Property.ShortText({
|
|
2048
|
+
displayName: 'Short Name',
|
|
2049
|
+
description: 'Customer short name (up to 20 characters)',
|
|
2050
|
+
required: true,
|
|
2051
|
+
}),
|
|
2052
|
+
generalLedgerType: Property.ShortText({
|
|
2053
|
+
displayName: 'General Ledger Type',
|
|
2054
|
+
description: 'General ledger type (0001-9999)',
|
|
2055
|
+
required: true,
|
|
2056
|
+
}),
|
|
2057
|
+
personalNonPersonal: Property.StaticDropdown({
|
|
2058
|
+
displayName: 'Personal/Non-Personal',
|
|
2059
|
+
description: 'Personal or non-personal account',
|
|
2060
|
+
required: true,
|
|
2061
|
+
options: {
|
|
2062
|
+
options: [
|
|
2063
|
+
{ label: 'P - Personal', value: 'P' },
|
|
2064
|
+
{ label: 'N - Non-Personal', value: 'N' },
|
|
2065
|
+
],
|
|
2066
|
+
},
|
|
2067
|
+
}),
|
|
2068
|
+
passbookAccount: Property.StaticDropdown({
|
|
2069
|
+
displayName: 'Passbook Account',
|
|
2070
|
+
description: 'Is this a passbook account? (Note: Passbooks are not valid for IRAs)',
|
|
2071
|
+
required: true,
|
|
2072
|
+
options: {
|
|
2073
|
+
options: [
|
|
2074
|
+
{ label: 'N - Not a Passbook Account', value: 'N' },
|
|
2075
|
+
{ label: 'Y - Passbook Account', value: 'Y' },
|
|
2076
|
+
],
|
|
2077
|
+
},
|
|
2078
|
+
}),
|
|
2079
|
+
rateIndex: Property.ShortText({
|
|
2080
|
+
displayName: 'Rate Index',
|
|
2081
|
+
description: 'Rate index (up to 3 characters)',
|
|
2082
|
+
required: true,
|
|
2083
|
+
}),
|
|
2084
|
+
interestYearBase: Property.StaticDropdown({
|
|
2085
|
+
displayName: 'Interest Year Base',
|
|
2086
|
+
description: 'Interest year base calculation',
|
|
2087
|
+
required: true,
|
|
2088
|
+
options: {
|
|
2089
|
+
options: [
|
|
2090
|
+
{ label: '1 - 30/360', value: '1' },
|
|
2091
|
+
{ label: '2 - 30/365', value: '2' },
|
|
2092
|
+
{ label: '3 - Actual/360', value: '3' },
|
|
2093
|
+
{ label: '4 - Actual/365', value: '4' },
|
|
2094
|
+
],
|
|
2095
|
+
},
|
|
2096
|
+
}),
|
|
2097
|
+
maturityTerm: Property.ShortText({
|
|
2098
|
+
displayName: 'Maturity Term',
|
|
2099
|
+
description: 'Maturity term',
|
|
2100
|
+
required: true,
|
|
2101
|
+
}),
|
|
2102
|
+
maturityTermType: Property.StaticDropdown({
|
|
2103
|
+
displayName: 'Maturity Term Type',
|
|
2104
|
+
description: 'Maturity term type',
|
|
2105
|
+
required: true,
|
|
2106
|
+
options: {
|
|
2107
|
+
options: [
|
|
2108
|
+
{ label: 'D - Days', value: 'D' },
|
|
2109
|
+
{ label: 'M - Months', value: 'M' },
|
|
2110
|
+
{ label: 'O - Open Ended', value: 'O' },
|
|
2111
|
+
],
|
|
2112
|
+
},
|
|
2113
|
+
}),
|
|
2114
|
+
interestPeriodTerm: Property.ShortText({
|
|
2115
|
+
displayName: 'Interest Period Term',
|
|
2116
|
+
description: 'Interest period term',
|
|
2117
|
+
required: true,
|
|
2118
|
+
}),
|
|
2119
|
+
interestPeriodType: Property.StaticDropdown({
|
|
2120
|
+
displayName: 'Interest Period Type',
|
|
2121
|
+
description: 'Interest period type',
|
|
2122
|
+
required: true,
|
|
2123
|
+
options: {
|
|
2124
|
+
options: [
|
|
2125
|
+
{ label: 'D - Days', value: 'D' },
|
|
2126
|
+
{ label: 'M - Months', value: 'M' },
|
|
2127
|
+
],
|
|
2128
|
+
},
|
|
2129
|
+
}),
|
|
2130
|
+
paymentMethod: Property.StaticDropdown({
|
|
2131
|
+
displayName: 'Payment Method',
|
|
2132
|
+
description: 'Interest payment method',
|
|
2133
|
+
required: true,
|
|
2134
|
+
options: {
|
|
2135
|
+
options: [
|
|
2136
|
+
{ label: 'C - Capitalize', value: 'C' },
|
|
2137
|
+
],
|
|
2138
|
+
},
|
|
2139
|
+
}),
|
|
2140
|
+
interestRate: Property.ShortText({
|
|
2141
|
+
displayName: 'Interest Rate',
|
|
2142
|
+
description: 'Interest rate (e.g., 6.2500)',
|
|
2143
|
+
required: true,
|
|
2144
|
+
}),
|
|
2145
|
+
interestRateType: Property.StaticDropdown({
|
|
2146
|
+
displayName: 'Interest Rate Type',
|
|
2147
|
+
description: 'Interest rate type',
|
|
2148
|
+
required: true,
|
|
2149
|
+
options: {
|
|
2150
|
+
options: [
|
|
2151
|
+
{ label: 'F - Fixed Rate', value: 'F' },
|
|
2152
|
+
{ label: 'S - Step Rate', value: 'S' },
|
|
2153
|
+
{ label: 'V - Variable Rate', value: 'V' },
|
|
2154
|
+
],
|
|
2155
|
+
},
|
|
2156
|
+
}),
|
|
2157
|
+
compoundFrequency: Property.StaticDropdown({
|
|
2158
|
+
displayName: 'Compound Frequency',
|
|
2159
|
+
description: 'Compound frequency',
|
|
2160
|
+
required: true,
|
|
2161
|
+
options: {
|
|
2162
|
+
options: [
|
|
2163
|
+
{ label: 'C - Daily', value: 'C' },
|
|
2164
|
+
{ label: 'P - Periodic', value: 'P' },
|
|
2165
|
+
{ label: 'S - Simple', value: 'S' },
|
|
2166
|
+
],
|
|
2167
|
+
},
|
|
2168
|
+
}),
|
|
2169
|
+
combinedChecks: Property.StaticDropdown({
|
|
2170
|
+
displayName: 'Combined Checks',
|
|
2171
|
+
description: 'Combined checks',
|
|
2172
|
+
required: true,
|
|
2173
|
+
options: {
|
|
2174
|
+
options: [
|
|
2175
|
+
{ label: 'Y - Yes', value: 'Y' },
|
|
2176
|
+
{ label: 'N - No', value: 'N' },
|
|
2177
|
+
],
|
|
2178
|
+
},
|
|
2179
|
+
}),
|
|
2180
|
+
combinedInterestNotices: Property.StaticDropdown({
|
|
2181
|
+
displayName: 'Combined Interest Notices',
|
|
2182
|
+
description: 'Combined interest notices',
|
|
2183
|
+
required: true,
|
|
2184
|
+
options: {
|
|
2185
|
+
options: [
|
|
2186
|
+
{ label: 'Y - Yes', value: 'Y' },
|
|
2187
|
+
{ label: 'N - No', value: 'N' },
|
|
2188
|
+
],
|
|
2189
|
+
},
|
|
2190
|
+
}),
|
|
2191
|
+
controlMaturity: Property.StaticDropdown({
|
|
2192
|
+
displayName: 'Control Maturity',
|
|
2193
|
+
description: 'Control maturity',
|
|
2194
|
+
required: true,
|
|
2195
|
+
options: {
|
|
2196
|
+
options: [
|
|
2197
|
+
{ label: 'Y - Yes', value: 'Y' },
|
|
2198
|
+
{ label: 'N - No', value: 'N' },
|
|
2199
|
+
],
|
|
2200
|
+
},
|
|
2201
|
+
}),
|
|
2202
|
+
maturityOption: Property.StaticDropdown({
|
|
2203
|
+
displayName: 'Maturity Option',
|
|
2204
|
+
description: 'Maturity option',
|
|
2205
|
+
required: true,
|
|
2206
|
+
options: {
|
|
2207
|
+
options: [
|
|
2208
|
+
{ label: 'P - Principal only', value: 'P' },
|
|
2209
|
+
{ label: 'I - Interest only', value: 'I' },
|
|
2210
|
+
{ label: 'B - Both principal and interest', value: 'B' },
|
|
2211
|
+
{ label: 'N - No auto renewal', value: 'N' },
|
|
2212
|
+
],
|
|
2213
|
+
},
|
|
2214
|
+
}),
|
|
2215
|
+
autoCloseCode: Property.StaticDropdown({
|
|
2216
|
+
displayName: 'Auto Close Code',
|
|
2217
|
+
description: 'Auto close code',
|
|
2218
|
+
required: true,
|
|
2219
|
+
options: {
|
|
2220
|
+
options: [
|
|
2221
|
+
{ label: 'Y - Yes', value: 'Y' },
|
|
2222
|
+
{ label: 'N - No', value: 'N' },
|
|
2223
|
+
],
|
|
2224
|
+
},
|
|
2225
|
+
}),
|
|
2226
|
+
mailSortCode: Property.ShortText({
|
|
2227
|
+
displayName: 'Mail Sort Code',
|
|
2228
|
+
description: 'Mail sort code',
|
|
2229
|
+
required: true,
|
|
2230
|
+
}),
|
|
2231
|
+
statementType: Property.ShortText({
|
|
2232
|
+
displayName: 'Statement Type',
|
|
2233
|
+
description: 'Statement type',
|
|
2234
|
+
required: true,
|
|
2235
|
+
}),
|
|
2236
|
+
printApyeOnStatement: Property.StaticDropdown({
|
|
2237
|
+
displayName: 'Print APYE On Statement',
|
|
2238
|
+
description: 'Print APYE on statement',
|
|
2239
|
+
required: true,
|
|
2240
|
+
options: {
|
|
2241
|
+
options: [
|
|
2242
|
+
{ label: 'Y - Yes', value: 'Y' },
|
|
2243
|
+
{ label: 'N - No', value: 'N' },
|
|
2244
|
+
],
|
|
2245
|
+
},
|
|
2246
|
+
}),
|
|
2247
|
+
purgeControlCode: Property.ShortText({
|
|
2248
|
+
displayName: 'Purge Control Code',
|
|
2249
|
+
description: 'Purge control code',
|
|
2250
|
+
required: true,
|
|
2251
|
+
}),
|
|
2252
|
+
planNumber: Property.Number({
|
|
2253
|
+
displayName: 'Plan Number',
|
|
2254
|
+
description: 'IRA plan number',
|
|
2255
|
+
required: true,
|
|
2256
|
+
}),
|
|
2257
|
+
planType: Property.ShortText({
|
|
2258
|
+
displayName: 'Plan Type',
|
|
2259
|
+
description: 'IRA plan type',
|
|
2260
|
+
required: true,
|
|
2261
|
+
}),
|
|
2262
|
+
additionalFields: Property.Json({
|
|
2263
|
+
displayName: 'Additional Fields',
|
|
2264
|
+
description: 'Additional fields to include in the request body as JSON object',
|
|
2265
|
+
required: false,
|
|
2266
|
+
}),
|
|
2267
|
+
},
|
|
2268
|
+
async run(context) {
|
|
2269
|
+
const auth = context.auth as any;
|
|
2270
|
+
const baseUrl = auth.baseUrl;
|
|
2271
|
+
const organizationId = auth.organizationId;
|
|
2272
|
+
const props = context.propsValue;
|
|
2273
|
+
|
|
2274
|
+
const uuid = crypto.randomUUID();
|
|
2275
|
+
|
|
2276
|
+
const headers: Record<string, string> = {
|
|
2277
|
+
'accept': 'application/json',
|
|
2278
|
+
'Content-Type': 'application/json',
|
|
2279
|
+
'organization-id': organizationId,
|
|
2280
|
+
'uuid': uuid,
|
|
2281
|
+
'horizon-authorization': props.xAuthorization,
|
|
2282
|
+
};
|
|
2283
|
+
|
|
2284
|
+
if (props.sourceId) {
|
|
2285
|
+
headers['source-id'] = props.sourceId;
|
|
2286
|
+
}
|
|
2287
|
+
|
|
2288
|
+
const body: Record<string, unknown> = {
|
|
2289
|
+
customerId: props.customerId,
|
|
2290
|
+
accountNumber: props.accountNumber,
|
|
2291
|
+
productType: props.productType,
|
|
2292
|
+
branchNumber: props.branchNumber,
|
|
2293
|
+
tinStatus: props.tinStatus,
|
|
2294
|
+
openingAmount: props.openingAmount,
|
|
2295
|
+
effectiveOpenDate: props.effectiveOpenDate,
|
|
2296
|
+
shortName: props.shortName,
|
|
2297
|
+
generalLedgerType: props.generalLedgerType,
|
|
2298
|
+
personalNonPersonal: props.personalNonPersonal,
|
|
2299
|
+
passbookAccount: props.passbookAccount,
|
|
2300
|
+
rateIndex: props.rateIndex,
|
|
2301
|
+
interestYearBase: props.interestYearBase,
|
|
2302
|
+
maturityTerm: props.maturityTerm,
|
|
2303
|
+
maturityTermType: props.maturityTermType,
|
|
2304
|
+
interestPeriodTerm: props.interestPeriodTerm,
|
|
2305
|
+
interestPeriodType: props.interestPeriodType,
|
|
2306
|
+
paymentMethod: props.paymentMethod,
|
|
2307
|
+
interestRate: props.interestRate,
|
|
2308
|
+
interestRateType: props.interestRateType,
|
|
2309
|
+
compoundFrequency: props.compoundFrequency,
|
|
2310
|
+
combinedChecks: props.combinedChecks,
|
|
2311
|
+
combinedInterestNotices: props.combinedInterestNotices,
|
|
2312
|
+
controlMaturity: props.controlMaturity,
|
|
2313
|
+
maturityOption: props.maturityOption,
|
|
2314
|
+
autoCloseCode: props.autoCloseCode,
|
|
2315
|
+
mailSortCode: props.mailSortCode,
|
|
2316
|
+
statementType: props.statementType,
|
|
2317
|
+
printApyeOnStatement: props.printApyeOnStatement,
|
|
2318
|
+
purgeControlCode: props.purgeControlCode,
|
|
2319
|
+
planNumber: props.planNumber,
|
|
2320
|
+
planType: props.planType,
|
|
2321
|
+
};
|
|
2322
|
+
|
|
2323
|
+
// Merge additional fields if provided
|
|
2324
|
+
if (props.additionalFields && typeof props.additionalFields === 'object') {
|
|
2325
|
+
Object.assign(body, props.additionalFields);
|
|
2326
|
+
}
|
|
2327
|
+
|
|
2328
|
+
const response = await httpClient.sendRequest({
|
|
2329
|
+
method: HttpMethod.POST,
|
|
2330
|
+
url: `${baseUrl}${API_PATH}/accounts/time-deposits/ira`,
|
|
2331
|
+
headers,
|
|
2332
|
+
body,
|
|
2333
|
+
});
|
|
2334
|
+
|
|
2335
|
+
return response.body;
|
|
2336
|
+
},
|
|
2337
|
+
});
|
|
2338
|
+
|
|
2339
|
+
/**
|
|
2340
|
+
* Add a retirement (IRA) account to staging
|
|
2341
|
+
*/
|
|
2342
|
+
export const time_deposit_ira_add_staging = createAction({
|
|
2343
|
+
name: 'time_deposit_ira_add_staging',
|
|
2344
|
+
auth: fisHorizonAuth,
|
|
2345
|
+
displayName: 'Time Deposit - Add IRA Account to Staging',
|
|
2346
|
+
description: 'Add a retirement (IRA) account to staging',
|
|
2347
|
+
props: {
|
|
2348
|
+
xAuthorization: Property.ShortText({
|
|
2349
|
+
displayName: 'Authorization Token (JWT)',
|
|
2350
|
+
description: 'The JWT token obtained from the Authorization - Get Token action',
|
|
2351
|
+
required: true,
|
|
2352
|
+
}),
|
|
2353
|
+
sourceId: Property.ShortText({
|
|
2354
|
+
displayName: 'Source ID',
|
|
2355
|
+
description: 'Optional: 6 character ID provided by FIS',
|
|
2356
|
+
required: false,
|
|
2357
|
+
}),
|
|
2358
|
+
customerId: Property.ShortText({
|
|
2359
|
+
displayName: 'Customer ID',
|
|
2360
|
+
description: 'Customer ID (up to 14 characters)',
|
|
2361
|
+
required: true,
|
|
2362
|
+
}),
|
|
2363
|
+
accountNumber: Property.ShortText({
|
|
2364
|
+
displayName: 'Account Number',
|
|
2365
|
+
description: 'Account Number (up to 15 characters)',
|
|
2366
|
+
required: true,
|
|
2367
|
+
}),
|
|
2368
|
+
productType: Property.ShortText({
|
|
2369
|
+
displayName: 'Product Type',
|
|
2370
|
+
description: 'Product type (up to 3 characters)',
|
|
2371
|
+
required: true,
|
|
2372
|
+
}),
|
|
2373
|
+
branchNumber: Property.ShortText({
|
|
2374
|
+
displayName: 'Branch Number',
|
|
2375
|
+
description: 'Branch number (up to 3 characters)',
|
|
2376
|
+
required: true,
|
|
2377
|
+
}),
|
|
2378
|
+
tinStatus: Property.StaticDropdown({
|
|
2379
|
+
displayName: 'TIN Status',
|
|
2380
|
+
description: 'Tax Identification Number status',
|
|
2381
|
+
required: true,
|
|
2382
|
+
options: {
|
|
2383
|
+
options: [
|
|
2384
|
+
{ label: 'B - B-Notice Received', value: 'B' },
|
|
2385
|
+
{ label: 'C - Certified', value: 'C' },
|
|
2386
|
+
{ label: 'E - Exempt', value: 'E' },
|
|
2387
|
+
{ label: 'N - Not Certified', value: 'N' },
|
|
2388
|
+
{ label: 'O - No TIN Number', value: 'O' },
|
|
2389
|
+
{ label: 'P - TIN Applied For', value: 'P' },
|
|
2390
|
+
{ label: 'U - IRS Notice of Under Reporting', value: 'U' },
|
|
2391
|
+
{ label: 'W - Exemption Expired', value: 'W' },
|
|
2392
|
+
{ label: 'X - Voluntary Withholding', value: 'X' },
|
|
2393
|
+
],
|
|
2394
|
+
},
|
|
2395
|
+
}),
|
|
2396
|
+
openingAmount: Property.ShortText({
|
|
2397
|
+
displayName: 'Opening Amount',
|
|
2398
|
+
description: 'Opening amount (e.g., 200.00)',
|
|
2399
|
+
required: true,
|
|
2400
|
+
}),
|
|
2401
|
+
effectiveOpenDate: Property.ShortText({
|
|
2402
|
+
displayName: 'Effective Open Date',
|
|
2403
|
+
description: 'Effective open date (MMDDYY)',
|
|
2404
|
+
required: true,
|
|
2405
|
+
}),
|
|
2406
|
+
shortName: Property.ShortText({
|
|
2407
|
+
displayName: 'Short Name',
|
|
2408
|
+
description: 'Customer short name (up to 20 characters)',
|
|
2409
|
+
required: true,
|
|
2410
|
+
}),
|
|
2411
|
+
generalLedgerType: Property.ShortText({
|
|
2412
|
+
displayName: 'General Ledger Type',
|
|
2413
|
+
description: 'General ledger type (0001-9999)',
|
|
2414
|
+
required: true,
|
|
2415
|
+
}),
|
|
2416
|
+
personalNonPersonal: Property.StaticDropdown({
|
|
2417
|
+
displayName: 'Personal/Non-Personal',
|
|
2418
|
+
description: 'Personal or non-personal account',
|
|
2419
|
+
required: true,
|
|
2420
|
+
options: {
|
|
2421
|
+
options: [
|
|
2422
|
+
{ label: 'P - Personal', value: 'P' },
|
|
2423
|
+
{ label: 'N - Non-Personal', value: 'N' },
|
|
2424
|
+
],
|
|
2425
|
+
},
|
|
2426
|
+
}),
|
|
2427
|
+
passbookAccount: Property.StaticDropdown({
|
|
2428
|
+
displayName: 'Passbook Account',
|
|
2429
|
+
description: 'Is this a passbook account? (Note: Passbooks are not valid for IRAs)',
|
|
2430
|
+
required: true,
|
|
2431
|
+
options: {
|
|
2432
|
+
options: [
|
|
2433
|
+
{ label: 'N - Not a Passbook Account', value: 'N' },
|
|
2434
|
+
{ label: 'Y - Passbook Account', value: 'Y' },
|
|
2435
|
+
],
|
|
2436
|
+
},
|
|
2437
|
+
}),
|
|
2438
|
+
rateIndex: Property.ShortText({
|
|
2439
|
+
displayName: 'Rate Index',
|
|
2440
|
+
description: 'Rate index (up to 3 characters)',
|
|
2441
|
+
required: true,
|
|
2442
|
+
}),
|
|
2443
|
+
interestYearBase: Property.StaticDropdown({
|
|
2444
|
+
displayName: 'Interest Year Base',
|
|
2445
|
+
description: 'Interest year base calculation',
|
|
2446
|
+
required: true,
|
|
2447
|
+
options: {
|
|
2448
|
+
options: [
|
|
2449
|
+
{ label: '1 - 30/360', value: '1' },
|
|
2450
|
+
{ label: '2 - 30/365', value: '2' },
|
|
2451
|
+
{ label: '3 - Actual/360', value: '3' },
|
|
2452
|
+
{ label: '4 - Actual/365', value: '4' },
|
|
2453
|
+
],
|
|
2454
|
+
},
|
|
2455
|
+
}),
|
|
2456
|
+
maturityTerm: Property.ShortText({
|
|
2457
|
+
displayName: 'Maturity Term',
|
|
2458
|
+
description: 'Maturity term',
|
|
2459
|
+
required: true,
|
|
2460
|
+
}),
|
|
2461
|
+
maturityTermType: Property.StaticDropdown({
|
|
2462
|
+
displayName: 'Maturity Term Type',
|
|
2463
|
+
description: 'Maturity term type',
|
|
2464
|
+
required: true,
|
|
2465
|
+
options: {
|
|
2466
|
+
options: [
|
|
2467
|
+
{ label: 'D - Days', value: 'D' },
|
|
2468
|
+
{ label: 'M - Months', value: 'M' },
|
|
2469
|
+
{ label: 'O - Open Ended', value: 'O' },
|
|
2470
|
+
],
|
|
2471
|
+
},
|
|
2472
|
+
}),
|
|
2473
|
+
interestPeriodTerm: Property.ShortText({
|
|
2474
|
+
displayName: 'Interest Period Term',
|
|
2475
|
+
description: 'Interest period term',
|
|
2476
|
+
required: true,
|
|
2477
|
+
}),
|
|
2478
|
+
interestPeriodType: Property.StaticDropdown({
|
|
2479
|
+
displayName: 'Interest Period Type',
|
|
2480
|
+
description: 'Interest period type',
|
|
2481
|
+
required: true,
|
|
2482
|
+
options: {
|
|
2483
|
+
options: [
|
|
2484
|
+
{ label: 'D - Days', value: 'D' },
|
|
2485
|
+
{ label: 'M - Months', value: 'M' },
|
|
2486
|
+
],
|
|
2487
|
+
},
|
|
2488
|
+
}),
|
|
2489
|
+
paymentMethod: Property.StaticDropdown({
|
|
2490
|
+
displayName: 'Payment Method',
|
|
2491
|
+
description: 'Interest payment method',
|
|
2492
|
+
required: true,
|
|
2493
|
+
options: {
|
|
2494
|
+
options: [
|
|
2495
|
+
{ label: 'C - Capitalize', value: 'C' },
|
|
2496
|
+
],
|
|
2497
|
+
},
|
|
2498
|
+
}),
|
|
2499
|
+
interestRate: Property.ShortText({
|
|
2500
|
+
displayName: 'Interest Rate',
|
|
2501
|
+
description: 'Interest rate (e.g., 6.2500)',
|
|
2502
|
+
required: true,
|
|
2503
|
+
}),
|
|
2504
|
+
interestRateType: Property.StaticDropdown({
|
|
2505
|
+
displayName: 'Interest Rate Type',
|
|
2506
|
+
description: 'Interest rate type',
|
|
2507
|
+
required: true,
|
|
2508
|
+
options: {
|
|
2509
|
+
options: [
|
|
2510
|
+
{ label: 'F - Fixed Rate', value: 'F' },
|
|
2511
|
+
{ label: 'S - Step Rate', value: 'S' },
|
|
2512
|
+
{ label: 'V - Variable Rate', value: 'V' },
|
|
2513
|
+
],
|
|
2514
|
+
},
|
|
2515
|
+
}),
|
|
2516
|
+
compoundFrequency: Property.StaticDropdown({
|
|
2517
|
+
displayName: 'Compound Frequency',
|
|
2518
|
+
description: 'Compound frequency',
|
|
2519
|
+
required: true,
|
|
2520
|
+
options: {
|
|
2521
|
+
options: [
|
|
2522
|
+
{ label: 'C - Daily', value: 'C' },
|
|
2523
|
+
{ label: 'P - Periodic', value: 'P' },
|
|
2524
|
+
{ label: 'S - Simple', value: 'S' },
|
|
2525
|
+
],
|
|
2526
|
+
},
|
|
2527
|
+
}),
|
|
2528
|
+
combinedChecks: Property.StaticDropdown({
|
|
2529
|
+
displayName: 'Combined Checks',
|
|
2530
|
+
description: 'Combined checks',
|
|
2531
|
+
required: true,
|
|
2532
|
+
options: {
|
|
2533
|
+
options: [
|
|
2534
|
+
{ label: 'Y - Yes', value: 'Y' },
|
|
2535
|
+
{ label: 'N - No', value: 'N' },
|
|
2536
|
+
],
|
|
2537
|
+
},
|
|
2538
|
+
}),
|
|
2539
|
+
combinedInterestNotices: Property.StaticDropdown({
|
|
2540
|
+
displayName: 'Combined Interest Notices',
|
|
2541
|
+
description: 'Combined interest notices',
|
|
2542
|
+
required: true,
|
|
2543
|
+
options: {
|
|
2544
|
+
options: [
|
|
2545
|
+
{ label: 'Y - Yes', value: 'Y' },
|
|
2546
|
+
{ label: 'N - No', value: 'N' },
|
|
2547
|
+
],
|
|
2548
|
+
},
|
|
2549
|
+
}),
|
|
2550
|
+
controlMaturity: Property.StaticDropdown({
|
|
2551
|
+
displayName: 'Control Maturity',
|
|
2552
|
+
description: 'Control maturity',
|
|
2553
|
+
required: true,
|
|
2554
|
+
options: {
|
|
2555
|
+
options: [
|
|
2556
|
+
{ label: 'Y - Yes', value: 'Y' },
|
|
2557
|
+
{ label: 'N - No', value: 'N' },
|
|
2558
|
+
],
|
|
2559
|
+
},
|
|
2560
|
+
}),
|
|
2561
|
+
maturityOption: Property.StaticDropdown({
|
|
2562
|
+
displayName: 'Maturity Option',
|
|
2563
|
+
description: 'Maturity option',
|
|
2564
|
+
required: true,
|
|
2565
|
+
options: {
|
|
2566
|
+
options: [
|
|
2567
|
+
{ label: 'P - Principal only', value: 'P' },
|
|
2568
|
+
{ label: 'I - Interest only', value: 'I' },
|
|
2569
|
+
{ label: 'B - Both principal and interest', value: 'B' },
|
|
2570
|
+
{ label: 'N - No auto renewal', value: 'N' },
|
|
2571
|
+
],
|
|
2572
|
+
},
|
|
2573
|
+
}),
|
|
2574
|
+
autoCloseCode: Property.StaticDropdown({
|
|
2575
|
+
displayName: 'Auto Close Code',
|
|
2576
|
+
description: 'Auto close code',
|
|
2577
|
+
required: true,
|
|
2578
|
+
options: {
|
|
2579
|
+
options: [
|
|
2580
|
+
{ label: 'Y - Yes', value: 'Y' },
|
|
2581
|
+
{ label: 'N - No', value: 'N' },
|
|
2582
|
+
],
|
|
2583
|
+
},
|
|
2584
|
+
}),
|
|
2585
|
+
mailSortCode: Property.ShortText({
|
|
2586
|
+
displayName: 'Mail Sort Code',
|
|
2587
|
+
description: 'Mail sort code',
|
|
2588
|
+
required: true,
|
|
2589
|
+
}),
|
|
2590
|
+
statementType: Property.ShortText({
|
|
2591
|
+
displayName: 'Statement Type',
|
|
2592
|
+
description: 'Statement type',
|
|
2593
|
+
required: true,
|
|
2594
|
+
}),
|
|
2595
|
+
printApyeOnStatement: Property.StaticDropdown({
|
|
2596
|
+
displayName: 'Print APYE On Statement',
|
|
2597
|
+
description: 'Print APYE on statement',
|
|
2598
|
+
required: true,
|
|
2599
|
+
options: {
|
|
2600
|
+
options: [
|
|
2601
|
+
{ label: 'Y - Yes', value: 'Y' },
|
|
2602
|
+
{ label: 'N - No', value: 'N' },
|
|
2603
|
+
],
|
|
2604
|
+
},
|
|
2605
|
+
}),
|
|
2606
|
+
purgeControlCode: Property.ShortText({
|
|
2607
|
+
displayName: 'Purge Control Code',
|
|
2608
|
+
description: 'Purge control code',
|
|
2609
|
+
required: true,
|
|
2610
|
+
}),
|
|
2611
|
+
planNumber: Property.Number({
|
|
2612
|
+
displayName: 'Plan Number',
|
|
2613
|
+
description: 'IRA plan number',
|
|
2614
|
+
required: true,
|
|
2615
|
+
}),
|
|
2616
|
+
planType: Property.ShortText({
|
|
2617
|
+
displayName: 'Plan Type',
|
|
2618
|
+
description: 'IRA plan type',
|
|
2619
|
+
required: true,
|
|
2620
|
+
}),
|
|
2621
|
+
additionalFields: Property.Json({
|
|
2622
|
+
displayName: 'Additional Fields',
|
|
2623
|
+
description: 'Additional fields to include in the request body as JSON object',
|
|
2624
|
+
required: false,
|
|
2625
|
+
}),
|
|
2626
|
+
},
|
|
2627
|
+
async run(context) {
|
|
2628
|
+
const auth = context.auth as any;
|
|
2629
|
+
const baseUrl = auth.baseUrl;
|
|
2630
|
+
const organizationId = auth.organizationId;
|
|
2631
|
+
const props = context.propsValue;
|
|
2632
|
+
|
|
2633
|
+
const uuid = crypto.randomUUID();
|
|
2634
|
+
|
|
2635
|
+
const headers: Record<string, string> = {
|
|
2636
|
+
'accept': 'application/json',
|
|
2637
|
+
'Content-Type': 'application/json',
|
|
2638
|
+
'organization-id': organizationId,
|
|
2639
|
+
'uuid': uuid,
|
|
2640
|
+
'horizon-authorization': props.xAuthorization,
|
|
2641
|
+
};
|
|
2642
|
+
|
|
2643
|
+
if (props.sourceId) {
|
|
2644
|
+
headers['source-id'] = props.sourceId;
|
|
2645
|
+
}
|
|
2646
|
+
|
|
2647
|
+
const body: Record<string, unknown> = {
|
|
2648
|
+
customerId: props.customerId,
|
|
2649
|
+
accountNumber: props.accountNumber,
|
|
2650
|
+
productType: props.productType,
|
|
2651
|
+
branchNumber: props.branchNumber,
|
|
2652
|
+
tinStatus: props.tinStatus,
|
|
2653
|
+
openingAmount: props.openingAmount,
|
|
2654
|
+
effectiveOpenDate: props.effectiveOpenDate,
|
|
2655
|
+
shortName: props.shortName,
|
|
2656
|
+
generalLedgerType: props.generalLedgerType,
|
|
2657
|
+
personalNonPersonal: props.personalNonPersonal,
|
|
2658
|
+
passbookAccount: props.passbookAccount,
|
|
2659
|
+
rateIndex: props.rateIndex,
|
|
2660
|
+
interestYearBase: props.interestYearBase,
|
|
2661
|
+
maturityTerm: props.maturityTerm,
|
|
2662
|
+
maturityTermType: props.maturityTermType,
|
|
2663
|
+
interestPeriodTerm: props.interestPeriodTerm,
|
|
2664
|
+
interestPeriodType: props.interestPeriodType,
|
|
2665
|
+
paymentMethod: props.paymentMethod,
|
|
2666
|
+
interestRate: props.interestRate,
|
|
2667
|
+
interestRateType: props.interestRateType,
|
|
2668
|
+
compoundFrequency: props.compoundFrequency,
|
|
2669
|
+
combinedChecks: props.combinedChecks,
|
|
2670
|
+
combinedInterestNotices: props.combinedInterestNotices,
|
|
2671
|
+
controlMaturity: props.controlMaturity,
|
|
2672
|
+
maturityOption: props.maturityOption,
|
|
2673
|
+
autoCloseCode: props.autoCloseCode,
|
|
2674
|
+
mailSortCode: props.mailSortCode,
|
|
2675
|
+
statementType: props.statementType,
|
|
2676
|
+
printApyeOnStatement: props.printApyeOnStatement,
|
|
2677
|
+
purgeControlCode: props.purgeControlCode,
|
|
2678
|
+
planNumber: props.planNumber,
|
|
2679
|
+
planType: props.planType,
|
|
2680
|
+
};
|
|
2681
|
+
|
|
2682
|
+
// Merge additional fields if provided
|
|
2683
|
+
if (props.additionalFields && typeof props.additionalFields === 'object') {
|
|
2684
|
+
Object.assign(body, props.additionalFields);
|
|
2685
|
+
}
|
|
2686
|
+
|
|
2687
|
+
const response = await httpClient.sendRequest({
|
|
2688
|
+
method: HttpMethod.POST,
|
|
2689
|
+
url: `${baseUrl}${API_PATH}/accounts/time-deposits/ira/staging`,
|
|
2690
|
+
headers,
|
|
2691
|
+
body,
|
|
2692
|
+
});
|
|
2693
|
+
|
|
2694
|
+
return response.body;
|
|
2695
|
+
},
|
|
2696
|
+
});
|
|
2697
|
+
|
|
2698
|
+
/**
|
|
2699
|
+
* Add a retirement plan
|
|
2700
|
+
*/
|
|
2701
|
+
export const time_deposit_ira_plan_add = createAction({
|
|
2702
|
+
name: 'time_deposit_ira_plan_add',
|
|
2703
|
+
auth: fisHorizonAuth,
|
|
2704
|
+
displayName: 'Time Deposit - Add IRA Plan',
|
|
2705
|
+
description: 'Add a retirement (IRA) plan for a customer',
|
|
2706
|
+
props: {
|
|
2707
|
+
xAuthorization: Property.ShortText({
|
|
2708
|
+
displayName: 'Authorization Token (JWT)',
|
|
2709
|
+
description: 'The JWT token obtained from the Authorization - Get Token action',
|
|
2710
|
+
required: true,
|
|
2711
|
+
}),
|
|
2712
|
+
sourceId: Property.ShortText({
|
|
2713
|
+
displayName: 'Source ID',
|
|
2714
|
+
description: 'Optional: 6 character ID provided by FIS',
|
|
2715
|
+
required: false,
|
|
2716
|
+
}),
|
|
2717
|
+
customerId: Property.ShortText({
|
|
2718
|
+
displayName: 'Customer ID',
|
|
2719
|
+
description: 'Customer identification number (up to 14 characters)',
|
|
2720
|
+
required: true,
|
|
2721
|
+
}),
|
|
2722
|
+
planNumber: Property.Number({
|
|
2723
|
+
displayName: 'Plan Number',
|
|
2724
|
+
description: 'Plan number (up to 9 digits)',
|
|
2725
|
+
required: true,
|
|
2726
|
+
}),
|
|
2727
|
+
planType: Property.ShortText({
|
|
2728
|
+
displayName: 'Plan Type',
|
|
2729
|
+
description: 'Plan type',
|
|
2730
|
+
required: true,
|
|
2731
|
+
}),
|
|
2732
|
+
shortName: Property.ShortText({
|
|
2733
|
+
displayName: 'Short Name',
|
|
2734
|
+
description: 'Customer short name (up to 20 characters)',
|
|
2735
|
+
required: true,
|
|
2736
|
+
}),
|
|
2737
|
+
dateOpened: Property.ShortText({
|
|
2738
|
+
displayName: 'Date Opened',
|
|
2739
|
+
description: 'Date opened (CCYYMMDD). Must be less than or equal to current processing date.',
|
|
2740
|
+
required: true,
|
|
2741
|
+
}),
|
|
2742
|
+
birthDate: Property.ShortText({
|
|
2743
|
+
displayName: 'Birth Date',
|
|
2744
|
+
description: 'Birth date (CCYYMMDD). Must be less than or equal to current processing date.',
|
|
2745
|
+
required: true,
|
|
2746
|
+
}),
|
|
2747
|
+
branchNumber: Property.ShortText({
|
|
2748
|
+
displayName: 'Branch Number',
|
|
2749
|
+
description: 'Branch number (up to 3 characters)',
|
|
2750
|
+
required: true,
|
|
2751
|
+
}),
|
|
2752
|
+
effectiveDate: Property.ShortText({
|
|
2753
|
+
displayName: 'Effective Date',
|
|
2754
|
+
description: 'Effective date (CCYYMMDD). Must be less than or equal to current processing date.',
|
|
2755
|
+
required: true,
|
|
2756
|
+
}),
|
|
2757
|
+
spousalPlanNumber: Property.Number({
|
|
2758
|
+
displayName: 'Spousal Plan Number',
|
|
2759
|
+
description: 'Optional: Spousal plan number',
|
|
2760
|
+
required: false,
|
|
2761
|
+
}),
|
|
2762
|
+
employerTaxId: Property.ShortText({
|
|
2763
|
+
displayName: 'Employer Tax ID',
|
|
2764
|
+
description: 'Optional: Employer tax ID (up to 9 characters)',
|
|
2765
|
+
required: false,
|
|
2766
|
+
}),
|
|
2767
|
+
employerName: Property.ShortText({
|
|
2768
|
+
displayName: 'Employer Name',
|
|
2769
|
+
description: 'Optional: Employer name (up to 35 characters)',
|
|
2770
|
+
required: false,
|
|
2771
|
+
}),
|
|
2772
|
+
nextServiceChargeDate: Property.ShortText({
|
|
2773
|
+
displayName: 'Next Service Charge Date',
|
|
2774
|
+
description: 'Next service charge date (CCYYMMDD). Required if serviceChargeType is not blank.',
|
|
2775
|
+
required: false,
|
|
2776
|
+
}),
|
|
2777
|
+
serviceChargeType: Property.ShortText({
|
|
2778
|
+
displayName: 'Service Charge Type',
|
|
2779
|
+
description: 'Service charge type (user defined, up to 3 characters)',
|
|
2780
|
+
required: false,
|
|
2781
|
+
}),
|
|
2782
|
+
serviceChargeFrequency: Property.StaticDropdown({
|
|
2783
|
+
displayName: 'Service Charge Frequency',
|
|
2784
|
+
description: 'Service charge frequency. Required if serviceChargeType is not blank.',
|
|
2785
|
+
required: false,
|
|
2786
|
+
options: {
|
|
2787
|
+
options: [
|
|
2788
|
+
{ label: 'A - Annual', value: 'A' },
|
|
2789
|
+
{ label: 'M - Monthly', value: 'M' },
|
|
2790
|
+
{ label: 'Q - Quarterly', value: 'Q' },
|
|
2791
|
+
{ label: 'S - Semi Annual', value: 'S' },
|
|
2792
|
+
],
|
|
2793
|
+
},
|
|
2794
|
+
}),
|
|
2795
|
+
serviceChargeDay: Property.Number({
|
|
2796
|
+
displayName: 'Service Charge Day',
|
|
2797
|
+
description: 'Service charge day (1-31). Required if serviceChargeType is not blank.',
|
|
2798
|
+
required: false,
|
|
2799
|
+
}),
|
|
2800
|
+
serviceChargeSequence: Property.StaticDropdown({
|
|
2801
|
+
displayName: 'Service Charge Sequence',
|
|
2802
|
+
description: 'Service charge sequence. Required if serviceChargeType is not blank.',
|
|
2803
|
+
required: false,
|
|
2804
|
+
options: {
|
|
2805
|
+
options: [
|
|
2806
|
+
{ label: '00 - Account Level, User Defined', value: '00' },
|
|
2807
|
+
{ label: '01 - Lowest to Highest Rate Account', value: '01' },
|
|
2808
|
+
{ label: '02 - Highest to Lowest Rate Account', value: '02' },
|
|
2809
|
+
{ label: '03 - Lowest to Highest Account', value: '03' },
|
|
2810
|
+
{ label: '04 - Highest to Lowest Account', value: '04' },
|
|
2811
|
+
{ label: '99 - All Account in Plan', value: '99' },
|
|
2812
|
+
],
|
|
2813
|
+
},
|
|
2814
|
+
}),
|
|
2815
|
+
serviceChargeApplication: Property.StaticDropdown({
|
|
2816
|
+
displayName: 'Service Charge Application',
|
|
2817
|
+
description: 'Service charge application. Required if serviceChargeType is not blank.',
|
|
2818
|
+
required: false,
|
|
2819
|
+
options: {
|
|
2820
|
+
options: [
|
|
2821
|
+
{ label: 'CD - Certificate of Deposit', value: 'CD' },
|
|
2822
|
+
{ label: 'DD - Checking Account', value: 'DD' },
|
|
2823
|
+
{ label: 'IR - Individual Retirement Account', value: 'IR' },
|
|
2824
|
+
{ label: 'SV - Savings Account', value: 'SV' },
|
|
2825
|
+
],
|
|
2826
|
+
},
|
|
2827
|
+
}),
|
|
2828
|
+
serviceChargeAccount: Property.ShortText({
|
|
2829
|
+
displayName: 'Service Charge Account',
|
|
2830
|
+
description: 'Service charge account (up to 15 characters). Required if serviceChargeType is not blank.',
|
|
2831
|
+
required: false,
|
|
2832
|
+
}),
|
|
2833
|
+
retirementDate: Property.ShortText({
|
|
2834
|
+
displayName: 'Retirement Date',
|
|
2835
|
+
description: 'Retirement date (CCYYMMDD)',
|
|
2836
|
+
required: false,
|
|
2837
|
+
}),
|
|
2838
|
+
additionalFields: Property.Json({
|
|
2839
|
+
displayName: 'Additional Fields',
|
|
2840
|
+
description: 'Additional fields to include in the request body as JSON object',
|
|
2841
|
+
required: false,
|
|
2842
|
+
}),
|
|
2843
|
+
},
|
|
2844
|
+
async run(context) {
|
|
2845
|
+
const auth = context.auth as any;
|
|
2846
|
+
const baseUrl = auth.baseUrl;
|
|
2847
|
+
const organizationId = auth.organizationId;
|
|
2848
|
+
const props = context.propsValue;
|
|
2849
|
+
|
|
2850
|
+
const uuid = crypto.randomUUID();
|
|
2851
|
+
|
|
2852
|
+
const headers: Record<string, string> = {
|
|
2853
|
+
'accept': 'application/json',
|
|
2854
|
+
'Content-Type': 'application/json',
|
|
2855
|
+
'organization-id': organizationId,
|
|
2856
|
+
'uuid': uuid,
|
|
2857
|
+
'horizon-authorization': props.xAuthorization,
|
|
2858
|
+
};
|
|
2859
|
+
|
|
2860
|
+
if (props.sourceId) {
|
|
2861
|
+
headers['source-id'] = props.sourceId;
|
|
2862
|
+
}
|
|
2863
|
+
|
|
2864
|
+
const body: Record<string, unknown> = {
|
|
2865
|
+
planNumber: props.planNumber,
|
|
2866
|
+
planType: props.planType,
|
|
2867
|
+
shortName: props.shortName,
|
|
2868
|
+
dateOpened: props.dateOpened,
|
|
2869
|
+
birthDate: props.birthDate,
|
|
2870
|
+
branchNumber: props.branchNumber,
|
|
2871
|
+
effectiveDate: props.effectiveDate,
|
|
2872
|
+
};
|
|
2873
|
+
|
|
2874
|
+
if (props.spousalPlanNumber !== undefined && props.spousalPlanNumber !== null) {
|
|
2875
|
+
body['spousalPlanNumber'] = props.spousalPlanNumber;
|
|
2876
|
+
}
|
|
2877
|
+
if (props.employerTaxId) {
|
|
2878
|
+
body['employerTaxId'] = props.employerTaxId;
|
|
2879
|
+
}
|
|
2880
|
+
if (props.employerName) {
|
|
2881
|
+
body['employerName'] = props.employerName;
|
|
2882
|
+
}
|
|
2883
|
+
if (props.nextServiceChargeDate) {
|
|
2884
|
+
body['nextServiceChargeDate'] = props.nextServiceChargeDate;
|
|
2885
|
+
}
|
|
2886
|
+
if (props.serviceChargeType) {
|
|
2887
|
+
body['serviceChargeType'] = props.serviceChargeType;
|
|
2888
|
+
}
|
|
2889
|
+
if (props.serviceChargeFrequency) {
|
|
2890
|
+
body['serviceChargeFrequency'] = props.serviceChargeFrequency;
|
|
2891
|
+
}
|
|
2892
|
+
if (props.serviceChargeDay !== undefined && props.serviceChargeDay !== null) {
|
|
2893
|
+
body['serviceChargeDay'] = props.serviceChargeDay;
|
|
2894
|
+
}
|
|
2895
|
+
if (props.serviceChargeSequence) {
|
|
2896
|
+
body['serviceChargeSequence'] = props.serviceChargeSequence;
|
|
2897
|
+
}
|
|
2898
|
+
if (props.serviceChargeApplication) {
|
|
2899
|
+
body['serviceChargeApplication'] = props.serviceChargeApplication;
|
|
2900
|
+
}
|
|
2901
|
+
if (props.serviceChargeAccount) {
|
|
2902
|
+
body['serviceChargeAccount'] = props.serviceChargeAccount;
|
|
2903
|
+
}
|
|
2904
|
+
if (props.retirementDate) {
|
|
2905
|
+
body['retirementDate'] = props.retirementDate;
|
|
2906
|
+
}
|
|
2907
|
+
|
|
2908
|
+
// Merge additional fields if provided
|
|
2909
|
+
if (props.additionalFields && typeof props.additionalFields === 'object') {
|
|
2910
|
+
Object.assign(body, props.additionalFields);
|
|
2911
|
+
}
|
|
2912
|
+
|
|
2913
|
+
const response = await httpClient.sendRequest({
|
|
2914
|
+
method: HttpMethod.POST,
|
|
2915
|
+
url: `${baseUrl}${API_PATH}/customers/${props.customerId}/ira-plans`,
|
|
2916
|
+
headers,
|
|
2917
|
+
body,
|
|
2918
|
+
});
|
|
2919
|
+
|
|
2920
|
+
return response.body;
|
|
2921
|
+
},
|
|
2922
|
+
});
|