Subversion Repositories SmartDukaan

Rev

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