Subversion Repositories SmartDukaan

Rev

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

Rev Author Line No. Line
94 ashish 1
#
2
# Autogenerated by Thrift
3
#
4
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
5
#
6
 
7
from thrift.Thrift import *
8
from ttypes import *
9
from thrift.Thrift import TProcessor
10
from thrift.transport import TTransport
11
from thrift.protocol import TBinaryProtocol
12
try:
13
  from thrift.protocol import fastbinary
14
except:
15
  fastbinary = None
16
 
17
 
18
class Iface:
19
  def createTransaction(self, transaction):
20
    """
21
    Parameters:
22
     - transaction
23
    """
24
    pass
25
 
26
  def getTransaction(self, id):
27
    """
28
    Parameters:
29
     - id
30
    """
31
    pass
32
 
33
  def getTransactionsForCustomer(self, customerId, from_date, to_date, status):
34
    """
35
    Parameters:
36
     - customerId
37
     - from_date
38
     - to_date
39
     - status
40
    """
41
    pass
42
 
132 ashish 43
  def getTransactionsForShoppingCartId(self, shoppingCartId):
44
    """
45
    Parameters:
46
     - shoppingCartId
47
    """
48
    pass
49
 
94 ashish 50
  def getTransactionStatus(self, transactionId):
51
    """
52
    Parameters:
53
     - transactionId
54
    """
55
    pass
56
 
57
  def changeTransactionStatus(self, transactionId, status, description):
58
    """
59
    Parameters:
60
     - transactionId
61
     - status
62
     - description
63
    """
64
    pass
65
 
483 rajveer 66
  def getAllOrders(self, status, from_date, to_date, warehouse_id):
94 ashish 67
    """
68
    Parameters:
483 rajveer 69
     - status
70
     - from_date
71
     - to_date
72
     - warehouse_id
94 ashish 73
    """
74
    pass
75
 
483 rajveer 76
  def changeOrderStatus(self, orderId, status, description):
94 ashish 77
    """
78
    Parameters:
483 rajveer 79
     - orderId
80
     - status
81
     - description
94 ashish 82
    """
83
    pass
84
 
494 rajveer 85
  def addBillingDetails(self, orderId, invoice_number, billed_by):
86
    """
87
    Parameters:
88
     - orderId
89
     - invoice_number
90
     - billed_by
91
    """
92
    pass
93
 
483 rajveer 94
  def getOrdersForTransaction(self, transactionId):
94 ashish 95
    """
96
    Parameters:
97
     - transactionId
98
    """
99
    pass
100
 
483 rajveer 101
  def getOrdersForCustomer(self, customerId, from_date, to_date, status):
94 ashish 102
    """
103
    Parameters:
483 rajveer 104
     - customerId
105
     - from_date
106
     - to_date
107
     - status
94 ashish 108
    """
109
    pass
110
 
483 rajveer 111
  def createOrder(self, order):
94 ashish 112
    """
113
    Parameters:
483 rajveer 114
     - order
94 ashish 115
    """
116
    pass
117
 
483 rajveer 118
  def getOrder(self, id):
94 ashish 119
    """
120
    Parameters:
483 rajveer 121
     - id
94 ashish 122
    """
123
    pass
124
 
483 rajveer 125
  def getLineItemsForOrder(self, orderId):
94 ashish 126
    """
127
    Parameters:
483 rajveer 128
     - orderId
94 ashish 129
    """
130
    pass
131
 
483 rajveer 132
  def getAlerts(self, orderId, valid):
94 ashish 133
    """
134
    Parameters:
483 rajveer 135
     - orderId
304 ashish 136
     - valid
137
    """
138
    pass
94 ashish 139
 
483 rajveer 140
  def setAlert(self, orderId, unset, type, comment):
304 ashish 141
    """
142
    Parameters:
483 rajveer 143
     - orderId
304 ashish 144
     - unset
145
     - type
146
     - comment
147
    """
148
    pass
149
 
150
 
94 ashish 151
class Client(Iface):
152
  def __init__(self, iprot, oprot=None):
153
    self._iprot = self._oprot = iprot
154
    if oprot != None:
155
      self._oprot = oprot
156
    self._seqid = 0
157
 
158
  def createTransaction(self, transaction):
159
    """
160
    Parameters:
161
     - transaction
162
    """
163
    self.send_createTransaction(transaction)
132 ashish 164
    return self.recv_createTransaction()
94 ashish 165
 
166
  def send_createTransaction(self, transaction):
167
    self._oprot.writeMessageBegin('createTransaction', TMessageType.CALL, self._seqid)
168
    args = createTransaction_args()
169
    args.transaction = transaction
170
    args.write(self._oprot)
171
    self._oprot.writeMessageEnd()
172
    self._oprot.trans.flush()
173
 
174
  def recv_createTransaction(self, ):
175
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
176
    if mtype == TMessageType.EXCEPTION:
177
      x = TApplicationException()
178
      x.read(self._iprot)
179
      self._iprot.readMessageEnd()
180
      raise x
181
    result = createTransaction_result()
182
    result.read(self._iprot)
183
    self._iprot.readMessageEnd()
132 ashish 184
    if result.success != None:
185
      return result.success
94 ashish 186
    if result.ex != None:
187
      raise result.ex
132 ashish 188
    raise TApplicationException(TApplicationException.MISSING_RESULT, "createTransaction failed: unknown result");
94 ashish 189
 
190
  def getTransaction(self, id):
191
    """
192
    Parameters:
193
     - id
194
    """
195
    self.send_getTransaction(id)
196
    return self.recv_getTransaction()
197
 
198
  def send_getTransaction(self, id):
199
    self._oprot.writeMessageBegin('getTransaction', TMessageType.CALL, self._seqid)
200
    args = getTransaction_args()
201
    args.id = id
202
    args.write(self._oprot)
203
    self._oprot.writeMessageEnd()
204
    self._oprot.trans.flush()
205
 
206
  def recv_getTransaction(self, ):
207
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
208
    if mtype == TMessageType.EXCEPTION:
209
      x = TApplicationException()
210
      x.read(self._iprot)
211
      self._iprot.readMessageEnd()
212
      raise x
213
    result = getTransaction_result()
214
    result.read(self._iprot)
215
    self._iprot.readMessageEnd()
216
    if result.success != None:
217
      return result.success
218
    if result.ex != None:
219
      raise result.ex
220
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getTransaction failed: unknown result");
221
 
222
  def getTransactionsForCustomer(self, customerId, from_date, to_date, status):
223
    """
224
    Parameters:
225
     - customerId
226
     - from_date
227
     - to_date
228
     - status
229
    """
230
    self.send_getTransactionsForCustomer(customerId, from_date, to_date, status)
231
    return self.recv_getTransactionsForCustomer()
232
 
233
  def send_getTransactionsForCustomer(self, customerId, from_date, to_date, status):
234
    self._oprot.writeMessageBegin('getTransactionsForCustomer', TMessageType.CALL, self._seqid)
235
    args = getTransactionsForCustomer_args()
236
    args.customerId = customerId
237
    args.from_date = from_date
238
    args.to_date = to_date
239
    args.status = status
240
    args.write(self._oprot)
241
    self._oprot.writeMessageEnd()
242
    self._oprot.trans.flush()
243
 
244
  def recv_getTransactionsForCustomer(self, ):
245
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
246
    if mtype == TMessageType.EXCEPTION:
247
      x = TApplicationException()
248
      x.read(self._iprot)
249
      self._iprot.readMessageEnd()
250
      raise x
251
    result = getTransactionsForCustomer_result()
252
    result.read(self._iprot)
253
    self._iprot.readMessageEnd()
254
    if result.success != None:
255
      return result.success
256
    if result.ex != None:
257
      raise result.ex
258
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getTransactionsForCustomer failed: unknown result");
259
 
132 ashish 260
  def getTransactionsForShoppingCartId(self, shoppingCartId):
261
    """
262
    Parameters:
263
     - shoppingCartId
264
    """
265
    self.send_getTransactionsForShoppingCartId(shoppingCartId)
266
    return self.recv_getTransactionsForShoppingCartId()
267
 
268
  def send_getTransactionsForShoppingCartId(self, shoppingCartId):
269
    self._oprot.writeMessageBegin('getTransactionsForShoppingCartId', TMessageType.CALL, self._seqid)
270
    args = getTransactionsForShoppingCartId_args()
271
    args.shoppingCartId = shoppingCartId
272
    args.write(self._oprot)
273
    self._oprot.writeMessageEnd()
274
    self._oprot.trans.flush()
275
 
276
  def recv_getTransactionsForShoppingCartId(self, ):
277
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
278
    if mtype == TMessageType.EXCEPTION:
279
      x = TApplicationException()
280
      x.read(self._iprot)
281
      self._iprot.readMessageEnd()
282
      raise x
283
    result = getTransactionsForShoppingCartId_result()
284
    result.read(self._iprot)
285
    self._iprot.readMessageEnd()
286
    if result.success != None:
287
      return result.success
288
    if result.ex != None:
289
      raise result.ex
290
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getTransactionsForShoppingCartId failed: unknown result");
291
 
94 ashish 292
  def getTransactionStatus(self, transactionId):
293
    """
294
    Parameters:
295
     - transactionId
296
    """
297
    self.send_getTransactionStatus(transactionId)
298
    return self.recv_getTransactionStatus()
299
 
300
  def send_getTransactionStatus(self, transactionId):
301
    self._oprot.writeMessageBegin('getTransactionStatus', TMessageType.CALL, self._seqid)
302
    args = getTransactionStatus_args()
303
    args.transactionId = transactionId
304
    args.write(self._oprot)
305
    self._oprot.writeMessageEnd()
306
    self._oprot.trans.flush()
307
 
308
  def recv_getTransactionStatus(self, ):
309
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
310
    if mtype == TMessageType.EXCEPTION:
311
      x = TApplicationException()
312
      x.read(self._iprot)
313
      self._iprot.readMessageEnd()
314
      raise x
315
    result = getTransactionStatus_result()
316
    result.read(self._iprot)
317
    self._iprot.readMessageEnd()
318
    if result.success != None:
319
      return result.success
320
    if result.ex != None:
321
      raise result.ex
322
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getTransactionStatus failed: unknown result");
323
 
324
  def changeTransactionStatus(self, transactionId, status, description):
325
    """
326
    Parameters:
327
     - transactionId
328
     - status
329
     - description
330
    """
331
    self.send_changeTransactionStatus(transactionId, status, description)
332
    return self.recv_changeTransactionStatus()
333
 
334
  def send_changeTransactionStatus(self, transactionId, status, description):
335
    self._oprot.writeMessageBegin('changeTransactionStatus', TMessageType.CALL, self._seqid)
336
    args = changeTransactionStatus_args()
337
    args.transactionId = transactionId
338
    args.status = status
339
    args.description = description
340
    args.write(self._oprot)
341
    self._oprot.writeMessageEnd()
342
    self._oprot.trans.flush()
343
 
344
  def recv_changeTransactionStatus(self, ):
345
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
346
    if mtype == TMessageType.EXCEPTION:
347
      x = TApplicationException()
348
      x.read(self._iprot)
349
      self._iprot.readMessageEnd()
350
      raise x
351
    result = changeTransactionStatus_result()
352
    result.read(self._iprot)
353
    self._iprot.readMessageEnd()
354
    if result.success != None:
355
      return result.success
356
    if result.ex != None:
357
      raise result.ex
358
    raise TApplicationException(TApplicationException.MISSING_RESULT, "changeTransactionStatus failed: unknown result");
359
 
483 rajveer 360
  def getAllOrders(self, status, from_date, to_date, warehouse_id):
94 ashish 361
    """
362
    Parameters:
483 rajveer 363
     - status
364
     - from_date
365
     - to_date
366
     - warehouse_id
94 ashish 367
    """
483 rajveer 368
    self.send_getAllOrders(status, from_date, to_date, warehouse_id)
369
    return self.recv_getAllOrders()
94 ashish 370
 
483 rajveer 371
  def send_getAllOrders(self, status, from_date, to_date, warehouse_id):
372
    self._oprot.writeMessageBegin('getAllOrders', TMessageType.CALL, self._seqid)
373
    args = getAllOrders_args()
374
    args.status = status
375
    args.from_date = from_date
376
    args.to_date = to_date
377
    args.warehouse_id = warehouse_id
94 ashish 378
    args.write(self._oprot)
379
    self._oprot.writeMessageEnd()
380
    self._oprot.trans.flush()
381
 
483 rajveer 382
  def recv_getAllOrders(self, ):
94 ashish 383
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
384
    if mtype == TMessageType.EXCEPTION:
385
      x = TApplicationException()
386
      x.read(self._iprot)
387
      self._iprot.readMessageEnd()
388
      raise x
483 rajveer 389
    result = getAllOrders_result()
94 ashish 390
    result.read(self._iprot)
391
    self._iprot.readMessageEnd()
392
    if result.success != None:
393
      return result.success
394
    if result.ex != None:
395
      raise result.ex
483 rajveer 396
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getAllOrders failed: unknown result");
94 ashish 397
 
483 rajveer 398
  def changeOrderStatus(self, orderId, status, description):
94 ashish 399
    """
400
    Parameters:
483 rajveer 401
     - orderId
402
     - status
403
     - description
94 ashish 404
    """
483 rajveer 405
    self.send_changeOrderStatus(orderId, status, description)
406
    return self.recv_changeOrderStatus()
94 ashish 407
 
483 rajveer 408
  def send_changeOrderStatus(self, orderId, status, description):
409
    self._oprot.writeMessageBegin('changeOrderStatus', TMessageType.CALL, self._seqid)
410
    args = changeOrderStatus_args()
411
    args.orderId = orderId
412
    args.status = status
413
    args.description = description
94 ashish 414
    args.write(self._oprot)
415
    self._oprot.writeMessageEnd()
416
    self._oprot.trans.flush()
417
 
483 rajveer 418
  def recv_changeOrderStatus(self, ):
94 ashish 419
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
420
    if mtype == TMessageType.EXCEPTION:
421
      x = TApplicationException()
422
      x.read(self._iprot)
423
      self._iprot.readMessageEnd()
424
      raise x
483 rajveer 425
    result = changeOrderStatus_result()
94 ashish 426
    result.read(self._iprot)
427
    self._iprot.readMessageEnd()
428
    if result.success != None:
429
      return result.success
430
    if result.ex != None:
431
      raise result.ex
483 rajveer 432
    raise TApplicationException(TApplicationException.MISSING_RESULT, "changeOrderStatus failed: unknown result");
