Subversion Repositories SmartDukaan

Rev

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

Rev Author Line No. Line
4502 mandeep.dh 1
#
2
# Autogenerated by Thrift Compiler (0.7.0)
3
#
4
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
5
#
6
 
7
from thrift.Thrift import *
8
import shop2020.thriftpy.generic.GenericService
9
from ttypes import *
10
from thrift.Thrift import TProcessor
11
from thrift.transport import TTransport
12
from thrift.protocol import TBinaryProtocol, TProtocol
13
try:
14
  from thrift.protocol import fastbinary
15
except:
16
  fastbinary = None
17
 
18
 
19
class Iface(shop2020.thriftpy.generic.GenericService.Iface):
20
  def createPurchaseOrder(self, purchaseOrder):
21
    """
22
    Creates a purchase order based on the data in the given purchase order object.
23
    This method populates a nummber of missing fields
24
 
25
    Parameters:
26
     - purchaseOrder
27
    """
28
    pass
29
 
30
  def getPurchaseOrder(self, id):
31
    """
32
    Returns the purchase order with the given id. Throws an exception if there is no such purchase order.
33
 
34
    Parameters:
35
     - id
36
    """
37
    pass
38
 
39
  def getAllPurchaseOrders(self, status):
40
    """
41
    Returns a list of all the purchase orders in the given state
42
 
43
    Parameters:
44
     - status
45
    """
46
    pass
47
 
48
  def getSupplier(self, id):
49
    """
50
    Returns the supplier with the given order id. Throws an exception if there is no such supplier.
51
 
52
    Parameters:
53
     - id
54
    """
55
    pass
56
 
57
  def startPurchase(self, purchaseOrderId, invoiceNumber, freightCharges):
58
    """
59
    Creates a purchase for the given purchase order.
60
    Throws an exception if no more purchases are allowed against the given purchase order.
61
 
62
    Parameters:
63
     - purchaseOrderId
64
     - invoiceNumber
65
     - freightCharges
66
    """
67
    pass
68
 
69
  def closePurchase(self, purchaseId):
70
    """
71
    Marks a purchase as complete and updates the receivedOn time.
72
    Throws an exception if no such purchase exists.
73
 
74
    Parameters:
75
     - purchaseId
76
    """
77
    pass
78
 
79
  def getAllPurchases(self, purchaseOrderId, open):
80
    """
81
    Returns all open or closed purchases for the given purchase order. Throws an exception if no such purchase order exists
82
 
83
    Parameters:
84
     - purchaseOrderId
85
     - open
86
    """
87
    pass
88
 
6386 amar.kumar 89
  def getPurchasesForPO(self, purchaseOrderId):
90
    """
91
    Returns all purchases for the given purchase order. Throws an exception if no such purchase order exists
92
 
93
    Parameters:
94
     - purchaseOrderId
95
    """
96
    pass
97
 
4555 mandeep.dh 98
  def getPurchaseOrderForPurchase(self, purchaseId):
4502 mandeep.dh 99
    """
4555 mandeep.dh 100
    Returns the purchase order object for a given purchase
4502 mandeep.dh 101
 
102
    Parameters:
103
     - purchaseId
104
    """
105
    pass
106
 
4754 mandeep.dh 107
  def getPendingPurchaseOrders(self, warehouseId):
108
    """
109
    Creates purchase order objects from pending orders
4502 mandeep.dh 110
 
4754 mandeep.dh 111
    Parameters:
112
     - warehouseId
113
    """
114
    pass
115
 
116
  def getSuppliers(self, ):
117
    """
118
    Returns all the valid suppliers
119
    """
120
    pass
121
 
122
  def fulfillPO(self, purchaseOrderId, itemId, quantity):
123
    """
124
    Fulfills a given purchase order with an item.
125
 
126
    Parameters:
127
     - purchaseOrderId
128
     - itemId
129
     - quantity
130
    """
131
    pass
132
 
133
  def updatePurchaseOrder(self, purchaseOrder):
134
    """
135
    Amends a PO as per the new lineitems passed
136
 
137
    Parameters:
138
     - purchaseOrder
139
    """
140
    pass
141
 
5185 mandeep.dh 142
  def unFulfillPO(self, purchaseId, itemId, quantity):
143
    """
144
    Fulfills a given purchase id with an item and its quantity.
4754 mandeep.dh 145
 
5185 mandeep.dh 146
    Parameters:
147
     - purchaseId
148
     - itemId
149
     - quantity
150
    """
151
    pass
152
 
5443 mandeep.dh 153
  def getInvoices(self, date):
154
    """
5530 mandeep.dh 155
    Fetches all invoices after a given date
5185 mandeep.dh 156
 
5443 mandeep.dh 157
    Parameters:
158
     - date
159
    """
160
    pass
161
 
162
  def createInvoice(self, invoice):
163
    """
164
    Creates an invoice object
165
 
166
    Parameters:
167
     - invoice
168
    """
169
    pass
170
 
5591 mandeep.dh 171
  def addSupplier(self, supplier):
172
    """
173
    Creates a supplier
5443 mandeep.dh 174
 
5591 mandeep.dh 175
    Parameters:
176
     - supplier
177
    """
178
    pass
179
 
180
  def updateSupplier(self, supplier):
181
    """
182
    Updates a supplier
183
 
184
    Parameters:
185
     - supplier
186
    """
187
    pass
188
 
6467 amar.kumar 189
  def createPurchaseReturn(self, purchaseReturn):
190
    """
191
    Create a new Purchase Return
5591 mandeep.dh 192
 
6467 amar.kumar 193
    Parameters:
194
     - purchaseReturn
195
    """
196
    pass
197
 
198
  def settlePurchaseReturn(self, id):
199
    """
200
    Create a new Purchase Return
201
 
202
    Parameters:
203
     - id
204
    """
205
    pass
206
 
207
  def getUnsettledPurchaseReturns(self, ):
208
    """
209
    Create a new Purchase Return
210
    """
211
    pass
212
 
213
 
4502 mandeep.dh 214
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
215
  def __init__(self, iprot, oprot=None):
216
    shop2020.thriftpy.generic.GenericService.Client.__init__(self, iprot, oprot)
217
 
218
  def createPurchaseOrder(self, purchaseOrder):
219
    """
220
    Creates a purchase order based on the data in the given purchase order object.
221
    This method populates a nummber of missing fields
222
 
223
    Parameters:
224
     - purchaseOrder
225
    """
226
    self.send_createPurchaseOrder(purchaseOrder)
227
    return self.recv_createPurchaseOrder()
228
 
229
  def send_createPurchaseOrder(self, purchaseOrder):
230
    self._oprot.writeMessageBegin('createPurchaseOrder', TMessageType.CALL, self._seqid)
231
    args = createPurchaseOrder_args()
232
    args.purchaseOrder = purchaseOrder
233
    args.write(self._oprot)
234
    self._oprot.writeMessageEnd()
235
    self._oprot.trans.flush()
236
 
237
  def recv_createPurchaseOrder(self, ):
238
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
239
    if mtype == TMessageType.EXCEPTION:
240
      x = TApplicationException()
241
      x.read(self._iprot)
242
      self._iprot.readMessageEnd()
243
      raise x
244
    result = createPurchaseOrder_result()
245
    result.read(self._iprot)
246
    self._iprot.readMessageEnd()
247
    if result.success is not None:
248
      return result.success
249
    if result.e is not None:
250
      raise result.e
251
    raise TApplicationException(TApplicationException.MISSING_RESULT, "createPurchaseOrder failed: unknown result");
252
 
253
  def getPurchaseOrder(self, id):
254
    """
255
    Returns the purchase order with the given id. Throws an exception if there is no such purchase order.
256
 
257
    Parameters:
258
     - id
259
    """
260
    self.send_getPurchaseOrder(id)
261
    return self.recv_getPurchaseOrder()
262
 
263
  def send_getPurchaseOrder(self, id):
264
    self._oprot.writeMessageBegin('getPurchaseOrder', TMessageType.CALL, self._seqid)
265
    args = getPurchaseOrder_args()
266
    args.id = id
267
    args.write(self._oprot)
268
    self._oprot.writeMessageEnd()
269
    self._oprot.trans.flush()
270
 
271
  def recv_getPurchaseOrder(self, ):
272
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
273
    if mtype == TMessageType.EXCEPTION:
274
      x = TApplicationException()
275
      x.read(self._iprot)
276
      self._iprot.readMessageEnd()
277
      raise x
278
    result = getPurchaseOrder_result()
279
    result.read(self._iprot)
280
    self._iprot.readMessageEnd()
281
    if result.success is not None:
282
      return result.success
283
    if result.e is not None:
284
      raise result.e
285
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getPurchaseOrder failed: unknown result");
286
 
287
  def getAllPurchaseOrders(self, status):
288
    """
289
    Returns a list of all the purchase orders in the given state
290
 
291
    Parameters:
292
     - status
293
    """
294
    self.send_getAllPurchaseOrders(status)
295
    return self.recv_getAllPurchaseOrders()
296
 
297
  def send_getAllPurchaseOrders(self, status):
298
    self._oprot.writeMessageBegin('getAllPurchaseOrders', TMessageType.CALL, self._seqid)
299
    args = getAllPurchaseOrders_args()
300
    args.status = status
301
    args.write(self._oprot)
302
    self._oprot.writeMessageEnd()
303
    self._oprot.trans.flush()
304
 
305
  def recv_getAllPurchaseOrders(self, ):
306
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
307
    if mtype == TMessageType.EXCEPTION:
308
      x = TApplicationException()
309
      x.read(self._iprot)
310
      self._iprot.readMessageEnd()
311
      raise x
312
    result = getAllPurchaseOrders_result()
313
    result.read(self._iprot)
314
    self._iprot.readMessageEnd()
315
    if result.success is not None:
316
      return result.success
317
    if result.e is not None:
318
      raise result.e
319
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getAllPurchaseOrders failed: unknown result");
320
 
321
  def getSupplier(self, id):
322
    """
323
    Returns the supplier with the given order id. Throws an exception if there is no such supplier.
324
 
325
    Parameters:
326
     - id
327
    """
328
    self.send_getSupplier(id)
329
    return self.recv_getSupplier()
330
 
331
  def send_getSupplier(self, id):
332
    self._oprot.writeMessageBegin('getSupplier', TMessageType.CALL, self._seqid)
333
    args = getSupplier_args()
334
    args.id = id
335
    args.write(self._oprot)
336
    self._oprot.writeMessageEnd()
337
    self._oprot.trans.flush()
338
 
339
  def recv_getSupplier(self, ):
340
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
341
    if mtype == TMessageType.EXCEPTION:
342
      x = TApplicationException()
343
      x.read(self._iprot)
344
      self._iprot.readMessageEnd()
345
      raise x
346
    result = getSupplier_result()
347
    result.read(self._iprot)
348
    self._iprot.readMessageEnd()
349
    if result.success is not None:
350
      return result.success
351
    if result.e is not None:
352
      raise result.e
353
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getSupplier failed: unknown result");
354
 
355
  def startPurchase(self, purchaseOrderId, invoiceNumber, freightCharges):
356
    """
357
    Creates a purchase for the given purchase order.
358
    Throws an exception if no more purchases are allowed against the given purchase order.
359
 
360
    Parameters:
361
     - purchaseOrderId
362
     - invoiceNumber
363
     - freightCharges
364
    """
365
    self.send_startPurchase(purchaseOrderId, invoiceNumber, freightCharges)
366
    return self.recv_startPurchase()
367
 
368
  def send_startPurchase(self, purchaseOrderId, invoiceNumber, freightCharges):
369
    self._oprot.writeMessageBegin('startPurchase', TMessageType.CALL, self._seqid)
370
    args = startPurchase_args()
371
    args.purchaseOrderId = purchaseOrderId
372
    args.invoiceNumber = invoiceNumber
373
    args.freightCharges = freightCharges
374
    args.write(self._oprot)
375
    self._oprot.writeMessageEnd()
376
    self._oprot.trans.flush()
377
 
378
  def recv_startPurchase(self, ):
379
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
380
    if mtype == TMessageType.EXCEPTION:
381
      x = TApplicationException()
382
      x.read(self._iprot)
383
      self._iprot.readMessageEnd()
384
      raise x
385
    result = startPurchase_result()
386
    result.read(self._iprot)
387
    self._iprot.readMessageEnd()
388
    if result.success is not None:
389
      return result.success
390
    if result.e is not None:
391
      raise result.e
392
    raise TApplicationException(TApplicationException.MISSING_RESULT, "startPurchase failed: unknown result");
393
 
394
  def closePurchase(self, purchaseId):
395
    """
396
    Marks a purchase as complete and updates the receivedOn time.
397
    Throws an exception if no such purchase exists.
398
 
399
    Parameters:
400
     - purchaseId
401
    """
402
    self.send_closePurchase(purchaseId)
403
    return self.recv_closePurchase()
404
 
405
  def send_closePurchase(self, purchaseId):
406
    self._oprot.writeMessageBegin('closePurchase', TMessageType.CALL, self._seqid)
407
    args = closePurchase_args()
408
    args.purchaseId = purchaseId
409
    args.write(self._oprot)
410
    self._oprot.writeMessageEnd()
411
    self._oprot.trans.flush()
412
 
413
  def recv_closePurchase(self, ):
414
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
415
    if mtype == TMessageType.EXCEPTION:
416
      x = TApplicationException()
417
      x.read(self._iprot)
418
      self._iprot.readMessageEnd()
419
      raise x
420
    result = closePurchase_result()
421
    result.read(self._iprot)
422
    self._iprot.readMessageEnd()
423
    if result.success is not None:
424
      return result.success
425
    if result.e is not None:
426
      raise result.e
427
    raise TApplicationException(TApplicationException.MISSING_RESULT, "closePurchase failed: unknown result");
428
 
429
  def getAllPurchases(self, purchaseOrderId, open):
430
    """
431
    Returns all open or closed purchases for the given purchase order. Throws an exception if no such purchase order exists
432
 
433
    Parameters:
434
     - purchaseOrderId
435
     - open
436
    """
437
    self.send_getAllPurchases(purchaseOrderId, open)
438
    return self.recv_getAllPurchases()
439
 
440
  def send_getAllPurchases(self, purchaseOrderId, open):
441
    self._oprot.writeMessageBegin('getAllPurchases', TMessageType.CALL, self._seqid)
442
    args = getAllPurchases_args()
443
    args.purchaseOrderId = purchaseOrderId
444
    args.open = open
445
    args.write(self._oprot)
446
    self._oprot.writeMessageEnd()
447
    self._oprot.trans.flush()
448
 
449
  def recv_getAllPurchases(self, ):
450
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
451
    if mtype == TMessageType.EXCEPTION:
452
      x = TApplicationException()
453
      x.read(self._iprot)
454
      self._iprot.readMessageEnd()
455
      raise x
456
    result = getAllPurchases_result()
457
    result.read(self._iprot)
458
    self._iprot.readMessageEnd()
459
    if result.success is not None:
460
      return result.success
461
    if result.e is not None:
462
      raise result.e
463
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getAllPurchases failed: unknown result");
464
 
6386 amar.kumar 465
  def getPurchasesForPO(self, purchaseOrderId):
466
    """
467
    Returns all purchases for the given purchase order. Throws an exception if no such purchase order exists
468
 
469
    Parameters:
470
     - purchaseOrderId
471
    """
472
    self.send_getPurchasesForPO(purchaseOrderId)
473
    return self.recv_getPurchasesForPO()
474
 
475
  def send_getPurchasesForPO(self, purchaseOrderId):
476
    self._oprot.writeMessageBegin('getPurchasesForPO', TMessageType.CALL, self._seqid)
477
    args = getPurchasesForPO_args()
478
    args.purchaseOrderId = purchaseOrderId
479
    args.write(self._oprot)
480
    self._oprot.writeMessageEnd()
481
    self._oprot.trans.flush()
482
 
483
  def recv_getPurchasesForPO(self, ):
484
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
485
    if mtype == TMessageType.EXCEPTION:
486
      x = TApplicationException()
487
      x.read(self._iprot)
488
      self._iprot.readMessageEnd()
489
      raise x
490
    result = getPurchasesForPO_result()
491
    result.read(self._iprot)
492
    self._iprot.readMessageEnd()
493
    if result.success is not None:
494
      return result.success
495
    if result.e is not None:
496
      raise result.e
497
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getPurchasesForPO failed: unknown result");
498
 
4555 mandeep.dh 499
  def getPurchaseOrderForPurchase(self, purchaseId):
4502 mandeep.dh 500
    """
4555 mandeep.dh 501
    Returns the purchase order object for a given purchase
4502 mandeep.dh 502
 
503
    Parameters:
504
     - purchaseId
505
    """
