-
Notifications
You must be signed in to change notification settings - Fork 0
/
EntryDetailRecord.cs
137 lines (100 loc) · 4.27 KB
/
EntryDetailRecord.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
using Newtonsoft.Json;
namespace NACHAParser
{
public class EntryDetailRecord
{
#region Properties
[JsonProperty("entDetailsId")]
public string EntDetailsId { get; set; } = string.Empty;
[JsonIgnore]
[JsonProperty("lineNum")]
public int LineNum { get; set; }
[JsonProperty("recType")]
public RecordType RecType { get; set; }
[JsonProperty("transCode")]
public TransactionCode TransCode { get; set; }
[JsonProperty("rDFIId")]
public string RDFIId { get; set; } = string.Empty;
[JsonProperty("checkDigit")]
public char CheckDigit { get; set; }
[JsonProperty("dFIAcctNumber")]
public string DFIAcctNum { get; set; } = string.Empty;
[JsonProperty("amount")]
public string Amt { get; set; } = string.Empty;
[JsonProperty("totalAmount")]
public string TotalAmt { get; set; } = string.Empty;
[JsonProperty("indivIdNumber")]
public string IndivIdNum { get; set; } = string.Empty;
[JsonProperty("numOfAddendaRecords")]
public int NumOfAddendaRecords { get; set; }
[JsonProperty("individualName")]
public string IndivName { get; set; } = string.Empty;
[JsonProperty("receiverCompanyName")]
public string ReceiverCoName { get; set; } = string.Empty;
[JsonProperty("checkSerialNumber")]
public string CheckSerialNum { get; set; } = string.Empty;
[JsonProperty("terminalCity")]
public string TerminalCity { get; set; } = string.Empty;
[JsonProperty("terminalState")]
public string TerminalState { get; set; } = string.Empty;
[JsonProperty("cardTransTypeCode")]
public string CardTransTypeCode { get; set; } = string.Empty;
[JsonProperty("cardExpirationDate")]
public string CardExpirationDate { get; set; } = string.Empty;
[JsonProperty("documentReferenceNumber")]
public string DocRefNum { get; set; } = string.Empty;
[JsonProperty("IndividualCardAcctNumber")]
public string IndivCardAcctNum { get; set; } = string.Empty;
[JsonProperty("discretionaryData")]
public string DiscretionaryData { get; set; } = string.Empty;
[JsonProperty("paymtTypeCode")]
public string PaymtTypeCode { get; set; } = string.Empty;
[JsonProperty("reserved")]
public string Reserved { get; set; } = string.Empty;
[JsonProperty("addendaRecordIndicator")]
public AddendaRecordIndicator aDRecIndicator { get; set; }
[JsonProperty("traceNumber")]
public string TraceNum { get; set; } = string.Empty;
[JsonProperty("originalTraceNumber")]
public string OriginalTraceNum { get; set; } = string.Empty;
[JsonProperty("processControlField")]
public string ProcessControlField { get; set; } = string.Empty;
[JsonProperty("itemResearchNumber")]
public string ItemResearchNum { get; set; } = string.Empty;
[JsonProperty("itemTypeIndicator")]
public string ItemTypeIndicator { get; set; } = string.Empty;
[JsonProperty("addendaRecords")]
public List<Addenda> AddendaRecord { get; set; } = new List<Addenda>();
#endregion
#region Constructors
public EntryDetailRecord()
{
EntDetailsId = Guid.NewGuid().ToString();
Console.WriteLine($"EntDetailsId: '{EntDetailsId}'");
}
#endregion
#region Methods
public int AddendaCount()
{
return AddendaRecord.Count;
}
public bool IsTransCodeReturnOrNOC()
{
switch (TransCode)
{
case TransactionCode.CheckingReturnNOCCredit:
case TransactionCode.CheckingReturnNOCDebit:
case TransactionCode.SavingReturnNOCCredit:
case TransactionCode.SavingsReturnNOCDebit:
case TransactionCode.GLReturnNoCCredit:
case TransactionCode.GLReturnNOCDebit:
case TransactionCode.LoanReturnNOCredit:
case TransactionCode.LoanReturnNOCDebit:
return true;
default:
return false;
}
}
#endregion
}
}