94 ashish 433
 
494 rajveer 434
  def addBillingDetails(self, orderId, invoice_number, billed_by):
435
    """
436
    Parameters:
437
     - orderId
438
     - invoice_number
439
     - billed_by
440
    """
441
    self.send_addBillingDetails(orderId, invoice_number, billed_by)
442
    return self.recv_addBillingDetails()
443
 
444
  def send_addBillingDetails(self, orderId, invoice_number, billed_by):
445
    self._oprot.writeMessageBegin('addBillingDetails', TMessageType.CALL, self._seqid)
446
    args = addBillingDetails_args()
447
    args.orderId = orderId
448
    args.invoice_number = invoice_number
449
    args.billed_by = billed_by
450
    args.write(self._oprot)
451
    self._oprot.writeMessageEnd()
452
    self._oprot.trans.flush()
453
 
454
  def recv_addBillingDetails(self, ):
455
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
456
    if mtype == TMessageType.EXCEPTION:
457
      x = TApplicationException()
458
      x.read(self._iprot)
459
      self._iprot.readMessageEnd()
460
      raise x
461
    result = addBillingDetails_result()
462
    result.read(self._iprot)
463
    self._iprot.readMessageEnd()
464
    if result.success != None:
465
      return result.success
466
    if result.ex != None:
467
      raise result.ex
468
    raise TApplicationException(TApplicationException.MISSING_RESULT, "addBillingDetails failed: unknown result");
469
 
483 rajveer 470
  def getOrdersForTransaction(self, transactionId):
94 ashish 471
    """
472
    Parameters:
473
     - transactionId
474
    """
483 rajveer 475
    self.send_getOrdersForTransaction(transactionId)
476
    return self.recv_getOrdersForTransaction()
94 ashish 477
 
483 rajveer 478
  def send_getOrdersForTransaction(self, transactionId):
479
    self._oprot.writeMessageBegin('getOrdersForTransaction', TMessageType.CALL, self._seqid)
480
    args = getOrdersForTransaction_args()
94 ashish 481
    args.transactionId = transactionId
482
    args.write(self._oprot)
483
    self._oprot.writeMessageEnd()
484
    self._oprot.trans.flush()
485
 
483 rajveer 486
  def recv_getOrdersForTransaction(self, ):
94 ashish 487
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
488
    if mtype == TMessageType.EXCEPTION:
489
      x = TApplicationException()
490
      x.read(self._iprot)
491
      self._iprot.readMessageEnd()
492
      raise x
483 rajveer 493
    result = getOrdersForTransaction_result()
94 ashish 494
    result.read(self._iprot)
495
    self._iprot.readMessageEnd()
496
    if result.success != None:
497
      return result.success
498
    if result.ex != None:
499
      raise result.ex
483 rajveer 500
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getOrdersForTransaction failed: unknown result");
94 ashish 501
 
483 rajveer 502
  def getOrdersForCustomer(self, customerId, from_date, to_date, status):
94 ashish 503
    """
504
    Parameters:
483 rajveer 505
     - customerId
506
     - from_date
507
     - to_date
508
     - status
94 ashish 509
    """
483 rajveer 510
    self.send_getOrdersForCustomer(customerId, from_date, to_date, status)
511
    return self.recv_getOrdersForCustomer()
94 ashish 512
 
483 rajveer 513
  def send_getOrdersForCustomer(self, customerId, from_date, to_date, status):
514
    self._oprot.writeMessageBegin('getOrdersForCustomer', TMessageType.CALL, self._seqid)
515
    args = getOrdersForCustomer_args()
516
    args.customerId = customerId
517
    args.from_date = from_date
518
    args.to_date = to_date
519
    args.status = status
94 ashish 520
    args.write(self._oprot)
521
    self._oprot.writeMessageEnd()
522
    self._oprot.trans.flush()
523
 
483 rajveer 524
  def recv_getOrdersForCustomer(self, ):
94 ashish 525
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
526
    if mtype == TMessageType.EXCEPTION:
527
      x = TApplicationException()
528
      x.read(self._iprot)
529
      self._iprot.readMessageEnd()
530
      raise x
483 rajveer 531
    result = getOrdersForCustomer_result()
94 ashish 532
    result.read(self._iprot)
533
    self._iprot.readMessageEnd()
534
    if result.success != None:
535
      return result.success
536
    if result.ex != None:
537
      raise result.ex
483 rajveer 538
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getOrdersForCustomer failed: unknown result");
94 ashish 539
 
483 rajveer 540
  def createOrder(self, order):
94 ashish 541
    """
542
    Parameters:
483 rajveer 543
     - order
94 ashish 544
    """
483 rajveer 545
    self.send_createOrder(order)
546
    return self.recv_createOrder()
94 ashish 547
 
483 rajveer 548
  def send_createOrder(self, order):
549
    self._oprot.writeMessageBegin('createOrder', TMessageType.CALL, self._seqid)
550
    args = createOrder_args()
551
    args.order = order
94 ashish 552
    args.write(self._oprot)
553
    self._oprot.writeMessageEnd()
554
    self._oprot.trans.flush()
555
 
483 rajveer 556
  def recv_createOrder(self, ):
94 ashish 557
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
558
    if mtype == TMessageType.EXCEPTION:
559
      x = TApplicationException()
560
      x.read(self._iprot)
561
      self._iprot.readMessageEnd()
562
      raise x
483 rajveer 563
    result = createOrder_result()
94 ashish 564
    result.read(self._iprot)
565
    self._iprot.readMessageEnd()
566
    if result.success != None:
567
      return result.success
568
    if result.ex != None:
569
      raise result.ex
483 rajveer 570
    raise TApplicationException(TApplicationException.MISSING_RESULT, "createOrder failed: unknown result");
94 ashish 571
 
483 rajveer 572
  def getOrder(self, id):
94 ashish 573
    """
574
    Parameters:
483 rajveer 575
     - id
94 ashish 576
    """
483 rajveer 577
    self.send_getOrder(id)
578
    return self.recv_getOrder()
94 ashish 579
 
483 rajveer 580
  def send_getOrder(self, id):
581
    self._oprot.writeMessageBegin('getOrder', TMessageType.CALL, self._seqid)
582
    args = getOrder_args()
583
    args.id = id
94 ashish 584
    args.write(self._oprot)
585
    self._oprot.writeMessageEnd()
586
    self._oprot.trans.flush()
587
 
483 rajveer 588
  def recv_getOrder(self, ):
94 ashish 589
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
590
    if mtype == TMessageType.EXCEPTION:
591
      x = TApplicationException()
592
      x.read(self._iprot)
593
      self._iprot.readMessageEnd()
594
      raise x
483 rajveer 595
    result = getOrder_result()
94 ashish 596
    result.read(self._iprot)
597
    self._iprot.readMessageEnd()
598
    if result.success != None:
599
      return result.success
600
    if result.ex != None:
601
      raise result.ex
483 rajveer 602
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getOrder failed: unknown result");
94 ashish 603
 
483 rajveer 604
  def getLineItemsForOrder(self, orderId):
94 ashish 605
    """
606
    Parameters:
483 rajveer 607
     - orderId
94 ashish 608
    """
483 rajveer 609
    self.send_getLineItemsForOrder(orderId)
610
    return self.recv_getLineItemsForOrder()
94 ashish 611
 
483 rajveer 612
  def send_getLineItemsForOrder(self, orderId):
613
    self._oprot.writeMessageBegin('getLineItemsForOrder', TMessageType.CALL, self._seqid)
614
    args = getLineItemsForOrder_args()
615
    args.orderId = orderId
94 ashish 616
    args.write(self._oprot)
617
    self._oprot.writeMessageEnd()
618
    self._oprot.trans.flush()
619
 
483 rajveer 620
  def recv_getLineItemsForOrder(self, ):
94 ashish 621
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
622
    if mtype == TMessageType.EXCEPTION:
623
      x = TApplicationException()
624
      x.read(self._iprot)
625
      self._iprot.readMessageEnd()
626
      raise x
483 rajveer 627
    result = getLineItemsForOrder_result()
94 ashish 628
    result.read(self._iprot)
629
    self._iprot.readMessageEnd()
630
    if result.success != None:
631
      return result.success
632
    if result.ex != None:
633
      raise result.ex
483 rajveer 634
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getLineItemsForOrder failed: unknown result");
94 ashish 635
 
483 rajveer 636
  def getAlerts(self, orderId, valid):
94 ashish 637
    """
638
    Parameters:
483 rajveer 639
     - orderId
304 ashish 640
     - valid
641
    """
483 rajveer 642
    self.send_getAlerts(orderId, valid)
304 ashish 643
    return self.recv_getAlerts()
94 ashish 644
 
483 rajveer 645
  def send_getAlerts(self, orderId, valid):
304 ashish 646
    self._oprot.writeMessageBegin('getAlerts', TMessageType.CALL, self._seqid)
647
    args = getAlerts_args()
483 rajveer 648
    args.orderId = orderId
304 ashish 649
    args.valid = valid
650
    args.write(self._oprot)
651
    self._oprot.writeMessageEnd()
652
    self._oprot.trans.flush()
653
 
654
  def recv_getAlerts(self, ):
655
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
656
    if mtype == TMessageType.EXCEPTION:
657
      x = TApplicationException()
658
      x.read(self._iprot)
659
      self._iprot.readMessageEnd()
660
      raise x
661
    result = getAlerts_result()
662
    result.read(self._iprot)
663
    self._iprot.readMessageEnd()
664
    if result.success != None:
665
      return result.success
666
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getAlerts failed: unknown result");
667
 
483 rajveer 668
  def setAlert(self, orderId, unset, type, comment):
304 ashish 669
    """
670
    Parameters:
483 rajveer 671
     - orderId
304 ashish 672
     - unset
673
     - type
674
     - comment
675
    """
483 rajveer 676
    self.send_setAlert(orderId, unset, type, comment)
304 ashish 677
    self.recv_setAlert()
678
 
483 rajveer 679
  def send_setAlert(self, orderId, unset, type, comment):
304 ashish 680
    self._oprot.writeMessageBegin('setAlert', TMessageType.CALL, self._seqid)
681
    args = setAlert_args()
483 rajveer 682
    args.orderId = orderId
304 ashish 683
    args.unset = unset
684
    args.type = type
685
    args.comment = comment
686
    args.write(self._oprot)
687
    self._oprot.writeMessageEnd()
688
    self._oprot.trans.flush()
689
 
690
  def recv_setAlert(self, ):
691
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
692
    if mtype == TMessageType.EXCEPTION:
693
      x = TApplicationException()
694
      x.read(self._iprot)
695
      self._iprot.readMessageEnd()
696
      raise x
697
    result = setAlert_result()
698
    result.read(self._iprot)
699
    self._iprot.readMessageEnd()
700
    return
701
 
702
 
94 ashish 703
class Processor(Iface, TProcessor):
704
  def __init__(self, handler):
705
    self._handler = handler
706
    self._processMap = {}
707
    self._processMap["createTransaction"] = Processor.process_createTransaction
708
    self._processMap["getTransaction"] = Processor.process_getTransaction
709
    self._processMap["getTransactionsForCustomer"] = Processor.process_getTransactionsForCustomer
132 ashish 710
    self._processMap["getTransactionsForShoppingCartId"] = Processor.process_getTransactionsForShoppingCartId
94 ashish 711
    self._processMap["getTransactionStatus"] = Processor.process_getTransactionStatus
712
    self._processMap["changeTransactionStatus"] = Processor.process_changeTransactionStatus
483 rajveer 713
    self._processMap["getAllOrders"] = Processor.process_getAllOrders
714
    self._processMap["changeOrderStatus"] = Processor.process_changeOrderStatus
494 rajveer 715
    self._processMap["addBillingDetails"] = Processor.process_addBillingDetails
483 rajveer 716
    self._processMap["getOrdersForTransaction"] = Processor.process_getOrdersForTransaction
717
    self._processMap["getOrdersForCustomer"] = Processor.process_getOrdersForCustomer
718
    self._processMap["createOrder"] = Processor.process_createOrder
719
    self._processMap["getOrder"] = Processor.process_getOrder
720
    self._processMap["getLineItemsForOrder"] = Processor.process_getLineItemsForOrder
304 ashish 721
    self._processMap["getAlerts"] = Processor.process_getAlerts
722
    self._processMap["setAlert"] = Processor.process_setAlert
94 ashish 723
 
724
  def process(self, iprot, oprot):
725
    (name, type, seqid) = iprot.readMessageBegin()
726
    if name not in self._processMap:
727
      iprot.skip(TType.STRUCT)
728
      iprot.readMessageEnd()
729
      x = TApplicationException(TApplicationException.UNKNOWN_METHOD, 'Unknown function %s' % (name))
730
      oprot.writeMessageBegin(name, TMessageType.EXCEPTION, seqid)
731
      x.write(oprot)
732
      oprot.writeMessageEnd()
733
      oprot.trans.flush()
734
      return
735
    else:
736
      self._processMap[name](self, seqid, iprot, oprot)
737
    return True
738
 
739
  def process_createTransaction(self, seqid, iprot, oprot):
740
    args = createTransaction_args()
741
    args.read(iprot)
742
    iprot.readMessageEnd()
743
    result = createTransaction_result()
744
    try:
132 ashish 745
      result.success = self._handler.createTransaction(args.transaction)
94 ashish 746
    except TransactionServiceException, ex:
747
      result.ex = ex
748
    oprot.writeMessageBegin("createTransaction", TMessageType.REPLY, seqid)
749
    result.write(oprot)
750
    oprot.writeMessageEnd()
751
    oprot.trans.flush()
752
 
753
  def process_getTransaction(self, seqid, iprot, oprot):
754
    args = getTransaction_args()
755
    args.read(iprot)
756
    iprot.readMessageEnd()
757
    result = getTransaction_result()
758
    try:
759
      result.success = self._handler.getTransaction(args.id)
760
    except TransactionServiceException, ex:
761
      result.ex = ex
762
    oprot.writeMessageBegin("getTransaction", TMessageType.REPLY, seqid)
763
    result.write(oprot)
764
    oprot.writeMessageEnd()
765
    oprot.trans.flush()
766
 
767
  def process_getTransactionsForCustomer(self, seqid, iprot, oprot):
768
    args = getTransactionsForCustomer_args()
769
    args.read(iprot)
770
    iprot.readMessageEnd()
771
    result = getTransactionsForCustomer_result()
772
    try:
773
      result.success = self._handler.getTransactionsForCustomer(args.customerId, args.from_date, args.to_date, args.status)