4555 mandeep.dh 506
    self.send_getPurchaseOrderForPurchase(purchaseId)
507
    return self.recv_getPurchaseOrderForPurchase()
4502 mandeep.dh 508
 
4555 mandeep.dh 509
  def send_getPurchaseOrderForPurchase(self, purchaseId):
510
    self._oprot.writeMessageBegin('getPurchaseOrderForPurchase', TMessageType.CALL, self._seqid)
511
    args = getPurchaseOrderForPurchase_args()
4502 mandeep.dh 512
    args.purchaseId = purchaseId
513
    args.write(self._oprot)
514
    self._oprot.writeMessageEnd()
515
    self._oprot.trans.flush()
516
 
4555 mandeep.dh 517
  def recv_getPurchaseOrderForPurchase(self, ):
4502 mandeep.dh 518
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
519
    if mtype == TMessageType.EXCEPTION:
520
      x = TApplicationException()
521
      x.read(self._iprot)
522
      self._iprot.readMessageEnd()
523
      raise x
4555 mandeep.dh 524
    result = getPurchaseOrderForPurchase_result()
4502 mandeep.dh 525
    result.read(self._iprot)
526
    self._iprot.readMessageEnd()
527
    if result.success is not None:
528
      return result.success
4555 mandeep.dh 529
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getPurchaseOrderForPurchase failed: unknown result");
4502 mandeep.dh 530
 
4754 mandeep.dh 531
  def getPendingPurchaseOrders(self, warehouseId):
532
    """
533
    Creates purchase order objects from pending orders
4502 mandeep.dh 534
 
4754 mandeep.dh 535
    Parameters:
536
     - warehouseId
537
    """
538
    self.send_getPendingPurchaseOrders(warehouseId)
539
    return self.recv_getPendingPurchaseOrders()
540
 
541
  def send_getPendingPurchaseOrders(self, warehouseId):
542
    self._oprot.writeMessageBegin('getPendingPurchaseOrders', TMessageType.CALL, self._seqid)
543
    args = getPendingPurchaseOrders_args()
544
    args.warehouseId = warehouseId
545
    args.write(self._oprot)
546
    self._oprot.writeMessageEnd()
547
    self._oprot.trans.flush()
548
 
549
  def recv_getPendingPurchaseOrders(self, ):
550
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
551
    if mtype == TMessageType.EXCEPTION:
552
      x = TApplicationException()
553
      x.read(self._iprot)
554
      self._iprot.readMessageEnd()
555
      raise x
556
    result = getPendingPurchaseOrders_result()
557
    result.read(self._iprot)
558
    self._iprot.readMessageEnd()
559
    if result.success is not None:
560
      return result.success
561
    if result.e is not None:
562
      raise result.e
563
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getPendingPurchaseOrders failed: unknown result");
564
 
565
  def getSuppliers(self, ):
566
    """
567
    Returns all the valid suppliers
568
    """
569
    self.send_getSuppliers()
570
    return self.recv_getSuppliers()
571
 
572
  def send_getSuppliers(self, ):
573
    self._oprot.writeMessageBegin('getSuppliers', TMessageType.CALL, self._seqid)
574
    args = getSuppliers_args()
575
    args.write(self._oprot)
576
    self._oprot.writeMessageEnd()
577
    self._oprot.trans.flush()
578
 
579
  def recv_getSuppliers(self, ):
580
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
581
    if mtype == TMessageType.EXCEPTION:
582
      x = TApplicationException()
583
      x.read(self._iprot)
584
      self._iprot.readMessageEnd()
585
      raise x
586
    result = getSuppliers_result()
587
    result.read(self._iprot)
588
    self._iprot.readMessageEnd()
589
    if result.success is not None:
590
      return result.success
591
    if result.e is not None:
592
      raise result.e
593
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getSuppliers failed: unknown result");
594
 
595
  def fulfillPO(self, purchaseOrderId, itemId, quantity):
596
    """
597
    Fulfills a given purchase order with an item.
598
 
599
    Parameters:
600
     - purchaseOrderId
601
     - itemId
602
     - quantity
603
    """
604
    self.send_fulfillPO(purchaseOrderId, itemId, quantity)
605
    self.recv_fulfillPO()
606
 
607
  def send_fulfillPO(self, purchaseOrderId, itemId, quantity):
608
    self._oprot.writeMessageBegin('fulfillPO', TMessageType.CALL, self._seqid)
609
    args = fulfillPO_args()
610
    args.purchaseOrderId = purchaseOrderId
611
    args.itemId = itemId
612
    args.quantity = quantity
613
    args.write(self._oprot)
614
    self._oprot.writeMessageEnd()
615
    self._oprot.trans.flush()
616
 
617
  def recv_fulfillPO(self, ):
618
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
619
    if mtype == TMessageType.EXCEPTION:
620
      x = TApplicationException()
621
      x.read(self._iprot)
622
      self._iprot.readMessageEnd()
623
      raise x
624
    result = fulfillPO_result()
625
    result.read(self._iprot)
626
    self._iprot.readMessageEnd()
627
    if result.e is not None:
628
      raise result.e
629
    return
630
 
631
  def updatePurchaseOrder(self, purchaseOrder):
632
    """
633
    Amends a PO as per the new lineitems passed
634
 
635
    Parameters:
636
     - purchaseOrder
637
    """
638
    self.send_updatePurchaseOrder(purchaseOrder)
639
    self.recv_updatePurchaseOrder()
640
 
641
  def send_updatePurchaseOrder(self, purchaseOrder):
642
    self._oprot.writeMessageBegin('updatePurchaseOrder', TMessageType.CALL, self._seqid)
643
    args = updatePurchaseOrder_args()
644
    args.purchaseOrder = purchaseOrder
645
    args.write(self._oprot)
646
    self._oprot.writeMessageEnd()
647
    self._oprot.trans.flush()
648
 
649
  def recv_updatePurchaseOrder(self, ):
650
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
651
    if mtype == TMessageType.EXCEPTION:
652
      x = TApplicationException()
653
      x.read(self._iprot)
654
      self._iprot.readMessageEnd()
655
      raise x
656
    result = updatePurchaseOrder_result()
657
    result.read(self._iprot)
658
    self._iprot.readMessageEnd()
659
    if result.e is not None:
660
      raise result.e
661
    return
662
 
5185 mandeep.dh 663
  def unFulfillPO(self, purchaseId, itemId, quantity):
664
    """
665
    Fulfills a given purchase id with an item and its quantity.
4754 mandeep.dh 666
 
5185 mandeep.dh 667
    Parameters:
668
     - purchaseId
669
     - itemId
670
     - quantity
671
    """
672
    self.send_unFulfillPO(purchaseId, itemId, quantity)
673
    self.recv_unFulfillPO()
674
 
675
  def send_unFulfillPO(self, purchaseId, itemId, quantity):
676
    self._oprot.writeMessageBegin('unFulfillPO', TMessageType.CALL, self._seqid)
677
    args = unFulfillPO_args()
678
    args.purchaseId = purchaseId
679
    args.itemId = itemId
680
    args.quantity = quantity
681
    args.write(self._oprot)
682
    self._oprot.writeMessageEnd()
683
    self._oprot.trans.flush()
684
 
685
  def recv_unFulfillPO(self, ):
686
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
687
    if mtype == TMessageType.EXCEPTION:
688
      x = TApplicationException()
689
      x.read(self._iprot)
690
      self._iprot.readMessageEnd()
691
      raise x
692
    result = unFulfillPO_result()
693
    result.read(self._iprot)
694
    self._iprot.readMessageEnd()
695
    if result.e is not None:
696
      raise result.e
697
    return
698
 
5443 mandeep.dh 699
  def getInvoices(self, date):
700
    """
5530 mandeep.dh 701
    Fetches all invoices after a given date
5185 mandeep.dh 702
 
5443 mandeep.dh 703
    Parameters:
704
     - date
705
    """
706
    self.send_getInvoices(date)
707
    return self.recv_getInvoices()
708
 
709
  def send_getInvoices(self, date):
710
    self._oprot.writeMessageBegin('getInvoices', TMessageType.CALL, self._seqid)
711
    args = getInvoices_args()
712
    args.date = date
713
    args.write(self._oprot)
714
    self._oprot.writeMessageEnd()
715
    self._oprot.trans.flush()
716
 
717
  def recv_getInvoices(self, ):
718
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
719
    if mtype == TMessageType.EXCEPTION:
720
      x = TApplicationException()
721
      x.read(self._iprot)
722
      self._iprot.readMessageEnd()
723
      raise x
724
    result = getInvoices_result()
725
    result.read(self._iprot)
726
    self._iprot.readMessageEnd()
727
    if result.success is not None:
728
      return result.success
729
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getInvoices failed: unknown result");
730
 
731
  def createInvoice(self, invoice):
732
    """
733
    Creates an invoice object
734
 
735
    Parameters:
736
     - invoice
737
    """
738
    self.send_createInvoice(invoice)
739
    self.recv_createInvoice()
740
 
741
  def send_createInvoice(self, invoice):
742
    self._oprot.writeMessageBegin('createInvoice', TMessageType.CALL, self._seqid)
743
    args = createInvoice_args()
744
    args.invoice = invoice
745
    args.write(self._oprot)
746
    self._oprot.writeMessageEnd()
747
    self._oprot.trans.flush()
748
 
749
  def recv_createInvoice(self, ):
750
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
751
    if mtype == TMessageType.EXCEPTION:
752
      x = TApplicationException()
753
      x.read(self._iprot)
754
      self._iprot.readMessageEnd()
755
      raise x
756
    result = createInvoice_result()
757
    result.read(self._iprot)
758
    self._iprot.readMessageEnd()
759
    if result.e is not None:
760
      raise result.e
761
    return
762
 
5591 mandeep.dh 763
  def addSupplier(self, supplier):
764
    """
765
    Creates a supplier
5443 mandeep.dh 766
 
5591 mandeep.dh 767
    Parameters:
768
     - supplier
769
    """
770
    self.send_addSupplier(supplier)
771
    return self.recv_addSupplier()
772
 
773
  def send_addSupplier(self, supplier):
774
    self._oprot.writeMessageBegin('addSupplier', TMessageType.CALL, self._seqid)
775
    args = addSupplier_args()
776
    args.supplier = supplier
777
    args.write(self._oprot)
778
    self._oprot.writeMessageEnd()
779
    self._oprot.trans.flush()
780
 
781
  def recv_addSupplier(self, ):
782
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
783
    if mtype == TMessageType.EXCEPTION:
784
      x = TApplicationException()
785
      x.read(self._iprot)
786
      self._iprot.readMessageEnd()
787
      raise x
788
    result = addSupplier_result()
789
    result.read(self._iprot)
790
    self._iprot.readMessageEnd()
791
    if result.success is not None:
792
      return result.success
793
    raise TApplicationException(TApplicationException.MISSING_RESULT, "addSupplier failed: unknown result");
794
 
795
  def updateSupplier(self, supplier):
796
    """
797
    Updates a supplier
798
 
799
    Parameters:
800
     - supplier
801
    """
802
    self.send_updateSupplier(supplier)
803
    self.recv_updateSupplier()
804
 
805
  def send_updateSupplier(self, supplier):
806
    self._oprot.writeMessageBegin('updateSupplier', TMessageType.CALL, self._seqid)
807
    args = updateSupplier_args()
808
    args.supplier = supplier
809
    args.write(self._oprot)
810
    self._oprot.writeMessageEnd()
811
    self._oprot.trans.flush()
812
 
813
  def recv_updateSupplier(self, ):
814
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
815
    if mtype == TMessageType.EXCEPTION:
816
      x = TApplicationException()
817
      x.read(self._iprot)
818
      self._iprot.readMessageEnd()
819
      raise x
820
    result = updateSupplier_result()
821
    result.read(self._iprot)
822
    self._iprot.readMessageEnd()
823
    return
824
 
6467 amar.kumar 825
  def createPurchaseReturn(self, purchaseReturn):
826
    """
827
    Create a new Purchase Return
5591 mandeep.dh 828
 
6467 amar.kumar 829
    Parameters:
830
     - purchaseReturn
831
    """
832
    self.send_createPurchaseReturn(purchaseReturn)
833
    return self.recv_createPurchaseReturn()
834
 
835
  def send_createPurchaseReturn(self, purchaseReturn):
836
    self._oprot.writeMessageBegin('createPurchaseReturn', TMessageType.CALL, self._seqid)
837
    args = createPurchaseReturn_args()
838
    args.purchaseReturn = purchaseReturn
839
    args.write(self._oprot)
840
    self._oprot.writeMessageEnd()
841
    self._oprot.trans.flush()
842
 
843
  def recv_createPurchaseReturn(self, ):
844
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
845
    if mtype == TMessageType.EXCEPTION:
846
      x = TApplicationException()
847
      x.read(self._iprot)
848
      self._iprot.readMessageEnd()
849
      raise x
850
    result = createPurchaseReturn_result()
851
    result.read(self._iprot)
852
    self._iprot.readMessageEnd()
853
    if result.success is not None:
854
      return result.success
855
    raise TApplicationException(TApplicationException.MISSING_RESULT, "createPurchaseReturn failed: unknown result");
856
 
857
  def settlePurchaseReturn(self, id):
858
    """
859
    Create a new Purchase Return
860
 
861
    Parameters:
862
     - id
863
    """
864
    self.send_settlePurchaseReturn(id)
865
    self.recv_settlePurchaseReturn()
866
 
867
  def send_settlePurchaseReturn(self, id):
868
    self._oprot.writeMessageBegin('settlePurchaseReturn', TMessageType.CALL, self._seqid)
869
    args = settlePurchaseReturn_args()
870
    args.id = id
871
    args.write(self._oprot)
872
    self._oprot.writeMessageEnd()
873
    self._oprot.trans.flush()
874
 
875
  def recv_settlePurchaseReturn(self, ):
876
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
877
    if mtype == TMessageType.EXCEPTION:
878
      x = TApplicationException()
879
      x.read(self._iprot)
880
      self._iprot.readMessageEnd()
881
      raise x
882
    result = settlePurchaseReturn_result()
883
    result.read(self._iprot)
884
    self._iprot.readMessageEnd()
885
    return
886
 
887
  def getUnsettledPurchaseReturns(self, ):
888
    """
889
    Create a new Purchase Return
890
    """
891
    self.send_getUnsettledPurchaseReturns()
892
    return self.recv_getUnsettledPurchaseReturns()
893
 
894
  def send_getUnsettledPurchaseReturns(self, ):
895
    self._oprot.writeMessageBegin('getUnsettledPurchaseReturns', TMessageType.CALL, self._seqid)
896
    args = getUnsettledPurchaseReturns_args()
897
    args.write(self._oprot)
898
    self._oprot.writeMessageEnd()
899
    self._oprot.trans.flush()
900
 
901
  def recv_getUnsettledPurchaseReturns(self, ):
902
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
903
    if mtype == TMessageType.EXCEPTION:
904
      x = TApplicationException()
905
      x.read(self._iprot)
906
      self._iprot.readMessageEnd()
907
      raise x
908
    result = getUnsettledPurchaseReturns_result()
909
    result.read(self._iprot)
910
    self._iprot.readMessageEnd()
911
    if result.success is not None:
912
      return result.success
913
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getUnsettledPurchaseReturns failed: unknown result");
914
 
915
 
4502 mandeep.dh 916
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
917
  def __init__(self, handler):
918
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
919
    self._processMap["createPurchaseOrder"] = Processor.process_createPurchaseOrder
920
    self._processMap["getPurchaseOrder"] = Processor.process_getPurchaseOrder
921
    self._processMap["getAllPurchaseOrders"] = Processor.process_getAllPurchaseOrders
922
    self._processMap["getSupplier"] = Processor.process_getSupplier
923
    self._processMap["startPurchase"] = Processor.process_startPurchase
924
    self._processMap["closePurchase"] = Processor.process_closePurchase
925
    self._processMap["getAllPurchases"] = Processor.process_getAllPurchases
6386 amar.kumar 926
    self._processMap["getPurchasesForPO"] = Processor.process_getPurchasesForPO
4555 mandeep.dh 927
    self._processMap["getPurchaseOrderForPurchase"] = Processor.process_getPurchaseOrderForPurchase
4754 mandeep.dh 928
    self._processMap["getPendingPurchaseOrders"] = Processor.process_getPendingPurchaseOrders
929
    self._processMap["getSuppliers"] = Processor.process_getSuppliers
930
    self._processMap["fulfillPO"] = Processor.process_fulfillPO
931
    self._processMap["updatePurchaseOrder"] = Processor.process_updatePurchaseOrder
5185 mandeep.dh 932
    self._processMap["unFulfillPO"] = Processor.process_unFulfillPO
