Subversion Repositories SmartDukaan

Rev

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

Rev Author Line No. Line
94 ashish 1
#
2
# Autogenerated by Thrift
3
#
4
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
5
#
6
 
7
from thrift.Thrift import *
8
from ttypes import *
9
from thrift.Thrift import TProcessor
10
from thrift.transport import TTransport
11
from thrift.protocol import TBinaryProtocol
12
try:
13
  from thrift.protocol import fastbinary
14
except:
15
  fastbinary = None
16
 
17
 
18
class Iface:
765 rajveer 19
  def closeSession(self, ):
20
    """
21
    For closing the open session in sqlalchemy
22
    """
23
    pass
24
 
94 ashish 25
  def createTransaction(self, transaction):
26
    """
27
    Parameters:
28
     - transaction
29
    """
30
    pass
31
 
32
  def getTransaction(self, id):
33
    """
34
    Parameters:
35
     - id
36
    """
37
    pass
38
 
39
  def getTransactionsForCustomer(self, customerId, from_date, to_date, status):
40
    """
41
    Parameters:
42
     - customerId
43
     - from_date
44
     - to_date
45
     - status
46
    """
47
    pass
48
 
132 ashish 49
  def getTransactionsForShoppingCartId(self, shoppingCartId):
50
    """
51
    Parameters:
52
     - shoppingCartId
53
    """
54
    pass
55
 
94 ashish 56
  def getTransactionStatus(self, transactionId):
57
    """
58
    Parameters:
59
     - transactionId
60
    """
61
    pass
62
 
63
  def changeTransactionStatus(self, transactionId, status, description):
64
    """
65
    Parameters:
66
     - transactionId
67
     - status
68
     - description
69
    """
70
    pass
71
 
1398 varun.gupt 72
  def enqueueTransactionInfoEmail(self, transactionId):
1382 varun.gupt 73
    """
74
    Parameters:
75
     - transactionId
76
    """
77
    pass
78
 
483 rajveer 79
  def getAllOrders(self, status, from_date, to_date, warehouse_id):
94 ashish 80
    """
81
    Parameters:
483 rajveer 82
     - status
83
     - from_date
84
     - to_date
85
     - warehouse_id
94 ashish 86
    """
87
    pass
88
 
999 varun.gupt 89
  def getOrdersByBillingDate(self, status, start_billing_date, end_billing_date, warehouse_id):
90
    """
1132 chandransh 91
    Returns orders within a range of their billing dates
92
 
999 varun.gupt 93
    Parameters:
94
     - status
95
     - start_billing_date
96
     - end_billing_date
97
     - warehouse_id
98
    """
99
    pass
100
 
1382 varun.gupt 101
  def getReturnableOrdersForCustomer(self, customer_id, limit):
102
    """
103
    Returns order ids for orders which can be returned
104
 
105
    Parameters:
106
     - customer_id
107
     - limit
108
    """
109
    pass
110
 
111
  def getCancellableOrdersForCustomer(self, customer_id, limit):
112
    """
113
    Returns order ids for orders which can be cancelled
114
 
115
    Parameters:
116
     - customer_id
117
     - limit
118
    """
119
    pass
120
 
483 rajveer 121
  def changeOrderStatus(self, orderId, status, description):
94 ashish 122
    """
123
    Parameters:
483 rajveer 124
     - orderId
125
     - status
126
     - description
94 ashish 127
    """
128
    pass
129
 
1528 ankur.sing 130
  def getOrdersForTransaction(self, transactionId, customerId):
94 ashish 131
    """
1528 ankur.sing 132
    Returns list of orders for given transaction Id. Also filters based on customer Id so that
133
    only user who owns the transaction can view its order details.
134
 
94 ashish 135
    Parameters:
136
     - transactionId
1528 ankur.sing 137
     - customerId
94 ashish 138
    """
139
    pass
140
 
3014 chandransh 141
  def getOrdersForCustomer(self, customerId, from_date, to_date, statuses):
94 ashish 142
    """
3014 chandransh 143
    Returns list of orders for the given customer created between the given dates and having the given statuses.
144
    Pass and empty list to ignore filtering on statuses.
145
 
94 ashish 146
    Parameters:
483 rajveer 147
     - customerId
148
     - from_date
149
     - to_date
3014 chandransh 150
     - statuses
94 ashish 151
    """
152
    pass
153
 
483 rajveer 154
  def createOrder(self, order):
94 ashish 155
    """
156
    Parameters:
483 rajveer 157
     - order
94 ashish 158
    """
159
    pass
160
 
483 rajveer 161
  def getOrder(self, id):
94 ashish 162
    """
163
    Parameters:
483 rajveer 164
     - id
94 ashish 165
    """
166
    pass
167
 
483 rajveer 168
  def getLineItemsForOrder(self, orderId):
94 ashish 169
    """
170
    Parameters:
483 rajveer 171
     - orderId
94 ashish 172
    """
173
    pass
174
 
1528 ankur.sing 175
  def getOrderForCustomer(self, orderId, customerId):
176
    """
177
    Returns an order for the order Id. Also checks if the order belongs to the customer whose Id is passed.
178
    Throws exception if either order Id is invalid or order does not below to the customer whose Id is passed.
179
 
180
    Parameters:
181
     - orderId
182
     - customerId
183
    """
184
    pass
185
 
3064 chandransh 186
  def getAlerts(self, orderId, valid):
187
    """
188
    Parameters:
189
     - orderId
190
     - valid
191
    """
192
    pass
193
 
194
  def setAlert(self, orderId, unset, type, comment):
195
    """
196
    Parameters:
197
     - orderId
198
     - unset
199
     - type
200
     - comment
201
    """
202
    pass
203
 
204
  def getValidOrderCount(self, ):
205
    """
206
    Return the number of valid orders. (OrderStatus >= OrderStatus.SUBMITTED_FOR_PROCESSING)
207
    """
208
    pass
209
 
210
  def getNoOfCustomersWithSuccessfulTransaction(self, ):
211
    """
212
    Returns the number of distinct customers who have done successful transactions
213
    """
214
    pass
215
 
216
  def getValidOrdersAmountRange(self, ):
217
    """
218
    Returns the minimum and maximum amounts of a valid order. (OrderStatus >= OrderStatus.SUBMITTED_FOR_PROCESSING)
219
    List contains two values, first minimum amount and second maximum amount.
220
    """
221
    pass
222
 
223
  def getValidOrders(self, limit):
224
    """
225
    Returns list of Orders in descending order by Order creation date. List is restricted to limit Orders.
226
    If limit is passed as 0, then all valid Orders are returned.
227
 
228
    Parameters:
229
     - limit
230
    """
231
    pass
232
 
1220 chandransh 233
  def batchOrders(self, warehouseId):
234
    """
235
    Create a batch of all the pending orders for the given warehouse.
236
    The returned list is orderd by created_timestamp.
237
    If there are no pending orders, an empty list is returned.
238
 
239
    Parameters:
240
     - warehouseId
241
    """
242
    pass
243
 
1208 chandransh 244
  def markOrderAsOutOfStock(self, orderId):
245
    """
246
    Mark the given order as out of stock. Throws an exception if the order with the given Id couldn't be found.
247
 
248
    Parameters:
249
     - orderId
250
    """
251
    pass
252
 
3064 chandransh 253
  def verifyOrder(self, orderId):
759 chandransh 254
    """
3064 chandransh 255
    Marks the given order as SUBMITTED_FOR_PROCESSING and updates the verified
256
    timestamp. It is intended to be used for COD orders but can be harmlessly
257
    used for all other orders as well.
258
    Throws an exception if no such order exists.
759 chandransh 259
 
260
    Parameters:
3064 chandransh 261
     - orderId
262
    """
263
    pass
264
 
265
  def acceptOrder(self, orderId):
266
    """
267
    Marks the given order as ACCEPTED and updates the accepted timestamp. If the
268
    given order is not a COD order, it also captures the payment if the same has
269
    not been captured.
270
    Throws an exception if no such order exists.
271
 
272
    Parameters:
273
     - orderId
274
    """
275
    pass
276
 
277
  def billOrder(self, orderId):
278
    """
279
    Parameters:
280
     - orderId
281
    """
282
    pass
283
 
284
  def addBillingDetails(self, orderId, invoice_number, billed_by):
285
    """
286
    Add billing details such as the bill number and the biller to the Order.
287
    Should be used when the bill is issued by a 3rd party and we've to feed
288
    the information into our system.
289
 
290
    Parameters:
291
     - orderId
292
     - invoice_number
293
     - billed_by
294
    """
295
    pass
296
 
297
  def addJacketNumber(self, orderId, jacketNumber, imeiNumber, itemNumber, billedBy, billingType):
298
    """
299
    Adds jacket number, item number and IMEI no. to the order. Doesn't update
300
    the IMEI no. if a -1 is supplied.
301
    Also, it generates an invoice number for the order, marks the order as
302
    BILLED and sets the billing timestamp.
303
    It should be used when we are billing the orders ourselves.
304
 
305
    Returns false if it doesn't find the order with the given ID.
306
 
307
    Parameters:
308
     - orderId
309
     - jacketNumber
310
     - imeiNumber
311
     - itemNumber
312
     - billedBy
313
     - billingType
314
    """
315
    pass
316
 
317
  def markOrdersAsManifested(self, warehouseId, providerId, cod):
318
    """
319
    Depending on the third parameter, marks either all prepaid or all cod orders BILLED by the
320
    given warehouse and were picked up by the given provider as SHIPPED_FROM_WH.
321
 
322
    Parameters:
759 chandransh 323
     - warehouseId
324
     - providerId
3064 chandransh 325
     - cod
759 chandransh 326
    """
327
    pass
328
 
1113 chandransh 329
  def markOrdersAsPickedUp(self, providerId, pickupDetails):
330
    """
331
    Marks all SHIPPED_FROM_WH orders of the previous day for a provider as SHIPPED_TO_LOGISTICS.
332
    Returns a list of orders that were shipped from warehouse but did not appear in the pick-up report.
333
    Raises an exception if we encounter report for an AWB number that we did not ship.
334
 
335
    Parameters:
336
     - providerId
337
     - pickupDetails
338
    """
339
    pass
340
 
1132 chandransh 341
  def markOrdersAsDelivered(self, providerId, deliveredOrders):
342
    """
343
    Marks all orders with AWBs in the given map as delivered. Also sets the delivery timestamp and
344
    the name of the receiver.
345
    Raises an exception if we encounter report for an AWB number that we did not ship.
346
 
347
    Parameters:
348
     - providerId
349
     - deliveredOrders
350
    """
351
    pass
352
 
1135 chandransh 353
  def markOrdersAsFailed(self, providerId, returnedOrders):
354
    """
355
    Mark all orders with AWBs in the given map as failed. Also sets the delivery timestamp.
356
    Raises an exception if we encounter report for an AWB number that we did not ship.
357
 
358
    Parameters:
359
     - providerId
360
     - returnedOrders
361
    """
362
    pass
363
 
1246 chandransh 364
  def updateNonDeliveryReason(self, providerId, undeliveredOrders):
365
    """
366
    Update the status description of orders whose AWB numbers are keys of the Map.
367
 
368
    Parameters:
369
     - providerId
370
     - undeliveredOrders
371
    """
372
    pass
373
 
1408 ankur.sing 374
  def getUndeliveredOrders(self, providerId, warehouseId):
375
    """
376
    Returns the list of orders whose delivery time has passed but have not been
377
    delivered yet for the given provider and warehouse. To get a complete list of
378
    undelivered orders, pass them as -1.
379
    Returns an empty list if no such orders exist.
380
 
381
    Parameters:
382
     - providerId
383
     - warehouseId
384
    """
385
    pass
386
 
2536 chandransh 387
  def toggleDOAFlag(self, orderId):
388
    """
389
    Toggle the DOA flag of an order. This should be used to flag an order for follow-up and unflag it when the follow-up is complete.
390
    Returns the final flag status.
391
    Throws an exception if the order with the given id couldn't be found or if the order status is not DELVIERY_SUCCESS.
392
 
393
    Parameters:
394
     - orderId
395
    """
396
    pass
1886 ankur.sing 397
 
2536 chandransh 398
  def requestPickupNumber(self, orderId):
399
    """
400
    Sends out an email to the account manager of the original courier provider used to ship the order.
401
    If the order status was DELIVERY_SUCCESS, it is changed to be DOA_PICKUP_REQUESTED.
402
    If the order status was DOA_PICKUP_REQUESTED, it is left unchanged.
403
    For any other status, it returns false.
404
    Throws an exception if the order with the given id couldn't be found.
405
 
406
    Parameters:
407
     - orderId
408
    """
409
    pass
410
 
411
  def authorizePickup(self, orderId, pickupNumber):
412
    """
413
    If the order status is DOA_PICKUP_REQUESTED, it does the following
414
    	1. Sends out an email to the customer with the dispatch advice that he has to print as an attachment.
415
    	2. Changes order status to be DOA_PICKUP_AUTHORIZED.
416
    	3. Returns true
2591 chandransh 417
    If the order is in any other status, it returns false.
2536 chandransh 418
    Throws an exception if the order with the given id couldn't be found.
419
 
420
    Parameters:
421
     - orderId
422
     - pickupNumber
423
    """
424
    pass
425
 
2764 chandransh 426
  def markDoasAsPickedUp(self, providerId, pickupDetails):
427
    """
428
    Marks all DOA_PICKUP_AUTHORIZED orders of the previous day for a provider as DOA_RETURN_IN_TRANSIT.
429
    Returns a list of orders that were authorized for pickup but did not appear in the pick-up report.
430
 
431
    Parameters:
432
     - providerId
433
     - pickupDetails
434
    """
435
    pass
436
 
2616 chandransh 437
  def receiveReturn(self, orderId):
2591 chandransh 438
    """
2599 chandransh 439
    If the order status is DOA_RETURN_AUTHORIZED or DOA_RETURN_IN_TRANSIT, marks the order status as DOA_RECEIVED and returns true.
2616 chandransh 440
    If the order status is SALES_RETURN_IN_TRANSIT, marks the order status as SALES_RET_RECEIVED and returns true.
2591 chandransh 441
    If the order is in any other state, it returns false.
442
    Throws an exception if the order with the given id couldn't be found.
443
 
444
    Parameters:
445
     - orderId
446
    """
447
    pass
2536 chandransh 448
 
2591 chandransh 449
  def validateDoa(self, orderId, isValid):
450
    """
2599 chandransh 451
    Used to validate the DOA certificate for an order in the DOA_RECEIVED state. If the certificate is valid,
2616 chandransh 452
    the order state is changed to DOA_CERT_VALID. If the certificate is invalid, the order state is changed to DOA_CERT_INVALID.
2591 chandransh 453
    If the order is in any other state, it returns false.
454
    Throws an exception if the order with the given id couldn't be found.
455
 
456
    Parameters:
457
     - orderId
458
     - isValid
459
    """
460
    pass
461
 
2616 chandransh 462
  def reshipOrder(self, orderId):
463
    """
464
    If the order is in SALES_RET_RECEIVED or DOA_CERT_INVALID state, it does the following:
465
    	1. Creates a new order for processing in the BILLED state. All billing information is saved.
466
    	2. Marks the current order as one of the final states SALES_RET_RESHIPPED and DOA_INVALID_RESHIPPED depending on what state the order started in.
467
 
468
    If the order is in DOA_CERT_VALID state, it does the following:
469
    	1. Creates a new order for processing in the SUBMITTED_FOR_PROCESSING state.
470
    	2. Creates a return order for the warehouse executive to return the DOA material.
471
    	3. Marks the current order as the final DOA_RESHIPPED state.
472
 
473
    Returns the id of the newly created order.
474
 
475
    Throws an exception if the order with the given id couldn't be found.
476
 
477
    Parameters:
478
     - orderId
479
    """
480
    pass
2591 chandransh 481
 
3226 chandransh 482
  def refundOrder(self, orderId, refundedBy, reason):
2616 chandransh 483
    """
484
    If the order is in SALES_RET_RECEIVED, DOA_CERT_VALID or DOA_CERT_INVALID state, it does the following:
485
    	1. Creates a refund request for batch processing.
486
    	2. Creates a return order for the warehouse executive to return the shipped material.
487
    	3. Marks the current order as SALES_RET_REFUNDED, DOA_VALID_REFUNDED or DOA_INVALID_REFUNDED final states.
488
 
489
    If the order is in SUBMITTED_FOR_PROCESSING or INVENTORY_LOW state, it does the following:
490
    	1. Creates a refund request for batch processing.
3226 chandransh 491
    	2. Cancels the reservation of the item in the warehouse.
492
    	3. Marks the current order as the REFUNDED final state.
2616 chandransh 493
 
3226 chandransh 494
    For all COD orders, if the order is in INIT, SUBMITTED_FOR_PROCESSING or INVENTORY_LOW state, it does the following:
495
    	1. Cancels the reservation of the item in the warehouse.
496
    	2. Marks the current order as CANCELED.
497
 
498
    In all cases, it updates the reason for cancellation or refund and the person who performed the action.
499
 
2616 chandransh 500
    Returns True if it is successful, False otherwise.
501
 
502
    Throws an exception if the order with the given id couldn't be found.
503
 
504
    Parameters:
505
     - orderId
3226 chandransh 506
     - refundedBy
507
     - reason
2616 chandransh 508
    """
509
    pass
510
 
2690 chandransh 511
  def getReturnOrders(self, warehouseId, fromDate, toDate):
512
    """
513
    Get all return orders created between the from and to dates for the given warehouse.
514
    Ignores the warehouse if it is passed as -1.
515
 
516
    Parameters:
517
     - warehouseId
518
     - fromDate
519
     - toDate
520
    """
521
    pass
2616 chandransh 522
 
2700 chandransh 523
  def getReturnOrder(self, id):
524
    """
525
    Returns the ReturnOrder corresponding to the given id.
526
    Throws an exception if the return order with the given id couldn't be found.
527
 
528
    Parameters:
529
     - id
530
    """
531
    pass
532
 
2690 chandransh 533
  def processReturn(self, returnOrderId):
534
    """
535
    Marks the return order with the given id as processed. Raises an exception if no such return order exists.
536
 
537
    Parameters:
538
     - returnOrderId
539
    """
540
    pass
541
 
2819 chandransh 542
  def createPurchaseOrder(self, warehouseId):
543
    """
544
    Creates a purchase order corresponding to all the pending orders of the given warehouse.
2842 chandransh 545
    Returns the PO no. of the newly created purchase order. Returns -1 no new purchase order had to be created.
2819 chandransh 546
 
547
    Parameters:
548
     - warehouseId
549
    """
550
    pass
2690 chandransh 551
 
2819 chandransh 552
 
94 ashish 553
class Client(Iface):
554
  def __init__(self, iprot, oprot=None):
555
    self._iprot = self._oprot = iprot
556
    if oprot != None:
557
      self._oprot = oprot
558
    self._seqid = 0
559
 
765 rajveer 560
  def closeSession(self, ):
561
    """
562
    For closing the open session in sqlalchemy
563
    """
564
    self.send_closeSession()
565
    self.recv_closeSession()
566
 
567
  def send_closeSession(self, ):
568
    self._oprot.writeMessageBegin('closeSession', TMessageType.CALL, self._seqid)
569
    args = closeSession_args()
570
    args.write(self._oprot)
571
    self._oprot.writeMessageEnd()
572
    self._oprot.trans.flush()
573
 
574
  def recv_closeSession(self, ):
575
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
576
    if mtype == TMessageType.EXCEPTION:
577
      x = TApplicationException()
578
      x.read(self._iprot)
579
      self._iprot.readMessageEnd()
580
      raise x
581
    result = closeSession_result()
582
    result.read(self._iprot)
583
    self._iprot.readMessageEnd()
584
    return
585
 
94 ashish 586
  def createTransaction(self, transaction):
587
    """
588
    Parameters:
589
     - transaction
590
    """
591
    self.send_createTransaction(transaction)
132 ashish 592
    return self.recv_createTransaction()
94 ashish 593
 
594
  def send_createTransaction(self, transaction):
595
    self._oprot.writeMessageBegin('createTransaction', TMessageType.CALL, self._seqid)
596
    args = createTransaction_args()
597
    args.transaction = transaction
598
    args.write(self._oprot)
599
    self._oprot.writeMessageEnd()
600
    self._oprot.trans.flush()
601
 
602
  def recv_createTransaction(self, ):
603
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
604
    if mtype == TMessageType.EXCEPTION:
605
      x = TApplicationException()
606
      x.read(self._iprot)
607
      self._iprot.readMessageEnd()
608
      raise x
609
    result = createTransaction_result()
610
    result.read(self._iprot)
611
    self._iprot.readMessageEnd()
132 ashish 612
    if result.success != None:
613
      return result.success
94 ashish 614
    if result.ex != None:
615
      raise result.ex
132 ashish 616
    raise TApplicationException(TApplicationException.MISSING_RESULT, "createTransaction failed: unknown result");
94 ashish 617
 
618
  def getTransaction(self, id):
619
    """
620
    Parameters:
621
     - id
622
    """
623
    self.send_getTransaction(id)
624
    return self.recv_getTransaction()
625
 
626
  def send_getTransaction(self, id):
627
    self._oprot.writeMessageBegin('getTransaction', TMessageType.CALL, self._seqid)
628
    args = getTransaction_args()
629
    args.id = id
630
    args.write(self._oprot)
631
    self._oprot.writeMessageEnd()
632
    self._oprot.trans.flush()
633
 
634
  def recv_getTransaction(self, ):
635
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
636
    if mtype == TMessageType.EXCEPTION:
637
      x = TApplicationException()
638
      x.read(self._iprot)
639
      self._iprot.readMessageEnd()
640
      raise x
641
    result = getTransaction_result()
642
    result.read(self._iprot)
643
    self._iprot.readMessageEnd()
644
    if result.success != None:
645
      return result.success
646
    if result.ex != None:
647
      raise result.ex
648
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getTransaction failed: unknown result");
649
 
650
  def getTransactionsForCustomer(self, customerId, from_date, to_date, status):
651
    """
652
    Parameters:
653
     - customerId
654
     - from_date
655
     - to_date
656
     - status
657
    """
658
    self.send_getTransactionsForCustomer(customerId, from_date, to_date, status)
659
    return self.recv_getTransactionsForCustomer()
660
 
661
  def send_getTransactionsForCustomer(self, customerId, from_date, to_date, status):
662
    self._oprot.writeMessageBegin('getTransactionsForCustomer', TMessageType.CALL, self._seqid)
663
    args = getTransactionsForCustomer_args()
664
    args.customerId = customerId
665
    args.from_date = from_date
666
    args.to_date = to_date
667
    args.status = status
668
    args.write(self._oprot)
669
    self._oprot.writeMessageEnd()
670
    self._oprot.trans.flush()
671
 
672
  def recv_getTransactionsForCustomer(self, ):
673
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
674
    if mtype == TMessageType.EXCEPTION:
675
      x = TApplicationException()
676
      x.read(self._iprot)
677
      self._iprot.readMessageEnd()
678
      raise x
679
    result = getTransactionsForCustomer_result()
680
    result.read(self._iprot)
681
    self._iprot.readMessageEnd()
682
    if result.success != None:
683
      return result.success
684
    if result.ex != None:
685
      raise result.ex
686
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getTransactionsForCustomer failed: unknown result");
687
 
132 ashish 688
  def getTransactionsForShoppingCartId(self, shoppingCartId):
689
    """
690
    Parameters:
691
     - shoppingCartId
692
    """
693
    self.send_getTransactionsForShoppingCartId(shoppingCartId)
694
    return self.recv_getTransactionsForShoppingCartId()
695
 
696
  def send_getTransactionsForShoppingCartId(self, shoppingCartId):
697
    self._oprot.writeMessageBegin('getTransactionsForShoppingCartId', TMessageType.CALL, self._seqid)
698
    args = getTransactionsForShoppingCartId_args()
699
    args.shoppingCartId = shoppingCartId
700
    args.write(self._oprot)
701
    self._oprot.writeMessageEnd()
702
    self._oprot.trans.flush()
703
 
704
  def recv_getTransactionsForShoppingCartId(self, ):
705
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
706
    if mtype == TMessageType.EXCEPTION:
707
      x = TApplicationException()
708
      x.read(self._iprot)
709
      self._iprot.readMessageEnd()
710
      raise x
711
    result = getTransactionsForShoppingCartId_result()
712
    result.read(self._iprot)
713
    self._iprot.readMessageEnd()
714
    if result.success != None:
715
      return result.success
716
    if result.ex != None:
717
      raise result.ex
718
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getTransactionsForShoppingCartId failed: unknown result");
719
 
94 ashish 720
  def getTransactionStatus(self, transactionId):
721
    """
722
    Parameters:
723
     - transactionId
724
    """
725
    self.send_getTransactionStatus(transactionId)
726
    return self.recv_getTransactionStatus()
727
 
728
  def send_getTransactionStatus(self, transactionId):
729
    self._oprot.writeMessageBegin('getTransactionStatus', TMessageType.CALL, self._seqid)
730
    args = getTransactionStatus_args()
731
    args.transactionId = transactionId
732
    args.write(self._oprot)
733
    self._oprot.writeMessageEnd()
734
    self._oprot.trans.flush()
735
 
736
  def recv_getTransactionStatus(self, ):
737
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
738
    if mtype == TMessageType.EXCEPTION:
739
      x = TApplicationException()
740
      x.read(self._iprot)
741
      self._iprot.readMessageEnd()
742
      raise x
743
    result = getTransactionStatus_result()
744
    result.read(self._iprot)
745
    self._iprot.readMessageEnd()
746
    if result.success != None:
747
      return result.success
748
    if result.ex != None:
749
      raise result.ex
750
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getTransactionStatus failed: unknown result");
751
 
752
  def changeTransactionStatus(self, transactionId, status, description):
753
    """
754
    Parameters:
755
     - transactionId
756
     - status
757
     - description
758
    """
759
    self.send_changeTransactionStatus(transactionId, status, description)
760
    return self.recv_changeTransactionStatus()
761
 
762
  def send_changeTransactionStatus(self, transactionId, status, description):
763
    self._oprot.writeMessageBegin('changeTransactionStatus', TMessageType.CALL, self._seqid)
764
    args = changeTransactionStatus_args()
765
    args.transactionId = transactionId
766
    args.status = status
767
    args.description = description
768
    args.write(self._oprot)
769
    self._oprot.writeMessageEnd()
770
    self._oprot.trans.flush()
771
 
772
  def recv_changeTransactionStatus(self, ):
773
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
774
    if mtype == TMessageType.EXCEPTION:
775
      x = TApplicationException()
776
      x.read(self._iprot)
777
      self._iprot.readMessageEnd()
778
      raise x
779
    result = changeTransactionStatus_result()
780
    result.read(self._iprot)
781
    self._iprot.readMessageEnd()
782
    if result.success != None:
783
      return result.success
784
    if result.ex != None:
785
      raise result.ex
786
    raise TApplicationException(TApplicationException.MISSING_RESULT, "changeTransactionStatus failed: unknown result");
787
 
1398 varun.gupt 788
  def enqueueTransactionInfoEmail(self, transactionId):
1382 varun.gupt 789
    """
790
    Parameters:
791
     - transactionId
792
    """
1398 varun.gupt 793
    self.send_enqueueTransactionInfoEmail(transactionId)
794
    return self.recv_enqueueTransactionInfoEmail()
1382 varun.gupt 795
 
1398 varun.gupt 796
  def send_enqueueTransactionInfoEmail(self, transactionId):
797
    self._oprot.writeMessageBegin('enqueueTransactionInfoEmail', TMessageType.CALL, self._seqid)
798
    args = enqueueTransactionInfoEmail_args()
1382 varun.gupt 799
    args.transactionId = transactionId
800
    args.write(self._oprot)
801
    self._oprot.writeMessageEnd()
802
    self._oprot.trans.flush()
803
 
1398 varun.gupt 804
  def recv_enqueueTransactionInfoEmail(self, ):
1382 varun.gupt 805
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
806
    if mtype == TMessageType.EXCEPTION:
807
      x = TApplicationException()
808
      x.read(self._iprot)
809
      self._iprot.readMessageEnd()
810
      raise x
1398 varun.gupt 811
    result = enqueueTransactionInfoEmail_result()
1382 varun.gupt 812
    result.read(self._iprot)
813
    self._iprot.readMessageEnd()
814
    if result.success != None:
815
      return result.success
816
    if result.ex != None:
817
      raise result.ex
1398 varun.gupt 818
    raise TApplicationException(TApplicationException.MISSING_RESULT, "enqueueTransactionInfoEmail failed: unknown result");
1382 varun.gupt 819
 
483 rajveer 820
  def getAllOrders(self, status, from_date, to_date, warehouse_id):
94 ashish 821
    """
822
    Parameters:
483 rajveer 823
     - status
824
     - from_date
825
     - to_date
826
     - warehouse_id
94 ashish 827
    """
483 rajveer 828
    self.send_getAllOrders(status, from_date, to_date, warehouse_id)
829
    return self.recv_getAllOrders()
94 ashish 830
 
483 rajveer 831
  def send_getAllOrders(self, status, from_date, to_date, warehouse_id):
832
    self._oprot.writeMessageBegin('getAllOrders', TMessageType.CALL, self._seqid)
833
    args = getAllOrders_args()
834
    args.status = status
835
    args.from_date = from_date
836
    args.to_date = to_date
837
    args.warehouse_id = warehouse_id
94 ashish 838
    args.write(self._oprot)
839
    self._oprot.writeMessageEnd()
840
    self._oprot.trans.flush()
841
 
483 rajveer 842
  def recv_getAllOrders(self, ):
94 ashish 843
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
844
    if mtype == TMessageType.EXCEPTION:
845
      x = TApplicationException()
846
      x.read(self._iprot)
847
      self._iprot.readMessageEnd()
848
      raise x
483 rajveer 849
    result = getAllOrders_result()
94 ashish 850
    result.read(self._iprot)
851
    self._iprot.readMessageEnd()
852
    if result.success != None:
853
      return result.success
854
    if result.ex != None:
855
      raise result.ex
483 rajveer 856
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getAllOrders failed: unknown result");
94 ashish 857
 
999 varun.gupt 858
  def getOrdersByBillingDate(self, status, start_billing_date, end_billing_date, warehouse_id):
859
    """
1132 chandransh 860
    Returns orders within a range of their billing dates
861
 
999 varun.gupt 862
    Parameters:
863
     - status
864
     - start_billing_date
865
     - end_billing_date
866
     - warehouse_id
867
    """
868
    self.send_getOrdersByBillingDate(status, start_billing_date, end_billing_date, warehouse_id)
869
    return self.recv_getOrdersByBillingDate()
870
 
871
  def send_getOrdersByBillingDate(self, status, start_billing_date, end_billing_date, warehouse_id):
872
    self._oprot.writeMessageBegin('getOrdersByBillingDate', TMessageType.CALL, self._seqid)
873
    args = getOrdersByBillingDate_args()
874
    args.status = status
875
    args.start_billing_date = start_billing_date
876
    args.end_billing_date = end_billing_date
877
    args.warehouse_id = warehouse_id
878
    args.write(self._oprot)
879
    self._oprot.writeMessageEnd()
880
    self._oprot.trans.flush()
881
 
882
  def recv_getOrdersByBillingDate(self, ):
883
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
884
    if mtype == TMessageType.EXCEPTION:
885
      x = TApplicationException()
886
      x.read(self._iprot)
887
      self._iprot.readMessageEnd()
888
      raise x
889
    result = getOrdersByBillingDate_result()
890
    result.read(self._iprot)
891
    self._iprot.readMessageEnd()
892
    if result.success != None:
893
      return result.success
894
    if result.ex != None:
895
      raise result.ex
896
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getOrdersByBillingDate failed: unknown result");
897
 
1382 varun.gupt 898
  def getReturnableOrdersForCustomer(self, customer_id, limit):
899
    """
900
    Returns order ids for orders which can be returned
901
 
902
    Parameters:
903
     - customer_id
904
     - limit
905
    """
906
    self.send_getReturnableOrdersForCustomer(customer_id, limit)
907
    return self.recv_getReturnableOrdersForCustomer()
908
 
909
  def send_getReturnableOrdersForCustomer(self, customer_id, limit):
910
    self._oprot.writeMessageBegin('getReturnableOrdersForCustomer', TMessageType.CALL, self._seqid)
911
    args = getReturnableOrdersForCustomer_args()
912
    args.customer_id = customer_id
913
    args.limit = limit
914
    args.write(self._oprot)
915
    self._oprot.writeMessageEnd()
916
    self._oprot.trans.flush()
917
 
918
  def recv_getReturnableOrdersForCustomer(self, ):
919
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
920
    if mtype == TMessageType.EXCEPTION:
921
      x = TApplicationException()
922
      x.read(self._iprot)
923
      self._iprot.readMessageEnd()
924
      raise x
925
    result = getReturnableOrdersForCustomer_result()
926
    result.read(self._iprot)
927
    self._iprot.readMessageEnd()
928
    if result.success != None:
929
      return result.success
930
    if result.ex != None:
931
      raise result.ex
932
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getReturnableOrdersForCustomer failed: unknown result");
933
 
934
  def getCancellableOrdersForCustomer(self, customer_id, limit):
935
    """
936
    Returns order ids for orders which can be cancelled
937
 
938
    Parameters:
939
     - customer_id
940
     - limit
941
    """
942
    self.send_getCancellableOrdersForCustomer(customer_id, limit)
943
    return self.recv_getCancellableOrdersForCustomer()
944
 
945
  def send_getCancellableOrdersForCustomer(self, customer_id, limit):
946
    self._oprot.writeMessageBegin('getCancellableOrdersForCustomer', TMessageType.CALL, self._seqid)
947
    args = getCancellableOrdersForCustomer_args()
948
    args.customer_id = customer_id
949
    args.limit = limit
950
    args.write(self._oprot)
951
    self._oprot.writeMessageEnd()
952
    self._oprot.trans.flush()
953
 
954
  def recv_getCancellableOrdersForCustomer(self, ):
955
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
956
    if mtype == TMessageType.EXCEPTION:
957
      x = TApplicationException()
958
      x.read(self._iprot)
959
      self._iprot.readMessageEnd()
960
      raise x
961
    result = getCancellableOrdersForCustomer_result()
962
    result.read(self._iprot)
963
    self._iprot.readMessageEnd()
964
    if result.success != None:
965
      return result.success
966
    if result.ex != None:
967
      raise result.ex
968
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getCancellableOrdersForCustomer failed: unknown result");
969
 
483 rajveer 970
  def changeOrderStatus(self, orderId, status, description):
94 ashish 971
    """
972
    Parameters:
483 rajveer 973
     - orderId
974
     - status
975
     - description
94 ashish 976
    """
483 rajveer 977
    self.send_changeOrderStatus(orderId, status, description)
978
    return self.recv_changeOrderStatus()
94 ashish 979
 
483 rajveer 980
  def send_changeOrderStatus(self, orderId, status, description):
981
    self._oprot.writeMessageBegin('changeOrderStatus', TMessageType.CALL, self._seqid)
982
    args = changeOrderStatus_args()
983
    args.orderId = orderId
984
    args.status = status
985
    args.description = description
94 ashish 986
    args.write(self._oprot)
987
    self._oprot.writeMessageEnd()
988
    self._oprot.trans.flush()
989
 
483 rajveer 990
  def recv_changeOrderStatus(self, ):
94 ashish 991
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
992
    if mtype == TMessageType.EXCEPTION:
993
      x = TApplicationException()
994
      x.read(self._iprot)
995
      self._iprot.readMessageEnd()
996
      raise x
483 rajveer 997
    result = changeOrderStatus_result()
94 ashish 998
    result.read(self._iprot)
999
    self._iprot.readMessageEnd()
1000
    if result.success != None:
1001
      return result.success
1002
    if result.ex != None:
1003
      raise result.ex
483 rajveer 1004
    raise TApplicationException(TApplicationException.MISSING_RESULT, "changeOrderStatus failed: unknown result");
94 ashish 1005
 
1528 ankur.sing 1006
  def getOrdersForTransaction(self, transactionId, customerId):
94 ashish 1007
    """
1528 ankur.sing 1008
    Returns list of orders for given transaction Id. Also filters based on customer Id so that
1009
    only user who owns the transaction can view its order details.
1010
 
94 ashish 1011
    Parameters:
1012
     - transactionId
1528 ankur.sing 1013
     - customerId
94 ashish 1014
    """
1528 ankur.sing 1015
    self.send_getOrdersForTransaction(transactionId, customerId)
483 rajveer 1016
    return self.recv_getOrdersForTransaction()
94 ashish 1017
 
1528 ankur.sing 1018
  def send_getOrdersForTransaction(self, transactionId, customerId):
483 rajveer 1019
    self._oprot.writeMessageBegin('getOrdersForTransaction', TMessageType.CALL, self._seqid)
1020
    args = getOrdersForTransaction_args()
94 ashish 1021
    args.transactionId = transactionId
1528 ankur.sing 1022
    args.customerId = customerId
94 ashish 1023
    args.write(self._oprot)
1024
    self._oprot.writeMessageEnd()
1025
    self._oprot.trans.flush()
1026
 
483 rajveer 1027
  def recv_getOrdersForTransaction(self, ):
94 ashish 1028
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
1029
    if mtype == TMessageType.EXCEPTION:
1030
      x = TApplicationException()
1031
      x.read(self._iprot)
1032
      self._iprot.readMessageEnd()
1033
      raise x
483 rajveer 1034
    result = getOrdersForTransaction_result()
94 ashish 1035
    result.read(self._iprot)
1036
    self._iprot.readMessageEnd()
1037
    if result.success != None:
1038
      return result.success
1039
    if result.ex != None:
1040
      raise result.ex
483 rajveer 1041
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getOrdersForTransaction failed: unknown result");
94 ashish 1042
 
3014 chandransh 1043
  def getOrdersForCustomer(self, customerId, from_date, to_date, statuses):
94 ashish 1044
    """
3014 chandransh 1045
    Returns list of orders for the given customer created between the given dates and having the given statuses.
1046
    Pass and empty list to ignore filtering on statuses.
1047
 
94 ashish 1048
    Parameters:
483 rajveer 1049
     - customerId
1050
     - from_date
1051
     - to_date
3014 chandransh 1052
     - statuses
94 ashish 1053
    """
3014 chandransh 1054
    self.send_getOrdersForCustomer(customerId, from_date, to_date, statuses)
483 rajveer 1055
    return self.recv_getOrdersForCustomer()
94 ashish 1056
 
3014 chandransh 1057
  def send_getOrdersForCustomer(self, customerId, from_date, to_date, statuses):
483 rajveer 1058
    self._oprot.writeMessageBegin('getOrdersForCustomer', TMessageType.CALL, self._seqid)
1059
    args = getOrdersForCustomer_args()
1060
    args.customerId = customerId
1061
    args.from_date = from_date
1062
    args.to_date = to_date
3014 chandransh 1063
    args.statuses = statuses
94 ashish 1064
    args.write(self._oprot)
1065
    self._oprot.writeMessageEnd()
1066
    self._oprot.trans.flush()
1067
 
483 rajveer 1068
  def recv_getOrdersForCustomer(self, ):
94 ashish 1069
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
1070
    if mtype == TMessageType.EXCEPTION:
1071
      x = TApplicationException()
1072
      x.read(self._iprot)
1073
      self._iprot.readMessageEnd()
1074
      raise x
483 rajveer 1075
    result = getOrdersForCustomer_result()
94 ashish 1076
    result.read(self._iprot)
1077
    self._iprot.readMessageEnd()
1078
    if result.success != None:
1079
      return result.success
1080
    if result.ex != None:
1081
      raise result.ex
483 rajveer 1082
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getOrdersForCustomer failed: unknown result");
94 ashish 1083
 
483 rajveer 1084
  def createOrder(self, order):
94 ashish 1085
    """
1086
    Parameters:
483 rajveer 1087
     - order
94 ashish 1088
    """
483 rajveer 1089
    self.send_createOrder(order)
1090
    return self.recv_createOrder()
94 ashish 1091
 
483 rajveer 1092
  def send_createOrder(self, order):
1093
    self._oprot.writeMessageBegin('createOrder', TMessageType.CALL, self._seqid)
1094
    args = createOrder_args()
1095
    args.order = order
94 ashish 1096
    args.write(self._oprot)
1097
    self._oprot.writeMessageEnd()
1098
    self._oprot.trans.flush()
1099
 
483 rajveer 1100
  def recv_createOrder(self, ):
94 ashish 1101
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
1102
    if mtype == TMessageType.EXCEPTION:
1103
      x = TApplicationException()
1104
      x.read(self._iprot)
1105
      self._iprot.readMessageEnd()
1106
      raise x
483 rajveer 1107
    result = createOrder_result()
94 ashish 1108
    result.read(self._iprot)
1109
    self._iprot.readMessageEnd()
1110
    if result.success != None:
1111
      return result.success
1112
    if result.ex != None:
1113
      raise result.ex
483 rajveer 1114
    raise TApplicationException(TApplicationException.MISSING_RESULT, "createOrder failed: unknown result");
94 ashish 1115
 
483 rajveer 1116
  def getOrder(self, id):
94 ashish 1117
    """
1118
    Parameters:
483 rajveer 1119
     - id
94 ashish 1120
    """
483 rajveer 1121
    self.send_getOrder(id)
1122
    return self.recv_getOrder()
94 ashish 1123
 
483 rajveer 1124
  def send_getOrder(self, id):
1125
    self._oprot.writeMessageBegin('getOrder', TMessageType.CALL, self._seqid)
1126
    args = getOrder_args()
1127
    args.id = id
94 ashish 1128
    args.write(self._oprot)
1129
    self._oprot.writeMessageEnd()
1130
    self._oprot.trans.flush()
1131
 
483 rajveer 1132
  def recv_getOrder(self, ):
94 ashish 1133
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
1134
    if mtype == TMessageType.EXCEPTION:
1135
      x = TApplicationException()
1136
      x.read(self._iprot)
1137
      self._iprot.readMessageEnd()
1138
      raise x
483 rajveer 1139
    result = getOrder_result()
94 ashish 1140
    result.read(self._iprot)
1141
    self._iprot.readMessageEnd()
1142
    if result.success != None:
1143
      return result.success
1144
    if result.ex != None:
1145
      raise result.ex
483 rajveer 1146
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getOrder failed: unknown result");
94 ashish 1147
 
483 rajveer 1148
  def getLineItemsForOrder(self, orderId):
94 ashish 1149
    """
1150
    Parameters:
483 rajveer 1151
     - orderId
94 ashish 1152
    """
483 rajveer 1153
    self.send_getLineItemsForOrder(orderId)
1154
    return self.recv_getLineItemsForOrder()
94 ashish 1155
 
483 rajveer 1156
  def send_getLineItemsForOrder(self, orderId):
1157
    self._oprot.writeMessageBegin('getLineItemsForOrder', TMessageType.CALL, self._seqid)
1158
    args = getLineItemsForOrder_args()
1159
    args.orderId = orderId
94 ashish 1160
    args.write(self._oprot)
1161
    self._oprot.writeMessageEnd()
1162
    self._oprot.trans.flush()
1163
 
483 rajveer 1164
  def recv_getLineItemsForOrder(self, ):
94 ashish 1165
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
1166
    if mtype == TMessageType.EXCEPTION:
1167
      x = TApplicationException()
1168
      x.read(self._iprot)
1169
      self._iprot.readMessageEnd()
1170
      raise x
483 rajveer 1171
    result = getLineItemsForOrder_result()
94 ashish 1172
    result.read(self._iprot)
1173
    self._iprot.readMessageEnd()
1174
    if result.success != None:
1175
      return result.success
1176
    if result.ex != None:
1177
      raise result.ex
483 rajveer 1178
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getLineItemsForOrder failed: unknown result");
94 ashish 1179
 
1528 ankur.sing 1180
  def getOrderForCustomer(self, orderId, customerId):
1181
    """
1182
    Returns an order for the order Id. Also checks if the order belongs to the customer whose Id is passed.
1183
    Throws exception if either order Id is invalid or order does not below to the customer whose Id is passed.
1184
 
1185
    Parameters:
1186
     - orderId
1187
     - customerId
1188
    """
1189
    self.send_getOrderForCustomer(orderId, customerId)
1190
    return self.recv_getOrderForCustomer()
1191
 
1192
  def send_getOrderForCustomer(self, orderId, customerId):
1193
    self._oprot.writeMessageBegin('getOrderForCustomer', TMessageType.CALL, self._seqid)
1194
    args = getOrderForCustomer_args()
1195
    args.orderId = orderId
1196
    args.customerId = customerId
1197
    args.write(self._oprot)
1198
    self._oprot.writeMessageEnd()
1199
    self._oprot.trans.flush()
1200
 
1201
  def recv_getOrderForCustomer(self, ):
1202
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
1203
    if mtype == TMessageType.EXCEPTION:
1204
      x = TApplicationException()
1205
      x.read(self._iprot)
1206
      self._iprot.readMessageEnd()
1207
      raise x
1208
    result = getOrderForCustomer_result()
1209
    result.read(self._iprot)
1210
    self._iprot.readMessageEnd()
1211
    if result.success != None:
1212
      return result.success
1213
    if result.ex != None:
1214
      raise result.ex
1215
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getOrderForCustomer failed: unknown result");
1216
 
3064 chandransh 1217
  def getAlerts(self, orderId, valid):
1218
    """
1219
    Parameters:
1220
     - orderId
1221
     - valid
1222
    """
1223
    self.send_getAlerts(orderId, valid)
1224
    return self.recv_getAlerts()
1225
 
1226
  def send_getAlerts(self, orderId, valid):
1227
    self._oprot.writeMessageBegin('getAlerts', TMessageType.CALL, self._seqid)
1228
    args = getAlerts_args()
1229
    args.orderId = orderId
1230
    args.valid = valid
1231
    args.write(self._oprot)
1232
    self._oprot.writeMessageEnd()
1233
    self._oprot.trans.flush()
1234
 
1235
  def recv_getAlerts(self, ):
1236
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
1237
    if mtype == TMessageType.EXCEPTION:
1238
      x = TApplicationException()
1239
      x.read(self._iprot)
1240
      self._iprot.readMessageEnd()
1241
      raise x
1242
    result = getAlerts_result()
1243
    result.read(self._iprot)
1244
    self._iprot.readMessageEnd()
1245
    if result.success != None:
1246
      return result.success
1247
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getAlerts failed: unknown result");
1248
 
1249
  def setAlert(self, orderId, unset, type, comment):
1250
    """
1251
    Parameters:
1252
     - orderId
1253
     - unset
1254
     - type
1255
     - comment
1256
    """
1257
    self.send_setAlert(orderId, unset, type, comment)
1258
    self.recv_setAlert()
1259
 
1260
  def send_setAlert(self, orderId, unset, type, comment):
1261
    self._oprot.writeMessageBegin('setAlert', TMessageType.CALL, self._seqid)
1262
    args = setAlert_args()
1263
    args.orderId = orderId
1264
    args.unset = unset
1265
    args.type = type
1266
    args.comment = comment
1267
    args.write(self._oprot)
1268
    self._oprot.writeMessageEnd()
1269
    self._oprot.trans.flush()
1270
 
1271
  def recv_setAlert(self, ):
1272
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
1273
    if mtype == TMessageType.EXCEPTION:
1274
      x = TApplicationException()
1275
      x.read(self._iprot)
1276
      self._iprot.readMessageEnd()
1277
      raise x
1278
    result = setAlert_result()
1279
    result.read(self._iprot)
1280
    self._iprot.readMessageEnd()
1281
    return
1282
 
1283
  def getValidOrderCount(self, ):
1284
    """
1285
    Return the number of valid orders. (OrderStatus >= OrderStatus.SUBMITTED_FOR_PROCESSING)
1286
    """
1287
    self.send_getValidOrderCount()
1288
    return self.recv_getValidOrderCount()
1289
 
1290
  def send_getValidOrderCount(self, ):
1291
    self._oprot.writeMessageBegin('getValidOrderCount', TMessageType.CALL, self._seqid)
1292
    args = getValidOrderCount_args()
1293
    args.write(self._oprot)
1294
    self._oprot.writeMessageEnd()
1295
    self._oprot.trans.flush()
1296
 
1297
  def recv_getValidOrderCount(self, ):
1298
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
1299
    if mtype == TMessageType.EXCEPTION:
1300
      x = TApplicationException()
1301
      x.read(self._iprot)
1302
      self._iprot.readMessageEnd()
1303
      raise x
1304
    result = getValidOrderCount_result()
1305
    result.read(self._iprot)
1306
    self._iprot.readMessageEnd()
1307
    if result.success != None:
1308
      return result.success
1309
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getValidOrderCount failed: unknown result");
1310
 
1311
  def getNoOfCustomersWithSuccessfulTransaction(self, ):
1312
    """
1313
    Returns the number of distinct customers who have done successful transactions
1314
    """
1315
    self.send_getNoOfCustomersWithSuccessfulTransaction()
1316
    return self.recv_getNoOfCustomersWithSuccessfulTransaction()
1317
 
1318
  def send_getNoOfCustomersWithSuccessfulTransaction(self, ):
1319
    self._oprot.writeMessageBegin('getNoOfCustomersWithSuccessfulTransaction', TMessageType.CALL, self._seqid)
1320
    args = getNoOfCustomersWithSuccessfulTransaction_args()
1321
    args.write(self._oprot)
1322
    self._oprot.writeMessageEnd()
1323
    self._oprot.trans.flush()
1324
 
1325
  def recv_getNoOfCustomersWithSuccessfulTransaction(self, ):
1326
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
1327
    if mtype == TMessageType.EXCEPTION:
1328
      x = TApplicationException()
1329
      x.read(self._iprot)
1330
      self._iprot.readMessageEnd()
1331
      raise x
1332
    result = getNoOfCustomersWithSuccessfulTransaction_result()
1333
    result.read(self._iprot)
1334
    self._iprot.readMessageEnd()
1335
    if result.success != None:
1336
      return result.success
1337
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getNoOfCustomersWithSuccessfulTransaction failed: unknown result");
1338
 
1339
  def getValidOrdersAmountRange(self, ):
1340
    """
1341
    Returns the minimum and maximum amounts of a valid order. (OrderStatus >= OrderStatus.SUBMITTED_FOR_PROCESSING)
1342
    List contains two values, first minimum amount and second maximum amount.
1343
    """
1344
    self.send_getValidOrdersAmountRange()
1345
    return self.recv_getValidOrdersAmountRange()
1346
 
1347
  def send_getValidOrdersAmountRange(self, ):
1348
    self._oprot.writeMessageBegin('getValidOrdersAmountRange', TMessageType.CALL, self._seqid)
1349
    args = getValidOrdersAmountRange_args()
1350
    args.write(self._oprot)
1351
    self._oprot.writeMessageEnd()
1352
    self._oprot.trans.flush()
1353
 
1354
  def recv_getValidOrdersAmountRange(self, ):
1355
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
1356
    if mtype == TMessageType.EXCEPTION:
1357
      x = TApplicationException()
1358
      x.read(self._iprot)
1359
      self._iprot.readMessageEnd()
1360
      raise x
1361
    result = getValidOrdersAmountRange_result()
1362
    result.read(self._iprot)
1363
    self._iprot.readMessageEnd()
1364
    if result.success != None:
1365
      return result.success
1366
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getValidOrdersAmountRange failed: unknown result");
1367
 
1368
  def getValidOrders(self, limit):
1369
    """
1370
    Returns list of Orders in descending order by Order creation date. List is restricted to limit Orders.
1371
    If limit is passed as 0, then all valid Orders are returned.
1372
 
1373
    Parameters:
1374
     - limit
1375
    """
1376
    self.send_getValidOrders(limit)
1377
    return self.recv_getValidOrders()
1378
 
1379
  def send_getValidOrders(self, limit):
1380
    self._oprot.writeMessageBegin('getValidOrders', TMessageType.CALL, self._seqid)
1381
    args = getValidOrders_args()
1382
    args.limit = limit
1383
    args.write(self._oprot)
1384
    self._oprot.writeMessageEnd()
1385
    self._oprot.trans.flush()
1386
 
1387
  def recv_getValidOrders(self, ):
1388
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
1389
    if mtype == TMessageType.EXCEPTION:
1390
      x = TApplicationException()
1391
      x.read(self._iprot)
1392
      self._iprot.readMessageEnd()
1393
      raise x
1394
    result = getValidOrders_result()
1395
    result.read(self._iprot)
1396
    self._iprot.readMessageEnd()
1397
    if result.success != None:
1398
      return result.success
1399
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getValidOrders failed: unknown result");
1400
 
1220 chandransh 1401
  def batchOrders(self, warehouseId):
1402
    """
1403
    Create a batch of all the pending orders for the given warehouse.
1404
    The returned list is orderd by created_timestamp.
1405
    If there are no pending orders, an empty list is returned.
1406
 
1407
    Parameters:
1408
     - warehouseId
1409
    """
1410
    self.send_batchOrders(warehouseId)
1411
    return self.recv_batchOrders()
1412
 
1413
  def send_batchOrders(self, warehouseId):
1414
    self._oprot.writeMessageBegin('batchOrders', TMessageType.CALL, self._seqid)
1415
    args = batchOrders_args()
1416
    args.warehouseId = warehouseId
1417
    args.write(self._oprot)
1418
    self._oprot.writeMessageEnd()
1419
    self._oprot.trans.flush()
1420
 
1421
  def recv_batchOrders(self, ):
1422
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
1423
    if mtype == TMessageType.EXCEPTION:
1424
      x = TApplicationException()
1425
      x.read(self._iprot)
1426
      self._iprot.readMessageEnd()
1427
      raise x
1428
    result = batchOrders_result()
1429
    result.read(self._iprot)
1430
    self._iprot.readMessageEnd()
1431
    if result.success != None:
1432
      return result.success
1433
    if result.ex != None:
1434
      raise result.ex
1435
    raise TApplicationException(TApplicationException.MISSING_RESULT, "batchOrders failed: unknown result");
1436
 
1208 chandransh 1437
  def markOrderAsOutOfStock(self, orderId):
1438
    """
1439
    Mark the given order as out of stock. Throws an exception if the order with the given Id couldn't be found.
1440
 
1441
    Parameters:
1442
     - orderId
1443
    """
1444
    self.send_markOrderAsOutOfStock(orderId)
1445
    return self.recv_markOrderAsOutOfStock()
1446
 
1447
  def send_markOrderAsOutOfStock(self, orderId):
1448
    self._oprot.writeMessageBegin('markOrderAsOutOfStock', TMessageType.CALL, self._seqid)
1449
    args = markOrderAsOutOfStock_args()
1450
    args.orderId = orderId
1451
    args.write(self._oprot)
1452
    self._oprot.writeMessageEnd()
1453
    self._oprot.trans.flush()
1454
 
1455
  def recv_markOrderAsOutOfStock(self, ):
1456
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
1457
    if mtype == TMessageType.EXCEPTION:
1458
      x = TApplicationException()
1459
      x.read(self._iprot)
1460
      self._iprot.readMessageEnd()
1461
      raise x
1462
    result = markOrderAsOutOfStock_result()
1463
    result.read(self._iprot)
1464
    self._iprot.readMessageEnd()
1465
    if result.success != None:
1466
      return result.success
1467
    if result.ex != None:
1468
      raise result.ex
1469
    raise TApplicationException(TApplicationException.MISSING_RESULT, "markOrderAsOutOfStock failed: unknown result");
1470
 
3064 chandransh 1471
  def verifyOrder(self, orderId):
759 chandransh 1472
    """
3064 chandransh 1473
    Marks the given order as SUBMITTED_FOR_PROCESSING and updates the verified
1474
    timestamp. It is intended to be used for COD orders but can be harmlessly
1475
    used for all other orders as well.
1476
    Throws an exception if no such order exists.
759 chandransh 1477
 
1478
    Parameters:
3064 chandransh 1479
     - orderId
759 chandransh 1480
    """
3064 chandransh 1481
    self.send_verifyOrder(orderId)
1482
    return self.recv_verifyOrder()
759 chandransh 1483
 
3064 chandransh 1484
  def send_verifyOrder(self, orderId):
1485
    self._oprot.writeMessageBegin('verifyOrder', TMessageType.CALL, self._seqid)
1486
    args = verifyOrder_args()
1487
    args.orderId = orderId
759 chandransh 1488
    args.write(self._oprot)
1489
    self._oprot.writeMessageEnd()
1490
    self._oprot.trans.flush()
1491
 
3064 chandransh 1492
  def recv_verifyOrder(self, ):
759 chandransh 1493
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
1494
    if mtype == TMessageType.EXCEPTION:
1495
      x = TApplicationException()
1496
      x.read(self._iprot)
1497
      self._iprot.readMessageEnd()
1498
      raise x
3064 chandransh 1499
    result = verifyOrder_result()
759 chandransh 1500
    result.read(self._iprot)
1501
    self._iprot.readMessageEnd()
1502
    if result.success != None:
1503
      return result.success
1504
    if result.ex != None:
1505
      raise result.ex
3064 chandransh 1506
    raise TApplicationException(TApplicationException.MISSING_RESULT, "verifyOrder failed: unknown result");
759 chandransh 1507
 
3064 chandransh 1508
  def acceptOrder(self, orderId):
1113 chandransh 1509
    """
3064 chandransh 1510
    Marks the given order as ACCEPTED and updates the accepted timestamp. If the
1511
    given order is not a COD order, it also captures the payment if the same has
1512
    not been captured.
1513
    Throws an exception if no such order exists.
1113 chandransh 1514
 
1515
    Parameters:
3064 chandransh 1516
     - orderId
1113 chandransh 1517
    """
3064 chandransh 1518
    self.send_acceptOrder(orderId)
1519
    return self.recv_acceptOrder()
1113 chandransh 1520
 
3064 chandransh 1521
  def send_acceptOrder(self, orderId):
1522
    self._oprot.writeMessageBegin('acceptOrder', TMessageType.CALL, self._seqid)
1523
    args = acceptOrder_args()
1524
    args.orderId = orderId
1113 chandransh 1525
    args.write(self._oprot)
1526
    self._oprot.writeMessageEnd()
1527
    self._oprot.trans.flush()
1528
 
3064 chandransh 1529
  def recv_acceptOrder(self, ):
1113 chandransh 1530
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
1531
    if mtype == TMessageType.EXCEPTION:
1532
      x = TApplicationException()
1533
      x.read(self._iprot)
1534
      self._iprot.readMessageEnd()
1535
      raise x
3064 chandransh 1536
    result = acceptOrder_result()
1113 chandransh 1537
    result.read(self._iprot)
1538
    self._iprot.readMessageEnd()
1539
    if result.success != None:
1540
      return result.success
1541
    if result.ex != None:
1542
      raise result.ex
3064 chandransh 1543
    raise TApplicationException(TApplicationException.MISSING_RESULT, "acceptOrder failed: unknown result");
1113 chandransh 1544
 
3064 chandransh 1545
  def billOrder(self, orderId):
1132 chandransh 1546
    """
1547
    Parameters:
3064 chandransh 1548
     - orderId
1132 chandransh 1549
    """
3064 chandransh 1550
    self.send_billOrder(orderId)
1551
    return self.recv_billOrder()
1132 chandransh 1552
 
3064 chandransh 1553
  def send_billOrder(self, orderId):
1554
    self._oprot.writeMessageBegin('billOrder', TMessageType.CALL, self._seqid)
1555
    args = billOrder_args()
1556
    args.orderId = orderId
1132 chandransh 1557
    args.write(self._oprot)
1558
    self._oprot.writeMessageEnd()
1559
    self._oprot.trans.flush()
1560
 
3064 chandransh 1561
  def recv_billOrder(self, ):
1132 chandransh 1562
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
1563
    if mtype == TMessageType.EXCEPTION:
1564
      x = TApplicationException()
1565
      x.read(self._iprot)
1566
      self._iprot.readMessageEnd()
1567
      raise x
3064 chandransh 1568
    result = billOrder_result()
1132 chandransh 1569
    result.read(self._iprot)
1570
    self._iprot.readMessageEnd()
3064 chandransh 1571
    if result.success != None:
1572
      return result.success
1132 chandransh 1573
    if result.ex != None:
1574
      raise result.ex
3064 chandransh 1575
    raise TApplicationException(TApplicationException.MISSING_RESULT, "billOrder failed: unknown result");
1132 chandransh 1576
 
3064 chandransh 1577
  def addBillingDetails(self, orderId, invoice_number, billed_by):
1135 chandransh 1578
    """
3064 chandransh 1579
    Add billing details such as the bill number and the biller to the Order.
1580
    Should be used when the bill is issued by a 3rd party and we've to feed
1581
    the information into our system.
1135 chandransh 1582
 
1583
    Parameters:
3064 chandransh 1584
     - orderId
1585
     - invoice_number
1586
     - billed_by
1135 chandransh 1587
    """
3064 chandransh 1588
    self.send_addBillingDetails(orderId, invoice_number, billed_by)
1589
    return self.recv_addBillingDetails()
1135 chandransh 1590
 
3064 chandransh 1591
  def send_addBillingDetails(self, orderId, invoice_number, billed_by):
1592
    self._oprot.writeMessageBegin('addBillingDetails', TMessageType.CALL, self._seqid)
1593
    args = addBillingDetails_args()
1594
    args.orderId = orderId
1595
    args.invoice_number = invoice_number
1596
    args.billed_by = billed_by
1135 chandransh 1597
    args.write(self._oprot)
1598
    self._oprot.writeMessageEnd()
1599
    self._oprot.trans.flush()
1600
 
3064 chandransh 1601
  def recv_addBillingDetails(self, ):
1135 chandransh 1602
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
1603
    if mtype == TMessageType.EXCEPTION:
1604
      x = TApplicationException()
1605
      x.read(self._iprot)
1606
      self._iprot.readMessageEnd()
1607
      raise x
3064 chandransh 1608
    result = addBillingDetails_result()
1135 chandransh 1609
    result.read(self._iprot)
1610
    self._iprot.readMessageEnd()
3064 chandransh 1611
    if result.success != None:
1612
      return result.success
1135 chandransh 1613
    if result.ex != None:
1614
      raise result.ex
3064 chandransh 1615
    raise TApplicationException(TApplicationException.MISSING_RESULT, "addBillingDetails failed: unknown result");
1135 chandransh 1616
 
3064 chandransh 1617
  def addJacketNumber(self, orderId, jacketNumber, imeiNumber, itemNumber, billedBy, billingType):
1246 chandransh 1618
    """
3064 chandransh 1619
    Adds jacket number, item number and IMEI no. to the order. Doesn't update
1620
    the IMEI no. if a -1 is supplied.
1621
    Also, it generates an invoice number for the order, marks the order as
1622
    BILLED and sets the billing timestamp.
1623
    It should be used when we are billing the orders ourselves.
1246 chandransh 1624
 
3064 chandransh 1625
    Returns false if it doesn't find the order with the given ID.
1626
 
1246 chandransh 1627
    Parameters:
3064 chandransh 1628
     - orderId
1629
     - jacketNumber
1630
     - imeiNumber
1631
     - itemNumber
1632
     - billedBy
1633
     - billingType
1246 chandransh 1634
    """
3064 chandransh 1635
    self.send_addJacketNumber(orderId, jacketNumber, imeiNumber, itemNumber, billedBy, billingType)
1636
    return self.recv_addJacketNumber()
1246 chandransh 1637
 
3064 chandransh 1638
  def send_addJacketNumber(self, orderId, jacketNumber, imeiNumber, itemNumber, billedBy, billingType):
1639
    self._oprot.writeMessageBegin('addJacketNumber', TMessageType.CALL, self._seqid)
1640
    args = addJacketNumber_args()
1641
    args.orderId = orderId
1642
    args.jacketNumber = jacketNumber
1643
    args.imeiNumber = imeiNumber
1644
    args.itemNumber = itemNumber
1645
    args.billedBy = billedBy
1646
    args.billingType = billingType
1246 chandransh 1647
    args.write(self._oprot)
1648
    self._oprot.writeMessageEnd()
1649
    self._oprot.trans.flush()
1650
 
3064 chandransh 1651
  def recv_addJacketNumber(self, ):
1246 chandransh 1652
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
1653
    if mtype == TMessageType.EXCEPTION:
1654
      x = TApplicationException()
1655
      x.read(self._iprot)
1656
      self._iprot.readMessageEnd()
1657
      raise x
3064 chandransh 1658
    result = addJacketNumber_result()
1246 chandransh 1659
    result.read(self._iprot)
1660
    self._iprot.readMessageEnd()
3064 chandransh 1661
    if result.success != None:
1662
      return result.success
1246 chandransh 1663
    if result.ex != None:
1664
      raise result.ex
3064 chandransh 1665
    raise TApplicationException(TApplicationException.MISSING_RESULT, "addJacketNumber failed: unknown result");
1246 chandransh 1666
 
3064 chandransh 1667
  def markOrdersAsManifested(self, warehouseId, providerId, cod):
1408 ankur.sing 1668
    """
3064 chandransh 1669
    Depending on the third parameter, marks either all prepaid or all cod orders BILLED by the
1670
    given warehouse and were picked up by the given provider as SHIPPED_FROM_WH.
1408 ankur.sing 1671
 
1672
    Parameters:
3064 chandransh 1673
     - warehouseId
1408 ankur.sing 1674
     - providerId
3064 chandransh 1675
     - cod
1408 ankur.sing 1676
    """
3064 chandransh 1677
    self.send_markOrdersAsManifested(warehouseId, providerId, cod)
1678
    return self.recv_markOrdersAsManifested()
1408 ankur.sing 1679
 
3064 chandransh 1680
  def send_markOrdersAsManifested(self, warehouseId, providerId, cod):
1681
    self._oprot.writeMessageBegin('markOrdersAsManifested', TMessageType.CALL, self._seqid)
1682
    args = markOrdersAsManifested_args()
1683
    args.warehouseId = warehouseId
1408 ankur.sing 1684
    args.providerId = providerId
3064 chandransh 1685
    args.cod = cod
1408 ankur.sing 1686
    args.write(self._oprot)
1687
    self._oprot.writeMessageEnd()
1688
    self._oprot.trans.flush()
1689
 
3064 chandransh 1690
  def recv_markOrdersAsManifested(self, ):
1408 ankur.sing 1691
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
1692
    if mtype == TMessageType.EXCEPTION:
1693
      x = TApplicationException()
1694
      x.read(self._iprot)
1695
      self._iprot.readMessageEnd()
1696
      raise x
3064 chandransh 1697
    result = markOrdersAsManifested_result()
1408 ankur.sing 1698
    result.read(self._iprot)
1699
    self._iprot.readMessageEnd()
1700
    if result.success != None:
1701
      return result.success
3064 chandransh 1702
    if result.ex != None:
1703
      raise result.ex
1704
    raise TApplicationException(TApplicationException.MISSING_RESULT, "markOrdersAsManifested failed: unknown result");
1408 ankur.sing 1705
 
3064 chandransh 1706
  def markOrdersAsPickedUp(self, providerId, pickupDetails):
94 ashish 1707
    """
3064 chandransh 1708
    Marks all SHIPPED_FROM_WH orders of the previous day for a provider as SHIPPED_TO_LOGISTICS.
1709
    Returns a list of orders that were shipped from warehouse but did not appear in the pick-up report.
1710
    Raises an exception if we encounter report for an AWB number that we did not ship.
1711
 
94 ashish 1712
    Parameters:
3064 chandransh 1713
     - providerId
1714
     - pickupDetails
304 ashish 1715
    """
3064 chandransh 1716
    self.send_markOrdersAsPickedUp(providerId, pickupDetails)
1717
    return self.recv_markOrdersAsPickedUp()
94 ashish 1718
 
3064 chandransh 1719
  def send_markOrdersAsPickedUp(self, providerId, pickupDetails):
1720
    self._oprot.writeMessageBegin('markOrdersAsPickedUp', TMessageType.CALL, self._seqid)
1721
    args = markOrdersAsPickedUp_args()
1722
    args.providerId = providerId
1723
    args.pickupDetails = pickupDetails
304 ashish 1724
    args.write(self._oprot)
1725
    self._oprot.writeMessageEnd()
1726
    self._oprot.trans.flush()
1727
 
3064 chandransh 1728
  def recv_markOrdersAsPickedUp(self, ):
304 ashish 1729
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
1730
    if mtype == TMessageType.EXCEPTION:
1731
      x = TApplicationException()
1732
      x.read(self._iprot)
1733
      self._iprot.readMessageEnd()
1734
      raise x
3064 chandransh 1735
    result = markOrdersAsPickedUp_result()
304 ashish 1736
    result.read(self._iprot)
1737
    self._iprot.readMessageEnd()
1738
    if result.success != None:
1739
      return result.success
3064 chandransh 1740
    if result.ex != None:
1741
      raise result.ex
1742
    raise TApplicationException(TApplicationException.MISSING_RESULT, "markOrdersAsPickedUp failed: unknown result");
304 ashish 1743
 
3064 chandransh 1744
  def markOrdersAsDelivered(self, providerId, deliveredOrders):
304 ashish 1745
    """
3064 chandransh 1746
    Marks all orders with AWBs in the given map as delivered. Also sets the delivery timestamp and
1747
    the name of the receiver.
1748
    Raises an exception if we encounter report for an AWB number that we did not ship.
1749
 
304 ashish 1750
    Parameters:
3064 chandransh 1751
     - providerId
1752
     - deliveredOrders
304 ashish 1753
    """
3064 chandransh 1754
    self.send_markOrdersAsDelivered(providerId, deliveredOrders)
1755
    self.recv_markOrdersAsDelivered()
304 ashish 1756
 
3064 chandransh 1757
  def send_markOrdersAsDelivered(self, providerId, deliveredOrders):
1758
    self._oprot.writeMessageBegin('markOrdersAsDelivered', TMessageType.CALL, self._seqid)
1759
    args = markOrdersAsDelivered_args()
1760
    args.providerId = providerId
1761
    args.deliveredOrders = deliveredOrders
304 ashish 1762
    args.write(self._oprot)
1763
    self._oprot.writeMessageEnd()
1764
    self._oprot.trans.flush()
1765
 
3064 chandransh 1766
  def recv_markOrdersAsDelivered(self, ):
304 ashish 1767
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
1768
    if mtype == TMessageType.EXCEPTION:
1769
      x = TApplicationException()
1770
      x.read(self._iprot)
1771
      self._iprot.readMessageEnd()
1772
      raise x
3064 chandransh 1773
    result = markOrdersAsDelivered_result()
304 ashish 1774
    result.read(self._iprot)
1775
    self._iprot.readMessageEnd()
3064 chandransh 1776
    if result.ex != None:
1777
      raise result.ex
304 ashish 1778
    return
1779
 
3064 chandransh 1780
  def markOrdersAsFailed(self, providerId, returnedOrders):
1596 ankur.sing 1781
    """
3064 chandransh 1782
    Mark all orders with AWBs in the given map as failed. Also sets the delivery timestamp.
1783
    Raises an exception if we encounter report for an AWB number that we did not ship.
1784
 
1785
    Parameters:
1786
     - providerId
1787
     - returnedOrders
1596 ankur.sing 1788
    """
3064 chandransh 1789
    self.send_markOrdersAsFailed(providerId, returnedOrders)
1790
    self.recv_markOrdersAsFailed()
304 ashish 1791
 
3064 chandransh 1792
  def send_markOrdersAsFailed(self, providerId, returnedOrders):
1793
    self._oprot.writeMessageBegin('markOrdersAsFailed', TMessageType.CALL, self._seqid)
1794
    args = markOrdersAsFailed_args()
1795
    args.providerId = providerId
1796
    args.returnedOrders = returnedOrders
1596 ankur.sing 1797
    args.write(self._oprot)
1798
    self._oprot.writeMessageEnd()
1799
    self._oprot.trans.flush()
1800
 
3064 chandransh 1801
  def recv_markOrdersAsFailed(self, ):
1596 ankur.sing 1802
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
1803
    if mtype == TMessageType.EXCEPTION:
1804
      x = TApplicationException()
1805
      x.read(self._iprot)
1806
      self._iprot.readMessageEnd()
1807
      raise x
3064 chandransh 1808
    result = markOrdersAsFailed_result()
1596 ankur.sing 1809
    result.read(self._iprot)
1810
    self._iprot.readMessageEnd()
3064 chandransh 1811
    if result.ex != None:
1812
      raise result.ex
1813
    return
1596 ankur.sing 1814
 
3064 chandransh 1815
  def updateNonDeliveryReason(self, providerId, undeliveredOrders):
1627 ankur.sing 1816
    """
3064 chandransh 1817
    Update the status description of orders whose AWB numbers are keys of the Map.
1818
 
1819
    Parameters:
1820
     - providerId
1821
     - undeliveredOrders
1627 ankur.sing 1822
    """
3064 chandransh 1823
    self.send_updateNonDeliveryReason(providerId, undeliveredOrders)
1824
    self.recv_updateNonDeliveryReason()
1596 ankur.sing 1825
 
3064 chandransh 1826
  def send_updateNonDeliveryReason(self, providerId, undeliveredOrders):
1827
    self._oprot.writeMessageBegin('updateNonDeliveryReason', TMessageType.CALL, self._seqid)
1828
    args = updateNonDeliveryReason_args()
1829
    args.providerId = providerId
1830
    args.undeliveredOrders = undeliveredOrders
1627 ankur.sing 1831
    args.write(self._oprot)
1832
    self._oprot.writeMessageEnd()
1833
    self._oprot.trans.flush()
1834
 
3064 chandransh 1835
  def recv_updateNonDeliveryReason(self, ):
1627 ankur.sing 1836
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
1837
    if mtype == TMessageType.EXCEPTION:
1838
      x = TApplicationException()
1839
      x.read(self._iprot)
1840
      self._iprot.readMessageEnd()
1841
      raise x
3064 chandransh 1842
    result = updateNonDeliveryReason_result()
1627 ankur.sing 1843
    result.read(self._iprot)
1844
    self._iprot.readMessageEnd()
3064 chandransh 1845
    if result.ex != None:
1846
      raise result.ex
1847
    return
1627 ankur.sing 1848
 
3064 chandransh 1849
  def getUndeliveredOrders(self, providerId, warehouseId):
1627 ankur.sing 1850
    """
3064 chandransh 1851
    Returns the list of orders whose delivery time has passed but have not been
1852
    delivered yet for the given provider and warehouse. To get a complete list of
1853
    undelivered orders, pass them as -1.
1854
    Returns an empty list if no such orders exist.
1886 ankur.sing 1855
 
1856
    Parameters:
3064 chandransh 1857
     - providerId
1858
     - warehouseId
1886 ankur.sing 1859
    """
3064 chandransh 1860
    self.send_getUndeliveredOrders(providerId, warehouseId)
1861
    return self.recv_getUndeliveredOrders()
1627 ankur.sing 1862
 
3064 chandransh 1863
  def send_getUndeliveredOrders(self, providerId, warehouseId):
1864
    self._oprot.writeMessageBegin('getUndeliveredOrders', TMessageType.CALL, self._seqid)
1865
    args = getUndeliveredOrders_args()
1866
    args.providerId = providerId
1867
    args.warehouseId = warehouseId
1886 ankur.sing 1868
    args.write(self._oprot)
1869
    self._oprot.writeMessageEnd()
1870
    self._oprot.trans.flush()
1871
 
3064 chandransh 1872
  def recv_getUndeliveredOrders(self, ):
1886 ankur.sing 1873
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
1874
    if mtype == TMessageType.EXCEPTION:
1875
      x = TApplicationException()
1876
      x.read(self._iprot)
1877
      self._iprot.readMessageEnd()
1878
      raise x
3064 chandransh 1879
    result = getUndeliveredOrders_result()
1886 ankur.sing 1880
    result.read(self._iprot)
1881
    self._iprot.readMessageEnd()
1882
    if result.success != None:
1883
      return result.success
3064 chandransh 1884
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getUndeliveredOrders failed: unknown result");
1886 ankur.sing 1885
 
2536 chandransh 1886
  def toggleDOAFlag(self, orderId):
1887
    """
1888
    Toggle the DOA flag of an order. This should be used to flag an order for follow-up and unflag it when the follow-up is complete.
1889
    Returns the final flag status.
1890
    Throws an exception if the order with the given id couldn't be found or if the order status is not DELVIERY_SUCCESS.
1891
 
1892
    Parameters:
1893
     - orderId
1894
    """
1895
    self.send_toggleDOAFlag(orderId)
1896
    return self.recv_toggleDOAFlag()
1886 ankur.sing 1897
 
2536 chandransh 1898
  def send_toggleDOAFlag(self, orderId):
1899
    self._oprot.writeMessageBegin('toggleDOAFlag', TMessageType.CALL, self._seqid)
1900
    args = toggleDOAFlag_args()
1901
    args.orderId = orderId
1902
    args.write(self._oprot)
1903
    self._oprot.writeMessageEnd()
1904
    self._oprot.trans.flush()
1905
 
1906
  def recv_toggleDOAFlag(self, ):
1907
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
1908
    if mtype == TMessageType.EXCEPTION:
1909
      x = TApplicationException()
1910
      x.read(self._iprot)
1911
      self._iprot.readMessageEnd()
1912
      raise x
1913
    result = toggleDOAFlag_result()
1914
    result.read(self._iprot)
1915
    self._iprot.readMessageEnd()
1916
    if result.success != None:
1917
      return result.success
1918
    if result.ex != None:
1919
      raise result.ex
1920
    raise TApplicationException(TApplicationException.MISSING_RESULT, "toggleDOAFlag failed: unknown result");
1921
 
1922
  def requestPickupNumber(self, orderId):
1923
    """
1924
    Sends out an email to the account manager of the original courier provider used to ship the order.
1925
    If the order status was DELIVERY_SUCCESS, it is changed to be DOA_PICKUP_REQUESTED.
1926
    If the order status was DOA_PICKUP_REQUESTED, it is left unchanged.
1927
    For any other status, it returns false.
1928
    Throws an exception if the order with the given id couldn't be found.
1929
 
1930
    Parameters:
1931
     - orderId
1932
    """
1933
    self.send_requestPickupNumber(orderId)
1934
    return self.recv_requestPickupNumber()
1935
 
1936
  def send_requestPickupNumber(self, orderId):
1937
    self._oprot.writeMessageBegin('requestPickupNumber', TMessageType.CALL, self._seqid)
1938
    args = requestPickupNumber_args()
1939
    args.orderId = orderId
1940
    args.write(self._oprot)
1941
    self._oprot.writeMessageEnd()
1942
    self._oprot.trans.flush()
1943
 
1944
  def recv_requestPickupNumber(self, ):
1945
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
1946
    if mtype == TMessageType.EXCEPTION:
1947
      x = TApplicationException()
1948
      x.read(self._iprot)
1949
      self._iprot.readMessageEnd()
1950
      raise x
1951
    result = requestPickupNumber_result()
1952
    result.read(self._iprot)
1953
    self._iprot.readMessageEnd()
1954
    if result.success != None:
1955
      return result.success
1956
    if result.ex != None:
1957
      raise result.ex
1958
    raise TApplicationException(TApplicationException.MISSING_RESULT, "requestPickupNumber failed: unknown result");
1959
 
1960
  def authorizePickup(self, orderId, pickupNumber):
1961
    """
1962
    If the order status is DOA_PICKUP_REQUESTED, it does the following
1963
    	1. Sends out an email to the customer with the dispatch advice that he has to print as an attachment.
1964
    	2. Changes order status to be DOA_PICKUP_AUTHORIZED.
1965
    	3. Returns true
2591 chandransh 1966
    If the order is in any other status, it returns false.
2536 chandransh 1967
    Throws an exception if the order with the given id couldn't be found.
1968
 
1969
    Parameters:
1970
     - orderId
1971
     - pickupNumber
1972
    """
1973
    self.send_authorizePickup(orderId, pickupNumber)
1974
    return self.recv_authorizePickup()
1975
 
1976
  def send_authorizePickup(self, orderId, pickupNumber):
1977
    self._oprot.writeMessageBegin('authorizePickup', TMessageType.CALL, self._seqid)
1978
    args = authorizePickup_args()
1979
    args.orderId = orderId
1980
    args.pickupNumber = pickupNumber
1981
    args.write(self._oprot)
1982
    self._oprot.writeMessageEnd()
1983
    self._oprot.trans.flush()
1984
 
1985
  def recv_authorizePickup(self, ):
1986
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
1987
    if mtype == TMessageType.EXCEPTION:
1988
      x = TApplicationException()
1989
      x.read(self._iprot)
1990
      self._iprot.readMessageEnd()
1991
      raise x
1992
    result = authorizePickup_result()
1993
    result.read(self._iprot)
1994
    self._iprot.readMessageEnd()
1995
    if result.success != None:
1996
      return result.success
1997
    if result.ex != None:
1998
      raise result.ex
1999
    raise TApplicationException(TApplicationException.MISSING_RESULT, "authorizePickup failed: unknown result");
2000
 
2764 chandransh 2001
  def markDoasAsPickedUp(self, providerId, pickupDetails):
2002
    """
2003
    Marks all DOA_PICKUP_AUTHORIZED orders of the previous day for a provider as DOA_RETURN_IN_TRANSIT.
2004
    Returns a list of orders that were authorized for pickup but did not appear in the pick-up report.
2005
 
2006
    Parameters:
2007
     - providerId
2008
     - pickupDetails
2009
    """
2010
    self.send_markDoasAsPickedUp(providerId, pickupDetails)
2011
    return self.recv_markDoasAsPickedUp()
2012
 
2013
  def send_markDoasAsPickedUp(self, providerId, pickupDetails):
2014
    self._oprot.writeMessageBegin('markDoasAsPickedUp', TMessageType.CALL, self._seqid)
2015
    args = markDoasAsPickedUp_args()
2016
    args.providerId = providerId
2017
    args.pickupDetails = pickupDetails
2018
    args.write(self._oprot)
2019
    self._oprot.writeMessageEnd()
2020
    self._oprot.trans.flush()
2021
 
2022
  def recv_markDoasAsPickedUp(self, ):
2023
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
2024
    if mtype == TMessageType.EXCEPTION:
2025
      x = TApplicationException()
2026
      x.read(self._iprot)
2027
      self._iprot.readMessageEnd()
2028
      raise x
2029
    result = markDoasAsPickedUp_result()
2030
    result.read(self._iprot)
2031
    self._iprot.readMessageEnd()
2032
    if result.success != None:
2033
      return result.success
2034
    raise TApplicationException(TApplicationException.MISSING_RESULT, "markDoasAsPickedUp failed: unknown result");
2035
 
2616 chandransh 2036
  def receiveReturn(self, orderId):
2591 chandransh 2037
    """
2599 chandransh 2038
    If the order status is DOA_RETURN_AUTHORIZED or DOA_RETURN_IN_TRANSIT, marks the order status as DOA_RECEIVED and returns true.
2616 chandransh 2039
    If the order status is SALES_RETURN_IN_TRANSIT, marks the order status as SALES_RET_RECEIVED and returns true.
2591 chandransh 2040
    If the order is in any other state, it returns false.
2041
    Throws an exception if the order with the given id couldn't be found.
2042
 
2043
    Parameters:
2044
     - orderId
2045
    """
2616 chandransh 2046
    self.send_receiveReturn(orderId)
2047
    return self.recv_receiveReturn()
2536 chandransh 2048
 
2616 chandransh 2049
  def send_receiveReturn(self, orderId):
2050
    self._oprot.writeMessageBegin('receiveReturn', TMessageType.CALL, self._seqid)
2051
    args = receiveReturn_args()
2591 chandransh 2052
    args.orderId = orderId
2053
    args.write(self._oprot)
2054
    self._oprot.writeMessageEnd()
2055
    self._oprot.trans.flush()
2056
 
2616 chandransh 2057
  def recv_receiveReturn(self, ):
2591 chandransh 2058
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
2059
    if mtype == TMessageType.EXCEPTION:
2060
      x = TApplicationException()
2061
      x.read(self._iprot)
2062
      self._iprot.readMessageEnd()
2063
      raise x
2616 chandransh 2064
    result = receiveReturn_result()
2591 chandransh 2065
    result.read(self._iprot)
2066
    self._iprot.readMessageEnd()
2067
    if result.success != None:
2068
      return result.success
2069
    if result.ex != None:
2070
      raise result.ex
2616 chandransh 2071
    raise TApplicationException(TApplicationException.MISSING_RESULT, "receiveReturn failed: unknown result");
2591 chandransh 2072
 
2073
  def validateDoa(self, orderId, isValid):
2074
    """
2599 chandransh 2075
    Used to validate the DOA certificate for an order in the DOA_RECEIVED state. If the certificate is valid,
2616 chandransh 2076
    the order state is changed to DOA_CERT_VALID. If the certificate is invalid, the order state is changed to DOA_CERT_INVALID.
2591 chandransh 2077
    If the order is in any other state, it returns false.
2078
    Throws an exception if the order with the given id couldn't be found.
2079
 
2080
    Parameters:
2081
     - orderId
2082
     - isValid
2083
    """
2084
    self.send_validateDoa(orderId, isValid)
2085
    return self.recv_validateDoa()
2086
 
2087
  def send_validateDoa(self, orderId, isValid):
2088
    self._oprot.writeMessageBegin('validateDoa', TMessageType.CALL, self._seqid)
2089
    args = validateDoa_args()
2090
    args.orderId = orderId
2091
    args.isValid = isValid
2092
    args.write(self._oprot)
2093
    self._oprot.writeMessageEnd()
2094
    self._oprot.trans.flush()
2095
 
2096
  def recv_validateDoa(self, ):
2097
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
2098
    if mtype == TMessageType.EXCEPTION:
2099
      x = TApplicationException()
2100
      x.read(self._iprot)
2101
      self._iprot.readMessageEnd()
2102
      raise x
2103
    result = validateDoa_result()
2104
    result.read(self._iprot)
2105
    self._iprot.readMessageEnd()
2106
    if result.success != None:
2107
      return result.success
2108
    if result.ex != None:
2109
      raise result.ex
2110
    raise TApplicationException(TApplicationException.MISSING_RESULT, "validateDoa failed: unknown result");
2111
 
2616 chandransh 2112
  def reshipOrder(self, orderId):
2113
    """
2114
    If the order is in SALES_RET_RECEIVED or DOA_CERT_INVALID state, it does the following:
2115
    	1. Creates a new order for processing in the BILLED state. All billing information is saved.
2116
    	2. Marks the current order as one of the final states SALES_RET_RESHIPPED and DOA_INVALID_RESHIPPED depending on what state the order started in.
2117
 
2118
    If the order is in DOA_CERT_VALID state, it does the following:
2119
    	1. Creates a new order for processing in the SUBMITTED_FOR_PROCESSING state.
2120
    	2. Creates a return order for the warehouse executive to return the DOA material.
2121
    	3. Marks the current order as the final DOA_RESHIPPED state.
2122
 
2123
    Returns the id of the newly created order.
2124
 
2125
    Throws an exception if the order with the given id couldn't be found.
2126
 
2127
    Parameters:
2128
     - orderId
2129
    """
2130
    self.send_reshipOrder(orderId)
2131
    return self.recv_reshipOrder()
2591 chandransh 2132
 
2616 chandransh 2133
  def send_reshipOrder(self, orderId):
2134
    self._oprot.writeMessageBegin('reshipOrder', TMessageType.CALL, self._seqid)
2135
    args = reshipOrder_args()
2136
    args.orderId = orderId
2137
    args.write(self._oprot)
2138
    self._oprot.writeMessageEnd()
2139
    self._oprot.trans.flush()
2140
 
2141
  def recv_reshipOrder(self, ):
2142
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
2143
    if mtype == TMessageType.EXCEPTION:
2144
      x = TApplicationException()
2145
      x.read(self._iprot)
2146
      self._iprot.readMessageEnd()
2147
      raise x
2148
    result = reshipOrder_result()
2149
    result.read(self._iprot)
2150
    self._iprot.readMessageEnd()
2151
    if result.success != None:
2152
      return result.success
2153
    if result.ex != None:
2154
      raise result.ex
2155
    raise TApplicationException(TApplicationException.MISSING_RESULT, "reshipOrder failed: unknown result");
2156
 
3226 chandransh 2157
  def refundOrder(self, orderId, refundedBy, reason):
2616 chandransh 2158
    """
2159
    If the order is in SALES_RET_RECEIVED, DOA_CERT_VALID or DOA_CERT_INVALID state, it does the following:
2160
    	1. Creates a refund request for batch processing.
2161
    	2. Creates a return order for the warehouse executive to return the shipped material.
2162
    	3. Marks the current order as SALES_RET_REFUNDED, DOA_VALID_REFUNDED or DOA_INVALID_REFUNDED final states.
2163
 
2164
    If the order is in SUBMITTED_FOR_PROCESSING or INVENTORY_LOW state, it does the following:
2165
    	1. Creates a refund request for batch processing.
3226 chandransh 2166
    	2. Cancels the reservation of the item in the warehouse.
2167
    	3. Marks the current order as the REFUNDED final state.
2616 chandransh 2168
 
3226 chandransh 2169
    For all COD orders, if the order is in INIT, SUBMITTED_FOR_PROCESSING or INVENTORY_LOW state, it does the following:
2170
    	1. Cancels the reservation of the item in the warehouse.
2171
    	2. Marks the current order as CANCELED.
2172
 
2173
    In all cases, it updates the reason for cancellation or refund and the person who performed the action.
2174
 
2616 chandransh 2175
    Returns True if it is successful, False otherwise.
2176
 
2177
    Throws an exception if the order with the given id couldn't be found.
2178
 
2179
    Parameters:
2180
     - orderId
3226 chandransh 2181
     - refundedBy
2182
     - reason
2616 chandransh 2183
    """
3226 chandransh 2184
    self.send_refundOrder(orderId, refundedBy, reason)
2616 chandransh 2185
    return self.recv_refundOrder()
2186
 
3226 chandransh 2187
  def send_refundOrder(self, orderId, refundedBy, reason):
2616 chandransh 2188
    self._oprot.writeMessageBegin('refundOrder', TMessageType.CALL, self._seqid)
2189
    args = refundOrder_args()
2190
    args.orderId = orderId
3226 chandransh 2191
    args.refundedBy = refundedBy
2192
    args.reason = reason
2616 chandransh 2193
    args.write(self._oprot)
2194
    self._oprot.writeMessageEnd()
2195
    self._oprot.trans.flush()
2196
 
2197
  def recv_refundOrder(self, ):
2198
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
2199
    if mtype == TMessageType.EXCEPTION:
2200
      x = TApplicationException()
2201
      x.read(self._iprot)
2202
      self._iprot.readMessageEnd()
2203
      raise x
2204
    result = refundOrder_result()
2205
    result.read(self._iprot)
2206
    self._iprot.readMessageEnd()
2207
    if result.success != None:
2208
      return result.success
2209
    if result.ex != None:
2210
      raise result.ex
2211
    raise TApplicationException(TApplicationException.MISSING_RESULT, "refundOrder failed: unknown result");
2212
 
2690 chandransh 2213
  def getReturnOrders(self, warehouseId, fromDate, toDate):
2214
    """
2215
    Get all return orders created between the from and to dates for the given warehouse.
2216
    Ignores the warehouse if it is passed as -1.
2217
 
2218
    Parameters:
2219
     - warehouseId
2220
     - fromDate
2221
     - toDate
2222
    """
2223
    self.send_getReturnOrders(warehouseId, fromDate, toDate)
2224
    return self.recv_getReturnOrders()
2616 chandransh 2225
 
2690 chandransh 2226
  def send_getReturnOrders(self, warehouseId, fromDate, toDate):
2227
    self._oprot.writeMessageBegin('getReturnOrders', TMessageType.CALL, self._seqid)
2228
    args = getReturnOrders_args()
2229
    args.warehouseId = warehouseId
2230
    args.fromDate = fromDate
2231
    args.toDate = toDate
2232
    args.write(self._oprot)
2233
    self._oprot.writeMessageEnd()
2234
    self._oprot.trans.flush()
2235
 
2236
  def recv_getReturnOrders(self, ):
2237
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
2238
    if mtype == TMessageType.EXCEPTION:
2239
      x = TApplicationException()
2240
      x.read(self._iprot)
2241
      self._iprot.readMessageEnd()
2242
      raise x
2243
    result = getReturnOrders_result()
2244
    result.read(self._iprot)
2245
    self._iprot.readMessageEnd()
2246
    if result.success != None:
2247
      return result.success
2248
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getReturnOrders failed: unknown result");
2249
 
2700 chandransh 2250
  def getReturnOrder(self, id):
2251
    """
2252
    Returns the ReturnOrder corresponding to the given id.
2253
    Throws an exception if the return order with the given id couldn't be found.
2254
 
2255
    Parameters:
2256
     - id
2257
    """
2258
    self.send_getReturnOrder(id)
2259
    return self.recv_getReturnOrder()
2260
 
2261
  def send_getReturnOrder(self, id):
2262
    self._oprot.writeMessageBegin('getReturnOrder', TMessageType.CALL, self._seqid)
2263
    args = getReturnOrder_args()
2264
    args.id = id
2265
    args.write(self._oprot)
2266
    self._oprot.writeMessageEnd()
2267
    self._oprot.trans.flush()
2268
 
2269
  def recv_getReturnOrder(self, ):
2270
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
2271
    if mtype == TMessageType.EXCEPTION:
2272
      x = TApplicationException()
2273
      x.read(self._iprot)
2274
      self._iprot.readMessageEnd()
2275
      raise x
2276
    result = getReturnOrder_result()
2277
    result.read(self._iprot)
2278
    self._iprot.readMessageEnd()
2279
    if result.success != None:
2280
      return result.success
2281
    if result.ex != None:
2282
      raise result.ex
2283
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getReturnOrder failed: unknown result");
2284
 
2690 chandransh 2285
  def processReturn(self, returnOrderId):
2286
    """
2287
    Marks the return order with the given id as processed. Raises an exception if no such return order exists.
2288
 
2289
    Parameters:
2290
     - returnOrderId
2291
    """
2292
    self.send_processReturn(returnOrderId)
2293
    self.recv_processReturn()
2294
 
2295
  def send_processReturn(self, returnOrderId):
2296
    self._oprot.writeMessageBegin('processReturn', TMessageType.CALL, self._seqid)
2297
    args = processReturn_args()
2298
    args.returnOrderId = returnOrderId
2299
    args.write(self._oprot)
2300
    self._oprot.writeMessageEnd()
2301
    self._oprot.trans.flush()
2302
 
2303
  def recv_processReturn(self, ):
2304
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
2305
    if mtype == TMessageType.EXCEPTION:
2306
      x = TApplicationException()
2307
      x.read(self._iprot)
2308
      self._iprot.readMessageEnd()
2309
      raise x
2310
    result = processReturn_result()
2311
    result.read(self._iprot)
2312
    self._iprot.readMessageEnd()
2313
    if result.ex != None:
2314
      raise result.ex
2315
    return
2316
 
2819 chandransh 2317
  def createPurchaseOrder(self, warehouseId):
2318
    """
2319
    Creates a purchase order corresponding to all the pending orders of the given warehouse.
2842 chandransh 2320
    Returns the PO no. of the newly created purchase order. Returns -1 no new purchase order had to be created.
2819 chandransh 2321
 
2322
    Parameters:
2323
     - warehouseId
2324
    """
2325
    self.send_createPurchaseOrder(warehouseId)
2326
    return self.recv_createPurchaseOrder()
2690 chandransh 2327
 
2819 chandransh 2328
  def send_createPurchaseOrder(self, warehouseId):
2329
    self._oprot.writeMessageBegin('createPurchaseOrder', TMessageType.CALL, self._seqid)
2330
    args = createPurchaseOrder_args()
2331
    args.warehouseId = warehouseId
2332
    args.write(self._oprot)
2333
    self._oprot.writeMessageEnd()
2334
    self._oprot.trans.flush()
2335
 
2336
  def recv_createPurchaseOrder(self, ):
2337
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
2338
    if mtype == TMessageType.EXCEPTION:
2339
      x = TApplicationException()
2340
      x.read(self._iprot)
2341
      self._iprot.readMessageEnd()
2342
      raise x
2343
    result = createPurchaseOrder_result()
2344
    result.read(self._iprot)
2345
    self._iprot.readMessageEnd()
2346
    if result.success != None:
2347
      return result.success
2348
    if result.ex != None:
2349
      raise result.ex
2350
    raise TApplicationException(TApplicationException.MISSING_RESULT, "createPurchaseOrder failed: unknown result");
2351
 
2352
 
94 ashish 2353
class Processor(Iface, TProcessor):
2354
  def __init__(self, handler):
2355
    self._handler = handler
2356
    self._processMap = {}
765 rajveer 2357
    self._processMap["closeSession"] = Processor.process_closeSession
94 ashish 2358
    self._processMap["createTransaction"] = Processor.process_createTransaction
2359
    self._processMap["getTransaction"] = Processor.process_getTransaction
2360
    self._processMap["getTransactionsForCustomer"] = Processor.process_getTransactionsForCustomer
132 ashish 2361
    self._processMap["getTransactionsForShoppingCartId"] = Processor.process_getTransactionsForShoppingCartId
94 ashish 2362
    self._processMap["getTransactionStatus"] = Processor.process_getTransactionStatus
2363
    self._processMap["changeTransactionStatus"] = Processor.process_changeTransactionStatus
1398 varun.gupt 2364
    self._processMap["enqueueTransactionInfoEmail"] = Processor.process_enqueueTransactionInfoEmail
483 rajveer 2365
    self._processMap["getAllOrders"] = Processor.process_getAllOrders
999 varun.gupt 2366
    self._processMap["getOrdersByBillingDate"] = Processor.process_getOrdersByBillingDate
1382 varun.gupt 2367
    self._processMap["getReturnableOrdersForCustomer"] = Processor.process_getReturnableOrdersForCustomer
2368
    self._processMap["getCancellableOrdersForCustomer"] = Processor.process_getCancellableOrdersForCustomer
483 rajveer 2369
    self._processMap["changeOrderStatus"] = Processor.process_changeOrderStatus
2370
    self._processMap["getOrdersForTransaction"] = Processor.process_getOrdersForTransaction
2371
    self._processMap["getOrdersForCustomer"] = Processor.process_getOrdersForCustomer
2372
    self._processMap["createOrder"] = Processor.process_createOrder
2373
    self._processMap["getOrder"] = Processor.process_getOrder
2374
    self._processMap["getLineItemsForOrder"] = Processor.process_getLineItemsForOrder
1528 ankur.sing 2375
    self._processMap["getOrderForCustomer"] = Processor.process_getOrderForCustomer
3064 chandransh 2376
    self._processMap["getAlerts"] = Processor.process_getAlerts
2377
    self._processMap["setAlert"] = Processor.process_setAlert
2378
    self._processMap["getValidOrderCount"] = Processor.process_getValidOrderCount
2379
    self._processMap["getNoOfCustomersWithSuccessfulTransaction"] = Processor.process_getNoOfCustomersWithSuccessfulTransaction
2380
    self._processMap["getValidOrdersAmountRange"] = Processor.process_getValidOrdersAmountRange
2381
    self._processMap["getValidOrders"] = Processor.process_getValidOrders
1220 chandransh 2382
    self._processMap["batchOrders"] = Processor.process_batchOrders
1208 chandransh 2383
    self._processMap["markOrderAsOutOfStock"] = Processor.process_markOrderAsOutOfStock
3064 chandransh 2384
    self._processMap["verifyOrder"] = Processor.process_verifyOrder
2385
    self._processMap["acceptOrder"] = Processor.process_acceptOrder
2386
    self._processMap["billOrder"] = Processor.process_billOrder
2387
    self._processMap["addBillingDetails"] = Processor.process_addBillingDetails
2388
    self._processMap["addJacketNumber"] = Processor.process_addJacketNumber
759 chandransh 2389
    self._processMap["markOrdersAsManifested"] = Processor.process_markOrdersAsManifested
1113 chandransh 2390
    self._processMap["markOrdersAsPickedUp"] = Processor.process_markOrdersAsPickedUp
1132 chandransh 2391
    self._processMap["markOrdersAsDelivered"] = Processor.process_markOrdersAsDelivered
1135 chandransh 2392
    self._processMap["markOrdersAsFailed"] = Processor.process_markOrdersAsFailed
1246 chandransh 2393
    self._processMap["updateNonDeliveryReason"] = Processor.process_updateNonDeliveryReason
1408 ankur.sing 2394
    self._processMap["getUndeliveredOrders"] = Processor.process_getUndeliveredOrders
2536 chandransh 2395
    self._processMap["toggleDOAFlag"] = Processor.process_toggleDOAFlag
2396
    self._processMap["requestPickupNumber"] = Processor.process_requestPickupNumber
2397
    self._processMap["authorizePickup"] = Processor.process_authorizePickup
2764 chandransh 2398
    self._processMap["markDoasAsPickedUp"] = Processor.process_markDoasAsPickedUp
2616 chandransh 2399
    self._processMap["receiveReturn"] = Processor.process_receiveReturn
2591 chandransh 2400
    self._processMap["validateDoa"] = Processor.process_validateDoa
2616 chandransh 2401
    self._processMap["reshipOrder"] = Processor.process_reshipOrder
2402
    self._processMap["refundOrder"] = Processor.process_refundOrder
2690 chandransh 2403
    self._processMap["getReturnOrders"] = Processor.process_getReturnOrders
2700 chandransh 2404
    self._processMap["getReturnOrder"] = Processor.process_getReturnOrder
2690 chandransh 2405
    self._processMap["processReturn"] = Processor.process_processReturn
2819 chandransh 2406
    self._processMap["createPurchaseOrder"] = Processor.process_createPurchaseOrder
94 ashish 2407
 
2408
  def process(self, iprot, oprot):
2409
    (name, type, seqid) = iprot.readMessageBegin()
2410
    if name not in self._processMap:
2411
      iprot.skip(TType.STRUCT)
2412
      iprot.readMessageEnd()
2413
      x = TApplicationException(TApplicationException.UNKNOWN_METHOD, 'Unknown function %s' % (name))
2414
      oprot.writeMessageBegin(name, TMessageType.EXCEPTION, seqid)
2415
      x.write(oprot)
2416
      oprot.writeMessageEnd()
2417
      oprot.trans.flush()
2418
      return
2419
    else:
2420
      self._processMap[name](self, seqid, iprot, oprot)
2421
    return True
2422
 
765 rajveer 2423
  def process_closeSession(self, seqid, iprot, oprot):
2424
    args = closeSession_args()
2425
    args.read(iprot)
2426
    iprot.readMessageEnd()
2427
    result = closeSession_result()
2428
    self._handler.closeSession()
2429
    oprot.writeMessageBegin("closeSession", TMessageType.REPLY, seqid)
2430
    result.write(oprot)
2431
    oprot.writeMessageEnd()
2432
    oprot.trans.flush()
2433
 
94 ashish 2434
  def process_createTransaction(self, seqid, iprot, oprot):
2435
    args = createTransaction_args()
2436
    args.read(iprot)
2437
    iprot.readMessageEnd()
2438
    result = createTransaction_result()
2439
    try:
132 ashish 2440
      result.success = self._handler.createTransaction(args.transaction)
94 ashish 2441
    except TransactionServiceException, ex:
2442
      result.ex = ex
2443
    oprot.writeMessageBegin("createTransaction", TMessageType.REPLY, seqid)
2444
    result.write(oprot)
2445
    oprot.writeMessageEnd()
2446
    oprot.trans.flush()
2447
 
2448
  def process_getTransaction(self, seqid, iprot, oprot):
2449
    args = getTransaction_args()
2450
    args.read(iprot)
2451
    iprot.readMessageEnd()
2452
    result = getTransaction_result()
2453
    try:
2454
      result.success = self._handler.getTransaction(args.id)
2455
    except TransactionServiceException, ex:
2456
      result.ex = ex
2457
    oprot.writeMessageBegin("getTransaction", TMessageType.REPLY, seqid)
2458
    result.write(oprot)
2459
    oprot.writeMessageEnd()
2460
    oprot.trans.flush()
2461
 
2462
  def process_getTransactionsForCustomer(self, seqid, iprot, oprot):
2463
    args = getTransactionsForCustomer_args()
2464
    args.read(iprot)
2465
    iprot.readMessageEnd()
2466
    result = getTransactionsForCustomer_result()
2467
    try:
2468
      result.success = self._handler.getTransactionsForCustomer(args.customerId, args.from_date, args.to_date, args.status)
2469
    except TransactionServiceException, ex:
2470
      result.ex = ex
2471
    oprot.writeMessageBegin("getTransactionsForCustomer", TMessageType.REPLY, seqid)
2472
    result.write(oprot)
2473
    oprot.writeMessageEnd()
2474
    oprot.trans.flush()
2475
 
132 ashish 2476
  def process_getTransactionsForShoppingCartId(self, seqid, iprot, oprot):
2477
    args = getTransactionsForShoppingCartId_args()
2478
    args.read(iprot)
2479
    iprot.readMessageEnd()
2480
    result = getTransactionsForShoppingCartId_result()
2481
    try:
2482
      result.success = self._handler.getTransactionsForShoppingCartId(args.shoppingCartId)
2483
    except TransactionServiceException, ex:
2484
      result.ex = ex
2485
    oprot.writeMessageBegin("getTransactionsForShoppingCartId", TMessageType.REPLY, seqid)
2486
    result.write(oprot)
2487
    oprot.writeMessageEnd()
2488
    oprot.trans.flush()
2489
 
94 ashish 2490
  def process_getTransactionStatus(self, seqid, iprot, oprot):
2491
    args = getTransactionStatus_args()
2492
    args.read(iprot)
2493
    iprot.readMessageEnd()
2494
    result = getTransactionStatus_result()
2495
    try:
2496
      result.success = self._handler.getTransactionStatus(args.transactionId)
2497
    except TransactionServiceException, ex:
2498
      result.ex = ex
2499
    oprot.writeMessageBegin("getTransactionStatus", TMessageType.REPLY, seqid)
2500
    result.write(oprot)
2501
    oprot.writeMessageEnd()
2502
    oprot.trans.flush()
2503
 
2504
  def process_changeTransactionStatus(self, seqid, iprot, oprot):
2505
    args = changeTransactionStatus_args()
2506
    args.read(iprot)
2507
    iprot.readMessageEnd()
2508
    result = changeTransactionStatus_result()
2509
    try:
2510
      result.success = self._handler.changeTransactionStatus(args.transactionId, args.status, args.description)
2511
    except TransactionServiceException, ex:
2512
      result.ex = ex
2513
    oprot.writeMessageBegin("changeTransactionStatus", TMessageType.REPLY, seqid)
2514
    result.write(oprot)
2515
    oprot.writeMessageEnd()
2516
    oprot.trans.flush()
2517
 
1398 varun.gupt 2518
  def process_enqueueTransactionInfoEmail(self, seqid, iprot, oprot):
2519
    args = enqueueTransactionInfoEmail_args()
1382 varun.gupt 2520
    args.read(iprot)
2521
    iprot.readMessageEnd()
1398 varun.gupt 2522
    result = enqueueTransactionInfoEmail_result()
1382 varun.gupt 2523
    try:
1398 varun.gupt 2524
      result.success = self._handler.enqueueTransactionInfoEmail(args.transactionId)
1382 varun.gupt 2525
    except TransactionServiceException, ex:
2526
      result.ex = ex
1398 varun.gupt 2527
    oprot.writeMessageBegin("enqueueTransactionInfoEmail", TMessageType.REPLY, seqid)
1382 varun.gupt 2528
    result.write(oprot)
2529
    oprot.writeMessageEnd()
2530
    oprot.trans.flush()
2531
 
483 rajveer 2532
  def process_getAllOrders(self, seqid, iprot, oprot):
2533
    args = getAllOrders_args()
94 ashish 2534
    args.read(iprot)
2535
    iprot.readMessageEnd()
483 rajveer 2536
    result = getAllOrders_result()
94 ashish 2537
    try:
483 rajveer 2538
      result.success = self._handler.getAllOrders(args.status, args.from_date, args.to_date, args.warehouse_id)
94 ashish 2539
    except TransactionServiceException, ex:
2540
      result.ex = ex
483 rajveer 2541
    oprot.writeMessageBegin("getAllOrders", TMessageType.REPLY, seqid)
94 ashish 2542
    result.write(oprot)
2543
    oprot.writeMessageEnd()
2544
    oprot.trans.flush()
2545
 
999 varun.gupt 2546
  def process_getOrdersByBillingDate(self, seqid, iprot, oprot):
2547
    args = getOrdersByBillingDate_args()
2548
    args.read(iprot)
2549
    iprot.readMessageEnd()
2550
    result = getOrdersByBillingDate_result()
2551
    try:
2552
      result.success = self._handler.getOrdersByBillingDate(args.status, args.start_billing_date, args.end_billing_date, args.warehouse_id)
2553
    except TransactionServiceException, ex:
2554
      result.ex = ex
2555
    oprot.writeMessageBegin("getOrdersByBillingDate", TMessageType.REPLY, seqid)
2556
    result.write(oprot)
2557
    oprot.writeMessageEnd()
2558
    oprot.trans.flush()
2559
 
1382 varun.gupt 2560
  def process_getReturnableOrdersForCustomer(self, seqid, iprot, oprot):
2561
    args = getReturnableOrdersForCustomer_args()
2562
    args.read(iprot)
2563
    iprot.readMessageEnd()
2564
    result = getReturnableOrdersForCustomer_result()
2565
    try:
2566
      result.success = self._handler.getReturnableOrdersForCustomer(args.customer_id, args.limit)
2567
    except TransactionServiceException, ex:
2568
      result.ex = ex
2569
    oprot.writeMessageBegin("getReturnableOrdersForCustomer", TMessageType.REPLY, seqid)
2570
    result.write(oprot)
2571
    oprot.writeMessageEnd()
2572
    oprot.trans.flush()
2573
 
2574
  def process_getCancellableOrdersForCustomer(self, seqid, iprot, oprot):
2575
    args = getCancellableOrdersForCustomer_args()
2576
    args.read(iprot)
2577
    iprot.readMessageEnd()
2578
    result = getCancellableOrdersForCustomer_result()
2579
    try:
2580
      result.success = self._handler.getCancellableOrdersForCustomer(args.customer_id, args.limit)
2581
    except TransactionServiceException, ex:
2582
      result.ex = ex
2583
    oprot.writeMessageBegin("getCancellableOrdersForCustomer", TMessageType.REPLY, seqid)
2584
    result.write(oprot)
2585
    oprot.writeMessageEnd()
2586
    oprot.trans.flush()
2587
 
483 rajveer 2588
  def process_changeOrderStatus(self, seqid, iprot, oprot):
2589
    args = changeOrderStatus_args()
94 ashish 2590
    args.read(iprot)
2591
    iprot.readMessageEnd()
483 rajveer 2592
    result = changeOrderStatus_result()
94 ashish 2593
    try:
483 rajveer 2594
      result.success = self._handler.changeOrderStatus(args.orderId, args.status, args.description)
94 ashish 2595
    except TransactionServiceException, ex:
2596
      result.ex = ex
483 rajveer 2597
    oprot.writeMessageBegin("changeOrderStatus", TMessageType.REPLY, seqid)
94 ashish 2598
    result.write(oprot)
2599
    oprot.writeMessageEnd()
2600
    oprot.trans.flush()
2601
 
483 rajveer 2602
  def process_getOrdersForTransaction(self, seqid, iprot, oprot):
2603
    args = getOrdersForTransaction_args()
94 ashish 2604
    args.read(iprot)
2605
    iprot.readMessageEnd()
483 rajveer 2606
    result = getOrdersForTransaction_result()
94 ashish 2607
    try:
1528 ankur.sing 2608
      result.success = self._handler.getOrdersForTransaction(args.transactionId, args.customerId)
94 ashish 2609
    except TransactionServiceException, ex:
2610
      result.ex = ex
483 rajveer 2611
    oprot.writeMessageBegin("getOrdersForTransaction", TMessageType.REPLY, seqid)
94 ashish 2612
    result.write(oprot)
2613
    oprot.writeMessageEnd()
2614
    oprot.trans.flush()
2615
 
483 rajveer 2616
  def process_getOrdersForCustomer(self, seqid, iprot, oprot):
2617
    args = getOrdersForCustomer_args()
94 ashish 2618
    args.read(iprot)
2619
    iprot.readMessageEnd()
483 rajveer 2620
    result = getOrdersForCustomer_result()
94 ashish 2621
    try:
3014 chandransh 2622
      result.success = self._handler.getOrdersForCustomer(args.customerId, args.from_date, args.to_date, args.statuses)
94 ashish 2623
    except TransactionServiceException, ex:
2624
      result.ex = ex
483 rajveer 2625
    oprot.writeMessageBegin("getOrdersForCustomer", TMessageType.REPLY, seqid)
94 ashish 2626
    result.write(oprot)
2627
    oprot.writeMessageEnd()
2628
    oprot.trans.flush()
2629
 
483 rajveer 2630
  def process_createOrder(self, seqid, iprot, oprot):
2631
    args = createOrder_args()
94 ashish 2632
    args.read(iprot)
2633
    iprot.readMessageEnd()
483 rajveer 2634
    result = createOrder_result()
94 ashish 2635
    try:
483 rajveer 2636
      result.success = self._handler.createOrder(args.order)
94 ashish 2637
    except TransactionServiceException, ex:
2638
      result.ex = ex
483 rajveer 2639
    oprot.writeMessageBegin("createOrder", TMessageType.REPLY, seqid)
94 ashish 2640
    result.write(oprot)
2641
    oprot.writeMessageEnd()
2642
    oprot.trans.flush()
2643
 
483 rajveer 2644
  def process_getOrder(self, seqid, iprot, oprot):
2645
    args = getOrder_args()
94 ashish 2646
    args.read(iprot)
2647
    iprot.readMessageEnd()
483 rajveer 2648
    result = getOrder_result()
94 ashish 2649
    try:
483 rajveer 2650
      result.success = self._handler.getOrder(args.id)
94 ashish 2651
    except TransactionServiceException, ex:
2652
      result.ex = ex
483 rajveer 2653
    oprot.writeMessageBegin("getOrder", TMessageType.REPLY, seqid)
94 ashish 2654
    result.write(oprot)
2655
    oprot.writeMessageEnd()
2656
    oprot.trans.flush()
2657
 
483 rajveer 2658
  def process_getLineItemsForOrder(self, seqid, iprot, oprot):
2659
    args = getLineItemsForOrder_args()
94 ashish 2660
    args.read(iprot)
2661
    iprot.readMessageEnd()
483 rajveer 2662
    result = getLineItemsForOrder_result()
94 ashish 2663
    try:
483 rajveer 2664
      result.success = self._handler.getLineItemsForOrder(args.orderId)
94 ashish 2665
    except TransactionServiceException, ex:
2666
      result.ex = ex
483 rajveer 2667
    oprot.writeMessageBegin("getLineItemsForOrder", TMessageType.REPLY, seqid)
94 ashish 2668
    result.write(oprot)
2669
    oprot.writeMessageEnd()
2670
    oprot.trans.flush()
2671
 
1528 ankur.sing 2672
  def process_getOrderForCustomer(self, seqid, iprot, oprot):
2673
    args = getOrderForCustomer_args()
2674
    args.read(iprot)
2675
    iprot.readMessageEnd()
2676
    result = getOrderForCustomer_result()
2677
    try:
2678
      result.success = self._handler.getOrderForCustomer(args.orderId, args.customerId)
2679
    except TransactionServiceException, ex:
2680
      result.ex = ex
2681
    oprot.writeMessageBegin("getOrderForCustomer", TMessageType.REPLY, seqid)
2682
    result.write(oprot)
2683
    oprot.writeMessageEnd()
2684
    oprot.trans.flush()
2685
 
3064 chandransh 2686
  def process_getAlerts(self, seqid, iprot, oprot):
2687
    args = getAlerts_args()
2688
    args.read(iprot)
2689
    iprot.readMessageEnd()
2690
    result = getAlerts_result()
2691
    result.success = self._handler.getAlerts(args.orderId, args.valid)
2692
    oprot.writeMessageBegin("getAlerts", TMessageType.REPLY, seqid)
2693
    result.write(oprot)
2694
    oprot.writeMessageEnd()
2695
    oprot.trans.flush()
2696
 
2697
  def process_setAlert(self, seqid, iprot, oprot):
2698
    args = setAlert_args()
2699
    args.read(iprot)
2700
    iprot.readMessageEnd()
2701
    result = setAlert_result()
2702
    self._handler.setAlert(args.orderId, args.unset, args.type, args.comment)
2703
    oprot.writeMessageBegin("setAlert", TMessageType.REPLY, seqid)
2704
    result.write(oprot)
2705
    oprot.writeMessageEnd()
2706
    oprot.trans.flush()
2707
 
2708
  def process_getValidOrderCount(self, seqid, iprot, oprot):
2709
    args = getValidOrderCount_args()
2710
    args.read(iprot)
2711
    iprot.readMessageEnd()
2712
    result = getValidOrderCount_result()
2713
    result.success = self._handler.getValidOrderCount()
2714
    oprot.writeMessageBegin("getValidOrderCount", TMessageType.REPLY, seqid)
2715
    result.write(oprot)
2716
    oprot.writeMessageEnd()
2717
    oprot.trans.flush()
2718
 
2719
  def process_getNoOfCustomersWithSuccessfulTransaction(self, seqid, iprot, oprot):
2720
    args = getNoOfCustomersWithSuccessfulTransaction_args()
2721
    args.read(iprot)
2722
    iprot.readMessageEnd()
2723
    result = getNoOfCustomersWithSuccessfulTransaction_result()
2724
    result.success = self._handler.getNoOfCustomersWithSuccessfulTransaction()
2725
    oprot.writeMessageBegin("getNoOfCustomersWithSuccessfulTransaction", TMessageType.REPLY, seqid)
2726
    result.write(oprot)
2727
    oprot.writeMessageEnd()
2728
    oprot.trans.flush()
2729
 
2730
  def process_getValidOrdersAmountRange(self, seqid, iprot, oprot):
2731
    args = getValidOrdersAmountRange_args()
2732
    args.read(iprot)
2733
    iprot.readMessageEnd()
2734
    result = getValidOrdersAmountRange_result()
2735
    result.success = self._handler.getValidOrdersAmountRange()
2736
    oprot.writeMessageBegin("getValidOrdersAmountRange", TMessageType.REPLY, seqid)
2737
    result.write(oprot)
2738
    oprot.writeMessageEnd()
2739
    oprot.trans.flush()
2740
 
2741
  def process_getValidOrders(self, seqid, iprot, oprot):
2742
    args = getValidOrders_args()
2743
    args.read(iprot)
2744
    iprot.readMessageEnd()
2745
    result = getValidOrders_result()
2746
    result.success = self._handler.getValidOrders(args.limit)
2747
    oprot.writeMessageBegin("getValidOrders", TMessageType.REPLY, seqid)
2748
    result.write(oprot)
2749
    oprot.writeMessageEnd()
2750
    oprot.trans.flush()
2751
 
1220 chandransh 2752
  def process_batchOrders(self, seqid, iprot, oprot):
2753
    args = batchOrders_args()
2754
    args.read(iprot)
2755
    iprot.readMessageEnd()
2756
    result = batchOrders_result()
2757
    try:
2758
      result.success = self._handler.batchOrders(args.warehouseId)
2759
    except TransactionServiceException, ex:
2760
      result.ex = ex
2761
    oprot.writeMessageBegin("batchOrders", TMessageType.REPLY, seqid)
2762
    result.write(oprot)
2763
    oprot.writeMessageEnd()
2764
    oprot.trans.flush()
2765
 
1208 chandransh 2766
  def process_markOrderAsOutOfStock(self, seqid, iprot, oprot):
2767
    args = markOrderAsOutOfStock_args()
2768
    args.read(iprot)
2769
    iprot.readMessageEnd()
2770
    result = markOrderAsOutOfStock_result()
2771
    try:
2772
      result.success = self._handler.markOrderAsOutOfStock(args.orderId)
2773
    except TransactionServiceException, ex:
2774
      result.ex = ex
2775
    oprot.writeMessageBegin("markOrderAsOutOfStock", TMessageType.REPLY, seqid)
2776
    result.write(oprot)
2777
    oprot.writeMessageEnd()
2778
    oprot.trans.flush()
2779
 
3064 chandransh 2780
  def process_verifyOrder(self, seqid, iprot, oprot):
2781
    args = verifyOrder_args()
759 chandransh 2782
    args.read(iprot)
2783
    iprot.readMessageEnd()
3064 chandransh 2784
    result = verifyOrder_result()
759 chandransh 2785
    try:
3064 chandransh 2786
      result.success = self._handler.verifyOrder(args.orderId)
759 chandransh 2787
    except TransactionServiceException, ex:
2788
      result.ex = ex
3064 chandransh 2789
    oprot.writeMessageBegin("verifyOrder", TMessageType.REPLY, seqid)
759 chandransh 2790
    result.write(oprot)
2791
    oprot.writeMessageEnd()
2792
    oprot.trans.flush()
2793
 
3064 chandransh 2794
  def process_acceptOrder(self, seqid, iprot, oprot):
2795
    args = acceptOrder_args()
1113 chandransh 2796
    args.read(iprot)
2797
    iprot.readMessageEnd()
3064 chandransh 2798
    result = acceptOrder_result()
1113 chandransh 2799
    try:
3064 chandransh 2800
      result.success = self._handler.acceptOrder(args.orderId)
1113 chandransh 2801
    except TransactionServiceException, ex:
2802
      result.ex = ex
3064 chandransh 2803
    oprot.writeMessageBegin("acceptOrder", TMessageType.REPLY, seqid)
1113 chandransh 2804
    result.write(oprot)
2805
    oprot.writeMessageEnd()
2806
    oprot.trans.flush()
2807
 
3064 chandransh 2808
  def process_billOrder(self, seqid, iprot, oprot):
2809
    args = billOrder_args()
1132 chandransh 2810
    args.read(iprot)
2811
    iprot.readMessageEnd()
3064 chandransh 2812
    result = billOrder_result()
1132 chandransh 2813
    try:
3064 chandransh 2814
      result.success = self._handler.billOrder(args.orderId)
1132 chandransh 2815
    except TransactionServiceException, ex:
2816
      result.ex = ex
3064 chandransh 2817
    oprot.writeMessageBegin("billOrder", TMessageType.REPLY, seqid)
1132 chandransh 2818
    result.write(oprot)
2819
    oprot.writeMessageEnd()
2820
    oprot.trans.flush()
2821
 
3064 chandransh 2822
  def process_addBillingDetails(self, seqid, iprot, oprot):
2823
    args = addBillingDetails_args()
1135 chandransh 2824
    args.read(iprot)
2825
    iprot.readMessageEnd()
3064 chandransh 2826
    result = addBillingDetails_result()
1135 chandransh 2827
    try:
3064 chandransh 2828
      result.success = self._handler.addBillingDetails(args.orderId, args.invoice_number, args.billed_by)
1135 chandransh 2829
    except TransactionServiceException, ex:
2830
      result.ex = ex
3064 chandransh 2831
    oprot.writeMessageBegin("addBillingDetails", TMessageType.REPLY, seqid)
1135 chandransh 2832
    result.write(oprot)
2833
    oprot.writeMessageEnd()
2834
    oprot.trans.flush()
2835
 
3064 chandransh 2836
  def process_addJacketNumber(self, seqid, iprot, oprot):
2837
    args = addJacketNumber_args()
1246 chandransh 2838
    args.read(iprot)
2839
    iprot.readMessageEnd()
3064 chandransh 2840
    result = addJacketNumber_result()
1246 chandransh 2841
    try:
3064 chandransh 2842
      result.success = self._handler.addJacketNumber(args.orderId, args.jacketNumber, args.imeiNumber, args.itemNumber, args.billedBy, args.billingType)
1246 chandransh 2843
    except TransactionServiceException, ex:
2844
      result.ex = ex
3064 chandransh 2845
    oprot.writeMessageBegin("addJacketNumber", TMessageType.REPLY, seqid)
1246 chandransh 2846
    result.write(oprot)
2847
    oprot.writeMessageEnd()
2848
    oprot.trans.flush()
2849
 
3064 chandransh 2850
  def process_markOrdersAsManifested(self, seqid, iprot, oprot):
2851
    args = markOrdersAsManifested_args()
1408 ankur.sing 2852
    args.read(iprot)
2853
    iprot.readMessageEnd()
3064 chandransh 2854
    result = markOrdersAsManifested_result()
2855
    try:
2856
      result.success = self._handler.markOrdersAsManifested(args.warehouseId, args.providerId, args.cod)
2857
    except TransactionServiceException, ex:
2858
      result.ex = ex
2859
    oprot.writeMessageBegin("markOrdersAsManifested", TMessageType.REPLY, seqid)
1408 ankur.sing 2860
    result.write(oprot)
2861
    oprot.writeMessageEnd()
2862
    oprot.trans.flush()
2863
 
3064 chandransh 2864
  def process_markOrdersAsPickedUp(self, seqid, iprot, oprot):
2865
    args = markOrdersAsPickedUp_args()
304 ashish 2866
    args.read(iprot)
2867
    iprot.readMessageEnd()
3064 chandransh 2868
    result = markOrdersAsPickedUp_result()
2869
    try:
2870
      result.success = self._handler.markOrdersAsPickedUp(args.providerId, args.pickupDetails)
2871
    except TransactionServiceException, ex:
2872
      result.ex = ex
2873
    oprot.writeMessageBegin("markOrdersAsPickedUp", TMessageType.REPLY, seqid)
304 ashish 2874
    result.write(oprot)
2875
    oprot.writeMessageEnd()
2876
    oprot.trans.flush()
94 ashish 2877
 
3064 chandransh 2878
  def process_markOrdersAsDelivered(self, seqid, iprot, oprot):
2879
    args = markOrdersAsDelivered_args()
304 ashish 2880
    args.read(iprot)
2881
    iprot.readMessageEnd()
3064 chandransh 2882
    result = markOrdersAsDelivered_result()
2883
    try:
2884
      self._handler.markOrdersAsDelivered(args.providerId, args.deliveredOrders)
2885
    except TransactionServiceException, ex:
2886
      result.ex = ex
2887
    oprot.writeMessageBegin("markOrdersAsDelivered", TMessageType.REPLY, seqid)
304 ashish 2888
    result.write(oprot)
2889
    oprot.writeMessageEnd()
2890
    oprot.trans.flush()
2891
 
3064 chandransh 2892
  def process_markOrdersAsFailed(self, seqid, iprot, oprot):
2893
    args = markOrdersAsFailed_args()
1596 ankur.sing 2894
    args.read(iprot)
2895
    iprot.readMessageEnd()
3064 chandransh 2896
    result = markOrdersAsFailed_result()
2897
    try:
2898
      self._handler.markOrdersAsFailed(args.providerId, args.returnedOrders)
2899
    except TransactionServiceException, ex:
2900
      result.ex = ex
2901
    oprot.writeMessageBegin("markOrdersAsFailed", TMessageType.REPLY, seqid)
1596 ankur.sing 2902
    result.write(oprot)
2903
    oprot.writeMessageEnd()
2904
    oprot.trans.flush()
304 ashish 2905
 
3064 chandransh 2906
  def process_updateNonDeliveryReason(self, seqid, iprot, oprot):
2907
    args = updateNonDeliveryReason_args()
1627 ankur.sing 2908
    args.read(iprot)
2909
    iprot.readMessageEnd()
3064 chandransh 2910
    result = updateNonDeliveryReason_result()
2911
    try:
2912
      self._handler.updateNonDeliveryReason(args.providerId, args.undeliveredOrders)
2913
    except TransactionServiceException, ex:
2914
      result.ex = ex
2915
    oprot.writeMessageBegin("updateNonDeliveryReason", TMessageType.REPLY, seqid)
1627 ankur.sing 2916
    result.write(oprot)
2917
    oprot.writeMessageEnd()
2918
    oprot.trans.flush()
1596 ankur.sing 2919
 
3064 chandransh 2920
  def process_getUndeliveredOrders(self, seqid, iprot, oprot):
2921
    args = getUndeliveredOrders_args()
1627 ankur.sing 2922
    args.read(iprot)
2923
    iprot.readMessageEnd()
3064 chandransh 2924
    result = getUndeliveredOrders_result()
2925
    result.success = self._handler.getUndeliveredOrders(args.providerId, args.warehouseId)
2926
    oprot.writeMessageBegin("getUndeliveredOrders", TMessageType.REPLY, seqid)
1627 ankur.sing 2927
    result.write(oprot)
2928
    oprot.writeMessageEnd()
2929
    oprot.trans.flush()
2930
 
2536 chandransh 2931
  def process_toggleDOAFlag(self, seqid, iprot, oprot):
2932
    args = toggleDOAFlag_args()
2933
    args.read(iprot)
2934
    iprot.readMessageEnd()
2935
    result = toggleDOAFlag_result()
2936
    try:
2937
      result.success = self._handler.toggleDOAFlag(args.orderId)
2938
    except TransactionServiceException, ex:
2939
      result.ex = ex
2940
    oprot.writeMessageBegin("toggleDOAFlag", TMessageType.REPLY, seqid)
2941
    result.write(oprot)
2942
    oprot.writeMessageEnd()
2943
    oprot.trans.flush()
1886 ankur.sing 2944
 
2536 chandransh 2945
  def process_requestPickupNumber(self, seqid, iprot, oprot):
2946
    args = requestPickupNumber_args()
2947
    args.read(iprot)
2948
    iprot.readMessageEnd()
2949
    result = requestPickupNumber_result()
2950
    try:
2951
      result.success = self._handler.requestPickupNumber(args.orderId)
2952
    except TransactionServiceException, ex:
2953
      result.ex = ex
2954
    oprot.writeMessageBegin("requestPickupNumber", TMessageType.REPLY, seqid)
2955
    result.write(oprot)
2956
    oprot.writeMessageEnd()
2957
    oprot.trans.flush()
2958
 
2959
  def process_authorizePickup(self, seqid, iprot, oprot):
2960
    args = authorizePickup_args()
2961
    args.read(iprot)
2962
    iprot.readMessageEnd()
2963
    result = authorizePickup_result()
2964
    try:
2965
      result.success = self._handler.authorizePickup(args.orderId, args.pickupNumber)
2966
    except TransactionServiceException, ex:
2967
      result.ex = ex
2968
    oprot.writeMessageBegin("authorizePickup", TMessageType.REPLY, seqid)
2969
    result.write(oprot)
2970
    oprot.writeMessageEnd()
2971
    oprot.trans.flush()
2972
 
2764 chandransh 2973
  def process_markDoasAsPickedUp(self, seqid, iprot, oprot):
2974
    args = markDoasAsPickedUp_args()
2975
    args.read(iprot)
2976
    iprot.readMessageEnd()
2977
    result = markDoasAsPickedUp_result()
2978
    result.success = self._handler.markDoasAsPickedUp(args.providerId, args.pickupDetails)
2979
    oprot.writeMessageBegin("markDoasAsPickedUp", TMessageType.REPLY, seqid)
2980
    result.write(oprot)
2981
    oprot.writeMessageEnd()
2982
    oprot.trans.flush()
2983
 
2616 chandransh 2984
  def process_receiveReturn(self, seqid, iprot, oprot):
2985
    args = receiveReturn_args()
2591 chandransh 2986
    args.read(iprot)
2987
    iprot.readMessageEnd()
2616 chandransh 2988
    result = receiveReturn_result()
2591 chandransh 2989
    try:
2616 chandransh 2990
      result.success = self._handler.receiveReturn(args.orderId)
2591 chandransh 2991
    except TransactionServiceException, ex:
2992
      result.ex = ex
2616 chandransh 2993
    oprot.writeMessageBegin("receiveReturn", TMessageType.REPLY, seqid)
2591 chandransh 2994
    result.write(oprot)
2995
    oprot.writeMessageEnd()
2996
    oprot.trans.flush()
2536 chandransh 2997
 
2591 chandransh 2998
  def process_validateDoa(self, seqid, iprot, oprot):
2999
    args = validateDoa_args()
3000
    args.read(iprot)
3001
    iprot.readMessageEnd()
3002
    result = validateDoa_result()
3003
    try:
3004
      result.success = self._handler.validateDoa(args.orderId, args.isValid)
3005
    except TransactionServiceException, ex:
3006
      result.ex = ex
3007
    oprot.writeMessageBegin("validateDoa", TMessageType.REPLY, seqid)
3008
    result.write(oprot)
3009
    oprot.writeMessageEnd()
3010
    oprot.trans.flush()
3011
 
2616 chandransh 3012
  def process_reshipOrder(self, seqid, iprot, oprot):
3013
    args = reshipOrder_args()
3014
    args.read(iprot)
3015
    iprot.readMessageEnd()
3016
    result = reshipOrder_result()
3017
    try:
3018
      result.success = self._handler.reshipOrder(args.orderId)
3019
    except TransactionServiceException, ex:
3020
      result.ex = ex
3021
    oprot.writeMessageBegin("reshipOrder", TMessageType.REPLY, seqid)
3022
    result.write(oprot)
3023
    oprot.writeMessageEnd()
3024
    oprot.trans.flush()
2591 chandransh 3025
 
2616 chandransh 3026
  def process_refundOrder(self, seqid, iprot, oprot):
3027
    args = refundOrder_args()
3028
    args.read(iprot)
3029
    iprot.readMessageEnd()
3030
    result = refundOrder_result()
3031
    try:
3226 chandransh 3032
      result.success = self._handler.refundOrder(args.orderId, args.refundedBy, args.reason)
2616 chandransh 3033
    except TransactionServiceException, ex:
3034
      result.ex = ex
3035
    oprot.writeMessageBegin("refundOrder", TMessageType.REPLY, seqid)
3036
    result.write(oprot)
3037
    oprot.writeMessageEnd()
3038
    oprot.trans.flush()
3039
 
2690 chandransh 3040
  def process_getReturnOrders(self, seqid, iprot, oprot):
3041
    args = getReturnOrders_args()
3042
    args.read(iprot)
3043
    iprot.readMessageEnd()
3044
    result = getReturnOrders_result()
3045
    result.success = self._handler.getReturnOrders(args.warehouseId, args.fromDate, args.toDate)
3046
    oprot.writeMessageBegin("getReturnOrders", TMessageType.REPLY, seqid)
3047
    result.write(oprot)
3048
    oprot.writeMessageEnd()
3049
    oprot.trans.flush()
2616 chandransh 3050
 
2700 chandransh 3051
  def process_getReturnOrder(self, seqid, iprot, oprot):
3052
    args = getReturnOrder_args()
3053
    args.read(iprot)
3054
    iprot.readMessageEnd()
3055
    result = getReturnOrder_result()
3056
    try:
3057
      result.success = self._handler.getReturnOrder(args.id)
3058
    except TransactionServiceException, ex:
3059
      result.ex = ex
3060
    oprot.writeMessageBegin("getReturnOrder", TMessageType.REPLY, seqid)
3061
    result.write(oprot)
3062
    oprot.writeMessageEnd()
3063
    oprot.trans.flush()
3064
 
2690 chandransh 3065
  def process_processReturn(self, seqid, iprot, oprot):
3066
    args = processReturn_args()
3067
    args.read(iprot)
3068
    iprot.readMessageEnd()
3069
    result = processReturn_result()
3070
    try:
3071
      self._handler.processReturn(args.returnOrderId)
3072
    except TransactionServiceException, ex:
3073
      result.ex = ex
3074
    oprot.writeMessageBegin("processReturn", TMessageType.REPLY, seqid)
3075
    result.write(oprot)
3076
    oprot.writeMessageEnd()
3077
    oprot.trans.flush()
3078
 
2819 chandransh 3079
  def process_createPurchaseOrder(self, seqid, iprot, oprot):
3080
    args = createPurchaseOrder_args()
3081
    args.read(iprot)
3082
    iprot.readMessageEnd()
3083
    result = createPurchaseOrder_result()
3084
    try:
3085
      result.success = self._handler.createPurchaseOrder(args.warehouseId)
3086
    except TransactionServiceException, ex:
3087
      result.ex = ex
3088
    oprot.writeMessageBegin("createPurchaseOrder", TMessageType.REPLY, seqid)
3089
    result.write(oprot)
3090
    oprot.writeMessageEnd()
3091
    oprot.trans.flush()
2690 chandransh 3092
 
2819 chandransh 3093
 
94 ashish 3094
# HELPER FUNCTIONS AND STRUCTURES
3095
 
765 rajveer 3096
class closeSession_args:
3097
 
3098
  thrift_spec = (
3099
  )
3100
 
3101
  def read(self, iprot):
3102
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
3103
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
3104
      return
3105
    iprot.readStructBegin()
3106
    while True:
3107
      (fname, ftype, fid) = iprot.readFieldBegin()
3108
      if ftype == TType.STOP:
3109
        break
3110
      else:
3111
        iprot.skip(ftype)
3112
      iprot.readFieldEnd()
3113
    iprot.readStructEnd()
3114
 
3115
  def write(self, oprot):
3116
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
3117
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
3118
      return
3119
    oprot.writeStructBegin('closeSession_args')
3120
    oprot.writeFieldStop()
3121
    oprot.writeStructEnd()
3122
 
3123
  def __repr__(self):
3124
    L = ['%s=%r' % (key, value)
3125
      for key, value in self.__dict__.iteritems()]
3126
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
3127
 
3128
  def __eq__(self, other):
3129
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
3130
 
3131
  def __ne__(self, other):
3132
    return not (self == other)
3133
 
3134
class closeSession_result:
3135
 
3136
  thrift_spec = (
3137
  )
3138
 
3139
  def read(self, iprot):
3140
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
3141
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
3142
      return
3143
    iprot.readStructBegin()
3144
    while True:
3145
      (fname, ftype, fid) = iprot.readFieldBegin()
3146
      if ftype == TType.STOP:
3147
        break
3148
      else:
3149
        iprot.skip(ftype)
3150
      iprot.readFieldEnd()
3151
    iprot.readStructEnd()
3152
 
3153
  def write(self, oprot):
3154
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
3155
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
3156
      return
3157
    oprot.writeStructBegin('closeSession_result')
3158
    oprot.writeFieldStop()
3159
    oprot.writeStructEnd()
3160
 
3161
  def __repr__(self):
3162
    L = ['%s=%r' % (key, value)
3163
      for key, value in self.__dict__.iteritems()]
3164
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
3165
 
3166
  def __eq__(self, other):
3167
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
3168
 
3169
  def __ne__(self, other):
3170
    return not (self == other)
3171
 
94 ashish 3172
class createTransaction_args:
3173
  """
3174
  Attributes:
3175
   - transaction
3176
  """
3177
 
3178
  thrift_spec = (
3179
    None, # 0
3180
    (1, TType.STRUCT, 'transaction', (Transaction, Transaction.thrift_spec), None, ), # 1
3181
  )
3182
 
3183
  def __init__(self, transaction=None,):
3184
    self.transaction = transaction
3185
 
3186
  def read(self, iprot):
3187
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
3188
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
3189
      return
3190
    iprot.readStructBegin()
3191
    while True:
3192
      (fname, ftype, fid) = iprot.readFieldBegin()
3193
      if ftype == TType.STOP:
3194
        break
3195
      if fid == 1:
3196
        if ftype == TType.STRUCT:
3197
          self.transaction = Transaction()
3198
          self.transaction.read(iprot)
3199
        else:
3200
          iprot.skip(ftype)
3201
      else:
3202
        iprot.skip(ftype)
3203
      iprot.readFieldEnd()
3204
    iprot.readStructEnd()
3205
 
3206
  def write(self, oprot):
3207
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
3208
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
3209
      return
3210
    oprot.writeStructBegin('createTransaction_args')
3211
    if self.transaction != None:
3212
      oprot.writeFieldBegin('transaction', TType.STRUCT, 1)
3213
      self.transaction.write(oprot)
3214
      oprot.writeFieldEnd()
3215
    oprot.writeFieldStop()
3216
    oprot.writeStructEnd()
3217
 
3218
  def __repr__(self):
3219
    L = ['%s=%r' % (key, value)
3220
      for key, value in self.__dict__.iteritems()]
3221
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
3222
 
3223
  def __eq__(self, other):
3224
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
3225
 
3226
  def __ne__(self, other):
3227
    return not (self == other)
3228
 
3229
class createTransaction_result:
3230
  """
3231
  Attributes:
132 ashish 3232
   - success
94 ashish 3233
   - ex
3234
  """
3235
 
3236
  thrift_spec = (
132 ashish 3237
    (0, TType.I64, 'success', None, None, ), # 0
94 ashish 3238
    (1, TType.STRUCT, 'ex', (TransactionServiceException, TransactionServiceException.thrift_spec), None, ), # 1
3239
  )
3240
 
132 ashish 3241
  def __init__(self, success=None, ex=None,):
3242
    self.success = success
94 ashish 3243
    self.ex = ex
3244
 
3245
  def read(self, iprot):
3246
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
3247
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
3248
      return
3249
    iprot.readStructBegin()
3250
    while True:
3251
      (fname, ftype, fid) = iprot.readFieldBegin()
3252
      if ftype == TType.STOP:
3253
        break
132 ashish 3254
      if fid == 0:
3255
        if ftype == TType.I64:
3256
          self.success = iprot.readI64();
3257
        else:
3258
          iprot.skip(ftype)
3259
      elif fid == 1:
94 ashish 3260
        if ftype == TType.STRUCT:
3261
          self.ex = TransactionServiceException()
3262
          self.ex.read(iprot)
3263
        else:
3264
          iprot.skip(ftype)
3265
      else:
3266
        iprot.skip(ftype)
3267
      iprot.readFieldEnd()
3268
    iprot.readStructEnd()
3269
 
3270
  def write(self, oprot):
3271
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
3272
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
3273
      return
3274
    oprot.writeStructBegin('createTransaction_result')
132 ashish 3275
    if self.success != None:
3276
      oprot.writeFieldBegin('success', TType.I64, 0)
3277
      oprot.writeI64(self.success)
3278
      oprot.writeFieldEnd()
94 ashish 3279
    if self.ex != None:
3280
      oprot.writeFieldBegin('ex', TType.STRUCT, 1)
3281
      self.ex.write(oprot)
3282
      oprot.writeFieldEnd()
3283
    oprot.writeFieldStop()
3284
    oprot.writeStructEnd()
3285
 
3286
  def __repr__(self):
3287
    L = ['%s=%r' % (key, value)
3288
      for key, value in self.__dict__.iteritems()]
3289
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
3290
 
3291
  def __eq__(self, other):
3292
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
3293
 
3294
  def __ne__(self, other):
3295
    return not (self == other)
3296
 
3297
class getTransaction_args:
3298
  """
3299
  Attributes:
3300
   - id
3301
  """
3302
 
3303
  thrift_spec = (
3304
    None, # 0
3305
    (1, TType.I64, 'id', None, None, ), # 1
3306
  )
3307
 
3308
  def __init__(self, id=None,):
3309
    self.id = id
3310
 
3311
  def read(self, iprot):
3312
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
3313
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
3314
      return
3315
    iprot.readStructBegin()
3316
    while True:
3317
      (fname, ftype, fid) = iprot.readFieldBegin()
3318
      if ftype == TType.STOP:
3319
        break
3320
      if fid == 1:
3321
        if ftype == TType.I64:
3322
          self.id = iprot.readI64();
3323
        else:
3324
          iprot.skip(ftype)
3325
      else:
3326
        iprot.skip(ftype)
3327
      iprot.readFieldEnd()
3328
    iprot.readStructEnd()
3329
 
3330
  def write(self, oprot):
3331
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
3332
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
3333
      return
3334
    oprot.writeStructBegin('getTransaction_args')
3335
    if self.id != None:
3336
      oprot.writeFieldBegin('id', TType.I64, 1)
3337
      oprot.writeI64(self.id)
3338
      oprot.writeFieldEnd()
3339
    oprot.writeFieldStop()
3340
    oprot.writeStructEnd()
3341
 
3342
  def __repr__(self):
3343
    L = ['%s=%r' % (key, value)
3344
      for key, value in self.__dict__.iteritems()]
3345
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
3346
 
3347
  def __eq__(self, other):
3348
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
3349
 
3350
  def __ne__(self, other):
3351
    return not (self == other)
3352
 
3353
class getTransaction_result:
3354
  """
3355
  Attributes:
3356
   - success
3357
   - ex
3358
  """
3359
 
3360
  thrift_spec = (
3361
    (0, TType.STRUCT, 'success', (Transaction, Transaction.thrift_spec), None, ), # 0
3362
    (1, TType.STRUCT, 'ex', (TransactionServiceException, TransactionServiceException.thrift_spec), None, ), # 1
3363
  )
3364
 
3365
  def __init__(self, success=None, ex=None,):
3366
    self.success = success
3367
    self.ex = ex
3368
 
3369
  def read(self, iprot):
3370
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
3371
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
3372
      return
3373
    iprot.readStructBegin()
3374
    while True:
3375
      (fname, ftype, fid) = iprot.readFieldBegin()
3376
      if ftype == TType.STOP:
3377
        break
3378
      if fid == 0:
3379
        if ftype == TType.STRUCT:
3380
          self.success = Transaction()
3381
          self.success.read(iprot)
3382
        else:
3383
          iprot.skip(ftype)
3384
      elif fid == 1:
3385
        if ftype == TType.STRUCT:
3386
          self.ex = TransactionServiceException()
3387
          self.ex.read(iprot)
3388
        else:
3389
          iprot.skip(ftype)
3390
      else:
3391
        iprot.skip(ftype)
3392
      iprot.readFieldEnd()
3393
    iprot.readStructEnd()
3394
 
3395
  def write(self, oprot):
3396
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
3397
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
3398
      return
3399
    oprot.writeStructBegin('getTransaction_result')
3400
    if self.success != None:
3401
      oprot.writeFieldBegin('success', TType.STRUCT, 0)
3402
      self.success.write(oprot)
3403
      oprot.writeFieldEnd()
3404
    if self.ex != None:
3405
      oprot.writeFieldBegin('ex', TType.STRUCT, 1)
3406
      self.ex.write(oprot)
3407
      oprot.writeFieldEnd()
3408
    oprot.writeFieldStop()
3409
    oprot.writeStructEnd()
3410
 
3411
  def __repr__(self):
3412
    L = ['%s=%r' % (key, value)
3413
      for key, value in self.__dict__.iteritems()]
3414
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
3415
 
3416
  def __eq__(self, other):
3417
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
3418
 
3419
  def __ne__(self, other):
3420
    return not (self == other)
3421
 
3422
class getTransactionsForCustomer_args:
3423
  """
3424
  Attributes:
3425
   - customerId
3426
   - from_date
3427
   - to_date
3428
   - status
3429
  """
3430
 
3431
  thrift_spec = (
3432
    None, # 0
3433
    (1, TType.I64, 'customerId', None, None, ), # 1
3434
    (2, TType.I64, 'from_date', None, None, ), # 2
3435
    (3, TType.I64, 'to_date', None, None, ), # 3
3436
    (4, TType.I32, 'status', None, None, ), # 4
3437
  )
3438
 
3439
  def __init__(self, customerId=None, from_date=None, to_date=None, status=None,):
3440
    self.customerId = customerId
3441
    self.from_date = from_date
3442
    self.to_date = to_date
3443
    self.status = status
3444
 
3445
  def read(self, iprot):
3446
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
3447
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
3448
      return
3449
    iprot.readStructBegin()
3450
    while True:
3451
      (fname, ftype, fid) = iprot.readFieldBegin()
3452
      if ftype == TType.STOP:
3453
        break
3454
      if fid == 1:
3455
        if ftype == TType.I64:
3456
          self.customerId = iprot.readI64();
3457
        else:
3458
          iprot.skip(ftype)
3459
      elif fid == 2:
3460
        if ftype == TType.I64:
3461
          self.from_date = iprot.readI64();
3462
        else:
3463
          iprot.skip(ftype)
3464
      elif fid == 3:
3465
        if ftype == TType.I64:
3466
          self.to_date = iprot.readI64();
3467
        else:
3468
          iprot.skip(ftype)
3469
      elif fid == 4:
3470
        if ftype == TType.I32:
3471
          self.status = iprot.readI32();
3472
        else:
3473
          iprot.skip(ftype)
3474
      else:
3475
        iprot.skip(ftype)
3476
      iprot.readFieldEnd()
3477
    iprot.readStructEnd()
3478
 
3479
  def write(self, oprot):
3480
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
3481
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
3482
      return
3483
    oprot.writeStructBegin('getTransactionsForCustomer_args')
3484
    if self.customerId != None:
3485
      oprot.writeFieldBegin('customerId', TType.I64, 1)
3486
      oprot.writeI64(self.customerId)
3487
      oprot.writeFieldEnd()
3488
    if self.from_date != None:
3489
      oprot.writeFieldBegin('from_date', TType.I64, 2)
3490
      oprot.writeI64(self.from_date)
3491
      oprot.writeFieldEnd()
3492
    if self.to_date != None:
3493
      oprot.writeFieldBegin('to_date', TType.I64, 3)
3494
      oprot.writeI64(self.to_date)
3495
      oprot.writeFieldEnd()
3496
    if self.status != None:
3497
      oprot.writeFieldBegin('status', TType.I32, 4)
3498
      oprot.writeI32(self.status)
3499
      oprot.writeFieldEnd()
3500
    oprot.writeFieldStop()
3501
    oprot.writeStructEnd()
3502
 
3503
  def __repr__(self):
3504
    L = ['%s=%r' % (key, value)
3505
      for key, value in self.__dict__.iteritems()]
3506
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
3507
 
3508
  def __eq__(self, other):
3509
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
3510
 
3511
  def __ne__(self, other):
3512
    return not (self == other)
3513
 
3514
class getTransactionsForCustomer_result:
3515
  """
3516
  Attributes:
3517
   - success
3518
   - ex
3519
  """
3520
 
3521
  thrift_spec = (
3522
    (0, TType.LIST, 'success', (TType.STRUCT,(Transaction, Transaction.thrift_spec)), None, ), # 0
3523
    (1, TType.STRUCT, 'ex', (TransactionServiceException, TransactionServiceException.thrift_spec), None, ), # 1
3524
  )
3525
 
3526
  def __init__(self, success=None, ex=None,):
3527
    self.success = success
3528
    self.ex = ex
3529
 
3530
  def read(self, iprot):
3531
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
3532
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
3533
      return
3534
    iprot.readStructBegin()
3535
    while True:
3536
      (fname, ftype, fid) = iprot.readFieldBegin()
3537
      if ftype == TType.STOP:
3538
        break
3539
      if fid == 0:
3540
        if ftype == TType.LIST:
3541
          self.success = []
685 chandransh 3542
          (_etype17, _size14) = iprot.readListBegin()
3543
          for _i18 in xrange(_size14):
3544
            _elem19 = Transaction()
3545
            _elem19.read(iprot)
3546
            self.success.append(_elem19)
94 ashish 3547
          iprot.readListEnd()
3548
        else:
3549
          iprot.skip(ftype)
3550
      elif fid == 1:
3551
        if ftype == TType.STRUCT:
3552
          self.ex = TransactionServiceException()
3553
          self.ex.read(iprot)
3554
        else:
3555
          iprot.skip(ftype)
3556
      else:
3557
        iprot.skip(ftype)
3558
      iprot.readFieldEnd()
3559
    iprot.readStructEnd()
3560
 
3561
  def write(self, oprot):
3562
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
3563
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
3564
      return
3565
    oprot.writeStructBegin('getTransactionsForCustomer_result')
3566
    if self.success != None:
3567
      oprot.writeFieldBegin('success', TType.LIST, 0)
3568
      oprot.writeListBegin(TType.STRUCT, len(self.success))
685 chandransh 3569
      for iter20 in self.success:
3570
        iter20.write(oprot)
94 ashish 3571
      oprot.writeListEnd()
3572
      oprot.writeFieldEnd()
3573
    if self.ex != None:
3574
      oprot.writeFieldBegin('ex', TType.STRUCT, 1)
3575
      self.ex.write(oprot)
3576
      oprot.writeFieldEnd()
3577
    oprot.writeFieldStop()
3578
    oprot.writeStructEnd()
3579
 
3580
  def __repr__(self):
3581
    L = ['%s=%r' % (key, value)
3582
      for key, value in self.__dict__.iteritems()]
3583
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
3584
 
3585
  def __eq__(self, other):
3586
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
3587
 
3588
  def __ne__(self, other):
3589
    return not (self == other)
3590
 
132 ashish 3591
class getTransactionsForShoppingCartId_args:
3592
  """
3593
  Attributes:
3594
   - shoppingCartId
3595
  """
3596
 
3597
  thrift_spec = (
3598
    None, # 0
3599
    (1, TType.I64, 'shoppingCartId', None, None, ), # 1
3600
  )
3601
 
3602
  def __init__(self, shoppingCartId=None,):
3603
    self.shoppingCartId = shoppingCartId
3604
 
3605
  def read(self, iprot):
3606
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
3607
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
3608
      return
3609
    iprot.readStructBegin()
3610
    while True:
3611
      (fname, ftype, fid) = iprot.readFieldBegin()
3612
      if ftype == TType.STOP:
3613
        break
3614
      if fid == 1:
3615
        if ftype == TType.I64:
3616
          self.shoppingCartId = iprot.readI64();
3617
        else:
3618
          iprot.skip(ftype)
3619
      else:
3620
        iprot.skip(ftype)
3621
      iprot.readFieldEnd()
3622
    iprot.readStructEnd()
3623
 
3624
  def write(self, oprot):
3625
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
3626
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
3627
      return
3628
    oprot.writeStructBegin('getTransactionsForShoppingCartId_args')
3629
    if self.shoppingCartId != None:
3630
      oprot.writeFieldBegin('shoppingCartId', TType.I64, 1)
3631
      oprot.writeI64(self.shoppingCartId)
3632
      oprot.writeFieldEnd()
3633
    oprot.writeFieldStop()
3634
    oprot.writeStructEnd()
3635
 
3636
  def __repr__(self):
3637
    L = ['%s=%r' % (key, value)
3638
      for key, value in self.__dict__.iteritems()]
3639
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
3640
 
3641
  def __eq__(self, other):
3642
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
3643
 
3644
  def __ne__(self, other):
3645
    return not (self == other)
3646
 
3647
class getTransactionsForShoppingCartId_result:
3648
  """
3649
  Attributes:
3650
   - success
3651
   - ex
3652
  """
3653
 
3654
  thrift_spec = (
3655
    (0, TType.LIST, 'success', (TType.STRUCT,(Transaction, Transaction.thrift_spec)), None, ), # 0
3656
    (1, TType.STRUCT, 'ex', (TransactionServiceException, TransactionServiceException.thrift_spec), None, ), # 1
3657
  )
3658
 
3659
  def __init__(self, success=None, ex=None,):
3660
    self.success = success
3661
    self.ex = ex
3662
 
3663
  def read(self, iprot):
3664
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
3665
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
3666
      return
3667
    iprot.readStructBegin()
3668
    while True:
3669
      (fname, ftype, fid) = iprot.readFieldBegin()
3670
      if ftype == TType.STOP:
3671
        break
3672
      if fid == 0:
3673
        if ftype == TType.LIST:
3674
          self.success = []
685 chandransh 3675
          (_etype24, _size21) = iprot.readListBegin()
3676
          for _i25 in xrange(_size21):
3677
            _elem26 = Transaction()
3678
            _elem26.read(iprot)
3679
            self.success.append(_elem26)
132 ashish 3680
          iprot.readListEnd()
3681
        else:
3682
          iprot.skip(ftype)
3683
      elif fid == 1:
3684
        if ftype == TType.STRUCT:
3685
          self.ex = TransactionServiceException()
3686
          self.ex.read(iprot)
3687
        else:
3688
          iprot.skip(ftype)
3689
      else:
3690
        iprot.skip(ftype)
3691
      iprot.readFieldEnd()
3692
    iprot.readStructEnd()
3693
 
3694
  def write(self, oprot):
3695
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
3696
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
3697
      return
3698
    oprot.writeStructBegin('getTransactionsForShoppingCartId_result')
3699
    if self.success != None:
3700
      oprot.writeFieldBegin('success', TType.LIST, 0)
3701
      oprot.writeListBegin(TType.STRUCT, len(self.success))
685 chandransh 3702
      for iter27 in self.success:
3703
        iter27.write(oprot)
132 ashish 3704
      oprot.writeListEnd()
3705
      oprot.writeFieldEnd()
3706
    if self.ex != None:
3707
      oprot.writeFieldBegin('ex', TType.STRUCT, 1)
3708
      self.ex.write(oprot)
3709
      oprot.writeFieldEnd()
3710
    oprot.writeFieldStop()
3711
    oprot.writeStructEnd()
3712
 
3713
  def __repr__(self):
3714
    L = ['%s=%r' % (key, value)
3715
      for key, value in self.__dict__.iteritems()]
3716
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
3717
 
3718
  def __eq__(self, other):
3719
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
3720
 
3721
  def __ne__(self, other):
3722
    return not (self == other)
3723
 
94 ashish 3724
class getTransactionStatus_args:
3725
  """
3726
  Attributes:
3727
   - transactionId
3728
  """
3729
 
3730
  thrift_spec = (
3731
    None, # 0
3732
    (1, TType.I64, 'transactionId', None, None, ), # 1
3733
  )
3734
 
3735
  def __init__(self, transactionId=None,):
3736
    self.transactionId = transactionId
3737
 
3738
  def read(self, iprot):
3739
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
3740
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
3741
      return
3742
    iprot.readStructBegin()
3743
    while True:
3744
      (fname, ftype, fid) = iprot.readFieldBegin()
3745
      if ftype == TType.STOP:
3746
        break
3747
      if fid == 1:
3748
        if ftype == TType.I64:
3749
          self.transactionId = iprot.readI64();
3750
        else:
3751
          iprot.skip(ftype)
3752
      else:
3753
        iprot.skip(ftype)
3754
      iprot.readFieldEnd()
3755
    iprot.readStructEnd()
3756
 
3757
  def write(self, oprot):
3758
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
3759
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
3760
      return
3761
    oprot.writeStructBegin('getTransactionStatus_args')
3762
    if self.transactionId != None:
3763
      oprot.writeFieldBegin('transactionId', TType.I64, 1)
3764
      oprot.writeI64(self.transactionId)
3765
      oprot.writeFieldEnd()
3766
    oprot.writeFieldStop()
3767
    oprot.writeStructEnd()
3768
 
3769
  def __repr__(self):
3770
    L = ['%s=%r' % (key, value)
3771
      for key, value in self.__dict__.iteritems()]
3772
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
3773
 
3774
  def __eq__(self, other):
3775
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
3776
 
3777
  def __ne__(self, other):
3778
    return not (self == other)
3779
 
3780
class getTransactionStatus_result:
3781
  """
3782
  Attributes:
3783
   - success
3784
   - ex
3785
  """
3786
 
3787
  thrift_spec = (
3788
    (0, TType.I32, 'success', None, None, ), # 0
3789
    (1, TType.STRUCT, 'ex', (TransactionServiceException, TransactionServiceException.thrift_spec), None, ), # 1
3790
  )
3791
 
3792
  def __init__(self, success=None, ex=None,):
3793
    self.success = success
3794
    self.ex = ex
3795
 
3796
  def read(self, iprot):
3797
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
3798
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
3799
      return
3800
    iprot.readStructBegin()
3801
    while True:
3802
      (fname, ftype, fid) = iprot.readFieldBegin()
3803
      if ftype == TType.STOP:
3804
        break
3805
      if fid == 0:
3806
        if ftype == TType.I32:
3807
          self.success = iprot.readI32();
3808
        else:
3809
          iprot.skip(ftype)
3810
      elif fid == 1:
3811
        if ftype == TType.STRUCT:
3812
          self.ex = TransactionServiceException()
3813
          self.ex.read(iprot)
3814
        else:
3815
          iprot.skip(ftype)
3816
      else:
3817
        iprot.skip(ftype)
3818
      iprot.readFieldEnd()
3819
    iprot.readStructEnd()
3820
 
3821
  def write(self, oprot):
3822
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
3823
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
3824
      return
3825
    oprot.writeStructBegin('getTransactionStatus_result')
3826
    if self.success != None:
3827
      oprot.writeFieldBegin('success', TType.I32, 0)
3828
      oprot.writeI32(self.success)
3829
      oprot.writeFieldEnd()
3830
    if self.ex != None:
3831
      oprot.writeFieldBegin('ex', TType.STRUCT, 1)
3832
      self.ex.write(oprot)
3833
      oprot.writeFieldEnd()
3834
    oprot.writeFieldStop()
3835
    oprot.writeStructEnd()
3836
 
3837
  def __repr__(self):
3838
    L = ['%s=%r' % (key, value)
3839
      for key, value in self.__dict__.iteritems()]
3840
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
3841
 
3842
  def __eq__(self, other):
3843
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
3844
 
3845
  def __ne__(self, other):
3846
    return not (self == other)
3847
 
3848
class changeTransactionStatus_args:
3849
  """
3850
  Attributes:
3851
   - transactionId
3852
   - status
3853
   - description
3854
  """
3855
 
3856
  thrift_spec = (
3857
    None, # 0
3858
    (1, TType.I64, 'transactionId', None, None, ), # 1
3859
    (2, TType.I32, 'status', None, None, ), # 2
3860
    (3, TType.STRING, 'description', None, None, ), # 3
3861
  )
3862
 
3863
  def __init__(self, transactionId=None, status=None, description=None,):
3864
    self.transactionId = transactionId
3865
    self.status = status
3866
    self.description = description
3867
 
3868
  def read(self, iprot):
3869
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
3870
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
3871
      return
3872
    iprot.readStructBegin()
3873
    while True:
3874
      (fname, ftype, fid) = iprot.readFieldBegin()
3875
      if ftype == TType.STOP:
3876
        break
3877
      if fid == 1:
3878
        if ftype == TType.I64:
3879
          self.transactionId = iprot.readI64();
3880
        else:
3881
          iprot.skip(ftype)
3882
      elif fid == 2:
3883
        if ftype == TType.I32:
3884
          self.status = iprot.readI32();
3885
        else:
3886
          iprot.skip(ftype)
3887
      elif fid == 3:
3888
        if ftype == TType.STRING:
3889
          self.description = iprot.readString();
3890
        else:
3891
          iprot.skip(ftype)
3892
      else:
3893
        iprot.skip(ftype)
3894
      iprot.readFieldEnd()
3895
    iprot.readStructEnd()
3896
 
3897
  def write(self, oprot):
3898
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
3899
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
3900
      return
3901
    oprot.writeStructBegin('changeTransactionStatus_args')
3902
    if self.transactionId != None:
3903
      oprot.writeFieldBegin('transactionId', TType.I64, 1)
3904
      oprot.writeI64(self.transactionId)
3905
      oprot.writeFieldEnd()
3906
    if self.status != None:
3907
      oprot.writeFieldBegin('status', TType.I32, 2)
3908
      oprot.writeI32(self.status)
3909
      oprot.writeFieldEnd()
3910
    if self.description != None:
3911
      oprot.writeFieldBegin('description', TType.STRING, 3)
3912
      oprot.writeString(self.description)
3913
      oprot.writeFieldEnd()
3914
    oprot.writeFieldStop()
3915
    oprot.writeStructEnd()
3916
 
3917
  def __repr__(self):
3918
    L = ['%s=%r' % (key, value)
3919
      for key, value in self.__dict__.iteritems()]
3920
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
3921
 
3922
  def __eq__(self, other):
3923
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
3924
 
3925
  def __ne__(self, other):
3926
    return not (self == other)
3927
 
3928
class changeTransactionStatus_result:
3929
  """
3930
  Attributes:
3931
   - success
3932
   - ex
3933
  """
3934
 
3935
  thrift_spec = (
3936
    (0, TType.BOOL, 'success', None, None, ), # 0
3937
    (1, TType.STRUCT, 'ex', (TransactionServiceException, TransactionServiceException.thrift_spec), None, ), # 1
3938
  )
3939
 
3940
  def __init__(self, success=None, ex=None,):
3941
    self.success = success
3942
    self.ex = ex
3943
 
3944
  def read(self, iprot):
3945
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
3946
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
3947
      return
3948
    iprot.readStructBegin()
3949
    while True:
3950
      (fname, ftype, fid) = iprot.readFieldBegin()
3951
      if ftype == TType.STOP:
3952
        break
3953
      if fid == 0:
3954
        if ftype == TType.BOOL:
3955
          self.success = iprot.readBool();
3956
        else:
3957
          iprot.skip(ftype)
3958
      elif fid == 1:
3959
        if ftype == TType.STRUCT:
3960
          self.ex = TransactionServiceException()
3961
          self.ex.read(iprot)
3962
        else:
3963
          iprot.skip(ftype)
3964
      else:
3965
        iprot.skip(ftype)
3966
      iprot.readFieldEnd()
3967
    iprot.readStructEnd()
3968
 
3969
  def write(self, oprot):
3970
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
3971
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
3972
      return
3973
    oprot.writeStructBegin('changeTransactionStatus_result')
3974
    if self.success != None:
3975
      oprot.writeFieldBegin('success', TType.BOOL, 0)
3976
      oprot.writeBool(self.success)
3977
      oprot.writeFieldEnd()
3978
    if self.ex != None:
3979
      oprot.writeFieldBegin('ex', TType.STRUCT, 1)
3980
      self.ex.write(oprot)
3981
      oprot.writeFieldEnd()
3982
    oprot.writeFieldStop()
3983
    oprot.writeStructEnd()
3984
 
3985
  def __repr__(self):
3986
    L = ['%s=%r' % (key, value)
3987
      for key, value in self.__dict__.iteritems()]
3988
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
3989
 
3990
  def __eq__(self, other):
3991
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
3992
 
3993
  def __ne__(self, other):
3994
    return not (self == other)
3995
 
1398 varun.gupt 3996
class enqueueTransactionInfoEmail_args:
1382 varun.gupt 3997
  """
3998
  Attributes:
3999
   - transactionId
4000
  """
4001
 
4002
  thrift_spec = (
4003
    None, # 0
4004
    (1, TType.I64, 'transactionId', None, None, ), # 1
4005
  )
4006
 
4007
  def __init__(self, transactionId=None,):
4008
    self.transactionId = transactionId
4009
 
4010
  def read(self, iprot):
4011
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
4012
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
4013
      return
4014
    iprot.readStructBegin()
4015
    while True:
4016
      (fname, ftype, fid) = iprot.readFieldBegin()
4017
      if ftype == TType.STOP:
4018
        break
4019
      if fid == 1:
4020
        if ftype == TType.I64:
4021
          self.transactionId = iprot.readI64();
4022
        else:
4023
          iprot.skip(ftype)
4024
      else:
4025
        iprot.skip(ftype)
4026
      iprot.readFieldEnd()
4027
    iprot.readStructEnd()
4028
 
4029
  def write(self, oprot):
4030
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
4031
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
4032
      return
1398 varun.gupt 4033
    oprot.writeStructBegin('enqueueTransactionInfoEmail_args')
1382 varun.gupt 4034
    if self.transactionId != None:
4035
      oprot.writeFieldBegin('transactionId', TType.I64, 1)
4036
      oprot.writeI64(self.transactionId)
4037
      oprot.writeFieldEnd()
4038
    oprot.writeFieldStop()
4039
    oprot.writeStructEnd()
4040
 
4041
  def __repr__(self):
4042
    L = ['%s=%r' % (key, value)
4043
      for key, value in self.__dict__.iteritems()]
4044
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
4045
 
4046
  def __eq__(self, other):
4047
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
4048
 
4049
  def __ne__(self, other):
4050
    return not (self == other)
4051
 
1398 varun.gupt 4052
class enqueueTransactionInfoEmail_result:
1382 varun.gupt 4053
  """
4054
  Attributes:
4055
   - success
4056
   - ex
4057
  """
4058
 
4059
  thrift_spec = (
4060
    (0, TType.BOOL, 'success', None, None, ), # 0
4061
    (1, TType.STRUCT, 'ex', (TransactionServiceException, TransactionServiceException.thrift_spec), None, ), # 1
4062
  )
4063
 
4064
  def __init__(self, success=None, ex=None,):
4065
    self.success = success
4066
    self.ex = ex
4067
 
4068
  def read(self, iprot):
4069
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
4070
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
4071
      return
4072
    iprot.readStructBegin()
4073
    while True:
4074
      (fname, ftype, fid) = iprot.readFieldBegin()
4075
      if ftype == TType.STOP:
4076
        break
4077
      if fid == 0:
4078
        if ftype == TType.BOOL:
4079
          self.success = iprot.readBool();
4080
        else:
4081
          iprot.skip(ftype)
4082
      elif fid == 1:
4083
        if ftype == TType.STRUCT:
4084
          self.ex = TransactionServiceException()
4085
          self.ex.read(iprot)
4086
        else:
4087
          iprot.skip(ftype)
4088
      else:
4089
        iprot.skip(ftype)
4090
      iprot.readFieldEnd()
4091
    iprot.readStructEnd()
4092
 
4093
  def write(self, oprot):
4094
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
4095
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
4096
      return
1398 varun.gupt 4097
    oprot.writeStructBegin('enqueueTransactionInfoEmail_result')
1382 varun.gupt 4098
    if self.success != None:
4099
      oprot.writeFieldBegin('success', TType.BOOL, 0)
4100
      oprot.writeBool(self.success)
4101
      oprot.writeFieldEnd()
4102
    if self.ex != None:
4103
      oprot.writeFieldBegin('ex', TType.STRUCT, 1)
4104
      self.ex.write(oprot)
4105
      oprot.writeFieldEnd()
4106
    oprot.writeFieldStop()
4107
    oprot.writeStructEnd()
4108
 
4109
  def __repr__(self):
4110
    L = ['%s=%r' % (key, value)
4111
      for key, value in self.__dict__.iteritems()]
4112
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
4113
 
4114
  def __eq__(self, other):
4115
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
4116
 
4117
  def __ne__(self, other):
4118
    return not (self == other)
4119
 
483 rajveer 4120
class getAllOrders_args:
94 ashish 4121
  """
4122
  Attributes:
483 rajveer 4123
   - status
4124
   - from_date
4125
   - to_date
4126
   - warehouse_id
94 ashish 4127
  """
4128
 
4129
  thrift_spec = (
4130
    None, # 0
483 rajveer 4131
    (1, TType.I32, 'status', None, None, ), # 1
4132
    (2, TType.I64, 'from_date', None, None, ), # 2
4133
    (3, TType.I64, 'to_date', None, None, ), # 3
4134
    (4, TType.I64, 'warehouse_id', None, None, ), # 4
94 ashish 4135
  )
4136
 
483 rajveer 4137
  def __init__(self, status=None, from_date=None, to_date=None, warehouse_id=None,):
4138
    self.status = status
4139
    self.from_date = from_date
4140
    self.to_date = to_date
4141
    self.warehouse_id = warehouse_id
94 ashish 4142
 
4143
  def read(self, iprot):
4144
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
4145
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
4146
      return
4147
    iprot.readStructBegin()
4148
    while True:
4149
      (fname, ftype, fid) = iprot.readFieldBegin()
4150
      if ftype == TType.STOP:
4151
        break
4152
      if fid == 1:
483 rajveer 4153
        if ftype == TType.I32:
4154
          self.status = iprot.readI32();
94 ashish 4155
        else:
4156
          iprot.skip(ftype)
483 rajveer 4157
      elif fid == 2:
4158
        if ftype == TType.I64:
4159
          self.from_date = iprot.readI64();
94 ashish 4160
        else:
4161
          iprot.skip(ftype)
483 rajveer 4162
      elif fid == 3:
4163
        if ftype == TType.I64:
4164
          self.to_date = iprot.readI64();
94 ashish 4165
        else:
4166
          iprot.skip(ftype)
483 rajveer 4167
      elif fid == 4:
94 ashish 4168
        if ftype == TType.I64:
483 rajveer 4169
          self.warehouse_id = iprot.readI64();
94 ashish 4170
        else:
4171
          iprot.skip(ftype)
4172
      else:
4173
        iprot.skip(ftype)
4174
      iprot.readFieldEnd()
4175
    iprot.readStructEnd()
4176
 
4177
  def write(self, oprot):
4178
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
4179
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
4180
      return
483 rajveer 4181
    oprot.writeStructBegin('getAllOrders_args')
4182
    if self.status != None:
4183
      oprot.writeFieldBegin('status', TType.I32, 1)
4184
      oprot.writeI32(self.status)
94 ashish 4185
      oprot.writeFieldEnd()
483 rajveer 4186
    if self.from_date != None:
4187
      oprot.writeFieldBegin('from_date', TType.I64, 2)
4188
      oprot.writeI64(self.from_date)
94 ashish 4189
      oprot.writeFieldEnd()
483 rajveer 4190
    if self.to_date != None:
4191
      oprot.writeFieldBegin('to_date', TType.I64, 3)
4192
      oprot.writeI64(self.to_date)
94 ashish 4193
      oprot.writeFieldEnd()
483 rajveer 4194
    if self.warehouse_id != None:
4195
      oprot.writeFieldBegin('warehouse_id', TType.I64, 4)
4196
      oprot.writeI64(self.warehouse_id)
94 ashish 4197
      oprot.writeFieldEnd()
4198
    oprot.writeFieldStop()
4199
    oprot.writeStructEnd()
4200
 
4201
  def __repr__(self):
4202
    L = ['%s=%r' % (key, value)
4203
      for key, value in self.__dict__.iteritems()]
4204
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
4205
 
4206
  def __eq__(self, other):
4207
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
4208
 
4209
  def __ne__(self, other):
4210
    return not (self == other)
4211
 
483 rajveer 4212
class getAllOrders_result:
94 ashish 4213
  """
4214
  Attributes:
4215
   - success
4216
   - ex
4217
  """
4218
 
4219
  thrift_spec = (
483 rajveer 4220
    (0, TType.LIST, 'success', (TType.STRUCT,(Order, Order.thrift_spec)), None, ), # 0
94 ashish 4221
    (1, TType.STRUCT, 'ex', (TransactionServiceException, TransactionServiceException.thrift_spec), None, ), # 1
4222
  )
4223
 
4224
  def __init__(self, success=None, ex=None,):
4225
    self.success = success
4226
    self.ex = ex
4227
 
4228
  def read(self, iprot):
4229
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
4230
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
4231
      return
4232
    iprot.readStructBegin()
4233
    while True:
4234
      (fname, ftype, fid) = iprot.readFieldBegin()
4235
      if ftype == TType.STOP:
4236
        break
4237
      if fid == 0:
483 rajveer 4238
        if ftype == TType.LIST:
4239
          self.success = []
685 chandransh 4240
          (_etype31, _size28) = iprot.readListBegin()
4241
          for _i32 in xrange(_size28):
4242
            _elem33 = Order()
4243
            _elem33.read(iprot)
4244
            self.success.append(_elem33)
483 rajveer 4245
          iprot.readListEnd()
94 ashish 4246
        else:
4247
          iprot.skip(ftype)
4248
      elif fid == 1:
4249
        if ftype == TType.STRUCT:
4250
          self.ex = TransactionServiceException()
4251
          self.ex.read(iprot)
4252
        else:
4253
          iprot.skip(ftype)
4254
      else:
4255
        iprot.skip(ftype)
4256
      iprot.readFieldEnd()
4257
    iprot.readStructEnd()
4258
 
4259
  def write(self, oprot):
4260
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
4261
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
4262
      return
483 rajveer 4263
    oprot.writeStructBegin('getAllOrders_result')
94 ashish 4264
    if self.success != None:
483 rajveer 4265
      oprot.writeFieldBegin('success', TType.LIST, 0)
4266
      oprot.writeListBegin(TType.STRUCT, len(self.success))
685 chandransh 4267
      for iter34 in self.success:
4268
        iter34.write(oprot)
483 rajveer 4269
      oprot.writeListEnd()
94 ashish 4270
      oprot.writeFieldEnd()
4271
    if self.ex != None:
4272
      oprot.writeFieldBegin('ex', TType.STRUCT, 1)
4273
      self.ex.write(oprot)
4274
      oprot.writeFieldEnd()
4275
    oprot.writeFieldStop()
4276
    oprot.writeStructEnd()
4277
 
4278
  def __repr__(self):
4279
    L = ['%s=%r' % (key, value)
4280
      for key, value in self.__dict__.iteritems()]
4281
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
4282
 
4283
  def __eq__(self, other):
4284
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
4285
 
4286
  def __ne__(self, other):
4287
    return not (self == other)
4288
 
999 varun.gupt 4289
class getOrdersByBillingDate_args:
4290
  """
4291
  Attributes:
4292
   - status
4293
   - start_billing_date
4294
   - end_billing_date
4295
   - warehouse_id
4296
  """
4297
 
4298
  thrift_spec = (
4299
    None, # 0
4300
    (1, TType.I32, 'status', None, None, ), # 1
4301
    (2, TType.I64, 'start_billing_date', None, None, ), # 2
4302
    (3, TType.I64, 'end_billing_date', None, None, ), # 3
4303
    (4, TType.I64, 'warehouse_id', None, None, ), # 4
4304
  )
4305
 
4306
  def __init__(self, status=None, start_billing_date=None, end_billing_date=None, warehouse_id=None,):
4307
    self.status = status
4308
    self.start_billing_date = start_billing_date
4309
    self.end_billing_date = end_billing_date
4310
    self.warehouse_id = warehouse_id
4311
 
4312
  def read(self, iprot):
4313
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
4314
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
4315
      return
4316
    iprot.readStructBegin()
4317
    while True:
4318
      (fname, ftype, fid) = iprot.readFieldBegin()
4319
      if ftype == TType.STOP:
4320
        break
4321
      if fid == 1:
4322
        if ftype == TType.I32:
4323
          self.status = iprot.readI32();
4324
        else:
4325
          iprot.skip(ftype)
4326
      elif fid == 2:
4327
        if ftype == TType.I64:
4328
          self.start_billing_date = iprot.readI64();
4329
        else:
4330
          iprot.skip(ftype)
4331
      elif fid == 3:
4332
        if ftype == TType.I64:
4333
          self.end_billing_date = iprot.readI64();
4334
        else:
4335
          iprot.skip(ftype)
4336
      elif fid == 4:
4337
        if ftype == TType.I64:
4338
          self.warehouse_id = iprot.readI64();
4339
        else:
4340
          iprot.skip(ftype)
4341
      else:
4342
        iprot.skip(ftype)
4343
      iprot.readFieldEnd()
4344
    iprot.readStructEnd()
4345
 
4346
  def write(self, oprot):
4347
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
4348
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
4349
      return
4350
    oprot.writeStructBegin('getOrdersByBillingDate_args')
4351
    if self.status != None:
4352
      oprot.writeFieldBegin('status', TType.I32, 1)
4353
      oprot.writeI32(self.status)
4354
      oprot.writeFieldEnd()
4355
    if self.start_billing_date != None:
4356
      oprot.writeFieldBegin('start_billing_date', TType.I64, 2)
4357
      oprot.writeI64(self.start_billing_date)
4358
      oprot.writeFieldEnd()
4359
    if self.end_billing_date != None:
4360
      oprot.writeFieldBegin('end_billing_date', TType.I64, 3)
4361
      oprot.writeI64(self.end_billing_date)
4362
      oprot.writeFieldEnd()
4363
    if self.warehouse_id != None:
4364
      oprot.writeFieldBegin('warehouse_id', TType.I64, 4)
4365
      oprot.writeI64(self.warehouse_id)
4366
      oprot.writeFieldEnd()
4367
    oprot.writeFieldStop()
4368
    oprot.writeStructEnd()
4369
 
4370
  def __repr__(self):
4371
    L = ['%s=%r' % (key, value)
4372
      for key, value in self.__dict__.iteritems()]
4373
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
4374
 
4375
  def __eq__(self, other):
4376
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
4377
 
4378
  def __ne__(self, other):
4379
    return not (self == other)
4380
 
4381
class getOrdersByBillingDate_result:
4382
  """
4383
  Attributes:
4384
   - success
4385
   - ex
4386
  """
4387
 
4388
  thrift_spec = (
4389
    (0, TType.LIST, 'success', (TType.STRUCT,(Order, Order.thrift_spec)), None, ), # 0
4390
    (1, TType.STRUCT, 'ex', (TransactionServiceException, TransactionServiceException.thrift_spec), None, ), # 1
4391
  )
4392
 
4393
  def __init__(self, success=None, ex=None,):
4394
    self.success = success
4395
    self.ex = ex
4396
 
4397
  def read(self, iprot):
4398
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
4399
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
4400
      return
4401
    iprot.readStructBegin()
4402
    while True:
4403
      (fname, ftype, fid) = iprot.readFieldBegin()
4404
      if ftype == TType.STOP:
4405
        break
4406
      if fid == 0:
4407
        if ftype == TType.LIST:
4408
          self.success = []
4409
          (_etype38, _size35) = iprot.readListBegin()
4410
          for _i39 in xrange(_size35):
4411
            _elem40 = Order()
4412
            _elem40.read(iprot)
4413
            self.success.append(_elem40)
4414
          iprot.readListEnd()
4415
        else:
4416
          iprot.skip(ftype)
4417
      elif fid == 1:
4418
        if ftype == TType.STRUCT:
4419
          self.ex = TransactionServiceException()
4420
          self.ex.read(iprot)
4421
        else:
4422
          iprot.skip(ftype)
4423
      else:
4424
        iprot.skip(ftype)
4425
      iprot.readFieldEnd()
4426
    iprot.readStructEnd()
4427
 
4428
  def write(self, oprot):
4429
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
4430
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
4431
      return
4432
    oprot.writeStructBegin('getOrdersByBillingDate_result')
4433
    if self.success != None:
4434
      oprot.writeFieldBegin('success', TType.LIST, 0)
4435
      oprot.writeListBegin(TType.STRUCT, len(self.success))
4436
      for iter41 in self.success:
4437
        iter41.write(oprot)
4438
      oprot.writeListEnd()
4439
      oprot.writeFieldEnd()
4440
    if self.ex != None:
4441
      oprot.writeFieldBegin('ex', TType.STRUCT, 1)
4442
      self.ex.write(oprot)
4443
      oprot.writeFieldEnd()
4444
    oprot.writeFieldStop()
4445
    oprot.writeStructEnd()
4446
 
4447
  def __repr__(self):
4448
    L = ['%s=%r' % (key, value)
4449
      for key, value in self.__dict__.iteritems()]
4450
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
4451
 
4452
  def __eq__(self, other):
4453
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
4454
 
4455
  def __ne__(self, other):
4456
    return not (self == other)
4457
 
1382 varun.gupt 4458
class getReturnableOrdersForCustomer_args:
4459
  """
4460
  Attributes:
4461
   - customer_id
4462
   - limit
4463
  """
4464
 
4465
  thrift_spec = (
4466
    None, # 0
4467
    (1, TType.I64, 'customer_id', None, None, ), # 1
4468
    (2, TType.I64, 'limit', None, None, ), # 2
4469
  )
4470
 
4471
  def __init__(self, customer_id=None, limit=None,):
4472
    self.customer_id = customer_id
4473
    self.limit = limit
4474
 
4475
  def read(self, iprot):
4476
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
4477
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
4478
      return
4479
    iprot.readStructBegin()
4480
    while True:
4481
      (fname, ftype, fid) = iprot.readFieldBegin()
4482
      if ftype == TType.STOP:
4483
        break
4484
      if fid == 1:
4485
        if ftype == TType.I64:
4486
          self.customer_id = iprot.readI64();
4487
        else:
4488
          iprot.skip(ftype)
4489
      elif fid == 2:
4490
        if ftype == TType.I64:
4491
          self.limit = iprot.readI64();
4492
        else:
4493
          iprot.skip(ftype)
4494
      else:
4495
        iprot.skip(ftype)
4496
      iprot.readFieldEnd()
4497
    iprot.readStructEnd()
4498
 
4499
  def write(self, oprot):
4500
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
4501
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
4502
      return
4503
    oprot.writeStructBegin('getReturnableOrdersForCustomer_args')
4504
    if self.customer_id != None:
4505
      oprot.writeFieldBegin('customer_id', TType.I64, 1)
4506
      oprot.writeI64(self.customer_id)
4507
      oprot.writeFieldEnd()
4508
    if self.limit != None:
4509
      oprot.writeFieldBegin('limit', TType.I64, 2)
4510
      oprot.writeI64(self.limit)
4511
      oprot.writeFieldEnd()
4512
    oprot.writeFieldStop()
4513
    oprot.writeStructEnd()
4514
 
4515
  def __repr__(self):
4516
    L = ['%s=%r' % (key, value)
4517
      for key, value in self.__dict__.iteritems()]
4518
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
4519
 
4520
  def __eq__(self, other):
4521
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
4522
 
4523
  def __ne__(self, other):
4524
    return not (self == other)
4525
 
4526
class getReturnableOrdersForCustomer_result:
4527
  """
4528
  Attributes:
4529
   - success
4530
   - ex
4531
  """
4532
 
4533
  thrift_spec = (
4534
    (0, TType.LIST, 'success', (TType.I64,None), None, ), # 0
4535
    (1, TType.STRUCT, 'ex', (TransactionServiceException, TransactionServiceException.thrift_spec), None, ), # 1
4536
  )
4537
 
4538
  def __init__(self, success=None, ex=None,):
4539
    self.success = success
4540
    self.ex = ex
4541
 
4542
  def read(self, iprot):
4543
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
4544
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
4545
      return
4546
    iprot.readStructBegin()
4547
    while True:
4548
      (fname, ftype, fid) = iprot.readFieldBegin()
4549
      if ftype == TType.STOP:
4550
        break
4551
      if fid == 0:
4552
        if ftype == TType.LIST:
4553
          self.success = []
4554
          (_etype45, _size42) = iprot.readListBegin()
4555
          for _i46 in xrange(_size42):
4556
            _elem47 = iprot.readI64();
4557
            self.success.append(_elem47)
4558
          iprot.readListEnd()
4559
        else:
4560
          iprot.skip(ftype)
4561
      elif fid == 1:
4562
        if ftype == TType.STRUCT:
4563
          self.ex = TransactionServiceException()
4564
          self.ex.read(iprot)
4565
        else:
4566
          iprot.skip(ftype)
4567
      else:
4568
        iprot.skip(ftype)
4569
      iprot.readFieldEnd()
4570
    iprot.readStructEnd()
4571
 
4572
  def write(self, oprot):
4573
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
4574
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
4575
      return
4576
    oprot.writeStructBegin('getReturnableOrdersForCustomer_result')
4577
    if self.success != None:
4578
      oprot.writeFieldBegin('success', TType.LIST, 0)
4579
      oprot.writeListBegin(TType.I64, len(self.success))
4580
      for iter48 in self.success:
4581
        oprot.writeI64(iter48)
4582
      oprot.writeListEnd()
4583
      oprot.writeFieldEnd()
4584
    if self.ex != None:
4585
      oprot.writeFieldBegin('ex', TType.STRUCT, 1)
4586
      self.ex.write(oprot)
4587
      oprot.writeFieldEnd()
4588
    oprot.writeFieldStop()
4589
    oprot.writeStructEnd()
4590
 
4591
  def __repr__(self):
4592
    L = ['%s=%r' % (key, value)
4593
      for key, value in self.__dict__.iteritems()]
4594
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
4595
 
4596
  def __eq__(self, other):
4597
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
4598
 
4599
  def __ne__(self, other):
4600
    return not (self == other)
4601
 
4602
class getCancellableOrdersForCustomer_args:
4603
  """
4604
  Attributes:
4605
   - customer_id
4606
   - limit
4607
  """
4608
 
4609
  thrift_spec = (
4610
    None, # 0
4611
    (1, TType.I64, 'customer_id', None, None, ), # 1
4612
    (2, TType.I64, 'limit', None, None, ), # 2
4613
  )
4614
 
4615
  def __init__(self, customer_id=None, limit=None,):
4616
    self.customer_id = customer_id
4617
    self.limit = limit
4618
 
4619
  def read(self, iprot):
4620
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
4621
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
4622
      return
4623
    iprot.readStructBegin()
4624
    while True:
4625
      (fname, ftype, fid) = iprot.readFieldBegin()
4626
      if ftype == TType.STOP:
4627
        break
4628
      if fid == 1:
4629
        if ftype == TType.I64:
4630
          self.customer_id = iprot.readI64();
4631
        else:
4632
          iprot.skip(ftype)
4633
      elif fid == 2:
4634
        if ftype == TType.I64:
4635
          self.limit = iprot.readI64();
4636
        else:
4637
          iprot.skip(ftype)
4638
      else:
4639
        iprot.skip(ftype)
4640
      iprot.readFieldEnd()
4641
    iprot.readStructEnd()
4642
 
4643
  def write(self, oprot):
4644
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
4645
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
4646
      return
4647
    oprot.writeStructBegin('getCancellableOrdersForCustomer_args')
4648
    if self.customer_id != None:
4649
      oprot.writeFieldBegin('customer_id', TType.I64, 1)
4650
      oprot.writeI64(self.customer_id)
4651
      oprot.writeFieldEnd()
4652
    if self.limit != None:
4653
      oprot.writeFieldBegin('limit', TType.I64, 2)
4654
      oprot.writeI64(self.limit)
4655
      oprot.writeFieldEnd()
4656
    oprot.writeFieldStop()
4657
    oprot.writeStructEnd()
4658
 
4659
  def __repr__(self):
4660
    L = ['%s=%r' % (key, value)
4661
      for key, value in self.__dict__.iteritems()]
4662
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
4663
 
4664
  def __eq__(self, other):
4665
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
4666
 
4667
  def __ne__(self, other):
4668
    return not (self == other)
4669
 
4670
class getCancellableOrdersForCustomer_result:
4671
  """
4672
  Attributes:
4673
   - success
4674
   - ex
4675
  """
4676
 
4677
  thrift_spec = (
4678
    (0, TType.LIST, 'success', (TType.I64,None), None, ), # 0
4679
    (1, TType.STRUCT, 'ex', (TransactionServiceException, TransactionServiceException.thrift_spec), None, ), # 1
4680
  )
4681
 
4682
  def __init__(self, success=None, ex=None,):
4683
    self.success = success
4684
    self.ex = ex
4685
 
4686
  def read(self, iprot):
4687
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
4688
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
4689
      return
4690
    iprot.readStructBegin()
4691
    while True:
4692
      (fname, ftype, fid) = iprot.readFieldBegin()
4693
      if ftype == TType.STOP:
4694
        break
4695
      if fid == 0:
4696
        if ftype == TType.LIST:
4697
          self.success = []
4698
          (_etype52, _size49) = iprot.readListBegin()
4699
          for _i53 in xrange(_size49):
4700
            _elem54 = iprot.readI64();
4701
            self.success.append(_elem54)
4702
          iprot.readListEnd()
4703
        else:
4704
          iprot.skip(ftype)
4705
      elif fid == 1:
4706
        if ftype == TType.STRUCT:
4707
          self.ex = TransactionServiceException()
4708
          self.ex.read(iprot)
4709
        else:
4710
          iprot.skip(ftype)
4711
      else:
4712
        iprot.skip(ftype)
4713
      iprot.readFieldEnd()
4714
    iprot.readStructEnd()
4715
 
4716
  def write(self, oprot):
4717
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
4718
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
4719
      return
4720
    oprot.writeStructBegin('getCancellableOrdersForCustomer_result')
4721
    if self.success != None:
4722
      oprot.writeFieldBegin('success', TType.LIST, 0)
4723
      oprot.writeListBegin(TType.I64, len(self.success))
4724
      for iter55 in self.success:
4725
        oprot.writeI64(iter55)
4726
      oprot.writeListEnd()
4727
      oprot.writeFieldEnd()
4728
    if self.ex != None:
4729
      oprot.writeFieldBegin('ex', TType.STRUCT, 1)
4730
      self.ex.write(oprot)
4731
      oprot.writeFieldEnd()
4732
    oprot.writeFieldStop()
4733
    oprot.writeStructEnd()
4734
 
4735
  def __repr__(self):
4736
    L = ['%s=%r' % (key, value)
4737
      for key, value in self.__dict__.iteritems()]
4738
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
4739
 
4740
  def __eq__(self, other):
4741
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
4742
 
4743
  def __ne__(self, other):
4744
    return not (self == other)
4745
 
483 rajveer 4746
class changeOrderStatus_args:
94 ashish 4747
  """
4748
  Attributes:
483 rajveer 4749
   - orderId
4750
   - status
4751
   - description
94 ashish 4752
  """
4753
 
4754
  thrift_spec = (
4755
    None, # 0
483 rajveer 4756
    (1, TType.I64, 'orderId', None, None, ), # 1
4757
    (2, TType.I32, 'status', None, None, ), # 2
4758
    (3, TType.STRING, 'description', None, None, ), # 3
94 ashish 4759
  )
4760
 
483 rajveer 4761
  def __init__(self, orderId=None, status=None, description=None,):
4762
    self.orderId = orderId
4763
    self.status = status
4764
    self.description = description
94 ashish 4765
 
4766
  def read(self, iprot):
4767
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
4768
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
4769
      return
4770
    iprot.readStructBegin()
4771
    while True:
4772
      (fname, ftype, fid) = iprot.readFieldBegin()
4773
      if ftype == TType.STOP:
4774
        break
4775
      if fid == 1:
4776
        if ftype == TType.I64:
483 rajveer 4777
          self.orderId = iprot.readI64();
94 ashish 4778
        else:
4779
          iprot.skip(ftype)
4780
      elif fid == 2:
483 rajveer 4781
        if ftype == TType.I32:
4782
          self.status = iprot.readI32();
94 ashish 4783
        else:
4784
          iprot.skip(ftype)
483 rajveer 4785
      elif fid == 3:
4786
        if ftype == TType.STRING:
4787
          self.description = iprot.readString();
4788
        else:
4789
          iprot.skip(ftype)
94 ashish 4790
      else:
4791
        iprot.skip(ftype)
4792
      iprot.readFieldEnd()
4793
    iprot.readStructEnd()
4794
 
4795
  def write(self, oprot):
4796
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
4797
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
4798
      return
483 rajveer 4799
    oprot.writeStructBegin('changeOrderStatus_args')
4800
    if self.orderId != None:
4801
      oprot.writeFieldBegin('orderId', TType.I64, 1)
4802
      oprot.writeI64(self.orderId)
94 ashish 4803
      oprot.writeFieldEnd()
483 rajveer 4804
    if self.status != None:
4805
      oprot.writeFieldBegin('status', TType.I32, 2)
4806
      oprot.writeI32(self.status)
94 ashish 4807
      oprot.writeFieldEnd()
483 rajveer 4808
    if self.description != None:
4809
      oprot.writeFieldBegin('description', TType.STRING, 3)
4810
      oprot.writeString(self.description)
4811
      oprot.writeFieldEnd()
94 ashish 4812
    oprot.writeFieldStop()
4813
    oprot.writeStructEnd()
4814
 
4815
  def __repr__(self):
4816
    L = ['%s=%r' % (key, value)
4817
      for key, value in self.__dict__.iteritems()]
4818
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
4819
 
4820
  def __eq__(self, other):
4821
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
4822
 
4823
  def __ne__(self, other):
4824
    return not (self == other)
4825
 
483 rajveer 4826
class changeOrderStatus_result:
94 ashish 4827
  """
4828
  Attributes:
4829
   - success
4830
   - ex
4831
  """
4832
 
4833
  thrift_spec = (
4834
    (0, TType.BOOL, 'success', None, None, ), # 0
4835
    (1, TType.STRUCT, 'ex', (TransactionServiceException, TransactionServiceException.thrift_spec), None, ), # 1
4836
  )
4837
 
4838
  def __init__(self, success=None, ex=None,):
4839
    self.success = success
4840
    self.ex = ex
4841
 
4842
  def read(self, iprot):
4843
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
4844
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
4845
      return
4846
    iprot.readStructBegin()
4847
    while True:
4848
      (fname, ftype, fid) = iprot.readFieldBegin()
4849
      if ftype == TType.STOP:
4850
        break
4851
      if fid == 0:
4852
        if ftype == TType.BOOL:
4853
          self.success = iprot.readBool();
4854
        else:
4855
          iprot.skip(ftype)
4856
      elif fid == 1:
4857
        if ftype == TType.STRUCT:
4858
          self.ex = TransactionServiceException()
4859
          self.ex.read(iprot)
4860
        else:
4861
          iprot.skip(ftype)
4862
      else:
4863
        iprot.skip(ftype)
4864
      iprot.readFieldEnd()
4865
    iprot.readStructEnd()
4866
 
4867
  def write(self, oprot):
4868
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
4869
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
4870
      return
483 rajveer 4871
    oprot.writeStructBegin('changeOrderStatus_result')
94 ashish 4872
    if self.success != None:
4873
      oprot.writeFieldBegin('success', TType.BOOL, 0)
4874
      oprot.writeBool(self.success)
4875
      oprot.writeFieldEnd()
4876
    if self.ex != None:
4877
      oprot.writeFieldBegin('ex', TType.STRUCT, 1)
4878
      self.ex.write(oprot)
4879
      oprot.writeFieldEnd()
4880
    oprot.writeFieldStop()
4881
    oprot.writeStructEnd()
4882
 
4883
  def __repr__(self):
4884
    L = ['%s=%r' % (key, value)
4885
      for key, value in self.__dict__.iteritems()]
4886
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
4887
 
4888
  def __eq__(self, other):
4889
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
4890
 
4891
  def __ne__(self, other):
4892
    return not (self == other)
4893
 
3064 chandransh 4894
class getOrdersForTransaction_args:
494 rajveer 4895
  """
4896
  Attributes:
3064 chandransh 4897
   - transactionId
4898
   - customerId
494 rajveer 4899
  """
4900
 
4901
  thrift_spec = (
4902
    None, # 0
3064 chandransh 4903
    (1, TType.I64, 'transactionId', None, None, ), # 1
4904
    (2, TType.I64, 'customerId', None, None, ), # 2
494 rajveer 4905
  )
4906
 
3064 chandransh 4907
  def __init__(self, transactionId=None, customerId=None,):
4908
    self.transactionId = transactionId
4909
    self.customerId = customerId
494 rajveer 4910
 
4911
  def read(self, iprot):
4912
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
4913
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
4914
      return
4915
    iprot.readStructBegin()
4916
    while True:
4917
      (fname, ftype, fid) = iprot.readFieldBegin()
4918
      if ftype == TType.STOP:
4919
        break
4920
      if fid == 1:
4921
        if ftype == TType.I64:
3064 chandransh 4922
          self.transactionId = iprot.readI64();
494 rajveer 4923
        else:
4924
          iprot.skip(ftype)
4925
      elif fid == 2:
3064 chandransh 4926
        if ftype == TType.I64:
4927
          self.customerId = iprot.readI64();
494 rajveer 4928
        else:
4929
          iprot.skip(ftype)
4930
      else:
4931
        iprot.skip(ftype)
4932
      iprot.readFieldEnd()
4933
    iprot.readStructEnd()
4934
 
4935
  def write(self, oprot):
4936
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
4937
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
4938
      return
3064 chandransh 4939
    oprot.writeStructBegin('getOrdersForTransaction_args')
4940
    if self.transactionId != None:
4941
      oprot.writeFieldBegin('transactionId', TType.I64, 1)
4942
      oprot.writeI64(self.transactionId)
494 rajveer 4943
      oprot.writeFieldEnd()
3064 chandransh 4944
    if self.customerId != None:
4945
      oprot.writeFieldBegin('customerId', TType.I64, 2)
4946
      oprot.writeI64(self.customerId)
494 rajveer 4947
      oprot.writeFieldEnd()
4948
    oprot.writeFieldStop()
4949
    oprot.writeStructEnd()
4950
 
4951
  def __repr__(self):
4952
    L = ['%s=%r' % (key, value)
4953
      for key, value in self.__dict__.iteritems()]
4954
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
4955
 
4956
  def __eq__(self, other):
4957
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
4958
 
4959
  def __ne__(self, other):
4960
    return not (self == other)
4961
 
3064 chandransh 4962
class getOrdersForTransaction_result:
494 rajveer 4963
  """
4964
  Attributes:
4965
   - success
4966
   - ex
4967
  """
4968
 
4969
  thrift_spec = (
3064 chandransh 4970
    (0, TType.LIST, 'success', (TType.STRUCT,(Order, Order.thrift_spec)), None, ), # 0
494 rajveer 4971
    (1, TType.STRUCT, 'ex', (TransactionServiceException, TransactionServiceException.thrift_spec), None, ), # 1
4972
  )
4973
 
4974
  def __init__(self, success=None, ex=None,):
4975
    self.success = success
4976
    self.ex = ex
4977
 
4978
  def read(self, iprot):
4979
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
4980
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
4981
      return
4982
    iprot.readStructBegin()
4983
    while True:
4984
      (fname, ftype, fid) = iprot.readFieldBegin()
4985
      if ftype == TType.STOP:
4986
        break
4987
      if fid == 0:
3064 chandransh 4988
        if ftype == TType.LIST:
4989
          self.success = []
4990
          (_etype59, _size56) = iprot.readListBegin()
4991
          for _i60 in xrange(_size56):
4992
            _elem61 = Order()
4993
            _elem61.read(iprot)
4994
            self.success.append(_elem61)
4995
          iprot.readListEnd()
494 rajveer 4996
        else:
4997
          iprot.skip(ftype)
4998
      elif fid == 1:
4999
        if ftype == TType.STRUCT:
5000
          self.ex = TransactionServiceException()
5001
          self.ex.read(iprot)
5002
        else:
5003
          iprot.skip(ftype)
5004
      else:
5005
        iprot.skip(ftype)
5006
      iprot.readFieldEnd()
5007
    iprot.readStructEnd()
5008
 
5009
  def write(self, oprot):
5010
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
5011
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
5012
      return
3064 chandransh 5013
    oprot.writeStructBegin('getOrdersForTransaction_result')
494 rajveer 5014
    if self.success != None:
3064 chandransh 5015
      oprot.writeFieldBegin('success', TType.LIST, 0)
5016
      oprot.writeListBegin(TType.STRUCT, len(self.success))
5017
      for iter62 in self.success:
5018
        iter62.write(oprot)
5019
      oprot.writeListEnd()
494 rajveer 5020
      oprot.writeFieldEnd()
5021
    if self.ex != None:
5022
      oprot.writeFieldBegin('ex', TType.STRUCT, 1)
5023
      self.ex.write(oprot)
5024
      oprot.writeFieldEnd()
5025
    oprot.writeFieldStop()
5026
    oprot.writeStructEnd()
5027
 
5028
  def __repr__(self):
5029
    L = ['%s=%r' % (key, value)
5030
      for key, value in self.__dict__.iteritems()]
5031
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
5032
 
5033
  def __eq__(self, other):
5034
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
5035
 
5036
  def __ne__(self, other):
5037
    return not (self == other)
5038
 
3064 chandransh 5039
class getOrdersForCustomer_args:
1149 chandransh 5040
  """
5041
  Attributes:
3064 chandransh 5042
   - customerId
5043
   - from_date
5044
   - to_date
5045
   - statuses
1149 chandransh 5046
  """
5047
 
5048
  thrift_spec = (
5049
    None, # 0
3064 chandransh 5050
    (1, TType.I64, 'customerId', None, None, ), # 1
5051
    (2, TType.I64, 'from_date', None, None, ), # 2
5052
    (3, TType.I64, 'to_date', None, None, ), # 3
5053
    (4, TType.LIST, 'statuses', (TType.I32,None), None, ), # 4
1149 chandransh 5054
  )
5055
 
3064 chandransh 5056
  def __init__(self, customerId=None, from_date=None, to_date=None, statuses=None,):
5057
    self.customerId = customerId
5058
    self.from_date = from_date
5059
    self.to_date = to_date
5060
    self.statuses = statuses
1149 chandransh 5061
 
5062
  def read(self, iprot):
5063
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
5064
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
5065
      return
5066
    iprot.readStructBegin()
5067
    while True:
5068
      (fname, ftype, fid) = iprot.readFieldBegin()
5069
      if ftype == TType.STOP:
5070
        break
5071
      if fid == 1:
5072
        if ftype == TType.I64:
3064 chandransh 5073
          self.customerId = iprot.readI64();
1149 chandransh 5074
        else:
5075
          iprot.skip(ftype)
5076
      elif fid == 2:
5077
        if ftype == TType.I64:
3064 chandransh 5078
          self.from_date = iprot.readI64();
1149 chandransh 5079
        else:
5080
          iprot.skip(ftype)
2783 chandransh 5081
      elif fid == 3:
5082
        if ftype == TType.I64:
3064 chandransh 5083
          self.to_date = iprot.readI64();
2783 chandransh 5084
        else:
5085
          iprot.skip(ftype)
5086
      elif fid == 4:
3064 chandransh 5087
        if ftype == TType.LIST:
5088
          self.statuses = []
5089
          (_etype66, _size63) = iprot.readListBegin()
5090
          for _i67 in xrange(_size63):
5091
            _elem68 = iprot.readI32();
5092
            self.statuses.append(_elem68)
5093
          iprot.readListEnd()
2783 chandransh 5094
        else:
5095
          iprot.skip(ftype)
1149 chandransh 5096
      else:
5097
        iprot.skip(ftype)
5098
      iprot.readFieldEnd()
5099
    iprot.readStructEnd()
5100
 
5101
  def write(self, oprot):
5102
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
5103
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
5104
      return
3064 chandransh 5105
    oprot.writeStructBegin('getOrdersForCustomer_args')
5106
    if self.customerId != None:
5107
      oprot.writeFieldBegin('customerId', TType.I64, 1)
5108
      oprot.writeI64(self.customerId)
1149 chandransh 5109
      oprot.writeFieldEnd()
3064 chandransh 5110
    if self.from_date != None:
5111
      oprot.writeFieldBegin('from_date', TType.I64, 2)
5112
      oprot.writeI64(self.from_date)
1149 chandransh 5113
      oprot.writeFieldEnd()
3064 chandransh 5114
    if self.to_date != None:
5115
      oprot.writeFieldBegin('to_date', TType.I64, 3)
5116
      oprot.writeI64(self.to_date)
2783 chandransh 5117
      oprot.writeFieldEnd()
3064 chandransh 5118
    if self.statuses != None:
5119
      oprot.writeFieldBegin('statuses', TType.LIST, 4)
5120
      oprot.writeListBegin(TType.I32, len(self.statuses))
5121
      for iter69 in self.statuses:
5122
        oprot.writeI32(iter69)
5123
      oprot.writeListEnd()
2783 chandransh 5124
      oprot.writeFieldEnd()
1149 chandransh 5125
    oprot.writeFieldStop()
5126
    oprot.writeStructEnd()
5127
 
5128
  def __repr__(self):
5129
    L = ['%s=%r' % (key, value)
5130
      for key, value in self.__dict__.iteritems()]
5131
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
5132
 
5133
  def __eq__(self, other):
5134
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
5135
 
5136
  def __ne__(self, other):
5137
    return not (self == other)
5138
 
3064 chandransh 5139
class getOrdersForCustomer_result:
1149 chandransh 5140
  """
5141
  Attributes:
5142
   - success
5143
   - ex
5144
  """
5145
 
5146
  thrift_spec = (
3064 chandransh 5147
    (0, TType.LIST, 'success', (TType.STRUCT,(Order, Order.thrift_spec)), None, ), # 0
1149 chandransh 5148
    (1, TType.STRUCT, 'ex', (TransactionServiceException, TransactionServiceException.thrift_spec), None, ), # 1
5149
  )
5150
 
5151
  def __init__(self, success=None, ex=None,):
5152
    self.success = success
5153
    self.ex = ex
5154
 
5155
  def read(self, iprot):
5156
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
5157
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
5158
      return
5159
    iprot.readStructBegin()
5160
    while True:
5161
      (fname, ftype, fid) = iprot.readFieldBegin()
5162
      if ftype == TType.STOP:
5163
        break
5164
      if fid == 0:
3064 chandransh 5165
        if ftype == TType.LIST:
5166
          self.success = []
5167
          (_etype73, _size70) = iprot.readListBegin()
5168
          for _i74 in xrange(_size70):
5169
            _elem75 = Order()
5170
            _elem75.read(iprot)
5171
            self.success.append(_elem75)
5172
          iprot.readListEnd()
1149 chandransh 5173
        else:
5174
          iprot.skip(ftype)
5175
      elif fid == 1:
5176
        if ftype == TType.STRUCT:
5177
          self.ex = TransactionServiceException()
5178
          self.ex.read(iprot)
5179
        else:
5180
          iprot.skip(ftype)
5181
      else:
5182
        iprot.skip(ftype)
5183
      iprot.readFieldEnd()
5184
    iprot.readStructEnd()
5185
 
5186
  def write(self, oprot):
5187
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
5188
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
5189
      return
3064 chandransh 5190
    oprot.writeStructBegin('getOrdersForCustomer_result')
1149 chandransh 5191
    if self.success != None:
3064 chandransh 5192
      oprot.writeFieldBegin('success', TType.LIST, 0)
5193
      oprot.writeListBegin(TType.STRUCT, len(self.success))
5194
      for iter76 in self.success:
5195
        iter76.write(oprot)
5196
      oprot.writeListEnd()
1149 chandransh 5197
      oprot.writeFieldEnd()
5198
    if self.ex != None:
5199
      oprot.writeFieldBegin('ex', TType.STRUCT, 1)
5200
      self.ex.write(oprot)
5201
      oprot.writeFieldEnd()
5202
    oprot.writeFieldStop()
5203
    oprot.writeStructEnd()
5204
 
5205
  def __repr__(self):
5206
    L = ['%s=%r' % (key, value)
5207
      for key, value in self.__dict__.iteritems()]
5208
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
5209
 
5210
  def __eq__(self, other):
5211
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
5212
 
5213
  def __ne__(self, other):
5214
    return not (self == other)
5215
 
3064 chandransh 5216
class createOrder_args:
921 rajveer 5217
  """
5218
  Attributes:
3064 chandransh 5219
   - order
921 rajveer 5220
  """
5221
 
5222
  thrift_spec = (
5223
    None, # 0
3064 chandransh 5224
    (1, TType.STRUCT, 'order', (Order, Order.thrift_spec), None, ), # 1
921 rajveer 5225
  )
5226
 
3064 chandransh 5227
  def __init__(self, order=None,):
5228
    self.order = order
921 rajveer 5229
 
5230
  def read(self, iprot):
5231
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
5232
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
5233
      return
5234
    iprot.readStructBegin()
5235
    while True:
5236
      (fname, ftype, fid) = iprot.readFieldBegin()
5237
      if ftype == TType.STOP:
5238
        break
5239
      if fid == 1:
3064 chandransh 5240
        if ftype == TType.STRUCT:
5241
          self.order = Order()
5242
          self.order.read(iprot)
921 rajveer 5243
        else:
5244
          iprot.skip(ftype)
5245
      else:
5246
        iprot.skip(ftype)
5247
      iprot.readFieldEnd()
5248
    iprot.readStructEnd()
5249
 
5250
  def write(self, oprot):
5251
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
5252
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
5253
      return
3064 chandransh 5254
    oprot.writeStructBegin('createOrder_args')
5255
    if self.order != None:
5256
      oprot.writeFieldBegin('order', TType.STRUCT, 1)
5257
      self.order.write(oprot)
921 rajveer 5258
      oprot.writeFieldEnd()
5259
    oprot.writeFieldStop()
5260
    oprot.writeStructEnd()
5261
 
5262
  def __repr__(self):
5263
    L = ['%s=%r' % (key, value)
5264
      for key, value in self.__dict__.iteritems()]
5265
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
5266
 
5267
  def __eq__(self, other):
5268
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
5269
 
5270
  def __ne__(self, other):
5271
    return not (self == other)
5272
 
3064 chandransh 5273
class createOrder_result:
921 rajveer 5274
  """
5275
  Attributes:
5276
   - success
5277
   - ex
5278
  """
5279
 
5280
  thrift_spec = (
3064 chandransh 5281
    (0, TType.I64, 'success', None, None, ), # 0
921 rajveer 5282
    (1, TType.STRUCT, 'ex', (TransactionServiceException, TransactionServiceException.thrift_spec), None, ), # 1
5283
  )
5284
 
5285
  def __init__(self, success=None, ex=None,):
5286
    self.success = success
5287
    self.ex = ex
5288
 
5289
  def read(self, iprot):
5290
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
5291
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
5292
      return
5293
    iprot.readStructBegin()
5294
    while True:
5295
      (fname, ftype, fid) = iprot.readFieldBegin()
5296
      if ftype == TType.STOP:
5297
        break
5298
      if fid == 0:
3064 chandransh 5299
        if ftype == TType.I64:
5300
          self.success = iprot.readI64();
921 rajveer 5301
        else:
5302
          iprot.skip(ftype)
5303
      elif fid == 1:
5304
        if ftype == TType.STRUCT:
5305
          self.ex = TransactionServiceException()
5306
          self.ex.read(iprot)
5307
        else:
5308
          iprot.skip(ftype)
5309
      else:
5310
        iprot.skip(ftype)
5311
      iprot.readFieldEnd()
5312
    iprot.readStructEnd()
5313
 
5314
  def write(self, oprot):
5315
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
5316
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
5317
      return
3064 chandransh 5318
    oprot.writeStructBegin('createOrder_result')
921 rajveer 5319
    if self.success != None:
3064 chandransh 5320
      oprot.writeFieldBegin('success', TType.I64, 0)
5321
      oprot.writeI64(self.success)
921 rajveer 5322
      oprot.writeFieldEnd()
5323
    if self.ex != None:
5324
      oprot.writeFieldBegin('ex', TType.STRUCT, 1)
5325
      self.ex.write(oprot)
5326
      oprot.writeFieldEnd()
5327
    oprot.writeFieldStop()
5328
    oprot.writeStructEnd()
5329
 
5330
  def __repr__(self):
5331
    L = ['%s=%r' % (key, value)
5332
      for key, value in self.__dict__.iteritems()]
5333
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
5334
 
5335
  def __eq__(self, other):
5336
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
5337
 
5338
  def __ne__(self, other):
5339
    return not (self == other)
5340
 
3064 chandransh 5341
class getOrder_args:
921 rajveer 5342
  """
5343
  Attributes:
3064 chandransh 5344
   - id
921 rajveer 5345
  """
5346
 
5347
  thrift_spec = (
5348
    None, # 0
3064 chandransh 5349
    (1, TType.I64, 'id', None, None, ), # 1
921 rajveer 5350
  )
5351
 
3064 chandransh 5352
  def __init__(self, id=None,):
5353
    self.id = id
921 rajveer 5354
 
5355
  def read(self, iprot):
5356
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
5357
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
5358
      return
5359
    iprot.readStructBegin()
5360
    while True:
5361
      (fname, ftype, fid) = iprot.readFieldBegin()
5362
      if ftype == TType.STOP:
5363
        break
5364
      if fid == 1:
5365
        if ftype == TType.I64:
3064 chandransh 5366
          self.id = iprot.readI64();
921 rajveer 5367
        else:
5368
          iprot.skip(ftype)
5369
      else:
5370
        iprot.skip(ftype)
5371
      iprot.readFieldEnd()
5372
    iprot.readStructEnd()
5373
 
5374
  def write(self, oprot):
5375
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
5376
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
5377
      return
3064 chandransh 5378
    oprot.writeStructBegin('getOrder_args')
5379
    if self.id != None:
5380
      oprot.writeFieldBegin('id', TType.I64, 1)
5381
      oprot.writeI64(self.id)
921 rajveer 5382
      oprot.writeFieldEnd()
5383
    oprot.writeFieldStop()
5384
    oprot.writeStructEnd()
5385
 
5386
  def __repr__(self):
5387
    L = ['%s=%r' % (key, value)
5388
      for key, value in self.__dict__.iteritems()]
5389
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
5390
 
5391
  def __eq__(self, other):
5392
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
5393
 
5394
  def __ne__(self, other):
5395
    return not (self == other)
5396
 
3064 chandransh 5397
class getOrder_result:
921 rajveer 5398
  """
5399
  Attributes:
5400
   - success
5401
   - ex
5402
  """
5403
 
5404
  thrift_spec = (
3064 chandransh 5405
    (0, TType.STRUCT, 'success', (Order, Order.thrift_spec), None, ), # 0
921 rajveer 5406
    (1, TType.STRUCT, 'ex', (TransactionServiceException, TransactionServiceException.thrift_spec), None, ), # 1
5407
  )
5408
 
5409
  def __init__(self, success=None, ex=None,):
5410
    self.success = success
5411
    self.ex = ex
5412
 
5413
  def read(self, iprot):
5414
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
5415
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
5416
      return
5417
    iprot.readStructBegin()
5418
    while True:
5419
      (fname, ftype, fid) = iprot.readFieldBegin()
5420
      if ftype == TType.STOP:
5421
        break
5422
      if fid == 0:
3064 chandransh 5423
        if ftype == TType.STRUCT:
5424
          self.success = Order()
5425
          self.success.read(iprot)
921 rajveer 5426
        else:
5427
          iprot.skip(ftype)
5428
      elif fid == 1:
5429
        if ftype == TType.STRUCT:
5430
          self.ex = TransactionServiceException()
5431
          self.ex.read(iprot)
5432
        else:
5433
          iprot.skip(ftype)
5434
      else:
5435
        iprot.skip(ftype)
5436
      iprot.readFieldEnd()
5437
    iprot.readStructEnd()
5438
 
5439
  def write(self, oprot):
5440
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
5441
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
5442
      return
3064 chandransh 5443
    oprot.writeStructBegin('getOrder_result')
921 rajveer 5444
    if self.success != None:
3064 chandransh 5445
      oprot.writeFieldBegin('success', TType.STRUCT, 0)
5446
      self.success.write(oprot)
921 rajveer 5447
      oprot.writeFieldEnd()
5448
    if self.ex != None:
5449
      oprot.writeFieldBegin('ex', TType.STRUCT, 1)
5450
      self.ex.write(oprot)
5451
      oprot.writeFieldEnd()
5452
    oprot.writeFieldStop()
5453
    oprot.writeStructEnd()
5454
 
5455
  def __repr__(self):
5456
    L = ['%s=%r' % (key, value)
5457
      for key, value in self.__dict__.iteritems()]
5458
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
5459
 
5460
  def __eq__(self, other):
5461
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
5462
 
5463
  def __ne__(self, other):
5464
    return not (self == other)
5465
 
3064 chandransh 5466
class getLineItemsForOrder_args:
94 ashish 5467
  """
5468
  Attributes:
3064 chandransh 5469
   - orderId
94 ashish 5470
  """
5471
 
5472
  thrift_spec = (
5473
    None, # 0
3064 chandransh 5474
    (1, TType.I64, 'orderId', None, None, ), # 1
94 ashish 5475
  )
5476
 
3064 chandransh 5477
  def __init__(self, orderId=None,):
5478
    self.orderId = orderId
94 ashish 5479
 
5480
  def read(self, iprot):
5481
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
5482
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
5483
      return
5484
    iprot.readStructBegin()
5485
    while True:
5486
      (fname, ftype, fid) = iprot.readFieldBegin()
5487
      if ftype == TType.STOP:
5488
        break
5489
      if fid == 1:
5490
        if ftype == TType.I64:
3064 chandransh 5491
          self.orderId = iprot.readI64();
94 ashish 5492
        else:
5493
          iprot.skip(ftype)
5494
      else:
5495
        iprot.skip(ftype)
5496
      iprot.readFieldEnd()
5497
    iprot.readStructEnd()
5498
 
5499
  def write(self, oprot):
5500
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
5501
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
5502
      return
3064 chandransh 5503
    oprot.writeStructBegin('getLineItemsForOrder_args')
5504
    if self.orderId != None:
5505
      oprot.writeFieldBegin('orderId', TType.I64, 1)
5506
      oprot.writeI64(self.orderId)
94 ashish 5507
      oprot.writeFieldEnd()
5508
    oprot.writeFieldStop()
5509
    oprot.writeStructEnd()
5510
 
5511
  def __repr__(self):
5512
    L = ['%s=%r' % (key, value)
5513
      for key, value in self.__dict__.iteritems()]
5514
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
5515
 
5516
  def __eq__(self, other):
5517
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
5518
 
5519
  def __ne__(self, other):
5520
    return not (self == other)
5521
 
3064 chandransh 5522
class getLineItemsForOrder_result:
94 ashish 5523
  """
5524
  Attributes:
5525
   - success
5526
   - ex
5527
  """
5528
 
5529
  thrift_spec = (
3064 chandransh 5530
    (0, TType.LIST, 'success', (TType.STRUCT,(LineItem, LineItem.thrift_spec)), None, ), # 0
94 ashish 5531
    (1, TType.STRUCT, 'ex', (TransactionServiceException, TransactionServiceException.thrift_spec), None, ), # 1
5532
  )
5533
 
5534
  def __init__(self, success=None, ex=None,):
5535
    self.success = success
5536
    self.ex = ex
5537
 
5538
  def read(self, iprot):
5539
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
5540
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
5541
      return
5542
    iprot.readStructBegin()
5543
    while True:
5544
      (fname, ftype, fid) = iprot.readFieldBegin()
5545
      if ftype == TType.STOP:
5546
        break
5547
      if fid == 0:
483 rajveer 5548
        if ftype == TType.LIST:
5549
          self.success = []
3064 chandransh 5550
          (_etype80, _size77) = iprot.readListBegin()
5551
          for _i81 in xrange(_size77):
5552
            _elem82 = LineItem()
5553
            _elem82.read(iprot)
5554
            self.success.append(_elem82)
483 rajveer 5555
          iprot.readListEnd()
94 ashish 5556
        else:
5557
          iprot.skip(ftype)
5558
      elif fid == 1:
5559
        if ftype == TType.STRUCT:
5560
          self.ex = TransactionServiceException()
5561
          self.ex.read(iprot)
5562
        else:
5563
          iprot.skip(ftype)
5564
      else:
5565
        iprot.skip(ftype)
5566
      iprot.readFieldEnd()
5567
    iprot.readStructEnd()
5568
 
5569
  def write(self, oprot):
5570
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
5571
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
5572
      return
3064 chandransh 5573
    oprot.writeStructBegin('getLineItemsForOrder_result')
94 ashish 5574
    if self.success != None:
483 rajveer 5575
      oprot.writeFieldBegin('success', TType.LIST, 0)
5576
      oprot.writeListBegin(TType.STRUCT, len(self.success))
3064 chandransh 5577
      for iter83 in self.success:
5578
        iter83.write(oprot)
483 rajveer 5579
      oprot.writeListEnd()
94 ashish 5580
      oprot.writeFieldEnd()
5581
    if self.ex != None:
5582
      oprot.writeFieldBegin('ex', TType.STRUCT, 1)
5583
      self.ex.write(oprot)
5584
      oprot.writeFieldEnd()
5585
    oprot.writeFieldStop()
5586
    oprot.writeStructEnd()
5587
 
5588
  def __repr__(self):
5589
    L = ['%s=%r' % (key, value)
5590
      for key, value in self.__dict__.iteritems()]
5591
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
5592
 
5593
  def __eq__(self, other):
5594
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
5595
 
5596
  def __ne__(self, other):
5597
    return not (self == other)
5598
 
3064 chandransh 5599
class getOrderForCustomer_args:
94 ashish 5600
  """
5601
  Attributes:
3064 chandransh 5602
   - orderId
483 rajveer 5603
   - customerId
94 ashish 5604
  """
5605
 
5606
  thrift_spec = (
5607
    None, # 0
3064 chandransh 5608
    (1, TType.I64, 'orderId', None, None, ), # 1
5609
    (2, TType.I64, 'customerId', None, None, ), # 2
94 ashish 5610
  )
5611
 
3064 chandransh 5612
  def __init__(self, orderId=None, customerId=None,):
5613
    self.orderId = orderId
483 rajveer 5614
    self.customerId = customerId
94 ashish 5615
 
5616
  def read(self, iprot):
5617
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
5618
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
5619
      return
5620
    iprot.readStructBegin()
5621
    while True:
5622
      (fname, ftype, fid) = iprot.readFieldBegin()
5623
      if ftype == TType.STOP:
5624
        break
5625
      if fid == 1:
5626
        if ftype == TType.I64:
3064 chandransh 5627
          self.orderId = iprot.readI64();
94 ashish 5628
        else:
5629
          iprot.skip(ftype)
5630
      elif fid == 2:
5631
        if ftype == TType.I64:
3064 chandransh 5632
          self.customerId = iprot.readI64();
94 ashish 5633
        else:
5634
          iprot.skip(ftype)
5635
      else:
5636
        iprot.skip(ftype)
5637
      iprot.readFieldEnd()
5638
    iprot.readStructEnd()
5639
 
5640
  def write(self, oprot):
5641
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
5642
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
5643
      return
3064 chandransh 5644
    oprot.writeStructBegin('getOrderForCustomer_args')
5645
    if self.orderId != None:
5646
      oprot.writeFieldBegin('orderId', TType.I64, 1)
5647
      oprot.writeI64(self.orderId)
5648
      oprot.writeFieldEnd()
483 rajveer 5649
    if self.customerId != None:
3064 chandransh 5650
      oprot.writeFieldBegin('customerId', TType.I64, 2)
483 rajveer 5651
      oprot.writeI64(self.customerId)
94 ashish 5652
      oprot.writeFieldEnd()
5653
    oprot.writeFieldStop()
5654
    oprot.writeStructEnd()
5655
 
5656
  def __repr__(self):
5657
    L = ['%s=%r' % (key, value)
5658
      for key, value in self.__dict__.iteritems()]
5659
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
5660
 
5661
  def __eq__(self, other):
5662
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
5663
 
5664
  def __ne__(self, other):
5665
    return not (self == other)
5666
 
3064 chandransh 5667
class getOrderForCustomer_result:
94 ashish 5668
  """
5669
  Attributes:
5670
   - success
5671
   - ex
5672
  """
5673
 
5674
  thrift_spec = (
3064 chandransh 5675
    (0, TType.STRUCT, 'success', (Order, Order.thrift_spec), None, ), # 0
94 ashish 5676
    (1, TType.STRUCT, 'ex', (TransactionServiceException, TransactionServiceException.thrift_spec), None, ), # 1
5677
  )
5678
 
5679
  def __init__(self, success=None, ex=None,):
5680
    self.success = success
5681
    self.ex = ex
5682
 
5683
  def read(self, iprot):
5684
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
5685
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
5686
      return
5687
    iprot.readStructBegin()
5688
    while True:
5689
      (fname, ftype, fid) = iprot.readFieldBegin()
5690
      if ftype == TType.STOP:
5691
        break
5692
      if fid == 0:
3064 chandransh 5693
        if ftype == TType.STRUCT:
5694
          self.success = Order()
5695
          self.success.read(iprot)
94 ashish 5696
        else:
5697
          iprot.skip(ftype)
5698
      elif fid == 1:
5699
        if ftype == TType.STRUCT:
5700
          self.ex = TransactionServiceException()
5701
          self.ex.read(iprot)
5702
        else:
5703
          iprot.skip(ftype)
5704
      else:
5705
        iprot.skip(ftype)
5706
      iprot.readFieldEnd()
5707
    iprot.readStructEnd()
5708
 
5709
  def write(self, oprot):
5710
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
5711
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
5712
      return
3064 chandransh 5713
    oprot.writeStructBegin('getOrderForCustomer_result')
94 ashish 5714
    if self.success != None:
3064 chandransh 5715
      oprot.writeFieldBegin('success', TType.STRUCT, 0)
5716
      self.success.write(oprot)
94 ashish 5717
      oprot.writeFieldEnd()
5718
    if self.ex != None:
5719
      oprot.writeFieldBegin('ex', TType.STRUCT, 1)
5720
      self.ex.write(oprot)
5721
      oprot.writeFieldEnd()
5722
    oprot.writeFieldStop()
5723
    oprot.writeStructEnd()
5724
 
5725
  def __repr__(self):
5726
    L = ['%s=%r' % (key, value)
5727
      for key, value in self.__dict__.iteritems()]
5728
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
5729
 
5730
  def __eq__(self, other):
5731
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
5732
 
5733
  def __ne__(self, other):
5734
    return not (self == other)
5735
 
3064 chandransh 5736
class getAlerts_args:
94 ashish 5737
  """
5738
  Attributes:
3064 chandransh 5739
   - orderId
5740
   - valid
94 ashish 5741
  """
5742
 
5743
  thrift_spec = (
5744
    None, # 0
3064 chandransh 5745
    (1, TType.I64, 'orderId', None, None, ), # 1
5746
    (2, TType.BOOL, 'valid', None, None, ), # 2
94 ashish 5747
  )
5748
 
3064 chandransh 5749
  def __init__(self, orderId=None, valid=None,):
5750
    self.orderId = orderId
5751
    self.valid = valid
94 ashish 5752
 
5753
  def read(self, iprot):
5754
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
5755
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
5756
      return
5757
    iprot.readStructBegin()
5758
    while True:
5759
      (fname, ftype, fid) = iprot.readFieldBegin()
5760
      if ftype == TType.STOP:
5761
        break
5762
      if fid == 1:
3064 chandransh 5763
        if ftype == TType.I64:
5764
          self.orderId = iprot.readI64();
94 ashish 5765
        else:
5766
          iprot.skip(ftype)
3064 chandransh 5767
      elif fid == 2:
5768
        if ftype == TType.BOOL:
5769
          self.valid = iprot.readBool();
5770
        else:
5771
          iprot.skip(ftype)
94 ashish 5772
      else:
5773
        iprot.skip(ftype)
5774
      iprot.readFieldEnd()
5775
    iprot.readStructEnd()
5776
 
5777
  def write(self, oprot):
5778
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
5779
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
5780
      return
3064 chandransh 5781
    oprot.writeStructBegin('getAlerts_args')
5782
    if self.orderId != None:
5783
      oprot.writeFieldBegin('orderId', TType.I64, 1)
5784
      oprot.writeI64(self.orderId)
94 ashish 5785
      oprot.writeFieldEnd()
3064 chandransh 5786
    if self.valid != None:
5787
      oprot.writeFieldBegin('valid', TType.BOOL, 2)
5788
      oprot.writeBool(self.valid)
5789
      oprot.writeFieldEnd()
94 ashish 5790
    oprot.writeFieldStop()
5791
    oprot.writeStructEnd()
5792
 
5793
  def __repr__(self):
5794
    L = ['%s=%r' % (key, value)
5795
      for key, value in self.__dict__.iteritems()]
5796
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
5797
 
5798
  def __eq__(self, other):
5799
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
5800
 
5801
  def __ne__(self, other):
5802
    return not (self == other)
5803
 
3064 chandransh 5804
class getAlerts_result:
94 ashish 5805
  """
5806
  Attributes:
5807
   - success
5808
  """
5809
 
5810
  thrift_spec = (
3064 chandransh 5811
    (0, TType.LIST, 'success', (TType.STRUCT,(Alert, Alert.thrift_spec)), None, ), # 0
94 ashish 5812
  )
5813
 
3064 chandransh 5814
  def __init__(self, success=None,):
94 ashish 5815
    self.success = success
5816
 
5817
  def read(self, iprot):
5818
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
5819
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
5820
      return
5821
    iprot.readStructBegin()
5822
    while True:
5823
      (fname, ftype, fid) = iprot.readFieldBegin()
5824
      if ftype == TType.STOP:
5825
        break
5826
      if fid == 0:
3064 chandransh 5827
        if ftype == TType.LIST:
5828
          self.success = []
5829
          (_etype87, _size84) = iprot.readListBegin()
5830
          for _i88 in xrange(_size84):
5831
            _elem89 = Alert()
5832
            _elem89.read(iprot)
5833
            self.success.append(_elem89)
5834
          iprot.readListEnd()
94 ashish 5835
        else:
5836
          iprot.skip(ftype)
5837
      else:
5838
        iprot.skip(ftype)
5839
      iprot.readFieldEnd()
5840
    iprot.readStructEnd()
5841
 
5842
  def write(self, oprot):
5843
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
5844
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
5845
      return
3064 chandransh 5846
    oprot.writeStructBegin('getAlerts_result')
94 ashish 5847
    if self.success != None:
3064 chandransh 5848
      oprot.writeFieldBegin('success', TType.LIST, 0)
5849
      oprot.writeListBegin(TType.STRUCT, len(self.success))
5850
      for iter90 in self.success:
5851
        iter90.write(oprot)
5852
      oprot.writeListEnd()
94 ashish 5853
      oprot.writeFieldEnd()
5854
    oprot.writeFieldStop()
5855
    oprot.writeStructEnd()
5856
 
5857
  def __repr__(self):
5858
    L = ['%s=%r' % (key, value)
5859
      for key, value in self.__dict__.iteritems()]
5860
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
5861
 
5862
  def __eq__(self, other):
5863
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
5864
 
5865
  def __ne__(self, other):
5866
    return not (self == other)
5867
 
3064 chandransh 5868
class setAlert_args:
94 ashish 5869
  """
5870
  Attributes:
3064 chandransh 5871
   - orderId
5872
   - unset
5873
   - type
5874
   - comment
94 ashish 5875
  """
5876
 
5877
  thrift_spec = (
5878
    None, # 0
3064 chandransh 5879
    (1, TType.I64, 'orderId', None, None, ), # 1
5880
    (2, TType.BOOL, 'unset', None, None, ), # 2
5881
    (3, TType.I64, 'type', None, None, ), # 3
5882
    (4, TType.STRING, 'comment', None, None, ), # 4
94 ashish 5883
  )
5884
 
3064 chandransh 5885
  def __init__(self, orderId=None, unset=None, type=None, comment=None,):
5886
    self.orderId = orderId
5887
    self.unset = unset
5888
    self.type = type
5889
    self.comment = comment
94 ashish 5890
 
5891
  def read(self, iprot):
5892
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
5893
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
5894
      return
5895
    iprot.readStructBegin()
5896
    while True:
5897
      (fname, ftype, fid) = iprot.readFieldBegin()
5898
      if ftype == TType.STOP:
5899
        break
5900
      if fid == 1:
5901
        if ftype == TType.I64:
3064 chandransh 5902
          self.orderId = iprot.readI64();
94 ashish 5903
        else:
5904
          iprot.skip(ftype)
3064 chandransh 5905
      elif fid == 2:
5906
        if ftype == TType.BOOL:
5907
          self.unset = iprot.readBool();
5908
        else:
5909
          iprot.skip(ftype)
5910
      elif fid == 3:
5911
        if ftype == TType.I64:
5912
          self.type = iprot.readI64();
5913
        else:
5914
          iprot.skip(ftype)
5915
      elif fid == 4:
5916
        if ftype == TType.STRING:
5917
          self.comment = iprot.readString();
5918
        else:
5919
          iprot.skip(ftype)
94 ashish 5920
      else:
5921
        iprot.skip(ftype)
5922
      iprot.readFieldEnd()
5923
    iprot.readStructEnd()
5924
 
5925
  def write(self, oprot):
5926
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
5927
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
5928
      return
3064 chandransh 5929
    oprot.writeStructBegin('setAlert_args')
5930
    if self.orderId != None:
5931
      oprot.writeFieldBegin('orderId', TType.I64, 1)
5932
      oprot.writeI64(self.orderId)
94 ashish 5933
      oprot.writeFieldEnd()
3064 chandransh 5934
    if self.unset != None:
5935
      oprot.writeFieldBegin('unset', TType.BOOL, 2)
5936
      oprot.writeBool(self.unset)
5937
      oprot.writeFieldEnd()
5938
    if self.type != None:
5939
      oprot.writeFieldBegin('type', TType.I64, 3)
5940
      oprot.writeI64(self.type)
5941
      oprot.writeFieldEnd()
5942
    if self.comment != None:
5943
      oprot.writeFieldBegin('comment', TType.STRING, 4)
5944
      oprot.writeString(self.comment)
5945
      oprot.writeFieldEnd()
94 ashish 5946
    oprot.writeFieldStop()
5947
    oprot.writeStructEnd()
5948
 
5949
  def __repr__(self):
5950
    L = ['%s=%r' % (key, value)
5951
      for key, value in self.__dict__.iteritems()]
5952
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
5953
 
5954
  def __eq__(self, other):
5955
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
5956
 
5957
  def __ne__(self, other):
5958
    return not (self == other)
5959
 
3064 chandransh 5960
class setAlert_result:
5961
 
5962
  thrift_spec = (
5963
  )
5964
 
5965
  def read(self, iprot):
5966
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
5967
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
5968
      return
5969
    iprot.readStructBegin()
5970
    while True:
5971
      (fname, ftype, fid) = iprot.readFieldBegin()
5972
      if ftype == TType.STOP:
5973
        break
5974
      else:
5975
        iprot.skip(ftype)
5976
      iprot.readFieldEnd()
5977
    iprot.readStructEnd()
5978
 
5979
  def write(self, oprot):
5980
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
5981
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
5982
      return
5983
    oprot.writeStructBegin('setAlert_result')
5984
    oprot.writeFieldStop()
5985
    oprot.writeStructEnd()
5986
 
5987
  def __repr__(self):
5988
    L = ['%s=%r' % (key, value)
5989
      for key, value in self.__dict__.iteritems()]
5990
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
5991
 
5992
  def __eq__(self, other):
5993
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
5994
 
5995
  def __ne__(self, other):
5996
    return not (self == other)
5997
 
5998
class getValidOrderCount_args:
5999
 
6000
  thrift_spec = (
6001
  )
6002
 
6003
  def read(self, iprot):
6004
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
6005
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
6006
      return
6007
    iprot.readStructBegin()
6008
    while True:
6009
      (fname, ftype, fid) = iprot.readFieldBegin()
6010
      if ftype == TType.STOP:
6011
        break
6012
      else:
6013
        iprot.skip(ftype)
6014
      iprot.readFieldEnd()
6015
    iprot.readStructEnd()
6016
 
6017
  def write(self, oprot):
6018
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
6019
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
6020
      return
6021
    oprot.writeStructBegin('getValidOrderCount_args')
6022
    oprot.writeFieldStop()
6023
    oprot.writeStructEnd()
6024
 
6025
  def __repr__(self):
6026
    L = ['%s=%r' % (key, value)
6027
      for key, value in self.__dict__.iteritems()]
6028
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
6029
 
6030
  def __eq__(self, other):
6031
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
6032
 
6033
  def __ne__(self, other):
6034
    return not (self == other)
6035
 
6036
class getValidOrderCount_result:
94 ashish 6037
  """
6038
  Attributes:
6039
   - success
6040
  """
6041
 
6042
  thrift_spec = (
3064 chandransh 6043
    (0, TType.I64, 'success', None, None, ), # 0
94 ashish 6044
  )
6045
 
3064 chandransh 6046
  def __init__(self, success=None,):
94 ashish 6047
    self.success = success
6048
 
6049
  def read(self, iprot):
6050
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
6051
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
6052
      return
6053
    iprot.readStructBegin()
6054
    while True:
6055
      (fname, ftype, fid) = iprot.readFieldBegin()
6056
      if ftype == TType.STOP:
6057
        break
6058
      if fid == 0:
3064 chandransh 6059
        if ftype == TType.I64:
6060
          self.success = iprot.readI64();
94 ashish 6061
        else:
6062
          iprot.skip(ftype)
6063
      else:
6064
        iprot.skip(ftype)
6065
      iprot.readFieldEnd()
6066
    iprot.readStructEnd()
6067
 
6068
  def write(self, oprot):
6069
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
6070
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
6071
      return
3064 chandransh 6072
    oprot.writeStructBegin('getValidOrderCount_result')
94 ashish 6073
    if self.success != None:
3064 chandransh 6074
      oprot.writeFieldBegin('success', TType.I64, 0)
6075
      oprot.writeI64(self.success)
94 ashish 6076
      oprot.writeFieldEnd()
6077
    oprot.writeFieldStop()
6078
    oprot.writeStructEnd()
6079
 
6080
  def __repr__(self):
6081
    L = ['%s=%r' % (key, value)
6082
      for key, value in self.__dict__.iteritems()]
6083
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
6084
 
6085
  def __eq__(self, other):
6086
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
6087
 
6088
  def __ne__(self, other):
6089
    return not (self == other)
6090
 
3064 chandransh 6091
class getNoOfCustomersWithSuccessfulTransaction_args:
6092
 
6093
  thrift_spec = (
6094
  )
6095
 
6096
  def read(self, iprot):
6097
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
6098
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
6099
      return
6100
    iprot.readStructBegin()
6101
    while True:
6102
      (fname, ftype, fid) = iprot.readFieldBegin()
6103
      if ftype == TType.STOP:
6104
        break
6105
      else:
6106
        iprot.skip(ftype)
6107
      iprot.readFieldEnd()
6108
    iprot.readStructEnd()
6109
 
6110
  def write(self, oprot):
6111
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
6112
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
6113
      return
6114
    oprot.writeStructBegin('getNoOfCustomersWithSuccessfulTransaction_args')
6115
    oprot.writeFieldStop()
6116
    oprot.writeStructEnd()
6117
 
6118
  def __repr__(self):
6119
    L = ['%s=%r' % (key, value)
6120
      for key, value in self.__dict__.iteritems()]
6121
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
6122
 
6123
  def __eq__(self, other):
6124
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
6125
 
6126
  def __ne__(self, other):
6127
    return not (self == other)
6128
 
6129
class getNoOfCustomersWithSuccessfulTransaction_result:
94 ashish 6130
  """
6131
  Attributes:
3064 chandransh 6132
   - success
94 ashish 6133
  """
6134
 
6135
  thrift_spec = (
3064 chandransh 6136
    (0, TType.I64, 'success', None, None, ), # 0
94 ashish 6137
  )
6138
 
3064 chandransh 6139
  def __init__(self, success=None,):
6140
    self.success = success
94 ashish 6141
 
6142
  def read(self, iprot):
6143
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
6144
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
6145
      return
6146
    iprot.readStructBegin()
6147
    while True:
6148
      (fname, ftype, fid) = iprot.readFieldBegin()
6149
      if ftype == TType.STOP:
6150
        break
3064 chandransh 6151
      if fid == 0:
94 ashish 6152
        if ftype == TType.I64:
3064 chandransh 6153
          self.success = iprot.readI64();
94 ashish 6154
        else:
6155
          iprot.skip(ftype)
6156
      else:
6157
        iprot.skip(ftype)
6158
      iprot.readFieldEnd()
6159
    iprot.readStructEnd()
6160
 
6161
  def write(self, oprot):
6162
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
6163
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
6164
      return
3064 chandransh 6165
    oprot.writeStructBegin('getNoOfCustomersWithSuccessfulTransaction_result')
6166
    if self.success != None:
6167
      oprot.writeFieldBegin('success', TType.I64, 0)
6168
      oprot.writeI64(self.success)
94 ashish 6169
      oprot.writeFieldEnd()
6170
    oprot.writeFieldStop()
6171
    oprot.writeStructEnd()
6172
 
6173
  def __repr__(self):
6174
    L = ['%s=%r' % (key, value)
6175
      for key, value in self.__dict__.iteritems()]
6176
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
6177
 
6178
  def __eq__(self, other):
6179
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
6180
 
6181
  def __ne__(self, other):
6182
    return not (self == other)
6183
 
3064 chandransh 6184
class getValidOrdersAmountRange_args:
6185
 
6186
  thrift_spec = (
6187
  )
6188
 
6189
  def read(self, iprot):
6190
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
6191
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
6192
      return
6193
    iprot.readStructBegin()
6194
    while True:
6195
      (fname, ftype, fid) = iprot.readFieldBegin()
6196
      if ftype == TType.STOP:
6197
        break
6198
      else:
6199
        iprot.skip(ftype)
6200
      iprot.readFieldEnd()
6201
    iprot.readStructEnd()
6202
 
6203
  def write(self, oprot):
6204
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
6205
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
6206
      return
6207
    oprot.writeStructBegin('getValidOrdersAmountRange_args')
6208
    oprot.writeFieldStop()
6209
    oprot.writeStructEnd()
6210
 
6211
  def __repr__(self):
6212
    L = ['%s=%r' % (key, value)
6213
      for key, value in self.__dict__.iteritems()]
6214
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
6215
 
6216
  def __eq__(self, other):
6217
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
6218
 
6219
  def __ne__(self, other):
6220
    return not (self == other)
6221
 
6222
class getValidOrdersAmountRange_result:
94 ashish 6223
  """
6224
  Attributes:
6225
   - success
6226
  """
6227
 
6228
  thrift_spec = (
3064 chandransh 6229
    (0, TType.LIST, 'success', (TType.DOUBLE,None), None, ), # 0
94 ashish 6230
  )
6231
 
3064 chandransh 6232
  def __init__(self, success=None,):
94 ashish 6233
    self.success = success
6234
 
6235
  def read(self, iprot):
6236
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
6237
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
6238
      return
6239
    iprot.readStructBegin()
6240
    while True:
6241
      (fname, ftype, fid) = iprot.readFieldBegin()
6242
      if ftype == TType.STOP:
6243
        break
6244
      if fid == 0:
483 rajveer 6245
        if ftype == TType.LIST:
6246
          self.success = []
3064 chandransh 6247
          (_etype94, _size91) = iprot.readListBegin()
6248
          for _i95 in xrange(_size91):
6249
            _elem96 = iprot.readDouble();
6250
            self.success.append(_elem96)
483 rajveer 6251
          iprot.readListEnd()
94 ashish 6252
        else:
6253
          iprot.skip(ftype)
6254
      else:
6255
        iprot.skip(ftype)
6256
      iprot.readFieldEnd()
6257
    iprot.readStructEnd()
6258
 
6259
  def write(self, oprot):
6260
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
6261
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
6262
      return
3064 chandransh 6263
    oprot.writeStructBegin('getValidOrdersAmountRange_result')
94 ashish 6264
    if self.success != None:
483 rajveer 6265
      oprot.writeFieldBegin('success', TType.LIST, 0)
3064 chandransh 6266
      oprot.writeListBegin(TType.DOUBLE, len(self.success))
6267
      for iter97 in self.success:
6268
        oprot.writeDouble(iter97)
483 rajveer 6269
      oprot.writeListEnd()
94 ashish 6270
      oprot.writeFieldEnd()
6271
    oprot.writeFieldStop()
6272
    oprot.writeStructEnd()
6273
 
6274
  def __repr__(self):
6275
    L = ['%s=%r' % (key, value)
6276
      for key, value in self.__dict__.iteritems()]
6277
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
6278
 
6279
  def __eq__(self, other):
6280
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
6281
 
6282
  def __ne__(self, other):
6283
    return not (self == other)
6284
 
3064 chandransh 6285
class getValidOrders_args:
1528 ankur.sing 6286
  """
6287
  Attributes:
3064 chandransh 6288
   - limit
1528 ankur.sing 6289
  """
6290
 
6291
  thrift_spec = (
6292
    None, # 0
3064 chandransh 6293
    (1, TType.I64, 'limit', None, None, ), # 1
1528 ankur.sing 6294
  )
6295
 
3064 chandransh 6296
  def __init__(self, limit=None,):
6297
    self.limit = limit
1528 ankur.sing 6298
 
6299
  def read(self, iprot):
6300
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
6301
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
6302
      return
6303
    iprot.readStructBegin()
6304
    while True:
6305
      (fname, ftype, fid) = iprot.readFieldBegin()
6306
      if ftype == TType.STOP:
6307
        break
6308
      if fid == 1:
6309
        if ftype == TType.I64:
3064 chandransh 6310
          self.limit = iprot.readI64();
1528 ankur.sing 6311
        else:
6312
          iprot.skip(ftype)
6313
      else:
6314
        iprot.skip(ftype)
6315
      iprot.readFieldEnd()
6316
    iprot.readStructEnd()
6317
 
6318
  def write(self, oprot):
6319
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
6320
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
6321
      return
3064 chandransh 6322
    oprot.writeStructBegin('getValidOrders_args')
6323
    if self.limit != None:
6324
      oprot.writeFieldBegin('limit', TType.I64, 1)
6325
      oprot.writeI64(self.limit)
1528 ankur.sing 6326
      oprot.writeFieldEnd()
6327
    oprot.writeFieldStop()
6328
    oprot.writeStructEnd()
6329
 
6330
  def __repr__(self):
6331
    L = ['%s=%r' % (key, value)
6332
      for key, value in self.__dict__.iteritems()]
6333
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
6334
 
6335
  def __eq__(self, other):
6336
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
6337
 
6338
  def __ne__(self, other):
6339
    return not (self == other)
6340
 
3064 chandransh 6341
class getValidOrders_result:
1528 ankur.sing 6342
  """
6343
  Attributes:
6344
   - success
6345
  """
6346
 
6347
  thrift_spec = (
3064 chandransh 6348
    (0, TType.LIST, 'success', (TType.STRUCT,(Order, Order.thrift_spec)), None, ), # 0
1528 ankur.sing 6349
  )
6350
 
3064 chandransh 6351
  def __init__(self, success=None,):
1528 ankur.sing 6352
    self.success = success
6353
 
6354
  def read(self, iprot):
6355
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
6356
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
6357
      return
6358
    iprot.readStructBegin()
6359
    while True:
6360
      (fname, ftype, fid) = iprot.readFieldBegin()
6361
      if ftype == TType.STOP:
6362
        break
6363
      if fid == 0:
3064 chandransh 6364
        if ftype == TType.LIST:
6365
          self.success = []
6366
          (_etype101, _size98) = iprot.readListBegin()
6367
          for _i102 in xrange(_size98):
6368
            _elem103 = Order()
6369
            _elem103.read(iprot)
6370
            self.success.append(_elem103)
6371
          iprot.readListEnd()
1528 ankur.sing 6372
        else:
6373
          iprot.skip(ftype)
6374
      else:
6375
        iprot.skip(ftype)
6376
      iprot.readFieldEnd()
6377
    iprot.readStructEnd()
6378
 
6379
  def write(self, oprot):
6380
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
6381
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
6382
      return
3064 chandransh 6383
    oprot.writeStructBegin('getValidOrders_result')
1528 ankur.sing 6384
    if self.success != None:
3064 chandransh 6385
      oprot.writeFieldBegin('success', TType.LIST, 0)
6386
      oprot.writeListBegin(TType.STRUCT, len(self.success))
6387
      for iter104 in self.success:
6388
        iter104.write(oprot)
6389
      oprot.writeListEnd()
1528 ankur.sing 6390
      oprot.writeFieldEnd()
6391
    oprot.writeFieldStop()
6392
    oprot.writeStructEnd()
6393
 
6394
  def __repr__(self):
6395
    L = ['%s=%r' % (key, value)
6396
      for key, value in self.__dict__.iteritems()]
6397
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
6398
 
6399
  def __eq__(self, other):
6400
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
6401
 
6402
  def __ne__(self, other):
6403
    return not (self == other)
6404
 
1220 chandransh 6405
class batchOrders_args:
6406
  """
6407
  Attributes:
6408
   - warehouseId
6409
  """
6410
 
6411
  thrift_spec = (
6412
    None, # 0
6413
    (1, TType.I64, 'warehouseId', None, None, ), # 1
6414
  )
6415
 
6416
  def __init__(self, warehouseId=None,):
6417
    self.warehouseId = warehouseId
6418
 
6419
  def read(self, iprot):
6420
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
6421
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
6422
      return
6423
    iprot.readStructBegin()
6424
    while True:
6425
      (fname, ftype, fid) = iprot.readFieldBegin()
6426
      if ftype == TType.STOP:
6427
        break
6428
      if fid == 1:
6429
        if ftype == TType.I64:
6430
          self.warehouseId = iprot.readI64();
6431
        else:
6432
          iprot.skip(ftype)
6433
      else:
6434
        iprot.skip(ftype)
6435
      iprot.readFieldEnd()
6436
    iprot.readStructEnd()
6437
 
6438
  def write(self, oprot):
6439
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
6440
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
6441
      return
6442
    oprot.writeStructBegin('batchOrders_args')
6443
    if self.warehouseId != None:
6444
      oprot.writeFieldBegin('warehouseId', TType.I64, 1)
6445
      oprot.writeI64(self.warehouseId)
6446
      oprot.writeFieldEnd()
6447
    oprot.writeFieldStop()
6448
    oprot.writeStructEnd()
6449
 
6450
  def __repr__(self):
6451
    L = ['%s=%r' % (key, value)
6452
      for key, value in self.__dict__.iteritems()]
6453
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
6454
 
6455
  def __eq__(self, other):
6456
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
6457
 
6458
  def __ne__(self, other):
6459
    return not (self == other)
6460
 
6461
class batchOrders_result:
6462
  """
6463
  Attributes:
6464
   - success
6465
   - ex
6466
  """
6467
 
6468
  thrift_spec = (
6469
    (0, TType.LIST, 'success', (TType.STRUCT,(Order, Order.thrift_spec)), None, ), # 0
6470
    (1, TType.STRUCT, 'ex', (TransactionServiceException, TransactionServiceException.thrift_spec), None, ), # 1
6471
  )
6472
 
6473
  def __init__(self, success=None, ex=None,):
6474
    self.success = success
6475
    self.ex = ex
6476
 
6477
  def read(self, iprot):
6478
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
6479
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
6480
      return
6481
    iprot.readStructBegin()
6482
    while True:
6483
      (fname, ftype, fid) = iprot.readFieldBegin()
6484
      if ftype == TType.STOP:
6485
        break
6486
      if fid == 0:
6487
        if ftype == TType.LIST:
6488
          self.success = []
3064 chandransh 6489
          (_etype108, _size105) = iprot.readListBegin()
6490
          for _i109 in xrange(_size105):
6491
            _elem110 = Order()
6492
            _elem110.read(iprot)
6493
            self.success.append(_elem110)
1220 chandransh 6494
          iprot.readListEnd()
6495
        else:
6496
          iprot.skip(ftype)
6497
      elif fid == 1:
6498
        if ftype == TType.STRUCT:
6499
          self.ex = TransactionServiceException()
6500
          self.ex.read(iprot)
6501
        else:
6502
          iprot.skip(ftype)
6503
      else:
6504
        iprot.skip(ftype)
6505
      iprot.readFieldEnd()
6506
    iprot.readStructEnd()
6507
 
6508
  def write(self, oprot):
6509
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
6510
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
6511
      return
6512
    oprot.writeStructBegin('batchOrders_result')
6513
    if self.success != None:
6514
      oprot.writeFieldBegin('success', TType.LIST, 0)
6515
      oprot.writeListBegin(TType.STRUCT, len(self.success))
3064 chandransh 6516
      for iter111 in self.success:
6517
        iter111.write(oprot)
1220 chandransh 6518
      oprot.writeListEnd()
6519
      oprot.writeFieldEnd()
6520
    if self.ex != None:
6521
      oprot.writeFieldBegin('ex', TType.STRUCT, 1)
6522
      self.ex.write(oprot)
6523
      oprot.writeFieldEnd()
6524
    oprot.writeFieldStop()
6525
    oprot.writeStructEnd()
6526
 
6527
  def __repr__(self):
6528
    L = ['%s=%r' % (key, value)
6529
      for key, value in self.__dict__.iteritems()]
6530
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
6531
 
6532
  def __eq__(self, other):
6533
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
6534
 
6535
  def __ne__(self, other):
6536
    return not (self == other)
6537
 
1208 chandransh 6538
class markOrderAsOutOfStock_args:
6539
  """
6540
  Attributes:
6541
   - orderId
6542
  """
6543
 
6544
  thrift_spec = (
6545
    None, # 0
6546
    (1, TType.I64, 'orderId', None, None, ), # 1
6547
  )
6548
 
6549
  def __init__(self, orderId=None,):
6550
    self.orderId = orderId
6551
 
6552
  def read(self, iprot):
6553
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
6554
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
6555
      return
6556
    iprot.readStructBegin()
6557
    while True:
6558
      (fname, ftype, fid) = iprot.readFieldBegin()
6559
      if ftype == TType.STOP:
6560
        break
6561
      if fid == 1:
6562
        if ftype == TType.I64:
6563
          self.orderId = iprot.readI64();
6564
        else:
6565
          iprot.skip(ftype)
6566
      else:
6567
        iprot.skip(ftype)
6568
      iprot.readFieldEnd()
6569
    iprot.readStructEnd()
6570
 
6571
  def write(self, oprot):
6572
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
6573
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
6574
      return
6575
    oprot.writeStructBegin('markOrderAsOutOfStock_args')
6576
    if self.orderId != None:
6577
      oprot.writeFieldBegin('orderId', TType.I64, 1)
6578
      oprot.writeI64(self.orderId)
6579
      oprot.writeFieldEnd()
6580
    oprot.writeFieldStop()
6581
    oprot.writeStructEnd()
6582
 
6583
  def __repr__(self):
6584
    L = ['%s=%r' % (key, value)
6585
      for key, value in self.__dict__.iteritems()]
6586
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
6587
 
6588
  def __eq__(self, other):
6589
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
6590
 
6591
  def __ne__(self, other):
6592
    return not (self == other)
6593
 
6594
class markOrderAsOutOfStock_result:
6595
  """
6596
  Attributes:
6597
   - success
6598
   - ex
6599
  """
6600
 
6601
  thrift_spec = (
6602
    (0, TType.BOOL, 'success', None, None, ), # 0
6603
    (1, TType.STRUCT, 'ex', (TransactionServiceException, TransactionServiceException.thrift_spec), None, ), # 1
6604
  )
6605
 
6606
  def __init__(self, success=None, ex=None,):
6607
    self.success = success
6608
    self.ex = ex
6609
 
6610
  def read(self, iprot):
6611
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
6612
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
6613
      return
6614
    iprot.readStructBegin()
6615
    while True:
6616
      (fname, ftype, fid) = iprot.readFieldBegin()
6617
      if ftype == TType.STOP:
6618
        break
6619
      if fid == 0:
6620
        if ftype == TType.BOOL:
6621
          self.success = iprot.readBool();
6622
        else:
6623
          iprot.skip(ftype)
6624
      elif fid == 1:
6625
        if ftype == TType.STRUCT:
6626
          self.ex = TransactionServiceException()
6627
          self.ex.read(iprot)
6628
        else:
6629
          iprot.skip(ftype)
6630
      else:
6631
        iprot.skip(ftype)
6632
      iprot.readFieldEnd()
6633
    iprot.readStructEnd()
6634
 
6635
  def write(self, oprot):
6636
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
6637
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
6638
      return
6639
    oprot.writeStructBegin('markOrderAsOutOfStock_result')
6640
    if self.success != None:
6641
      oprot.writeFieldBegin('success', TType.BOOL, 0)
6642
      oprot.writeBool(self.success)
6643
      oprot.writeFieldEnd()
6644
    if self.ex != None:
6645
      oprot.writeFieldBegin('ex', TType.STRUCT, 1)
6646
      self.ex.write(oprot)
6647
      oprot.writeFieldEnd()
6648
    oprot.writeFieldStop()
6649
    oprot.writeStructEnd()
6650
 
6651
  def __repr__(self):
6652
    L = ['%s=%r' % (key, value)
6653
      for key, value in self.__dict__.iteritems()]
6654
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
6655
 
6656
  def __eq__(self, other):
6657
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
6658
 
6659
  def __ne__(self, other):
6660
    return not (self == other)
6661
 
3064 chandransh 6662
class verifyOrder_args:
759 chandransh 6663
  """
6664
  Attributes:
3064 chandransh 6665
   - orderId
759 chandransh 6666
  """
6667
 
6668
  thrift_spec = (
6669
    None, # 0
3064 chandransh 6670
    (1, TType.I64, 'orderId', None, None, ), # 1
759 chandransh 6671
  )
6672
 
3064 chandransh 6673
  def __init__(self, orderId=None,):
6674
    self.orderId = orderId
759 chandransh 6675
 
6676
  def read(self, iprot):
6677
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
6678
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
6679
      return
6680
    iprot.readStructBegin()
6681
    while True:
6682
      (fname, ftype, fid) = iprot.readFieldBegin()
6683
      if ftype == TType.STOP:
6684
        break
6685
      if fid == 1:
6686
        if ftype == TType.I64:
3064 chandransh 6687
          self.orderId = iprot.readI64();
759 chandransh 6688
        else:
6689
          iprot.skip(ftype)
6690
      else:
6691
        iprot.skip(ftype)
6692
      iprot.readFieldEnd()
6693
    iprot.readStructEnd()
6694
 
6695
  def write(self, oprot):
6696
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
6697
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
6698
      return
3064 chandransh 6699
    oprot.writeStructBegin('verifyOrder_args')
6700
    if self.orderId != None:
6701
      oprot.writeFieldBegin('orderId', TType.I64, 1)
6702
      oprot.writeI64(self.orderId)
759 chandransh 6703
      oprot.writeFieldEnd()
6704
    oprot.writeFieldStop()
6705
    oprot.writeStructEnd()
6706
 
6707
  def __repr__(self):
6708
    L = ['%s=%r' % (key, value)
6709
      for key, value in self.__dict__.iteritems()]
6710
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
6711
 
6712
  def __eq__(self, other):
6713
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
6714
 
6715
  def __ne__(self, other):
6716
    return not (self == other)
6717
 
3064 chandransh 6718
class verifyOrder_result:
759 chandransh 6719
  """
6720
  Attributes:
6721
   - success
6722
   - ex
6723
  """
6724
 
6725
  thrift_spec = (
6726
    (0, TType.BOOL, 'success', None, None, ), # 0
6727
    (1, TType.STRUCT, 'ex', (TransactionServiceException, TransactionServiceException.thrift_spec), None, ), # 1
6728
  )
6729
 
6730
  def __init__(self, success=None, ex=None,):
6731
    self.success = success
6732
    self.ex = ex
6733
 
6734
  def read(self, iprot):
6735
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
6736
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
6737
      return
6738
    iprot.readStructBegin()
6739
    while True:
6740
      (fname, ftype, fid) = iprot.readFieldBegin()
6741
      if ftype == TType.STOP:
6742
        break
6743
      if fid == 0:
6744
        if ftype == TType.BOOL:
6745
          self.success = iprot.readBool();
6746
        else:
6747
          iprot.skip(ftype)
6748
      elif fid == 1:
6749
        if ftype == TType.STRUCT:
6750
          self.ex = TransactionServiceException()
6751
          self.ex.read(iprot)
6752
        else:
6753
          iprot.skip(ftype)
6754
      else:
6755
        iprot.skip(ftype)
6756
      iprot.readFieldEnd()
6757
    iprot.readStructEnd()
6758
 
6759
  def write(self, oprot):
6760
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
6761
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
6762
      return
3064 chandransh 6763
    oprot.writeStructBegin('verifyOrder_result')
759 chandransh 6764
    if self.success != None:
6765
      oprot.writeFieldBegin('success', TType.BOOL, 0)
6766
      oprot.writeBool(self.success)
6767
      oprot.writeFieldEnd()
6768
    if self.ex != None:
6769
      oprot.writeFieldBegin('ex', TType.STRUCT, 1)
6770
      self.ex.write(oprot)
6771
      oprot.writeFieldEnd()
6772
    oprot.writeFieldStop()
6773
    oprot.writeStructEnd()
6774
 
6775
  def __repr__(self):
6776
    L = ['%s=%r' % (key, value)
6777
      for key, value in self.__dict__.iteritems()]
6778
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
6779
 
6780
  def __eq__(self, other):
6781
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
6782
 
6783
  def __ne__(self, other):
6784
    return not (self == other)
6785
 
3064 chandransh 6786
class acceptOrder_args:
1113 chandransh 6787
  """
6788
  Attributes:
3064 chandransh 6789
   - orderId
1113 chandransh 6790
  """
6791
 
6792
  thrift_spec = (
6793
    None, # 0
3064 chandransh 6794
    (1, TType.I64, 'orderId', None, None, ), # 1
1113 chandransh 6795
  )
6796
 
3064 chandransh 6797
  def __init__(self, orderId=None,):
6798
    self.orderId = orderId
1113 chandransh 6799
 
6800
  def read(self, iprot):
6801
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
6802
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
6803
      return
6804
    iprot.readStructBegin()
6805
    while True:
6806
      (fname, ftype, fid) = iprot.readFieldBegin()
6807
      if ftype == TType.STOP:
6808
        break
6809
      if fid == 1:
6810
        if ftype == TType.I64:
3064 chandransh 6811
          self.orderId = iprot.readI64();
1113 chandransh 6812
        else:
6813
          iprot.skip(ftype)
6814
      else:
6815
        iprot.skip(ftype)
6816
      iprot.readFieldEnd()
6817
    iprot.readStructEnd()
6818
 
6819
  def write(self, oprot):
6820
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
6821
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
6822
      return
3064 chandransh 6823
    oprot.writeStructBegin('acceptOrder_args')
6824
    if self.orderId != None:
6825
      oprot.writeFieldBegin('orderId', TType.I64, 1)
6826
      oprot.writeI64(self.orderId)
1113 chandransh 6827
      oprot.writeFieldEnd()
6828
    oprot.writeFieldStop()
6829
    oprot.writeStructEnd()
6830
 
6831
  def __repr__(self):
6832
    L = ['%s=%r' % (key, value)
6833
      for key, value in self.__dict__.iteritems()]
6834
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
6835
 
6836
  def __eq__(self, other):
6837
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
6838
 
6839
  def __ne__(self, other):
6840
    return not (self == other)
6841
 
3064 chandransh 6842
class acceptOrder_result:
1113 chandransh 6843
  """
6844
  Attributes:
6845
   - success
6846
   - ex
6847
  """
6848
 
6849
  thrift_spec = (
3064 chandransh 6850
    (0, TType.BOOL, 'success', None, None, ), # 0
1113 chandransh 6851
    (1, TType.STRUCT, 'ex', (TransactionServiceException, TransactionServiceException.thrift_spec), None, ), # 1
6852
  )
6853
 
6854
  def __init__(self, success=None, ex=None,):
6855
    self.success = success
6856
    self.ex = ex
6857
 
6858
  def read(self, iprot):
6859
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
6860
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
6861
      return
6862
    iprot.readStructBegin()
6863
    while True:
6864
      (fname, ftype, fid) = iprot.readFieldBegin()
6865
      if ftype == TType.STOP:
6866
        break
6867
      if fid == 0:
3064 chandransh 6868
        if ftype == TType.BOOL:
6869
          self.success = iprot.readBool();
1113 chandransh 6870
        else:
6871
          iprot.skip(ftype)
6872
      elif fid == 1:
6873
        if ftype == TType.STRUCT:
6874
          self.ex = TransactionServiceException()
6875
          self.ex.read(iprot)
6876
        else:
6877
          iprot.skip(ftype)
6878
      else:
6879
        iprot.skip(ftype)
6880
      iprot.readFieldEnd()
6881
    iprot.readStructEnd()
6882
 
6883
  def write(self, oprot):
6884
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
6885
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
6886
      return
3064 chandransh 6887
    oprot.writeStructBegin('acceptOrder_result')
1113 chandransh 6888
    if self.success != None:
3064 chandransh 6889
      oprot.writeFieldBegin('success', TType.BOOL, 0)
6890
      oprot.writeBool(self.success)
1113 chandransh 6891
      oprot.writeFieldEnd()
6892
    if self.ex != None:
6893
      oprot.writeFieldBegin('ex', TType.STRUCT, 1)
6894
      self.ex.write(oprot)
6895
      oprot.writeFieldEnd()
6896
    oprot.writeFieldStop()
6897
    oprot.writeStructEnd()
6898
 
6899
  def __repr__(self):
6900
    L = ['%s=%r' % (key, value)
6901
      for key, value in self.__dict__.iteritems()]
6902
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
6903
 
6904
  def __eq__(self, other):
6905
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
6906
 
6907
  def __ne__(self, other):
6908
    return not (self == other)
6909
 
3064 chandransh 6910
class billOrder_args:
1132 chandransh 6911
  """
6912
  Attributes:
3064 chandransh 6913
   - orderId
1132 chandransh 6914
  """
6915
 
6916
  thrift_spec = (
6917
    None, # 0
3064 chandransh 6918
    (1, TType.I64, 'orderId', None, None, ), # 1
1132 chandransh 6919
  )
6920
 
3064 chandransh 6921
  def __init__(self, orderId=None,):
6922
    self.orderId = orderId
1132 chandransh 6923
 
6924
  def read(self, iprot):
6925
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
6926
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
6927
      return
6928
    iprot.readStructBegin()
6929
    while True:
6930
      (fname, ftype, fid) = iprot.readFieldBegin()
6931
      if ftype == TType.STOP:
6932
        break
6933
      if fid == 1:
6934
        if ftype == TType.I64:
3064 chandransh 6935
          self.orderId = iprot.readI64();
1132 chandransh 6936
        else:
6937
          iprot.skip(ftype)
6938
      else:
6939
        iprot.skip(ftype)
6940
      iprot.readFieldEnd()
6941
    iprot.readStructEnd()
6942
 
6943
  def write(self, oprot):
6944
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
6945
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
6946
      return
3064 chandransh 6947
    oprot.writeStructBegin('billOrder_args')
6948
    if self.orderId != None:
6949
      oprot.writeFieldBegin('orderId', TType.I64, 1)
6950
      oprot.writeI64(self.orderId)
1132 chandransh 6951
      oprot.writeFieldEnd()
6952
    oprot.writeFieldStop()
6953
    oprot.writeStructEnd()
6954
 
6955
  def __repr__(self):
6956
    L = ['%s=%r' % (key, value)
6957
      for key, value in self.__dict__.iteritems()]
6958
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
6959
 
6960
  def __eq__(self, other):
6961
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
6962
 
6963
  def __ne__(self, other):
6964
    return not (self == other)
6965
 
3064 chandransh 6966
class billOrder_result:
1132 chandransh 6967
  """
6968
  Attributes:
3064 chandransh 6969
   - success
1132 chandransh 6970
   - ex
6971
  """
6972
 
6973
  thrift_spec = (
3064 chandransh 6974
    (0, TType.BOOL, 'success', None, None, ), # 0
1132 chandransh 6975
    (1, TType.STRUCT, 'ex', (TransactionServiceException, TransactionServiceException.thrift_spec), None, ), # 1
6976
  )
6977
 
3064 chandransh 6978
  def __init__(self, success=None, ex=None,):
6979
    self.success = success
1132 chandransh 6980
    self.ex = ex
6981
 
6982
  def read(self, iprot):
6983
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
6984
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
6985
      return
6986
    iprot.readStructBegin()
6987
    while True:
6988
      (fname, ftype, fid) = iprot.readFieldBegin()
6989
      if ftype == TType.STOP:
6990
        break
3064 chandransh 6991
      if fid == 0:
6992
        if ftype == TType.BOOL:
6993
          self.success = iprot.readBool();
6994
        else:
6995
          iprot.skip(ftype)
6996
      elif fid == 1:
1132 chandransh 6997
        if ftype == TType.STRUCT:
6998
          self.ex = TransactionServiceException()
6999
          self.ex.read(iprot)
7000
        else:
7001
          iprot.skip(ftype)
7002
      else:
7003
        iprot.skip(ftype)
7004
      iprot.readFieldEnd()
7005
    iprot.readStructEnd()
7006
 
7007
  def write(self, oprot):
7008
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
7009
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
7010
      return
3064 chandransh 7011
    oprot.writeStructBegin('billOrder_result')
7012
    if self.success != None:
7013
      oprot.writeFieldBegin('success', TType.BOOL, 0)
7014
      oprot.writeBool(self.success)
7015
      oprot.writeFieldEnd()
1132 chandransh 7016
    if self.ex != None:
7017
      oprot.writeFieldBegin('ex', TType.STRUCT, 1)
7018
      self.ex.write(oprot)
7019
      oprot.writeFieldEnd()
7020
    oprot.writeFieldStop()
7021
    oprot.writeStructEnd()
7022
 
7023
  def __repr__(self):
7024
    L = ['%s=%r' % (key, value)
7025
      for key, value in self.__dict__.iteritems()]
7026
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
7027
 
7028
  def __eq__(self, other):
7029
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
7030
 
7031
  def __ne__(self, other):
7032
    return not (self == other)
7033
 
3064 chandransh 7034
class addBillingDetails_args:
1135 chandransh 7035
  """
7036
  Attributes:
3064 chandransh 7037
   - orderId
7038
   - invoice_number
7039
   - billed_by
1135 chandransh 7040
  """
7041
 
7042
  thrift_spec = (
7043
    None, # 0
3064 chandransh 7044
    (1, TType.I64, 'orderId', None, None, ), # 1
7045
    (2, TType.STRING, 'invoice_number', None, None, ), # 2
7046
    (3, TType.STRING, 'billed_by', None, None, ), # 3
1135 chandransh 7047
  )
7048
 
3064 chandransh 7049
  def __init__(self, orderId=None, invoice_number=None, billed_by=None,):
7050
    self.orderId = orderId
7051
    self.invoice_number = invoice_number
7052
    self.billed_by = billed_by
1135 chandransh 7053
 
7054
  def read(self, iprot):
7055
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
7056
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
7057
      return
7058
    iprot.readStructBegin()
7059
    while True:
7060
      (fname, ftype, fid) = iprot.readFieldBegin()
7061
      if ftype == TType.STOP:
7062
        break
7063
      if fid == 1:
7064
        if ftype == TType.I64:
3064 chandransh 7065
          self.orderId = iprot.readI64();
1135 chandransh 7066
        else:
7067
          iprot.skip(ftype)
7068
      elif fid == 2:
3064 chandransh 7069
        if ftype == TType.STRING:
7070
          self.invoice_number = iprot.readString();
1135 chandransh 7071
        else:
7072
          iprot.skip(ftype)
3064 chandransh 7073
      elif fid == 3:
7074
        if ftype == TType.STRING:
7075
          self.billed_by = iprot.readString();
7076
        else:
7077
          iprot.skip(ftype)
1135 chandransh 7078
      else:
7079
        iprot.skip(ftype)
7080
      iprot.readFieldEnd()
7081
    iprot.readStructEnd()
7082
 
7083
  def write(self, oprot):
7084
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
7085
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
7086
      return
3064 chandransh 7087
    oprot.writeStructBegin('addBillingDetails_args')
7088
    if self.orderId != None:
7089
      oprot.writeFieldBegin('orderId', TType.I64, 1)
7090
      oprot.writeI64(self.orderId)
1135 chandransh 7091
      oprot.writeFieldEnd()
3064 chandransh 7092
    if self.invoice_number != None:
7093
      oprot.writeFieldBegin('invoice_number', TType.STRING, 2)
7094
      oprot.writeString(self.invoice_number)
1135 chandransh 7095
      oprot.writeFieldEnd()
3064 chandransh 7096
    if self.billed_by != None:
7097
      oprot.writeFieldBegin('billed_by', TType.STRING, 3)
7098
      oprot.writeString(self.billed_by)
7099
      oprot.writeFieldEnd()
1135 chandransh 7100
    oprot.writeFieldStop()
7101
    oprot.writeStructEnd()
7102
 
7103
  def __repr__(self):
7104
    L = ['%s=%r' % (key, value)
7105
      for key, value in self.__dict__.iteritems()]
7106
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
7107
 
7108
  def __eq__(self, other):
7109
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
7110
 
7111
  def __ne__(self, other):
7112
    return not (self == other)
7113
 
3064 chandransh 7114
class addBillingDetails_result:
1135 chandransh 7115
  """
7116
  Attributes:
3064 chandransh 7117
   - success
1135 chandransh 7118
   - ex
7119
  """
7120
 
7121
  thrift_spec = (
3064 chandransh 7122
    (0, TType.BOOL, 'success', None, None, ), # 0
1135 chandransh 7123
    (1, TType.STRUCT, 'ex', (TransactionServiceException, TransactionServiceException.thrift_spec), None, ), # 1
7124
  )
7125
 
3064 chandransh 7126
  def __init__(self, success=None, ex=None,):
7127
    self.success = success
1135 chandransh 7128
    self.ex = ex
7129
 
7130
  def read(self, iprot):
7131
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
7132
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
7133
      return
7134
    iprot.readStructBegin()
7135
    while True:
7136
      (fname, ftype, fid) = iprot.readFieldBegin()
7137
      if ftype == TType.STOP:
7138
        break
3064 chandransh 7139
      if fid == 0:
7140
        if ftype == TType.BOOL:
7141
          self.success = iprot.readBool();
7142
        else:
7143
          iprot.skip(ftype)
7144
      elif fid == 1:
1135 chandransh 7145
        if ftype == TType.STRUCT:
7146
          self.ex = TransactionServiceException()
7147
          self.ex.read(iprot)
7148
        else:
7149
          iprot.skip(ftype)
7150
      else:
7151
        iprot.skip(ftype)
7152
      iprot.readFieldEnd()
7153
    iprot.readStructEnd()
7154
 
7155
  def write(self, oprot):
7156
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
7157
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
7158
      return
3064 chandransh 7159
    oprot.writeStructBegin('addBillingDetails_result')
7160
    if self.success != None:
7161
      oprot.writeFieldBegin('success', TType.BOOL, 0)
7162
      oprot.writeBool(self.success)
7163
      oprot.writeFieldEnd()
1135 chandransh 7164
    if self.ex != None:
7165
      oprot.writeFieldBegin('ex', TType.STRUCT, 1)
7166
      self.ex.write(oprot)
7167
      oprot.writeFieldEnd()
7168
    oprot.writeFieldStop()
7169
    oprot.writeStructEnd()
7170
 
7171
  def __repr__(self):
7172
    L = ['%s=%r' % (key, value)
7173
      for key, value in self.__dict__.iteritems()]
7174
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
7175
 
7176
  def __eq__(self, other):
7177
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
7178
 
7179
  def __ne__(self, other):
7180
    return not (self == other)
7181
 
3064 chandransh 7182
class addJacketNumber_args:
1246 chandransh 7183
  """
7184
  Attributes:
3064 chandransh 7185
   - orderId
7186
   - jacketNumber
7187
   - imeiNumber
7188
   - itemNumber
7189
   - billedBy
7190
   - billingType
1246 chandransh 7191
  """
7192
 
7193
  thrift_spec = (
7194
    None, # 0
3064 chandransh 7195
    (1, TType.I64, 'orderId', None, None, ), # 1
7196
    (2, TType.I64, 'jacketNumber', None, None, ), # 2
7197
    (3, TType.I64, 'imeiNumber', None, None, ), # 3
7198
    (4, TType.STRING, 'itemNumber', None, None, ), # 4
7199
    (5, TType.STRING, 'billedBy', None, None, ), # 5
7200
    (6, TType.I64, 'billingType', None, None, ), # 6
1246 chandransh 7201
  )
7202
 
3064 chandransh 7203
  def __init__(self, orderId=None, jacketNumber=None, imeiNumber=None, itemNumber=None, billedBy=None, billingType=None,):
7204
    self.orderId = orderId
7205
    self.jacketNumber = jacketNumber
7206
    self.imeiNumber = imeiNumber
7207
    self.itemNumber = itemNumber
7208
    self.billedBy = billedBy
7209
    self.billingType = billingType
1246 chandransh 7210
 
7211
  def read(self, iprot):
7212
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
7213
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
7214
      return
7215
    iprot.readStructBegin()
7216
    while True:
7217
      (fname, ftype, fid) = iprot.readFieldBegin()
7218
      if ftype == TType.STOP:
7219
        break
7220
      if fid == 1:
7221
        if ftype == TType.I64:
3064 chandransh 7222
          self.orderId = iprot.readI64();
1246 chandransh 7223
        else:
7224
          iprot.skip(ftype)
7225
      elif fid == 2:
3064 chandransh 7226
        if ftype == TType.I64:
7227
          self.jacketNumber = iprot.readI64();
1246 chandransh 7228
        else:
7229
          iprot.skip(ftype)
3064 chandransh 7230
      elif fid == 3:
7231
        if ftype == TType.I64:
7232
          self.imeiNumber = iprot.readI64();
7233
        else:
7234
          iprot.skip(ftype)
7235
      elif fid == 4:
7236
        if ftype == TType.STRING:
7237
          self.itemNumber = iprot.readString();
7238
        else:
7239
          iprot.skip(ftype)
7240
      elif fid == 5:
7241
        if ftype == TType.STRING:
7242
          self.billedBy = iprot.readString();
7243
        else:
7244
          iprot.skip(ftype)
7245
      elif fid == 6:
7246
        if ftype == TType.I64:
7247
          self.billingType = iprot.readI64();
7248
        else:
7249
          iprot.skip(ftype)
1246 chandransh 7250
      else:
7251
        iprot.skip(ftype)
7252
      iprot.readFieldEnd()
7253
    iprot.readStructEnd()
7254
 
7255
  def write(self, oprot):
7256
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
7257
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
7258
      return
3064 chandransh 7259
    oprot.writeStructBegin('addJacketNumber_args')
7260
    if self.orderId != None:
7261
      oprot.writeFieldBegin('orderId', TType.I64, 1)
7262
      oprot.writeI64(self.orderId)
1246 chandransh 7263
      oprot.writeFieldEnd()
3064 chandransh 7264
    if self.jacketNumber != None:
7265
      oprot.writeFieldBegin('jacketNumber', TType.I64, 2)
7266
      oprot.writeI64(self.jacketNumber)
1246 chandransh 7267
      oprot.writeFieldEnd()
3064 chandransh 7268
    if self.imeiNumber != None:
7269
      oprot.writeFieldBegin('imeiNumber', TType.I64, 3)
7270
      oprot.writeI64(self.imeiNumber)
7271
      oprot.writeFieldEnd()
7272
    if self.itemNumber != None:
7273
      oprot.writeFieldBegin('itemNumber', TType.STRING, 4)
7274
      oprot.writeString(self.itemNumber)
7275
      oprot.writeFieldEnd()
7276
    if self.billedBy != None:
7277
      oprot.writeFieldBegin('billedBy', TType.STRING, 5)
7278
      oprot.writeString(self.billedBy)
7279
      oprot.writeFieldEnd()
7280
    if self.billingType != None:
7281
      oprot.writeFieldBegin('billingType', TType.I64, 6)
7282
      oprot.writeI64(self.billingType)
7283
      oprot.writeFieldEnd()
1246 chandransh 7284
    oprot.writeFieldStop()
7285
    oprot.writeStructEnd()
7286
 
7287
  def __repr__(self):
7288
    L = ['%s=%r' % (key, value)
7289
      for key, value in self.__dict__.iteritems()]
7290
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
7291
 
7292
  def __eq__(self, other):
7293
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
7294
 
7295
  def __ne__(self, other):
7296
    return not (self == other)
7297
 
3064 chandransh 7298
class addJacketNumber_result:
1246 chandransh 7299
  """
7300
  Attributes:
3064 chandransh 7301
   - success
1246 chandransh 7302
   - ex
7303
  """
7304
 
7305
  thrift_spec = (
3064 chandransh 7306
    (0, TType.BOOL, 'success', None, None, ), # 0
1246 chandransh 7307
    (1, TType.STRUCT, 'ex', (TransactionServiceException, TransactionServiceException.thrift_spec), None, ), # 1
7308
  )
7309
 
3064 chandransh 7310
  def __init__(self, success=None, ex=None,):
7311
    self.success = success
1246 chandransh 7312
    self.ex = ex
7313
 
7314
  def read(self, iprot):
7315
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
7316
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
7317
      return
7318
    iprot.readStructBegin()
7319
    while True:
7320
      (fname, ftype, fid) = iprot.readFieldBegin()
7321
      if ftype == TType.STOP:
7322
        break
3064 chandransh 7323
      if fid == 0:
7324
        if ftype == TType.BOOL:
7325
          self.success = iprot.readBool();
7326
        else:
7327
          iprot.skip(ftype)
7328
      elif fid == 1:
1246 chandransh 7329
        if ftype == TType.STRUCT:
7330
          self.ex = TransactionServiceException()
7331
          self.ex.read(iprot)
7332
        else:
7333
          iprot.skip(ftype)
7334
      else:
7335
        iprot.skip(ftype)
7336
      iprot.readFieldEnd()
7337
    iprot.readStructEnd()
7338
 
7339
  def write(self, oprot):
7340
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
7341
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
7342
      return
3064 chandransh 7343
    oprot.writeStructBegin('addJacketNumber_result')
7344
    if self.success != None:
7345
      oprot.writeFieldBegin('success', TType.BOOL, 0)
7346
      oprot.writeBool(self.success)
7347
      oprot.writeFieldEnd()
1246 chandransh 7348
    if self.ex != None:
7349
      oprot.writeFieldBegin('ex', TType.STRUCT, 1)
7350
      self.ex.write(oprot)
7351
      oprot.writeFieldEnd()
7352
    oprot.writeFieldStop()
7353
    oprot.writeStructEnd()
7354
 
7355
  def __repr__(self):
7356
    L = ['%s=%r' % (key, value)
7357
      for key, value in self.__dict__.iteritems()]
7358
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
7359
 
7360
  def __eq__(self, other):
7361
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
7362
 
7363
  def __ne__(self, other):
7364
    return not (self == other)
7365
 
3064 chandransh 7366
class markOrdersAsManifested_args:
1408 ankur.sing 7367
  """
7368
  Attributes:
3064 chandransh 7369
   - warehouseId
1408 ankur.sing 7370
   - providerId
3064 chandransh 7371
   - cod
1408 ankur.sing 7372
  """
7373
 
7374
  thrift_spec = (
7375
    None, # 0
3064 chandransh 7376
    (1, TType.I64, 'warehouseId', None, None, ), # 1
7377
    (2, TType.I64, 'providerId', None, None, ), # 2
7378
    (3, TType.BOOL, 'cod', None, None, ), # 3
1408 ankur.sing 7379
  )
7380
 
3064 chandransh 7381
  def __init__(self, warehouseId=None, providerId=None, cod=None,):
7382
    self.warehouseId = warehouseId
1408 ankur.sing 7383
    self.providerId = providerId
3064 chandransh 7384
    self.cod = cod
1408 ankur.sing 7385
 
7386
  def read(self, iprot):
7387
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
7388
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
7389
      return
7390
    iprot.readStructBegin()
7391
    while True:
7392
      (fname, ftype, fid) = iprot.readFieldBegin()
7393
      if ftype == TType.STOP:
7394
        break
7395
      if fid == 1:
7396
        if ftype == TType.I64:
3064 chandransh 7397
          self.warehouseId = iprot.readI64();
1408 ankur.sing 7398
        else:
7399
          iprot.skip(ftype)
7400
      elif fid == 2:
7401
        if ftype == TType.I64:
3064 chandransh 7402
          self.providerId = iprot.readI64();
1408 ankur.sing 7403
        else:
7404
          iprot.skip(ftype)
3064 chandransh 7405
      elif fid == 3:
7406
        if ftype == TType.BOOL:
7407
          self.cod = iprot.readBool();
7408
        else:
7409
          iprot.skip(ftype)
1408 ankur.sing 7410
      else:
7411
        iprot.skip(ftype)
7412
      iprot.readFieldEnd()
7413
    iprot.readStructEnd()
7414
 
7415
  def write(self, oprot):
7416
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
7417
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
7418
      return
3064 chandransh 7419
    oprot.writeStructBegin('markOrdersAsManifested_args')
7420
    if self.warehouseId != None:
7421
      oprot.writeFieldBegin('warehouseId', TType.I64, 1)
7422
      oprot.writeI64(self.warehouseId)
7423
      oprot.writeFieldEnd()
1408 ankur.sing 7424
    if self.providerId != None:
3064 chandransh 7425
      oprot.writeFieldBegin('providerId', TType.I64, 2)
1408 ankur.sing 7426
      oprot.writeI64(self.providerId)
7427
      oprot.writeFieldEnd()
3064 chandransh 7428
    if self.cod != None:
7429
      oprot.writeFieldBegin('cod', TType.BOOL, 3)
7430
      oprot.writeBool(self.cod)
1408 ankur.sing 7431
      oprot.writeFieldEnd()
7432
    oprot.writeFieldStop()
7433
    oprot.writeStructEnd()
7434
 
7435
  def __repr__(self):
7436
    L = ['%s=%r' % (key, value)
7437
      for key, value in self.__dict__.iteritems()]
7438
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
7439
 
7440
  def __eq__(self, other):
7441
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
7442
 
7443
  def __ne__(self, other):
7444
    return not (self == other)
7445
 
3064 chandransh 7446
class markOrdersAsManifested_result:
1408 ankur.sing 7447
  """
7448
  Attributes:
7449
   - success
3064 chandransh 7450
   - ex
1408 ankur.sing 7451
  """
7452
 
7453
  thrift_spec = (
3064 chandransh 7454
    (0, TType.BOOL, 'success', None, None, ), # 0
7455
    (1, TType.STRUCT, 'ex', (TransactionServiceException, TransactionServiceException.thrift_spec), None, ), # 1
1408 ankur.sing 7456
  )
7457
 
3064 chandransh 7458
  def __init__(self, success=None, ex=None,):
1408 ankur.sing 7459
    self.success = success
3064 chandransh 7460
    self.ex = ex
1408 ankur.sing 7461
 
7462
  def read(self, iprot):
7463
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
7464
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
7465
      return
7466
    iprot.readStructBegin()
7467
    while True:
7468
      (fname, ftype, fid) = iprot.readFieldBegin()
7469
      if ftype == TType.STOP:
7470
        break
7471
      if fid == 0:
3064 chandransh 7472
        if ftype == TType.BOOL:
7473
          self.success = iprot.readBool();
1408 ankur.sing 7474
        else:
7475
          iprot.skip(ftype)
3064 chandransh 7476
      elif fid == 1:
7477
        if ftype == TType.STRUCT:
7478
          self.ex = TransactionServiceException()
7479
          self.ex.read(iprot)
7480
        else:
7481
          iprot.skip(ftype)
1408 ankur.sing 7482
      else:
7483
        iprot.skip(ftype)
7484
      iprot.readFieldEnd()
7485
    iprot.readStructEnd()
7486
 
7487
  def write(self, oprot):
7488
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
7489
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
7490
      return
3064 chandransh 7491
    oprot.writeStructBegin('markOrdersAsManifested_result')
1408 ankur.sing 7492
    if self.success != None:
3064 chandransh 7493
      oprot.writeFieldBegin('success', TType.BOOL, 0)
7494
      oprot.writeBool(self.success)
1408 ankur.sing 7495
      oprot.writeFieldEnd()
3064 chandransh 7496
    if self.ex != None:
7497
      oprot.writeFieldBegin('ex', TType.STRUCT, 1)
7498
      self.ex.write(oprot)
7499
      oprot.writeFieldEnd()
1408 ankur.sing 7500
    oprot.writeFieldStop()
7501
    oprot.writeStructEnd()
7502
 
7503
  def __repr__(self):
7504
    L = ['%s=%r' % (key, value)
7505
      for key, value in self.__dict__.iteritems()]
7506
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
7507
 
7508
  def __eq__(self, other):
7509
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
7510
 
7511
  def __ne__(self, other):
7512
    return not (self == other)
7513
 
3064 chandransh 7514
class markOrdersAsPickedUp_args:
304 ashish 7515
  """
7516
  Attributes:
3064 chandransh 7517
   - providerId
7518
   - pickupDetails
304 ashish 7519
  """
94 ashish 7520
 
304 ashish 7521
  thrift_spec = (
7522
    None, # 0
3064 chandransh 7523
    (1, TType.I64, 'providerId', None, None, ), # 1
7524
    (2, TType.MAP, 'pickupDetails', (TType.STRING,None,TType.STRING,None), None, ), # 2
304 ashish 7525
  )
7526
 
3064 chandransh 7527
  def __init__(self, providerId=None, pickupDetails=None,):
7528
    self.providerId = providerId
7529
    self.pickupDetails = pickupDetails
304 ashish 7530
 
7531
  def read(self, iprot):
7532
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
7533
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
7534
      return
7535
    iprot.readStructBegin()
7536
    while True:
7537
      (fname, ftype, fid) = iprot.readFieldBegin()
7538
      if ftype == TType.STOP:
7539
        break
7540
      if fid == 1:
7541
        if ftype == TType.I64:
3064 chandransh 7542
          self.providerId = iprot.readI64();
304 ashish 7543
        else:
7544
          iprot.skip(ftype)
7545
      elif fid == 2:
3064 chandransh 7546
        if ftype == TType.MAP:
7547
          self.pickupDetails = {}
7548
          (_ktype113, _vtype114, _size112 ) = iprot.readMapBegin() 
7549
          for _i116 in xrange(_size112):
7550
            _key117 = iprot.readString();
7551
            _val118 = iprot.readString();
7552
            self.pickupDetails[_key117] = _val118
7553
          iprot.readMapEnd()
304 ashish 7554
        else:
7555
          iprot.skip(ftype)
7556
      else:
7557
        iprot.skip(ftype)
7558
      iprot.readFieldEnd()
7559
    iprot.readStructEnd()
7560
 
7561
  def write(self, oprot):
7562
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
7563
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
7564
      return
3064 chandransh 7565
    oprot.writeStructBegin('markOrdersAsPickedUp_args')
7566
    if self.providerId != None:
7567
      oprot.writeFieldBegin('providerId', TType.I64, 1)
7568
      oprot.writeI64(self.providerId)
304 ashish 7569
      oprot.writeFieldEnd()
3064 chandransh 7570
    if self.pickupDetails != None:
7571
      oprot.writeFieldBegin('pickupDetails', TType.MAP, 2)
7572
      oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.pickupDetails))
7573
      for kiter119,viter120 in self.pickupDetails.items():
7574
        oprot.writeString(kiter119)
7575
        oprot.writeString(viter120)
7576
      oprot.writeMapEnd()
304 ashish 7577
      oprot.writeFieldEnd()
7578
    oprot.writeFieldStop()
7579
    oprot.writeStructEnd()
7580
 
7581
  def __repr__(self):
7582
    L = ['%s=%r' % (key, value)
7583
      for key, value in self.__dict__.iteritems()]
7584
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
7585
 
7586
  def __eq__(self, other):
7587
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
7588
 
7589
  def __ne__(self, other):
7590
    return not (self == other)
7591
 
3064 chandransh 7592
class markOrdersAsPickedUp_result:
304 ashish 7593
  """
7594
  Attributes:
7595
   - success
3064 chandransh 7596
   - ex
304 ashish 7597
  """
7598
 
7599
  thrift_spec = (
3064 chandransh 7600
    (0, TType.LIST, 'success', (TType.STRUCT,(Order, Order.thrift_spec)), None, ), # 0
7601
    (1, TType.STRUCT, 'ex', (TransactionServiceException, TransactionServiceException.thrift_spec), None, ), # 1
304 ashish 7602
  )
7603
 
3064 chandransh 7604
  def __init__(self, success=None, ex=None,):
304 ashish 7605
    self.success = success
3064 chandransh 7606
    self.ex = ex
304 ashish 7607
 
7608
  def read(self, iprot):
7609
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
7610
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
7611
      return
7612
    iprot.readStructBegin()
7613
    while True:
7614
      (fname, ftype, fid) = iprot.readFieldBegin()
7615
      if ftype == TType.STOP:
7616
        break
7617
      if fid == 0:
7618
        if ftype == TType.LIST:
7619
          self.success = []
3064 chandransh 7620
          (_etype124, _size121) = iprot.readListBegin()
7621
          for _i125 in xrange(_size121):
7622
            _elem126 = Order()
7623
            _elem126.read(iprot)
7624
            self.success.append(_elem126)
304 ashish 7625
          iprot.readListEnd()
7626
        else:
7627
          iprot.skip(ftype)
3064 chandransh 7628
      elif fid == 1:
7629
        if ftype == TType.STRUCT:
7630
          self.ex = TransactionServiceException()
7631
          self.ex.read(iprot)
7632
        else:
7633
          iprot.skip(ftype)
304 ashish 7634
      else:
7635
        iprot.skip(ftype)
7636
      iprot.readFieldEnd()
7637
    iprot.readStructEnd()
7638
 
7639
  def write(self, oprot):
7640
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
7641
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
7642
      return
3064 chandransh 7643
    oprot.writeStructBegin('markOrdersAsPickedUp_result')
304 ashish 7644
    if self.success != None:
7645
      oprot.writeFieldBegin('success', TType.LIST, 0)
7646
      oprot.writeListBegin(TType.STRUCT, len(self.success))
3064 chandransh 7647
      for iter127 in self.success:
7648
        iter127.write(oprot)
304 ashish 7649
      oprot.writeListEnd()
7650
      oprot.writeFieldEnd()
3064 chandransh 7651
    if self.ex != None:
7652
      oprot.writeFieldBegin('ex', TType.STRUCT, 1)
7653
      self.ex.write(oprot)
7654
      oprot.writeFieldEnd()
304 ashish 7655
    oprot.writeFieldStop()
7656
    oprot.writeStructEnd()
7657
 
7658
  def __repr__(self):
7659
    L = ['%s=%r' % (key, value)
7660
      for key, value in self.__dict__.iteritems()]
7661
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
7662
 
7663
  def __eq__(self, other):
7664
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
7665
 
7666
  def __ne__(self, other):
7667
    return not (self == other)
7668
 
3064 chandransh 7669
class markOrdersAsDelivered_args:
304 ashish 7670
  """
7671
  Attributes:
3064 chandransh 7672
   - providerId
7673
   - deliveredOrders
304 ashish 7674
  """
7675
 
7676
  thrift_spec = (
7677
    None, # 0
3064 chandransh 7678
    (1, TType.I64, 'providerId', None, None, ), # 1
7679
    (2, TType.MAP, 'deliveredOrders', (TType.STRING,None,TType.STRING,None), None, ), # 2
304 ashish 7680
  )
7681
 
3064 chandransh 7682
  def __init__(self, providerId=None, deliveredOrders=None,):
7683
    self.providerId = providerId
7684
    self.deliveredOrders = deliveredOrders
304 ashish 7685
 
7686
  def read(self, iprot):
7687
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
7688
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
7689
      return
7690
    iprot.readStructBegin()
7691
    while True:
7692
      (fname, ftype, fid) = iprot.readFieldBegin()
7693
      if ftype == TType.STOP:
7694
        break
7695
      if fid == 1:
7696
        if ftype == TType.I64:
3064 chandransh 7697
          self.providerId = iprot.readI64();
304 ashish 7698
        else:
7699
          iprot.skip(ftype)
7700
      elif fid == 2:
3064 chandransh 7701
        if ftype == TType.MAP:
7702
          self.deliveredOrders = {}
7703
          (_ktype129, _vtype130, _size128 ) = iprot.readMapBegin() 
7704
          for _i132 in xrange(_size128):
7705
            _key133 = iprot.readString();
7706
            _val134 = iprot.readString();
7707
            self.deliveredOrders[_key133] = _val134
7708
          iprot.readMapEnd()
304 ashish 7709
        else:
7710
          iprot.skip(ftype)
7711
      else:
7712
        iprot.skip(ftype)
7713
      iprot.readFieldEnd()
7714
    iprot.readStructEnd()
7715
 
7716
  def write(self, oprot):
7717
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
7718
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
7719
      return
3064 chandransh 7720
    oprot.writeStructBegin('markOrdersAsDelivered_args')
7721
    if self.providerId != None:
7722
      oprot.writeFieldBegin('providerId', TType.I64, 1)
7723
      oprot.writeI64(self.providerId)
304 ashish 7724
      oprot.writeFieldEnd()
3064 chandransh 7725
    if self.deliveredOrders != None:
7726
      oprot.writeFieldBegin('deliveredOrders', TType.MAP, 2)
7727
      oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.deliveredOrders))
7728
      for kiter135,viter136 in self.deliveredOrders.items():
7729
        oprot.writeString(kiter135)
7730
        oprot.writeString(viter136)
7731
      oprot.writeMapEnd()
304 ashish 7732
      oprot.writeFieldEnd()
7733
    oprot.writeFieldStop()
7734
    oprot.writeStructEnd()
7735
 
7736
  def __repr__(self):
7737
    L = ['%s=%r' % (key, value)
7738
      for key, value in self.__dict__.iteritems()]
7739
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
7740
 
7741
  def __eq__(self, other):
7742
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
7743
 
7744
  def __ne__(self, other):
7745
    return not (self == other)
7746
 
3064 chandransh 7747
class markOrdersAsDelivered_result:
7748
  """
7749
  Attributes:
7750
   - ex
7751
  """
304 ashish 7752
 
7753
  thrift_spec = (
3064 chandransh 7754
    None, # 0
7755
    (1, TType.STRUCT, 'ex', (TransactionServiceException, TransactionServiceException.thrift_spec), None, ), # 1
304 ashish 7756
  )
7757
 
3064 chandransh 7758
  def __init__(self, ex=None,):
7759
    self.ex = ex
304 ashish 7760
 
1596 ankur.sing 7761
  def read(self, iprot):
7762
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
7763
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
7764
      return
7765
    iprot.readStructBegin()
7766
    while True:
7767
      (fname, ftype, fid) = iprot.readFieldBegin()
7768
      if ftype == TType.STOP:
7769
        break
3064 chandransh 7770
      if fid == 1:
7771
        if ftype == TType.STRUCT:
7772
          self.ex = TransactionServiceException()
7773
          self.ex.read(iprot)
7774
        else:
7775
          iprot.skip(ftype)
1596 ankur.sing 7776
      else:
7777
        iprot.skip(ftype)
7778
      iprot.readFieldEnd()
7779
    iprot.readStructEnd()
7780
 
7781
  def write(self, oprot):
7782
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
7783
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
7784
      return
3064 chandransh 7785
    oprot.writeStructBegin('markOrdersAsDelivered_result')
7786
    if self.ex != None:
7787
      oprot.writeFieldBegin('ex', TType.STRUCT, 1)
7788
      self.ex.write(oprot)
7789
      oprot.writeFieldEnd()
1596 ankur.sing 7790
    oprot.writeFieldStop()
7791
    oprot.writeStructEnd()
7792
 
7793
  def __repr__(self):
7794
    L = ['%s=%r' % (key, value)
7795
      for key, value in self.__dict__.iteritems()]
7796
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
7797
 
7798
  def __eq__(self, other):
7799
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
7800
 
7801
  def __ne__(self, other):
7802
    return not (self == other)
7803
 
3064 chandransh 7804
class markOrdersAsFailed_args:
1596 ankur.sing 7805
  """
7806
  Attributes:
3064 chandransh 7807
   - providerId
7808
   - returnedOrders
1596 ankur.sing 7809
  """
7810
 
7811
  thrift_spec = (
3064 chandransh 7812
    None, # 0
7813
    (1, TType.I64, 'providerId', None, None, ), # 1
7814
    (2, TType.MAP, 'returnedOrders', (TType.STRING,None,TType.STRING,None), None, ), # 2
1596 ankur.sing 7815
  )
7816
 
3064 chandransh 7817
  def __init__(self, providerId=None, returnedOrders=None,):
7818
    self.providerId = providerId
7819
    self.returnedOrders = returnedOrders
1596 ankur.sing 7820
 
7821
  def read(self, iprot):
7822
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
7823
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
7824
      return
7825
    iprot.readStructBegin()
7826
    while True:
7827
      (fname, ftype, fid) = iprot.readFieldBegin()
7828
      if ftype == TType.STOP:
7829
        break
3064 chandransh 7830
      if fid == 1:
1596 ankur.sing 7831
        if ftype == TType.I64:
3064 chandransh 7832
          self.providerId = iprot.readI64();
1596 ankur.sing 7833
        else:
7834
          iprot.skip(ftype)
3064 chandransh 7835
      elif fid == 2:
7836
        if ftype == TType.MAP:
7837
          self.returnedOrders = {}
7838
          (_ktype138, _vtype139, _size137 ) = iprot.readMapBegin() 
7839
          for _i141 in xrange(_size137):
7840
            _key142 = iprot.readString();
7841
            _val143 = iprot.readString();
7842
            self.returnedOrders[_key142] = _val143
7843
          iprot.readMapEnd()
7844
        else:
7845
          iprot.skip(ftype)
1596 ankur.sing 7846
      else:
7847
        iprot.skip(ftype)
7848
      iprot.readFieldEnd()
7849
    iprot.readStructEnd()
7850
 
7851
  def write(self, oprot):
7852
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
7853
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
7854
      return
3064 chandransh 7855
    oprot.writeStructBegin('markOrdersAsFailed_args')
7856
    if self.providerId != None:
7857
      oprot.writeFieldBegin('providerId', TType.I64, 1)
7858
      oprot.writeI64(self.providerId)
1596 ankur.sing 7859
      oprot.writeFieldEnd()
3064 chandransh 7860
    if self.returnedOrders != None:
7861
      oprot.writeFieldBegin('returnedOrders', TType.MAP, 2)
7862
      oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.returnedOrders))
7863
      for kiter144,viter145 in self.returnedOrders.items():
7864
        oprot.writeString(kiter144)
7865
        oprot.writeString(viter145)
7866
      oprot.writeMapEnd()
7867
      oprot.writeFieldEnd()
1596 ankur.sing 7868
    oprot.writeFieldStop()
7869
    oprot.writeStructEnd()
7870
 
7871
  def __repr__(self):
7872
    L = ['%s=%r' % (key, value)
7873
      for key, value in self.__dict__.iteritems()]
7874
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
7875
 
7876
  def __eq__(self, other):
7877
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
7878
 
7879
  def __ne__(self, other):
7880
    return not (self == other)
7881
 
3064 chandransh 7882
class markOrdersAsFailed_result:
7883
  """
7884
  Attributes:
7885
   - ex
7886
  """
1596 ankur.sing 7887
 
1627 ankur.sing 7888
  thrift_spec = (
3064 chandransh 7889
    None, # 0
7890
    (1, TType.STRUCT, 'ex', (TransactionServiceException, TransactionServiceException.thrift_spec), None, ), # 1
1627 ankur.sing 7891
  )
7892
 
3064 chandransh 7893
  def __init__(self, ex=None,):
7894
    self.ex = ex
7895
 
1627 ankur.sing 7896
  def read(self, iprot):
7897
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
7898
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
7899
      return
7900
    iprot.readStructBegin()
7901
    while True:
7902
      (fname, ftype, fid) = iprot.readFieldBegin()
7903
      if ftype == TType.STOP:
7904
        break
3064 chandransh 7905
      if fid == 1:
7906
        if ftype == TType.STRUCT:
7907
          self.ex = TransactionServiceException()
7908
          self.ex.read(iprot)
7909
        else:
7910
          iprot.skip(ftype)
1627 ankur.sing 7911
      else:
7912
        iprot.skip(ftype)
7913
      iprot.readFieldEnd()
7914
    iprot.readStructEnd()
7915
 
7916
  def write(self, oprot):
7917
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
7918
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
7919
      return
3064 chandransh 7920
    oprot.writeStructBegin('markOrdersAsFailed_result')
7921
    if self.ex != None:
7922
      oprot.writeFieldBegin('ex', TType.STRUCT, 1)
7923
      self.ex.write(oprot)
7924
      oprot.writeFieldEnd()
1627 ankur.sing 7925
    oprot.writeFieldStop()
7926
    oprot.writeStructEnd()
7927
 
7928
  def __repr__(self):
7929
    L = ['%s=%r' % (key, value)
7930
      for key, value in self.__dict__.iteritems()]
7931
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
7932
 
7933
  def __eq__(self, other):
7934
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
7935
 
7936
  def __ne__(self, other):
7937
    return not (self == other)
7938
 
3064 chandransh 7939
class updateNonDeliveryReason_args:
1627 ankur.sing 7940
  """
7941
  Attributes:
3064 chandransh 7942
   - providerId
7943
   - undeliveredOrders
1627 ankur.sing 7944
  """
7945
 
7946
  thrift_spec = (
3064 chandransh 7947
    None, # 0
7948
    (1, TType.I64, 'providerId', None, None, ), # 1
7949
    (2, TType.MAP, 'undeliveredOrders', (TType.STRING,None,TType.STRING,None), None, ), # 2
1627 ankur.sing 7950
  )
7951
 
3064 chandransh 7952
  def __init__(self, providerId=None, undeliveredOrders=None,):
7953
    self.providerId = providerId
7954
    self.undeliveredOrders = undeliveredOrders
1627 ankur.sing 7955
 
7956
  def read(self, iprot):
7957
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
7958
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
7959
      return
7960
    iprot.readStructBegin()
7961
    while True:
7962
      (fname, ftype, fid) = iprot.readFieldBegin()
7963
      if ftype == TType.STOP:
7964
        break
3064 chandransh 7965
      if fid == 1:
1627 ankur.sing 7966
        if ftype == TType.I64:
3064 chandransh 7967
          self.providerId = iprot.readI64();
1627 ankur.sing 7968
        else:
7969
          iprot.skip(ftype)
3064 chandransh 7970
      elif fid == 2:
7971
        if ftype == TType.MAP:
7972
          self.undeliveredOrders = {}
7973
          (_ktype147, _vtype148, _size146 ) = iprot.readMapBegin() 
7974
          for _i150 in xrange(_size146):
7975
            _key151 = iprot.readString();
7976
            _val152 = iprot.readString();
7977
            self.undeliveredOrders[_key151] = _val152
7978
          iprot.readMapEnd()
7979
        else:
7980
          iprot.skip(ftype)
1627 ankur.sing 7981
      else:
7982
        iprot.skip(ftype)
7983
      iprot.readFieldEnd()
7984
    iprot.readStructEnd()
7985
 
7986
  def write(self, oprot):
7987
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
7988
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
7989
      return
3064 chandransh 7990
    oprot.writeStructBegin('updateNonDeliveryReason_args')
7991
    if self.providerId != None:
7992
      oprot.writeFieldBegin('providerId', TType.I64, 1)
7993
      oprot.writeI64(self.providerId)
1627 ankur.sing 7994
      oprot.writeFieldEnd()
3064 chandransh 7995
    if self.undeliveredOrders != None:
7996
      oprot.writeFieldBegin('undeliveredOrders', TType.MAP, 2)
7997
      oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.undeliveredOrders))
7998
      for kiter153,viter154 in self.undeliveredOrders.items():
7999
        oprot.writeString(kiter153)
8000
        oprot.writeString(viter154)
8001
      oprot.writeMapEnd()
8002
      oprot.writeFieldEnd()
1627 ankur.sing 8003
    oprot.writeFieldStop()
8004
    oprot.writeStructEnd()
8005
 
8006
  def __repr__(self):
8007
    L = ['%s=%r' % (key, value)
8008
      for key, value in self.__dict__.iteritems()]
8009
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
8010
 
8011
  def __eq__(self, other):
8012
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
8013
 
8014
  def __ne__(self, other):
8015
    return not (self == other)
8016
 
3064 chandransh 8017
class updateNonDeliveryReason_result:
1627 ankur.sing 8018
  """
8019
  Attributes:
3064 chandransh 8020
   - ex
1627 ankur.sing 8021
  """
8022
 
8023
  thrift_spec = (
3064 chandransh 8024
    None, # 0
8025
    (1, TType.STRUCT, 'ex', (TransactionServiceException, TransactionServiceException.thrift_spec), None, ), # 1
1627 ankur.sing 8026
  )
8027
 
3064 chandransh 8028
  def __init__(self, ex=None,):
8029
    self.ex = ex
1627 ankur.sing 8030
 
8031
  def read(self, iprot):
8032
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
8033
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
8034
      return
8035
    iprot.readStructBegin()
8036
    while True:
8037
      (fname, ftype, fid) = iprot.readFieldBegin()
8038
      if ftype == TType.STOP:
8039
        break
3064 chandransh 8040
      if fid == 1:
8041
        if ftype == TType.STRUCT:
8042
          self.ex = TransactionServiceException()
8043
          self.ex.read(iprot)
1627 ankur.sing 8044
        else:
8045
          iprot.skip(ftype)
8046
      else:
8047
        iprot.skip(ftype)
8048
      iprot.readFieldEnd()
8049
    iprot.readStructEnd()
8050
 
8051
  def write(self, oprot):
8052
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
8053
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
8054
      return
3064 chandransh 8055
    oprot.writeStructBegin('updateNonDeliveryReason_result')
8056
    if self.ex != None:
8057
      oprot.writeFieldBegin('ex', TType.STRUCT, 1)
8058
      self.ex.write(oprot)
1627 ankur.sing 8059
      oprot.writeFieldEnd()
8060
    oprot.writeFieldStop()
8061
    oprot.writeStructEnd()
8062
 
8063
  def __repr__(self):
8064
    L = ['%s=%r' % (key, value)
8065
      for key, value in self.__dict__.iteritems()]
8066
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
8067
 
8068
  def __eq__(self, other):
8069
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
8070
 
8071
  def __ne__(self, other):
8072
    return not (self == other)
8073
 
3064 chandransh 8074
class getUndeliveredOrders_args:
1886 ankur.sing 8075
  """
8076
  Attributes:
3064 chandransh 8077
   - providerId
8078
   - warehouseId
1886 ankur.sing 8079
  """
1627 ankur.sing 8080
 
1886 ankur.sing 8081
  thrift_spec = (
8082
    None, # 0
3064 chandransh 8083
    (1, TType.I64, 'providerId', None, None, ), # 1
8084
    (2, TType.I64, 'warehouseId', None, None, ), # 2
1886 ankur.sing 8085
  )
8086
 
3064 chandransh 8087
  def __init__(self, providerId=None, warehouseId=None,):
8088
    self.providerId = providerId
8089
    self.warehouseId = warehouseId
1886 ankur.sing 8090
 
8091
  def read(self, iprot):
8092
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
8093
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
8094
      return
8095
    iprot.readStructBegin()
8096
    while True:
8097
      (fname, ftype, fid) = iprot.readFieldBegin()
8098
      if ftype == TType.STOP:
8099
        break
8100
      if fid == 1:
8101
        if ftype == TType.I64:
3064 chandransh 8102
          self.providerId = iprot.readI64();
1886 ankur.sing 8103
        else:
8104
          iprot.skip(ftype)
3064 chandransh 8105
      elif fid == 2:
8106
        if ftype == TType.I64:
8107
          self.warehouseId = iprot.readI64();
8108
        else:
8109
          iprot.skip(ftype)
1886 ankur.sing 8110
      else:
8111
        iprot.skip(ftype)
8112
      iprot.readFieldEnd()
8113
    iprot.readStructEnd()
8114
 
8115
  def write(self, oprot):
8116
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
8117
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
8118
      return
3064 chandransh 8119
    oprot.writeStructBegin('getUndeliveredOrders_args')
8120
    if self.providerId != None:
8121
      oprot.writeFieldBegin('providerId', TType.I64, 1)
8122
      oprot.writeI64(self.providerId)
1886 ankur.sing 8123
      oprot.writeFieldEnd()
3064 chandransh 8124
    if self.warehouseId != None:
8125
      oprot.writeFieldBegin('warehouseId', TType.I64, 2)
8126
      oprot.writeI64(self.warehouseId)
8127
      oprot.writeFieldEnd()
1886 ankur.sing 8128
    oprot.writeFieldStop()
8129
    oprot.writeStructEnd()
8130
 
8131
  def __repr__(self):
8132
    L = ['%s=%r' % (key, value)
8133
      for key, value in self.__dict__.iteritems()]
8134
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
8135
 
8136
  def __eq__(self, other):
8137
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
8138
 
8139
  def __ne__(self, other):
8140
    return not (self == other)
8141
 
3064 chandransh 8142
class getUndeliveredOrders_result:
1886 ankur.sing 8143
  """
8144
  Attributes:
8145
   - success
8146
  """
8147
 
8148
  thrift_spec = (
8149
    (0, TType.LIST, 'success', (TType.STRUCT,(Order, Order.thrift_spec)), None, ), # 0
8150
  )
8151
 
8152
  def __init__(self, success=None,):
8153
    self.success = success
8154
 
8155
  def read(self, iprot):
8156
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
8157
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
8158
      return
8159
    iprot.readStructBegin()
8160
    while True:
8161
      (fname, ftype, fid) = iprot.readFieldBegin()
8162
      if ftype == TType.STOP:
8163
        break
8164
      if fid == 0:
8165
        if ftype == TType.LIST:
8166
          self.success = []
3014 chandransh 8167
          (_etype158, _size155) = iprot.readListBegin()
8168
          for _i159 in xrange(_size155):
8169
            _elem160 = Order()
8170
            _elem160.read(iprot)
8171
            self.success.append(_elem160)
1886 ankur.sing 8172
          iprot.readListEnd()
8173
        else:
8174
          iprot.skip(ftype)
8175
      else:
8176
        iprot.skip(ftype)
8177
      iprot.readFieldEnd()
8178
    iprot.readStructEnd()
8179
 
8180
  def write(self, oprot):
8181
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
8182
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
8183
      return
3064 chandransh 8184
    oprot.writeStructBegin('getUndeliveredOrders_result')
1886 ankur.sing 8185
    if self.success != None:
8186
      oprot.writeFieldBegin('success', TType.LIST, 0)
8187
      oprot.writeListBegin(TType.STRUCT, len(self.success))
3014 chandransh 8188
      for iter161 in self.success:
8189
        iter161.write(oprot)
1886 ankur.sing 8190
      oprot.writeListEnd()
8191
      oprot.writeFieldEnd()
8192
    oprot.writeFieldStop()
8193
    oprot.writeStructEnd()
8194
 
8195
  def __repr__(self):
8196
    L = ['%s=%r' % (key, value)
8197
      for key, value in self.__dict__.iteritems()]
8198
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
8199
 
8200
  def __eq__(self, other):
8201
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
8202
 
8203
  def __ne__(self, other):
8204
    return not (self == other)
8205
 
2536 chandransh 8206
class toggleDOAFlag_args:
8207
  """
8208
  Attributes:
8209
   - orderId
8210
  """
1886 ankur.sing 8211
 
2536 chandransh 8212
  thrift_spec = (
8213
    None, # 0
8214
    (1, TType.I64, 'orderId', None, None, ), # 1
8215
  )
8216
 
8217
  def __init__(self, orderId=None,):
8218
    self.orderId = orderId
8219
 
8220
  def read(self, iprot):
8221
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
8222
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
8223
      return
8224
    iprot.readStructBegin()
8225
    while True:
8226
      (fname, ftype, fid) = iprot.readFieldBegin()
8227
      if ftype == TType.STOP:
8228
        break
8229
      if fid == 1:
8230
        if ftype == TType.I64:
8231
          self.orderId = iprot.readI64();
8232
        else:
8233
          iprot.skip(ftype)
8234
      else:
8235
        iprot.skip(ftype)
8236
      iprot.readFieldEnd()
8237
    iprot.readStructEnd()
8238
 
8239
  def write(self, oprot):
8240
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
8241
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
8242
      return
8243
    oprot.writeStructBegin('toggleDOAFlag_args')
8244
    if self.orderId != None:
8245
      oprot.writeFieldBegin('orderId', TType.I64, 1)
8246
      oprot.writeI64(self.orderId)
8247
      oprot.writeFieldEnd()
8248
    oprot.writeFieldStop()
8249
    oprot.writeStructEnd()
8250
 
8251
  def __repr__(self):
8252
    L = ['%s=%r' % (key, value)
8253
      for key, value in self.__dict__.iteritems()]
8254
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
8255
 
8256
  def __eq__(self, other):
8257
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
8258
 
8259
  def __ne__(self, other):
8260
    return not (self == other)
8261
 
8262
class toggleDOAFlag_result:
8263
  """
8264
  Attributes:
8265
   - success
8266
   - ex
8267
  """
8268
 
8269
  thrift_spec = (
8270
    (0, TType.BOOL, 'success', None, None, ), # 0
8271
    (1, TType.STRUCT, 'ex', (TransactionServiceException, TransactionServiceException.thrift_spec), None, ), # 1
8272
  )
8273
 
8274
  def __init__(self, success=None, ex=None,):
8275
    self.success = success
8276
    self.ex = ex
8277
 
8278
  def read(self, iprot):
8279
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
8280
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
8281
      return
8282
    iprot.readStructBegin()
8283
    while True:
8284
      (fname, ftype, fid) = iprot.readFieldBegin()
8285
      if ftype == TType.STOP:
8286
        break
8287
      if fid == 0:
8288
        if ftype == TType.BOOL:
8289
          self.success = iprot.readBool();
8290
        else:
8291
          iprot.skip(ftype)
8292
      elif fid == 1:
8293
        if ftype == TType.STRUCT:
8294
          self.ex = TransactionServiceException()
8295
          self.ex.read(iprot)
8296
        else:
8297
          iprot.skip(ftype)
8298
      else:
8299
        iprot.skip(ftype)
8300
      iprot.readFieldEnd()
8301
    iprot.readStructEnd()
8302
 
8303
  def write(self, oprot):
8304
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
8305
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
8306
      return
8307
    oprot.writeStructBegin('toggleDOAFlag_result')
8308
    if self.success != None:
8309
      oprot.writeFieldBegin('success', TType.BOOL, 0)
8310
      oprot.writeBool(self.success)
8311
      oprot.writeFieldEnd()
8312
    if self.ex != None:
8313
      oprot.writeFieldBegin('ex', TType.STRUCT, 1)
8314
      self.ex.write(oprot)
8315
      oprot.writeFieldEnd()
8316
    oprot.writeFieldStop()
8317
    oprot.writeStructEnd()
8318
 
8319
  def __repr__(self):
8320
    L = ['%s=%r' % (key, value)
8321
      for key, value in self.__dict__.iteritems()]
8322
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
8323
 
8324
  def __eq__(self, other):
8325
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
8326
 
8327
  def __ne__(self, other):
8328
    return not (self == other)
8329
 
8330
class requestPickupNumber_args:
8331
  """
8332
  Attributes:
8333
   - orderId
8334
  """
8335
 
8336
  thrift_spec = (
8337
    None, # 0
8338
    (1, TType.I64, 'orderId', None, None, ), # 1
8339
  )
8340
 
8341
  def __init__(self, orderId=None,):
8342
    self.orderId = orderId
8343
 
8344
  def read(self, iprot):
8345
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
8346
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
8347
      return
8348
    iprot.readStructBegin()
8349
    while True:
8350
      (fname, ftype, fid) = iprot.readFieldBegin()
8351
      if ftype == TType.STOP:
8352
        break
8353
      if fid == 1:
8354
        if ftype == TType.I64:
8355
          self.orderId = iprot.readI64();
8356
        else:
8357
          iprot.skip(ftype)
8358
      else:
8359
        iprot.skip(ftype)
8360
      iprot.readFieldEnd()
8361
    iprot.readStructEnd()
8362
 
8363
  def write(self, oprot):
8364
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
8365
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
8366
      return
8367
    oprot.writeStructBegin('requestPickupNumber_args')
8368
    if self.orderId != None:
8369
      oprot.writeFieldBegin('orderId', TType.I64, 1)
8370
      oprot.writeI64(self.orderId)
8371
      oprot.writeFieldEnd()
8372
    oprot.writeFieldStop()
8373
    oprot.writeStructEnd()
8374
 
8375
  def __repr__(self):
8376
    L = ['%s=%r' % (key, value)
8377
      for key, value in self.__dict__.iteritems()]
8378
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
8379
 
8380
  def __eq__(self, other):
8381
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
8382
 
8383
  def __ne__(self, other):
8384
    return not (self == other)
8385
 
8386
class requestPickupNumber_result:
8387
  """
8388
  Attributes:
8389
   - success
8390
   - ex
8391
  """
8392
 
8393
  thrift_spec = (
8394
    (0, TType.BOOL, 'success', None, None, ), # 0
8395
    (1, TType.STRUCT, 'ex', (TransactionServiceException, TransactionServiceException.thrift_spec), None, ), # 1
8396
  )
8397
 
8398
  def __init__(self, success=None, ex=None,):
8399
    self.success = success
8400
    self.ex = ex
8401
 
8402
  def read(self, iprot):
8403
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
8404
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
8405
      return
8406
    iprot.readStructBegin()
8407
    while True:
8408
      (fname, ftype, fid) = iprot.readFieldBegin()
8409
      if ftype == TType.STOP:
8410
        break
8411
      if fid == 0:
8412
        if ftype == TType.BOOL:
8413
          self.success = iprot.readBool();
8414
        else:
8415
          iprot.skip(ftype)
8416
      elif fid == 1:
8417
        if ftype == TType.STRUCT:
8418
          self.ex = TransactionServiceException()
8419
          self.ex.read(iprot)
8420
        else:
8421
          iprot.skip(ftype)
8422
      else:
8423
        iprot.skip(ftype)
8424
      iprot.readFieldEnd()
8425
    iprot.readStructEnd()
8426
 
8427
  def write(self, oprot):
8428
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
8429
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
8430
      return
8431
    oprot.writeStructBegin('requestPickupNumber_result')
8432
    if self.success != None:
8433
      oprot.writeFieldBegin('success', TType.BOOL, 0)
8434
      oprot.writeBool(self.success)
8435
      oprot.writeFieldEnd()
8436
    if self.ex != None:
8437
      oprot.writeFieldBegin('ex', TType.STRUCT, 1)
8438
      self.ex.write(oprot)
8439
      oprot.writeFieldEnd()
8440
    oprot.writeFieldStop()
8441
    oprot.writeStructEnd()
8442
 
8443
  def __repr__(self):
8444
    L = ['%s=%r' % (key, value)
8445
      for key, value in self.__dict__.iteritems()]
8446
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
8447
 
8448
  def __eq__(self, other):
8449
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
8450
 
8451
  def __ne__(self, other):
8452
    return not (self == other)
8453
 
8454
class authorizePickup_args:
8455
  """
8456
  Attributes:
8457
   - orderId
8458
   - pickupNumber
8459
  """
8460
 
8461
  thrift_spec = (
8462
    None, # 0
8463
    (1, TType.I64, 'orderId', None, None, ), # 1
8464
    (2, TType.STRING, 'pickupNumber', None, None, ), # 2
8465
  )
8466
 
8467
  def __init__(self, orderId=None, pickupNumber=None,):
8468
    self.orderId = orderId
8469
    self.pickupNumber = pickupNumber
8470
 
8471
  def read(self, iprot):
8472
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
8473
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
8474
      return
8475
    iprot.readStructBegin()
8476
    while True:
8477
      (fname, ftype, fid) = iprot.readFieldBegin()
8478
      if ftype == TType.STOP:
8479
        break
8480
      if fid == 1:
8481
        if ftype == TType.I64:
8482
          self.orderId = iprot.readI64();
8483
        else:
8484
          iprot.skip(ftype)
8485
      elif fid == 2:
8486
        if ftype == TType.STRING:
8487
          self.pickupNumber = iprot.readString();
8488
        else:
8489
          iprot.skip(ftype)
8490
      else:
8491
        iprot.skip(ftype)
8492
      iprot.readFieldEnd()
8493
    iprot.readStructEnd()
8494
 
8495
  def write(self, oprot):
8496
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
8497
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
8498
      return
8499
    oprot.writeStructBegin('authorizePickup_args')
8500
    if self.orderId != None:
8501
      oprot.writeFieldBegin('orderId', TType.I64, 1)
8502
      oprot.writeI64(self.orderId)
8503
      oprot.writeFieldEnd()
8504
    if self.pickupNumber != None:
8505
      oprot.writeFieldBegin('pickupNumber', TType.STRING, 2)
8506
      oprot.writeString(self.pickupNumber)
8507
      oprot.writeFieldEnd()
8508
    oprot.writeFieldStop()
8509
    oprot.writeStructEnd()
8510
 
8511
  def __repr__(self):
8512
    L = ['%s=%r' % (key, value)
8513
      for key, value in self.__dict__.iteritems()]
8514
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
8515
 
8516
  def __eq__(self, other):
8517
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
8518
 
8519
  def __ne__(self, other):
8520
    return not (self == other)
8521
 
8522
class authorizePickup_result:
8523
  """
8524
  Attributes:
8525
   - success
8526
   - ex
8527
  """
8528
 
8529
  thrift_spec = (
8530
    (0, TType.BOOL, 'success', None, None, ), # 0
8531
    (1, TType.STRUCT, 'ex', (TransactionServiceException, TransactionServiceException.thrift_spec), None, ), # 1
8532
  )
8533
 
8534
  def __init__(self, success=None, ex=None,):
8535
    self.success = success
8536
    self.ex = ex
8537
 
8538
  def read(self, iprot):
8539
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
8540
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
8541
      return
8542
    iprot.readStructBegin()
8543
    while True:
8544
      (fname, ftype, fid) = iprot.readFieldBegin()
8545
      if ftype == TType.STOP:
8546
        break
8547
      if fid == 0:
8548
        if ftype == TType.BOOL:
8549
          self.success = iprot.readBool();
8550
        else:
8551
          iprot.skip(ftype)
8552
      elif fid == 1:
8553
        if ftype == TType.STRUCT:
8554
          self.ex = TransactionServiceException()
8555
          self.ex.read(iprot)
8556
        else:
8557
          iprot.skip(ftype)
8558
      else:
8559
        iprot.skip(ftype)
8560
      iprot.readFieldEnd()
8561
    iprot.readStructEnd()
8562
 
8563
  def write(self, oprot):
8564
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
8565
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
8566
      return
8567
    oprot.writeStructBegin('authorizePickup_result')
8568
    if self.success != None:
8569
      oprot.writeFieldBegin('success', TType.BOOL, 0)
8570
      oprot.writeBool(self.success)
8571
      oprot.writeFieldEnd()
8572
    if self.ex != None:
8573
      oprot.writeFieldBegin('ex', TType.STRUCT, 1)
8574
      self.ex.write(oprot)
8575
      oprot.writeFieldEnd()
8576
    oprot.writeFieldStop()
8577
    oprot.writeStructEnd()
8578
 
8579
  def __repr__(self):
8580
    L = ['%s=%r' % (key, value)
8581
      for key, value in self.__dict__.iteritems()]
8582
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
8583
 
8584
  def __eq__(self, other):
8585
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
8586
 
8587
  def __ne__(self, other):
8588
    return not (self == other)
8589
 
2764 chandransh 8590
class markDoasAsPickedUp_args:
8591
  """
8592
  Attributes:
8593
   - providerId
8594
   - pickupDetails
8595
  """
8596
 
8597
  thrift_spec = (
8598
    None, # 0
8599
    (1, TType.I64, 'providerId', None, None, ), # 1
8600
    (2, TType.MAP, 'pickupDetails', (TType.STRING,None,TType.STRING,None), None, ), # 2
8601
  )
8602
 
8603
  def __init__(self, providerId=None, pickupDetails=None,):
8604
    self.providerId = providerId
8605
    self.pickupDetails = pickupDetails
8606
 
8607
  def read(self, iprot):
8608
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
8609
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
8610
      return
8611
    iprot.readStructBegin()
8612
    while True:
8613
      (fname, ftype, fid) = iprot.readFieldBegin()
8614
      if ftype == TType.STOP:
8615
        break
8616
      if fid == 1:
8617
        if ftype == TType.I64:
8618
          self.providerId = iprot.readI64();
8619
        else:
8620
          iprot.skip(ftype)
8621
      elif fid == 2:
8622
        if ftype == TType.MAP:
8623
          self.pickupDetails = {}
3014 chandransh 8624
          (_ktype163, _vtype164, _size162 ) = iprot.readMapBegin() 
8625
          for _i166 in xrange(_size162):
8626
            _key167 = iprot.readString();
8627
            _val168 = iprot.readString();
8628
            self.pickupDetails[_key167] = _val168
2764 chandransh 8629
          iprot.readMapEnd()
8630
        else:
8631
          iprot.skip(ftype)
8632
      else:
8633
        iprot.skip(ftype)
8634
      iprot.readFieldEnd()
8635
    iprot.readStructEnd()
8636
 
8637
  def write(self, oprot):
8638
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
8639
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
8640
      return
8641
    oprot.writeStructBegin('markDoasAsPickedUp_args')
8642
    if self.providerId != None:
8643
      oprot.writeFieldBegin('providerId', TType.I64, 1)
8644
      oprot.writeI64(self.providerId)
8645
      oprot.writeFieldEnd()
8646
    if self.pickupDetails != None:
8647
      oprot.writeFieldBegin('pickupDetails', TType.MAP, 2)
8648
      oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.pickupDetails))
3014 chandransh 8649
      for kiter169,viter170 in self.pickupDetails.items():
8650
        oprot.writeString(kiter169)
8651
        oprot.writeString(viter170)
2764 chandransh 8652
      oprot.writeMapEnd()
8653
      oprot.writeFieldEnd()
8654
    oprot.writeFieldStop()
8655
    oprot.writeStructEnd()
8656
 
8657
  def __repr__(self):
8658
    L = ['%s=%r' % (key, value)
8659
      for key, value in self.__dict__.iteritems()]
8660
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
8661
 
8662
  def __eq__(self, other):
8663
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
8664
 
8665
  def __ne__(self, other):
8666
    return not (self == other)
8667
 
8668
class markDoasAsPickedUp_result:
8669
  """
8670
  Attributes:
8671
   - success
8672
  """
8673
 
8674
  thrift_spec = (
8675
    (0, TType.LIST, 'success', (TType.STRUCT,(Order, Order.thrift_spec)), None, ), # 0
8676
  )
8677
 
8678
  def __init__(self, success=None,):
8679
    self.success = success
8680
 
8681
  def read(self, iprot):
8682
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
8683
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
8684
      return
8685
    iprot.readStructBegin()
8686
    while True:
8687
      (fname, ftype, fid) = iprot.readFieldBegin()
8688
      if ftype == TType.STOP:
8689
        break
8690
      if fid == 0:
8691
        if ftype == TType.LIST:
8692
          self.success = []
3014 chandransh 8693
          (_etype174, _size171) = iprot.readListBegin()
8694
          for _i175 in xrange(_size171):
8695
            _elem176 = Order()
8696
            _elem176.read(iprot)
8697
            self.success.append(_elem176)
2764 chandransh 8698
          iprot.readListEnd()
8699
        else:
8700
          iprot.skip(ftype)
8701
      else:
8702
        iprot.skip(ftype)
8703
      iprot.readFieldEnd()
8704
    iprot.readStructEnd()
8705
 
8706
  def write(self, oprot):
8707
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
8708
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
8709
      return
8710
    oprot.writeStructBegin('markDoasAsPickedUp_result')
8711
    if self.success != None:
8712
      oprot.writeFieldBegin('success', TType.LIST, 0)
8713
      oprot.writeListBegin(TType.STRUCT, len(self.success))
3014 chandransh 8714
      for iter177 in self.success:
8715
        iter177.write(oprot)
2764 chandransh 8716
      oprot.writeListEnd()
8717
      oprot.writeFieldEnd()
8718
    oprot.writeFieldStop()
8719
    oprot.writeStructEnd()
8720
 
8721
  def __repr__(self):
8722
    L = ['%s=%r' % (key, value)
8723
      for key, value in self.__dict__.iteritems()]
8724
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
8725
 
8726
  def __eq__(self, other):
8727
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
8728
 
8729
  def __ne__(self, other):
8730
    return not (self == other)
8731
 
2616 chandransh 8732
class receiveReturn_args:
2591 chandransh 8733
  """
8734
  Attributes:
8735
   - orderId
8736
  """
2536 chandransh 8737
 
2591 chandransh 8738
  thrift_spec = (
8739
    None, # 0
8740
    (1, TType.I64, 'orderId', None, None, ), # 1
8741
  )
8742
 
8743
  def __init__(self, orderId=None,):
8744
    self.orderId = orderId
8745
 
8746
  def read(self, iprot):
8747
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
8748
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
8749
      return
8750
    iprot.readStructBegin()
8751
    while True:
8752
      (fname, ftype, fid) = iprot.readFieldBegin()
8753
      if ftype == TType.STOP:
8754
        break
8755
      if fid == 1:
8756
        if ftype == TType.I64:
8757
          self.orderId = iprot.readI64();
8758
        else:
8759
          iprot.skip(ftype)
8760
      else:
8761
        iprot.skip(ftype)
8762
      iprot.readFieldEnd()
8763
    iprot.readStructEnd()
8764
 
8765
  def write(self, oprot):
8766
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
8767
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
8768
      return
2616 chandransh 8769
    oprot.writeStructBegin('receiveReturn_args')
2591 chandransh 8770
    if self.orderId != None:
8771
      oprot.writeFieldBegin('orderId', TType.I64, 1)
8772
      oprot.writeI64(self.orderId)
8773
      oprot.writeFieldEnd()
8774
    oprot.writeFieldStop()
8775
    oprot.writeStructEnd()
8776
 
8777
  def __repr__(self):
8778
    L = ['%s=%r' % (key, value)
8779
      for key, value in self.__dict__.iteritems()]
8780
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
8781
 
8782
  def __eq__(self, other):
8783
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
8784
 
8785
  def __ne__(self, other):
8786
    return not (self == other)
8787
 
2616 chandransh 8788
class receiveReturn_result:
2591 chandransh 8789
  """
8790
  Attributes:
8791
   - success
8792
   - ex
8793
  """
8794
 
8795
  thrift_spec = (
8796
    (0, TType.BOOL, 'success', None, None, ), # 0
8797
    (1, TType.STRUCT, 'ex', (TransactionServiceException, TransactionServiceException.thrift_spec), None, ), # 1
8798
  )
8799
 
8800
  def __init__(self, success=None, ex=None,):
8801
    self.success = success
8802
    self.ex = ex
8803
 
8804
  def read(self, iprot):
8805
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
8806
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
8807
      return
8808
    iprot.readStructBegin()
8809
    while True:
8810
      (fname, ftype, fid) = iprot.readFieldBegin()
8811
      if ftype == TType.STOP:
8812
        break
8813
      if fid == 0:
8814
        if ftype == TType.BOOL:
8815
          self.success = iprot.readBool();
8816
        else:
8817
          iprot.skip(ftype)
8818
      elif fid == 1:
8819
        if ftype == TType.STRUCT:
8820
          self.ex = TransactionServiceException()
8821
          self.ex.read(iprot)
8822
        else:
8823
          iprot.skip(ftype)
8824
      else:
8825
        iprot.skip(ftype)
8826
      iprot.readFieldEnd()
8827
    iprot.readStructEnd()
8828
 
8829
  def write(self, oprot):
8830
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
8831
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
8832
      return
2616 chandransh 8833
    oprot.writeStructBegin('receiveReturn_result')
2591 chandransh 8834
    if self.success != None:
8835
      oprot.writeFieldBegin('success', TType.BOOL, 0)
8836
      oprot.writeBool(self.success)
8837
      oprot.writeFieldEnd()
8838
    if self.ex != None:
8839
      oprot.writeFieldBegin('ex', TType.STRUCT, 1)
8840
      self.ex.write(oprot)
8841
      oprot.writeFieldEnd()
8842
    oprot.writeFieldStop()
8843
    oprot.writeStructEnd()
8844
 
8845
  def __repr__(self):
8846
    L = ['%s=%r' % (key, value)
8847
      for key, value in self.__dict__.iteritems()]
8848
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
8849
 
8850
  def __eq__(self, other):
8851
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
8852
 
8853
  def __ne__(self, other):
8854
    return not (self == other)
8855
 
8856
class validateDoa_args:
8857
  """
8858
  Attributes:
8859
   - orderId
8860
   - isValid
8861
  """
8862
 
8863
  thrift_spec = (
8864
    None, # 0
8865
    (1, TType.I64, 'orderId', None, None, ), # 1
8866
    (2, TType.BOOL, 'isValid', None, None, ), # 2
8867
  )
8868
 
8869
  def __init__(self, orderId=None, isValid=None,):
8870
    self.orderId = orderId
8871
    self.isValid = isValid
8872
 
8873
  def read(self, iprot):
8874
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
8875
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
8876
      return
8877
    iprot.readStructBegin()
8878
    while True:
8879
      (fname, ftype, fid) = iprot.readFieldBegin()
8880
      if ftype == TType.STOP:
8881
        break
8882
      if fid == 1:
8883
        if ftype == TType.I64:
8884
          self.orderId = iprot.readI64();
8885
        else:
8886
          iprot.skip(ftype)
8887
      elif fid == 2:
8888
        if ftype == TType.BOOL:
8889
          self.isValid = iprot.readBool();
8890
        else:
8891
          iprot.skip(ftype)
8892
      else:
8893
        iprot.skip(ftype)
8894
      iprot.readFieldEnd()
8895
    iprot.readStructEnd()
8896
 
8897
  def write(self, oprot):
8898
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
8899
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
8900
      return
8901
    oprot.writeStructBegin('validateDoa_args')
8902
    if self.orderId != None:
8903
      oprot.writeFieldBegin('orderId', TType.I64, 1)
8904
      oprot.writeI64(self.orderId)
8905
      oprot.writeFieldEnd()
8906
    if self.isValid != None:
8907
      oprot.writeFieldBegin('isValid', TType.BOOL, 2)
8908
      oprot.writeBool(self.isValid)
8909
      oprot.writeFieldEnd()
8910
    oprot.writeFieldStop()
8911
    oprot.writeStructEnd()
8912
 
8913
  def __repr__(self):
8914
    L = ['%s=%r' % (key, value)
8915
      for key, value in self.__dict__.iteritems()]
8916
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
8917
 
8918
  def __eq__(self, other):
8919
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
8920
 
8921
  def __ne__(self, other):
8922
    return not (self == other)
8923
 
8924
class validateDoa_result:
8925
  """
8926
  Attributes:
8927
   - success
8928
   - ex
8929
  """
8930
 
8931
  thrift_spec = (
8932
    (0, TType.BOOL, 'success', None, None, ), # 0
8933
    (1, TType.STRUCT, 'ex', (TransactionServiceException, TransactionServiceException.thrift_spec), None, ), # 1
8934
  )
8935
 
8936
  def __init__(self, success=None, ex=None,):
8937
    self.success = success
8938
    self.ex = ex
8939
 
8940
  def read(self, iprot):
8941
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
8942
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
8943
      return
8944
    iprot.readStructBegin()
8945
    while True:
8946
      (fname, ftype, fid) = iprot.readFieldBegin()
8947
      if ftype == TType.STOP:
8948
        break
8949
      if fid == 0:
8950
        if ftype == TType.BOOL:
8951
          self.success = iprot.readBool();
8952
        else:
8953
          iprot.skip(ftype)
8954
      elif fid == 1:
8955
        if ftype == TType.STRUCT:
8956
          self.ex = TransactionServiceException()
8957
          self.ex.read(iprot)
8958
        else:
8959
          iprot.skip(ftype)
8960
      else:
8961
        iprot.skip(ftype)
8962
      iprot.readFieldEnd()
8963
    iprot.readStructEnd()
8964
 
8965
  def write(self, oprot):
8966
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
8967
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
8968
      return
8969
    oprot.writeStructBegin('validateDoa_result')
8970
    if self.success != None:
8971
      oprot.writeFieldBegin('success', TType.BOOL, 0)
8972
      oprot.writeBool(self.success)
8973
      oprot.writeFieldEnd()
8974
    if self.ex != None:
8975
      oprot.writeFieldBegin('ex', TType.STRUCT, 1)
8976
      self.ex.write(oprot)
8977
      oprot.writeFieldEnd()
8978
    oprot.writeFieldStop()
8979
    oprot.writeStructEnd()
8980
 
8981
  def __repr__(self):
8982
    L = ['%s=%r' % (key, value)
8983
      for key, value in self.__dict__.iteritems()]
8984
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
8985
 
8986
  def __eq__(self, other):
8987
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
8988
 
8989
  def __ne__(self, other):
8990
    return not (self == other)
8991
 
2616 chandransh 8992
class reshipOrder_args:
8993
  """
8994
  Attributes:
8995
   - orderId
8996
  """
2591 chandransh 8997
 
2616 chandransh 8998
  thrift_spec = (
8999
    None, # 0
9000
    (1, TType.I64, 'orderId', None, None, ), # 1
9001
  )
9002
 
9003
  def __init__(self, orderId=None,):
9004
    self.orderId = orderId
9005
 
9006
  def read(self, iprot):
9007
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
9008
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
9009
      return
9010
    iprot.readStructBegin()
9011
    while True:
9012
      (fname, ftype, fid) = iprot.readFieldBegin()
9013
      if ftype == TType.STOP:
9014
        break
9015
      if fid == 1:
9016
        if ftype == TType.I64:
9017
          self.orderId = iprot.readI64();
9018
        else:
9019
          iprot.skip(ftype)
9020
      else:
9021
        iprot.skip(ftype)
9022
      iprot.readFieldEnd()
9023
    iprot.readStructEnd()
9024
 
9025
  def write(self, oprot):
9026
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
9027
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
9028
      return
9029
    oprot.writeStructBegin('reshipOrder_args')
9030
    if self.orderId != None:
9031
      oprot.writeFieldBegin('orderId', TType.I64, 1)
9032
      oprot.writeI64(self.orderId)
9033
      oprot.writeFieldEnd()
9034
    oprot.writeFieldStop()
9035
    oprot.writeStructEnd()
9036
 
9037
  def __repr__(self):
9038
    L = ['%s=%r' % (key, value)
9039
      for key, value in self.__dict__.iteritems()]
9040
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
9041
 
9042
  def __eq__(self, other):
9043
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
9044
 
9045
  def __ne__(self, other):
9046
    return not (self == other)
9047
 
9048
class reshipOrder_result:
9049
  """
9050
  Attributes:
9051
   - success
9052
   - ex
9053
  """
9054
 
9055
  thrift_spec = (
9056
    (0, TType.I64, 'success', None, None, ), # 0
9057
    (1, TType.STRUCT, 'ex', (TransactionServiceException, TransactionServiceException.thrift_spec), None, ), # 1
9058
  )
9059
 
9060
  def __init__(self, success=None, ex=None,):
9061
    self.success = success
9062
    self.ex = ex
9063
 
9064
  def read(self, iprot):
9065
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
9066
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
9067
      return
9068
    iprot.readStructBegin()
9069
    while True:
9070
      (fname, ftype, fid) = iprot.readFieldBegin()
9071
      if ftype == TType.STOP:
9072
        break
9073
      if fid == 0:
9074
        if ftype == TType.I64:
9075
          self.success = iprot.readI64();
9076
        else:
9077
          iprot.skip(ftype)
9078
      elif fid == 1:
9079
        if ftype == TType.STRUCT:
9080
          self.ex = TransactionServiceException()
9081
          self.ex.read(iprot)
9082
        else:
9083
          iprot.skip(ftype)
9084
      else:
9085
        iprot.skip(ftype)
9086
      iprot.readFieldEnd()
9087
    iprot.readStructEnd()
9088
 
9089
  def write(self, oprot):
9090
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
9091
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
9092
      return
9093
    oprot.writeStructBegin('reshipOrder_result')
9094
    if self.success != None:
9095
      oprot.writeFieldBegin('success', TType.I64, 0)
9096
      oprot.writeI64(self.success)
9097
      oprot.writeFieldEnd()
9098
    if self.ex != None:
9099
      oprot.writeFieldBegin('ex', TType.STRUCT, 1)
9100
      self.ex.write(oprot)
9101
      oprot.writeFieldEnd()
9102
    oprot.writeFieldStop()
9103
    oprot.writeStructEnd()
9104
 
9105
  def __repr__(self):
9106
    L = ['%s=%r' % (key, value)
9107
      for key, value in self.__dict__.iteritems()]
9108
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
9109
 
9110
  def __eq__(self, other):
9111
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
9112
 
9113
  def __ne__(self, other):
9114
    return not (self == other)
9115
 
9116
class refundOrder_args:
9117
  """
9118
  Attributes:
9119
   - orderId
3226 chandransh 9120
   - refundedBy
9121
   - reason
2616 chandransh 9122
  """
9123
 
9124
  thrift_spec = (
9125
    None, # 0
9126
    (1, TType.I64, 'orderId', None, None, ), # 1
3226 chandransh 9127
    (2, TType.STRING, 'refundedBy', None, None, ), # 2
9128
    (3, TType.STRING, 'reason', None, None, ), # 3
2616 chandransh 9129
  )
9130
 
3226 chandransh 9131
  def __init__(self, orderId=None, refundedBy=None, reason=None,):
2616 chandransh 9132
    self.orderId = orderId
3226 chandransh 9133
    self.refundedBy = refundedBy
9134
    self.reason = reason
2616 chandransh 9135
 
9136
  def read(self, iprot):
9137
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
9138
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
9139
      return
9140
    iprot.readStructBegin()
9141
    while True:
9142
      (fname, ftype, fid) = iprot.readFieldBegin()
9143
      if ftype == TType.STOP:
9144
        break
9145
      if fid == 1:
9146
        if ftype == TType.I64:
9147
          self.orderId = iprot.readI64();
9148
        else:
9149
          iprot.skip(ftype)
3226 chandransh 9150
      elif fid == 2:
9151
        if ftype == TType.STRING:
9152
          self.refundedBy = iprot.readString();
9153
        else:
9154
          iprot.skip(ftype)
9155
      elif fid == 3:
9156
        if ftype == TType.STRING:
9157
          self.reason = iprot.readString();
9158
        else:
9159
          iprot.skip(ftype)
2616 chandransh 9160
      else:
9161
        iprot.skip(ftype)
9162
      iprot.readFieldEnd()
9163
    iprot.readStructEnd()
9164
 
9165
  def write(self, oprot):
9166
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
9167
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
9168
      return
9169
    oprot.writeStructBegin('refundOrder_args')
9170
    if self.orderId != None:
9171
      oprot.writeFieldBegin('orderId', TType.I64, 1)
9172
      oprot.writeI64(self.orderId)
9173
      oprot.writeFieldEnd()
3226 chandransh 9174
    if self.refundedBy != None:
9175
      oprot.writeFieldBegin('refundedBy', TType.STRING, 2)
9176
      oprot.writeString(self.refundedBy)
9177
      oprot.writeFieldEnd()
9178
    if self.reason != None:
9179
      oprot.writeFieldBegin('reason', TType.STRING, 3)
9180
      oprot.writeString(self.reason)
9181
      oprot.writeFieldEnd()
2616 chandransh 9182
    oprot.writeFieldStop()
9183
    oprot.writeStructEnd()
9184
 
9185
  def __repr__(self):
9186
    L = ['%s=%r' % (key, value)
9187
      for key, value in self.__dict__.iteritems()]
9188
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
9189
 
9190
  def __eq__(self, other):
9191
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
9192
 
9193
  def __ne__(self, other):
9194
    return not (self == other)
9195
 
9196
class refundOrder_result:
9197
  """
9198
  Attributes:
9199
   - success
9200
   - ex
9201
  """
9202
 
9203
  thrift_spec = (
9204
    (0, TType.BOOL, 'success', None, None, ), # 0
9205
    (1, TType.STRUCT, 'ex', (TransactionServiceException, TransactionServiceException.thrift_spec), None, ), # 1
9206
  )
9207
 
9208
  def __init__(self, success=None, ex=None,):
9209
    self.success = success
9210
    self.ex = ex
9211
 
9212
  def read(self, iprot):
9213
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
9214
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
9215
      return
9216
    iprot.readStructBegin()
9217
    while True:
9218
      (fname, ftype, fid) = iprot.readFieldBegin()
9219
      if ftype == TType.STOP:
9220
        break
9221
      if fid == 0:
9222
        if ftype == TType.BOOL:
9223
          self.success = iprot.readBool();
9224
        else:
9225
          iprot.skip(ftype)
9226
      elif fid == 1:
9227
        if ftype == TType.STRUCT:
9228
          self.ex = TransactionServiceException()
9229
          self.ex.read(iprot)
9230
        else:
9231
          iprot.skip(ftype)
9232
      else:
9233
        iprot.skip(ftype)
9234
      iprot.readFieldEnd()
9235
    iprot.readStructEnd()
9236
 
9237
  def write(self, oprot):
9238
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
9239
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
9240
      return
9241
    oprot.writeStructBegin('refundOrder_result')
9242
    if self.success != None:
9243
      oprot.writeFieldBegin('success', TType.BOOL, 0)
9244
      oprot.writeBool(self.success)
9245
      oprot.writeFieldEnd()
9246
    if self.ex != None:
9247
      oprot.writeFieldBegin('ex', TType.STRUCT, 1)
9248
      self.ex.write(oprot)
9249
      oprot.writeFieldEnd()
9250
    oprot.writeFieldStop()
9251
    oprot.writeStructEnd()
9252
 
9253
  def __repr__(self):
9254
    L = ['%s=%r' % (key, value)
9255
      for key, value in self.__dict__.iteritems()]
9256
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
9257
 
9258
  def __eq__(self, other):
9259
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
9260
 
9261
  def __ne__(self, other):
9262
    return not (self == other)
9263
 
2690 chandransh 9264
class getReturnOrders_args:
9265
  """
9266
  Attributes:
9267
   - warehouseId
9268
   - fromDate
9269
   - toDate
9270
  """
2616 chandransh 9271
 
2690 chandransh 9272
  thrift_spec = (
9273
    None, # 0
9274
    (1, TType.I64, 'warehouseId', None, None, ), # 1
9275
    (2, TType.I64, 'fromDate', None, None, ), # 2
9276
    (3, TType.I64, 'toDate', None, None, ), # 3
9277
  )
9278
 
9279
  def __init__(self, warehouseId=None, fromDate=None, toDate=None,):
9280
    self.warehouseId = warehouseId
9281
    self.fromDate = fromDate
9282
    self.toDate = toDate
9283
 
9284
  def read(self, iprot):
9285
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
9286
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
9287
      return
9288
    iprot.readStructBegin()
9289
    while True:
9290
      (fname, ftype, fid) = iprot.readFieldBegin()
9291
      if ftype == TType.STOP:
9292
        break
9293
      if fid == 1:
9294
        if ftype == TType.I64:
9295
          self.warehouseId = iprot.readI64();
9296
        else:
9297
          iprot.skip(ftype)
9298
      elif fid == 2:
9299
        if ftype == TType.I64:
9300
          self.fromDate = iprot.readI64();
9301
        else:
9302
          iprot.skip(ftype)
9303
      elif fid == 3:
9304
        if ftype == TType.I64:
9305
          self.toDate = iprot.readI64();
9306
        else:
9307
          iprot.skip(ftype)
9308
      else:
9309
        iprot.skip(ftype)
9310
      iprot.readFieldEnd()
9311
    iprot.readStructEnd()
9312
 
9313
  def write(self, oprot):
9314
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
9315
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
9316
      return
9317
    oprot.writeStructBegin('getReturnOrders_args')
9318
    if self.warehouseId != None:
9319
      oprot.writeFieldBegin('warehouseId', TType.I64, 1)
9320
      oprot.writeI64(self.warehouseId)
9321
      oprot.writeFieldEnd()
9322
    if self.fromDate != None:
9323
      oprot.writeFieldBegin('fromDate', TType.I64, 2)
9324
      oprot.writeI64(self.fromDate)
9325
      oprot.writeFieldEnd()
9326
    if self.toDate != None:
9327
      oprot.writeFieldBegin('toDate', TType.I64, 3)
9328
      oprot.writeI64(self.toDate)
9329
      oprot.writeFieldEnd()
9330
    oprot.writeFieldStop()
9331
    oprot.writeStructEnd()
9332
 
9333
  def __repr__(self):
9334
    L = ['%s=%r' % (key, value)
9335
      for key, value in self.__dict__.iteritems()]
9336
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
9337
 
9338
  def __eq__(self, other):
9339
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
9340
 
9341
  def __ne__(self, other):
9342
    return not (self == other)
9343
 
9344
class getReturnOrders_result:
9345
  """
9346
  Attributes:
9347
   - success
9348
  """
9349
 
9350
  thrift_spec = (
9351
    (0, TType.LIST, 'success', (TType.STRUCT,(ReturnOrder, ReturnOrder.thrift_spec)), None, ), # 0
9352
  )
9353
 
9354
  def __init__(self, success=None,):
9355
    self.success = success
9356
 
9357
  def read(self, iprot):
9358
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
9359
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
9360
      return
9361
    iprot.readStructBegin()
9362
    while True:
9363
      (fname, ftype, fid) = iprot.readFieldBegin()
9364
      if ftype == TType.STOP:
9365
        break
9366
      if fid == 0:
9367
        if ftype == TType.LIST:
9368
          self.success = []
3014 chandransh 9369
          (_etype181, _size178) = iprot.readListBegin()
9370
          for _i182 in xrange(_size178):
9371
            _elem183 = ReturnOrder()
9372
            _elem183.read(iprot)
9373
            self.success.append(_elem183)
2690 chandransh 9374
          iprot.readListEnd()
9375
        else:
9376
          iprot.skip(ftype)
9377
      else:
9378
        iprot.skip(ftype)
9379
      iprot.readFieldEnd()
9380
    iprot.readStructEnd()
9381
 
9382
  def write(self, oprot):
9383
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
9384
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
9385
      return
9386
    oprot.writeStructBegin('getReturnOrders_result')
9387
    if self.success != None:
9388
      oprot.writeFieldBegin('success', TType.LIST, 0)
9389
      oprot.writeListBegin(TType.STRUCT, len(self.success))
3014 chandransh 9390
      for iter184 in self.success:
9391
        iter184.write(oprot)
2690 chandransh 9392
      oprot.writeListEnd()
9393
      oprot.writeFieldEnd()
9394
    oprot.writeFieldStop()
9395
    oprot.writeStructEnd()
9396
 
9397
  def __repr__(self):
9398
    L = ['%s=%r' % (key, value)
9399
      for key, value in self.__dict__.iteritems()]
9400
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
9401
 
9402
  def __eq__(self, other):
9403
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
9404
 
9405
  def __ne__(self, other):
9406
    return not (self == other)
9407
 
2700 chandransh 9408
class getReturnOrder_args:
9409
  """
9410
  Attributes:
9411
   - id
9412
  """
9413
 
9414
  thrift_spec = (
9415
    None, # 0
9416
    (1, TType.I64, 'id', None, None, ), # 1
9417
  )
9418
 
9419
  def __init__(self, id=None,):
9420
    self.id = id
9421
 
9422
  def read(self, iprot):
9423
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
9424
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
9425
      return
9426
    iprot.readStructBegin()
9427
    while True:
9428
      (fname, ftype, fid) = iprot.readFieldBegin()
9429
      if ftype == TType.STOP:
9430
        break
9431
      if fid == 1:
9432
        if ftype == TType.I64:
9433
          self.id = iprot.readI64();
9434
        else:
9435
          iprot.skip(ftype)
9436
      else:
9437
        iprot.skip(ftype)
9438
      iprot.readFieldEnd()
9439
    iprot.readStructEnd()
9440
 
9441
  def write(self, oprot):
9442
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
9443
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
9444
      return
9445
    oprot.writeStructBegin('getReturnOrder_args')
9446
    if self.id != None:
9447
      oprot.writeFieldBegin('id', TType.I64, 1)
9448
      oprot.writeI64(self.id)
9449
      oprot.writeFieldEnd()
9450
    oprot.writeFieldStop()
9451
    oprot.writeStructEnd()
9452
 
9453
  def __repr__(self):
9454
    L = ['%s=%r' % (key, value)
9455
      for key, value in self.__dict__.iteritems()]
9456
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
9457
 
9458
  def __eq__(self, other):
9459
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
9460
 
9461
  def __ne__(self, other):
9462
    return not (self == other)
9463
 
9464
class getReturnOrder_result:
9465
  """
9466
  Attributes:
9467
   - success
9468
   - ex
9469
  """
9470
 
9471
  thrift_spec = (
9472
    (0, TType.STRUCT, 'success', (ReturnOrder, ReturnOrder.thrift_spec), None, ), # 0
9473
    (1, TType.STRUCT, 'ex', (TransactionServiceException, TransactionServiceException.thrift_spec), None, ), # 1
9474
  )
9475
 
9476
  def __init__(self, success=None, ex=None,):
9477
    self.success = success
9478
    self.ex = ex
9479
 
9480
  def read(self, iprot):
9481
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
9482
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
9483
      return
9484
    iprot.readStructBegin()
9485
    while True:
9486
      (fname, ftype, fid) = iprot.readFieldBegin()
9487
      if ftype == TType.STOP:
9488
        break
9489
      if fid == 0:
9490
        if ftype == TType.STRUCT:
9491
          self.success = ReturnOrder()
9492
          self.success.read(iprot)
9493
        else:
9494
          iprot.skip(ftype)
9495
      elif fid == 1:
9496
        if ftype == TType.STRUCT:
9497
          self.ex = TransactionServiceException()
9498
          self.ex.read(iprot)
9499
        else:
9500
          iprot.skip(ftype)
9501
      else:
9502
        iprot.skip(ftype)
9503
      iprot.readFieldEnd()
9504
    iprot.readStructEnd()
9505
 
9506
  def write(self, oprot):
9507
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
9508
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
9509
      return
9510
    oprot.writeStructBegin('getReturnOrder_result')
9511
    if self.success != None:
9512
      oprot.writeFieldBegin('success', TType.STRUCT, 0)
9513
      self.success.write(oprot)
9514
      oprot.writeFieldEnd()
9515
    if self.ex != None:
9516
      oprot.writeFieldBegin('ex', TType.STRUCT, 1)
9517
      self.ex.write(oprot)
9518
      oprot.writeFieldEnd()
9519
    oprot.writeFieldStop()
9520
    oprot.writeStructEnd()
9521
 
9522
  def __repr__(self):
9523
    L = ['%s=%r' % (key, value)
9524
      for key, value in self.__dict__.iteritems()]
9525
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
9526
 
9527
  def __eq__(self, other):
9528
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
9529
 
9530
  def __ne__(self, other):
9531
    return not (self == other)
9532
 
2690 chandransh 9533
class processReturn_args:
9534
  """
9535
  Attributes:
9536
   - returnOrderId
9537
  """
9538
 
9539
  thrift_spec = (
9540
    None, # 0
9541
    (1, TType.I64, 'returnOrderId', None, None, ), # 1
9542
  )
9543
 
9544
  def __init__(self, returnOrderId=None,):
9545
    self.returnOrderId = returnOrderId
9546
 
9547
  def read(self, iprot):
9548
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
9549
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
9550
      return
9551
    iprot.readStructBegin()
9552
    while True:
9553
      (fname, ftype, fid) = iprot.readFieldBegin()
9554
      if ftype == TType.STOP:
9555
        break
9556
      if fid == 1:
9557
        if ftype == TType.I64:
9558
          self.returnOrderId = iprot.readI64();
9559
        else:
9560
          iprot.skip(ftype)
9561
      else:
9562
        iprot.skip(ftype)
9563
      iprot.readFieldEnd()
9564
    iprot.readStructEnd()
9565
 
9566
  def write(self, oprot):
9567
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
9568
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
9569
      return
9570
    oprot.writeStructBegin('processReturn_args')
9571
    if self.returnOrderId != None:
9572
      oprot.writeFieldBegin('returnOrderId', TType.I64, 1)
9573
      oprot.writeI64(self.returnOrderId)
9574
      oprot.writeFieldEnd()
9575
    oprot.writeFieldStop()
9576
    oprot.writeStructEnd()
9577
 
9578
  def __repr__(self):
9579
    L = ['%s=%r' % (key, value)
9580
      for key, value in self.__dict__.iteritems()]
9581
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
9582
 
9583
  def __eq__(self, other):
9584
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
9585
 
9586
  def __ne__(self, other):
9587
    return not (self == other)
9588
 
9589
class processReturn_result:
9590
  """
9591
  Attributes:
9592
   - ex
9593
  """
9594
 
9595
  thrift_spec = (
9596
    None, # 0
9597
    (1, TType.STRUCT, 'ex', (TransactionServiceException, TransactionServiceException.thrift_spec), None, ), # 1
9598
  )
9599
 
9600
  def __init__(self, ex=None,):
9601
    self.ex = ex
9602
 
9603
  def read(self, iprot):
9604
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
9605
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
9606
      return
9607
    iprot.readStructBegin()
9608
    while True:
9609
      (fname, ftype, fid) = iprot.readFieldBegin()
9610
      if ftype == TType.STOP:
9611
        break
9612
      if fid == 1:
9613
        if ftype == TType.STRUCT:
9614
          self.ex = TransactionServiceException()
9615
          self.ex.read(iprot)
9616
        else:
9617
          iprot.skip(ftype)
9618
      else:
9619
        iprot.skip(ftype)
9620
      iprot.readFieldEnd()
9621
    iprot.readStructEnd()
9622
 
9623
  def write(self, oprot):
9624
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
9625
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
9626
      return
9627
    oprot.writeStructBegin('processReturn_result')
9628
    if self.ex != None:
9629
      oprot.writeFieldBegin('ex', TType.STRUCT, 1)
9630
      self.ex.write(oprot)
9631
      oprot.writeFieldEnd()
9632
    oprot.writeFieldStop()
9633
    oprot.writeStructEnd()
9634
 
9635
  def __repr__(self):
9636
    L = ['%s=%r' % (key, value)
9637
      for key, value in self.__dict__.iteritems()]
9638
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
9639
 
9640
  def __eq__(self, other):
9641
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
9642
 
9643
  def __ne__(self, other):
9644
    return not (self == other)
9645
 
2819 chandransh 9646
class createPurchaseOrder_args:
9647
  """
9648
  Attributes:
9649
   - warehouseId
9650
  """
2690 chandransh 9651
 
2819 chandransh 9652
  thrift_spec = (
9653
    None, # 0
9654
    (1, TType.I64, 'warehouseId', None, None, ), # 1
9655
  )
9656
 
9657
  def __init__(self, warehouseId=None,):
9658
    self.warehouseId = warehouseId
9659
 
9660
  def read(self, iprot):
9661
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
9662
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
9663
      return
9664
    iprot.readStructBegin()
9665
    while True:
9666
      (fname, ftype, fid) = iprot.readFieldBegin()
9667
      if ftype == TType.STOP:
9668
        break
9669
      if fid == 1:
9670
        if ftype == TType.I64:
9671
          self.warehouseId = iprot.readI64();
9672
        else:
9673
          iprot.skip(ftype)
9674
      else:
9675
        iprot.skip(ftype)
9676
      iprot.readFieldEnd()
9677
    iprot.readStructEnd()
9678
 
9679
  def write(self, oprot):
9680
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
9681
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
9682
      return
9683
    oprot.writeStructBegin('createPurchaseOrder_args')
9684
    if self.warehouseId != None:
9685
      oprot.writeFieldBegin('warehouseId', TType.I64, 1)
9686
      oprot.writeI64(self.warehouseId)
9687
      oprot.writeFieldEnd()
9688
    oprot.writeFieldStop()
9689
    oprot.writeStructEnd()
9690
 
9691
  def __repr__(self):
9692
    L = ['%s=%r' % (key, value)
9693
      for key, value in self.__dict__.iteritems()]
9694
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
9695
 
9696
  def __eq__(self, other):
9697
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
9698
 
9699
  def __ne__(self, other):
9700
    return not (self == other)
9701
 
9702
class createPurchaseOrder_result:
9703
  """
9704
  Attributes:
9705
   - success
9706
   - ex
9707
  """
9708
 
9709
  thrift_spec = (
9710
    (0, TType.I64, 'success', None, None, ), # 0
9711
    (1, TType.STRUCT, 'ex', (TransactionServiceException, TransactionServiceException.thrift_spec), None, ), # 1
9712
  )
9713
 
9714
  def __init__(self, success=None, ex=None,):
9715
    self.success = success
9716
    self.ex = ex
9717
 
9718
  def read(self, iprot):
9719
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
9720
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
9721
      return
9722
    iprot.readStructBegin()
9723
    while True:
9724
      (fname, ftype, fid) = iprot.readFieldBegin()
9725
      if ftype == TType.STOP:
9726
        break
9727
      if fid == 0:
9728
        if ftype == TType.I64:
9729
          self.success = iprot.readI64();
9730
        else:
9731
          iprot.skip(ftype)
9732
      elif fid == 1:
9733
        if ftype == TType.STRUCT:
9734
          self.ex = TransactionServiceException()
9735
          self.ex.read(iprot)
9736
        else:
9737
          iprot.skip(ftype)
9738
      else:
9739
        iprot.skip(ftype)
9740
      iprot.readFieldEnd()
9741
    iprot.readStructEnd()
9742
 
9743
  def write(self, oprot):
9744
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
9745
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
9746
      return
9747
    oprot.writeStructBegin('createPurchaseOrder_result')
9748
    if self.success != None:
9749
      oprot.writeFieldBegin('success', TType.I64, 0)
9750
      oprot.writeI64(self.success)
9751
      oprot.writeFieldEnd()
9752
    if self.ex != None:
9753
      oprot.writeFieldBegin('ex', TType.STRUCT, 1)
9754
      self.ex.write(oprot)
9755
      oprot.writeFieldEnd()
9756
    oprot.writeFieldStop()
9757
    oprot.writeStructEnd()
9758
 
9759
  def __repr__(self):
9760
    L = ['%s=%r' % (key, value)
9761
      for key, value in self.__dict__.iteritems()]
9762
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
9763
 
9764
  def __eq__(self, other):
9765
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
9766
 
9767
  def __ne__(self, other):
9768
    return not (self == other)
9769
 
9770