774
    except TransactionServiceException, ex:
775
      result.ex = ex
776
    oprot.writeMessageBegin("getTransactionsForCustomer", TMessageType.REPLY, seqid)
777
    result.write(oprot)
778
    oprot.writeMessageEnd()
779
    oprot.trans.flush()
780
 
132 ashish 781
  def process_getTransactionsForShoppingCartId(self, seqid, iprot, oprot):
782
    args = getTransactionsForShoppingCartId_args()
783
    args.read(iprot)
784
    iprot.readMessageEnd()
785
    result = getTransactionsForShoppingCartId_result()
786
    try:
787
      result.success = self._handler.getTransactionsForShoppingCartId(args.shoppingCartId)
788
    except TransactionServiceException, ex:
789
      result.ex = ex
790
    oprot.writeMessageBegin("getTransactionsForShoppingCartId", TMessageType.REPLY, seqid)
791
    result.write(oprot)
792
    oprot.writeMessageEnd()
793
    oprot.trans.flush()
794
 
94 ashish 795
  def process_getTransactionStatus(self, seqid, iprot, oprot):
796
    args = getTransactionStatus_args()
797
    args.read(iprot)
798
    iprot.readMessageEnd()
799
    result = getTransactionStatus_result()
800
    try:
801
      result.success = self._handler.getTransactionStatus(args.transactionId)
802
    except TransactionServiceException, ex:
803
      result.ex = ex
804
    oprot.writeMessageBegin("getTransactionStatus", TMessageType.REPLY, seqid)
805
    result.write(oprot)
806
    oprot.writeMessageEnd()
807
    oprot.trans.flush()
808
 
809
  def process_changeTransactionStatus(self, seqid, iprot, oprot):
810
    args = changeTransactionStatus_args()
811
    args.read(iprot)
812
    iprot.readMessageEnd()
813
    result = changeTransactionStatus_result()
814
    try:
815
      result.success = self._handler.changeTransactionStatus(args.transactionId, args.status, args.description)
816
    except TransactionServiceException, ex:
817
      result.ex = ex
818
    oprot.writeMessageBegin("changeTransactionStatus", TMessageType.REPLY, seqid)
819
    result.write(oprot)
820
    oprot.writeMessageEnd()
821
    oprot.trans.flush()
822
 
483 rajveer 823
  def process_getAllOrders(self, seqid, iprot, oprot):
824
    args = getAllOrders_args()
94 ashish 825
    args.read(iprot)
826
    iprot.readMessageEnd()
483 rajveer 827
    result = getAllOrders_result()
94 ashish 828
    try:
483 rajveer 829
      result.success = self._handler.getAllOrders(args.status, args.from_date, args.to_date, args.warehouse_id)
94 ashish 830
    except TransactionServiceException, ex:
831
      result.ex = ex
483 rajveer 832
    oprot.writeMessageBegin("getAllOrders", TMessageType.REPLY, seqid)
94 ashish 833
    result.write(oprot)
834
    oprot.writeMessageEnd()
835
    oprot.trans.flush()
836
 
483 rajveer 837
  def process_changeOrderStatus(self, seqid, iprot, oprot):
838
    args = changeOrderStatus_args()
94 ashish 839
    args.read(iprot)
840
    iprot.readMessageEnd()
483 rajveer 841
    result = changeOrderStatus_result()
94 ashish 842
    try:
483 rajveer 843
      result.success = self._handler.changeOrderStatus(args.orderId, args.status, args.description)
94 ashish 844
    except TransactionServiceException, ex:
845
      result.ex = ex
483 rajveer 846
    oprot.writeMessageBegin("changeOrderStatus", TMessageType.REPLY, seqid)
94 ashish 847
    result.write(oprot)
848
    oprot.writeMessageEnd()
849
    oprot.trans.flush()
850
 
494 rajveer 851
  def process_addBillingDetails(self, seqid, iprot, oprot):
852
    args = addBillingDetails_args()
853
    args.read(iprot)
854
    iprot.readMessageEnd()
855
    result = addBillingDetails_result()
856
    try:
857
      result.success = self._handler.addBillingDetails(args.orderId, args.invoice_number, args.billed_by)
858
    except TransactionServiceException, ex:
859
      result.ex = ex
860
    oprot.writeMessageBegin("addBillingDetails", TMessageType.REPLY, seqid)
861
    result.write(oprot)
862
    oprot.writeMessageEnd()
863
    oprot.trans.flush()
864
 
483 rajveer 865
  def process_getOrdersForTransaction(self, seqid, iprot, oprot):
866
    args = getOrdersForTransaction_args()
94 ashish 867
    args.read(iprot)
868
    iprot.readMessageEnd()
483 rajveer 869
    result = getOrdersForTransaction_result()
94 ashish 870
    try:
483 rajveer 871
      result.success = self._handler.getOrdersForTransaction(args.transactionId)
94 ashish 872
    except TransactionServiceException, ex:
873
      result.ex = ex
483 rajveer 874
    oprot.writeMessageBegin("getOrdersForTransaction", TMessageType.REPLY, seqid)
94 ashish 875
    result.write(oprot)
876
    oprot.writeMessageEnd()
877
    oprot.trans.flush()
878
 
483 rajveer 879
  def process_getOrdersForCustomer(self, seqid, iprot, oprot):
880
    args = getOrdersForCustomer_args()
94 ashish 881
    args.read(iprot)
882
    iprot.readMessageEnd()
483 rajveer 883
    result = getOrdersForCustomer_result()
94 ashish 884
    try:
483 rajveer 885
      result.success = self._handler.getOrdersForCustomer(args.customerId, args.from_date, args.to_date, args.status)
94 ashish 886
    except TransactionServiceException, ex:
887
      result.ex = ex
483 rajveer 888
    oprot.writeMessageBegin("getOrdersForCustomer", TMessageType.REPLY, seqid)
94 ashish 889
    result.write(oprot)
890
    oprot.writeMessageEnd()
891
    oprot.trans.flush()
892
 
483 rajveer 893
  def process_createOrder(self, seqid, iprot, oprot):
894
    args = createOrder_args()
94 ashish 895
    args.read(iprot)
896
    iprot.readMessageEnd()
483 rajveer 897
    result = createOrder_result()
94 ashish 898
    try:
483 rajveer 899
      result.success = self._handler.createOrder(args.order)
94 ashish 900
    except TransactionServiceException, ex:
901
      result.ex = ex
483 rajveer 902
    oprot.writeMessageBegin("createOrder", TMessageType.REPLY, seqid)
94 ashish 903
    result.write(oprot)
904
    oprot.writeMessageEnd()
905
    oprot.trans.flush()
906
 
483 rajveer 907
  def process_getOrder(self, seqid, iprot, oprot):
908
    args = getOrder_args()
94 ashish 909
    args.read(iprot)
910
    iprot.readMessageEnd()
483 rajveer 911
    result = getOrder_result()
94 ashish 912
    try:
483 rajveer 913
      result.success = self._handler.getOrder(args.id)
94 ashish 914
    except TransactionServiceException, ex:
915
      result.ex = ex
483 rajveer 916
    oprot.writeMessageBegin("getOrder", TMessageType.REPLY, seqid)
94 ashish 917
    result.write(oprot)
918
    oprot.writeMessageEnd()
919
    oprot.trans.flush()
920
 
483 rajveer 921
  def process_getLineItemsForOrder(self, seqid, iprot, oprot):
922
    args = getLineItemsForOrder_args()
94 ashish 923
    args.read(iprot)
924
    iprot.readMessageEnd()
483 rajveer 925
    result = getLineItemsForOrder_result()
94 ashish 926
    try:
483 rajveer 927
      result.success = self._handler.getLineItemsForOrder(args.orderId)
94 ashish 928
    except TransactionServiceException, ex:
929
      result.ex = ex
483 rajveer 930
    oprot.writeMessageBegin("getLineItemsForOrder", TMessageType.REPLY, seqid)
94 ashish 931
    result.write(oprot)
932
    oprot.writeMessageEnd()
933
    oprot.trans.flush()
934
 
304 ashish 935
  def process_getAlerts(self, seqid, iprot, oprot):
936
    args = getAlerts_args()
937
    args.read(iprot)
938
    iprot.readMessageEnd()
939
    result = getAlerts_result()
483 rajveer 940
    result.success = self._handler.getAlerts(args.orderId, args.valid)
304 ashish 941
    oprot.writeMessageBegin("getAlerts", TMessageType.REPLY, seqid)
942
    result.write(oprot)
943
    oprot.writeMessageEnd()
944
    oprot.trans.flush()
94 ashish 945
 
304 ashish 946
  def process_setAlert(self, seqid, iprot, oprot):
947
    args = setAlert_args()
948
    args.read(iprot)
949
    iprot.readMessageEnd()
950
    result = setAlert_result()
483 rajveer 951
    self._handler.setAlert(args.orderId, args.unset, args.type, args.comment)
304 ashish 952
    oprot.writeMessageBegin("setAlert", TMessageType.REPLY, seqid)
953
    result.write(oprot)
954
    oprot.writeMessageEnd()
955
    oprot.trans.flush()
956
 
957
 
94 ashish 958
# HELPER FUNCTIONS AND STRUCTURES
959
 
960
class createTransaction_args:
961
  """
962
  Attributes:
963
   - transaction
964
  """
965
 
966
  thrift_spec = (
967
    None, # 0
968
    (1, TType.STRUCT, 'transaction', (Transaction, Transaction.thrift_spec), None, ), # 1
969
  )
970
 
971
  def __init__(self, transaction=None,):
972
    self.transaction = transaction
973
 
974
  def read(self, iprot):
975
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
976
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
977
      return
978
    iprot.readStructBegin()
979
    while True:
980
      (fname, ftype, fid) = iprot.readFieldBegin()
981
      if ftype == TType.STOP:
982
        break
983
      if fid == 1:
984
        if ftype == TType.STRUCT:
985
          self.transaction = Transaction()
986
          self.transaction.read(iprot)
987
        else:
988
          iprot.skip(ftype)
989
      else:
990
        iprot.skip(ftype)
991
      iprot.readFieldEnd()
992
    iprot.readStructEnd()
993
 
994
  def write(self, oprot):
995
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
996
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
997
      return
998
    oprot.writeStructBegin('createTransaction_args')
999
    if self.transaction != None:
1000
      oprot.writeFieldBegin('transaction', TType.STRUCT, 1)
1001
      self.transaction.write(oprot)
1002
      oprot.writeFieldEnd()
1003
    oprot.writeFieldStop()
1004
    oprot.writeStructEnd()
1005
 
1006
  def __repr__(self):
1007
    L = ['%s=%r' % (key, value)
1008
      for key, value in self.__dict__.iteritems()]
1009
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1010
 
1011
  def __eq__(self, other):
1012
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1013
 
1014
  def __ne__(self, other):
1015
    return not (self == other)
1016
 
1017
class createTransaction_result:
1018
  """
1019
  Attributes:
132 ashish 1020
   - success
94 ashish 1021
   - ex
1022
  """
1023
 
1024
  thrift_spec = (
132 ashish 1025
    (0, TType.I64, 'success', None, None, ), # 0
94 ashish 1026
    (1, TType.STRUCT, 'ex', (TransactionServiceException, TransactionServiceException.thrift_spec), None, ), # 1
1027
  )
1028
 
132 ashish 1029
  def __init__(self, success=None, ex=None,):
1030
    self.success = success
94 ashish 1031
    self.ex = ex
1032
 
1033
  def read(self, iprot):
1034
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1035
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1036
      return
1037
    iprot.readStructBegin()
1038
    while True:
1039
      (fname, ftype, fid) = iprot.readFieldBegin()
1040
      if ftype == TType.STOP:
1041
        break
132 ashish 1042
      if fid == 0:
1043
        if ftype == TType.I64:
1044
          self.success = iprot.readI64();
1045
        else:
1046
          iprot.skip(ftype)
1047
      elif fid == 1:
94 ashish 1048
        if ftype == TType.STRUCT:
1049
          self.ex = TransactionServiceException()
1050
          self.ex.read(iprot)
1051
        else:
1052
          iprot.skip(ftype)
1053
      else:
1054
        iprot.skip(ftype)
1055
      iprot.readFieldEnd()
1056
    iprot.readStructEnd()
1057
 
1058
  def write(self, oprot):
1059
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1060
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1061
      return
1062
    oprot.writeStructBegin('createTransaction_result')
132 ashish 1063
    if self.success != None:
1064
      oprot.writeFieldBegin('success', TType.I64, 0)
1065
      oprot.writeI64(self.success)
1066
      oprot.writeFieldEnd()
94 ashish 1067
    if self.ex != None:
1068
      oprot.writeFieldBegin('ex', TType.STRUCT, 1)
1069
      self.ex.write(oprot)
1070
      oprot.writeFieldEnd()
1071
    oprot.writeFieldStop()
1072
    oprot.writeStructEnd()
1073
 
1074
  def __repr__(self):
1075
    L = ['%s=%r' % (key, value)
1076
      for key, value in self.__dict__.iteritems()]
1077
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1078
 
1079
  def __eq__(self, other):
1080
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1081
 
1082
  def __ne__(self, other):
1083
    return not (self == other)
1084
 
1085
class getTransaction_args:
1086
  """
1087
  Attributes:
1088
   - id
1089
  """
1090
 
1091
  thrift_spec = (
1092
    None, # 0
1093
    (1, TType.I64, 'id', None, None, ), # 1
1094
  )
1095
 
1096
  def __init__(self, id=None,):
1097
    self.id = id
1098
 
1099
  def read(self, iprot):
1100
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1101
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1102
      return
1103
    iprot.readStructBegin()
1104
    while True:
1105
      (fname, ftype, fid) = iprot.readFieldBegin()
1106
      if ftype == TType.STOP:
1107
        break
1108
      if fid == 1:
1109
        if ftype == TType.I64:
1110
          self.id = iprot.readI64();
1111
        else:
1112
          iprot.skip(ftype)
1113
      else:
1114
        iprot.skip(ftype)
1115
      iprot.readFieldEnd()
1116
    iprot.readStructEnd()
1117
 
1118
  def write(self, oprot):
1119
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1120
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1121
      return
1122
    oprot.writeStructBegin('getTransaction_args')
1123
    if self.id != None:
1124
      oprot.writeFieldBegin('id', TType.I64, 1)
1125
      oprot.writeI64(self.id)
1126
      oprot.writeFieldEnd()
1127
    oprot.writeFieldStop()