5443 mandeep.dh 933
    self._processMap["getInvoices"] = Processor.process_getInvoices
934
    self._processMap["createInvoice"] = Processor.process_createInvoice
5591 mandeep.dh 935
    self._processMap["addSupplier"] = Processor.process_addSupplier
936
    self._processMap["updateSupplier"] = Processor.process_updateSupplier
6467 amar.kumar 937
    self._processMap["createPurchaseReturn"] = Processor.process_createPurchaseReturn
938
    self._processMap["settlePurchaseReturn"] = Processor.process_settlePurchaseReturn
939
    self._processMap["getUnsettledPurchaseReturns"] = Processor.process_getUnsettledPurchaseReturns
4502 mandeep.dh 940
 
941
  def process(self, iprot, oprot):
942
    (name, type, seqid) = iprot.readMessageBegin()
943
    if name not in self._processMap:
944
      iprot.skip(TType.STRUCT)
945
      iprot.readMessageEnd()
946
      x = TApplicationException(TApplicationException.UNKNOWN_METHOD, 'Unknown function %s' % (name))
947
      oprot.writeMessageBegin(name, TMessageType.EXCEPTION, seqid)
948
      x.write(oprot)
949
      oprot.writeMessageEnd()
950
      oprot.trans.flush()
951
      return
952
    else:
953
      self._processMap[name](self, seqid, iprot, oprot)
954
    return True
955
 
956
  def process_createPurchaseOrder(self, seqid, iprot, oprot):
957
    args = createPurchaseOrder_args()
958
    args.read(iprot)
959
    iprot.readMessageEnd()
960
    result = createPurchaseOrder_result()
961
    try:
962
      result.success = self._handler.createPurchaseOrder(args.purchaseOrder)
963
    except PurchaseServiceException, e:
964
      result.e = e
965
    oprot.writeMessageBegin("createPurchaseOrder", TMessageType.REPLY, seqid)
966
    result.write(oprot)
967
    oprot.writeMessageEnd()
968
    oprot.trans.flush()
969
 
970
  def process_getPurchaseOrder(self, seqid, iprot, oprot):
971
    args = getPurchaseOrder_args()
972
    args.read(iprot)
973
    iprot.readMessageEnd()
974
    result = getPurchaseOrder_result()
975
    try:
976
      result.success = self._handler.getPurchaseOrder(args.id)
977
    except PurchaseServiceException, e:
978
      result.e = e
979
    oprot.writeMessageBegin("getPurchaseOrder", TMessageType.REPLY, seqid)
980
    result.write(oprot)
981
    oprot.writeMessageEnd()
982
    oprot.trans.flush()
983
 
984
  def process_getAllPurchaseOrders(self, seqid, iprot, oprot):
985
    args = getAllPurchaseOrders_args()
986
    args.read(iprot)
987
    iprot.readMessageEnd()
988
    result = getAllPurchaseOrders_result()
989
    try:
990
      result.success = self._handler.getAllPurchaseOrders(args.status)
991
    except PurchaseServiceException, e:
992
      result.e = e
993
    oprot.writeMessageBegin("getAllPurchaseOrders", TMessageType.REPLY, seqid)
994
    result.write(oprot)
995
    oprot.writeMessageEnd()
996
    oprot.trans.flush()
997
 
998
  def process_getSupplier(self, seqid, iprot, oprot):
999
    args = getSupplier_args()
1000
    args.read(iprot)
1001
    iprot.readMessageEnd()
1002
    result = getSupplier_result()
1003
    try:
1004
      result.success = self._handler.getSupplier(args.id)
1005
    except PurchaseServiceException, e:
1006
      result.e = e
1007
    oprot.writeMessageBegin("getSupplier", TMessageType.REPLY, seqid)
1008
    result.write(oprot)
1009
    oprot.writeMessageEnd()
1010
    oprot.trans.flush()
1011
 
1012
  def process_startPurchase(self, seqid, iprot, oprot):
1013
    args = startPurchase_args()
1014
    args.read(iprot)
1015
    iprot.readMessageEnd()
1016
    result = startPurchase_result()
1017
    try:
1018
      result.success = self._handler.startPurchase(args.purchaseOrderId, args.invoiceNumber, args.freightCharges)
1019
    except PurchaseServiceException, e:
1020
      result.e = e
1021
    oprot.writeMessageBegin("startPurchase", TMessageType.REPLY, seqid)
1022
    result.write(oprot)
1023
    oprot.writeMessageEnd()
1024
    oprot.trans.flush()
1025
 
1026
  def process_closePurchase(self, seqid, iprot, oprot):
1027
    args = closePurchase_args()
1028
    args.read(iprot)
1029
    iprot.readMessageEnd()
1030
    result = closePurchase_result()
1031
    try:
1032
      result.success = self._handler.closePurchase(args.purchaseId)
1033
    except PurchaseServiceException, e:
1034
      result.e = e
1035
    oprot.writeMessageBegin("closePurchase", TMessageType.REPLY, seqid)
1036
    result.write(oprot)
1037
    oprot.writeMessageEnd()
1038
    oprot.trans.flush()
1039
 
1040
  def process_getAllPurchases(self, seqid, iprot, oprot):
1041
    args = getAllPurchases_args()
1042
    args.read(iprot)
1043
    iprot.readMessageEnd()
1044
    result = getAllPurchases_result()
1045
    try:
1046
      result.success = self._handler.getAllPurchases(args.purchaseOrderId, args.open)
1047
    except PurchaseServiceException, e:
1048
      result.e = e
1049
    oprot.writeMessageBegin("getAllPurchases", TMessageType.REPLY, seqid)
1050
    result.write(oprot)
1051
    oprot.writeMessageEnd()
1052
    oprot.trans.flush()
1053
 
6386 amar.kumar 1054
  def process_getPurchasesForPO(self, seqid, iprot, oprot):
1055
    args = getPurchasesForPO_args()
1056
    args.read(iprot)
1057
    iprot.readMessageEnd()
1058
    result = getPurchasesForPO_result()
1059
    try:
1060
      result.success = self._handler.getPurchasesForPO(args.purchaseOrderId)
1061
    except PurchaseServiceException, e:
1062
      result.e = e
1063
    oprot.writeMessageBegin("getPurchasesForPO", TMessageType.REPLY, seqid)
1064
    result.write(oprot)
1065
    oprot.writeMessageEnd()
1066
    oprot.trans.flush()
1067
 
4555 mandeep.dh 1068
  def process_getPurchaseOrderForPurchase(self, seqid, iprot, oprot):
1069
    args = getPurchaseOrderForPurchase_args()
4502 mandeep.dh 1070
    args.read(iprot)
1071
    iprot.readMessageEnd()
4555 mandeep.dh 1072
    result = getPurchaseOrderForPurchase_result()
1073
    result.success = self._handler.getPurchaseOrderForPurchase(args.purchaseId)
1074
    oprot.writeMessageBegin("getPurchaseOrderForPurchase", TMessageType.REPLY, seqid)
4502 mandeep.dh 1075
    result.write(oprot)
1076
    oprot.writeMessageEnd()
1077
    oprot.trans.flush()
1078
 
4754 mandeep.dh 1079
  def process_getPendingPurchaseOrders(self, seqid, iprot, oprot):
1080
    args = getPendingPurchaseOrders_args()
1081
    args.read(iprot)
1082
    iprot.readMessageEnd()
1083
    result = getPendingPurchaseOrders_result()
1084
    try:
1085
      result.success = self._handler.getPendingPurchaseOrders(args.warehouseId)
1086
    except PurchaseServiceException, e:
1087
      result.e = e
1088
    oprot.writeMessageBegin("getPendingPurchaseOrders", TMessageType.REPLY, seqid)
1089
    result.write(oprot)
1090
    oprot.writeMessageEnd()
1091
    oprot.trans.flush()
4502 mandeep.dh 1092
 
4754 mandeep.dh 1093
  def process_getSuppliers(self, seqid, iprot, oprot):
1094
    args = getSuppliers_args()
1095
    args.read(iprot)
1096
    iprot.readMessageEnd()
1097
    result = getSuppliers_result()
1098
    try:
1099
      result.success = self._handler.getSuppliers()
1100
    except PurchaseServiceException, e:
1101
      result.e = e
1102
    oprot.writeMessageBegin("getSuppliers", TMessageType.REPLY, seqid)
1103
    result.write(oprot)
1104
    oprot.writeMessageEnd()
1105
    oprot.trans.flush()
1106
 
1107
  def process_fulfillPO(self, seqid, iprot, oprot):
1108
    args = fulfillPO_args()
1109
    args.read(iprot)
1110
    iprot.readMessageEnd()
1111
    result = fulfillPO_result()
1112
    try:
1113
      self._handler.fulfillPO(args.purchaseOrderId, args.itemId, args.quantity)
1114
    except PurchaseServiceException, e:
1115
      result.e = e
1116
    oprot.writeMessageBegin("fulfillPO", TMessageType.REPLY, seqid)
1117
    result.write(oprot)
1118
    oprot.writeMessageEnd()
1119
    oprot.trans.flush()
1120
 
1121
  def process_updatePurchaseOrder(self, seqid, iprot, oprot):
1122
    args = updatePurchaseOrder_args()
1123
    args.read(iprot)
1124
    iprot.readMessageEnd()
1125
    result = updatePurchaseOrder_result()
1126
    try:
1127
      self._handler.updatePurchaseOrder(args.purchaseOrder)
1128
    except PurchaseServiceException, e:
1129
      result.e = e
1130
    oprot.writeMessageBegin("updatePurchaseOrder", TMessageType.REPLY, seqid)
1131
    result.write(oprot)
1132
    oprot.writeMessageEnd()
1133
    oprot.trans.flush()
1134
 
5185 mandeep.dh 1135
  def process_unFulfillPO(self, seqid, iprot, oprot):
1136
    args = unFulfillPO_args()
1137
    args.read(iprot)
1138
    iprot.readMessageEnd()
1139
    result = unFulfillPO_result()
1140
    try:
1141
      self._handler.unFulfillPO(args.purchaseId, args.itemId, args.quantity)
1142
    except PurchaseServiceException, e:
1143
      result.e = e
1144
    oprot.writeMessageBegin("unFulfillPO", TMessageType.REPLY, seqid)
1145
    result.write(oprot)
1146
    oprot.writeMessageEnd()
1147
    oprot.trans.flush()
4754 mandeep.dh 1148
 
5443 mandeep.dh 1149
  def process_getInvoices(self, seqid, iprot, oprot):
1150
    args = getInvoices_args()
1151
    args.read(iprot)
1152
    iprot.readMessageEnd()
1153
    result = getInvoices_result()
1154
    result.success = self._handler.getInvoices(args.date)
1155
    oprot.writeMessageBegin("getInvoices", TMessageType.REPLY, seqid)
1156
    result.write(oprot)
1157
    oprot.writeMessageEnd()
1158
    oprot.trans.flush()
5185 mandeep.dh 1159
 
5443 mandeep.dh 1160
  def process_createInvoice(self, seqid, iprot, oprot):
1161
    args = createInvoice_args()
1162
    args.read(iprot)
1163
    iprot.readMessageEnd()
1164
    result = createInvoice_result()
1165
    try:
1166
      self._handler.createInvoice(args.invoice)
1167
    except PurchaseServiceException, e:
1168
      result.e = e
1169
    oprot.writeMessageBegin("createInvoice", TMessageType.REPLY, seqid)
1170
    result.write(oprot)
1171
    oprot.writeMessageEnd()
1172
    oprot.trans.flush()
1173
 
5591 mandeep.dh 1174
  def process_addSupplier(self, seqid, iprot, oprot):
1175
    args = addSupplier_args()
1176
    args.read(iprot)
1177
    iprot.readMessageEnd()
1178
    result = addSupplier_result()
1179
    result.success = self._handler.addSupplier(args.supplier)
1180
    oprot.writeMessageBegin("addSupplier", TMessageType.REPLY, seqid)
1181
    result.write(oprot)
1182
    oprot.writeMessageEnd()
1183
    oprot.trans.flush()
5443 mandeep.dh 1184
 
5591 mandeep.dh 1185
  def process_updateSupplier(self, seqid, iprot, oprot):
1186
    args = updateSupplier_args()
1187
    args.read(iprot)
1188
    iprot.readMessageEnd()
1189
    result = updateSupplier_result()
1190
    self._handler.updateSupplier(args.supplier)
1191
    oprot.writeMessageBegin("updateSupplier", TMessageType.REPLY, seqid)
1192
    result.write(oprot)
1193
    oprot.writeMessageEnd()
1194
    oprot.trans.flush()
1195
 
6467 amar.kumar 1196
  def process_createPurchaseReturn(self, seqid, iprot, oprot):
1197
    args = createPurchaseReturn_args()
1198
    args.read(iprot)
1199
    iprot.readMessageEnd()
1200
    result = createPurchaseReturn_result()
1201
    result.success = self._handler.createPurchaseReturn(args.purchaseReturn)
1202
    oprot.writeMessageBegin("createPurchaseReturn", TMessageType.REPLY, seqid)
1203
    result.write(oprot)
1204
    oprot.writeMessageEnd()
1205
    oprot.trans.flush()
5591 mandeep.dh 1206
 
6467 amar.kumar 1207
  def process_settlePurchaseReturn(self, seqid, iprot, oprot):
1208
    args = settlePurchaseReturn_args()
1209
    args.read(iprot)
1210
    iprot.readMessageEnd()
1211
    result = settlePurchaseReturn_result()
1212
    self._handler.settlePurchaseReturn(args.id)
1213
    oprot.writeMessageBegin("settlePurchaseReturn", TMessageType.REPLY, seqid)
1214
    result.write(oprot)
1215
    oprot.writeMessageEnd()
1216
    oprot.trans.flush()
1217
 
1218
  def process_getUnsettledPurchaseReturns(self, seqid, iprot, oprot):
1219
    args = getUnsettledPurchaseReturns_args()
1220
    args.read(iprot)
1221
    iprot.readMessageEnd()
1222
    result = getUnsettledPurchaseReturns_result()
1223
    result.success = self._handler.getUnsettledPurchaseReturns()
1224
    oprot.writeMessageBegin("getUnsettledPurchaseReturns", TMessageType.REPLY, seqid)
1225
    result.write(oprot)
1226
    oprot.writeMessageEnd()
1227
    oprot.trans.flush()
1228
 
1229
 
4502 mandeep.dh 1230
# HELPER FUNCTIONS AND STRUCTURES
1231
 
1232
class createPurchaseOrder_args:
1233
  """
1234
  Attributes:
1235
   - purchaseOrder
1236
  """
1237
 
1238
  thrift_spec = (
1239
    None, # 0
1240
    (1, TType.STRUCT, 'purchaseOrder', (PurchaseOrder, PurchaseOrder.thrift_spec), None, ), # 1
1241
  )
1242
 
1243
  def __init__(self, purchaseOrder=None,):
1244
    self.purchaseOrder = purchaseOrder
1245
 
1246
  def read(self, iprot):
1247
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1248
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1249
      return
1250
    iprot.readStructBegin()
1251
    while True:
1252
      (fname, ftype, fid) = iprot.readFieldBegin()
1253
      if ftype == TType.STOP:
1254
        break
1255
      if fid == 1:
1256
        if ftype == TType.STRUCT:
1257
          self.purchaseOrder = PurchaseOrder()
1258
          self.purchaseOrder.read(iprot)
1259
        else:
1260
          iprot.skip(ftype)
1261
      else:
1262
        iprot.skip(ftype)
1263
      iprot.readFieldEnd()
1264
    iprot.readStructEnd()
1265
 
1266
  def write(self, oprot):
1267
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1268
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1269
      return
1270
    oprot.writeStructBegin('createPurchaseOrder_args')
1271
    if self.purchaseOrder is not None:
1272
      oprot.writeFieldBegin('purchaseOrder', TType.STRUCT, 1)
1273
      self.purchaseOrder.write(oprot)
1274
      oprot.writeFieldEnd()
1275
    oprot.writeFieldStop()
1276
    oprot.writeStructEnd()
1277
 
1278
  def validate(self):
1279
    return
1280
 
1281
 
1282
  def __repr__(self):
1283
    L = ['%s=%r' % (key, value)
1284
      for key, value in self.__dict__.iteritems()]
1285
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1286
 
1287
  def __eq__(self, other):
1288
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1289
 
1290
  def __ne__(self, other):
1291
    return not (self == other)
1292
 
1293
class createPurchaseOrder_result:
1294
  """
1295
  Attributes:
1296
   - success
1297
   - e
1298
  """
1299
 
1300
  thrift_spec = (
1301
    (0, TType.I64, 'success', None, None, ), # 0
1302
    (1, TType.STRUCT, 'e', (PurchaseServiceException, PurchaseServiceException.thrift_spec), None, ), # 1
1303
  )
