Subversion Repositories SmartDukaan

Rev

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