1128
    oprot.writeStructEnd()
1129
 
1130
  def __repr__(self):
1131
    L = ['%s=%r' % (key, value)
1132
      for key, value in self.__dict__.iteritems()]
1133
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1134
 
1135
  def __eq__(self, other):
1136
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1137
 
1138
  def __ne__(self, other):
1139
    return not (self == other)
1140
 
1141
class getTransaction_result:
1142
  """
1143
  Attributes:
1144
   - success
1145
   - ex
1146
  """
1147
 
1148
  thrift_spec = (
1149
    (0, TType.STRUCT, 'success', (Transaction, Transaction.thrift_spec), None, ), # 0
1150
    (1, TType.STRUCT, 'ex', (TransactionServiceException, TransactionServiceException.thrift_spec), None, ), # 1
1151
  )
1152
 
1153
  def __init__(self, success=None, ex=None,):
1154
    self.success = success
1155
    self.ex = ex
1156
 
1157
  def read(self, iprot):
1158
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1159
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1160
      return
1161
    iprot.readStructBegin()
1162
    while True:
1163
      (fname, ftype, fid) = iprot.readFieldBegin()
1164
      if ftype == TType.STOP:
1165
        break
1166
      if fid == 0:
1167
        if ftype == TType.STRUCT:
1168
          self.success = Transaction()
1169
          self.success.read(iprot)
1170
        else:
1171
          iprot.skip(ftype)
1172
      elif fid == 1:
1173
        if ftype == TType.STRUCT:
1174
          self.ex = TransactionServiceException()
1175
          self.ex.read(iprot)
1176
        else:
1177
          iprot.skip(ftype)
1178
      else:
1179
        iprot.skip(ftype)
1180
      iprot.readFieldEnd()
1181
    iprot.readStructEnd()
1182
 
1183
  def write(self, oprot):
1184
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1185
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1186
      return
1187
    oprot.writeStructBegin('getTransaction_result')
1188
    if self.success != None:
1189
      oprot.writeFieldBegin('success', TType.STRUCT, 0)
1190
      self.success.write(oprot)
1191
      oprot.writeFieldEnd()
1192
    if self.ex != None:
1193
      oprot.writeFieldBegin('ex', TType.STRUCT, 1)
1194
      self.ex.write(oprot)
1195
      oprot.writeFieldEnd()
1196
    oprot.writeFieldStop()
1197
    oprot.writeStructEnd()
1198
 
1199
  def __repr__(self):
1200
    L = ['%s=%r' % (key, value)
1201
      for key, value in self.__dict__.iteritems()]
1202
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1203
 
1204
  def __eq__(self, other):
1205
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1206
 
1207
  def __ne__(self, other):
1208
    return not (self == other)
1209
 
1210
class getTransactionsForCustomer_args:
1211
  """
1212
  Attributes:
1213
   - customerId
1214
   - from_date
1215
   - to_date
1216
   - status
1217
  """
1218
 
1219
  thrift_spec = (
1220
    None, # 0
1221
    (1, TType.I64, 'customerId', None, None, ), # 1
1222
    (2, TType.I64, 'from_date', None, None, ), # 2
1223
    (3, TType.I64, 'to_date', None, None, ), # 3
1224
    (4, TType.I32, 'status', None, None, ), # 4
1225
  )
1226
 
1227
  def __init__(self, customerId=None, from_date=None, to_date=None, status=None,):
1228
    self.customerId = customerId
1229
    self.from_date = from_date
1230
    self.to_date = to_date
1231
    self.status = status
1232
 
1233
  def read(self, iprot):
1234
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1235
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1236
      return
1237
    iprot.readStructBegin()
1238
    while True:
1239
      (fname, ftype, fid) = iprot.readFieldBegin()
1240
      if ftype == TType.STOP:
1241
        break
1242
      if fid == 1:
1243
        if ftype == TType.I64:
1244
          self.customerId = iprot.readI64();
1245
        else:
1246
          iprot.skip(ftype)
1247
      elif fid == 2:
1248
        if ftype == TType.I64:
1249
          self.from_date = iprot.readI64();
1250
        else:
1251
          iprot.skip(ftype)
1252
      elif fid == 3:
1253
        if ftype == TType.I64:
1254
          self.to_date = iprot.readI64();
1255
        else:
1256
          iprot.skip(ftype)
1257
      elif fid == 4:
1258
        if ftype == TType.I32:
1259
          self.status = iprot.readI32();
1260
        else:
1261
          iprot.skip(ftype)
1262
      else:
1263
        iprot.skip(ftype)
1264
      iprot.readFieldEnd()
1265
    iprot.readStructEnd()
1266
 
1267
  def write(self, oprot):
1268
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1269
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1270
      return
1271
    oprot.writeStructBegin('getTransactionsForCustomer_args')
1272
    if self.customerId != None:
1273
      oprot.writeFieldBegin('customerId', TType.I64, 1)
1274
      oprot.writeI64(self.customerId)
1275
      oprot.writeFieldEnd()
1276
    if self.from_date != None:
1277
      oprot.writeFieldBegin('from_date', TType.I64, 2)
1278
      oprot.writeI64(self.from_date)
1279
      oprot.writeFieldEnd()
1280
    if self.to_date != None:
1281
      oprot.writeFieldBegin('to_date', TType.I64, 3)
1282
      oprot.writeI64(self.to_date)
1283
      oprot.writeFieldEnd()
1284
    if self.status != None:
1285
      oprot.writeFieldBegin('status', TType.I32, 4)
1286
      oprot.writeI32(self.status)
1287
      oprot.writeFieldEnd()
1288
    oprot.writeFieldStop()
1289
    oprot.writeStructEnd()
1290
 
1291
  def __repr__(self):
1292
    L = ['%s=%r' % (key, value)
1293
      for key, value in self.__dict__.iteritems()]
1294
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1295
 
1296
  def __eq__(self, other):
1297
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1298
 
1299
  def __ne__(self, other):
1300
    return not (self == other)
1301
 
1302
class getTransactionsForCustomer_result:
1303
  """
1304
  Attributes:
1305
   - success
1306
   - ex
1307
  """
1308
 
1309
  thrift_spec = (
1310
    (0, TType.LIST, 'success', (TType.STRUCT,(Transaction, Transaction.thrift_spec)), None, ), # 0
1311
    (1, TType.STRUCT, 'ex', (TransactionServiceException, TransactionServiceException.thrift_spec), None, ), # 1
1312
  )
1313
 
1314
  def __init__(self, success=None, ex=None,):
1315
    self.success = success
1316
    self.ex = ex
1317
 
1318
  def read(self, iprot):
1319
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1320
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1321
      return
1322
    iprot.readStructBegin()
1323
    while True:
1324
      (fname, ftype, fid) = iprot.readFieldBegin()
1325
      if ftype == TType.STOP:
1326
        break
1327
      if fid == 0:
1328
        if ftype == TType.LIST:
1329
          self.success = []
483 rajveer 1330
          (_etype26, _size23) = iprot.readListBegin()
1331
          for _i27 in xrange(_size23):
1332
            _elem28 = Transaction()
1333
            _elem28.read(iprot)
1334
            self.success.append(_elem28)
94 ashish 1335
          iprot.readListEnd()
1336
        else:
1337
          iprot.skip(ftype)
1338
      elif fid == 1:
1339
        if ftype == TType.STRUCT:
1340
          self.ex = TransactionServiceException()
1341
          self.ex.read(iprot)
1342
        else:
1343
          iprot.skip(ftype)
1344
      else:
1345
        iprot.skip(ftype)
1346
      iprot.readFieldEnd()
1347
    iprot.readStructEnd()
1348
 
1349
  def write(self, oprot):
1350
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1351
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1352
      return
1353
    oprot.writeStructBegin('getTransactionsForCustomer_result')
1354
    if self.success != None:
1355
      oprot.writeFieldBegin('success', TType.LIST, 0)
1356
      oprot.writeListBegin(TType.STRUCT, len(self.success))
483 rajveer 1357
      for iter29 in self.success:
1358
        iter29.write(oprot)
94 ashish 1359
      oprot.writeListEnd()
1360
      oprot.writeFieldEnd()
1361
    if self.ex != None:
1362
      oprot.writeFieldBegin('ex', TType.STRUCT, 1)
1363
      self.ex.write(oprot)
1364
      oprot.writeFieldEnd()
1365
    oprot.writeFieldStop()
1366
    oprot.writeStructEnd()
1367
 
1368
  def __repr__(self):
1369
    L = ['%s=%r' % (key, value)
1370
      for key, value in self.__dict__.iteritems()]
1371
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1372
 
1373
  def __eq__(self, other):
1374
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1375
 
1376
  def __ne__(self, other):
1377
    return not (self == other)
1378
 
132 ashish 1379
class getTransactionsForShoppingCartId_args:
1380
  """
1381
  Attributes:
1382
   - shoppingCartId
1383
  """
1384
 
1385
  thrift_spec = (
1386
    None, # 0
1387
    (1, TType.I64, 'shoppingCartId', None, None, ), # 1
1388
  )
1389
 
1390
  def __init__(self, shoppingCartId=None,):
1391
    self.shoppingCartId = shoppingCartId
1392
 
1393
  def read(self, iprot):
1394
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1395
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1396
      return
1397
    iprot.readStructBegin()
1398
    while True:
1399
      (fname, ftype, fid) = iprot.readFieldBegin()
1400
      if ftype == TType.STOP:
1401
        break
1402
      if fid == 1:
1403
        if ftype == TType.I64:
1404
          self.shoppingCartId = iprot.readI64();
1405
        else:
1406
          iprot.skip(ftype)
1407
      else:
1408
        iprot.skip(ftype)
1409
      iprot.readFieldEnd()
1410
    iprot.readStructEnd()
1411
 
1412
  def write(self, oprot):
1413
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1414
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1415
      return
1416
    oprot.writeStructBegin('getTransactionsForShoppingCartId_args')
1417
    if self.shoppingCartId != None:
1418
      oprot.writeFieldBegin('shoppingCartId', TType.I64, 1)
1419
      oprot.writeI64(self.shoppingCartId)
1420
      oprot.writeFieldEnd()
1421
    oprot.writeFieldStop()
1422
    oprot.writeStructEnd()
1423
 
1424
  def __repr__(self):
1425
    L = ['%s=%r' % (key, value)
1426
      for key, value in self.__dict__.iteritems()]
1427
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1428
 
1429
  def __eq__(self, other):
1430
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1431
 
1432
  def __ne__(self, other):
1433
    return not (self == other)
1434
 
1435
class getTransactionsForShoppingCartId_result:
1436
  """
1437
  Attributes:
1438
   - success
1439
   - ex
1440
  """
1441
 
1442
  thrift_spec = (
1443
    (0, TType.LIST, 'success', (TType.STRUCT,(Transaction, Transaction.thrift_spec)), None, ), # 0
1444
    (1, TType.STRUCT, 'ex', (TransactionServiceException, TransactionServiceException.thrift_spec), None, ), # 1
1445
  )
1446
 
1447
  def __init__(self, success=None, ex=None,):
1448
    self.success = success
1449
    self.ex = ex
1450
 
1451
  def read(self, iprot):
1452
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1453
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1454
      return
1455
    iprot.readStructBegin()
1456
    while True:
1457
      (fname, ftype, fid) = iprot.readFieldBegin()
1458
      if ftype == TType.STOP:
1459
        break
1460
      if fid == 0:
1461
        if ftype == TType.LIST:
1462
          self.success = []
483 rajveer 1463
          (_etype33, _size30) = iprot.readListBegin()
1464
          for _i34 in xrange(_size30):
1465
            _elem35 = Transaction()
1466
            _elem35.read(iprot)
1467
            self.success.append(_elem35)
132 ashish 1468
          iprot.readListEnd()
1469
        else:
1470
          iprot.skip(ftype)
1471
      elif fid == 1:
1472
        if ftype == TType.STRUCT:
1473
          self.ex = TransactionServiceException()
1474
          self.ex.read(iprot)
1475
        else:
1476
          iprot.skip(ftype)
1477
      else:
1478
        iprot.skip(ftype)
1479
      iprot.readFieldEnd()
1480
    iprot.readStructEnd()
1481
 
1482
  def write(self, oprot):
1483
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1484
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1485
      return
1486
    oprot.writeStructBegin('getTransactionsForShoppingCartId_result')
1487
    if self.success != None:
1488
      oprot.writeFieldBegin('success', TType.LIST, 0)
1489
      oprot.writeListBegin(TType.STRUCT, len(self.success))
483 rajveer 1490
      for iter36 in self.success:
1491
        iter36.write(oprot)
132 ashish 1492
      oprot.writeListEnd()
1493
      oprot.writeFieldEnd()
1494
    if self.ex != None:
1495
      oprot.writeFieldBegin('ex', TType.STRUCT, 1)
1496
      self.ex.write(oprot)
1497
      oprot.writeFieldEnd()
1498
    oprot.writeFieldStop()
1499
    oprot.writeStructEnd()
1500
 
1501
  def __repr__(self):
1502
    L = ['%s=%r' % (key, value)
1503
      for key, value in self.__dict__.iteritems()]
1504
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1505
 
1506
  def __eq__(self, other):
1507
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1508
 
1509
  def __ne__(self, other):
1510
    return not (self == other)
1511
 
94 ashish 1512
class getTransactionStatus_args:
1513
  """
1514
  Attributes:
1515
   - transactionId
1516
  """
1517
 
1518
  thrift_spec = (
1519
    None, # 0
1520
    (1, TType.I64, 'transactionId', None, None, ), # 1
1521
  )
1522
 
1523
  def __init__(self, transactionId=None,):
1524
    self.transactionId = transactionId
1525
 
1526
  def read(self, iprot):
1527
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1528
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1529
      return
1530
    iprot.readStructBegin()
1531
    while True:
1532
      (fname, ftype, fid) = iprot.readFieldBegin()
1533
      if ftype == TType.STOP:
1534
        break
1535
      if fid == 1:
1536
        if ftype == TType.I64:
1537
          self.transactionId = iprot.readI64();
1538
        else:
1539
          iprot.skip(ftype)
1540
      else:
1541
        iprot.skip(ftype)
1542
      iprot.readFieldEnd()
1543
    iprot.readStructEnd()
1544
 
1545
  def write(self, oprot):
1546
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1547
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1548
      return
1549
    oprot.writeStructBegin('getTransactionStatus_args')
1550
    if self.transactionId != None:
1551
      oprot.writeFieldBegin('transactionId', TType.I64, 1)