1304
 
1305
  def __init__(self, success=None, e=None,):
1306
    self.success = success
1307
    self.e = e
1308
 
1309
  def read(self, iprot):
1310
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1311
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1312
      return
1313
    iprot.readStructBegin()
1314
    while True:
1315
      (fname, ftype, fid) = iprot.readFieldBegin()
1316
      if ftype == TType.STOP:
1317
        break
1318
      if fid == 0:
1319
        if ftype == TType.I64:
1320
          self.success = iprot.readI64();
1321
        else:
1322
          iprot.skip(ftype)
1323
      elif fid == 1:
1324
        if ftype == TType.STRUCT:
1325
          self.e = PurchaseServiceException()
1326
          self.e.read(iprot)
1327
        else:
1328
          iprot.skip(ftype)
1329
      else:
1330
        iprot.skip(ftype)
1331
      iprot.readFieldEnd()
1332
    iprot.readStructEnd()
1333
 
1334
  def write(self, oprot):
1335
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1336
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1337
      return
1338
    oprot.writeStructBegin('createPurchaseOrder_result')
1339
    if self.success is not None:
1340
      oprot.writeFieldBegin('success', TType.I64, 0)
1341
      oprot.writeI64(self.success)
1342
      oprot.writeFieldEnd()
1343
    if self.e is not None:
1344
      oprot.writeFieldBegin('e', TType.STRUCT, 1)
1345
      self.e.write(oprot)
1346
      oprot.writeFieldEnd()
1347
    oprot.writeFieldStop()
1348
    oprot.writeStructEnd()
1349
 
1350
  def validate(self):
1351
    return
1352
 
1353
 
1354
  def __repr__(self):
1355
    L = ['%s=%r' % (key, value)
1356
      for key, value in self.__dict__.iteritems()]
1357
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1358
 
1359
  def __eq__(self, other):
1360
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1361
 
1362
  def __ne__(self, other):
1363
    return not (self == other)
1364
 
1365
class getPurchaseOrder_args:
1366
  """
1367
  Attributes:
1368
   - id
1369
  """
1370
 
1371
  thrift_spec = (
1372
    None, # 0
1373
    (1, TType.I64, 'id', None, None, ), # 1
1374
  )
1375
 
1376
  def __init__(self, id=None,):
1377
    self.id = id
1378
 
1379
  def read(self, iprot):
1380
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1381
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1382
      return
1383
    iprot.readStructBegin()
1384
    while True:
1385
      (fname, ftype, fid) = iprot.readFieldBegin()
1386
      if ftype == TType.STOP:
1387
        break
1388
      if fid == 1:
1389
        if ftype == TType.I64:
1390
          self.id = iprot.readI64();
1391
        else:
1392
          iprot.skip(ftype)
1393
      else:
1394
        iprot.skip(ftype)
1395
      iprot.readFieldEnd()
1396
    iprot.readStructEnd()
1397
 
1398
  def write(self, oprot):
1399
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1400
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1401
      return
1402
    oprot.writeStructBegin('getPurchaseOrder_args')
1403
    if self.id is not None:
1404
      oprot.writeFieldBegin('id', TType.I64, 1)
1405
      oprot.writeI64(self.id)
1406
      oprot.writeFieldEnd()
1407
    oprot.writeFieldStop()
1408
    oprot.writeStructEnd()
1409
 
1410
  def validate(self):
1411
    return
1412
 
1413
 
1414
  def __repr__(self):
1415
    L = ['%s=%r' % (key, value)
1416
      for key, value in self.__dict__.iteritems()]
1417
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1418
 
1419
  def __eq__(self, other):
1420
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1421
 
1422
  def __ne__(self, other):
1423
    return not (self == other)
1424
 
1425
class getPurchaseOrder_result:
1426
  """
1427
  Attributes:
1428
   - success
1429
   - e
1430
  """
1431
 
1432
  thrift_spec = (
1433
    (0, TType.STRUCT, 'success', (PurchaseOrder, PurchaseOrder.thrift_spec), None, ), # 0
1434
    (1, TType.STRUCT, 'e', (PurchaseServiceException, PurchaseServiceException.thrift_spec), None, ), # 1
1435
  )
1436
 
1437
  def __init__(self, success=None, e=None,):
1438
    self.success = success
1439
    self.e = e
1440
 
1441
  def read(self, iprot):
1442
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1443
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1444
      return
1445
    iprot.readStructBegin()
1446
    while True:
1447
      (fname, ftype, fid) = iprot.readFieldBegin()
1448
      if ftype == TType.STOP:
1449
        break
1450
      if fid == 0:
1451
        if ftype == TType.STRUCT:
1452
          self.success = PurchaseOrder()
1453
          self.success.read(iprot)
1454
        else:
1455
          iprot.skip(ftype)
1456
      elif fid == 1:
1457
        if ftype == TType.STRUCT:
1458
          self.e = PurchaseServiceException()
1459
          self.e.read(iprot)
1460
        else:
1461
          iprot.skip(ftype)
1462
      else:
1463
        iprot.skip(ftype)
1464
      iprot.readFieldEnd()
1465
    iprot.readStructEnd()
1466
 
1467
  def write(self, oprot):
1468
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1469
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1470
      return
1471
    oprot.writeStructBegin('getPurchaseOrder_result')
1472
    if self.success is not None:
1473
      oprot.writeFieldBegin('success', TType.STRUCT, 0)
1474
      self.success.write(oprot)
1475
      oprot.writeFieldEnd()
1476
    if self.e is not None:
1477
      oprot.writeFieldBegin('e', TType.STRUCT, 1)
1478
      self.e.write(oprot)
1479
      oprot.writeFieldEnd()
1480
    oprot.writeFieldStop()
1481
    oprot.writeStructEnd()
1482
 
1483
  def validate(self):
1484
    return
1485
 
1486
 
1487
  def __repr__(self):
1488
    L = ['%s=%r' % (key, value)
1489
      for key, value in self.__dict__.iteritems()]
1490
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1491
 
1492
  def __eq__(self, other):
1493
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1494
 
1495
  def __ne__(self, other):
1496
    return not (self == other)
1497
 
1498
class getAllPurchaseOrders_args:
1499
  """
1500
  Attributes:
1501
   - status
1502
  """
1503
 
1504
  thrift_spec = (
1505
    None, # 0
1506
    (1, TType.I32, 'status', None, None, ), # 1
1507
  )
1508
 
1509
  def __init__(self, status=None,):
1510
    self.status = status
1511
 
1512
  def read(self, iprot):
1513
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1514
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1515
      return
1516
    iprot.readStructBegin()
1517
    while True:
1518
      (fname, ftype, fid) = iprot.readFieldBegin()
1519
      if ftype == TType.STOP:
1520
        break
1521
      if fid == 1:
1522
        if ftype == TType.I32:
1523
          self.status = iprot.readI32();
1524
        else:
1525
          iprot.skip(ftype)
1526
      else:
1527
        iprot.skip(ftype)
1528
      iprot.readFieldEnd()
1529
    iprot.readStructEnd()
1530
 
1531
  def write(self, oprot):
1532
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1533
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1534
      return
1535
    oprot.writeStructBegin('getAllPurchaseOrders_args')
1536
    if self.status is not None:
1537
      oprot.writeFieldBegin('status', TType.I32, 1)
1538
      oprot.writeI32(self.status)
1539
      oprot.writeFieldEnd()
1540
    oprot.writeFieldStop()
1541
    oprot.writeStructEnd()
1542
 
1543
  def validate(self):
1544
    return
1545
 
1546
 
1547
  def __repr__(self):
1548
    L = ['%s=%r' % (key, value)
1549
      for key, value in self.__dict__.iteritems()]
1550
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1551
 
1552
  def __eq__(self, other):
1553
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1554
 
1555
  def __ne__(self, other):
1556
    return not (self == other)
1557
 
1558
class getAllPurchaseOrders_result:
1559
  """
1560
  Attributes:
1561
   - success
1562
   - e
1563
  """
1564
 
1565
  thrift_spec = (
1566
    (0, TType.LIST, 'success', (TType.STRUCT,(PurchaseOrder, PurchaseOrder.thrift_spec)), None, ), # 0
1567
    (1, TType.STRUCT, 'e', (PurchaseServiceException, PurchaseServiceException.thrift_spec), None, ), # 1
1568
  )
1569
 
1570
  def __init__(self, success=None, e=None,):
1571
    self.success = success
1572
    self.e = e
1573
 
1574
  def read(self, iprot):
1575
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1576
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1577
      return
1578
    iprot.readStructBegin()
1579
    while True:
1580
      (fname, ftype, fid) = iprot.readFieldBegin()
1581
      if ftype == TType.STOP:
1582
        break
1583
      if fid == 0:
1584
        if ftype == TType.LIST:
1585
          self.success = []
1586
          (_etype10, _size7) = iprot.readListBegin()
1587
          for _i11 in xrange(_size7):
1588
            _elem12 = PurchaseOrder()
1589
            _elem12.read(iprot)
1590
            self.success.append(_elem12)
1591
          iprot.readListEnd()
1592
        else:
1593
          iprot.skip(ftype)
1594
      elif fid == 1:
1595
        if ftype == TType.STRUCT:
1596
          self.e = PurchaseServiceException()
1597
          self.e.read(iprot)
1598
        else:
1599
          iprot.skip(ftype)
1600
      else:
1601
        iprot.skip(ftype)
1602
      iprot.readFieldEnd()
1603
    iprot.readStructEnd()
1604
 
1605
  def write(self, oprot):
1606
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1607
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1608
      return
1609
    oprot.writeStructBegin('getAllPurchaseOrders_result')
1610
    if self.success is not None:
1611
      oprot.writeFieldBegin('success', TType.LIST, 0)
1612
      oprot.writeListBegin(TType.STRUCT, len(self.success))
1613
      for iter13 in self.success:
1614
        iter13.write(oprot)
1615
      oprot.writeListEnd()
1616
      oprot.writeFieldEnd()
1617
    if self.e is not None:
1618
      oprot.writeFieldBegin('e', TType.STRUCT, 1)
1619
      self.e.write(oprot)
1620
      oprot.writeFieldEnd()
1621
    oprot.writeFieldStop()
1622
    oprot.writeStructEnd()
1623
 
1624
  def validate(self):
1625
    return
1626
 
1627
 
1628
  def __repr__(self):
1629
    L = ['%s=%r' % (key, value)
1630
      for key, value in self.__dict__.iteritems()]
1631
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1632
 
1633
  def __eq__(self, other):
1634
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1635
 
1636
  def __ne__(self, other):
1637
    return not (self == other)
1638
 
1639
class getSupplier_args:
1640
  """
1641
  Attributes:
1642
   - id
1643
  """
1644
 
1645
  thrift_spec = (
1646
    None, # 0
1647
    (1, TType.I64, 'id', None, None, ), # 1
1648
  )
1649
 
1650
  def __init__(self, id=None,):
1651
    self.id = id
1652
 
1653
  def read(self, iprot):
1654
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1655
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1656
      return
1657
    iprot.readStructBegin()
1658
    while True:
1659
      (fname, ftype, fid) = iprot.readFieldBegin()
1660
      if ftype == TType.STOP:
1661
        break
1662
      if fid == 1:
1663
        if ftype == TType.I64:
1664
          self.id = iprot.readI64();
1665
        else:
1666
          iprot.skip(ftype)
1667
      else:
1668
        iprot.skip(ftype)
1669
      iprot.readFieldEnd()
1670
    iprot.readStructEnd()
1671
 
1672
  def write(self, oprot):
1673
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1674
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1675
      return
1676
    oprot.writeStructBegin('getSupplier_args')
1677
    if self.id is not None:
1678
      oprot.writeFieldBegin('id', TType.I64, 1)
1679
      oprot.writeI64(self.id)
1680
      oprot.writeFieldEnd()
1681
    oprot.writeFieldStop()
1682
    oprot.writeStructEnd()
1683
 
1684
  def validate(self):
1685
    return
1686
 
1687
 
1688
  def __repr__(self):
1689
    L = ['%s=%r' % (key, value)
1690
      for key, value in self.__dict__.iteritems()]
1691
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1692
 
1693
  def __eq__(self, other):
1694
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1695
 
1696
  def __ne__(self, other):
1697
    return not (self == other)
1698
 
1699
class getSupplier_result:
1700
  """
1701
  Attributes:
1702
   - success
1703
   - e
1704
  """
1705
 
1706
  thrift_spec = (
1707
    (0, TType.STRUCT, 'success', (Supplier, Supplier.thrift_spec), None, ), # 0
1708
    (1, TType.STRUCT, 'e', (PurchaseServiceException, PurchaseServiceException.thrift_spec), None, ), # 1
1709
  )
1710
 
1711
  def __init__(self, success=None, e=None,):
1712
    self.success = success
1713
    self.e = e
1714
 
1715
  def read(self, iprot):
1716
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1717
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1718
      return
1719
    iprot.readStructBegin()
1720
    while True:
1721
      (fname, ftype, fid) = iprot.readFieldBegin()
1722
      if ftype == TType.STOP:
1723
        break
1724
      if fid == 0:
1725
        if ftype == TType.STRUCT:
1726
          self.success = Supplier()
1727
          self.success.read(iprot)
1728
        else:
1729
          iprot.skip(ftype)
1730
      elif fid == 1:
1731
        if ftype == TType.STRUCT:
1732
          self.e = PurchaseServiceException()
1733
          self.e.read(iprot)
1734
        else:
1735
          iprot.skip(ftype)
1736
      else:
1737
        iprot.skip(ftype)
1738
      iprot.readFieldEnd()
1739
    iprot.readStructEnd()
1740
 
1741
  def write(self, oprot):
1742
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1743
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1744
      return
1745
    oprot.writeStructBegin('getSupplier_result')
1746
    if self.success is not None:
1747
      oprot.writeFieldBegin('success', TType.STRUCT, 0)
1748
      self.success.write(oprot)
1749
      oprot.writeFieldEnd()
1750
    if self.e is not None:
1751
      oprot.writeFieldBegin('e', TType.STRUCT, 1)
1752
      self.e.write(oprot)
1753
      oprot.writeFieldEnd()
1754
    oprot.writeFieldStop()
1755
    oprot.writeStructEnd()
1756
 
1757
  def validate(self):
1758
    return
1759
 
1760
 
1761
  def __repr__(self):
1762
    L = ['%s=%r' % (key, value)
1763
      for key, value in self.__dict__.iteritems()]
1764
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1765
 
1766
  def __eq__(self, other):
1767
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1768
 
1769
  def __ne__(self, other):
1770
    return not (self == other)
1771
 
1772
class startPurchase_args:
1773
  """
1774
  Attributes:
1775
   - purchaseOrderId
1776
   - invoiceNumber
1777
   - freightCharges
1778
  """
1779
 
1780
  thrift_spec = (
1781
    None, # 0
1782
    (1, TType.I64, 'purchaseOrderId', None, None, ), # 1
1783
    (2, TType.STRING, 'invoiceNumber', None, None, ), # 2
1784
    (3, TType.DOUBLE, 'freightCharges', None, None, ), # 3
1785
  )
1786
 
1787
  def __init__(self, purchaseOrderId=None, invoiceNumber=None, freightCharges=None,):
1788
    self.purchaseOrderId = purchaseOrderId
1789
    self.invoiceNumber = invoiceNumber
1790
    self.freightCharges = freightCharges
1791
 
1792
  def read(self, iprot):
1793
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1794
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1795
      return
1796
    iprot.readStructBegin()
1797
    while True:
1798
      (fname, ftype, fid) = iprot.readFieldBegin()
1799
      if ftype == TType.STOP:
1800
        break
1801
      if fid == 1:
1802
        if ftype == TType.I64:
1803
          self.purchaseOrderId = iprot.readI64();
1804
        else:
1805
          iprot.skip(ftype)
1806
      elif fid == 2:
1807
        if ftype == TType.STRING:
1808
          self.invoiceNumber = iprot.readString();
1809
        else:
1810
          iprot.skip(ftype)
1811
      elif fid == 3:
1812
        if ftype == TType.DOUBLE:
1813
          self.freightCharges = iprot.readDouble();
1814
        else:
1815
          iprot.skip(ftype)
1816
      else:
1817
        iprot.skip(ftype)
1818
      iprot.readFieldEnd()
1819
    iprot.readStructEnd()
1820
 
1821
  def write(self, oprot):
1822
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1823
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1824
      return
1825
    oprot.writeStructBegin('startPurchase_args')
1826
    if self.purchaseOrderId is not None:
1827
      oprot.writeFieldBegin('purchaseOrderId', TType.I64, 1)
1828
      oprot.writeI64(self.purchaseOrderId)
