Subversion Repositories SmartDukaan

Rev

Rev 7065 | Rev 7200 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
2674 vikas 1
package in.shop2020.serving.controllers;
2
 
7065 kshitij.so 3
import in.shop2020.config.ConfigException;
4689 anupam.sin 4
import in.shop2020.crm.Activity;
5
import in.shop2020.crm.ActivityType;
3578 mandeep.dh 6
import in.shop2020.crm.SearchFilter;
7
import in.shop2020.crm.Ticket;
8
import in.shop2020.crm.TicketCategory;
4689 anupam.sin 9
import in.shop2020.crm.TicketPriority;
3578 mandeep.dh 10
import in.shop2020.crm.TicketStatus;
5845 mandeep.dh 11
import in.shop2020.logistics.PickupStore;
7190 amar.kumar 12
import in.shop2020.model.v1.catalog.CatalogService;
13
import in.shop2020.model.v1.catalog.CatalogServiceException;
14
import in.shop2020.model.v1.catalog.Item;
2674 vikas 15
import in.shop2020.model.v1.order.LineItem;
16
import in.shop2020.model.v1.order.Order;
3578 mandeep.dh 17
import in.shop2020.model.v1.order.OrderStatus;
4689 anupam.sin 18
import in.shop2020.model.v1.order.TransactionServiceException;
4142 mandeep.dh 19
import in.shop2020.model.v1.user.Address;
4689 anupam.sin 20
import in.shop2020.model.v1.user.UserContextException;
2728 vikas 21
import in.shop2020.payments.Attribute;
22
import in.shop2020.payments.Constants;
2674 vikas 23
import in.shop2020.payments.Payment;
2728 vikas 24
import in.shop2020.payments.PaymentException;
4142 mandeep.dh 25
import in.shop2020.payments.PaymentService.Client;
4689 anupam.sin 26
import in.shop2020.serving.auth.CRMAuthorizingRealm;
3090 mandeep.dh 27
import in.shop2020.serving.model.ShipmentUpdate;
5845 mandeep.dh 28
import in.shop2020.serving.services.AramexTrackingService;
3090 mandeep.dh 29
import in.shop2020.serving.services.BlueDartTrackingService;
5303 phani.kuma 30
import in.shop2020.serving.services.DelhiveryTrackingService;
3578 mandeep.dh 31
import in.shop2020.thrift.clients.CRMClient;
7190 amar.kumar 32
import in.shop2020.thrift.clients.CatalogClient;
6322 amar.kumar 33
import in.shop2020.thrift.clients.HelperClient;
5845 mandeep.dh 34
import in.shop2020.thrift.clients.LogisticsClient;
3128 rajveer 35
import in.shop2020.thrift.clients.PaymentClient;
36
import in.shop2020.thrift.clients.TransactionClient;
4142 mandeep.dh 37
import in.shop2020.thrift.clients.UserClient;
7065 kshitij.so 38
import in.shop2020.thrift.clients.config.ConfigClient;
3546 mandeep.dh 39
import in.shop2020.utils.ModelUtils;
6322 amar.kumar 40
import in.shop2020.warehouse.WarehouseService;
2674 vikas 41
 
6322 amar.kumar 42
import java.io.BufferedInputStream;
43
import java.io.File;
44
import java.io.FileInputStream;
45
import java.io.FileWriter;
46
import java.io.IOException;
47
import java.io.InputStream;
6912 anupam.sin 48
import java.text.SimpleDateFormat;
2674 vikas 49
import java.util.ArrayList;
6912 anupam.sin 50
import java.util.Calendar;
4416 mandeep.dh 51
import java.util.Collections;
6912 anupam.sin 52
import java.util.Date;
4689 anupam.sin 53
import java.util.HashSet;
2674 vikas 54
import java.util.List;
4689 anupam.sin 55
import java.util.Set;
4416 mandeep.dh 56
import java.util.concurrent.Callable;
57
import java.util.concurrent.Executors;
58
import java.util.concurrent.TimeUnit;
2674 vikas 59
 