1552
      oprot.writeI64(self.transactionId)
1553
      oprot.writeFieldEnd()
1554
    oprot.writeFieldStop()
1555
    oprot.writeStructEnd()
1556
 
1557
  def __repr__(self):
1558
    L = ['%s=%r' % (key, value)
1559
      for key, value in self.__dict__.iteritems()]
1560
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1561
 
1562
  def __eq__(self, other):
1563
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1564
 
1565
  def __ne__(self, other):
1566
    return not (self == other)
1567
 
1568
class getTransactionStatus_result:
1569
  """
1570
  Attributes:
1571
   - success
1572
   - ex
1573
  """
1574
 
1575
  thrift_spec = (
1576
    (0, TType.I32, 'success', None, None, ), # 0
1577
    (1, TType.STRUCT, 'ex', (TransactionServiceException, TransactionServiceException.thrift_spec), None, ), # 1
1578
  )
1579
 
1580
  def __init__(self, success=None, ex=None,):
1581
    self.success = success
1582
    self.ex = ex
1583
 
1584
  def read(self, iprot):
1585
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1586
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1587
      return
1588
    iprot.readStructBegin()
1589
    while True:
1590
      (fname, ftype, fid) = iprot.readFieldBegin()
1591
      if ftype == TType.STOP:
1592
        break
1593
      if fid == 0:
1594
        if ftype == TType.I32:
1595
          self.success = iprot.readI32();
1596
        else:
1597
          iprot.skip(ftype)
1598
      elif fid == 1:
1599
        if ftype == TType.STRUCT:
1600
          self.ex = TransactionServiceException()
1601
          self.ex.read(iprot)
1602
        else:
1603
          iprot.skip(ftype)
1604
      else:
1605
        iprot.skip(ftype)
1606
      iprot.readFieldEnd()
1607
    iprot.readStructEnd()
1608
 
1609
  def write(self, oprot):
1610
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1611
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1612
      return
1613
    oprot.writeStructBegin('getTransactionStatus_result')
1614
    if self.success != None:
1615
      oprot.writeFieldBegin('success', TType.I32, 0)
1616
      oprot.writeI32(self.success)
1617
      oprot.writeFieldEnd()
1618
    if self.ex != None:
1619
      oprot.writeFieldBegin('ex', TType.STRUCT, 1)
1620
      self.ex.write(oprot)
1621
      oprot.writeFieldEnd()
1622
    oprot.writeFieldStop()
1623
    oprot.writeStructEnd()
1624
 
1625
  def __repr__(self):
1626
    L = ['%s=%r' % (key, value)
1627
      for key, value in self.__dict__.iteritems()]
1628
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1629
 
1630
  def __eq__(self, other):
1631
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1632
 
1633
  def __ne__(self, other):
1634
    return not (self == other)
1635
 
1636
class changeTransactionStatus_args:
1637
  """
1638
  Attributes:
1639
   - transactionId
1640
   - status
1641
   - description
1642
  """
1643
 
1644
  thrift_spec = (
1645
    None, # 0
1646
    (1, TType.I64, 'transactionId', None, None, ), # 1
1647
    (2, TType.I32, 'status', None, None, ), # 2
1648
    (3, TType.STRING, 'description', None, None, ), # 3
1649
  )
1650
 
1651
  def __init__(self, transactionId=None, status=None, description=None,):
1652
    self.transactionId = transactionId
1653
    self.status = status
1654
    self.description = description
1655
 
1656
  def read(self, iprot):
1657
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1658
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1659
      return
1660
    iprot.readStructBegin()
1661
    while True:
1662
      (fname, ftype, fid) = iprot.readFieldBegin()
1663
      if ftype == TType.STOP:
1664
        break
1665
      if fid == 1:
1666
        if ftype == TType.I64:
1667
          self.transactionId = iprot.readI64();
1668
        else:
1669
          iprot.skip(ftype)
1670
      elif fid == 2:
1671
        if ftype == TType.I32:
1672
          self.status = iprot.readI32();
1673
        else:
1674
          iprot.skip(ftype)
1675
      elif fid == 3:
1676
        if ftype == TType.STRING:
1677
          self.description = iprot.readString();
1678
        else:
1679
          iprot.skip(ftype)
1680
      else:
1681
        iprot.skip(ftype)
1682
      iprot.readFieldEnd()
1683
    iprot.readStructEnd()
1684
 
1685
  def write(self, oprot):
1686
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1687
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1688
      return
1689
    oprot.writeStructBegin('changeTransactionStatus_args')
1690
    if self.transactionId != None:
1691
      oprot.writeFieldBegin('transactionId', TType.I64, 1)
1692
      oprot.writeI64(self.transactionId)
1693
      oprot.writeFieldEnd()
1694
    if self.status != None:
1695
      oprot.writeFieldBegin('status', TType.I32, 2)
1696
      oprot.writeI32(self.status)
1697
      oprot.writeFieldEnd()
1698
    if self.description != None:
1699
      oprot.writeFieldBegin('description', TType.STRING, 3)
1700
      oprot.writeString(self.description)
1701
      oprot.writeFieldEnd()
1702
    oprot.writeFieldStop()
1703
    oprot.writeStructEnd()
1704
 
1705
  def __repr__(self):
1706
    L = ['%s=%r' % (key, value)
1707
      for key, value in self.__dict__.iteritems()]
1708
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1709
 
1710
  def __eq__(self, other):
1711
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1712
 
1713
  def __ne__(self, other):
1714
    return not (self == other)
1715
 
1716
class changeTransactionStatus_result:
1717
  """
1718
  Attributes:
1719
   - success
1720
   - ex
1721
  """
1722
 
1723
  thrift_spec = (
1724
    (0, TType.BOOL, 'success', None, None, ), # 0
1725
    (1, TType.STRUCT, 'ex', (TransactionServiceException, TransactionServiceException.thrift_spec), None, ), # 1
1726
  )
1727
 
1728
  def __init__(self, success=None, ex=None,):
1729
    self.success = success
1730
    self.ex = ex
1731
 
1732
  def read(self, iprot):
1733
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1734
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1735
      return
1736
    iprot.readStructBegin()
1737
    while True:
1738
      (fname, ftype, fid) = iprot.readFieldBegin()
1739
      if ftype == TType.STOP:
1740
        break
1741
      if fid == 0:
1742
        if ftype == TType.BOOL:
1743
          self.success = iprot.readBool();
1744
        else:
1745
          iprot.skip(ftype)
1746
      elif fid == 1:
1747
        if ftype == TType.STRUCT:
1748
          self.ex = TransactionServiceException()
1749
          self.ex.read(iprot)
1750
        else:
1751
          iprot.skip(ftype)
1752
      else:
1753
        iprot.skip(ftype)
1754
      iprot.readFieldEnd()
1755
    iprot.readStructEnd()
1756
 
1757
  def write(self, oprot):
1758
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1759
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1760
      return
1761
    oprot.writeStructBegin('changeTransactionStatus_result')
1762
    if self.success != None:
1763
      oprot.writeFieldBegin('success', TType.BOOL, 0)
1764
      oprot.writeBool(self.success)
1765
      oprot.writeFieldEnd()
1766
    if self.ex != None:
1767
      oprot.writeFieldBegin('ex', TType.STRUCT, 1)
1768
      self.ex.write(oprot)
1769
      oprot.writeFieldEnd()
1770
    oprot.writeFieldStop()
1771
    oprot.writeStructEnd()
1772
 
1773
  def __repr__(self):
1774
    L = ['%s=%r' % (key, value)
1775
      for key, value in self.__dict__.iteritems()]
1776
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1777
 
1778
  def __eq__(self, other):
1779
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1780
 
1781
  def __ne__(self, other):
1782
    return not (self == other)
1783
 
483 rajveer 1784
class getAllOrders_args:
94 ashish 1785
  """
1786
  Attributes:
483 rajveer 1787
   - status
1788
   - from_date
1789
   - to_date
1790
   - warehouse_id
94 ashish 1791
  """
1792
 
1793
  thrift_spec = (
1794
    None, # 0
483 rajveer 1795
    (1, TType.I32, 'status', None, None, ), # 1
1796
    (2, TType.I64, 'from_date', None, None, ), # 2
1797
    (3, TType.I64, 'to_date', None, None, ), # 3
1798
    (4, TType.I64, 'warehouse_id', None, None, ), # 4
94 ashish 1799
  )
1800
 
483 rajveer 1801
  def __init__(self, status=None, from_date=None, to_date=None, warehouse_id=None,):
1802
    self.status = status
1803
    self.from_date = from_date
1804
    self.to_date = to_date
1805
    self.warehouse_id = warehouse_id
94 ashish 1806
 
1807
  def read(self, iprot):
1808
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1809
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1810
      return
1811
    iprot.readStructBegin()
1812
    while True:
1813
      (fname, ftype, fid) = iprot.readFieldBegin()
1814
      if ftype == TType.STOP:
1815
        break
1816
      if fid == 1:
483 rajveer 1817
        if ftype == TType.I32:
1818
          self.status = iprot.readI32();
94 ashish 1819
        else:
1820
          iprot.skip(ftype)
483 rajveer 1821
      elif fid == 2:
1822
        if ftype == TType.I64:
1823
          self.from_date = iprot.readI64();
94 ashish 1824
        else:
1825
          iprot.skip(ftype)
483 rajveer 1826
      elif fid == 3:
1827
        if ftype == TType.I64:
1828
          self.to_date = iprot.readI64();
94 ashish 1829
        else:
1830
          iprot.skip(ftype)
483 rajveer 1831
      elif fid == 4:
94 ashish 1832
        if ftype == TType.I64:
483 rajveer 1833
          self.warehouse_id = iprot.readI64();
94 ashish 1834
        else:
1835
          iprot.skip(ftype)
1836
      else:
1837
        iprot.skip(ftype)
1838
      iprot.readFieldEnd()
1839
    iprot.readStructEnd()
1840
 
1841
  def write(self, oprot):
1842
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1843
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1844
      return
483 rajveer 1845
    oprot.writeStructBegin('getAllOrders_args')
1846
    if self.status != None:
1847
      oprot.writeFieldBegin('status', TType.I32, 1)
1848
      oprot.writeI32(self.status)
94 ashish 1849
      oprot.writeFieldEnd()
483 rajveer 1850
    if self.from_date != None:
1851
      oprot.writeFieldBegin('from_date', TType.I64, 2)
1852
      oprot.writeI64(self.from_date)
94 ashish 1853
      oprot.writeFieldEnd()
483 rajveer 1854
    if self.to_date != None:
1855
      oprot.writeFieldBegin('to_date', TType.I64, 3)
1856
      oprot.writeI64(self.to_date)
94 ashish 1857
      oprot.writeFieldEnd()
483 rajveer 1858
    if self.warehouse_id != None:
1859
      oprot.writeFieldBegin('warehouse_id', TType.I64, 4)
1860
      oprot.writeI64(self.warehouse_id)
94 ashish 1861
      oprot.writeFieldEnd()
1862
    oprot.writeFieldStop()
1863
    oprot.writeStructEnd()
1864
 
1865
  def __repr__(self):
1866
    L = ['%s=%r' % (key, value)
1867
      for key, value in self.__dict__.iteritems()]
1868
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1869
 
1870
  def __eq__(self, other):
1871
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1872
 
1873
  def __ne__(self, other):
1874
    return not (self == other)
1875
 
483 rajveer 1876
class getAllOrders_result:
94 ashish 1877
  """
1878
  Attributes:
1879
   - success
1880
   - ex
1881
  """
1882
 
1883
  thrift_spec = (
483 rajveer 1884
    (0, TType.LIST, 'success', (TType.STRUCT,(Order, Order.thrift_spec)), None, ), # 0
94 ashish 1885
    (1, TType.STRUCT, 'ex', (TransactionServiceException, TransactionServiceException.thrift_spec), None, ), # 1
1886
  )
1887
 
1888
  def __init__(self, success=None, ex=None,):
1889
    self.success = success
1890
    self.ex = ex
1891
 
1892
  def read(self, iprot):
1893
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1894
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1895
      return
1896
    iprot.readStructBegin()
1897
    while True:
1898
      (fname, ftype, fid) = iprot.readFieldBegin()
1899
      if ftype == TType.STOP:
1900
        break
1901
      if fid == 0:
483 rajveer 1902
        if ftype == TType.LIST:
1903
          self.success = []
1904
          (_etype40, _size37) = iprot.readListBegin()
1905
          for _i41 in xrange(_size37):
1906
            _elem42 = Order()
1907
            _elem42.read(iprot)
1908
            self.success.append(_elem42)
1909
          iprot.readListEnd()
94 ashish 1910
        else:
1911
          iprot.skip(ftype)
1912
      elif fid == 1:
1913
        if ftype == TType.STRUCT:
1914
          self.ex = TransactionServiceException()
1915
          self.ex.read(iprot)
1916
        else:
1917
          iprot.skip(ftype)
1918
      else:
1919
        iprot.skip(ftype)
1920
      iprot.readFieldEnd()
1921
    iprot.readStructEnd()
1922
 
1923
  def write(self, oprot):
1924
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1925
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1926
      return
483 rajveer 1927
    oprot.writeStructBegin('getAllOrders_result')
94 ashish 1928
    if self.success != None:
483 rajveer 1929
      oprot.writeFieldBegin('success', TType.LIST, 0)
1930
      oprot.writeListBegin(TType.STRUCT, len(self.success))
1931
      for iter43 in self.success:
1932
        iter43.write(oprot)
1933
      oprot.writeListEnd()
94 ashish 1934
      oprot.writeFieldEnd()
1935
    if self.ex != None:
1936
      oprot.writeFieldBegin('ex', TType.STRUCT, 1)
1937
      self.ex.write(oprot)
1938
      oprot.writeFieldEnd()
1939
    oprot.writeFieldStop()
1940
    oprot.writeStructEnd()
1941
 
1942
  def __repr__(self):
1943
    L = ['%s=%r' % (key, value)
1944
      for key, value in self.__dict__.iteritems()]
1945
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1946
 
1947
  def __eq__(self, other):
1948
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1949
 
1950
  def __ne__(self, other):
1951
    return not (self == other)
1952
 
483 rajveer 1953
class changeOrderStatus_args:
94 ashish 1954
  """
1955
  Attributes:
483 rajveer 1956
   - orderId
1957
   - status
1958
   - description
94 ashish 1959
  """
1960
 