1829
      oprot.writeFieldEnd()
1830
    if self.invoiceNumber is not None:
1831
      oprot.writeFieldBegin('invoiceNumber', TType.STRING, 2)
1832
      oprot.writeString(self.invoiceNumber)
1833
      oprot.writeFieldEnd()
1834
    if self.freightCharges is not None:
1835
      oprot.writeFieldBegin('freightCharges', TType.DOUBLE, 3)
1836
      oprot.writeDouble(self.freightCharges)
1837
      oprot.writeFieldEnd()
1838
    oprot.writeFieldStop()
1839
    oprot.writeStructEnd()
1840
 
1841
  def validate(self):
1842
    return
1843
 
1844
 
1845
  def __repr__(self):
1846
    L = ['%s=%r' % (key, value)
1847
      for key, value in self.__dict__.iteritems()]
1848
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1849
 
1850
  def __eq__(self, other):
1851
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1852
 
1853
  def __ne__(self, other):
1854
    return not (self == other)
1855
 
1856
class startPurchase_result:
1857
  """
1858
  Attributes:
1859
   - success
1860
   - e
1861
  """
1862
 
1863
  thrift_spec = (
1864
    (0, TType.I64, 'success', None, None, ), # 0
1865
    (1, TType.STRUCT, 'e', (PurchaseServiceException, PurchaseServiceException.thrift_spec), None, ), # 1
1866
  )
1867
 
1868
  def __init__(self, success=None, e=None,):
1869
    self.success = success
1870
    self.e = e
1871
 
1872
  def read(self, iprot):
1873
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1874
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1875
      return
1876
    iprot.readStructBegin()
1877
    while True:
1878
      (fname, ftype, fid) = iprot.readFieldBegin()
1879
      if ftype == TType.STOP:
1880
        break
1881
      if fid == 0:
1882
        if ftype == TType.I64:
1883
          self.success = iprot.readI64();
1884
        else:
1885
          iprot.skip(ftype)
1886
      elif fid == 1:
1887
        if ftype == TType.STRUCT:
1888
          self.e = PurchaseServiceException()
1889
          self.e.read(iprot)
1890
        else:
1891
          iprot.skip(ftype)
1892
      else:
1893
        iprot.skip(ftype)
1894
      iprot.readFieldEnd()
1895
    iprot.readStructEnd()
1896
 
1897
  def write(self, oprot):
1898
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1899
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1900
      return
1901
    oprot.writeStructBegin('startPurchase_result')
1902
    if self.success is not None:
1903
      oprot.writeFieldBegin('success', TType.I64, 0)
1904
      oprot.writeI64(self.success)
1905
      oprot.writeFieldEnd()
1906
    if self.e is not None:
1907
      oprot.writeFieldBegin('e', TType.STRUCT, 1)
1908
      self.e.write(oprot)
1909
      oprot.writeFieldEnd()
1910
    oprot.writeFieldStop()
1911
    oprot.writeStructEnd()
1912
 
1913
  def validate(self):
1914
    return
1915
 
1916
 
1917
  def __repr__(self):
1918
    L = ['%s=%r' % (key, value)
1919
      for key, value in self.__dict__.iteritems()]
1920
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1921
 
1922
  def __eq__(self, other):
1923
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1924
 
1925
  def __ne__(self, other):
1926
    return not (self == other)
1927
 
1928
class closePurchase_args:
1929
  """
1930
  Attributes:
1931
   - purchaseId
1932
  """
1933
 
1934
  thrift_spec = (
1935
    None, # 0
1936
    (1, TType.I64, 'purchaseId', None, None, ), # 1
1937
  )
1938
 
1939
  def __init__(self, purchaseId=None,):
1940
    self.purchaseId = purchaseId
1941
 
1942
  def read(self, iprot):
1943
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1944
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1945
      return
1946
    iprot.readStructBegin()
1947
    while True:
1948
      (fname, ftype, fid) = iprot.readFieldBegin()
1949
      if ftype == TType.STOP:
1950
        break
1951
      if fid == 1:
1952
        if ftype == TType.I64:
1953
          self.purchaseId = iprot.readI64();
1954
        else:
1955
          iprot.skip(ftype)
1956
      else:
1957
        iprot.skip(ftype)
1958
      iprot.readFieldEnd()
1959
    iprot.readStructEnd()
1960
 
1961
  def write(self, oprot):
1962
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1963
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1964
      return
1965
    oprot.writeStructBegin('closePurchase_args')
1966
    if self.purchaseId is not None:
1967
      oprot.writeFieldBegin('purchaseId', TType.I64, 1)
1968
      oprot.writeI64(self.purchaseId)
1969
      oprot.writeFieldEnd()
1970
    oprot.writeFieldStop()
1971
    oprot.writeStructEnd()
1972
 
1973
  def validate(self):
1974
    return
1975
 
1976
 
1977
  def __repr__(self):
1978
    L = ['%s=%r' % (key, value)
1979
      for key, value in self.__dict__.iteritems()]
1980
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1981
 
1982
  def __eq__(self, other):
1983
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1984
 
1985
  def __ne__(self, other):
1986
    return not (self == other)
1987
 
1988
class closePurchase_result:
1989
  """
1990
  Attributes:
1991
   - success
1992
   - e
1993
  """
1994
 
1995
  thrift_spec = (
1996
    (0, TType.I64, 'success', None, None, ), # 0
1997
    (1, TType.STRUCT, 'e', (PurchaseServiceException, PurchaseServiceException.thrift_spec), None, ), # 1
1998
  )
1999
 
2000
  def __init__(self, success=None, e=None,):
2001
    self.success = success
2002
    self.e = e
2003
 
2004
  def read(self, iprot):
2005
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
2006
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
2007
      return
2008
    iprot.readStructBegin()
2009
    while True:
2010
      (fname, ftype, fid) = iprot.readFieldBegin()
2011
      if ftype == TType.STOP:
2012
        break
2013
      if fid == 0:
2014
        if ftype == TType.I64:
2015
          self.success = iprot.readI64();
2016
        else:
2017
          iprot.skip(ftype)
2018
      elif fid == 1:
2019
        if ftype == TType.STRUCT:
2020
          self.e = PurchaseServiceException()
2021
          self.e.read(iprot)
2022
        else:
2023
          iprot.skip(ftype)
2024
      else:
2025
        iprot.skip(ftype)
2026
      iprot.readFieldEnd()
2027
    iprot.readStructEnd()
2028
 
2029
  def write(self, oprot):
2030
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
2031
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
2032
      return
2033
    oprot.writeStructBegin('closePurchase_result')
2034
    if self.success is not None:
2035
      oprot.writeFieldBegin('success', TType.I64, 0)
2036
      oprot.writeI64(self.success)
2037
      oprot.writeFieldEnd()
2038
    if self.e is not None:
2039
      oprot.writeFieldBegin('e', TType.STRUCT, 1)
2040
      self.e.write(oprot)
2041
      oprot.writeFieldEnd()
2042
    oprot.writeFieldStop()
2043
    oprot.writeStructEnd()
2044
 
2045
  def validate(self):
2046
    return
2047
 
2048
 
2049
  def __repr__(self):
2050
    L = ['%s=%r' % (key, value)
2051
      for key, value in self.__dict__.iteritems()]
2052
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
2053
 
2054
  def __eq__(self, other):
2055
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
2056
 
2057
  def __ne__(self, other):
2058
    return not (self == other)
2059
 
2060
class getAllPurchases_args:
2061
  """
2062
  Attributes:
2063
   - purchaseOrderId
2064
   - open
2065
  """
2066
 
2067
  thrift_spec = (
2068
    None, # 0
2069
    (1, TType.I64, 'purchaseOrderId', None, None, ), # 1
2070
    (2, TType.BOOL, 'open', None, None, ), # 2
2071
  )
2072
 
2073
  def __init__(self, purchaseOrderId=None, open=None,):
2074
    self.purchaseOrderId = purchaseOrderId
2075
    self.open = open
2076
 
2077
  def read(self, iprot):
2078
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
2079
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
2080
      return
2081
    iprot.readStructBegin()
2082
    while True:
2083
      (fname, ftype, fid) = iprot.readFieldBegin()
2084
      if ftype == TType.STOP:
2085
        break
2086
      if fid == 1:
2087
        if ftype == TType.I64:
2088
          self.purchaseOrderId = iprot.readI64();
2089
        else:
2090
          iprot.skip(ftype)
2091
      elif fid == 2:
2092
        if ftype == TType.BOOL:
2093
          self.open = iprot.readBool();
2094
        else:
2095
          iprot.skip(ftype)
2096
      else:
2097
        iprot.skip(ftype)
2098
      iprot.readFieldEnd()
2099
    iprot.readStructEnd()
2100
 
2101
  def write(self, oprot):
2102
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
2103
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
2104
      return
2105
    oprot.writeStructBegin('getAllPurchases_args')
2106
    if self.purchaseOrderId is not None:
2107
      oprot.writeFieldBegin('purchaseOrderId', TType.I64, 1)
2108
      oprot.writeI64(self.purchaseOrderId)
2109
      oprot.writeFieldEnd()
2110
    if self.open is not None:
2111
      oprot.writeFieldBegin('open', TType.BOOL, 2)
2112
      oprot.writeBool(self.open)
2113
      oprot.writeFieldEnd()
2114
    oprot.writeFieldStop()
2115
    oprot.writeStructEnd()
2116
 
2117
  def validate(self):
2118
    return
2119
 
2120
 
2121
  def __repr__(self):
2122
    L = ['%s=%r' % (key, value)
2123
      for key, value in self.__dict__.iteritems()]
2124
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
2125
 
2126
  def __eq__(self, other):
2127
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
2128
 
2129
  def __ne__(self, other):
2130
    return not (self == other)
2131
 
2132
class getAllPurchases_result:
2133
  """
2134
  Attributes:
2135
   - success
2136
   - e
2137
  """
2138
 
2139
  thrift_spec = (
2140
    (0, TType.LIST, 'success', (TType.STRUCT,(Purchase, Purchase.thrift_spec)), None, ), # 0
2141
    (1, TType.STRUCT, 'e', (PurchaseServiceException, PurchaseServiceException.thrift_spec), None, ), # 1
2142
  )
2143
 
2144
  def __init__(self, success=None, e=None,):
2145
    self.success = success
2146
    self.e = e
2147
 
2148
  def read(self, iprot):
2149
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
2150
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
2151
      return
2152
    iprot.readStructBegin()
2153
    while True:
2154
      (fname, ftype, fid) = iprot.readFieldBegin()
2155
      if ftype == TType.STOP:
2156
        break
2157
      if fid == 0:
2158
        if ftype == TType.LIST:
2159
          self.success = []
2160
          (_etype17, _size14) = iprot.readListBegin()
2161
          for _i18 in xrange(_size14):
2162
            _elem19 = Purchase()
2163
            _elem19.read(iprot)
2164
            self.success.append(_elem19)
2165
          iprot.readListEnd()
2166
        else:
2167
          iprot.skip(ftype)
2168
      elif fid == 1:
2169
        if ftype == TType.STRUCT:
2170
          self.e = PurchaseServiceException()
2171
          self.e.read(iprot)
2172
        else:
2173
          iprot.skip(ftype)
2174
      else:
2175
        iprot.skip(ftype)
2176
      iprot.readFieldEnd()
2177
    iprot.readStructEnd()
2178
 
2179
  def write(self, oprot):
2180
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
2181
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
2182
      return
2183
    oprot.writeStructBegin('getAllPurchases_result')
2184
    if self.success is not None:
2185
      oprot.writeFieldBegin('success', TType.LIST, 0)
2186
      oprot.writeListBegin(TType.STRUCT, len(self.success))
2187
      for iter20 in self.success:
2188
        iter20.write(oprot)
2189
      oprot.writeListEnd()
2190
      oprot.writeFieldEnd()
2191
    if self.e is not None:
2192
      oprot.writeFieldBegin('e', TType.STRUCT, 1)
2193
      self.e.write(oprot)
2194
      oprot.writeFieldEnd()
2195
    oprot.writeFieldStop()
2196
    oprot.writeStructEnd()
2197
 
2198
  def validate(self):
2199
    return
2200
 
2201
 
2202
  def __repr__(self):
2203
    L = ['%s=%r' % (key, value)
2204
      for key, value in self.__dict__.iteritems()]
2205
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
2206
 
2207
  def __eq__(self, other):
2208
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
2209
 
2210
  def __ne__(self, other):
2211
    return not (self == other)
2212
 
6386 amar.kumar 2213
class getPurchasesForPO_args:
2214
  """
2215
  Attributes:
2216
   - purchaseOrderId
2217
  """
2218
 
2219
  thrift_spec = (
2220
    None, # 0
2221
    (1, TType.I64, 'purchaseOrderId', None, None, ), # 1
2222
  )
2223
 
2224
  def __init__(self, purchaseOrderId=None,):
2225
    self.purchaseOrderId = purchaseOrderId
2226
 
2227
  def read(self, iprot):
2228
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
2229
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
2230
      return
2231
    iprot.readStructBegin()
2232
    while True:
2233
      (fname, ftype, fid) = iprot.readFieldBegin()
2234
      if ftype == TType.STOP:
2235
        break
2236
      if fid == 1:
2237
        if ftype == TType.I64:
2238
          self.purchaseOrderId = iprot.readI64();
2239
        else:
2240
          iprot.skip(ftype)
2241
      else:
2242
        iprot.skip(ftype)
2243
      iprot.readFieldEnd()
2244
    iprot.readStructEnd()
2245
 
2246
  def write(self, oprot):
2247
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
2248
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
2249
      return
2250
    oprot.writeStructBegin('getPurchasesForPO_args')
2251
    if self.purchaseOrderId is not None:
2252
      oprot.writeFieldBegin('purchaseOrderId', TType.I64, 1)
2253
      oprot.writeI64(self.purchaseOrderId)
2254
      oprot.writeFieldEnd()
2255
    oprot.writeFieldStop()
2256
    oprot.writeStructEnd()
2257
 
2258
  def validate(self):
2259
    return
2260
 
2261
 
2262
  def __repr__(self):
2263
    L = ['%s=%r' % (key, value)
2264
      for key, value in self.__dict__.iteritems()]
2265
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
2266
 
2267
  def __eq__(self, other):
2268
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
2269
 
2270
  def __ne__(self, other):
2271
    return not (self == other)
2272
 
2273
class getPurchasesForPO_result:
2274
  """
2275
  Attributes:
2276
   - success
2277
   - e
2278
  """
2279
 
2280
  thrift_spec = (
2281
    (0, TType.LIST, 'success', (TType.STRUCT,(Purchase, Purchase.thrift_spec)), None, ), # 0
2282
    (1, TType.STRUCT, 'e', (PurchaseServiceException, PurchaseServiceException.thrift_spec), None, ), # 1
2283
  )
2284
 
2285
  def __init__(self, success=None, e=None,):
2286
    self.success = success
2287
    self.e = e
2288
 
2289
  def read(self, iprot):
2290
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
2291
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
2292
      return
2293
    iprot.readStructBegin()
2294
    while True:
2295
      (fname, ftype, fid) = iprot.readFieldBegin()
2296
      if ftype == TType.STOP:
2297
        break
2298
      if fid == 0:
2299
        if ftype == TType.LIST:
2300
          self.success = []
2301
          (_etype24, _size21) = iprot.readListBegin()
2302
          for _i25 in xrange(_size21):
2303
            _elem26 = Purchase()
2304
            _elem26.read(iprot)
2305
            self.success.append(_elem26)
2306
          iprot.readListEnd()
2307
        else:
2308
          iprot.skip(ftype)
2309
      elif fid == 1:
2310
        if ftype == TType.STRUCT:
2311
          self.e = PurchaseServiceException()
2312
          self.e.read(iprot)
2313
        else:
2314
          iprot.skip(ftype)
2315
      else:
2316
        iprot.skip(ftype)
2317
      iprot.readFieldEnd()
2318
    iprot.readStructEnd()
2319
 
2320
  def write(self, oprot):
2321
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
2322
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
2323
      return
2324
    oprot.writeStructBegin('getPurchasesForPO_result')
2325
    if self.success is not None:
2326
      oprot.writeFieldBegin('success', TType.LIST, 0)
2327
      oprot.writeListBegin(TType.STRUCT, len(self.success))
2328
      for iter27 in self.success:
2329
        iter27.write(oprot)
2330
      oprot.writeListEnd()
2331
      oprot.writeFieldEnd()
2332
    if self.e is not None:
2333
      oprot.writeFieldBegin('e', TType.STRUCT, 1)
2334
      self.e.write(oprot)
2335
      oprot.writeFieldEnd()
2336
    oprot.writeFieldStop()
2337
    oprot.writeStructEnd()
