1818import java .util .HashMap ;
1919import java .util .LinkedHashMap ;
2020
21+ @ Getter @ Setter
2122public abstract class TransactionBuilder <TResult > extends BaseBuilder <TResult > {
2223 protected TransactionType transactionType ;
2324 protected TransactionModifier transactionModifier = TransactionModifier .None ;
@@ -27,8 +28,6 @@ public abstract class TransactionBuilder<TResult> extends BaseBuilder<TResult> {
2728 // network fields
2829 protected int batchNumber ;
2930 protected String companyId ;
30- @ Getter
31- @ Setter
3231 protected String description ;
3332 protected FleetData fleetData ;
3433 protected LinkedHashMap <CardIssuerEntryTag , String > issuerData ;
@@ -38,270 +37,118 @@ public abstract class TransactionBuilder<TResult> extends BaseBuilder<TResult> {
3837 protected int sequenceNumber ;
3938 protected int systemTraceAuditNumber ;
4039 protected String uniqueDeviceId ;
41- // Entity specific to PayByLink service
42- @ Getter
43- @ Setter
44- protected PayByLinkData payByLinkData ;
45- // A unique identifier generated by Global Payments to identify the payment link.
46- @ Getter
47- @ Setter
48- protected String paymentLinkId ;
40+ protected PayByLinkData payByLinkData ; // Entity specific to PayByLink service
41+ protected String paymentLinkId ; // A unique identifier generated by Global Payments to identify the payment link.
4942 protected TransactionMatchingData transactionMatchingData ;
50- @ Getter
5143 protected MasterCardCITMITIndicator citMitIndicator ;
5244 protected boolean terminalError ;
53- @ Getter
5445 protected GnapRequestData gnapRequestData ;
55- @ Getter
5646 protected BigDecimal taxAmount ;
57- @ Getter
5847 protected BigDecimal tipAmount ;
59- @ Getter
6048 protected BigDecimal surchargeAmount ;
61- @ Getter
6249 protected BigDecimal cashBackAmount ;
50+
6351 //Nts
64- @ Getter
6552 protected String invoiceNumber ;
66- @ Getter
6753 protected String cvn ;
68- @ Getter
6954 protected BigDecimal amount ;
70- @ Getter
7155 protected String tagData ;
56+
7257 //Emv
73- @ Getter
7458 protected String emvMaxPinEntry ;
7559
7660 // P66 Tag 16
77- @ Getter
7861 protected NtsTag16 ntsTag16 ;
79- @ Getter
80- @ Setter
8162 private String posSequenceNumber ;
82- @ Getter
8363 protected String serviceCode ;
84- @ Getter
8564 protected String cardSequenceNumber ; // Card Sequence number.
86- @ Getter
8765 protected NtsProductData ntsProductData ;
88- @ Getter
8966 protected String ecommerceAuthIndicator ;
90- @ Getter
9167 protected String ecommerceData1 ;
92- @ Getter
9368 protected String ecommerceData2 ;
94- @ Getter
9569 protected String mcUCAF ;
96- @ Getter
9770 protected String mcWalletId ;
98- @ Getter
9971 protected String mcSLI ;
100- @ Getter
10172 protected NtsNetworkMessageHeader ntsNetworkMessageHeader ;
102- @ Getter
10373 protected NtsRequestMessageHeader ntsRequestMessageHeader ;
104- @ Getter
10574 protected String transactionDate ;
106- @ Getter
10775 protected String transactionTime ;
108- @ Getter
10976 protected EWICData ewicData ;
11077 protected String ewicIssuingEntity ;
111- @ Getter
11278 private String zipCode ;
113-
114- @ Getter
115- @ Setter
11679 private String customerCode ;
117- @ Getter
118- @ Setter
11980 private String hostResponseCode = "" ;
120- @ Getter
121- @ Setter
12281 private String offlineDeclineIndicator ;
123- @ Getter
12482 private Boolean isSAFIndicator ;
125- @ Getter
126- private String safOrignDT ;
127- @ Getter
83+ private String safOriginalDateTime ;
12884 private int pdlTimeout ;
129- @ Getter @ Setter
13085 protected EcommerceInfo ecommerceInfo ;
131- @ Getter @ Setter
13286 protected String merchantOrCustomerInitiatedFlag ;
13387
134-
135-
136- public void setNtsRequestMessageHeader (NtsRequestMessageHeader ntsRequestMessageHeader ) {
137- this .ntsRequestMessageHeader = ntsRequestMessageHeader ;
138- }
139-
140- public TransactionType getTransactionType () {
141- return transactionType ;
142- }
143-
144- public void setTransactionType (TransactionType transactionType ) {
145- this .transactionType = transactionType ;
146- }
147-
148- public TransactionModifier getTransactionModifier () {
149- return transactionModifier ;
150- }
151-
152- public void setTransactionModifier (TransactionModifier transactionModifier ) {
153- this .transactionModifier = transactionModifier ;
154- }
155-
156- public IPaymentMethod getPaymentMethod () {
157- return paymentMethod ;
158- }
159-
160- public void setPaymentMethod (IPaymentMethod paymentMethod ) {
161- this .paymentMethod = paymentMethod ;
162- }
163-
164- public HashMap <Host , ArrayList <HostError >> getSimulatedHostErrors () {
165- return simulatedHostErrors ;
166- }
167-
168- // network fields
169- public int getBatchNumber () {
170- return batchNumber ;
171- }
172-
173- public String getCompanyId () {
174- return companyId ;
175- }
176-
177- public FleetData getFleetData () {
178- return fleetData ;
179- }
180-
181- public LinkedHashMap <CardIssuerEntryTag , String > getIssuerData () {
182- return issuerData ;
183- }
184-
185- public Integer getFollowOnStan () {
186- return followOnStan ;
187- }
188-
189- public PriorMessageInformation getPriorMessageInformation () {
190- return priorMessageInformation ;
191- }
192-
193- public void setPriorMessageInformation (PriorMessageInformation priorMessageInformation ) {
194- this .priorMessageInformation = priorMessageInformation ;
195- }
196-
197- public ProductData getProductData () {
198- return productData ;
199- }
200-
201- public int getSequenceNumber () {
202- return sequenceNumber ;
203- }
204-
205- public int getSystemTraceAuditNumber () {
206- return systemTraceAuditNumber ;
207- }
208-
209- public String getUniqueDeviceId () {
210- return uniqueDeviceId ;
211- }
212-
213- public TransactionMatchingData getTransactionMatchingData () {
214- return transactionMatchingData ;
215- }
216-
217- public boolean isTerminalError () {
218- return terminalError ;
219- }
220-
221- protected TransactionBuilder (TransactionType type ) {
222- this (type , null );
223- }
224-
225- protected TransactionBuilder (TransactionType type , IPaymentMethod paymentMethod ) {
226- super ();
227- this .transactionType = type ;
228- this .paymentMethod = paymentMethod ;
229- }
230-
23188 public TransactionBuilder <TResult > withServiceCode (String serviceCode ) {
23289 this .serviceCode = serviceCode ;
23390 return this ;
23491 }
235-
23692 public TransactionBuilder <TResult > withNtsProductData (NtsProductData ntsProductData ) {
23793 this .ntsProductData = ntsProductData ;
23894 return this ;
23995 }
240-
24196 public TransactionBuilder <TResult > withEcommerceAuthIndicator (String ecommerceAuthIndicator ) {
24297 this .ecommerceAuthIndicator = ecommerceAuthIndicator ;
24398 return this ;
24499 }
245-
246100 public TransactionBuilder <TResult > withEcommerceData1 (String ecommerceData1 ) {
247101 this .ecommerceData1 = ecommerceData1 ;
248102 return this ;
249103 }
250-
251104 public TransactionBuilder <TResult > withEcommerceData2 (String ecommerceData2 ) {
252105 this .ecommerceData2 = ecommerceData2 ;
253106 return this ;
254107 }
255-
256108 public TransactionBuilder <TResult > withEWICData (EWICData ewicData ) {
257109 this .ewicData = ewicData ;
258110 return this ;
259111 }
260-
261- public String getEwicIssuingEntity () {
262- return ewicIssuingEntity ;
263- }
264-
265- public void setEwicIssuingEntity (String ewicIssuingEntity ) {
266- this .ewicIssuingEntity = ewicIssuingEntity ;
267- }
268-
269112 public TransactionBuilder <TResult > withZipCode (String zipCode ) {
270113 this .zipCode = zipCode ;
271114 return this ;
272115 }
273-
274116 public TransactionBuilder <TResult > withCustomerCode (String customerCode ) {
275117 this .customerCode = customerCode ;
276118 return this ;
277119 }
278-
279120 public TransactionBuilder <TResult > withHostResponseCode (String hostResponseCode ) {
280121 this .hostResponseCode = hostResponseCode ;
281122 return this ;
282123 }
283-
284124 public TransactionBuilder <TResult > withOfflineDeclineIndicator (String offlineDeclineIndicator ) {
285125 this .offlineDeclineIndicator = offlineDeclineIndicator ;
286126 return this ;
287127 }
288-
289128 public TransactionBuilder <TResult > withSAFIndicator (Boolean value ) {
290129 this .isSAFIndicator = value ;
291130 return this ;
292131 }
293-
294132 public TransactionBuilder <TResult > withSAFOrigDT (String value ) {
295- this .safOrignDT = value ;
133+ this .safOriginalDateTime = value ;
296134 return this ;
297135 }
298136 public TransactionBuilder <TResult > withMerchantOrCustomerInitiatedFlag (String merchantOrCustomerInitiatedFlag ){
299137 this .merchantOrCustomerInitiatedFlag = merchantOrCustomerInitiatedFlag ;
300138 return this ;
301139 }
302-
303140 public TransactionBuilder <TResult > withPDLTimeout (int value ){
304141 this .pdlTimeout = value ;
305142 return this ;
306143 }
144+
145+ protected TransactionBuilder (TransactionType type ) {
146+ this (type , null );
147+ }
148+
149+ protected TransactionBuilder (TransactionType type , IPaymentMethod paymentMethod ) {
150+ super ();
151+ this .transactionType = type ;
152+ this .paymentMethod = paymentMethod ;
153+ }
307154}
0 commit comments