1961
  thrift_spec = (
1962
    None, # 0
483 rajveer 1963
    (1, TType.I64, 'orderId', None, None, ), # 1
1964
    (2, TType.I32, 'status', None, None, ), # 2
1965
    (3, TType.STRING, 'description', None, None, ), # 3
94 ashish 1966
  )
1967
 
483 rajveer 1968
  def __init__(self, orderId=None, status=None, description=None,):
1969
    self.orderId = orderId
1970
    self.status = status
1971
    self.description = description
94 ashish 1972
 
1973
  def read(self, iprot):
1974
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1975
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1976
      return
1977
    iprot.readStructBegin()
1978
    while True:
1979
      (fname, ftype, fid) = iprot.readFieldBegin()
1980
      if ftype == TType.STOP:
1981
        break
1982
      if fid == 1:
1983
        if ftype == TType.I64:
483 rajveer 1984
          self.orderId = iprot.readI64();
94 ashish 1985
        else:
1986
          iprot.skip(ftype)
1987
      elif fid == 2:
483 rajveer 1988
        if ftype == TType.I32:
1989
          self.status = iprot.readI32();
94 ashish 1990
        else:
1991
          iprot.skip(ftype)
483 rajveer 1992
      elif fid == 3:
1993
        if ftype == TType.STRING:
1994
          self.description = iprot.readString();
1995
        else:
1996
          iprot.skip(ftype)
94 ashish 1997
      else:
1998
        iprot.skip(ftype)
1999
      iprot.readFieldEnd()
2000
    iprot.readStructEnd()
2001
 
2002
  def write(self, oprot):
2003
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
2004
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
2005
      return
483 rajveer 2006
    oprot.writeStructBegin('changeOrderStatus_args')
2007
    if self.orderId != None:
2008
      oprot.writeFieldBegin('orderId', TType.I64, 1)
2009
      oprot.writeI64(self.orderId)
94 ashish 2010
      oprot.writeFieldEnd()
483 rajveer 2011
    if self.status != None:
2012
      oprot.writeFieldBegin('status', TType.I32, 2)
2013
      oprot.writeI32(self.status)
94 ashish 2014
      oprot.writeFieldEnd()
483 rajveer 2015
    if self.description != None:
2016
      oprot.writeFieldBegin('description', TType.STRING, 3)
2017
      oprot.writeString(self.description)
2018
      oprot.writeFieldEnd()
94 ashish 2019
    oprot.writeFieldStop()
2020
    oprot.writeStructEnd()
2021
 
2022
  def __repr__(self):
2023
    L = ['%s=%r' % (key, value)
2024
      for key, value in self.__dict__.iteritems()]
2025
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
2026
 
2027
  def __eq__(self, other):
2028
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
2029
 
2030
  def __ne__(self, other):
2031
    return not (self == other)
2032
 
483 rajveer 2033
class changeOrderStatus_result:
94 ashish 2034
  """
2035
  Attributes:
2036
   - success
2037
   - ex
2038
  """
2039
 
2040
  thrift_spec = (
2041
    (0, TType.BOOL, 'success', None, None, ), # 0
2042
    (1, TType.STRUCT, 'ex', (TransactionServiceException, TransactionServiceException.thrift_spec), None, ), # 1
2043
  )
2044
 
2045
  def __init__(self, success=None, ex=None,):
2046
    self.success = success
2047
    self.ex = ex
2048
 
2049
  def read(self, iprot):
2050
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
2051
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
2052
      return
2053
    iprot.readStructBegin()
2054
    while True:
2055
      (fname, ftype, fid) = iprot.readFieldBegin()
2056
      if ftype == TType.STOP:
2057
        break
2058
      if fid == 0:
2059
        if ftype == TType.BOOL:
2060
          self.success = iprot.readBool();
2061
        else:
2062
          iprot.skip(ftype)
2063
      elif fid == 1:
2064
        if ftype == TType.STRUCT:
2065
          self.ex = TransactionServiceException()
2066
          self.ex.read(iprot)
2067
        else:
2068
          iprot.skip(ftype)
2069
      else:
2070
        iprot.skip(ftype)
2071
      iprot.readFieldEnd()
2072
    iprot.readStructEnd()
2073
 
2074
  def write(self, oprot):
2075
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
2076
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
2077
      return
483 rajveer 2078
    oprot.writeStructBegin('changeOrderStatus_result')
94 ashish 2079
    if self.success != None:
2080
      oprot.writeFieldBegin('success', TType.BOOL, 0)
2081
      oprot.writeBool(self.success)
2082
      oprot.writeFieldEnd()
2083
    if self.ex != None:
2084
      oprot.writeFieldBegin('ex', TType.STRUCT, 1)
2085
      self.ex.write(oprot)
2086
      oprot.writeFieldEnd()
2087
    oprot.writeFieldStop()
2088
    oprot.writeStructEnd()
2089
 
2090
  def __repr__(self):
2091
    L = ['%s=%r' % (key, value)
2092
      for key, value in self.__dict__.iteritems()]
2093
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
2094
 
2095
  def __eq__(self, other):
2096
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
2097
 
2098
  def __ne__(self, other):
2099
    return not (self == other)
2100
 
494 rajveer 2101
class addBillingDetails_args:
2102
  """
2103
  Attributes:
2104
   - orderId
2105
   - invoice_number
2106
   - billed_by
2107
  """
2108
 
2109
  thrift_spec = (
2110
    None, # 0
2111
    (1, TType.I64, 'orderId', None, None, ), # 1
2112
    (2, TType.STRING, 'invoice_number', None, None, ), # 2
2113
    (3, TType.STRING, 'billed_by', None, None, ), # 3
2114
  )
2115
 
2116
  def __init__(self, orderId=None, invoice_number=None, billed_by=None,):
2117
    self.orderId = orderId
2118
    self.invoice_number = invoice_number
2119
    self.billed_by = billed_by
2120
 
2121
  def read(self, iprot):
2122
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
2123
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
2124
      return
2125
    iprot.readStructBegin()
2126
    while True:
2127
      (fname, ftype, fid) = iprot.readFieldBegin()
2128
      if ftype == TType.STOP:
2129
        break
2130
      if fid == 1:
2131
        if ftype == TType.I64:
2132
          self.orderId = iprot.readI64();
2133
        else:
2134
          iprot.skip(ftype)
2135
      elif fid == 2:
2136
        if ftype == TType.STRING:
2137
          self.invoice_number = iprot.readString();
2138
        else:
2139
          iprot.skip(ftype)
2140
      elif fid == 3:
2141
        if ftype == TType.STRING:
2142
          self.billed_by = iprot.readString();
2143
        else:
2144
          iprot.skip(ftype)
2145
      else:
2146
        iprot.skip(ftype)
2147
      iprot.readFieldEnd()
2148
    iprot.readStructEnd()
2149
 
2150
  def write(self, oprot):
2151
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
2152
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
2153
      return
2154
    oprot.writeStructBegin('addBillingDetails_args')
2155
    if self.orderId != None:
2156
      oprot.writeFieldBegin('orderId', TType.I64, 1)
2157
      oprot.writeI64(self.orderId)
2158
      oprot.writeFieldEnd()
2159
    if self.invoice_number != None:
2160
      oprot.writeFieldBegin('invoice_number', TType.STRING, 2)
2161
      oprot.writeString(self.invoice_number)
2162
      oprot.writeFieldEnd()
2163
    if self.billed_by != None:
2164
      oprot.writeFieldBegin('billed_by', TType.STRING, 3)
2165
      oprot.writeString(self.billed_by)
2166
      oprot.writeFieldEnd()
2167
    oprot.writeFieldStop()
2168
    oprot.writeStructEnd()
2169
 
2170
  def __repr__(self):
2171
    L = ['%s=%r' % (key, value)
2172
      for key, value in self.__dict__.iteritems()]
2173
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
2174
 
2175
  def __eq__(self, other):
2176
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
2177
 
2178
  def __ne__(self, other):
2179
    return not (self == other)
2180
 
2181
class addBillingDetails_result:
2182
  """
2183
  Attributes:
2184
   - success
2185
   - ex
2186
  """
2187
 
2188
  thrift_spec = (
2189
    (0, TType.BOOL, 'success', None, None, ), # 0
2190
    (1, TType.STRUCT, 'ex', (TransactionServiceException, TransactionServiceException.thrift_spec), None, ), # 1
2191
  )
2192
 
2193
  def __init__(self, success=None, ex=None,):
2194
    self.success = success
2195
    self.ex = ex
2196
 
2197
  def read(self, iprot):
2198
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
2199
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
2200
      return
2201
    iprot.readStructBegin()
2202
    while True:
2203
      (fname, ftype, fid) = iprot.readFieldBegin()
2204
      if ftype == TType.STOP:
2205
        break
2206
      if fid == 0:
2207
        if ftype == TType.BOOL:
2208
          self.success = iprot.readBool();
2209
        else:
2210
          iprot.skip(ftype)
2211
      elif fid == 1:
2212
        if ftype == TType.STRUCT:
2213
          self.ex = TransactionServiceException()
2214
          self.ex.read(iprot)
2215
        else:
2216
          iprot.skip(ftype)
2217
      else:
2218
        iprot.skip(ftype)
2219
      iprot.readFieldEnd()
2220
    iprot.readStructEnd()
2221
 
2222
  def write(self, oprot):
2223
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
2224
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
2225
      return
2226
    oprot.writeStructBegin('addBillingDetails_result')
2227
    if self.success != None:
2228
      oprot.writeFieldBegin('success', TType.BOOL, 0)
2229
      oprot.writeBool(self.success)
2230
      oprot.writeFieldEnd()
2231
    if self.ex != None:
2232
      oprot.writeFieldBegin('ex', TType.STRUCT, 1)
2233
      self.ex.write(oprot)
2234
      oprot.writeFieldEnd()
2235
    oprot.writeFieldStop()
2236
    oprot.writeStructEnd()
2237
 
2238
  def __repr__(self):
2239
    L = ['%s=%r' % (key, value)
2240
      for key, value in self.__dict__.iteritems()]
2241
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
2242
 
2243
  def __eq__(self, other):
2244
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
2245
 
2246
  def __ne__(self, other):
2247
    return not (self == other)
2248
 
483 rajveer 2249
class getOrdersForTransaction_args:
94 ashish 2250
  """
2251
  Attributes:
2252
   - transactionId
2253
  """
2254
 
2255
  thrift_spec = (
2256
    None, # 0
2257
    (1, TType.I64, 'transactionId', None, None, ), # 1
2258
  )
2259
 
483 rajveer 2260
  def __init__(self, transactionId=None,):
94 ashish 2261
    self.transactionId = transactionId
2262
 
2263
  def read(self, iprot):
2264
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
2265
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
2266
      return
2267
    iprot.readStructBegin()
2268
    while True:
2269
      (fname, ftype, fid) = iprot.readFieldBegin()
2270
      if ftype == TType.STOP:
2271
        break
2272
      if fid == 1:
2273
        if ftype == TType.I64:
2274
          self.transactionId = iprot.readI64();
2275
        else:
2276
          iprot.skip(ftype)
2277
      else:
2278
        iprot.skip(ftype)
2279
      iprot.readFieldEnd()
2280
    iprot.readStructEnd()
2281
 
2282
  def write(self, oprot):
2283
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
2284
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
2285
      return
483 rajveer 2286
    oprot.writeStructBegin('getOrdersForTransaction_args')
94 ashish 2287
    if self.transactionId != None:
2288
      oprot.writeFieldBegin('transactionId', TType.I64, 1)
2289
      oprot.writeI64(self.transactionId)
2290
      oprot.writeFieldEnd()
2291
    oprot.writeFieldStop()
2292
    oprot.writeStructEnd()
2293
 
2294
  def __repr__(self):
2295
    L = ['%s=%r' % (key, value)
2296
      for key, value in self.__dict__.iteritems()]
2297
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
2298
 
2299
  def __eq__(self, other):
2300
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
2301
 
2302
  def __ne__(self, other):
2303
    return not (self == other)
2304
 
483 rajveer 2305
class getOrdersForTransaction_result:
94 ashish 2306
  """
2307
  Attributes:
2308
   - success
2309
   - ex
2310
  """
2311
 
2312
  thrift_spec = (
483 rajveer 2313
    (0, TType.LIST, 'success', (TType.STRUCT,(Order, Order.thrift_spec)), None, ), # 0
94 ashish 2314
    (1, TType.STRUCT, 'ex', (TransactionServiceException, TransactionServiceException.thrift_spec), None, ), # 1
2315
  )
2316
 
2317
  def __init__(self, success=None, ex=None,):
2318
    self.success = success
2319
    self.ex = ex
2320
 
2321
  def read(self, iprot):
2322
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
2323
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
2324
      return
2325
    iprot.readStructBegin()
2326
    while True:
2327
      (fname, ftype, fid) = iprot.readFieldBegin()
2328
      if ftype == TType.STOP:
2329
        break
2330
      if fid == 0:
483 rajveer 2331
        if ftype == TType.LIST:
2332
          self.success = []
2333
          (_etype47, _size44) = iprot.readListBegin()
2334
          for _i48 in xrange(_size44):
2335
            _elem49 = Order()
2336
            _elem49.read(iprot)
2337
            self.success.append(_elem49)
2338
          iprot.readListEnd()
94 ashish 2339
        else:
2340
          iprot.skip(ftype)
2341
      elif fid == 1:
2342
        if ftype == TType.STRUCT:
2343
          self.ex = TransactionServiceException()
2344
          self.ex.read(iprot)
2345
        else:
2346
          iprot.skip(ftype)
2347
      else:
2348
        iprot.skip(ftype)
2349
      iprot.readFieldEnd()
2350
    iprot.readStructEnd()
2351
 
2352
  def write(self, oprot):
2353
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
2354
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
2355
      return
483 rajveer 2356
    oprot.writeStructBegin('getOrdersForTransaction_result')
94 ashish 2357
    if self.success != None:
483 rajveer 2358
      oprot.writeFieldBegin('success', TType.LIST, 0)
2359
      oprot.writeListBegin(TType.STRUCT, len(self.success))
2360
      for iter50 in self.success:
2361
        iter50.write(oprot)
2362
      oprot.writeListEnd()
94 ashish 2363
      oprot.writeFieldEnd()
2364
    if self.ex != None:
2365
      oprot.writeFieldBegin('ex', TType.STRUCT, 1)
2366
      self.ex.write(oprot)
2367
      oprot.writeFieldEnd()
2368
    oprot.writeFieldStop()
2369
    oprot.writeStructEnd()
2370
 
2371
  def __repr__(self):