2338
 
2339
  def validate(self):
2340
    return
2341
 
2342
 
2343
  def __repr__(self):
2344
    L = ['%s=%r' % (key, value)
2345
      for key, value in self.__dict__.iteritems()]
2346
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
2347
 
2348
  def __eq__(self, other):
2349
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
2350
 
2351
  def __ne__(self, other):
2352
    return not (self == other)
2353
 
4555 mandeep.dh 2354
class getPurchaseOrderForPurchase_args:
4502 mandeep.dh 2355
  """
2356
  Attributes:
2357
   - purchaseId
2358
  """
2359
 
2360
  thrift_spec = (
2361
    None, # 0
2362
    (1, TType.I64, 'purchaseId', None, None, ), # 1
2363
  )
2364
 
4555 mandeep.dh 2365
  def __init__(self, purchaseId=None,):
4502 mandeep.dh 2366
    self.purchaseId = purchaseId
2367
 
2368
  def read(self, iprot):
2369
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
2370
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
2371
      return
2372
    iprot.readStructBegin()
2373
    while True:
2374
      (fname, ftype, fid) = iprot.readFieldBegin()
2375
      if ftype == TType.STOP:
2376
        break
2377
      if fid == 1:
2378
        if ftype == TType.I64:
2379
          self.purchaseId = iprot.readI64();
2380
        else:
2381
          iprot.skip(ftype)
2382
      else:
2383
        iprot.skip(ftype)
2384
      iprot.readFieldEnd()
2385
    iprot.readStructEnd()
2386
 
2387
  def write(self, oprot):
2388
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
2389
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
2390
      return
4555 mandeep.dh 2391
    oprot.writeStructBegin('getPurchaseOrderForPurchase_args')
4502 mandeep.dh 2392
    if self.purchaseId is not None:
2393
      oprot.writeFieldBegin('purchaseId', TType.I64, 1)
2394
      oprot.writeI64(self.purchaseId)
2395
      oprot.writeFieldEnd()
2396
    oprot.writeFieldStop()
2397
    oprot.writeStructEnd()
2398
 
2399
  def validate(self):
2400
    return
2401
 
2402
 
2403
  def __repr__(self):
2404
    L = ['%s=%r' % (key, value)
2405
      for key, value in self.__dict__.iteritems()]
2406
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
2407
 
2408
  def __eq__(self, other):
2409
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
2410
 
2411
  def __ne__(self, other):
2412
    return not (self == other)
2413
 
4555 mandeep.dh 2414
class getPurchaseOrderForPurchase_result:
4502 mandeep.dh 2415
  """
2416
  Attributes:
2417
   - success
2418
  """
2419
 
2420
  thrift_spec = (
4555 mandeep.dh 2421
    (0, TType.STRUCT, 'success', (PurchaseOrder, PurchaseOrder.thrift_spec), None, ), # 0
4502 mandeep.dh 2422
  )
2423
 
2424
  def __init__(self, success=None,):
2425
    self.success = success
2426
 
2427
  def read(self, iprot):
2428
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
2429
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
2430
      return
2431
    iprot.readStructBegin()
2432
    while True:
2433
      (fname, ftype, fid) = iprot.readFieldBegin()
2434
      if ftype == TType.STOP:
2435
        break
2436
      if fid == 0:
4555 mandeep.dh 2437
        if ftype == TType.STRUCT:
2438
          self.success = PurchaseOrder()
2439
          self.success.read(iprot)
4502 mandeep.dh 2440
        else:
2441
          iprot.skip(ftype)
2442
      else:
2443
        iprot.skip(ftype)
2444
      iprot.readFieldEnd()
2445
    iprot.readStructEnd()
2446
 
2447
  def write(self, oprot):
2448
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
2449
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
2450
      return
4555 mandeep.dh 2451
    oprot.writeStructBegin('getPurchaseOrderForPurchase_result')
4502 mandeep.dh 2452
    if self.success is not None:
4555 mandeep.dh 2453
      oprot.writeFieldBegin('success', TType.STRUCT, 0)
2454
      self.success.write(oprot)
4502 mandeep.dh 2455
      oprot.writeFieldEnd()
2456
    oprot.writeFieldStop()
2457
    oprot.writeStructEnd()
2458
 
2459
  def validate(self):
2460
    return
2461
 
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)
4754 mandeep.dh 2473
 
2474
class getPendingPurchaseOrders_args:
2475
  """
2476
  Attributes:
2477
   - warehouseId
2478
  """
2479
 
2480
  thrift_spec = (
2481
    None, # 0
2482
    (1, TType.I64, 'warehouseId', None, None, ), # 1
2483
  )
2484
 
2485
  def __init__(self, warehouseId=None,):
2486
    self.warehouseId = warehouseId
2487
 
2488
  def read(self, iprot):
2489
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
2490
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
2491
      return
2492
    iprot.readStructBegin()
2493
    while True:
2494
      (fname, ftype, fid) = iprot.readFieldBegin()
2495
      if ftype == TType.STOP:
2496
        break
2497
      if fid == 1:
2498
        if ftype == TType.I64:
2499
          self.warehouseId = iprot.readI64();
2500
        else:
2501
          iprot.skip(ftype)
2502
      else:
2503
        iprot.skip(ftype)
2504
      iprot.readFieldEnd()
2505
    iprot.readStructEnd()
2506
 
2507
  def write(self, oprot):
2508
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
2509
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
2510
      return
2511
    oprot.writeStructBegin('getPendingPurchaseOrders_args')
2512
    if self.warehouseId is not None:
2513
      oprot.writeFieldBegin('warehouseId', TType.I64, 1)
2514
      oprot.writeI64(self.warehouseId)
2515
      oprot.writeFieldEnd()
2516
    oprot.writeFieldStop()
2517
    oprot.writeStructEnd()
2518
 
2519
  def validate(self):
2520
    return
2521
 
2522
 
2523
  def __repr__(self):
2524
    L = ['%s=%r' % (key, value)
2525
      for key, value in self.__dict__.iteritems()]
2526
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
2527
 
2528
  def __eq__(self, other):
2529
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
2530
 
2531
  def __ne__(self, other):
2532
    return not (self == other)
2533
 
2534
class getPendingPurchaseOrders_result:
2535
  """
2536
  Attributes:
2537
   - success
2538
   - e
2539
  """
2540
 
2541
  thrift_spec = (
2542
    (0, TType.LIST, 'success', (TType.STRUCT,(PurchaseOrder, PurchaseOrder.thrift_spec)), None, ), # 0
2543
    (1, TType.STRUCT, 'e', (PurchaseServiceException, PurchaseServiceException.thrift_spec), None, ), # 1
2544
  )
2545
 
2546
  def __init__(self, success=None, e=None,):
2547
    self.success = success
2548
    self.e = e
2549
 
2550
  def read(self, iprot):
2551
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
2552
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
2553
      return
2554
    iprot.readStructBegin()
2555
    while True:
2556
      (fname, ftype, fid) = iprot.readFieldBegin()
2557
      if ftype == TType.STOP:
2558
        break
2559
      if fid == 0:
2560
        if ftype == TType.LIST:
2561
          self.success = []
6386 amar.kumar 2562
          (_etype31, _size28) = iprot.readListBegin()
2563
          for _i32 in xrange(_size28):
2564
            _elem33 = PurchaseOrder()
2565
            _elem33.read(iprot)
2566
            self.success.append(_elem33)
4754 mandeep.dh 2567
          iprot.readListEnd()
2568
        else:
2569
          iprot.skip(ftype)
2570
      elif fid == 1:
2571
        if ftype == TType.STRUCT:
2572
          self.e = PurchaseServiceException()
2573
          self.e.read(iprot)
2574
        else:
2575
          iprot.skip(ftype)
2576
      else:
2577
        iprot.skip(ftype)
2578
      iprot.readFieldEnd()
2579
    iprot.readStructEnd()
2580
 
2581
  def write(self, oprot):
2582
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
2583
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
2584
      return
2585
    oprot.writeStructBegin('getPendingPurchaseOrders_result')
2586
    if self.success is not None:
2587
      oprot.writeFieldBegin('success', TType.LIST, 0)
2588
      oprot.writeListBegin(TType.STRUCT, len(self.success))
6386 amar.kumar 2589
      for iter34 in self.success:
2590
        iter34.write(oprot)
4754 mandeep.dh 2591
      oprot.writeListEnd()
2592
      oprot.writeFieldEnd()
2593
    if self.e is not None:
2594
      oprot.writeFieldBegin('e', TType.STRUCT, 1)
2595
      self.e.write(oprot)
2596
      oprot.writeFieldEnd()
2597
    oprot.writeFieldStop()
2598
    oprot.writeStructEnd()
2599
 
2600
  def validate(self):
2601
    return
2602
 
2603
 
2604
  def __repr__(self):
2605
    L = ['%s=%r' % (key, value)
2606
      for key, value in self.__dict__.iteritems()]
2607
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
2608
 
2609
  def __eq__(self, other):
2610
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
2611
 
2612
  def __ne__(self, other):
2613
    return not (self == other)
2614
 
2615
class getSuppliers_args:
2616
 
2617
  thrift_spec = (
2618
  )
2619
 
2620
  def read(self, iprot):
2621
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
2622
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
2623
      return
2624
    iprot.readStructBegin()
2625
    while True:
2626
      (fname, ftype, fid) = iprot.readFieldBegin()
2627
      if ftype == TType.STOP:
2628
        break
2629
      else:
2630
        iprot.skip(ftype)
2631
      iprot.readFieldEnd()
2632
    iprot.readStructEnd()
2633
 
2634
  def write(self, oprot):
2635
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
2636
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
2637
      return
2638
    oprot.writeStructBegin('getSuppliers_args')
2639
    oprot.writeFieldStop()
2640
    oprot.writeStructEnd()
2641
 
2642
  def validate(self):
2643
    return
2644
 
2645
 
2646
  def __repr__(self):
2647
    L = ['%s=%r' % (key, value)
2648
      for key, value in self.__dict__.iteritems()]
2649
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
2650
 
2651
  def __eq__(self, other):
2652
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
2653
 
2654
  def __ne__(self, other):
2655
    return not (self == other)
2656
 
2657
class getSuppliers_result:
2658
  """
2659
  Attributes:
2660
   - success
2661
   - e
2662
  """
2663
 
2664
  thrift_spec = (
2665
    (0, TType.LIST, 'success', (TType.STRUCT,(Supplier, Supplier.thrift_spec)), None, ), # 0
2666
    (1, TType.STRUCT, 'e', (PurchaseServiceException, PurchaseServiceException.thrift_spec), None, ), # 1
2667
  )
2668
 
2669
  def __init__(self, success=None, e=None,):
2670
    self.success = success
2671
    self.e = e
2672
 
2673
  def read(self, iprot):
2674
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
2675
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
2676
      return
2677
    iprot.readStructBegin()
2678
    while True:
2679
      (fname, ftype, fid) = iprot.readFieldBegin()
2680
      if ftype == TType.STOP:
2681
        break
2682
      if fid == 0:
2683
        if ftype == TType.LIST:
2684
          self.success = []
6386 amar.kumar 2685
          (_etype38, _size35) = iprot.readListBegin()
2686
          for _i39 in xrange(_size35):
2687
            _elem40 = Supplier()
2688
            _elem40.read(iprot)
2689
            self.success.append(_elem40)
4754 mandeep.dh 2690
          iprot.readListEnd()
2691
        else:
2692
          iprot.skip(ftype)
2693
      elif fid == 1:
2694
        if ftype == TType.STRUCT:
2695
          self.e = PurchaseServiceException()
2696
          self.e.read(iprot)
2697
        else:
2698
          iprot.skip(ftype)
2699
      else:
2700
        iprot.skip(ftype)
2701
      iprot.readFieldEnd()
2702
    iprot.readStructEnd()
2703
 
2704
  def write(self, oprot):
2705
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
2706
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
2707
      return
2708
    oprot.writeStructBegin('getSuppliers_result')
2709
    if self.success is not None:
2710
      oprot.writeFieldBegin('success', TType.LIST, 0)
2711
      oprot.writeListBegin(TType.STRUCT, len(self.success))
6386 amar.kumar 2712
      for iter41 in self.success:
2713
        iter41.write(oprot)
4754 mandeep.dh 2714
      oprot.writeListEnd()
2715
      oprot.writeFieldEnd()
2716
    if self.e is not None:
2717
      oprot.writeFieldBegin('e', TType.STRUCT, 1)
2718
      self.e.write(oprot)
2719
      oprot.writeFieldEnd()
2720
    oprot.writeFieldStop()
2721
    oprot.writeStructEnd()
2722
 
2723
  def validate(self):
2724
    return
2725
 
2726
 
2727
  def __repr__(self):
2728
    L = ['%s=%r' % (key, value)
2729
      for key, value in self.__dict__.iteritems()]
2730
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
2731
 
2732
  def __eq__(self, other):
2733
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
2734
 
2735
  def __ne__(self, other):
2736
    return not (self == other)
2737
 
2738
class fulfillPO_args:
2739
  """
2740
  Attributes:
2741
   - purchaseOrderId
2742
   - itemId
2743
   - quantity
2744
  """
2745
 
2746
  thrift_spec = (
2747
    None, # 0
2748
    (1, TType.I64, 'purchaseOrderId', None, None, ), # 1
2749
    (2, TType.I64, 'itemId', None, None, ), # 2
2750
    (3, TType.I64, 'quantity', None, None, ), # 3
2751
  )
2752
 
2753
  def __init__(self, purchaseOrderId=None, itemId=None, quantity=None,):
2754
    self.purchaseOrderId = purchaseOrderId
2755
    self.itemId = itemId
2756
    self.quantity = quantity
2757
 
2758
  def read(self, iprot):
2759
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
2760
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
2761
      return
2762
    iprot.readStructBegin()
2763
    while True:
2764
      (fname, ftype, fid) = iprot.readFieldBegin()
2765
      if ftype == TType.STOP:
2766
        break
2767
      if fid == 1:
2768
        if ftype == TType.I64:
2769
          self.purchaseOrderId = iprot.readI64();
2770
        else:
2771
          iprot.skip(ftype)
2772
      elif fid == 2:
2773
        if ftype == TType.I64:
2774
          self.itemId = iprot.readI64();
2775
        else:
2776
          iprot.skip(ftype)
2777
      elif fid == 3:
2778
        if ftype == TType.I64:
2779
          self.quantity = iprot.readI64();
2780
        else:
2781
          iprot.skip(ftype)
2782
      else:
2783
        iprot.skip(ftype)
2784
      iprot.readFieldEnd()
2785
    iprot.readStructEnd()
2786
 
2787
  def write(self, oprot):
2788
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
2789
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
2790
      return
2791
    oprot.writeStructBegin('fulfillPO_args')
2792
    if self.purchaseOrderId is not None:
2793
      oprot.writeFieldBegin('purchaseOrderId', TType.I64, 1)
2794
      oprot.writeI64(self.purchaseOrderId)
2795
      oprot.writeFieldEnd()
2796
    if self.itemId is not None:
2797
      oprot.writeFieldBegin('itemId', TType.I64, 2)
2798
      oprot.writeI64(self.itemId)
2799
      oprot.writeFieldEnd()
2800
    if self.quantity is not None:
2801
      oprot.writeFieldBegin('quantity', TType.I64, 3)
2802
      oprot.writeI64(self.quantity)
2803
      oprot.writeFieldEnd()
2804
    oprot.writeFieldStop()
2805
    oprot.writeStructEnd()
2806
 
2807
  def validate(self):
2808
    return
2809
 
2810
 
2811
  def __repr__(self):
2812
    L = ['%s=%r' % (key, value)
2813
      for key, value in self.__dict__.iteritems()]
2814
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
2815
 
2816
  def __eq__(self, other):
2817
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
2818
 
2819
  def __ne__(self, other):
2820
    return not (self == other)
2821
 
2822
class fulfillPO_result:
2823
  """
2824
  Attributes:
2825
   - e
2826
  """
2827
 
2828
  thrift_spec = (
2829
    None, # 0
2830
    (1, TType.STRUCT, 'e', (PurchaseServiceException, PurchaseServiceException.thrift_spec), None, ), # 1
2831
  )
2832
 
2833
  def __init__(self, e=None,):
2834
    self.e = e
2835
 
2836
  def read(self, iprot):
2837
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
2838
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
2839
      return
2840
    iprot.readStructBegin()
2841
    while True:
2842
      (fname, ftype, fid) = iprot.readFieldBegin()
2843
      if ftype == TType.STOP:
2844
        break
2845
      if fid == 1:
2846
        if ftype == TType.STRUCT:
2847
          self.e = PurchaseServiceException()
2848
          self.e.read(iprot)
2849
        else:
2850
          iprot.skip(ftype)
2851
      else:
2852
        iprot.skip(ftype)
2853
      iprot.readFieldEnd()
2854
    iprot.readStructEnd()
2855
 
2856
  def write(self, oprot):
2857
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
2858
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
2859
      return
2860
    oprot.writeStructBegin('fulfillPO_result')
2861
    if self.e is not None:
2862
      oprot.writeFieldBegin('e', TType.STRUCT, 1)
2863
      self.e.write(oprot)
2864
      oprot.writeFieldEnd()
2865
    oprot.writeFieldStop()
2866
    oprot.writeStructEnd()
2867
 
2868
  def validate(self):
2869
    return
2870
 
2871
 
2872
  def __repr__(self):
2873
    L = ['%s=%r' % (key, value)
2874
      for key, value in self.__dict__.iteritems()]
2875
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
2876
 
2877
  def __eq__(self, other):
2878
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
2879
 
2880
  def __ne__(self, other):
2881
    return not (self == other)
2882
 
2883
class updatePurchaseOrder_args:
2884
  """
2885
  Attributes:
2886
   - purchaseOrder
2887
  """
2888
 
2889
  thrift_spec = (
2890
    None, # 0
2891
    (1, TType.STRUCT, 'purchaseOrder', (PurchaseOrder, PurchaseOrder.thrift_spec), None, ), # 1
2892
  )
2893
 
2894
  def __init__(self, purchaseOrder=None,):
2895
    self.purchaseOrder = purchaseOrder
2896
 
2897
  def read(self, iprot):
2898
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
2899
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
2900
      return
2901
    iprot.readStructBegin()
2902
    while True:
2903
      (fname, ftype, fid) = iprot.readFieldBegin()
2904
      if ftype == TType.STOP:
2905
        break
2906
      if fid == 1:
2907
        if ftype == TType.STRUCT:
2908
          self.purchaseOrder = PurchaseOrder()
2909
          self.purchaseOrder.read(iprot)
2910
        else:
2911
          iprot.skip(ftype)
2912
      else:
2913
        iprot.skip(ftype)
2914
      iprot.readFieldEnd()
2915
    iprot.readStructEnd()
2916
 
2917
  def write(self, oprot):
2918
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
2919
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
2920
      return
2921
    oprot.writeStructBegin('updatePurchaseOrder_args')
2922
    if self.purchaseOrder is not None:
2923
      oprot.writeFieldBegin('purchaseOrder', TType.STRUCT, 1)
2924
      self.purchaseOrder.write(oprot)
2925
      oprot.writeFieldEnd()
2926
    oprot.writeFieldStop()
2927
    oprot.writeStructEnd()
2928
 
2929
  def validate(self):
2930
    return
2931
 
2932
 
2933
  def __repr__(self):
2934
    L = ['%s=%r' % (key, value)
2935
      for key, value in self.__dict__.iteritems()]
2936
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
2937
 
2938
  def __eq__(self, other):
2939
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
2940
 
2941
  def __ne__(self, other):
2942
    return not (self == other)
2943
 
2944
class updatePurchaseOrder_result:
2945
  """
2946
  Attributes:
2947
   - e
2948
  """
2949
 
2950
  thrift_spec = (
2951
    None, # 0
2952
    (1, TType.STRUCT, 'e', (PurchaseServiceException, PurchaseServiceException.thrift_spec), None, ), # 1
2953
  )
2954
 
2955
  def __init__(self, e=None,):
2956
    self.e = e
2957
 
2958
  def read(self, iprot):
2959
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
2960
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
2961
      return
2962
    iprot.readStructBegin()
2963
    while True:
2964
      (fname, ftype, fid) = iprot.readFieldBegin()
2965
      if ftype == TType.STOP:
2966
        break
2967
      if fid == 1:
2968
        if ftype == TType.STRUCT:
2969
          self.e = PurchaseServiceException()
2970
          self.e.read(iprot)
2971
        else:
2972
          iprot.skip(ftype)
2973
      else:
2974
        iprot.skip(ftype)
2975
      iprot.readFieldEnd()
2976
    iprot.readStructEnd()
2977
 
2978
  def write(self, oprot):
2979
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
2980
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
2981
      return
2982
    oprot.writeStructBegin('updatePurchaseOrder_result')
2983
    if self.e is not None:
2984
      oprot.writeFieldBegin('e', TType.STRUCT, 1)
2985
      self.e.write(oprot)
2986
      oprot.writeFieldEnd()
2987
    oprot.writeFieldStop()
2988
    oprot.writeStructEnd()
2989
 
2990
  def validate(self):
2991
    return
2992
 
2993
 
2994
  def __repr__(self):
2995
    L = ['%s=%r' % (key, value)
2996
      for key, value in self.__dict__.iteritems()]
2997
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
2998
 
2999
  def __eq__(self, other):
3000
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
3001
 
3002
  def __ne__(self, other):
3003
    return not (self == other)
5185 mandeep.dh 3004
 
3005
class unFulfillPO_args:
3006
  """
3007
  Attributes:
3008
   - purchaseId
3009
   - itemId
3010
   - quantity
3011
  """
3012
 
3013
  thrift_spec = (
3014
    None, # 0
3015
    (1, TType.I64, 'purchaseId', None, None, ), # 1
3016
    (2, TType.I64, 'itemId', None, None, ), # 2
3017
    (3, TType.I64, 'quantity', None, None, ), # 3
3018
  )
3019
 
3020
  def __init__(self, purchaseId=None, itemId=None, quantity=None,):
3021
    self.purchaseId = purchaseId
3022
    self.itemId = itemId
3023
    self.quantity = quantity
3024
 
3025
  def read(self, iprot):
3026
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
3027
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
3028
      return
3029
    iprot.readStructBegin()
3030
    while True:
3031
      (fname, ftype, fid) = iprot.readFieldBegin()
3032
      if ftype == TType.STOP:
3033
        break
3034
      if fid == 1:
3035
        if ftype == TType.I64:
3036
          self.purchaseId = iprot.readI64();
3037
        else:
3038
          iprot.skip(ftype)
3039
      elif fid == 2:
3040
        if ftype == TType.I64:
3041
          self.itemId = iprot.readI64();
3042
        else:
3043
          iprot.skip(ftype)
3044
      elif fid == 3:
3045
        if ftype == TType.I64:
3046
          self.quantity = iprot.readI64();
3047
        else:
3048
          iprot.skip(ftype)
3049
      else:
3050
        iprot.skip(ftype)
3051
      iprot.readFieldEnd()
3052
    iprot.readStructEnd()
3053
 
3054
  def write(self, oprot):
3055
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
3056
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
3057
      return
3058
    oprot.writeStructBegin('unFulfillPO_args')
3059
    if self.purchaseId is not None:
3060
      oprot.writeFieldBegin('purchaseId', TType.I64, 1)
3061
      oprot.writeI64(self.purchaseId)
3062
      oprot.writeFieldEnd()
3063
    if self.itemId is not None:
3064
      oprot.writeFieldBegin('itemId', TType.I64, 2)
3065
      oprot.writeI64(self.itemId)
3066
      oprot.writeFieldEnd()
3067
    if self.quantity is not None:
3068
      oprot.writeFieldBegin('quantity', TType.I64, 3)
3069
      oprot.writeI64(self.quantity)
3070
      oprot.writeFieldEnd()
3071
    oprot.writeFieldStop()
3072
    oprot.writeStructEnd()
3073
 
3074
  def validate(self):
3075
    return
3076
 
3077
 
3078
  def __repr__(self):
3079
    L = ['%s=%r' % (key, value)
3080
      for key, value in self.__dict__.iteritems()]
3081
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
3082
 
3083
  def __eq__(self, other):
3084
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
3085
 
3086
  def __ne__(self, other):
3087
    return not (self == other)
3088
 
3089
class unFulfillPO_result:
3090
  """
3091
  Attributes:
3092
   - e
3093
  """
3094
 
3095
  thrift_spec = (
3096
    None, # 0
3097
    (1, TType.STRUCT, 'e', (PurchaseServiceException, PurchaseServiceException.thrift_spec), None, ), # 1
3098
  )
3099
 
3100
  def __init__(self, e=None,):
3101
    self.e = e
3102
 
3103
  def read(self, iprot):
3104
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
3105
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
3106
      return
3107
    iprot.readStructBegin()
3108
    while True:
3109
      (fname, ftype, fid) = iprot.readFieldBegin()
3110
      if ftype == TType.STOP:
3111
        break
3112
      if fid == 1:
3113
        if ftype == TType.STRUCT:
3114
          self.e = PurchaseServiceException()
3115
          self.e.read(iprot)
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('unFulfillPO_result')
3128
    if self.e is not None:
3129
      oprot.writeFieldBegin('e', TType.STRUCT, 1)
3130
      self.e.write(oprot)
3131
      oprot.writeFieldEnd()
3132
    oprot.writeFieldStop()
3133
    oprot.writeStructEnd()
3134
 
3135
  def validate(self):
3136
    return
3137
 
3138
 
3139
  def __repr__(self):
3140
    L = ['%s=%r' % (key, value)
3141
      for key, value in self.__dict__.iteritems()]
3142
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
3143
 
3144
  def __eq__(self, other):
3145
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
3146
 
3147
  def __ne__(self, other):
3148
    return not (self == other)
5443 mandeep.dh 3149
 
3150
class getInvoices_args:
3151
  """
3152
  Attributes:
3153
   - date
3154
  """
3155
 
3156
  thrift_spec = (
3157
    None, # 0
3158
    (1, TType.I64, 'date', None, None, ), # 1
3159
  )
3160
 
3161
  def __init__(self, date=None,):
3162
    self.date = date
3163
 
3164
  def read(self, iprot):
3165
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
3166
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
3167
      return
3168
    iprot.readStructBegin()
3169
    while True:
3170
      (fname, ftype, fid) = iprot.readFieldBegin()
3171
      if ftype == TType.STOP:
3172
        break
3173
      if fid == 1:
3174
        if ftype == TType.I64:
3175
          self.date = iprot.readI64();
3176
        else:
3177
          iprot.skip(ftype)
3178
      else:
3179
        iprot.skip(ftype)
3180
      iprot.readFieldEnd()
3181
    iprot.readStructEnd()
3182
 
3183
  def write(self, oprot):
3184
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
3185
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
3186
      return
3187
    oprot.writeStructBegin('getInvoices_args')
3188
    if self.date is not None:
3189
      oprot.writeFieldBegin('date', TType.I64, 1)
3190
      oprot.writeI64(self.date)
3191
      oprot.writeFieldEnd()
3192
    oprot.writeFieldStop()
3193
    oprot.writeStructEnd()
3194
 
3195
  def validate(self):
3196
    return
3197
 
3198
 
3199
  def __repr__(self):
3200
    L = ['%s=%r' % (key, value)
3201
      for key, value in self.__dict__.iteritems()]
3202
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
3203
 
3204
  def __eq__(self, other):
3205
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
3206
 
3207
  def __ne__(self, other):
3208
    return not (self == other)
3209
 
3210
class getInvoices_result:
3211
  """
3212
  Attributes:
3213
   - success
3214
  """
3215
 
3216
  thrift_spec = (
3217
    (0, TType.LIST, 'success', (TType.STRUCT,(Invoice, Invoice.thrift_spec)), None, ), # 0
3218
  )
3219
 
3220
  def __init__(self, success=None,):
3221
    self.success = success
3222
 
3223
  def read(self, iprot):
3224
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
3225
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
3226
      return
3227
    iprot.readStructBegin()
3228
    while True:
3229
      (fname, ftype, fid) = iprot.readFieldBegin()
3230
      if ftype == TType.STOP:
3231
        break
3232
      if fid == 0:
3233
        if ftype == TType.LIST:
3234
          self.success = []
6386 amar.kumar 3235
          (_etype45, _size42) = iprot.readListBegin()
3236
          for _i46 in xrange(_size42):
3237
            _elem47 = Invoice()
3238
            _elem47.read(iprot)
3239
            self.success.append(_elem47)
5443 mandeep.dh 3240
          iprot.readListEnd()
3241
        else:
3242
          iprot.skip(ftype)
3243
      else:
3244
        iprot.skip(ftype)
3245
      iprot.readFieldEnd()
3246
    iprot.readStructEnd()
3247
 
3248
  def write(self, oprot):
3249
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
3250
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
3251
      return
3252
    oprot.writeStructBegin('getInvoices_result')
3253
    if self.success is not None:
3254
      oprot.writeFieldBegin('success', TType.LIST, 0)
3255
      oprot.writeListBegin(TType.STRUCT, len(self.success))
6386 amar.kumar 3256
      for iter48 in self.success:
3257
        iter48.write(oprot)
5443 mandeep.dh 3258
      oprot.writeListEnd()
3259
      oprot.writeFieldEnd()
3260
    oprot.writeFieldStop()
3261
    oprot.writeStructEnd()
3262
 
3263
  def validate(self):
3264
    return
3265
 
3266
 
3267
  def __repr__(self):
3268
    L = ['%s=%r' % (key, value)
3269
      for key, value in self.__dict__.iteritems()]
3270
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
3271
 
3272
  def __eq__(self, other):
3273
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
3274
 
3275
  def __ne__(self, other):
3276
    return not (self == other)
3277
 
3278
class createInvoice_args:
3279
  """
3280
  Attributes:
3281
   - invoice
3282
  """
3283
 
3284
  thrift_spec = (
3285
    None, # 0
3286
    (1, TType.STRUCT, 'invoice', (Invoice, Invoice.thrift_spec), None, ), # 1
3287
  )
3288
 
3289
  def __init__(self, invoice=None,):
3290
    self.invoice = invoice
3291
 
3292
  def read(self, iprot):
3293
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
3294
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
3295
      return
3296
    iprot.readStructBegin()
3297
    while True:
3298
      (fname, ftype, fid) = iprot.readFieldBegin()
3299
      if ftype == TType.STOP:
3300
        break
3301
      if fid == 1:
3302
        if ftype == TType.STRUCT:
3303
          self.invoice = Invoice()
3304
          self.invoice.read(iprot)
3305
        else:
3306
          iprot.skip(ftype)
3307
      else:
3308
        iprot.skip(ftype)
3309
      iprot.readFieldEnd()
3310
    iprot.readStructEnd()
3311
 
3312
  def write(self, oprot):
3313
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
3314
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
3315
      return
3316
    oprot.writeStructBegin('createInvoice_args')
3317
    if self.invoice is not None:
3318
      oprot.writeFieldBegin('invoice', TType.STRUCT, 1)
3319
      self.invoice.write(oprot)
3320
      oprot.writeFieldEnd()
3321
    oprot.writeFieldStop()
3322
    oprot.writeStructEnd()
3323
 
3324
  def validate(self):
3325
    return
3326
 
3327
 
3328
  def __repr__(self):
3329
    L = ['%s=%r' % (key, value)
3330
      for key, value in self.__dict__.iteritems()]
3331
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
3332
 
3333
  def __eq__(self, other):
3334
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
3335
 
3336
  def __ne__(self, other):
3337
    return not (self == other)
3338
 
3339
class createInvoice_result:
3340
  """
3341
  Attributes:
3342
   - e
3343
  """
3344
 
3345
  thrift_spec = (
3346
    None, # 0
3347
    (1, TType.STRUCT, 'e', (PurchaseServiceException, PurchaseServiceException.thrift_spec), None, ), # 1
3348
  )
3349
 
3350
  def __init__(self, e=None,):
3351
    self.e = e
3352
 
3353
  def read(self, iprot):
3354
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
3355
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
3356
      return
3357
    iprot.readStructBegin()
3358
    while True:
3359
      (fname, ftype, fid) = iprot.readFieldBegin()
3360
      if ftype == TType.STOP:
3361
        break
3362
      if fid == 1:
3363
        if ftype == TType.STRUCT:
3364
          self.e = PurchaseServiceException()
3365
          self.e.read(iprot)
3366
        else:
3367
          iprot.skip(ftype)
3368
      else:
3369
        iprot.skip(ftype)
3370
      iprot.readFieldEnd()
3371
    iprot.readStructEnd()
3372
 
3373
  def write(self, oprot):
3374
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
3375
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
3376
      return
3377
    oprot.writeStructBegin('createInvoice_result')
3378
    if self.e is not None:
3379
      oprot.writeFieldBegin('e', TType.STRUCT, 1)
3380
      self.e.write(oprot)
3381
      oprot.writeFieldEnd()
3382
    oprot.writeFieldStop()
3383
    oprot.writeStructEnd()
3384
 
3385
  def validate(self):
3386
    return
3387
 
3388
 
3389
  def __repr__(self):
3390
    L = ['%s=%r' % (key, value)
3391
      for key, value in self.__dict__.iteritems()]
