Subversion Repositories SmartDukaan

Rev

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