6322 amar.kumar 60
import javax.servlet.ServletOutputStream;
61
 
4689 anupam.sin 62
import net.htmlparser.jericho.Source;
63
 
5845 mandeep.dh 64
import org.apache.commons.lang.StringUtils;
2674 vikas 65
import org.apache.log4j.Logger;
2728 vikas 66
import org.apache.thrift.TException;
4142 mandeep.dh 67
import org.apache.thrift.transport.TTransportException;
2674 vikas 68
 
69
/**
70
 * @author vikas
3578 mandeep.dh 71
 * 
2674 vikas 72
 */
73
@SuppressWarnings("serial")
74
public class UserOrderInfoController extends BaseController {
3578 mandeep.dh 75
    private static Logger                  log                     = Logger.getLogger(Class.class);
3090 mandeep.dh 76
    private static BlueDartTrackingService blueDartTrackingService = new BlueDartTrackingService();
4710 anupam.sin 77
    private static AramexTrackingService aramexTrackingService     = new AramexTrackingService();
5303 phani.kuma 78
    private static DelhiveryTrackingService delhiveryTrackingService     = new DelhiveryTrackingService();
3090 mandeep.dh 79
 
4142 mandeep.dh 80
    private long                 orderId;
81
    private Order                order;
82
    private List<Payment>        payments;
4416 mandeep.dh 83
    private List<ShipmentUpdate> shipmentUpdates = new ArrayList<ShipmentUpdate>();
4142 mandeep.dh 84
    private Long                 codTicketId;
85
    private List<Address>        addresses;
4689 anupam.sin 86
    private Set<OrderStatus>     setOfcancellableStates;
87
    private String               cancellationInitiator;
88
    private String               cancelReason;
89
    private String               body;
6985 anupam.sin 90
    private String               line1;
91
    private String               line2;
92
    private String               city;
93
    private String               state;
94
    private String               pin;
7190 amar.kumar 95
    private String				 freebieItem;
96
    private String				 dealText;
97
    private String 				 parentOrderIdForFreebieOrder;
98
    private String				 freebieOrderId;
2674 vikas 99
 
3578 mandeep.dh 100
    public UserOrderInfoController() {
2674 vikas 101
        super();
4689 anupam.sin 102
        setOfcancellableStates = new HashSet<OrderStatus>();
103
        setOfcancellableStates.add(OrderStatus.SUBMITTED_FOR_PROCESSING);
104
        setOfcancellableStates.add(OrderStatus.INVENTORY_LOW);
105
        setOfcancellableStates.add(OrderStatus.LOW_INV_PO_RAISED);
106
        setOfcancellableStates.add(OrderStatus.LOW_INV_REVERSAL_IN_PROCESS);
107
        setOfcancellableStates.add(OrderStatus.LOW_INV_NOT_AVAILABLE_AT_HOTSPOT);
108
        setOfcancellableStates.add(OrderStatus.ACCEPTED);
109
        setOfcancellableStates.add(OrderStatus.BILLED);
2674 vikas 110
    }
111
 
4689 anupam.sin 112
    public String index() {
113
        try {
114
            PaymentClient paymentServiceClient = new PaymentClient();
115
            TransactionClient transactionServiceClient = new TransactionClient();
3090 mandeep.dh 116
 
3499 mandeep.dh 117
            order = transactionServiceClient.getClient().getOrder(orderId);
7190 amar.kumar 118
            if(order.getFreebieItemId()>0) {
119
            	CatalogService.Client catalogClient = new CatalogClient().getClient();
120
            	Item item = catalogClient.getItem(order.getFreebieItemId());
121
            	freebieItem = item.getBrand() + " " + item.getModelName() + " " + item.getModelNumber() + " " + item.getColor();
122
            }
123
 
124
            if(order.getLineitems().get(0).getDealText()!=null && !order.getLineitems().get(0).getDealText().isEmpty()) {
125
            	dealText = order.getLineitems().get(0).getDealText();
126
            }
127
            List<in.shop2020.model.v1.order.Attribute> attributes = 
128
            	transactionServiceClient.getClient().getAllAttributesForOrderId(orderId);
129
 
130
            for(in.shop2020.model.v1.order.Attribute attribute: attributes){
131
            	if(attribute.getName().equals("parentOrderIdForFreebie")){
132
            		parentOrderIdForFreebieOrder = attribute.getValue();
133
            	} else if (attribute.getName().equals("freebieOrderId")){
134
            		freebieOrderId = attribute.getValue();
135
            	}
136
            }
137
 
4689 anupam.sin 138
            payments = paymentServiceClient.getClient()
139
            .getPaymentForTxnId(order.getTransactionId());
3090 mandeep.dh 140
 
3578 mandeep.dh 141
 
4689 anupam.sin 142
 
143
            // Spawning a thread to capture shipment updates from Bluedart
144
            // This is done to ensure that response from Crm web app is sent
145
            // within given time limits. Also, we wont be affected in the cases 
146
            // where bluedart site is down or slow
147
            Executors.newSingleThreadExecutor().invokeAll(Collections.singletonList(new Callable<Boolean>() {
148
                public Boolean call() throws Exception {
4710 anupam.sin 149
                    if (order.getLogistics_provider_id() == 1)
150
                        shipmentUpdates = blueDartTrackingService.getUpdates(order.getAirwaybill_no());
151
                    else if (order.getLogistics_provider_id() == 2) {
152
                        shipmentUpdates = aramexTrackingService.getUpdates(order.getAirwaybill_no());
153
                    }
5303 phani.kuma 154
                    else if (order.getLogistics_provider_id() == 3) {
155
                        shipmentUpdates = delhiveryTrackingService.getUpdates(order.getAirwaybill_no());
156
                    }
4710 anupam.sin 157
                    else {
5845 mandeep.dh 158
                        shipmentUpdates = new ArrayList<ShipmentUpdate>();
4710 anupam.sin 159
                        log.error("Error : providerId = " + order.getLogistics_provider_id() + "for orderId : " + order.getId());
160
                    }
4689 anupam.sin 161
                    return true;
162
                }
163
            }), 5, TimeUnit.SECONDS);
164
 
165
            if (order.isCod() && OrderStatus.COD_VERIFICATION_PENDING.equals(order.getStatus())) {
166
                populateCODTicketId(order.getCustomer_id());
4416 mandeep.dh 167
            }
168
 
4689 anupam.sin 169
            if (canEditOrderAddress()) {
170
                userContextServiceClient = new UserClient().getClient();
171
                addresses = userContextServiceClient.getAllAddressesForUser(order.getCustomer_id());
172
            }
3578 mandeep.dh 173
 
4689 anupam.sin 174
        } catch (TTransportException e) {
175
            log.error("Unable to create thrift Client", e);
176
        } catch (TransactionServiceException e) {
177
            addActionError("Invalid order id or no order selected.");
178
        } catch (TException e) {
179
            log.error("Unable to get thrift Client", e);
180
        } catch (PaymentException e) {
181
            log.error("Unable to get payments for transctionId : " + order.getTransactionId(), e);
182
        } catch (InterruptedException e) {
183
            log.error("Thread was interrupted", e);
184
        } catch (UserContextException e) {
185
            log.error("Unable to get addresses for user : " + order.getCustomer_id(), e);
7190 amar.kumar 186
        } catch(CatalogServiceException csex) {
187
        	log.error("Unable to get item details for itemId: " + order.getFreebieItemId(), csex);
4142 mandeep.dh 188
        }
189
        return INDEX;
2674 vikas 190
    }
191
 
4142 mandeep.dh 192
    private boolean canEditOrderAddress() {
193
        return false;
194
    }
195
 
3578 mandeep.dh 196
    private void populateCODTicketId(long customerId) {
197
        try {
198
            SearchFilter searchFilter = new SearchFilter();
199
            searchFilter.setTicketCategory(TicketCategory.COD_VERIFICATION);
200
            searchFilter.setTicketStatuses(new ArrayList<TicketStatus>());
201
            searchFilter.getTicketStatuses().add(TicketStatus.OPEN);
202
            searchFilter.getTicketStatuses().add(TicketStatus.REOPEN);
203
            searchFilter.setCustomerId(customerId);
204
            crmServiceClient = new CRMClient().getClient();
205
            List<Ticket> tickets = crmServiceClient.getTickets(searchFilter);
206
            if (tickets != null && !tickets.isEmpty()) {
207
                codTicketId = tickets.get(0).getId();
208
            }
209
        } catch (TException e) {
210
            log.error("Error fetching tickets for customerId: " + customerId, e);
211
        }
212
    }
213
 
4689 anupam.sin 214
    public String markOrderForCancellation() {
215
        try{
216
            TransactionClient transactionServiceClient = new TransactionClient();
217
            log.info("URL = " + request.getRequestURI());
218
            log.info("Initiator = " + request.getParameter("cancellationInitiator"));
219
            log.info("orderId = " + request.getParameter("orderId"));
220
            if (cancellationInitiator.equals("CUSTOMER")) {
221
                order = transactionServiceClient.getClient().getOrder(orderId);
222
                transactionServiceClient.getClient().markOrderCancellationRequestReceived(orderId);
223
                long creatorId = CRMAuthorizingRealm.getAgent(currentAgentEmailId).getId();
224
                Ticket ticket = new Ticket();
225
                String plainTextbody = "";
226
                if(body!=null && !body.isEmpty()){
227
                    plainTextbody = new Source(body).getTextExtractor().toString();
228
                }
229
                ticket.setDescription("Creating ticket for Cancellation Request Received, Reason : " + cancelReason + " : " + plainTextbody);
230
                ticket.setCreatorId(creatorId);
231
                ticket.setStatus(TicketStatus.OPEN);
232
                ticket.setPriority(TicketPriority.HIGH);
233
                ticket.setCategory(TicketCategory.ORDER_CANCELLATION);
234
                ticket.setOrderId(orderId);
235
 
236
                Activity activity = new Activity();
237
                activity.setDescription("Creating Ticket");
238
                activity.setType(ActivityType.OTHER);
239
                activity.setTicketPriority(TicketPriority.HIGH);
240
                activity.setTicketStatus(TicketStatus.OPEN);
241
                activity.setCreatorId(creatorId);
242
                activity.setTicketDescription("Creating ticket for Cancellation Request Received, Reason : " + cancelReason + " : " + plainTextbody);
243
                activity.setTicketCategory(TicketCategory.ORDER_CANCELLATION);
244
 
245
                ticket.setCustomerId(order.getCustomer_id());
246
                activity.setCustomerId(order.getCustomer_id());
247
                ticket.setCustomerName(order.getCustomer_name());
248
                activity.setCustomerName(order.getCustomer_name());
249
                ticket.setCustomerEmailId(order.getCustomer_email());
250
                activity.setCustomerEmailId(order.getCustomer_email());
251
                ticket.setCustomerMobileNumber(order.getCustomer_mobilenumber());
252
                activity.setCustomerMobileNumber(order.getCustomer_mobilenumber());
253
 
254
                crmServiceClient = new CRMClient().getClient();
255
                crmServiceClient.insertTicket(ticket, activity);
256
            } 
257
            else if (cancellationInitiator.equals("INTERNAL")) {
258
                String plainTextbody = "";
259
                if(body!=null && !body.isEmpty()){
260
                    plainTextbody = new Source(body).getTextExtractor().toString();
261
                }
262
                transactionServiceClient.getClient().refundOrder(orderId, currentAgentEmailId, cancelReason + " : " + plainTextbody);
263
                long creatorId = CRMAuthorizingRealm.getAgent(currentAgentEmailId).getId();
264
                Ticket ticket = new Ticket();
265
                ticket.setDescription("Creating ticket for Order Cancellation due to Low inventory");
266
                ticket.setCreatorId(creatorId);
267
                ticket.setStatus(TicketStatus.CLOSED);
268
                ticket.setPriority(TicketPriority.MEDIUM);
269
                ticket.setCategory(TicketCategory.ORDER_CANCELLATION);
270
                ticket.setOrderId(orderId);
271
 
272
                Activity activity = new Activity();
273
                activity.setDescription("Creating Ticket");
274
                activity.setType(ActivityType.OTHER);
275
                activity.setTicketPriority(TicketPriority.MEDIUM);
276
                activity.setTicketStatus(TicketStatus.CLOSED);
277
                activity.setCreatorId(creatorId);
278
                activity.setTicketCategory(TicketCategory.ORDER_CANCELLATION);
279
                activity.setTicketDescription("Creating ticket for Order Cancellation due to Low inventory");
280
 
281
                ticket.setCustomerId(order.getCustomer_id());
282
                activity.setCustomerId(order.getCustomer_id());
283
                ticket.setCustomerName(order.getCustomer_name());
284
                activity.setCustomerName(order.getCustomer_name());
285
                ticket.setCustomerEmailId(order.getCustomer_email());
286
                activity.setCustomerEmailId(order.getCustomer_email());
287
                ticket.setCustomerMobileNumber(order.getCustomer_mobilenumber());
288
                activity.setCustomerMobileNumber(order.getCustomer_mobilenumber());
289
 
290
                crmServiceClient = new CRMClient().getClient();
291
                crmServiceClient.insertTicket(ticket, activity);
292
            }
293
        } catch(Exception e) {
294
            log.error("Could not mark order for Cancellation, OrderId : " + orderId, e);
295
        }
296
        return index();
297
    }
298
 
7065 kshitij.so 299
    public void getOrderConfirmationMail() throws IOException, TException, ConfigException {
300
    	String helper_service_server=ConfigClient.getClient().get("helper_service_server");
301
    	String helper_service_server_port=ConfigClient.getClient().get("helper_service_server_port");
302
    	HelperClient helperClient = new HelperClient(helper_service_server,helper_service_server_port);
6322 amar.kumar 303
    	String mail = helperClient.getClient().getOrderConfirmationMail(orderId);
304
    	File file = new File("temp");
305
    	FileWriter writer = new FileWriter(file);
306
    	writer.append(mail);
307
    	writer.close();
308
 
309
    	byte[] buffer = new byte[(int)file.length()];
310
        InputStream input = null;
311
    	try {
312
            int totalBytesRead = 0;
313
            input = new BufferedInputStream(new FileInputStream(file));
314
            while(totalBytesRead < buffer.length){
315
                int bytesRemaining = buffer.length - totalBytesRead;
316
                int bytesRead = input.read(buffer, totalBytesRead, bytesRemaining); 
317
                if (bytesRead > 0){
318
                    totalBytesRead = totalBytesRead + bytesRead;
319
                }
320
            }
321
        }
322
        finally {
323
            input.close();
324
            file.delete();
325
        }
326
 
327
 
328
    	response.setHeader("Content-disposition", "inline; filename=" + "OrderDetail_"+orderId );
329
 
330
        ServletOutputStream sos;
331
        try {
332
            sos = response.getOutputStream();
333
            sos.write(buffer);
334
            sos.flush();
335
        } catch (IOException e) {
336
            System.out.println("Unable to stream the manifest file");
337
        }   
338
    }
339
 
4689 anupam.sin 340
    public boolean canOrderBeCancelled() {
341
        if (setOfcancellableStates.contains(order.getStatus())) {
342
            return true;
343
        }
344
        return false;
345
    }
346
 
4142 mandeep.dh 347
    public String getPaymentGateway(Payment payment) {
348
        String gatewayName = "";
3578 mandeep.dh 349
 
4142 mandeep.dh 350
        try {
351
            Client paymentServiceClient = new PaymentClient().getClient();
352
            gatewayName = paymentServiceClient.getPaymentGateway(payment.getGatewayId()).getName();
353
        } catch (TTransportException e) {
354
        } catch (PaymentException e) {
355
        } catch (TException e) {
2674 vikas 356
        }
4142 mandeep.dh 357
 
358
        return gatewayName;
2674 vikas 359
    }
360
 
4142 mandeep.dh 361
    public String getProductName(LineItem lineItem) {
362
        String name = ModelUtils.extractProductNameFromLineItem(lineItem);
363
 
4146 mandeep.dh 364
        if (lineItem.getColor() != null && !lineItem.getColor().isEmpty()) {
4142 mandeep.dh 365
            name += "(" + lineItem.getColor() + ")";
2674 vikas 366
        }
4142 mandeep.dh 367
 
368
        return name;
2674 vikas 369
    }
370
 
4142 mandeep.dh 371
    public int convertDouble(double value) {
372
        return (int)value;
2674 vikas 373
    }
6912 anupam.sin 374
 
375
    public String getInsuranceExpiryDate(long DeliveryDate) {
376
        if (DeliveryDate == 0) {
377
            return "N/A";
378
        }
379
        Calendar cal = Calendar.getInstance();
380
        cal.setTimeInMillis(DeliveryDate);
381
        cal.add(Calendar.YEAR, 1);
6960 anupam.sin 382
        SimpleDateFormat sdf = new SimpleDateFormat("dd MMM, yyyy");
383
        return sdf.format(cal.getTime());
6912 anupam.sin 384
    }
3578 mandeep.dh 385
 
5845 mandeep.dh 386
    public String getShippingAddressOfStore(long storeId) {
387
        try {
388
            in.shop2020.logistics.LogisticsService.Client client = new LogisticsClient().getClient();
389
            PickupStore store = client.getPickupStore(storeId);
390
            return StringUtils.join(new String[] {
391
                    store.getName(),
392
                    store.getLine1(),
393
                    store.getLine2(),
394
                    store.getPin(),
395
                    store.getCity(),
396
                    store.getState(),
397
                    store.getPhone()}, ",");
398
        } catch (Exception e) {
399
            return "";
400
        }
401
    }
402
 
4142 mandeep.dh 403
    public String getAddress(Order order) {
404
        return ModelUtils.extractAddressFromOrder(order);
405
    }
6985 anupam.sin 406
 
407
    public String changeShippingAddress() {
408
        try {
409
            TransactionClient transactionServiceClient = new TransactionClient();
410
            transactionServiceClient.getClient().changeShippingAddress(orderId, line1, line2, city, state, pin);
411
        } catch(Exception e) {
412
            log.error("Unable to update address for orderId : " + orderId + "and address : " + 
413
                    line1 + ", " + line2+ ", " + city + ", " + state + ", " + pin, e);
414
        }
415
        return null;
416
    }
417
 
418
    public Address getShippingAddress(Order order) {
419
        Address address = new Address();
420
        address.setLine1(order.getCustomer_address1());
421
        address.setLine2(order.getCustomer_address2());
422
        address.setCity(order.getCustomer_city());
423
        address.setState(order.getCustomer_state());
424
        address.setPin(order.getCustomer_pincode());
425
        return address;
426
    }
4142 mandeep.dh 427
 
2728 vikas 428
    public String getPaymentMethod(List<Attribute> paymentAttributes) {
429
        String paymentMethod = null;
3578 mandeep.dh 430
        if (paymentAttributes == null || paymentAttributes.isEmpty()) {
2728 vikas 431
            return "N/A";
432
        }
3578 mandeep.dh 433
        for (Attribute a : paymentAttributes) {
434
            if ("payMethod".equals(a.getName())) {
2728 vikas 435
                paymentMethod = Constants.PAYMENT_METHOD.get(a.getValue());
436
                break;
437
            }
438
        }
439
        return paymentMethod != null ? paymentMethod : "N/A";
440
    }
2674 vikas 441
 
442
    public void setOrderId(String orderId) {
443
        try {
444
            this.orderId = Long.parseLong(orderId);
3578 mandeep.dh 445
        } catch (NumberFormatException e) {
2674 vikas 446
            log.error(e);
447
        }
448
    }
449
 
4142 mandeep.dh 450
    public List<Payment> getPayments() {
451
        return payments;
2674 vikas 452
    }
453
 
3090 mandeep.dh 454
    public List<ShipmentUpdate> getShipmentUpdates() {
455
        return shipmentUpdates;
456
    }
457
 
458
    public void setShipmentUpdates(List<ShipmentUpdate> shipmentUpdates) {
459
        this.shipmentUpdates = shipmentUpdates;
460
    }
3499 mandeep.dh 461
 
462
    public Order getOrder() {
463
        return order;
464
    }
465
 
466
    public void setOrder(Order order) {
467
        this.order = order;
468
    }
3578 mandeep.dh 469
 
470
    public Long getCodTicketId() {
471
        return codTicketId;
472
    }
473
 
474
    public void setCodTicketId(Long codTicketId) {
475
        this.codTicketId = codTicketId;
476
    }
4142 mandeep.dh 477
 
478
    public List<Address> getAddresses() {
479
        return addresses;
480
    }
481
 
482
    public void setAddresses(List<Address> addresses) {
483
        this.addresses = addresses;
484
    }
4241 anupam.sin 485
 
486
    public String getOrderStatusDescription(Order order) {
487
        String status = order.getStatus().getDescription();
488
 
489
        if (order.getStatus() == OrderStatus.DELIVERY_SUCCESS) {
490
            status = "Completed";
491
        }
492
 
493
        return status;
494
    }
4689 anupam.sin 495
 
496
    public String getCancellationInitiator() {
497
        return cancellationInitiator;
498
    }
499
 
500
    public void setCancellationInitiator(String cancellationInitiator) {
501
        this.cancellationInitiator = cancellationInitiator;
502
    }
503
 
504
    public String getCancelReason() {
505
        return cancelReason;
506
    }
507
 
508
    public void setCancelReason(String cancelReason) {
509
        this.cancelReason = cancelReason;
510
    }
511
 
512
    public String getBody() {
513
        return body;
514
    }
515
 
516
    public void setBody(String body) {
517
        this.body = body;
518
    }
6985 anupam.sin 519
 
520
    public String getLine1() {
521
        return line1;
522
    }
523
 
524
    public void setLine1(String line1) {
525
        this.line1 = line1;
526
    }
527
 
528
    public String getLine2() {
529
        return line2;
530
    }
531
 
532
    public void setLine2(String line2) {
533
        this.line2 = line2;
534
    }
535
 
536
    public String getCity() {
537
        return city;
538
    }
539
 
540
    public void setCity(String city) {
541
        this.city = city;
542
    }
543
 
544
    public String getState() {
545
        return state;
546
    }
547
 
548
    public void setState(String state) {
549
        this.state = state;
550
    }
551
 
552
    public String getPin() {
553
        return pin;
554
    }
555
 
556
    public void setPin(String pin) {
557
        this.pin = pin;
558
    }
7190 amar.kumar 559
 
560
	public String getFreebieItem() {
561
		return freebieItem;
562
	}
563
 
564
	public void setFreebieItem(String freebieItem) {
565
		this.freebieItem = freebieItem;
566
	}
567
 
568
	public String getDealText() {
569
		return dealText;
570
	}
571
 
572
	public void setDealText(String dealText) {
573
		this.dealText = dealText;
574
	}
575
 
576
	public String getParentOrderIdForFreebieOrder() {
577
		return parentOrderIdForFreebieOrder;
578
	}
579
 
580
	public void setParentOrderIdForFreebieOrder(String parentOrderIdForFreebieOrder) {
581
		this.parentOrderIdForFreebieOrder = parentOrderIdForFreebieOrder;
582
	}
583
 
584
	public String getFreebieOrderId() {
585
		return freebieOrderId;
586
	}
587
 
588
	public void setFreebieOrderId(String freebieOrderId) {
589
		this.freebieOrderId = freebieOrderId;
590
	}
591
 
2674 vikas 592
}