2372
    L = ['%s=%r' % (key, value)
2373
      for key, value in self.__dict__.iteritems()]
2374
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
2375
 
2376
  def __eq__(self, other):
2377
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
2378
 
2379
  def __ne__(self, other):
2380
    return not (self == other)
2381
 
483 rajveer 2382
class getOrdersForCustomer_args:
94 ashish 2383
  """
2384
  Attributes:
483 rajveer 2385
   - customerId
2386
   - from_date
2387
   - to_date
2388
   - status
94 ashish 2389
  """
2390
 
2391
  thrift_spec = (
2392
    None, # 0
483 rajveer 2393
    (1, TType.I64, 'customerId', None, None, ), # 1
2394
    (2, TType.I64, 'from_date', None, None, ), # 2
2395
    (3, TType.I64, 'to_date', None, None, ), # 3
2396
    (4, TType.I32, 'status', None, None, ), # 4
94 ashish 2397
  )
2398
 
483 rajveer 2399
  def __init__(self, customerId=None, from_date=None, to_date=None, status=None,):
2400
    self.customerId = customerId
2401
    self.from_date = from_date
2402
    self.to_date = to_date
2403
    self.status = status
94 ashish 2404
 
2405
  def read(self, iprot):
2406
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
2407
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
2408
      return
2409
    iprot.readStructBegin()
2410
    while True:
2411
      (fname, ftype, fid) = iprot.readFieldBegin()
2412
      if ftype == TType.STOP:
2413
        break
2414
      if fid == 1:
2415
        if ftype == TType.I64:
483 rajveer 2416
          self.customerId = iprot.readI64();
94 ashish 2417
        else:
2418
          iprot.skip(ftype)
2419
      elif fid == 2:
2420
        if ftype == TType.I64:
483 rajveer 2421
          self.from_date = iprot.readI64();
94 ashish 2422
        else:
2423
          iprot.skip(ftype)
2424
      elif fid == 3:
2425
        if ftype == TType.I64:
483 rajveer 2426
          self.to_date = iprot.readI64();
94 ashish 2427
        else:
2428
          iprot.skip(ftype)
483 rajveer 2429
      elif fid == 4:
2430
        if ftype == TType.I32:
2431
          self.status = iprot.readI32();
2432
        else:
2433
          iprot.skip(ftype)
94 ashish 2434
      else:
2435
        iprot.skip(ftype)
2436
      iprot.readFieldEnd()
2437
    iprot.readStructEnd()
2438
 
2439
  def write(self, oprot):
2440
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
2441
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
2442
      return
483 rajveer 2443
    oprot.writeStructBegin('getOrdersForCustomer_args')
2444
    if self.customerId != None:
2445
      oprot.writeFieldBegin('customerId', TType.I64, 1)
2446
      oprot.writeI64(self.customerId)
94 ashish 2447
      oprot.writeFieldEnd()
483 rajveer 2448
    if self.from_date != None:
2449
      oprot.writeFieldBegin('from_date', TType.I64, 2)
2450
      oprot.writeI64(self.from_date)
94 ashish 2451
      oprot.writeFieldEnd()
483 rajveer 2452
    if self.to_date != None:
2453
      oprot.writeFieldBegin('to_date', TType.I64, 3)
2454
      oprot.writeI64(self.to_date)
94 ashish 2455
      oprot.writeFieldEnd()
483 rajveer 2456
    if self.status != None:
2457
      oprot.writeFieldBegin('status', TType.I32, 4)
2458
      oprot.writeI32(self.status)
2459
      oprot.writeFieldEnd()
94 ashish 2460
    oprot.writeFieldStop()
2461
    oprot.writeStructEnd()
2462
 
2463
  def __repr__(self):
2464
    L = ['%s=%r' % (key, value)
2465
      for key, value in self.__dict__.iteritems()]
2466
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
2467
 
2468
  def __eq__(self, other):
2469
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
2470
 
2471
  def __ne__(self, other):
2472
    return not (self == other)
2473
 
483 rajveer 2474
class getOrdersForCustomer_result:
94 ashish 2475
  """
2476
  Attributes:
2477
   - success
2478
   - ex
2479
  """
2480
 
2481
  thrift_spec = (
483 rajveer 2482
    (0, TType.LIST, 'success', (TType.STRUCT,(Order, Order.thrift_spec)), None, ), # 0
94 ashish 2483
    (1, TType.STRUCT, 'ex', (TransactionServiceException, TransactionServiceException.thrift_spec), None, ), # 1
2484
  )
2485
 
2486
  def __init__(self, success=None, ex=None,):
2487
    self.success = success
2488
    self.ex = ex
2489
 
2490
  def read(self, iprot):
2491
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
2492
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
2493
      return
2494
    iprot.readStructBegin()
2495
    while True:
2496
      (fname, ftype, fid) = iprot.readFieldBegin()
2497
      if ftype == TType.STOP:
2498
        break
2499
      if fid == 0:
483 rajveer 2500
        if ftype == TType.LIST:
2501
          self.success = []
2502
          (_etype54, _size51) = iprot.readListBegin()
2503
          for _i55 in xrange(_size51):
2504
            _elem56 = Order()
2505
            _elem56.read(iprot)
2506
            self.success.append(_elem56)
2507
          iprot.readListEnd()
94 ashish 2508
        else:
2509
          iprot.skip(ftype)
2510
      elif fid == 1:
2511
        if ftype == TType.STRUCT:
2512
          self.ex = TransactionServiceException()
2513
          self.ex.read(iprot)
2514
        else:
2515
          iprot.skip(ftype)
2516
      else:
2517
        iprot.skip(ftype)
2518
      iprot.readFieldEnd()
2519
    iprot.readStructEnd()
2520
 
2521
  def write(self, oprot):
2522
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
2523
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
2524
      return
483 rajveer 2525
    oprot.writeStructBegin('getOrdersForCustomer_result')
94 ashish 2526
    if self.success != None:
483 rajveer 2527
      oprot.writeFieldBegin('success', TType.LIST, 0)
2528
      oprot.writeListBegin(TType.STRUCT, len(self.success))
2529
      for iter57 in self.success:
2530
        iter57.write(oprot)
2531
      oprot.writeListEnd()
94 ashish 2532
      oprot.writeFieldEnd()
2533
    if self.ex != None:
2534
      oprot.writeFieldBegin('ex', TType.STRUCT, 1)
2535
      self.ex.write(oprot)
2536
      oprot.writeFieldEnd()
2537
    oprot.writeFieldStop()
2538
    oprot.writeStructEnd()
2539
 
2540
  def __repr__(self):
2541
    L = ['%s=%r' % (key, value)
2542
      for key, value in self.__dict__.iteritems()]
2543
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
2544
 
2545
  def __eq__(self, other):
2546
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
2547
 
2548
  def __ne__(self, other):
2549
    return not (self == other)
2550
 
483 rajveer 2551
class createOrder_args:
94 ashish 2552
  """
2553
  Attributes:
483 rajveer 2554
   - order
94 ashish 2555
  """
2556
 
2557
  thrift_spec = (
2558
    None, # 0
483 rajveer 2559
    (1, TType.STRUCT, 'order', (Order, Order.thrift_spec), None, ), # 1
94 ashish 2560
  )
2561
 
483 rajveer 2562
  def __init__(self, order=None,):
2563
    self.order = order
94 ashish 2564
 
2565
  def read(self, iprot):
2566
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
2567
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
2568
      return
2569
    iprot.readStructBegin()
2570
    while True:
2571
      (fname, ftype, fid) = iprot.readFieldBegin()
2572
      if ftype == TType.STOP:
2573
        break
2574
      if fid == 1:
483 rajveer 2575
        if ftype == TType.STRUCT:
2576
          self.order = Order()
2577
          self.order.read(iprot)
94 ashish 2578
        else:
2579
          iprot.skip(ftype)
2580
      else:
2581
        iprot.skip(ftype)
2582
      iprot.readFieldEnd()
2583
    iprot.readStructEnd()
2584
 
2585
  def write(self, oprot):
2586
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
2587
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
2588
      return
483 rajveer 2589
    oprot.writeStructBegin('createOrder_args')
2590
    if self.order != None:
2591
      oprot.writeFieldBegin('order', TType.STRUCT, 1)
2592
      self.order.write(oprot)
94 ashish 2593
      oprot.writeFieldEnd()
2594
    oprot.writeFieldStop()
2595
    oprot.writeStructEnd()
2596
 
2597
  def __repr__(self):
2598
    L = ['%s=%r' % (key, value)
2599
      for key, value in self.__dict__.iteritems()]
2600
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
2601
 
2602
  def __eq__(self, other):
2603
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
2604
 
2605
  def __ne__(self, other):
2606
    return not (self == other)
2607
 
483 rajveer 2608
class createOrder_result:
94 ashish 2609
  """
2610
  Attributes:
2611
   - success
2612
   - ex
2613
  """
2614
 
2615
  thrift_spec = (
483 rajveer 2616
    (0, TType.I64, 'success', None, None, ), # 0
94 ashish 2617
    (1, TType.STRUCT, 'ex', (TransactionServiceException, TransactionServiceException.thrift_spec), None, ), # 1
2618
  )
2619
 
2620
  def __init__(self, success=None, ex=None,):
2621
    self.success = success
2622
    self.ex = ex
2623
 
2624
  def read(self, iprot):
2625
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
2626
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
2627
      return
2628
    iprot.readStructBegin()
2629
    while True:
2630
      (fname, ftype, fid) = iprot.readFieldBegin()
2631
      if ftype == TType.STOP:
2632
        break
2633
      if fid == 0:
483 rajveer 2634
        if ftype == TType.I64:
2635
          self.success = iprot.readI64();
94 ashish 2636
        else:
2637
          iprot.skip(ftype)
2638
      elif fid == 1:
2639
        if ftype == TType.STRUCT:
2640
          self.ex = TransactionServiceException()
2641
          self.ex.read(iprot)
2642
        else:
2643
          iprot.skip(ftype)
2644
      else:
2645
        iprot.skip(ftype)
2646
      iprot.readFieldEnd()
2647
    iprot.readStructEnd()
2648
 
2649
  def write(self, oprot):
2650
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
2651
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
2652
      return
483 rajveer 2653
    oprot.writeStructBegin('createOrder_result')
94 ashish 2654
    if self.success != None:
483 rajveer 2655
      oprot.writeFieldBegin('success', TType.I64, 0)
2656
      oprot.writeI64(self.success)
94 ashish 2657
      oprot.writeFieldEnd()
2658
    if self.ex != None:
2659
      oprot.writeFieldBegin('ex', TType.STRUCT, 1)
2660
      self.ex.write(oprot)
2661
      oprot.writeFieldEnd()
2662
    oprot.writeFieldStop()
2663
    oprot.writeStructEnd()
2664
 
2665
  def __repr__(self):
2666
    L = ['%s=%r' % (key, value)
2667
      for key, value in self.__dict__.iteritems()]
2668
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
2669
 
2670
  def __eq__(self, other):
2671
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
2672
 
2673
  def __ne__(self, other):
2674
    return not (self == other)
2675
 
483 rajveer 2676
class getOrder_args:
94 ashish 2677
  """
2678
  Attributes:
483 rajveer 2679
   - id
94 ashish 2680
  """
2681
 
2682
  thrift_spec = (
2683
    None, # 0
483 rajveer 2684
    (1, TType.I64, 'id', None, None, ), # 1
94 ashish 2685
  )
2686
 
483 rajveer 2687
  def __init__(self, id=None,):
2688
    self.id = id
94 ashish 2689
 
2690
  def read(self, iprot):
2691
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
2692
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
2693
      return
2694
    iprot.readStructBegin()
2695
    while True:
2696
      (fname, ftype, fid) = iprot.readFieldBegin()
2697
      if ftype == TType.STOP:
2698
        break
2699
      if fid == 1:
2700
        if ftype == TType.I64:
483 rajveer 2701
          self.id = iprot.readI64();
94 ashish 2702
        else:
2703
          iprot.skip(ftype)
2704
      else:
2705
        iprot.skip(ftype)
2706
      iprot.readFieldEnd()
2707
    iprot.readStructEnd()
2708
 
2709
  def write(self, oprot):
2710
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
2711
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
2712
      return
483 rajveer 2713
    oprot.writeStructBegin('getOrder_args')
2714
    if self.id != None:
2715
      oprot.writeFieldBegin('id', TType.I64, 1)
2716
      oprot.writeI64(self.id)
94 ashish 2717
      oprot.writeFieldEnd()
2718
    oprot.writeFieldStop()
2719
    oprot.writeStructEnd()
2720
 
2721
  def __repr__(self):
2722
    L = ['%s=%r' % (key, value)
2723
      for key, value in self.__dict__.iteritems()]
2724
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
2725
 
2726
  def __eq__(self, other):
2727
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
2728
 
2729
  def __ne__(self, other):
2730
    return not (self == other)
2731
 
483 rajveer 2732
class getOrder_result:
94 ashish 2733
  """
2734
  Attributes:
2735
   - success
2736
   - ex
2737
  """
2738
 
2739
  thrift_spec = (
483 rajveer 2740
    (0, TType.STRUCT, 'success', (Order, Order.thrift_spec), None, ), # 0
94 ashish 2741
    (1, TType.STRUCT, 'ex', (TransactionServiceException, TransactionServiceException.thrift_spec), None, ), # 1
2742
  )
2743
 
2744
  def __init__(self, success=None, ex=None,):
2745
    self.success = success
2746
    self.ex = ex
2747
 
2748
  def read(self, iprot):
2749
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
2750
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
2751
      return
2752
    iprot.readStructBegin()
2753
    while True:
2754
      (fname, ftype, fid) = iprot.readFieldBegin()
2755
      if ftype == TType.STOP:
2756
        break
2757
      if fid == 0:
483 rajveer 2758
        if ftype == TType.STRUCT:
2759
          self.success = Order()
2760
          self.success.read(iprot)
94 ashish 2761
        else:
2762
          iprot.skip(ftype)
2763
      elif fid == 1:
2764
        if ftype == TType.STRUCT:
2765
          self.ex = TransactionServiceException()
2766
          self.ex.read(iprot)
2767
        else:
2768
          iprot.skip(ftype)
2769
      else:
2770
        iprot.skip(ftype)
2771
      iprot.readFieldEnd()
2772
    iprot.readStructEnd()
2773
 
2774
  def write(self, oprot):
2775
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
2776
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
2777
      return
483 rajveer 2778
    oprot.writeStructBegin('getOrder_result')
94 ashish 2779
    if self.success != None:
483 rajveer 2780
      oprot.writeFieldBegin('success', TType.STRUCT, 0)
2781
      self.success.write(oprot)
94 ashish 2782
      oprot.writeFieldEnd()
2783
    if self.ex != None:
2784
      oprot.writeFieldBegin('ex', TType.STRUCT, 1)
2785
      self.ex.write(oprot)
2786
      oprot.writeFieldEnd()
2787
    oprot.writeFieldStop()
2788
    oprot.writeStructEnd()
2789
 
2790
  def __repr__(self):
2791
    L = ['%s=%r' % (key, value)
2792
      for key, value in self.__dict__.iteritems()]
2793
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
2794
 
2795
  def __eq__(self, other):
2796
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
2797
 
2798
  def __ne__(self, other):
2799
    return not (self == other)
2800
 
483 rajveer 2801
class getLineItemsForOrder_args:
94 ashish 2802
  """
2803
  Attributes:
483 rajveer 2804
   - orderId
94 ashish 2805
  """
2806
 
2807
  thrift_spec = (
2808
    None, # 0
483 rajveer 2809
    (1, TType.I64, 'orderId', None, None, ), # 1
94 ashish 2810
  )
2811
 
483 rajveer 2812
  def __init__(self, orderId=None,):
2813
    self.orderId = orderId
94 ashish 2814
 
2815
  def read(self, iprot):
2816
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
2817
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
2818
      return
2819
    iprot.readStructBegin()
2820
    while True:
2821
      (fname, ftype, fid) = iprot.readFieldBegin()
2822
      if ftype == TType.STOP:
2823
        break
2824
      if fid == 1:
2825
        if ftype == TType.I64:
483 rajveer 2826
          self.orderId = iprot.readI64();
94 ashish 2827
        else:
2828
          iprot.skip(ftype)
2829
      else:
2830
        iprot.skip(ftype)
2831
      iprot.readFieldEnd()
2832
    iprot.readStructEnd()
2833
 
2834
  def write(self, oprot):
2835
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
2836
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
2837
      return
483 rajveer 2838
    oprot.writeStructBegin('getLineItemsForOrder_args')
2839
    if self.orderId != None:
2840
      oprot.writeFieldBegin('orderId', TType.I64, 1)
2841
      oprot.writeI64(self.orderId)
94 ashish 2842
      oprot.writeFieldEnd()
2843
    oprot.writeFieldStop()
2844
    oprot.writeStructEnd()
2845
 
2846
  def __repr__(self):
2847
    L = ['%s=%r' % (key, value)
2848
      for key, value in self.__dict__.iteritems()]
2849
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
2850
 
2851
  def __eq__(self, other):
2852
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
2853
 
2854
  def __ne__(self, other):
2855
    return not (self == other)
2856
 
483 rajveer 2857
class getLineItemsForOrder_result:
94 ashish 2858
  """
2859
  Attributes:
2860
   - success
2861
   - ex
2862
  """
2863
 
2864
  thrift_spec = (
483 rajveer 2865
    (0, TType.LIST, 'success', (TType.STRUCT,(LineItem, LineItem.thrift_spec)), None, ), # 0
94 ashish 2866
    (1, TType.STRUCT, 'ex', (TransactionServiceException, TransactionServiceException.thrift_spec), None, ), # 1
2867
  )
2868
 
2869
  def __init__(self, success=None, ex=None,):
2870
    self.success = success
2871
    self.ex = ex
2872
 
2873
  def read(self, iprot):
2874
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
2875
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
2876
      return
2877
    iprot.readStructBegin()
2878
    while True:
2879
      (fname, ftype, fid) = iprot.readFieldBegin()
2880
      if ftype == TType.STOP:
2881
        break
2882
      if fid == 0:
483 rajveer 2883
        if ftype == TType.LIST:
2884
          self.success = []
2885
          (_etype61, _size58) = iprot.readListBegin()
2886
          for _i62 in xrange(_size58):
2887
            _elem63 = LineItem()
2888
            _elem63.read(iprot)
2889
            self.success.append(_elem63)
2890
          iprot.readListEnd()
94 ashish 2891
        else:
2892
          iprot.skip(ftype)
2893
      elif fid == 1:
2894
        if ftype == TType.STRUCT:
2895
          self.ex = TransactionServiceException()
2896
          self.ex.read(iprot)
2897
        else:
2898
          iprot.skip(ftype)
2899
      else:
2900
        iprot.skip(ftype)
2901
      iprot.readFieldEnd()
2902
    iprot.readStructEnd()
2903
 
2904
  def write(self, oprot):
2905
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
2906
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
2907
      return
483 rajveer 2908
    oprot.writeStructBegin('getLineItemsForOrder_result')
94 ashish 2909
    if self.success != None:
483 rajveer 2910
      oprot.writeFieldBegin('success', TType.LIST, 0)
2911
      oprot.writeListBegin(TType.STRUCT, len(self.success))
2912
      for iter64 in self.success:
2913
        iter64.write(oprot)
2914
      oprot.writeListEnd()
94 ashish 2915
      oprot.writeFieldEnd()
2916
    if self.ex != None:
2917
      oprot.writeFieldBegin('ex', TType.STRUCT, 1)
2918
      self.ex.write(oprot)
2919
      oprot.writeFieldEnd()
2920
    oprot.writeFieldStop()
2921
    oprot.writeStructEnd()
2922
 
2923
  def __repr__(self):
2924
    L = ['%s=%r' % (key, value)
2925
      for key, value in self.__dict__.iteritems()]
2926
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
2927
 
2928
  def __eq__(self, other):
2929
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
2930
 
2931
  def __ne__(self, other):
2932
    return not (self == other)
2933
 
304 ashish 2934
class getAlerts_args:
2935
  """
2936
  Attributes:
483 rajveer 2937
   - orderId
304 ashish 2938
   - valid
2939
  """
94 ashish 2940
 
304 ashish 2941
  thrift_spec = (
2942
    None, # 0
483 rajveer 2943
    (1, TType.I64, 'orderId', None, None, ), # 1
304 ashish 2944
    (2, TType.BOOL, 'valid', None, None, ), # 2
2945
  )
2946
 
483 rajveer 2947
  def __init__(self, orderId=None, valid=None,):
2948
    self.orderId = orderId
304 ashish 2949
    self.valid = valid
2950
 
2951
  def read(self, iprot):
2952
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
2953
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
2954
      return
2955
    iprot.readStructBegin()
2956
    while True:
2957
      (fname, ftype, fid) = iprot.readFieldBegin()
2958
      if ftype == TType.STOP:
2959
        break
2960
      if fid == 1:
2961
        if ftype == TType.I64:
483 rajveer 2962
          self.orderId = iprot.readI64();
304 ashish 2963
        else:
2964
          iprot.skip(ftype)
2965
      elif fid == 2:
2966
        if ftype == TType.BOOL:
2967
          self.valid = iprot.readBool();
2968
        else:
2969
          iprot.skip(ftype)
2970
      else:
2971
        iprot.skip(ftype)
2972
      iprot.readFieldEnd()
2973
    iprot.readStructEnd()
2974
 
2975
  def write(self, oprot):
2976
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
2977
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
2978
      return
2979
    oprot.writeStructBegin('getAlerts_args')
483 rajveer 2980
    if self.orderId != None:
2981
      oprot.writeFieldBegin('orderId', TType.I64, 1)
2982
      oprot.writeI64(self.orderId)
304 ashish 2983
      oprot.writeFieldEnd()
2984
    if self.valid != None:
2985
      oprot.writeFieldBegin('valid', TType.BOOL, 2)
2986
      oprot.writeBool(self.valid)
2987
      oprot.writeFieldEnd()
2988
    oprot.writeFieldStop()
2989
    oprot.writeStructEnd()
2990
 
2991
  def __repr__(self):
2992
    L = ['%s=%r' % (key, value)
2993
      for key, value in self.__dict__.iteritems()]
2994
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
2995
 
2996
  def __eq__(self, other):
2997
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
2998
 
2999
  def __ne__(self, other):
3000
    return not (self == other)
3001
 
3002
class getAlerts_result:
3003
  """
3004
  Attributes:
3005
   - success
3006
  """
3007
 
3008
  thrift_spec = (
3009
    (0, TType.LIST, 'success', (TType.STRUCT,(Alert, Alert.thrift_spec)), None, ), # 0
3010
  )
3011
 
3012
  def __init__(self, success=None,):
3013
    self.success = success
3014
 
3015
  def read(self, iprot):
3016
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
3017
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
3018
      return
3019
    iprot.readStructBegin()
3020
    while True:
3021
      (fname, ftype, fid) = iprot.readFieldBegin()
3022
      if ftype == TType.STOP:
3023
        break
3024
      if fid == 0:
3025
        if ftype == TType.LIST:
3026
          self.success = []
483 rajveer 3027
          (_etype68, _size65) = iprot.readListBegin()
3028
          for _i69 in xrange(_size65):
3029
            _elem70 = Alert()
3030
            _elem70.read(iprot)
3031
            self.success.append(_elem70)
304 ashish 3032
          iprot.readListEnd()
3033
        else:
3034
          iprot.skip(ftype)
3035
      else:
3036
        iprot.skip(ftype)
3037
      iprot.readFieldEnd()
3038
    iprot.readStructEnd()
3039
 
3040
  def write(self, oprot):
3041
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
3042
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
3043
      return
3044
    oprot.writeStructBegin('getAlerts_result')
3045
    if self.success != None:
3046
      oprot.writeFieldBegin('success', TType.LIST, 0)
3047
      oprot.writeListBegin(TType.STRUCT, len(self.success))
483 rajveer 3048
      for iter71 in self.success:
3049
        iter71.write(oprot)
304 ashish 3050
      oprot.writeListEnd()
3051
      oprot.writeFieldEnd()
3052
    oprot.writeFieldStop()
3053
    oprot.writeStructEnd()
3054
 
3055
  def __repr__(self):
3056
    L = ['%s=%r' % (key, value)
3057
      for key, value in self.__dict__.iteritems()]
3058
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
3059
 
3060
  def __eq__(self, other):
3061
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
3062
 
3063
  def __ne__(self, other):
3064
    return not (self == other)
3065
 
3066
class setAlert_args:
3067
  """
3068
  Attributes:
483 rajveer 3069
   - orderId
304 ashish 3070
   - unset
3071
   - type
3072
   - comment
3073
  """
3074
 
3075
  thrift_spec = (
3076
    None, # 0
483 rajveer 3077
    (1, TType.I64, 'orderId', None, None, ), # 1
304 ashish 3078
    (2, TType.BOOL, 'unset', None, None, ), # 2
3079
    (3, TType.I64, 'type', None, None, ), # 3
3080
    (4, TType.STRING, 'comment', None, None, ), # 4
3081
  )
3082
 
483 rajveer 3083
  def __init__(self, orderId=None, unset=None, type=None, comment=None,):
3084
    self.orderId = orderId
304 ashish 3085
    self.unset = unset
3086
    self.type = type
3087
    self.comment = comment
3088
 
3089
  def read(self, iprot):
3090
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
3091
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
3092
      return
3093
    iprot.readStructBegin()
3094
    while True:
3095
      (fname, ftype, fid) = iprot.readFieldBegin()
3096
      if ftype == TType.STOP:
3097
        break
3098
      if fid == 1:
3099
        if ftype == TType.I64:
483 rajveer 3100
          self.orderId = iprot.readI64();
304 ashish 3101
        else:
3102
          iprot.skip(ftype)
3103
      elif fid == 2:
3104
        if ftype == TType.BOOL:
3105
          self.unset = iprot.readBool();
3106
        else:
3107
          iprot.skip(ftype)
3108
      elif fid == 3:
3109
        if ftype == TType.I64:
3110
          self.type = iprot.readI64();
3111
        else:
3112
          iprot.skip(ftype)
3113
      elif fid == 4:
3114
        if ftype == TType.STRING:
3115
          self.comment = iprot.readString();
3116
        else:
3117
          iprot.skip(ftype)
3118
      else:
3119
        iprot.skip(ftype)
3120
      iprot.readFieldEnd()
3121
    iprot.readStructEnd()
3122
 
3123
  def write(self, oprot):
3124
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
3125
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
3126
      return
3127
    oprot.writeStructBegin('setAlert_args')
483 rajveer 3128
    if self.orderId != None:
3129
      oprot.writeFieldBegin('orderId', TType.I64, 1)
3130
      oprot.writeI64(self.orderId)
304 ashish 3131
      oprot.writeFieldEnd()
3132
    if self.unset != None:
3133
      oprot.writeFieldBegin('unset', TType.BOOL, 2)
3134
      oprot.writeBool(self.unset)
3135
      oprot.writeFieldEnd()
3136
    if self.type != None:
3137
      oprot.writeFieldBegin('type', TType.I64, 3)
3138
      oprot.writeI64(self.type)
3139
      oprot.writeFieldEnd()
3140
    if self.comment != None:
3141
      oprot.writeFieldBegin('comment', TType.STRING, 4)
3142
      oprot.writeString(self.comment)
3143
      oprot.writeFieldEnd()
3144
    oprot.writeFieldStop()
3145
    oprot.writeStructEnd()
3146
 
3147
  def __repr__(self):
3148
    L = ['%s=%r' % (key, value)
3149
      for key, value in self.__dict__.iteritems()]
3150
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
3151
 
3152
  def __eq__(self, other):
3153
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
3154
 
3155
  def __ne__(self, other):
3156
    return not (self == other)
3157
 
3158
class setAlert_result:
3159
 
3160
  thrift_spec = (
3161
  )
3162
 
3163
  def read(self, iprot):
3164
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
3165
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
3166
      return
3167
    iprot.readStructBegin()
3168
    while True:
3169
      (fname, ftype, fid) = iprot.readFieldBegin()
3170
      if ftype == TType.STOP:
3171
        break
3172
      else:
3173
        iprot.skip(ftype)
3174
      iprot.readFieldEnd()
3175
    iprot.readStructEnd()
3176
 
3177
  def write(self, oprot):
3178
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
3179
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
3180
      return
3181
    oprot.writeStructBegin('setAlert_result')
3182
    oprot.writeFieldStop()
3183
    oprot.writeStructEnd()
3184
 
3185
  def __repr__(self):
3186
    L = ['%s=%r' % (key, value)
3187
      for key, value in self.__dict__.iteritems()]
3188
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
3189
 
3190
  def __eq__(self, other):
3191
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
3192
 
3193
  def __ne__(self, other):
3194
    return not (self == other)
3195
 
3196