3392
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
3393
 
3394
  def __eq__(self, other):
3395
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
3396
 
3397
  def __ne__(self, other):
3398
    return not (self == other)
5591 mandeep.dh 3399
 
3400
class addSupplier_args:
3401
  """
3402
  Attributes:
3403
   - supplier
3404
  """
3405
 
3406
  thrift_spec = (
3407
    None, # 0
3408
    (1, TType.STRUCT, 'supplier', (Supplier, Supplier.thrift_spec), None, ), # 1
3409
  )
3410
 
3411
  def __init__(self, supplier=None,):
3412
    self.supplier = supplier
3413
 
3414
  def read(self, iprot):
3415
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
3416
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
3417
      return
3418
    iprot.readStructBegin()
3419
    while True:
3420
      (fname, ftype, fid) = iprot.readFieldBegin()
3421
      if ftype == TType.STOP:
3422
        break
3423
      if fid == 1:
3424
        if ftype == TType.STRUCT:
3425
          self.supplier = Supplier()
3426
          self.supplier.read(iprot)
3427
        else:
3428
          iprot.skip(ftype)
3429
      else:
3430
        iprot.skip(ftype)
3431
      iprot.readFieldEnd()
3432
    iprot.readStructEnd()
3433
 
3434
  def write(self, oprot):
3435
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
3436
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
3437
      return
3438
    oprot.writeStructBegin('addSupplier_args')
3439
    if self.supplier is not None:
3440
      oprot.writeFieldBegin('supplier', TType.STRUCT, 1)
3441
      self.supplier.write(oprot)
3442
      oprot.writeFieldEnd()
3443
    oprot.writeFieldStop()
3444
    oprot.writeStructEnd()
3445
 
3446
  def validate(self):
3447
    return
3448
 
3449
 
3450
  def __repr__(self):
3451
    L = ['%s=%r' % (key, value)
3452
      for key, value in self.__dict__.iteritems()]
3453
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
3454
 
3455
  def __eq__(self, other):
3456
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
3457
 
3458
  def __ne__(self, other):
3459
    return not (self == other)
3460
 
3461
class addSupplier_result:
3462
  """
3463
  Attributes:
3464
   - success
3465
  """
3466
 
3467
  thrift_spec = (
3468
    (0, TType.STRUCT, 'success', (Supplier, Supplier.thrift_spec), None, ), # 0
3469
  )
3470
 
3471
  def __init__(self, success=None,):
3472
    self.success = success
3473
 
3474
  def read(self, iprot):
3475
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
3476
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
3477
      return
3478
    iprot.readStructBegin()
3479
    while True:
3480
      (fname, ftype, fid) = iprot.readFieldBegin()
3481
      if ftype == TType.STOP:
3482
        break
3483
      if fid == 0:
3484
        if ftype == TType.STRUCT:
3485
          self.success = Supplier()
3486
          self.success.read(iprot)
3487
        else:
3488
          iprot.skip(ftype)
3489
      else:
3490
        iprot.skip(ftype)
3491
      iprot.readFieldEnd()
3492
    iprot.readStructEnd()
3493
 
3494
  def write(self, oprot):
3495
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
3496
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
3497
      return
3498
    oprot.writeStructBegin('addSupplier_result')
3499
    if self.success is not None:
3500
      oprot.writeFieldBegin('success', TType.STRUCT, 0)
3501
      self.success.write(oprot)
3502
      oprot.writeFieldEnd()
3503
    oprot.writeFieldStop()
3504
    oprot.writeStructEnd()
3505
 
3506
  def validate(self):
3507
    return
3508
 
3509
 
3510
  def __repr__(self):
3511
    L = ['%s=%r' % (key, value)
3512
      for key, value in self.__dict__.iteritems()]
3513
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
3514
 
3515
  def __eq__(self, other):
3516
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
3517
 
3518
  def __ne__(self, other):
3519
    return not (self == other)
3520
 
3521
class updateSupplier_args:
3522
  """
3523
  Attributes:
3524
   - supplier
3525
  """
3526
 
3527
  thrift_spec = (
3528
    None, # 0
3529
    (1, TType.STRUCT, 'supplier', (Supplier, Supplier.thrift_spec), None, ), # 1
3530
  )
3531
 
3532
  def __init__(self, supplier=None,):
3533
    self.supplier = supplier
3534
 
3535
  def read(self, iprot):
3536
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
3537
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
3538
      return
3539
    iprot.readStructBegin()
3540
    while True:
3541
      (fname, ftype, fid) = iprot.readFieldBegin()
3542
      if ftype == TType.STOP:
3543
        break
3544
      if fid == 1:
3545
        if ftype == TType.STRUCT:
3546
          self.supplier = Supplier()
3547
          self.supplier.read(iprot)
3548
        else:
3549
          iprot.skip(ftype)
3550
      else:
3551
        iprot.skip(ftype)
3552
      iprot.readFieldEnd()
3553
    iprot.readStructEnd()
3554
 
3555
  def write(self, oprot):
3556
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
3557
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
3558
      return
3559
    oprot.writeStructBegin('updateSupplier_args')
3560
    if self.supplier is not None:
3561
      oprot.writeFieldBegin('supplier', TType.STRUCT, 1)
3562
      self.supplier.write(oprot)
3563
      oprot.writeFieldEnd()
3564
    oprot.writeFieldStop()
3565
    oprot.writeStructEnd()
3566
 
3567
  def validate(self):
3568
    return
3569
 
3570
 
3571
  def __repr__(self):
3572
    L = ['%s=%r' % (key, value)
3573
      for key, value in self.__dict__.iteritems()]
3574
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
3575
 
3576
  def __eq__(self, other):
3577
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
3578
 
3579
  def __ne__(self, other):
3580
    return not (self == other)
3581
 
3582
class updateSupplier_result:
3583
 
3584
  thrift_spec = (
3585
  )
3586
 
3587
  def read(self, iprot):
3588
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
3589
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
3590
      return
3591
    iprot.readStructBegin()
3592
    while True:
3593
      (fname, ftype, fid) = iprot.readFieldBegin()
3594
      if ftype == TType.STOP:
3595
        break
3596
      else:
3597
        iprot.skip(ftype)
3598
      iprot.readFieldEnd()
3599
    iprot.readStructEnd()
3600
 
3601
  def write(self, oprot):
3602
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
3603
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
3604
      return
3605
    oprot.writeStructBegin('updateSupplier_result')
3606
    oprot.writeFieldStop()
3607
    oprot.writeStructEnd()
3608
 
3609
  def validate(self):
3610
    return
3611
 
3612
 
3613
  def __repr__(self):
3614
    L = ['%s=%r' % (key, value)
3615
      for key, value in self.__dict__.iteritems()]
3616
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
3617
 
3618
  def __eq__(self, other):
3619
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
3620
 
3621
  def __ne__(self, other):
3622
    return not (self == other)
6467 amar.kumar 3623
 
3624
class createPurchaseReturn_args:
3625
  """
3626
  Attributes:
3627
   - purchaseReturn
3628
  """
3629
 
3630
  thrift_spec = (
3631
    None, # 0
3632
    (1, TType.STRUCT, 'purchaseReturn', (PurchaseReturn, PurchaseReturn.thrift_spec), None, ), # 1
3633
  )
3634
 
3635
  def __init__(self, purchaseReturn=None,):
3636
    self.purchaseReturn = purchaseReturn
3637
 
3638
  def read(self, iprot):
3639
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
3640
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
3641
      return
3642
    iprot.readStructBegin()
3643
    while True:
3644
      (fname, ftype, fid) = iprot.readFieldBegin()
3645
      if ftype == TType.STOP:
3646
        break
3647
      if fid == 1:
3648
        if ftype == TType.STRUCT:
3649
          self.purchaseReturn = PurchaseReturn()
3650
          self.purchaseReturn.read(iprot)
3651
        else:
3652
          iprot.skip(ftype)
3653
      else:
3654
        iprot.skip(ftype)
3655
      iprot.readFieldEnd()
3656
    iprot.readStructEnd()
3657
 
3658
  def write(self, oprot):
3659
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
3660
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
3661
      return
3662
    oprot.writeStructBegin('createPurchaseReturn_args')
3663
    if self.purchaseReturn is not None:
3664
      oprot.writeFieldBegin('purchaseReturn', TType.STRUCT, 1)
3665
      self.purchaseReturn.write(oprot)
3666
      oprot.writeFieldEnd()
3667
    oprot.writeFieldStop()
3668
    oprot.writeStructEnd()
3669
 
3670
  def validate(self):
3671
    return
3672
 
3673
 
3674
  def __repr__(self):
3675
    L = ['%s=%r' % (key, value)
3676
      for key, value in self.__dict__.iteritems()]
3677
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
3678
 
3679
  def __eq__(self, other):
3680
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
3681
 
3682
  def __ne__(self, other):
3683
    return not (self == other)
3684
 
3685
class createPurchaseReturn_result:
3686
  """
3687
  Attributes:
3688
   - success
3689
  """
3690
 
3691
  thrift_spec = (
3692
    (0, TType.I64, 'success', None, None, ), # 0
3693
  )
3694
 
3695
  def __init__(self, success=None,):
3696
    self.success = success
3697
 
3698
  def read(self, iprot):
3699
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
3700
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
3701
      return
3702
    iprot.readStructBegin()
3703
    while True:
3704
      (fname, ftype, fid) = iprot.readFieldBegin()
3705
      if ftype == TType.STOP:
3706
        break
3707
      if fid == 0:
3708
        if ftype == TType.I64:
3709
          self.success = iprot.readI64();
3710
        else:
3711
          iprot.skip(ftype)
3712
      else:
3713
        iprot.skip(ftype)
3714
      iprot.readFieldEnd()
3715
    iprot.readStructEnd()
3716
 
3717
  def write(self, oprot):
3718
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
3719
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
3720
      return
3721
    oprot.writeStructBegin('createPurchaseReturn_result')
3722
    if self.success is not None:
3723
      oprot.writeFieldBegin('success', TType.I64, 0)
3724
      oprot.writeI64(self.success)
3725
      oprot.writeFieldEnd()
3726
    oprot.writeFieldStop()
3727
    oprot.writeStructEnd()
3728
 
3729
  def validate(self):
3730
    return
3731
 
3732
 
3733
  def __repr__(self):
3734
    L = ['%s=%r' % (key, value)
3735
      for key, value in self.__dict__.iteritems()]
3736
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
3737
 
3738
  def __eq__(self, other):
3739
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
3740
 
3741
  def __ne__(self, other):
3742
    return not (self == other)
3743
 
3744
class settlePurchaseReturn_args:
3745
  """
3746
  Attributes:
3747
   - id
3748
  """
3749
 
3750
  thrift_spec = (
3751
    None, # 0
3752
    (1, TType.I64, 'id', None, None, ), # 1
3753
  )
3754
 
3755
  def __init__(self, id=None,):
3756
    self.id = id
3757
 
3758
  def read(self, iprot):
3759
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
3760
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
3761
      return
3762
    iprot.readStructBegin()
3763
    while True:
3764
      (fname, ftype, fid) = iprot.readFieldBegin()
3765
      if ftype == TType.STOP:
3766
        break
3767
      if fid == 1:
3768
        if ftype == TType.I64:
3769
          self.id = iprot.readI64();
3770
        else:
3771
          iprot.skip(ftype)
3772
      else:
3773
        iprot.skip(ftype)
3774
      iprot.readFieldEnd()
3775
    iprot.readStructEnd()
3776
 
3777
  def write(self, oprot):
3778
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
3779
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
3780
      return
3781
    oprot.writeStructBegin('settlePurchaseReturn_args')
3782
    if self.id is not None:
3783
      oprot.writeFieldBegin('id', TType.I64, 1)
3784
      oprot.writeI64(self.id)
3785
      oprot.writeFieldEnd()
3786
    oprot.writeFieldStop()
3787
    oprot.writeStructEnd()
3788
 
3789
  def validate(self):
3790
    return
3791
 
3792
 
3793
  def __repr__(self):
3794
    L = ['%s=%r' % (key, value)
3795
      for key, value in self.__dict__.iteritems()]
3796
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
3797
 
3798
  def __eq__(self, other):
3799
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
3800
 
3801
  def __ne__(self, other):
3802
    return not (self == other)
3803
 
3804
class settlePurchaseReturn_result:
3805
 
3806
  thrift_spec = (
3807
  )
3808
 
3809
  def read(self, iprot):
3810
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
3811
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
3812
      return
3813
    iprot.readStructBegin()
3814
    while True:
3815
      (fname, ftype, fid) = iprot.readFieldBegin()
3816
      if ftype == TType.STOP:
3817
        break
3818
      else:
3819
        iprot.skip(ftype)
3820
      iprot.readFieldEnd()
3821
    iprot.readStructEnd()
3822
 
3823
  def write(self, oprot):
3824
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
3825
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
3826
      return
3827
    oprot.writeStructBegin('settlePurchaseReturn_result')
3828
    oprot.writeFieldStop()
3829
    oprot.writeStructEnd()
3830
 
3831
  def validate(self):
3832
    return
3833
 
3834
 
3835
  def __repr__(self):
3836
    L = ['%s=%r' % (key, value)
3837
      for key, value in self.__dict__.iteritems()]
3838
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
3839
 
3840
  def __eq__(self, other):
3841
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
3842
 
3843
  def __ne__(self, other):
3844
    return not (self == other)
3845
 
3846
class getUnsettledPurchaseReturns_args:
3847
 
3848
  thrift_spec = (
3849
  )
3850
 
3851
  def read(self, iprot):
3852
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
3853
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
3854
      return
3855
    iprot.readStructBegin()
3856
    while True:
3857
      (fname, ftype, fid) = iprot.readFieldBegin()
3858
      if ftype == TType.STOP:
3859
        break
3860
      else:
3861
        iprot.skip(ftype)
3862
      iprot.readFieldEnd()
3863
    iprot.readStructEnd()
3864
 
3865
  def write(self, oprot):
3866
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
3867
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
3868
      return
3869
    oprot.writeStructBegin('getUnsettledPurchaseReturns_args')
3870
    oprot.writeFieldStop()
3871
    oprot.writeStructEnd()
3872
 
3873
  def validate(self):
3874
    return
3875
 
3876
 
3877
  def __repr__(self):
3878
    L = ['%s=%r' % (key, value)
3879
      for key, value in self.__dict__.iteritems()]
3880
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
3881
 
3882
  def __eq__(self, other):
3883
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
3884
 
3885
  def __ne__(self, other):
3886
    return not (self == other)
3887
 
3888
class getUnsettledPurchaseReturns_result:
3889
  """
3890
  Attributes:
3891
   - success
3892
  """
3893
 
3894
  thrift_spec = (
3895
    (0, TType.LIST, 'success', (TType.STRUCT,(PurchaseReturn, PurchaseReturn.thrift_spec)), None, ), # 0
3896
  )
3897
 
3898
  def __init__(self, success=None,):
3899
    self.success = success
3900
 
3901
  def read(self, iprot):
3902
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
3903
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
3904
      return
3905
    iprot.readStructBegin()
3906
    while True:
3907
      (fname, ftype, fid) = iprot.readFieldBegin()
3908
      if ftype == TType.STOP:
3909
        break
3910
      if fid == 0:
3911
        if ftype == TType.LIST:
3912
          self.success = []
3913
          (_etype52, _size49) = iprot.readListBegin()
3914
          for _i53 in xrange(_size49):
3915
            _elem54 = PurchaseReturn()
3916
            _elem54.read(iprot)
3917
            self.success.append(_elem54)
3918
          iprot.readListEnd()
3919
        else:
3920
          iprot.skip(ftype)
3921
      else:
3922
        iprot.skip(ftype)
3923
      iprot.readFieldEnd()
3924
    iprot.readStructEnd()
3925
 
3926
  def write(self, oprot):
3927
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
3928
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
3929
      return
3930
    oprot.writeStructBegin('getUnsettledPurchaseReturns_result')
3931
    if self.success is not None:
3932
      oprot.writeFieldBegin('success', TType.LIST, 0)
3933
      oprot.writeListBegin(TType.STRUCT, len(self.success))
3934
      for iter55 in self.success:
3935
        iter55.write(oprot)
3936
      oprot.writeListEnd()
3937
      oprot.writeFieldEnd()
3938
    oprot.writeFieldStop()
3939
    oprot.writeStructEnd()
3940
 
3941
  def validate(self):
3942
    return
3943
 
3944
 
3945
  def __repr__(self):
3946
    L = ['%s=%r' % (key, value)
3947
      for key, value in self.__dict__.iteritems()]
3948
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
3949
 
3950
  def __eq__(self, other):
3951
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
3952
 
3953
  def __ne__(self, other):
3954
    return not (self == other)