Subversion Repositories SmartDukaan

Rev

Rev 11751 | Rev 13600 | 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
 
11801 manish.sha 57
  def startPurchase(self, purchaseOrderId, invoiceNumber, freightCharges, purchaseComments):
4502 mandeep.dh 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
11801 manish.sha 66
     - purchaseComments
4502 mandeep.dh 67
    """
68
    pass
69
 
70
  def closePurchase(self, purchaseId):
71
    """
72
    Marks a purchase as complete and updates the receivedOn time.
73
    Throws an exception if no such purchase exists.
74
 
75
    Parameters:
76
     - purchaseId
77
    """
78
    pass
79
 
80
  def getAllPurchases(self, purchaseOrderId, open):
81
    """
82
    Returns all open or closed purchases for the given purchase order. Throws an exception if no such purchase order exists
83
 
84
    Parameters:
85
     - purchaseOrderId
86
     - open
87
    """
88
    pass
89
 
6386 amar.kumar 90
  def getPurchasesForPO(self, purchaseOrderId):
91
    """
92
    Returns all purchases for the given purchase order. Throws an exception if no such purchase order exists
93
 
94
    Parameters:
95
     - purchaseOrderId
96
    """
97
    pass
98
 
4555 mandeep.dh 99
  def getPurchaseOrderForPurchase(self, purchaseId):
4502 mandeep.dh 100
    """
4555 mandeep.dh 101
    Returns the purchase order object for a given purchase
4502 mandeep.dh 102
 
103
    Parameters:
104
     - purchaseId
105
    """
106
    pass
107
 
4754 mandeep.dh 108
  def getPendingPurchaseOrders(self, warehouseId):
109
    """
110
    Creates purchase order objects from pending orders
4502 mandeep.dh 111
 
4754 mandeep.dh 112
    Parameters:
113
     - warehouseId
114
    """
115
    pass
116
 
117
  def getSuppliers(self, ):
118
    """
119
    Returns all the valid suppliers
120
    """
121
    pass
122
 
123
  def fulfillPO(self, purchaseOrderId, itemId, quantity):
124
    """
125
    Fulfills a given purchase order with an item.
126
 
127
    Parameters:
128
     - purchaseOrderId
129
     - itemId
130
     - quantity
131
    """
132
    pass
133
 
134
  def updatePurchaseOrder(self, purchaseOrder):
135
    """
136
    Amends a PO as per the new lineitems passed
137
 
138
    Parameters:
139
     - purchaseOrder
140
    """
141
    pass
142
 
5185 mandeep.dh 143
  def unFulfillPO(self, purchaseId, itemId, quantity):
144
    """
145
    Fulfills a given purchase id with an item and its quantity.
4754 mandeep.dh 146
 
5185 mandeep.dh 147
    Parameters:
148
     - purchaseId
149
     - itemId
150
     - quantity
151
    """
152
    pass
153
 
5443 mandeep.dh 154
  def getInvoices(self, date):
155
    """
5530 mandeep.dh 156
    Fetches all invoices after a given date
5185 mandeep.dh 157
 
5443 mandeep.dh 158
    Parameters:
159
     - date
160
    """
161
    pass
162
 
7410 amar.kumar 163
  def getInvoicesForWarehouse(self, warehouseId, supplierId, date):
164
    """
165
    Fetches all invoices after a given date
166
 
167
    Parameters:
168
     - warehouseId
169
     - supplierId
170
     - date
171
    """
172
    pass
173
 
5443 mandeep.dh 174
  def createInvoice(self, invoice):
175
    """
176
    Creates an invoice object
177
 
178
    Parameters:
179
     - invoice
180
    """
181
    pass
182
 
5591 mandeep.dh 183
  def addSupplier(self, supplier):
184
    """
185
    Creates a supplier
5443 mandeep.dh 186
 
5591 mandeep.dh 187
    Parameters:
188
     - supplier
189
    """
190
    pass
191
 
192
  def updateSupplier(self, supplier):
193
    """
194
    Updates a supplier
195
 
196
    Parameters:
197
     - supplier
198
    """
199
    pass
200
 
6467 amar.kumar 201
  def createPurchaseReturn(self, purchaseReturn):
202
    """
203
    Create a new Purchase Return
5591 mandeep.dh 204
 
6467 amar.kumar 205
    Parameters:
206
     - purchaseReturn
207
    """
208
    pass
209
 
210
  def settlePurchaseReturn(self, id):
211
    """
212
    Create a new Purchase Return
213
 
214
    Parameters:
215
     - id
216
    """
217
    pass
218
 
219
  def getUnsettledPurchaseReturns(self, ):
220
    """
221
    Create a new Purchase Return
222
    """
223
    pass
224
 
6630 amar.kumar 225
  def getInvoice(self, invoiceNumber, supplierId):
226
    """
227
    Get invoice with given supplierId and invoiceNumber
6467 amar.kumar 228
 
6630 amar.kumar 229
    Parameters:
230
     - invoiceNumber
231
     - supplierId
232
    """
233
    pass
234
 
7672 rajveer 235
  def createPurchaseForOurExtBilling(self, invoiceNumber, unitPrice, nlc, itemId):
6762 amar.kumar 236
    """
237
     * Inserts new Invoice/LineItem/Purchase Entries for Billed Product done through Our External Billing
238
    *
6630 amar.kumar 239
 
6762 amar.kumar 240
    Parameters:
241
     - invoiceNumber
242
     - unitPrice
7672 rajveer 243
     - nlc
6762 amar.kumar 244
     - itemId
245
    """
246
    pass
247
 
248
  def fulfillPOForExtBilling(self, itemId, quantity):
249
    """
250
    Parameters:
251
     - itemId
252
     - quantity
253
    """
254
    pass
255
 
7410 amar.kumar 256
  def closePO(self, poId):
257
    """
258
    Marks a purchase order as closedcomplete and updates the receivedOn time.
6762 amar.kumar 259
 
7410 amar.kumar 260
    Parameters:
261
     - poId
262
    """
263
    pass
264
 
265
  def isInvoiceReceived(self, invoiceNumber, supplierId):
266
    """
267
    Check if invoice is already received with given supplierId and invoiceNumber
268
 
269
    Parameters:
270
     - invoiceNumber
271
     - supplierId
272
    """
273
    pass
274
 
9829 amar.kumar 275
  def changeWarehouseForPO(self, id, warehouseId):
276
    """
277
    Change warehouseId of PO if no items have been received yet for the PO
7410 amar.kumar 278
 
9829 amar.kumar 279
    Parameters:
280
     - id
281
     - warehouseId
282
    """
283
    pass
284
 
9925 amar.kumar 285
  def changePOStatus(self, id, poStatus):
286
    """
287
    Change status of PO
9829 amar.kumar 288
 
9925 amar.kumar 289
    Parameters:
290
     - id
291
     - poStatus
292
    """
293
    pass
294
 
11751 manish.sha 295
  def getPurchaseReturn(self, id):
296
    """
297
    Get Purchase Return from Id
9925 amar.kumar 298
 
11751 manish.sha 299
    Parameters:
300
     - id
301
    """
302
    pass
303
 
304
 
4502 mandeep.dh 305
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
306
  def __init__(self, iprot, oprot=None):
307
    shop2020.thriftpy.generic.GenericService.Client.__init__(self, iprot, oprot)
308
 
309
  def createPurchaseOrder(self, purchaseOrder):
310
    """
311
    Creates a purchase order based on the data in the given purchase order object.
312
    This method populates a nummber of missing fields
313
 
314
    Parameters:
315
     - purchaseOrder
316
    """
317
    self.send_createPurchaseOrder(purchaseOrder)
318
    return self.recv_createPurchaseOrder()
319
 
320
  def send_createPurchaseOrder(self, purchaseOrder):
321
    self._oprot.writeMessageBegin('createPurchaseOrder', TMessageType.CALL, self._seqid)
322
    args = createPurchaseOrder_args()
323
    args.purchaseOrder = purchaseOrder
324
    args.write(self._oprot)
325
    self._oprot.writeMessageEnd()
326
    self._oprot.trans.flush()
327
 
328
  def recv_createPurchaseOrder(self, ):
329
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
330
    if mtype == TMessageType.EXCEPTION:
331
      x = TApplicationException()
332
      x.read(self._iprot)
333
      self._iprot.readMessageEnd()
334
      raise x
335
    result = createPurchaseOrder_result()
336
    result.read(self._iprot)
337
    self._iprot.readMessageEnd()
338
    if result.success is not None:
339
      return result.success
340
    if result.e is not None:
341
      raise result.e
342
    raise TApplicationException(TApplicationException.MISSING_RESULT, "createPurchaseOrder failed: unknown result");
343
 
344
  def getPurchaseOrder(self, id):
345
    """
346
    Returns the purchase order with the given id. Throws an exception if there is no such purchase order.
347
 
348
    Parameters:
349
     - id
350
    """
351
    self.send_getPurchaseOrder(id)
352
    return self.recv_getPurchaseOrder()
353
 
354
  def send_getPurchaseOrder(self, id):
355
    self._oprot.writeMessageBegin('getPurchaseOrder', TMessageType.CALL, self._seqid)
356
    args = getPurchaseOrder_args()
357
    args.id = id
358
    args.write(self._oprot)
359
    self._oprot.writeMessageEnd()
360
    self._oprot.trans.flush()
361
 
362
  def recv_getPurchaseOrder(self, ):
363
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
364
    if mtype == TMessageType.EXCEPTION:
365
      x = TApplicationException()
366
      x.read(self._iprot)
367
      self._iprot.readMessageEnd()
368
      raise x
369
    result = getPurchaseOrder_result()
370
    result.read(self._iprot)
371
    self._iprot.readMessageEnd()
372
    if result.success is not None:
373
      return result.success
374
    if result.e is not None:
375
      raise result.e
376
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getPurchaseOrder failed: unknown result");
377
 
378
  def getAllPurchaseOrders(self, status):
379
    """
380
    Returns a list of all the purchase orders in the given state
381
 
382
    Parameters:
383
     - status
384
    """
385
    self.send_getAllPurchaseOrders(status)
386
    return self.recv_getAllPurchaseOrders()
387
 
388
  def send_getAllPurchaseOrders(self, status):
389
    self._oprot.writeMessageBegin('getAllPurchaseOrders', TMessageType.CALL, self._seqid)
390
    args = getAllPurchaseOrders_args()
391
    args.status = status
392
    args.write(self._oprot)
393
    self._oprot.writeMessageEnd()
394
    self._oprot.trans.flush()
395
 
396
  def recv_getAllPurchaseOrders(self, ):
397
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
398
    if mtype == TMessageType.EXCEPTION:
399
      x = TApplicationException()
400
      x.read(self._iprot)
401
      self._iprot.readMessageEnd()
402
      raise x
403
    result = getAllPurchaseOrders_result()
404
    result.read(self._iprot)
405
    self._iprot.readMessageEnd()
406
    if result.success is not None:
407
      return result.success
408
    if result.e is not None:
409
      raise result.e
410
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getAllPurchaseOrders failed: unknown result");
411
 
412
  def getSupplier(self, id):
413
    """
414
    Returns the supplier with the given order id. Throws an exception if there is no such supplier.
415
 
416
    Parameters:
417
     - id
418
    """
419
    self.send_getSupplier(id)
420
    return self.recv_getSupplier()
421
 
422
  def send_getSupplier(self, id):
423
    self._oprot.writeMessageBegin('getSupplier', TMessageType.CALL, self._seqid)
424
    args = getSupplier_args()
425
    args.id = id
426
    args.write(self._oprot)
427
    self._oprot.writeMessageEnd()
428
    self._oprot.trans.flush()
429
 
430
  def recv_getSupplier(self, ):
431
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
432
    if mtype == TMessageType.EXCEPTION:
433
      x = TApplicationException()
434
      x.read(self._iprot)
435
      self._iprot.readMessageEnd()
436
      raise x
437
    result = getSupplier_result()
438
    result.read(self._iprot)
439
    self._iprot.readMessageEnd()
440
    if result.success is not None:
441
      return result.success
442
    if result.e is not None:
443
      raise result.e
444
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getSupplier failed: unknown result");
445
 
11801 manish.sha 446
  def startPurchase(self, purchaseOrderId, invoiceNumber, freightCharges, purchaseComments):
4502 mandeep.dh 447
    """
448
    Creates a purchase for the given purchase order.
449
    Throws an exception if no more purchases are allowed against the given purchase order.
450
 
451
    Parameters:
452
     - purchaseOrderId
453
     - invoiceNumber
454
     - freightCharges
11801 manish.sha 455
     - purchaseComments
4502 mandeep.dh 456
    """
11801 manish.sha 457
    self.send_startPurchase(purchaseOrderId, invoiceNumber, freightCharges, purchaseComments)
4502 mandeep.dh 458
    return self.recv_startPurchase()
459
 
11801 manish.sha 460
  def send_startPurchase(self, purchaseOrderId, invoiceNumber, freightCharges, purchaseComments):
4502 mandeep.dh 461
    self._oprot.writeMessageBegin('startPurchase', TMessageType.CALL, self._seqid)
462
    args = startPurchase_args()
463
    args.purchaseOrderId = purchaseOrderId
464
    args.invoiceNumber = invoiceNumber
465
    args.freightCharges = freightCharges
11801 manish.sha 466
    args.purchaseComments = purchaseComments
4502 mandeep.dh 467
    args.write(self._oprot)
468
    self._oprot.writeMessageEnd()
469
    self._oprot.trans.flush()
470
 
471
  def recv_startPurchase(self, ):
472
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
473
    if mtype == TMessageType.EXCEPTION:
474
      x = TApplicationException()
475
      x.read(self._iprot)
476
      self._iprot.readMessageEnd()
477
      raise x
478
    result = startPurchase_result()
479
    result.read(self._iprot)
480
    self._iprot.readMessageEnd()
481
    if result.success is not None:
482
      return result.success
483
    if result.e is not None:
484
      raise result.e
485
    raise TApplicationException(TApplicationException.MISSING_RESULT, "startPurchase failed: unknown result");
486
 
487
  def closePurchase(self, purchaseId):
488
    """
489
    Marks a purchase as complete and updates the receivedOn time.
490
    Throws an exception if no such purchase exists.
491
 
492
    Parameters:
493
     - purchaseId
494
    """
495
    self.send_closePurchase(purchaseId)
496
    return self.recv_closePurchase()
497
 
498
  def send_closePurchase(self, purchaseId):
499
    self._oprot.writeMessageBegin('closePurchase', TMessageType.CALL, self._seqid)
500
    args = closePurchase_args()
501
    args.purchaseId = purchaseId
502
    args.write(self._oprot)
503
    self._oprot.writeMessageEnd()
504
    self._oprot.trans.flush()
505
 
506
  def recv_closePurchase(self, ):
507
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
508
    if mtype == TMessageType.EXCEPTION:
509
      x = TApplicationException()
510
      x.read(self._iprot)
511
      self._iprot.readMessageEnd()
512
      raise x
513
    result = closePurchase_result()
514
    result.read(self._iprot)
515
    self._iprot.readMessageEnd()
516
    if result.success is not None:
517
      return result.success
518
    if result.e is not None:
519
      raise result.e
520
    raise TApplicationException(TApplicationException.MISSING_RESULT, "closePurchase failed: unknown result");
521
 
522
  def getAllPurchases(self, purchaseOrderId, open):
523
    """
524
    Returns all open or closed purchases for the given purchase order. Throws an exception if no such purchase order exists
525
 
526
    Parameters:
527
     - purchaseOrderId
528
     - open
529
    """
530
    self.send_getAllPurchases(purchaseOrderId, open)
531
    return self.recv_getAllPurchases()
532
 
533
  def send_getAllPurchases(self, purchaseOrderId, open):
534
    self._oprot.writeMessageBegin('getAllPurchases', TMessageType.CALL, self._seqid)
535
    args = getAllPurchases_args()
536
    args.purchaseOrderId = purchaseOrderId
537
    args.open = open
538
    args.write(self._oprot)
539
    self._oprot.writeMessageEnd()
540
    self._oprot.trans.flush()
541
 
542
  def recv_getAllPurchases(self, ):
543
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
544
    if mtype == TMessageType.EXCEPTION:
545
      x = TApplicationException()
546
      x.read(self._iprot)
547
      self._iprot.readMessageEnd()
548
      raise x
549
    result = getAllPurchases_result()
550
    result.read(self._iprot)
551
    self._iprot.readMessageEnd()
552
    if result.success is not None:
553
      return result.success
554
    if result.e is not None:
555
      raise result.e
556
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getAllPurchases failed: unknown result");
557
 
6386 amar.kumar 558
  def getPurchasesForPO(self, purchaseOrderId):
559
    """
560
    Returns all purchases for the given purchase order. Throws an exception if no such purchase order exists
561
 
562
    Parameters:
563
     - purchaseOrderId
564
    """
565
    self.send_getPurchasesForPO(purchaseOrderId)
566
    return self.recv_getPurchasesForPO()
567
 
568
  def send_getPurchasesForPO(self, purchaseOrderId):
569
    self._oprot.writeMessageBegin('getPurchasesForPO', TMessageType.CALL, self._seqid)
570
    args = getPurchasesForPO_args()
571
    args.purchaseOrderId = purchaseOrderId
572
    args.write(self._oprot)
573
    self._oprot.writeMessageEnd()
574
    self._oprot.trans.flush()
575
 
576
  def recv_getPurchasesForPO(self, ):
577
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
578
    if mtype == TMessageType.EXCEPTION:
579
      x = TApplicationException()
580
      x.read(self._iprot)
581
      self._iprot.readMessageEnd()
582
      raise x
583
    result = getPurchasesForPO_result()
584
    result.read(self._iprot)
585
    self._iprot.readMessageEnd()
586
    if result.success is not None:
587
      return result.success
588
    if result.e is not None:
589
      raise result.e
590
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getPurchasesForPO failed: unknown result");
591
 
4555 mandeep.dh 592
  def getPurchaseOrderForPurchase(self, purchaseId):
4502 mandeep.dh 593
    """
4555 mandeep.dh 594
    Returns the purchase order object for a given purchase
4502 mandeep.dh 595
 
596
    Parameters:
597
     - purchaseId
598
    """
4555 mandeep.dh 599
    self.send_getPurchaseOrderForPurchase(purchaseId)
600
    return self.recv_getPurchaseOrderForPurchase()
4502 mandeep.dh 601
 
4555 mandeep.dh 602
  def send_getPurchaseOrderForPurchase(self, purchaseId):
603
    self._oprot.writeMessageBegin('getPurchaseOrderForPurchase', TMessageType.CALL, self._seqid)
604
    args = getPurchaseOrderForPurchase_args()
4502 mandeep.dh 605
    args.purchaseId = purchaseId
606
    args.write(self._oprot)
607
    self._oprot.writeMessageEnd()
608
    self._oprot.trans.flush()
609
 
4555 mandeep.dh 610
  def recv_getPurchaseOrderForPurchase(self, ):
4502 mandeep.dh 611
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
612
    if mtype == TMessageType.EXCEPTION:
613
      x = TApplicationException()
614
      x.read(self._iprot)
615
      self._iprot.readMessageEnd()
616
      raise x
4555 mandeep.dh 617
    result = getPurchaseOrderForPurchase_result()
4502 mandeep.dh 618
    result.read(self._iprot)
619
    self._iprot.readMessageEnd()
620
    if result.success is not None:
621
      return result.success
4555 mandeep.dh 622
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getPurchaseOrderForPurchase failed: unknown result");
4502 mandeep.dh 623
 
4754 mandeep.dh 624
  def getPendingPurchaseOrders(self, warehouseId):
625
    """
626
    Creates purchase order objects from pending orders
4502 mandeep.dh 627
 
4754 mandeep.dh 628
    Parameters:
629
     - warehouseId
630
    """
631
    self.send_getPendingPurchaseOrders(warehouseId)
632
    return self.recv_getPendingPurchaseOrders()
633
 
634
  def send_getPendingPurchaseOrders(self, warehouseId):
635
    self._oprot.writeMessageBegin('getPendingPurchaseOrders', TMessageType.CALL, self._seqid)
636
    args = getPendingPurchaseOrders_args()
637
    args.warehouseId = warehouseId
638
    args.write(self._oprot)
639
    self._oprot.writeMessageEnd()
640
    self._oprot.trans.flush()
641
 
642
  def recv_getPendingPurchaseOrders(self, ):
643
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
644
    if mtype == TMessageType.EXCEPTION:
645
      x = TApplicationException()
646
      x.read(self._iprot)
647
      self._iprot.readMessageEnd()
648
      raise x
649
    result = getPendingPurchaseOrders_result()
650
    result.read(self._iprot)
651
    self._iprot.readMessageEnd()
652
    if result.success is not None:
653
      return result.success
654
    if result.e is not None:
655
      raise result.e
656
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getPendingPurchaseOrders failed: unknown result");
657
 
658
  def getSuppliers(self, ):
659
    """
660
    Returns all the valid suppliers
661
    """
662
    self.send_getSuppliers()
663
    return self.recv_getSuppliers()
664
 
665
  def send_getSuppliers(self, ):
666
    self._oprot.writeMessageBegin('getSuppliers', TMessageType.CALL, self._seqid)
667
    args = getSuppliers_args()
668
    args.write(self._oprot)
669
    self._oprot.writeMessageEnd()
670
    self._oprot.trans.flush()
671
 
672
  def recv_getSuppliers(self, ):
673
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
674
    if mtype == TMessageType.EXCEPTION:
675
      x = TApplicationException()
676
      x.read(self._iprot)
677
      self._iprot.readMessageEnd()
678
      raise x
679
    result = getSuppliers_result()
680
    result.read(self._iprot)
681
    self._iprot.readMessageEnd()
682
    if result.success is not None:
683
      return result.success
684
    if result.e is not None:
685
      raise result.e
686
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getSuppliers failed: unknown result");
687
 
688
  def fulfillPO(self, purchaseOrderId, itemId, quantity):
689
    """
690
    Fulfills a given purchase order with an item.
691
 
692
    Parameters:
693
     - purchaseOrderId
694
     - itemId
695
     - quantity
696
    """
697
    self.send_fulfillPO(purchaseOrderId, itemId, quantity)
698
    self.recv_fulfillPO()
699
 
700
  def send_fulfillPO(self, purchaseOrderId, itemId, quantity):
701
    self._oprot.writeMessageBegin('fulfillPO', TMessageType.CALL, self._seqid)
702
    args = fulfillPO_args()
703
    args.purchaseOrderId = purchaseOrderId
704
    args.itemId = itemId
705
    args.quantity = quantity
706
    args.write(self._oprot)
707
    self._oprot.writeMessageEnd()
708
    self._oprot.trans.flush()
709
 
710
  def recv_fulfillPO(self, ):
711
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
712
    if mtype == TMessageType.EXCEPTION:
713
      x = TApplicationException()
714
      x.read(self._iprot)
715
      self._iprot.readMessageEnd()
716
      raise x
717
    result = fulfillPO_result()
718
    result.read(self._iprot)
719
    self._iprot.readMessageEnd()
720
    if result.e is not None:
721
      raise result.e
722
    return
723
 
724
  def updatePurchaseOrder(self, purchaseOrder):
725
    """
726
    Amends a PO as per the new lineitems passed
727
 
728
    Parameters:
729
     - purchaseOrder
730
    """
731
    self.send_updatePurchaseOrder(purchaseOrder)
732
    self.recv_updatePurchaseOrder()
733
 
734
  def send_updatePurchaseOrder(self, purchaseOrder):
735
    self._oprot.writeMessageBegin('updatePurchaseOrder', TMessageType.CALL, self._seqid)
736
    args = updatePurchaseOrder_args()
737
    args.purchaseOrder = purchaseOrder
738
    args.write(self._oprot)
739
    self._oprot.writeMessageEnd()
740
    self._oprot.trans.flush()
741
 
742
  def recv_updatePurchaseOrder(self, ):
743
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
744
    if mtype == TMessageType.EXCEPTION:
745
      x = TApplicationException()
746
      x.read(self._iprot)
747
      self._iprot.readMessageEnd()
748
      raise x
749
    result = updatePurchaseOrder_result()
750
    result.read(self._iprot)
751
    self._iprot.readMessageEnd()
752
    if result.e is not None:
753
      raise result.e
754
    return
755
 
5185 mandeep.dh 756
  def unFulfillPO(self, purchaseId, itemId, quantity):
757
    """
758
    Fulfills a given purchase id with an item and its quantity.
4754 mandeep.dh 759
 
5185 mandeep.dh 760
    Parameters:
761
     - purchaseId
762
     - itemId
763
     - quantity
764
    """
765
    self.send_unFulfillPO(purchaseId, itemId, quantity)
766
    self.recv_unFulfillPO()
767
 
768
  def send_unFulfillPO(self, purchaseId, itemId, quantity):
769
    self._oprot.writeMessageBegin('unFulfillPO', TMessageType.CALL, self._seqid)
770
    args = unFulfillPO_args()
771
    args.purchaseId = purchaseId
772
    args.itemId = itemId
773
    args.quantity = quantity
774
    args.write(self._oprot)
775
    self._oprot.writeMessageEnd()
776
    self._oprot.trans.flush()
777
 
778
  def recv_unFulfillPO(self, ):
779
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
780
    if mtype == TMessageType.EXCEPTION:
781
      x = TApplicationException()
782
      x.read(self._iprot)
783
      self._iprot.readMessageEnd()
784
      raise x
785
    result = unFulfillPO_result()
786
    result.read(self._iprot)
787
    self._iprot.readMessageEnd()
788
    if result.e is not None:
789
      raise result.e
790
    return
791
 
5443 mandeep.dh 792
  def getInvoices(self, date):
793
    """
5530 mandeep.dh 794
    Fetches all invoices after a given date
5185 mandeep.dh 795
 
5443 mandeep.dh 796
    Parameters:
797
     - date
798
    """
799
    self.send_getInvoices(date)
800
    return self.recv_getInvoices()
801
 
802
  def send_getInvoices(self, date):
803
    self._oprot.writeMessageBegin('getInvoices', TMessageType.CALL, self._seqid)
804
    args = getInvoices_args()
805
    args.date = date
806
    args.write(self._oprot)
807
    self._oprot.writeMessageEnd()
808
    self._oprot.trans.flush()
809
 
810
  def recv_getInvoices(self, ):
811
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
812
    if mtype == TMessageType.EXCEPTION:
813
      x = TApplicationException()
814
      x.read(self._iprot)
815
      self._iprot.readMessageEnd()
816
      raise x
817
    result = getInvoices_result()
818
    result.read(self._iprot)
819
    self._iprot.readMessageEnd()
820
    if result.success is not None:
821
      return result.success
822
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getInvoices failed: unknown result");
823
 
7410 amar.kumar 824
  def getInvoicesForWarehouse(self, warehouseId, supplierId, date):
825
    """
826
    Fetches all invoices after a given date
827
 
828
    Parameters:
829
     - warehouseId
830
     - supplierId
831
     - date
832
    """
833
    self.send_getInvoicesForWarehouse(warehouseId, supplierId, date)
834
    return self.recv_getInvoicesForWarehouse()
835
 
836
  def send_getInvoicesForWarehouse(self, warehouseId, supplierId, date):
837
    self._oprot.writeMessageBegin('getInvoicesForWarehouse', TMessageType.CALL, self._seqid)
838
    args = getInvoicesForWarehouse_args()
839
    args.warehouseId = warehouseId
840
    args.supplierId = supplierId
841
    args.date = date
842
    args.write(self._oprot)
843
    self._oprot.writeMessageEnd()
844
    self._oprot.trans.flush()
845
 
846
  def recv_getInvoicesForWarehouse(self, ):
847
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
848
    if mtype == TMessageType.EXCEPTION:
849
      x = TApplicationException()
850
      x.read(self._iprot)
851
      self._iprot.readMessageEnd()
852
      raise x
853
    result = getInvoicesForWarehouse_result()
854
    result.read(self._iprot)
855
    self._iprot.readMessageEnd()
856
    if result.success is not None:
857
      return result.success
858
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getInvoicesForWarehouse failed: unknown result");
859
 
5443 mandeep.dh 860
  def createInvoice(self, invoice):
861
    """
862
    Creates an invoice object
863
 
864
    Parameters:
865
     - invoice
866
    """
867
    self.send_createInvoice(invoice)
868
    self.recv_createInvoice()
869
 
870
  def send_createInvoice(self, invoice):
871
    self._oprot.writeMessageBegin('createInvoice', TMessageType.CALL, self._seqid)
872
    args = createInvoice_args()
873
    args.invoice = invoice
874
    args.write(self._oprot)
875
    self._oprot.writeMessageEnd()
876
    self._oprot.trans.flush()
877
 
878
  def recv_createInvoice(self, ):
879
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
880
    if mtype == TMessageType.EXCEPTION:
881
      x = TApplicationException()
882
      x.read(self._iprot)
883
      self._iprot.readMessageEnd()
884
      raise x
885
    result = createInvoice_result()
886
    result.read(self._iprot)
887
    self._iprot.readMessageEnd()
888
    if result.e is not None:
889
      raise result.e
890
    return
891
 
5591 mandeep.dh 892
  def addSupplier(self, supplier):
893
    """
894
    Creates a supplier
5443 mandeep.dh 895
 
5591 mandeep.dh 896
    Parameters:
897
     - supplier
898
    """
899
    self.send_addSupplier(supplier)
900
    return self.recv_addSupplier()
901
 
902
  def send_addSupplier(self, supplier):
903
    self._oprot.writeMessageBegin('addSupplier', TMessageType.CALL, self._seqid)
904
    args = addSupplier_args()
905
    args.supplier = supplier
906
    args.write(self._oprot)
907
    self._oprot.writeMessageEnd()
908
    self._oprot.trans.flush()
909
 
910
  def recv_addSupplier(self, ):
911
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
912
    if mtype == TMessageType.EXCEPTION:
913
      x = TApplicationException()
914
      x.read(self._iprot)
915
      self._iprot.readMessageEnd()
916
      raise x
917
    result = addSupplier_result()
918
    result.read(self._iprot)
919
    self._iprot.readMessageEnd()
920
    if result.success is not None:
921
      return result.success
922
    raise TApplicationException(TApplicationException.MISSING_RESULT, "addSupplier failed: unknown result");
923
 
924
  def updateSupplier(self, supplier):
925
    """
926
    Updates a supplier
927
 
928
    Parameters:
929
     - supplier
930
    """
931
    self.send_updateSupplier(supplier)
932
    self.recv_updateSupplier()
933
 
934
  def send_updateSupplier(self, supplier):
935
    self._oprot.writeMessageBegin('updateSupplier', TMessageType.CALL, self._seqid)
936
    args = updateSupplier_args()
937
    args.supplier = supplier
938
    args.write(self._oprot)
939
    self._oprot.writeMessageEnd()
940
    self._oprot.trans.flush()
941
 
942
  def recv_updateSupplier(self, ):
943
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
944
    if mtype == TMessageType.EXCEPTION:
945
      x = TApplicationException()
946
      x.read(self._iprot)
947
      self._iprot.readMessageEnd()
948
      raise x
949
    result = updateSupplier_result()
950
    result.read(self._iprot)
951
    self._iprot.readMessageEnd()
952
    return
953
 
6467 amar.kumar 954
  def createPurchaseReturn(self, purchaseReturn):
955
    """
956
    Create a new Purchase Return
5591 mandeep.dh 957
 
6467 amar.kumar 958
    Parameters:
959
     - purchaseReturn
960
    """
961
    self.send_createPurchaseReturn(purchaseReturn)
962
    return self.recv_createPurchaseReturn()
963
 
964
  def send_createPurchaseReturn(self, purchaseReturn):
965
    self._oprot.writeMessageBegin('createPurchaseReturn', TMessageType.CALL, self._seqid)
966
    args = createPurchaseReturn_args()
967
    args.purchaseReturn = purchaseReturn
968
    args.write(self._oprot)
969
    self._oprot.writeMessageEnd()
970
    self._oprot.trans.flush()
971
 
972
  def recv_createPurchaseReturn(self, ):
973
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
974
    if mtype == TMessageType.EXCEPTION:
975
      x = TApplicationException()
976
      x.read(self._iprot)
977
      self._iprot.readMessageEnd()
978
      raise x
979
    result = createPurchaseReturn_result()
980
    result.read(self._iprot)
981
    self._iprot.readMessageEnd()
982
    if result.success is not None:
983
      return result.success
984
    raise TApplicationException(TApplicationException.MISSING_RESULT, "createPurchaseReturn failed: unknown result");
985
 
986
  def settlePurchaseReturn(self, id):
987
    """
988
    Create a new Purchase Return
989
 
990
    Parameters:
991
     - id
992
    """
993
    self.send_settlePurchaseReturn(id)
994
    self.recv_settlePurchaseReturn()
995
 
996
  def send_settlePurchaseReturn(self, id):
997
    self._oprot.writeMessageBegin('settlePurchaseReturn', TMessageType.CALL, self._seqid)
998
    args = settlePurchaseReturn_args()
999
    args.id = id
1000
    args.write(self._oprot)
1001
    self._oprot.writeMessageEnd()
1002
    self._oprot.trans.flush()
1003
 
1004
  def recv_settlePurchaseReturn(self, ):
1005
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
1006
    if mtype == TMessageType.EXCEPTION:
1007
      x = TApplicationException()
1008
      x.read(self._iprot)
1009
      self._iprot.readMessageEnd()
1010
      raise x
1011
    result = settlePurchaseReturn_result()
1012
    result.read(self._iprot)
1013
    self._iprot.readMessageEnd()
1014
    return
1015
 
1016
  def getUnsettledPurchaseReturns(self, ):
1017
    """
1018
    Create a new Purchase Return
1019
    """
1020
    self.send_getUnsettledPurchaseReturns()
1021
    return self.recv_getUnsettledPurchaseReturns()
1022
 
1023
  def send_getUnsettledPurchaseReturns(self, ):
1024
    self._oprot.writeMessageBegin('getUnsettledPurchaseReturns', TMessageType.CALL, self._seqid)
1025
    args = getUnsettledPurchaseReturns_args()
1026
    args.write(self._oprot)
1027
    self._oprot.writeMessageEnd()
1028
    self._oprot.trans.flush()
1029
 
1030
  def recv_getUnsettledPurchaseReturns(self, ):
1031
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
1032
    if mtype == TMessageType.EXCEPTION:
1033
      x = TApplicationException()
1034
      x.read(self._iprot)
1035
      self._iprot.readMessageEnd()
1036
      raise x
1037
    result = getUnsettledPurchaseReturns_result()
1038
    result.read(self._iprot)
1039
    self._iprot.readMessageEnd()
1040
    if result.success is not None:
1041
      return result.success
1042
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getUnsettledPurchaseReturns failed: unknown result");
1043
 
6630 amar.kumar 1044
  def getInvoice(self, invoiceNumber, supplierId):
1045
    """
1046
    Get invoice with given supplierId and invoiceNumber
6467 amar.kumar 1047
 
6630 amar.kumar 1048
    Parameters:
1049
     - invoiceNumber
1050
     - supplierId
1051
    """
1052
    self.send_getInvoice(invoiceNumber, supplierId)
1053
    return self.recv_getInvoice()
1054
 
1055
  def send_getInvoice(self, invoiceNumber, supplierId):
1056
    self._oprot.writeMessageBegin('getInvoice', TMessageType.CALL, self._seqid)
1057
    args = getInvoice_args()
1058
    args.invoiceNumber = invoiceNumber
1059
    args.supplierId = supplierId
1060
    args.write(self._oprot)
1061
    self._oprot.writeMessageEnd()
1062
    self._oprot.trans.flush()
1063
 
1064
  def recv_getInvoice(self, ):
1065
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
1066
    if mtype == TMessageType.EXCEPTION:
1067
      x = TApplicationException()
1068
      x.read(self._iprot)
1069
      self._iprot.readMessageEnd()
1070
      raise x
1071
    result = getInvoice_result()
1072
    result.read(self._iprot)
1073
    self._iprot.readMessageEnd()
1074
    if result.success is not None:
1075
      return result.success
1076
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getInvoice failed: unknown result");
1077
 
7672 rajveer 1078
  def createPurchaseForOurExtBilling(self, invoiceNumber, unitPrice, nlc, itemId):
6762 amar.kumar 1079
    """
1080
     * Inserts new Invoice/LineItem/Purchase Entries for Billed Product done through Our External Billing
1081
    *
6630 amar.kumar 1082
 
6762 amar.kumar 1083
    Parameters:
1084
     - invoiceNumber
1085
     - unitPrice
7672 rajveer 1086
     - nlc
6762 amar.kumar 1087
     - itemId
1088
    """
7672 rajveer 1089
    self.send_createPurchaseForOurExtBilling(invoiceNumber, unitPrice, nlc, itemId)
6762 amar.kumar 1090
    return self.recv_createPurchaseForOurExtBilling()
1091
 
7672 rajveer 1092
  def send_createPurchaseForOurExtBilling(self, invoiceNumber, unitPrice, nlc, itemId):
6762 amar.kumar 1093
    self._oprot.writeMessageBegin('createPurchaseForOurExtBilling', TMessageType.CALL, self._seqid)
1094
    args = createPurchaseForOurExtBilling_args()
1095
    args.invoiceNumber = invoiceNumber
1096
    args.unitPrice = unitPrice
7672 rajveer 1097
    args.nlc = nlc
6762 amar.kumar 1098
    args.itemId = itemId
1099
    args.write(self._oprot)
1100
    self._oprot.writeMessageEnd()
1101
    self._oprot.trans.flush()
1102
 
1103
  def recv_createPurchaseForOurExtBilling(self, ):
1104
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
1105
    if mtype == TMessageType.EXCEPTION:
1106
      x = TApplicationException()
1107
      x.read(self._iprot)
1108
      self._iprot.readMessageEnd()
1109
      raise x
1110
    result = createPurchaseForOurExtBilling_result()
1111
    result.read(self._iprot)
1112
    self._iprot.readMessageEnd()
1113
    if result.success is not None:
1114
      return result.success
1115
    raise TApplicationException(TApplicationException.MISSING_RESULT, "createPurchaseForOurExtBilling failed: unknown result");
1116
 
1117
  def fulfillPOForExtBilling(self, itemId, quantity):
1118
    """
1119
    Parameters:
1120
     - itemId
1121
     - quantity
1122
    """
1123
    self.send_fulfillPOForExtBilling(itemId, quantity)
1124
    self.recv_fulfillPOForExtBilling()
1125
 
1126
  def send_fulfillPOForExtBilling(self, itemId, quantity):
1127
    self._oprot.writeMessageBegin('fulfillPOForExtBilling', TMessageType.CALL, self._seqid)
1128
    args = fulfillPOForExtBilling_args()
1129
    args.itemId = itemId
1130
    args.quantity = quantity
1131
    args.write(self._oprot)
1132
    self._oprot.writeMessageEnd()
1133
    self._oprot.trans.flush()
1134
 
1135
  def recv_fulfillPOForExtBilling(self, ):
1136
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
1137
    if mtype == TMessageType.EXCEPTION:
1138
      x = TApplicationException()
1139
      x.read(self._iprot)
1140
      self._iprot.readMessageEnd()
1141
      raise x
1142
    result = fulfillPOForExtBilling_result()
1143
    result.read(self._iprot)
1144
    self._iprot.readMessageEnd()
1145
    return
1146
 
7410 amar.kumar 1147
  def closePO(self, poId):
1148
    """
1149
    Marks a purchase order as closedcomplete and updates the receivedOn time.
6762 amar.kumar 1150
 
7410 amar.kumar 1151
    Parameters:
1152
     - poId
1153
    """
1154
    self.send_closePO(poId)
1155
    self.recv_closePO()
1156
 
1157
  def send_closePO(self, poId):
1158
    self._oprot.writeMessageBegin('closePO', TMessageType.CALL, self._seqid)
1159
    args = closePO_args()
1160
    args.poId = poId
1161
    args.write(self._oprot)
1162
    self._oprot.writeMessageEnd()
1163
    self._oprot.trans.flush()
1164
 
1165
  def recv_closePO(self, ):
1166
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
1167
    if mtype == TMessageType.EXCEPTION:
1168
      x = TApplicationException()
1169
      x.read(self._iprot)
1170
      self._iprot.readMessageEnd()
1171
      raise x
1172
    result = closePO_result()
1173
    result.read(self._iprot)
1174
    self._iprot.readMessageEnd()
1175
    if result.e is not None:
1176
      raise result.e
1177
    return
1178
 
1179
  def isInvoiceReceived(self, invoiceNumber, supplierId):
1180
    """
1181
    Check if invoice is already received with given supplierId and invoiceNumber
1182
 
1183
    Parameters:
1184
     - invoiceNumber
1185
     - supplierId
1186
    """
1187
    self.send_isInvoiceReceived(invoiceNumber, supplierId)
1188
    return self.recv_isInvoiceReceived()
1189
 
1190
  def send_isInvoiceReceived(self, invoiceNumber, supplierId):
1191
    self._oprot.writeMessageBegin('isInvoiceReceived', TMessageType.CALL, self._seqid)
1192
    args = isInvoiceReceived_args()
1193
    args.invoiceNumber = invoiceNumber
1194
    args.supplierId = supplierId
1195
    args.write(self._oprot)
1196
    self._oprot.writeMessageEnd()
1197
    self._oprot.trans.flush()
1198
 
1199
  def recv_isInvoiceReceived(self, ):
1200
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
1201
    if mtype == TMessageType.EXCEPTION:
1202
      x = TApplicationException()
1203
      x.read(self._iprot)
1204
      self._iprot.readMessageEnd()
1205
      raise x
1206
    result = isInvoiceReceived_result()
1207
    result.read(self._iprot)
1208
    self._iprot.readMessageEnd()
1209
    if result.success is not None:
1210
      return result.success
1211
    raise TApplicationException(TApplicationException.MISSING_RESULT, "isInvoiceReceived failed: unknown result");
1212
 
9829 amar.kumar 1213
  def changeWarehouseForPO(self, id, warehouseId):
1214
    """
1215
    Change warehouseId of PO if no items have been received yet for the PO
7410 amar.kumar 1216
 
9829 amar.kumar 1217
    Parameters:
1218
     - id
1219
     - warehouseId
1220
    """
1221
    self.send_changeWarehouseForPO(id, warehouseId)
1222
    self.recv_changeWarehouseForPO()
1223
 
1224
  def send_changeWarehouseForPO(self, id, warehouseId):
1225
    self._oprot.writeMessageBegin('changeWarehouseForPO', TMessageType.CALL, self._seqid)
1226
    args = changeWarehouseForPO_args()
1227
    args.id = id
1228
    args.warehouseId = warehouseId
1229
    args.write(self._oprot)
1230
    self._oprot.writeMessageEnd()
1231
    self._oprot.trans.flush()
1232
 
1233
  def recv_changeWarehouseForPO(self, ):
1234
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
1235
    if mtype == TMessageType.EXCEPTION:
1236
      x = TApplicationException()
1237
      x.read(self._iprot)
1238
      self._iprot.readMessageEnd()
1239
      raise x
1240
    result = changeWarehouseForPO_result()
1241
    result.read(self._iprot)
1242
    self._iprot.readMessageEnd()
1243
    if result.e is not None:
1244
      raise result.e
1245
    return
1246
 
9925 amar.kumar 1247
  def changePOStatus(self, id, poStatus):
1248
    """
1249
    Change status of PO
9829 amar.kumar 1250
 
9925 amar.kumar 1251
    Parameters:
1252
     - id
1253
     - poStatus
1254
    """
1255
    self.send_changePOStatus(id, poStatus)
1256
    self.recv_changePOStatus()
1257
 
1258
  def send_changePOStatus(self, id, poStatus):
1259
    self._oprot.writeMessageBegin('changePOStatus', TMessageType.CALL, self._seqid)
1260
    args = changePOStatus_args()
1261
    args.id = id
1262
    args.poStatus = poStatus
1263
    args.write(self._oprot)
1264
    self._oprot.writeMessageEnd()
1265
    self._oprot.trans.flush()
1266
 
1267
  def recv_changePOStatus(self, ):
1268
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
1269
    if mtype == TMessageType.EXCEPTION:
1270
      x = TApplicationException()
1271
      x.read(self._iprot)
1272
      self._iprot.readMessageEnd()
1273
      raise x
1274
    result = changePOStatus_result()
1275
    result.read(self._iprot)
1276
    self._iprot.readMessageEnd()
1277
    if result.e is not None:
1278
      raise result.e
1279
    return
1280
 
11751 manish.sha 1281
  def getPurchaseReturn(self, id):
1282
    """
1283
    Get Purchase Return from Id
9925 amar.kumar 1284
 
11751 manish.sha 1285
    Parameters:
1286
     - id
1287
    """
1288
    self.send_getPurchaseReturn(id)
1289
    return self.recv_getPurchaseReturn()
1290
 
1291
  def send_getPurchaseReturn(self, id):
1292
    self._oprot.writeMessageBegin('getPurchaseReturn', TMessageType.CALL, self._seqid)
1293
    args = getPurchaseReturn_args()
1294
    args.id = id
1295
    args.write(self._oprot)
1296
    self._oprot.writeMessageEnd()
1297
    self._oprot.trans.flush()
1298
 
1299
  def recv_getPurchaseReturn(self, ):
1300
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
1301
    if mtype == TMessageType.EXCEPTION:
1302
      x = TApplicationException()
1303
      x.read(self._iprot)
1304
      self._iprot.readMessageEnd()
1305
      raise x
1306
    result = getPurchaseReturn_result()
1307
    result.read(self._iprot)
1308
    self._iprot.readMessageEnd()
1309
    if result.success is not None:
1310
      return result.success
1311
    if result.e is not None:
1312
      raise result.e
1313
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getPurchaseReturn failed: unknown result");
1314
 
1315
 
4502 mandeep.dh 1316
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
1317
  def __init__(self, handler):
1318
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
1319
    self._processMap["createPurchaseOrder"] = Processor.process_createPurchaseOrder
1320
    self._processMap["getPurchaseOrder"] = Processor.process_getPurchaseOrder
1321
    self._processMap["getAllPurchaseOrders"] = Processor.process_getAllPurchaseOrders
1322
    self._processMap["getSupplier"] = Processor.process_getSupplier
1323
    self._processMap["startPurchase"] = Processor.process_startPurchase
1324
    self._processMap["closePurchase"] = Processor.process_closePurchase
1325
    self._processMap["getAllPurchases"] = Processor.process_getAllPurchases
6386 amar.kumar 1326
    self._processMap["getPurchasesForPO"] = Processor.process_getPurchasesForPO
4555 mandeep.dh 1327
    self._processMap["getPurchaseOrderForPurchase"] = Processor.process_getPurchaseOrderForPurchase
4754 mandeep.dh 1328
    self._processMap["getPendingPurchaseOrders"] = Processor.process_getPendingPurchaseOrders
1329
    self._processMap["getSuppliers"] = Processor.process_getSuppliers
1330
    self._processMap["fulfillPO"] = Processor.process_fulfillPO
1331
    self._processMap["updatePurchaseOrder"] = Processor.process_updatePurchaseOrder
5185 mandeep.dh 1332
    self._processMap["unFulfillPO"] = Processor.process_unFulfillPO
5443 mandeep.dh 1333
    self._processMap["getInvoices"] = Processor.process_getInvoices
7410 amar.kumar 1334
    self._processMap["getInvoicesForWarehouse"] = Processor.process_getInvoicesForWarehouse
5443 mandeep.dh 1335
    self._processMap["createInvoice"] = Processor.process_createInvoice
5591 mandeep.dh 1336
    self._processMap["addSupplier"] = Processor.process_addSupplier
1337
    self._processMap["updateSupplier"] = Processor.process_updateSupplier
6467 amar.kumar 1338
    self._processMap["createPurchaseReturn"] = Processor.process_createPurchaseReturn
1339
    self._processMap["settlePurchaseReturn"] = Processor.process_settlePurchaseReturn
1340
    self._processMap["getUnsettledPurchaseReturns"] = Processor.process_getUnsettledPurchaseReturns
6630 amar.kumar 1341
    self._processMap["getInvoice"] = Processor.process_getInvoice
6762 amar.kumar 1342
    self._processMap["createPurchaseForOurExtBilling"] = Processor.process_createPurchaseForOurExtBilling
1343
    self._processMap["fulfillPOForExtBilling"] = Processor.process_fulfillPOForExtBilling
7410 amar.kumar 1344
    self._processMap["closePO"] = Processor.process_closePO
1345
    self._processMap["isInvoiceReceived"] = Processor.process_isInvoiceReceived
9829 amar.kumar 1346
    self._processMap["changeWarehouseForPO"] = Processor.process_changeWarehouseForPO
9925 amar.kumar 1347
    self._processMap["changePOStatus"] = Processor.process_changePOStatus
11751 manish.sha 1348
    self._processMap["getPurchaseReturn"] = Processor.process_getPurchaseReturn
4502 mandeep.dh 1349
 
1350
  def process(self, iprot, oprot):
1351
    (name, type, seqid) = iprot.readMessageBegin()
1352
    if name not in self._processMap:
1353
      iprot.skip(TType.STRUCT)
1354
      iprot.readMessageEnd()
1355
      x = TApplicationException(TApplicationException.UNKNOWN_METHOD, 'Unknown function %s' % (name))
1356
      oprot.writeMessageBegin(name, TMessageType.EXCEPTION, seqid)
1357
      x.write(oprot)
1358
      oprot.writeMessageEnd()
1359
      oprot.trans.flush()
1360
      return
1361
    else:
1362
      self._processMap[name](self, seqid, iprot, oprot)
1363
    return True
1364
 
1365
  def process_createPurchaseOrder(self, seqid, iprot, oprot):
1366
    args = createPurchaseOrder_args()
1367
    args.read(iprot)
1368
    iprot.readMessageEnd()
1369
    result = createPurchaseOrder_result()
1370
    try:
1371
      result.success = self._handler.createPurchaseOrder(args.purchaseOrder)
1372
    except PurchaseServiceException, e:
1373
      result.e = e
1374
    oprot.writeMessageBegin("createPurchaseOrder", TMessageType.REPLY, seqid)
1375
    result.write(oprot)
1376
    oprot.writeMessageEnd()
1377
    oprot.trans.flush()
1378
 
1379
  def process_getPurchaseOrder(self, seqid, iprot, oprot):
1380
    args = getPurchaseOrder_args()
1381
    args.read(iprot)
1382
    iprot.readMessageEnd()
1383
    result = getPurchaseOrder_result()
1384
    try:
1385
      result.success = self._handler.getPurchaseOrder(args.id)
1386
    except PurchaseServiceException, e:
1387
      result.e = e
1388
    oprot.writeMessageBegin("getPurchaseOrder", TMessageType.REPLY, seqid)
1389
    result.write(oprot)
1390
    oprot.writeMessageEnd()
1391
    oprot.trans.flush()
1392
 
1393
  def process_getAllPurchaseOrders(self, seqid, iprot, oprot):
1394
    args = getAllPurchaseOrders_args()
1395
    args.read(iprot)
1396
    iprot.readMessageEnd()
1397
    result = getAllPurchaseOrders_result()
1398
    try:
1399
      result.success = self._handler.getAllPurchaseOrders(args.status)
1400
    except PurchaseServiceException, e:
1401
      result.e = e
1402
    oprot.writeMessageBegin("getAllPurchaseOrders", TMessageType.REPLY, seqid)
1403
    result.write(oprot)
1404
    oprot.writeMessageEnd()
1405
    oprot.trans.flush()
1406
 
1407
  def process_getSupplier(self, seqid, iprot, oprot):
1408
    args = getSupplier_args()
1409
    args.read(iprot)
1410
    iprot.readMessageEnd()
1411
    result = getSupplier_result()
1412
    try:
1413
      result.success = self._handler.getSupplier(args.id)
1414
    except PurchaseServiceException, e:
1415
      result.e = e
1416
    oprot.writeMessageBegin("getSupplier", TMessageType.REPLY, seqid)
1417
    result.write(oprot)
1418
    oprot.writeMessageEnd()
1419
    oprot.trans.flush()
1420
 
1421
  def process_startPurchase(self, seqid, iprot, oprot):
1422
    args = startPurchase_args()
1423
    args.read(iprot)
1424
    iprot.readMessageEnd()
1425
    result = startPurchase_result()
1426
    try:
11801 manish.sha 1427
      result.success = self._handler.startPurchase(args.purchaseOrderId, args.invoiceNumber, args.freightCharges, args.purchaseComments)
4502 mandeep.dh 1428
    except PurchaseServiceException, e:
1429
      result.e = e
1430
    oprot.writeMessageBegin("startPurchase", TMessageType.REPLY, seqid)
1431
    result.write(oprot)
1432
    oprot.writeMessageEnd()
1433
    oprot.trans.flush()
1434
 
1435
  def process_closePurchase(self, seqid, iprot, oprot):
1436
    args = closePurchase_args()
1437
    args.read(iprot)
1438
    iprot.readMessageEnd()
1439
    result = closePurchase_result()
1440
    try:
1441
      result.success = self._handler.closePurchase(args.purchaseId)
1442
    except PurchaseServiceException, e:
1443
      result.e = e
1444
    oprot.writeMessageBegin("closePurchase", TMessageType.REPLY, seqid)
1445
    result.write(oprot)
1446
    oprot.writeMessageEnd()
1447
    oprot.trans.flush()
1448
 
1449
  def process_getAllPurchases(self, seqid, iprot, oprot):
1450
    args = getAllPurchases_args()
1451
    args.read(iprot)
1452
    iprot.readMessageEnd()
1453
    result = getAllPurchases_result()
1454
    try:
1455
      result.success = self._handler.getAllPurchases(args.purchaseOrderId, args.open)
1456
    except PurchaseServiceException, e:
1457
      result.e = e
1458
    oprot.writeMessageBegin("getAllPurchases", TMessageType.REPLY, seqid)
1459
    result.write(oprot)
1460
    oprot.writeMessageEnd()
1461
    oprot.trans.flush()
1462
 
6386 amar.kumar 1463
  def process_getPurchasesForPO(self, seqid, iprot, oprot):
1464
    args = getPurchasesForPO_args()
1465
    args.read(iprot)
1466
    iprot.readMessageEnd()
1467
    result = getPurchasesForPO_result()
1468
    try:
1469
      result.success = self._handler.getPurchasesForPO(args.purchaseOrderId)
1470
    except PurchaseServiceException, e:
1471
      result.e = e
1472
    oprot.writeMessageBegin("getPurchasesForPO", TMessageType.REPLY, seqid)
1473
    result.write(oprot)
1474
    oprot.writeMessageEnd()
1475
    oprot.trans.flush()
1476
 
4555 mandeep.dh 1477
  def process_getPurchaseOrderForPurchase(self, seqid, iprot, oprot):
1478
    args = getPurchaseOrderForPurchase_args()
4502 mandeep.dh 1479
    args.read(iprot)
1480
    iprot.readMessageEnd()
4555 mandeep.dh 1481
    result = getPurchaseOrderForPurchase_result()
1482
    result.success = self._handler.getPurchaseOrderForPurchase(args.purchaseId)
1483
    oprot.writeMessageBegin("getPurchaseOrderForPurchase", TMessageType.REPLY, seqid)
4502 mandeep.dh 1484
    result.write(oprot)
1485
    oprot.writeMessageEnd()
1486
    oprot.trans.flush()
1487
 
4754 mandeep.dh 1488
  def process_getPendingPurchaseOrders(self, seqid, iprot, oprot):
1489
    args = getPendingPurchaseOrders_args()
1490
    args.read(iprot)
1491
    iprot.readMessageEnd()
1492
    result = getPendingPurchaseOrders_result()
1493
    try:
1494
      result.success = self._handler.getPendingPurchaseOrders(args.warehouseId)
1495
    except PurchaseServiceException, e:
1496
      result.e = e
1497
    oprot.writeMessageBegin("getPendingPurchaseOrders", TMessageType.REPLY, seqid)
1498
    result.write(oprot)
1499
    oprot.writeMessageEnd()
1500
    oprot.trans.flush()
4502 mandeep.dh 1501
 
4754 mandeep.dh 1502
  def process_getSuppliers(self, seqid, iprot, oprot):
1503
    args = getSuppliers_args()
1504
    args.read(iprot)
1505
    iprot.readMessageEnd()
1506
    result = getSuppliers_result()
1507
    try:
1508
      result.success = self._handler.getSuppliers()
1509
    except PurchaseServiceException, e:
1510
      result.e = e
1511
    oprot.writeMessageBegin("getSuppliers", TMessageType.REPLY, seqid)
1512
    result.write(oprot)
1513
    oprot.writeMessageEnd()
1514
    oprot.trans.flush()
1515
 
1516
  def process_fulfillPO(self, seqid, iprot, oprot):
1517
    args = fulfillPO_args()
1518
    args.read(iprot)
1519
    iprot.readMessageEnd()
1520
    result = fulfillPO_result()
1521
    try:
1522
      self._handler.fulfillPO(args.purchaseOrderId, args.itemId, args.quantity)
1523
    except PurchaseServiceException, e:
1524
      result.e = e
1525
    oprot.writeMessageBegin("fulfillPO", TMessageType.REPLY, seqid)
1526
    result.write(oprot)
1527
    oprot.writeMessageEnd()
1528
    oprot.trans.flush()
1529
 
1530
  def process_updatePurchaseOrder(self, seqid, iprot, oprot):
1531
    args = updatePurchaseOrder_args()
1532
    args.read(iprot)
1533
    iprot.readMessageEnd()
1534
    result = updatePurchaseOrder_result()
1535
    try:
1536
      self._handler.updatePurchaseOrder(args.purchaseOrder)
1537
    except PurchaseServiceException, e:
1538
      result.e = e
1539
    oprot.writeMessageBegin("updatePurchaseOrder", TMessageType.REPLY, seqid)
1540
    result.write(oprot)
1541
    oprot.writeMessageEnd()
1542
    oprot.trans.flush()
1543
 
5185 mandeep.dh 1544
  def process_unFulfillPO(self, seqid, iprot, oprot):
1545
    args = unFulfillPO_args()
1546
    args.read(iprot)
1547
    iprot.readMessageEnd()
1548
    result = unFulfillPO_result()
1549
    try:
1550
      self._handler.unFulfillPO(args.purchaseId, args.itemId, args.quantity)
1551
    except PurchaseServiceException, e:
1552
      result.e = e
1553
    oprot.writeMessageBegin("unFulfillPO", TMessageType.REPLY, seqid)
1554
    result.write(oprot)
1555
    oprot.writeMessageEnd()
1556
    oprot.trans.flush()
4754 mandeep.dh 1557
 
5443 mandeep.dh 1558
  def process_getInvoices(self, seqid, iprot, oprot):
1559
    args = getInvoices_args()
1560
    args.read(iprot)
1561
    iprot.readMessageEnd()
1562
    result = getInvoices_result()
1563
    result.success = self._handler.getInvoices(args.date)
1564
    oprot.writeMessageBegin("getInvoices", TMessageType.REPLY, seqid)
1565
    result.write(oprot)
1566
    oprot.writeMessageEnd()
1567
    oprot.trans.flush()
5185 mandeep.dh 1568
 
7410 amar.kumar 1569
  def process_getInvoicesForWarehouse(self, seqid, iprot, oprot):
1570
    args = getInvoicesForWarehouse_args()
1571
    args.read(iprot)
1572
    iprot.readMessageEnd()
1573
    result = getInvoicesForWarehouse_result()
1574
    result.success = self._handler.getInvoicesForWarehouse(args.warehouseId, args.supplierId, args.date)
1575
    oprot.writeMessageBegin("getInvoicesForWarehouse", TMessageType.REPLY, seqid)
1576
    result.write(oprot)
1577
    oprot.writeMessageEnd()
1578
    oprot.trans.flush()
1579
 
5443 mandeep.dh 1580
  def process_createInvoice(self, seqid, iprot, oprot):
1581
    args = createInvoice_args()
1582
    args.read(iprot)
1583
    iprot.readMessageEnd()
1584
    result = createInvoice_result()
1585
    try:
1586
      self._handler.createInvoice(args.invoice)
1587
    except PurchaseServiceException, e:
1588
      result.e = e
1589
    oprot.writeMessageBegin("createInvoice", TMessageType.REPLY, seqid)
1590
    result.write(oprot)
1591
    oprot.writeMessageEnd()
1592
    oprot.trans.flush()
1593
 
5591 mandeep.dh 1594
  def process_addSupplier(self, seqid, iprot, oprot):
1595
    args = addSupplier_args()
1596
    args.read(iprot)
1597
    iprot.readMessageEnd()
1598
    result = addSupplier_result()
1599
    result.success = self._handler.addSupplier(args.supplier)
1600
    oprot.writeMessageBegin("addSupplier", TMessageType.REPLY, seqid)
1601
    result.write(oprot)
1602
    oprot.writeMessageEnd()
1603
    oprot.trans.flush()
5443 mandeep.dh 1604
 
5591 mandeep.dh 1605
  def process_updateSupplier(self, seqid, iprot, oprot):
1606
    args = updateSupplier_args()
1607
    args.read(iprot)
1608
    iprot.readMessageEnd()
1609
    result = updateSupplier_result()
1610
    self._handler.updateSupplier(args.supplier)
1611
    oprot.writeMessageBegin("updateSupplier", TMessageType.REPLY, seqid)
1612
    result.write(oprot)
1613
    oprot.writeMessageEnd()
1614
    oprot.trans.flush()
1615
 
6467 amar.kumar 1616
  def process_createPurchaseReturn(self, seqid, iprot, oprot):
1617
    args = createPurchaseReturn_args()
1618
    args.read(iprot)
1619
    iprot.readMessageEnd()
1620
    result = createPurchaseReturn_result()
1621
    result.success = self._handler.createPurchaseReturn(args.purchaseReturn)
1622
    oprot.writeMessageBegin("createPurchaseReturn", TMessageType.REPLY, seqid)
1623
    result.write(oprot)
1624
    oprot.writeMessageEnd()
1625
    oprot.trans.flush()
5591 mandeep.dh 1626
 
6467 amar.kumar 1627
  def process_settlePurchaseReturn(self, seqid, iprot, oprot):
1628
    args = settlePurchaseReturn_args()
1629
    args.read(iprot)
1630
    iprot.readMessageEnd()
1631
    result = settlePurchaseReturn_result()
1632
    self._handler.settlePurchaseReturn(args.id)
1633
    oprot.writeMessageBegin("settlePurchaseReturn", TMessageType.REPLY, seqid)
1634
    result.write(oprot)
1635
    oprot.writeMessageEnd()
1636
    oprot.trans.flush()
1637
 
1638
  def process_getUnsettledPurchaseReturns(self, seqid, iprot, oprot):
1639
    args = getUnsettledPurchaseReturns_args()
1640
    args.read(iprot)
1641
    iprot.readMessageEnd()
1642
    result = getUnsettledPurchaseReturns_result()
1643
    result.success = self._handler.getUnsettledPurchaseReturns()
1644
    oprot.writeMessageBegin("getUnsettledPurchaseReturns", TMessageType.REPLY, seqid)
1645
    result.write(oprot)
1646
    oprot.writeMessageEnd()
1647
    oprot.trans.flush()
1648
 
6630 amar.kumar 1649
  def process_getInvoice(self, seqid, iprot, oprot):
1650
    args = getInvoice_args()
1651
    args.read(iprot)
1652
    iprot.readMessageEnd()
1653
    result = getInvoice_result()
1654
    result.success = self._handler.getInvoice(args.invoiceNumber, args.supplierId)
1655
    oprot.writeMessageBegin("getInvoice", TMessageType.REPLY, seqid)
1656
    result.write(oprot)
1657
    oprot.writeMessageEnd()
1658
    oprot.trans.flush()
6467 amar.kumar 1659
 
6762 amar.kumar 1660
  def process_createPurchaseForOurExtBilling(self, seqid, iprot, oprot):
1661
    args = createPurchaseForOurExtBilling_args()
1662
    args.read(iprot)
1663
    iprot.readMessageEnd()
1664
    result = createPurchaseForOurExtBilling_result()
7672 rajveer 1665
    result.success = self._handler.createPurchaseForOurExtBilling(args.invoiceNumber, args.unitPrice, args.nlc, args.itemId)
6762 amar.kumar 1666
    oprot.writeMessageBegin("createPurchaseForOurExtBilling", TMessageType.REPLY, seqid)
1667
    result.write(oprot)
1668
    oprot.writeMessageEnd()
1669
    oprot.trans.flush()
6630 amar.kumar 1670
 
6762 amar.kumar 1671
  def process_fulfillPOForExtBilling(self, seqid, iprot, oprot):
1672
    args = fulfillPOForExtBilling_args()
1673
    args.read(iprot)
1674
    iprot.readMessageEnd()
1675
    result = fulfillPOForExtBilling_result()
1676
    self._handler.fulfillPOForExtBilling(args.itemId, args.quantity)
1677
    oprot.writeMessageBegin("fulfillPOForExtBilling", TMessageType.REPLY, seqid)
1678
    result.write(oprot)
1679
    oprot.writeMessageEnd()
1680
    oprot.trans.flush()
1681
 
7410 amar.kumar 1682
  def process_closePO(self, seqid, iprot, oprot):
1683
    args = closePO_args()
1684
    args.read(iprot)
1685
    iprot.readMessageEnd()
1686
    result = closePO_result()
1687
    try:
1688
      self._handler.closePO(args.poId)
1689
    except PurchaseServiceException, e:
1690
      result.e = e
1691
    oprot.writeMessageBegin("closePO", TMessageType.REPLY, seqid)
1692
    result.write(oprot)
1693
    oprot.writeMessageEnd()
1694
    oprot.trans.flush()
6762 amar.kumar 1695
 
7410 amar.kumar 1696
  def process_isInvoiceReceived(self, seqid, iprot, oprot):
1697
    args = isInvoiceReceived_args()
1698
    args.read(iprot)
1699
    iprot.readMessageEnd()
1700
    result = isInvoiceReceived_result()
1701
    result.success = self._handler.isInvoiceReceived(args.invoiceNumber, args.supplierId)
1702
    oprot.writeMessageBegin("isInvoiceReceived", TMessageType.REPLY, seqid)
1703
    result.write(oprot)
1704
    oprot.writeMessageEnd()
1705
    oprot.trans.flush()
1706
 
9829 amar.kumar 1707
  def process_changeWarehouseForPO(self, seqid, iprot, oprot):
1708
    args = changeWarehouseForPO_args()
1709
    args.read(iprot)
1710
    iprot.readMessageEnd()
1711
    result = changeWarehouseForPO_result()
1712
    try:
1713
      self._handler.changeWarehouseForPO(args.id, args.warehouseId)
1714
    except PurchaseServiceException, e:
1715
      result.e = e
1716
    oprot.writeMessageBegin("changeWarehouseForPO", TMessageType.REPLY, seqid)
1717
    result.write(oprot)
1718
    oprot.writeMessageEnd()
1719
    oprot.trans.flush()
7410 amar.kumar 1720
 
9925 amar.kumar 1721
  def process_changePOStatus(self, seqid, iprot, oprot):
1722
    args = changePOStatus_args()
1723
    args.read(iprot)
1724
    iprot.readMessageEnd()
1725
    result = changePOStatus_result()
1726
    try:
1727
      self._handler.changePOStatus(args.id, args.poStatus)
1728
    except PurchaseServiceException, e:
1729
      result.e = e
1730
    oprot.writeMessageBegin("changePOStatus", TMessageType.REPLY, seqid)
1731
    result.write(oprot)
1732
    oprot.writeMessageEnd()
1733
    oprot.trans.flush()
9829 amar.kumar 1734
 
11751 manish.sha 1735
  def process_getPurchaseReturn(self, seqid, iprot, oprot):
1736
    args = getPurchaseReturn_args()
1737
    args.read(iprot)
1738
    iprot.readMessageEnd()
1739
    result = getPurchaseReturn_result()
1740
    try:
1741
      result.success = self._handler.getPurchaseReturn(args.id)
1742
    except PurchaseServiceException, e:
1743
      result.e = e
1744
    oprot.writeMessageBegin("getPurchaseReturn", TMessageType.REPLY, seqid)
1745
    result.write(oprot)
1746
    oprot.writeMessageEnd()
1747
    oprot.trans.flush()
9925 amar.kumar 1748
 
11751 manish.sha 1749
 
4502 mandeep.dh 1750
# HELPER FUNCTIONS AND STRUCTURES
1751
 
1752
class createPurchaseOrder_args:
1753
  """
1754
  Attributes:
1755
   - purchaseOrder
1756
  """
1757
 
1758
  thrift_spec = (
1759
    None, # 0
1760
    (1, TType.STRUCT, 'purchaseOrder', (PurchaseOrder, PurchaseOrder.thrift_spec), None, ), # 1
1761
  )
1762
 
1763
  def __init__(self, purchaseOrder=None,):
1764
    self.purchaseOrder = purchaseOrder
1765
 
1766
  def read(self, iprot):
1767
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1768
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1769
      return
1770
    iprot.readStructBegin()
1771
    while True:
1772
      (fname, ftype, fid) = iprot.readFieldBegin()
1773
      if ftype == TType.STOP:
1774
        break
1775
      if fid == 1:
1776
        if ftype == TType.STRUCT:
1777
          self.purchaseOrder = PurchaseOrder()
1778
          self.purchaseOrder.read(iprot)
1779
        else:
1780
          iprot.skip(ftype)
1781
      else:
1782
        iprot.skip(ftype)
1783
      iprot.readFieldEnd()
1784
    iprot.readStructEnd()
1785
 
1786
  def write(self, oprot):
1787
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1788
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1789
      return
1790
    oprot.writeStructBegin('createPurchaseOrder_args')
1791
    if self.purchaseOrder is not None:
1792
      oprot.writeFieldBegin('purchaseOrder', TType.STRUCT, 1)
1793
      self.purchaseOrder.write(oprot)
1794
      oprot.writeFieldEnd()
1795
    oprot.writeFieldStop()
1796
    oprot.writeStructEnd()
1797
 
1798
  def validate(self):
1799
    return
1800
 
1801
 
1802
  def __repr__(self):
1803
    L = ['%s=%r' % (key, value)
1804
      for key, value in self.__dict__.iteritems()]
1805
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1806
 
1807
  def __eq__(self, other):
1808
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1809
 
1810
  def __ne__(self, other):
1811
    return not (self == other)
1812
 
1813
class createPurchaseOrder_result:
1814
  """
1815
  Attributes:
1816
   - success
1817
   - e
1818
  """
1819
 
1820
  thrift_spec = (
1821
    (0, TType.I64, 'success', None, None, ), # 0
1822
    (1, TType.STRUCT, 'e', (PurchaseServiceException, PurchaseServiceException.thrift_spec), None, ), # 1
1823
  )
1824
 
1825
  def __init__(self, success=None, e=None,):
1826
    self.success = success
1827
    self.e = e
1828
 
1829
  def read(self, iprot):
1830
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1831
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1832
      return
1833
    iprot.readStructBegin()
1834
    while True:
1835
      (fname, ftype, fid) = iprot.readFieldBegin()
1836
      if ftype == TType.STOP:
1837
        break
1838
      if fid == 0:
1839
        if ftype == TType.I64:
1840
          self.success = iprot.readI64();
1841
        else:
1842
          iprot.skip(ftype)
1843
      elif fid == 1:
1844
        if ftype == TType.STRUCT:
1845
          self.e = PurchaseServiceException()
1846
          self.e.read(iprot)
1847
        else:
1848
          iprot.skip(ftype)
1849
      else:
1850
        iprot.skip(ftype)
1851
      iprot.readFieldEnd()
1852
    iprot.readStructEnd()
1853
 
1854
  def write(self, oprot):
1855
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1856
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1857
      return
1858
    oprot.writeStructBegin('createPurchaseOrder_result')
1859
    if self.success is not None:
1860
      oprot.writeFieldBegin('success', TType.I64, 0)
1861
      oprot.writeI64(self.success)
1862
      oprot.writeFieldEnd()
1863
    if self.e is not None:
1864
      oprot.writeFieldBegin('e', TType.STRUCT, 1)
1865
      self.e.write(oprot)
1866
      oprot.writeFieldEnd()
1867
    oprot.writeFieldStop()
1868
    oprot.writeStructEnd()
1869
 
1870
  def validate(self):
1871
    return
1872
 
1873
 
1874
  def __repr__(self):
1875
    L = ['%s=%r' % (key, value)
1876
      for key, value in self.__dict__.iteritems()]
1877
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1878
 
1879
  def __eq__(self, other):
1880
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1881
 
1882
  def __ne__(self, other):
1883
    return not (self == other)
1884
 
1885
class getPurchaseOrder_args:
1886
  """
1887
  Attributes:
1888
   - id
1889
  """
1890
 
1891
  thrift_spec = (
1892
    None, # 0
1893
    (1, TType.I64, 'id', None, None, ), # 1
1894
  )
1895
 
1896
  def __init__(self, id=None,):
1897
    self.id = id
1898
 
1899
  def read(self, iprot):
1900
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1901
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1902
      return
1903
    iprot.readStructBegin()
1904
    while True:
1905
      (fname, ftype, fid) = iprot.readFieldBegin()
1906
      if ftype == TType.STOP:
1907
        break
1908
      if fid == 1:
1909
        if ftype == TType.I64:
1910
          self.id = iprot.readI64();
1911
        else:
1912
          iprot.skip(ftype)
1913
      else:
1914
        iprot.skip(ftype)
1915
      iprot.readFieldEnd()
1916
    iprot.readStructEnd()
1917
 
1918
  def write(self, oprot):
1919
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1920
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1921
      return
1922
    oprot.writeStructBegin('getPurchaseOrder_args')
1923
    if self.id is not None:
1924
      oprot.writeFieldBegin('id', TType.I64, 1)
1925
      oprot.writeI64(self.id)
1926
      oprot.writeFieldEnd()
1927
    oprot.writeFieldStop()
1928
    oprot.writeStructEnd()
1929
 
1930
  def validate(self):
1931
    return
1932
 
1933
 
1934
  def __repr__(self):
1935
    L = ['%s=%r' % (key, value)
1936
      for key, value in self.__dict__.iteritems()]
1937
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
1938
 
1939
  def __eq__(self, other):
1940
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1941
 
1942
  def __ne__(self, other):
1943
    return not (self == other)
1944
 
1945
class getPurchaseOrder_result:
1946
  """
1947
  Attributes:
1948
   - success
1949
   - e
1950
  """
1951
 
1952
  thrift_spec = (
1953
    (0, TType.STRUCT, 'success', (PurchaseOrder, PurchaseOrder.thrift_spec), None, ), # 0
1954
    (1, TType.STRUCT, 'e', (PurchaseServiceException, PurchaseServiceException.thrift_spec), None, ), # 1
1955
  )
1956
 
1957
  def __init__(self, success=None, e=None,):
1958
    self.success = success
1959
    self.e = e
1960
 
1961
  def read(self, iprot):
1962
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1963
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1964
      return
1965
    iprot.readStructBegin()
1966
    while True:
1967
      (fname, ftype, fid) = iprot.readFieldBegin()
1968
      if ftype == TType.STOP:
1969
        break
1970
      if fid == 0:
1971
        if ftype == TType.STRUCT:
1972
          self.success = PurchaseOrder()
1973
          self.success.read(iprot)
1974
        else:
1975
          iprot.skip(ftype)
1976
      elif fid == 1:
1977
        if ftype == TType.STRUCT:
1978
          self.e = PurchaseServiceException()
1979
          self.e.read(iprot)
1980
        else:
1981
          iprot.skip(ftype)
1982
      else:
1983
        iprot.skip(ftype)
1984
      iprot.readFieldEnd()
1985
    iprot.readStructEnd()
1986
 
1987
  def write(self, oprot):
1988
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1989
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1990
      return
1991
    oprot.writeStructBegin('getPurchaseOrder_result')
1992
    if self.success is not None:
1993
      oprot.writeFieldBegin('success', TType.STRUCT, 0)
1994
      self.success.write(oprot)
1995
      oprot.writeFieldEnd()
1996
    if self.e is not None:
1997
      oprot.writeFieldBegin('e', TType.STRUCT, 1)
1998
      self.e.write(oprot)
1999
      oprot.writeFieldEnd()
2000
    oprot.writeFieldStop()
2001
    oprot.writeStructEnd()
2002
 
2003
  def validate(self):
2004
    return
2005
 
2006
 
2007
  def __repr__(self):
2008
    L = ['%s=%r' % (key, value)
2009
      for key, value in self.__dict__.iteritems()]
2010
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
2011
 
2012
  def __eq__(self, other):
2013
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
2014
 
2015
  def __ne__(self, other):
2016
    return not (self == other)
2017
 
2018
class getAllPurchaseOrders_args:
2019
  """
2020
  Attributes:
2021
   - status
2022
  """
2023
 
2024
  thrift_spec = (
2025
    None, # 0
2026
    (1, TType.I32, 'status', None, None, ), # 1
2027
  )
2028
 
2029
  def __init__(self, status=None,):
2030
    self.status = status
2031
 
2032
  def read(self, iprot):
2033
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
2034
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
2035
      return
2036
    iprot.readStructBegin()
2037
    while True:
2038
      (fname, ftype, fid) = iprot.readFieldBegin()
2039
      if ftype == TType.STOP:
2040
        break
2041
      if fid == 1:
2042
        if ftype == TType.I32:
2043
          self.status = iprot.readI32();
2044
        else:
2045
          iprot.skip(ftype)
2046
      else:
2047
        iprot.skip(ftype)
2048
      iprot.readFieldEnd()
2049
    iprot.readStructEnd()
2050
 
2051
  def write(self, oprot):
2052
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
2053
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
2054
      return
2055
    oprot.writeStructBegin('getAllPurchaseOrders_args')
2056
    if self.status is not None:
2057
      oprot.writeFieldBegin('status', TType.I32, 1)
2058
      oprot.writeI32(self.status)
2059
      oprot.writeFieldEnd()
2060
    oprot.writeFieldStop()
2061
    oprot.writeStructEnd()
2062
 
2063
  def validate(self):
2064
    return
2065
 
2066
 
2067
  def __repr__(self):
2068
    L = ['%s=%r' % (key, value)
2069
      for key, value in self.__dict__.iteritems()]
2070
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
2071
 
2072
  def __eq__(self, other):
2073
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
2074
 
2075
  def __ne__(self, other):
2076
    return not (self == other)
2077
 
2078
class getAllPurchaseOrders_result:
2079
  """
2080
  Attributes:
2081
   - success
2082
   - e
2083
  """
2084
 
2085
  thrift_spec = (
2086
    (0, TType.LIST, 'success', (TType.STRUCT,(PurchaseOrder, PurchaseOrder.thrift_spec)), None, ), # 0
2087
    (1, TType.STRUCT, 'e', (PurchaseServiceException, PurchaseServiceException.thrift_spec), None, ), # 1
2088
  )
2089
 
2090
  def __init__(self, success=None, e=None,):
2091
    self.success = success
2092
    self.e = e
2093
 
2094
  def read(self, iprot):
2095
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
2096
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
2097
      return
2098
    iprot.readStructBegin()
2099
    while True:
2100
      (fname, ftype, fid) = iprot.readFieldBegin()
2101
      if ftype == TType.STOP:
2102
        break
2103
      if fid == 0:
2104
        if ftype == TType.LIST:
2105
          self.success = []
2106
          (_etype10, _size7) = iprot.readListBegin()
2107
          for _i11 in xrange(_size7):
2108
            _elem12 = PurchaseOrder()
2109
            _elem12.read(iprot)
2110
            self.success.append(_elem12)
2111
          iprot.readListEnd()
2112
        else:
2113
          iprot.skip(ftype)
2114
      elif fid == 1:
2115
        if ftype == TType.STRUCT:
2116
          self.e = PurchaseServiceException()
2117
          self.e.read(iprot)
2118
        else:
2119
          iprot.skip(ftype)
2120
      else:
2121
        iprot.skip(ftype)
2122
      iprot.readFieldEnd()
2123
    iprot.readStructEnd()
2124
 
2125
  def write(self, oprot):
2126
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
2127
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
2128
      return
2129
    oprot.writeStructBegin('getAllPurchaseOrders_result')
2130
    if self.success is not None:
2131
      oprot.writeFieldBegin('success', TType.LIST, 0)
2132
      oprot.writeListBegin(TType.STRUCT, len(self.success))
2133
      for iter13 in self.success:
2134
        iter13.write(oprot)
2135
      oprot.writeListEnd()
2136
      oprot.writeFieldEnd()
2137
    if self.e is not None:
2138
      oprot.writeFieldBegin('e', TType.STRUCT, 1)
2139
      self.e.write(oprot)
2140
      oprot.writeFieldEnd()
2141
    oprot.writeFieldStop()
2142
    oprot.writeStructEnd()
2143
 
2144
  def validate(self):
2145
    return
2146
 
2147
 
2148
  def __repr__(self):
2149
    L = ['%s=%r' % (key, value)
2150
      for key, value in self.__dict__.iteritems()]
2151
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
2152
 
2153
  def __eq__(self, other):
2154
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
2155
 
2156
  def __ne__(self, other):
2157
    return not (self == other)
2158
 
2159
class getSupplier_args:
2160
  """
2161
  Attributes:
2162
   - id
2163
  """
2164
 
2165
  thrift_spec = (
2166
    None, # 0
2167
    (1, TType.I64, 'id', None, None, ), # 1
2168
  )
2169
 
2170
  def __init__(self, id=None,):
2171
    self.id = id
2172
 
2173
  def read(self, iprot):
2174
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
2175
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
2176
      return
2177
    iprot.readStructBegin()
2178
    while True:
2179
      (fname, ftype, fid) = iprot.readFieldBegin()
2180
      if ftype == TType.STOP:
2181
        break
2182
      if fid == 1:
2183
        if ftype == TType.I64:
2184
          self.id = iprot.readI64();
2185
        else:
2186
          iprot.skip(ftype)
2187
      else:
2188
        iprot.skip(ftype)
2189
      iprot.readFieldEnd()
2190
    iprot.readStructEnd()
2191
 
2192
  def write(self, oprot):
2193
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
2194
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
2195
      return
2196
    oprot.writeStructBegin('getSupplier_args')
2197
    if self.id is not None:
2198
      oprot.writeFieldBegin('id', TType.I64, 1)
2199
      oprot.writeI64(self.id)
2200
      oprot.writeFieldEnd()
2201
    oprot.writeFieldStop()
2202
    oprot.writeStructEnd()
2203
 
2204
  def validate(self):
2205
    return
2206
 
2207
 
2208
  def __repr__(self):
2209
    L = ['%s=%r' % (key, value)
2210
      for key, value in self.__dict__.iteritems()]
2211
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
2212
 
2213
  def __eq__(self, other):
2214
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
2215
 
2216
  def __ne__(self, other):
2217
    return not (self == other)
2218
 
2219
class getSupplier_result:
2220
  """
2221
  Attributes:
2222
   - success
2223
   - e
2224
  """
2225
 
2226
  thrift_spec = (
2227
    (0, TType.STRUCT, 'success', (Supplier, Supplier.thrift_spec), None, ), # 0
2228
    (1, TType.STRUCT, 'e', (PurchaseServiceException, PurchaseServiceException.thrift_spec), None, ), # 1
2229
  )
2230
 
2231
  def __init__(self, success=None, e=None,):
2232
    self.success = success
2233
    self.e = e
2234
 
2235
  def read(self, iprot):
2236
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
2237
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
2238
      return
2239
    iprot.readStructBegin()
2240
    while True:
2241
      (fname, ftype, fid) = iprot.readFieldBegin()
2242
      if ftype == TType.STOP:
2243
        break
2244
      if fid == 0:
2245
        if ftype == TType.STRUCT:
2246
          self.success = Supplier()
2247
          self.success.read(iprot)
2248
        else:
2249
          iprot.skip(ftype)
2250
      elif fid == 1:
2251
        if ftype == TType.STRUCT:
2252
          self.e = PurchaseServiceException()
2253
          self.e.read(iprot)
2254
        else:
2255
          iprot.skip(ftype)
2256
      else:
2257
        iprot.skip(ftype)
2258
      iprot.readFieldEnd()
2259
    iprot.readStructEnd()
2260
 
2261
  def write(self, oprot):
2262
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
2263
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
2264
      return
2265
    oprot.writeStructBegin('getSupplier_result')
2266
    if self.success is not None:
2267
      oprot.writeFieldBegin('success', TType.STRUCT, 0)
2268
      self.success.write(oprot)
2269
      oprot.writeFieldEnd()
2270
    if self.e is not None:
2271
      oprot.writeFieldBegin('e', TType.STRUCT, 1)
2272
      self.e.write(oprot)
2273
      oprot.writeFieldEnd()
2274
    oprot.writeFieldStop()
2275
    oprot.writeStructEnd()
2276
 
2277
  def validate(self):
2278
    return
2279
 
2280
 
2281
  def __repr__(self):
2282
    L = ['%s=%r' % (key, value)
2283
      for key, value in self.__dict__.iteritems()]
2284
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
2285
 
2286
  def __eq__(self, other):
2287
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
2288
 
2289
  def __ne__(self, other):
2290
    return not (self == other)
2291
 
2292
class startPurchase_args:
2293
  """
2294
  Attributes:
2295
   - purchaseOrderId
2296
   - invoiceNumber
2297
   - freightCharges
11801 manish.sha 2298
   - purchaseComments
4502 mandeep.dh 2299
  """
2300
 
2301
  thrift_spec = (
2302
    None, # 0
2303
    (1, TType.I64, 'purchaseOrderId', None, None, ), # 1
2304
    (2, TType.STRING, 'invoiceNumber', None, None, ), # 2
2305
    (3, TType.DOUBLE, 'freightCharges', None, None, ), # 3
11801 manish.sha 2306
    (4, TType.STRING, 'purchaseComments', None, None, ), # 4
4502 mandeep.dh 2307
  )
2308
 
11801 manish.sha 2309
  def __init__(self, purchaseOrderId=None, invoiceNumber=None, freightCharges=None, purchaseComments=None,):
4502 mandeep.dh 2310
    self.purchaseOrderId = purchaseOrderId
2311
    self.invoiceNumber = invoiceNumber
2312
    self.freightCharges = freightCharges
11801 manish.sha 2313
    self.purchaseComments = purchaseComments
4502 mandeep.dh 2314
 
2315
  def read(self, iprot):
2316
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
2317
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
2318
      return
2319
    iprot.readStructBegin()
2320
    while True:
2321
      (fname, ftype, fid) = iprot.readFieldBegin()
2322
      if ftype == TType.STOP:
2323
        break
2324
      if fid == 1:
2325
        if ftype == TType.I64:
2326
          self.purchaseOrderId = iprot.readI64();
2327
        else:
2328
          iprot.skip(ftype)
2329
      elif fid == 2:
2330
        if ftype == TType.STRING:
2331
          self.invoiceNumber = iprot.readString();
2332
        else:
2333
          iprot.skip(ftype)
2334
      elif fid == 3:
2335
        if ftype == TType.DOUBLE:
2336
          self.freightCharges = iprot.readDouble();
2337
        else:
2338
          iprot.skip(ftype)
11801 manish.sha 2339
      elif fid == 4:
2340
        if ftype == TType.STRING:
2341
          self.purchaseComments = iprot.readString();
2342
        else:
2343
          iprot.skip(ftype)
4502 mandeep.dh 2344
      else:
2345
        iprot.skip(ftype)
2346
      iprot.readFieldEnd()
2347
    iprot.readStructEnd()
2348
 
2349
  def write(self, oprot):
2350
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
2351
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
2352
      return
2353
    oprot.writeStructBegin('startPurchase_args')
2354
    if self.purchaseOrderId is not None:
2355
      oprot.writeFieldBegin('purchaseOrderId', TType.I64, 1)
2356
      oprot.writeI64(self.purchaseOrderId)
2357
      oprot.writeFieldEnd()
2358
    if self.invoiceNumber is not None:
2359
      oprot.writeFieldBegin('invoiceNumber', TType.STRING, 2)
2360
      oprot.writeString(self.invoiceNumber)
2361
      oprot.writeFieldEnd()
2362
    if self.freightCharges is not None:
2363
      oprot.writeFieldBegin('freightCharges', TType.DOUBLE, 3)
2364
      oprot.writeDouble(self.freightCharges)
2365
      oprot.writeFieldEnd()
11801 manish.sha 2366
    if self.purchaseComments is not None:
2367
      oprot.writeFieldBegin('purchaseComments', TType.STRING, 4)
2368
      oprot.writeString(self.purchaseComments)
2369
      oprot.writeFieldEnd()
4502 mandeep.dh 2370
    oprot.writeFieldStop()
2371
    oprot.writeStructEnd()
2372
 
2373
  def validate(self):
2374
    return
2375
 
2376
 
2377
  def __repr__(self):
2378
    L = ['%s=%r' % (key, value)
2379
      for key, value in self.__dict__.iteritems()]
2380
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
2381
 
2382
  def __eq__(self, other):
2383
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
2384
 
2385
  def __ne__(self, other):
2386
    return not (self == other)
2387
 
2388
class startPurchase_result:
2389
  """
2390
  Attributes:
2391
   - success
2392
   - e
2393
  """
2394
 
2395
  thrift_spec = (
2396
    (0, TType.I64, 'success', None, None, ), # 0
2397
    (1, TType.STRUCT, 'e', (PurchaseServiceException, PurchaseServiceException.thrift_spec), None, ), # 1
2398
  )
2399
 
2400
  def __init__(self, success=None, e=None,):
2401
    self.success = success
2402
    self.e = e
2403
 
2404
  def read(self, iprot):
2405
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
2406
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
2407
      return
2408
    iprot.readStructBegin()
2409
    while True:
2410
      (fname, ftype, fid) = iprot.readFieldBegin()
2411
      if ftype == TType.STOP:
2412
        break
2413
      if fid == 0:
2414
        if ftype == TType.I64:
2415
          self.success = iprot.readI64();
2416
        else:
2417
          iprot.skip(ftype)
2418
      elif fid == 1:
2419
        if ftype == TType.STRUCT:
2420
          self.e = PurchaseServiceException()
2421
          self.e.read(iprot)
2422
        else:
2423
          iprot.skip(ftype)
2424
      else:
2425
        iprot.skip(ftype)
2426
      iprot.readFieldEnd()
2427
    iprot.readStructEnd()
2428
 
2429
  def write(self, oprot):
2430
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
2431
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
2432
      return
2433
    oprot.writeStructBegin('startPurchase_result')
2434
    if self.success is not None:
2435
      oprot.writeFieldBegin('success', TType.I64, 0)
2436
      oprot.writeI64(self.success)
2437
      oprot.writeFieldEnd()
2438
    if self.e is not None:
2439
      oprot.writeFieldBegin('e', TType.STRUCT, 1)
2440
      self.e.write(oprot)
2441
      oprot.writeFieldEnd()
2442
    oprot.writeFieldStop()
2443
    oprot.writeStructEnd()
2444
 
2445
  def validate(self):
2446
    return
2447
 
2448
 
2449
  def __repr__(self):
2450
    L = ['%s=%r' % (key, value)
2451
      for key, value in self.__dict__.iteritems()]
2452
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
2453
 
2454
  def __eq__(self, other):
2455
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
2456
 
2457
  def __ne__(self, other):
2458
    return not (self == other)
2459
 
2460
class closePurchase_args:
2461
  """
2462
  Attributes:
2463
   - purchaseId
2464
  """
2465
 
2466
  thrift_spec = (
2467
    None, # 0
2468
    (1, TType.I64, 'purchaseId', None, None, ), # 1
2469
  )
2470
 
2471
  def __init__(self, purchaseId=None,):
2472
    self.purchaseId = purchaseId
2473
 
2474
  def read(self, iprot):
2475
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
2476
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
2477
      return
2478
    iprot.readStructBegin()
2479
    while True:
2480
      (fname, ftype, fid) = iprot.readFieldBegin()
2481
      if ftype == TType.STOP:
2482
        break
2483
      if fid == 1:
2484
        if ftype == TType.I64:
2485
          self.purchaseId = iprot.readI64();
2486
        else:
2487
          iprot.skip(ftype)
2488
      else:
2489
        iprot.skip(ftype)
2490
      iprot.readFieldEnd()
2491
    iprot.readStructEnd()
2492
 
2493
  def write(self, oprot):
2494
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
2495
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
2496
      return
2497
    oprot.writeStructBegin('closePurchase_args')
2498
    if self.purchaseId is not None:
2499
      oprot.writeFieldBegin('purchaseId', TType.I64, 1)
2500
      oprot.writeI64(self.purchaseId)
2501
      oprot.writeFieldEnd()
2502
    oprot.writeFieldStop()
2503
    oprot.writeStructEnd()
2504
 
2505
  def validate(self):
2506
    return
2507
 
2508
 
2509
  def __repr__(self):
2510
    L = ['%s=%r' % (key, value)
2511
      for key, value in self.__dict__.iteritems()]
2512
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
2513
 
2514
  def __eq__(self, other):
2515
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
2516
 
2517
  def __ne__(self, other):
2518
    return not (self == other)
2519
 
2520
class closePurchase_result:
2521
  """
2522
  Attributes:
2523
   - success
2524
   - e
2525
  """
2526
 
2527
  thrift_spec = (
2528
    (0, TType.I64, 'success', None, None, ), # 0
2529
    (1, TType.STRUCT, 'e', (PurchaseServiceException, PurchaseServiceException.thrift_spec), None, ), # 1
2530
  )
2531
 
2532
  def __init__(self, success=None, e=None,):
2533
    self.success = success
2534
    self.e = e
2535
 
2536
  def read(self, iprot):
2537
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
2538
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
2539
      return
2540
    iprot.readStructBegin()
2541
    while True:
2542
      (fname, ftype, fid) = iprot.readFieldBegin()
2543
      if ftype == TType.STOP:
2544
        break
2545
      if fid == 0:
2546
        if ftype == TType.I64:
2547
          self.success = iprot.readI64();
2548
        else:
2549
          iprot.skip(ftype)
2550
      elif fid == 1:
2551
        if ftype == TType.STRUCT:
2552
          self.e = PurchaseServiceException()
2553
          self.e.read(iprot)
2554
        else:
2555
          iprot.skip(ftype)
2556
      else:
2557
        iprot.skip(ftype)
2558
      iprot.readFieldEnd()
2559
    iprot.readStructEnd()
2560
 
2561
  def write(self, oprot):
2562
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
2563
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
2564
      return
2565
    oprot.writeStructBegin('closePurchase_result')
2566
    if self.success is not None:
2567
      oprot.writeFieldBegin('success', TType.I64, 0)
2568
      oprot.writeI64(self.success)
2569
      oprot.writeFieldEnd()
2570
    if self.e is not None:
2571
      oprot.writeFieldBegin('e', TType.STRUCT, 1)
2572
      self.e.write(oprot)
2573
      oprot.writeFieldEnd()
2574
    oprot.writeFieldStop()
2575
    oprot.writeStructEnd()
2576
 
2577
  def validate(self):
2578
    return
2579
 
2580
 
2581
  def __repr__(self):
2582
    L = ['%s=%r' % (key, value)
2583
      for key, value in self.__dict__.iteritems()]
2584
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
2585
 
2586
  def __eq__(self, other):
2587
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
2588
 
2589
  def __ne__(self, other):
2590
    return not (self == other)
2591
 
2592
class getAllPurchases_args:
2593
  """
2594
  Attributes:
2595
   - purchaseOrderId
2596
   - open
2597
  """
2598
 
2599
  thrift_spec = (
2600
    None, # 0
2601
    (1, TType.I64, 'purchaseOrderId', None, None, ), # 1
2602
    (2, TType.BOOL, 'open', None, None, ), # 2
2603
  )
2604
 
2605
  def __init__(self, purchaseOrderId=None, open=None,):
2606
    self.purchaseOrderId = purchaseOrderId
2607
    self.open = open
2608
 
2609
  def read(self, iprot):
2610
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
2611
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
2612
      return
2613
    iprot.readStructBegin()
2614
    while True:
2615
      (fname, ftype, fid) = iprot.readFieldBegin()
2616
      if ftype == TType.STOP:
2617
        break
2618
      if fid == 1:
2619
        if ftype == TType.I64:
2620
          self.purchaseOrderId = iprot.readI64();
2621
        else:
2622
          iprot.skip(ftype)
2623
      elif fid == 2:
2624
        if ftype == TType.BOOL:
2625
          self.open = iprot.readBool();
2626
        else:
2627
          iprot.skip(ftype)
2628
      else:
2629
        iprot.skip(ftype)
2630
      iprot.readFieldEnd()
2631
    iprot.readStructEnd()
2632
 
2633
  def write(self, oprot):
2634
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
2635
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
2636
      return
2637
    oprot.writeStructBegin('getAllPurchases_args')
2638
    if self.purchaseOrderId is not None:
2639
      oprot.writeFieldBegin('purchaseOrderId', TType.I64, 1)
2640
      oprot.writeI64(self.purchaseOrderId)
2641
      oprot.writeFieldEnd()
2642
    if self.open is not None:
2643
      oprot.writeFieldBegin('open', TType.BOOL, 2)
2644
      oprot.writeBool(self.open)
2645
      oprot.writeFieldEnd()
2646
    oprot.writeFieldStop()
2647
    oprot.writeStructEnd()
2648
 
2649
  def validate(self):
2650
    return
2651
 
2652
 
2653
  def __repr__(self):
2654
    L = ['%s=%r' % (key, value)
2655
      for key, value in self.__dict__.iteritems()]
2656
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
2657
 
2658
  def __eq__(self, other):
2659
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
2660
 
2661
  def __ne__(self, other):
2662
    return not (self == other)
2663
 
2664
class getAllPurchases_result:
2665
  """
2666
  Attributes:
2667
   - success
2668
   - e
2669
  """
2670
 
2671
  thrift_spec = (
2672
    (0, TType.LIST, 'success', (TType.STRUCT,(Purchase, Purchase.thrift_spec)), None, ), # 0
2673
    (1, TType.STRUCT, 'e', (PurchaseServiceException, PurchaseServiceException.thrift_spec), None, ), # 1
2674
  )
2675
 
2676
  def __init__(self, success=None, e=None,):
2677
    self.success = success
2678
    self.e = e
2679
 
2680
  def read(self, iprot):
2681
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
2682
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
2683
      return
2684
    iprot.readStructBegin()
2685
    while True:
2686
      (fname, ftype, fid) = iprot.readFieldBegin()
2687
      if ftype == TType.STOP:
2688
        break
2689
      if fid == 0:
2690
        if ftype == TType.LIST:
2691
          self.success = []
2692
          (_etype17, _size14) = iprot.readListBegin()
2693
          for _i18 in xrange(_size14):
2694
            _elem19 = Purchase()
2695
            _elem19.read(iprot)
2696
            self.success.append(_elem19)
2697
          iprot.readListEnd()
2698
        else:
2699
          iprot.skip(ftype)
2700
      elif fid == 1:
2701
        if ftype == TType.STRUCT:
2702
          self.e = PurchaseServiceException()
2703
          self.e.read(iprot)
2704
        else:
2705
          iprot.skip(ftype)
2706
      else:
2707
        iprot.skip(ftype)
2708
      iprot.readFieldEnd()
2709
    iprot.readStructEnd()
2710
 
2711
  def write(self, oprot):
2712
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
2713
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
2714
      return
2715
    oprot.writeStructBegin('getAllPurchases_result')
2716
    if self.success is not None:
2717
      oprot.writeFieldBegin('success', TType.LIST, 0)
2718
      oprot.writeListBegin(TType.STRUCT, len(self.success))
2719
      for iter20 in self.success:
2720
        iter20.write(oprot)
2721
      oprot.writeListEnd()
2722
      oprot.writeFieldEnd()
2723
    if self.e is not None:
2724
      oprot.writeFieldBegin('e', TType.STRUCT, 1)
2725
      self.e.write(oprot)
2726
      oprot.writeFieldEnd()
2727
    oprot.writeFieldStop()
2728
    oprot.writeStructEnd()
2729
 
2730
  def validate(self):
2731
    return
2732
 
2733
 
2734
  def __repr__(self):
2735
    L = ['%s=%r' % (key, value)
2736
      for key, value in self.__dict__.iteritems()]
2737
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
2738
 
2739
  def __eq__(self, other):
2740
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
2741
 
2742
  def __ne__(self, other):
2743
    return not (self == other)
2744
 
6386 amar.kumar 2745
class getPurchasesForPO_args:
2746
  """
2747
  Attributes:
2748
   - purchaseOrderId
2749
  """
2750
 
2751
  thrift_spec = (
2752
    None, # 0
2753
    (1, TType.I64, 'purchaseOrderId', None, None, ), # 1
2754
  )
2755
 
2756
  def __init__(self, purchaseOrderId=None,):
2757
    self.purchaseOrderId = purchaseOrderId
2758
 
2759
  def read(self, iprot):
2760
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
2761
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
2762
      return
2763
    iprot.readStructBegin()
2764
    while True:
2765
      (fname, ftype, fid) = iprot.readFieldBegin()
2766
      if ftype == TType.STOP:
2767
        break
2768
      if fid == 1:
2769
        if ftype == TType.I64:
2770
          self.purchaseOrderId = iprot.readI64();
2771
        else:
2772
          iprot.skip(ftype)
2773
      else:
2774
        iprot.skip(ftype)
2775
      iprot.readFieldEnd()
2776
    iprot.readStructEnd()
2777
 
2778
  def write(self, oprot):
2779
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
2780
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
2781
      return
2782
    oprot.writeStructBegin('getPurchasesForPO_args')
2783
    if self.purchaseOrderId is not None:
2784
      oprot.writeFieldBegin('purchaseOrderId', TType.I64, 1)
2785
      oprot.writeI64(self.purchaseOrderId)
2786
      oprot.writeFieldEnd()
2787
    oprot.writeFieldStop()
2788
    oprot.writeStructEnd()
2789
 
2790
  def validate(self):
2791
    return
2792
 
2793
 
2794
  def __repr__(self):
2795
    L = ['%s=%r' % (key, value)
2796
      for key, value in self.__dict__.iteritems()]
2797
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
2798
 
2799
  def __eq__(self, other):
2800
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
2801
 
2802
  def __ne__(self, other):
2803
    return not (self == other)
2804
 
2805
class getPurchasesForPO_result:
2806
  """
2807
  Attributes:
2808
   - success
2809
   - e
2810
  """
2811
 
2812
  thrift_spec = (
2813
    (0, TType.LIST, 'success', (TType.STRUCT,(Purchase, Purchase.thrift_spec)), None, ), # 0
2814
    (1, TType.STRUCT, 'e', (PurchaseServiceException, PurchaseServiceException.thrift_spec), None, ), # 1
2815
  )
2816
 
2817
  def __init__(self, success=None, e=None,):
2818
    self.success = success
2819
    self.e = e
2820
 
2821
  def read(self, iprot):
2822
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
2823
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
2824
      return
2825
    iprot.readStructBegin()
2826
    while True:
2827
      (fname, ftype, fid) = iprot.readFieldBegin()
2828
      if ftype == TType.STOP:
2829
        break
2830
      if fid == 0:
2831
        if ftype == TType.LIST:
2832
          self.success = []
2833
          (_etype24, _size21) = iprot.readListBegin()
2834
          for _i25 in xrange(_size21):
2835
            _elem26 = Purchase()
2836
            _elem26.read(iprot)
2837
            self.success.append(_elem26)
2838
          iprot.readListEnd()
2839
        else:
2840
          iprot.skip(ftype)
2841
      elif fid == 1:
2842
        if ftype == TType.STRUCT:
2843
          self.e = PurchaseServiceException()
2844
          self.e.read(iprot)
2845
        else:
2846
          iprot.skip(ftype)
2847
      else:
2848
        iprot.skip(ftype)
2849
      iprot.readFieldEnd()
2850
    iprot.readStructEnd()
2851
 
2852
  def write(self, oprot):
2853
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
2854
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
2855
      return
2856
    oprot.writeStructBegin('getPurchasesForPO_result')
2857
    if self.success is not None:
2858
      oprot.writeFieldBegin('success', TType.LIST, 0)
2859
      oprot.writeListBegin(TType.STRUCT, len(self.success))
2860
      for iter27 in self.success:
2861
        iter27.write(oprot)
2862
      oprot.writeListEnd()
2863
      oprot.writeFieldEnd()
2864
    if self.e is not None:
2865
      oprot.writeFieldBegin('e', TType.STRUCT, 1)
2866
      self.e.write(oprot)
2867
      oprot.writeFieldEnd()
2868
    oprot.writeFieldStop()
2869
    oprot.writeStructEnd()
2870
 
2871
  def validate(self):
2872
    return
2873
 
2874
 
2875
  def __repr__(self):
2876
    L = ['%s=%r' % (key, value)
2877
      for key, value in self.__dict__.iteritems()]
2878
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
2879
 
2880
  def __eq__(self, other):
2881
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
2882
 
2883
  def __ne__(self, other):
2884
    return not (self == other)
2885
 
4555 mandeep.dh 2886
class getPurchaseOrderForPurchase_args:
4502 mandeep.dh 2887
  """
2888
  Attributes:
2889
   - purchaseId
2890
  """
2891
 
2892
  thrift_spec = (
2893
    None, # 0
2894
    (1, TType.I64, 'purchaseId', None, None, ), # 1
2895
  )
2896
 
4555 mandeep.dh 2897
  def __init__(self, purchaseId=None,):
4502 mandeep.dh 2898
    self.purchaseId = purchaseId
2899
 
2900
  def read(self, iprot):
2901
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
2902
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
2903
      return
2904
    iprot.readStructBegin()
2905
    while True:
2906
      (fname, ftype, fid) = iprot.readFieldBegin()
2907
      if ftype == TType.STOP:
2908
        break
2909
      if fid == 1:
2910
        if ftype == TType.I64:
2911
          self.purchaseId = iprot.readI64();
2912
        else:
2913
          iprot.skip(ftype)
2914
      else:
2915
        iprot.skip(ftype)
2916
      iprot.readFieldEnd()
2917
    iprot.readStructEnd()
2918
 
2919
  def write(self, oprot):
2920
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
2921
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
2922
      return
4555 mandeep.dh 2923
    oprot.writeStructBegin('getPurchaseOrderForPurchase_args')
4502 mandeep.dh 2924
    if self.purchaseId is not None:
2925
      oprot.writeFieldBegin('purchaseId', TType.I64, 1)
2926
      oprot.writeI64(self.purchaseId)
2927
      oprot.writeFieldEnd()
2928
    oprot.writeFieldStop()
2929
    oprot.writeStructEnd()
2930
 
2931
  def validate(self):
2932
    return
2933
 
2934
 
2935
  def __repr__(self):
2936
    L = ['%s=%r' % (key, value)
2937
      for key, value in self.__dict__.iteritems()]
2938
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
2939
 
2940
  def __eq__(self, other):
2941
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
2942
 
2943
  def __ne__(self, other):
2944
    return not (self == other)
2945
 
4555 mandeep.dh 2946
class getPurchaseOrderForPurchase_result:
4502 mandeep.dh 2947
  """
2948
  Attributes:
2949
   - success
2950
  """
2951
 
2952
  thrift_spec = (
4555 mandeep.dh 2953
    (0, TType.STRUCT, 'success', (PurchaseOrder, PurchaseOrder.thrift_spec), None, ), # 0
4502 mandeep.dh 2954
  )
2955
 
2956
  def __init__(self, success=None,):
2957
    self.success = success
2958
 
2959
  def read(self, iprot):
2960
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
2961
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
2962
      return
2963
    iprot.readStructBegin()
2964
    while True:
2965
      (fname, ftype, fid) = iprot.readFieldBegin()
2966
      if ftype == TType.STOP:
2967
        break
2968
      if fid == 0:
4555 mandeep.dh 2969
        if ftype == TType.STRUCT:
2970
          self.success = PurchaseOrder()
2971
          self.success.read(iprot)
4502 mandeep.dh 2972
        else:
2973
          iprot.skip(ftype)
2974
      else:
2975
        iprot.skip(ftype)
2976
      iprot.readFieldEnd()
2977
    iprot.readStructEnd()
2978
 
2979
  def write(self, oprot):
2980
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
2981
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
2982
      return
4555 mandeep.dh 2983
    oprot.writeStructBegin('getPurchaseOrderForPurchase_result')
4502 mandeep.dh 2984
    if self.success is not None:
4555 mandeep.dh 2985
      oprot.writeFieldBegin('success', TType.STRUCT, 0)
2986
      self.success.write(oprot)
4502 mandeep.dh 2987
      oprot.writeFieldEnd()
2988
    oprot.writeFieldStop()
2989
    oprot.writeStructEnd()
2990
 
2991
  def validate(self):
2992
    return
2993
 
2994
 
2995
  def __repr__(self):
2996
    L = ['%s=%r' % (key, value)
2997
      for key, value in self.__dict__.iteritems()]
2998
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
2999
 
3000
  def __eq__(self, other):
3001
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
3002
 
3003
  def __ne__(self, other):
3004
    return not (self == other)
4754 mandeep.dh 3005
 
3006
class getPendingPurchaseOrders_args:
3007
  """
3008
  Attributes:
3009
   - warehouseId
3010
  """
3011
 
3012
  thrift_spec = (
3013
    None, # 0
3014
    (1, TType.I64, 'warehouseId', None, None, ), # 1
3015
  )
3016
 
3017
  def __init__(self, warehouseId=None,):
3018
    self.warehouseId = warehouseId
3019
 
3020
  def read(self, iprot):
3021
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
3022
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
3023
      return
3024
    iprot.readStructBegin()
3025
    while True:
3026
      (fname, ftype, fid) = iprot.readFieldBegin()
3027
      if ftype == TType.STOP:
3028
        break
3029
      if fid == 1:
3030
        if ftype == TType.I64:
3031
          self.warehouseId = iprot.readI64();
3032
        else:
3033
          iprot.skip(ftype)
3034
      else:
3035
        iprot.skip(ftype)
3036
      iprot.readFieldEnd()
3037
    iprot.readStructEnd()
3038
 
3039
  def write(self, oprot):
3040
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
3041
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
3042
      return
3043
    oprot.writeStructBegin('getPendingPurchaseOrders_args')
3044
    if self.warehouseId is not None:
3045
      oprot.writeFieldBegin('warehouseId', TType.I64, 1)
3046
      oprot.writeI64(self.warehouseId)
3047
      oprot.writeFieldEnd()
3048
    oprot.writeFieldStop()
3049
    oprot.writeStructEnd()
3050
 
3051
  def validate(self):
3052
    return
3053
 
3054
 
3055
  def __repr__(self):
3056
    L = ['%s=%r' % (key, value)
3057
      for key, value in self.__dict__.iteritems()]
3058
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
3059
 
3060
  def __eq__(self, other):
3061
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
3062
 
3063
  def __ne__(self, other):
3064
    return not (self == other)
3065
 
3066
class getPendingPurchaseOrders_result:
3067
  """
3068
  Attributes:
3069
   - success
3070
   - e
3071
  """
3072
 
3073
  thrift_spec = (
3074
    (0, TType.LIST, 'success', (TType.STRUCT,(PurchaseOrder, PurchaseOrder.thrift_spec)), None, ), # 0
3075
    (1, TType.STRUCT, 'e', (PurchaseServiceException, PurchaseServiceException.thrift_spec), None, ), # 1
3076
  )
3077
 
3078
  def __init__(self, success=None, e=None,):
3079
    self.success = success
3080
    self.e = e
3081
 
3082
  def read(self, iprot):
3083
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
3084
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
3085
      return
3086
    iprot.readStructBegin()
3087
    while True:
3088
      (fname, ftype, fid) = iprot.readFieldBegin()
3089
      if ftype == TType.STOP:
3090
        break
3091
      if fid == 0:
3092
        if ftype == TType.LIST:
3093
          self.success = []
6386 amar.kumar 3094
          (_etype31, _size28) = iprot.readListBegin()
3095
          for _i32 in xrange(_size28):
3096
            _elem33 = PurchaseOrder()
3097
            _elem33.read(iprot)
3098
            self.success.append(_elem33)
4754 mandeep.dh 3099
          iprot.readListEnd()
3100
        else:
3101
          iprot.skip(ftype)
3102
      elif fid == 1:
3103
        if ftype == TType.STRUCT:
3104
          self.e = PurchaseServiceException()
3105
          self.e.read(iprot)
3106
        else:
3107
          iprot.skip(ftype)
3108
      else:
3109
        iprot.skip(ftype)
3110
      iprot.readFieldEnd()
3111
    iprot.readStructEnd()
3112
 
3113
  def write(self, oprot):
3114
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
3115
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
3116
      return
3117
    oprot.writeStructBegin('getPendingPurchaseOrders_result')
3118
    if self.success is not None:
3119
      oprot.writeFieldBegin('success', TType.LIST, 0)
3120
      oprot.writeListBegin(TType.STRUCT, len(self.success))
6386 amar.kumar 3121
      for iter34 in self.success:
3122
        iter34.write(oprot)
4754 mandeep.dh 3123
      oprot.writeListEnd()
3124
      oprot.writeFieldEnd()
3125
    if self.e is not None:
3126
      oprot.writeFieldBegin('e', TType.STRUCT, 1)
3127
      self.e.write(oprot)
3128
      oprot.writeFieldEnd()
3129
    oprot.writeFieldStop()
3130
    oprot.writeStructEnd()
3131
 
3132
  def validate(self):
3133
    return
3134
 
3135
 
3136
  def __repr__(self):
3137
    L = ['%s=%r' % (key, value)
3138
      for key, value in self.__dict__.iteritems()]
3139
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
3140
 
3141
  def __eq__(self, other):
3142
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
3143
 
3144
  def __ne__(self, other):
3145
    return not (self == other)
3146
 
3147
class getSuppliers_args:
3148
 
3149
  thrift_spec = (
3150
  )
3151
 
3152
  def read(self, iprot):
3153
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
3154
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
3155
      return
3156
    iprot.readStructBegin()
3157
    while True:
3158
      (fname, ftype, fid) = iprot.readFieldBegin()
3159
      if ftype == TType.STOP:
3160
        break
3161
      else:
3162
        iprot.skip(ftype)
3163
      iprot.readFieldEnd()
3164
    iprot.readStructEnd()
3165
 
3166
  def write(self, oprot):
3167
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
3168
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
3169
      return
3170
    oprot.writeStructBegin('getSuppliers_args')
3171
    oprot.writeFieldStop()
3172
    oprot.writeStructEnd()
3173
 
3174
  def validate(self):
3175
    return
3176
 
3177
 
3178
  def __repr__(self):
3179
    L = ['%s=%r' % (key, value)
3180
      for key, value in self.__dict__.iteritems()]
3181
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
3182
 
3183
  def __eq__(self, other):
3184
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
3185
 
3186
  def __ne__(self, other):
3187
    return not (self == other)
3188
 
3189
class getSuppliers_result:
3190
  """
3191
  Attributes:
3192
   - success
3193
   - e
3194
  """
3195
 
3196
  thrift_spec = (
3197
    (0, TType.LIST, 'success', (TType.STRUCT,(Supplier, Supplier.thrift_spec)), None, ), # 0
3198
    (1, TType.STRUCT, 'e', (PurchaseServiceException, PurchaseServiceException.thrift_spec), None, ), # 1
3199
  )
3200
 
3201
  def __init__(self, success=None, e=None,):
3202
    self.success = success
3203
    self.e = e
3204
 
3205
  def read(self, iprot):
3206
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
3207
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
3208
      return
3209
    iprot.readStructBegin()
3210
    while True:
3211
      (fname, ftype, fid) = iprot.readFieldBegin()
3212
      if ftype == TType.STOP:
3213
        break
3214
      if fid == 0:
3215
        if ftype == TType.LIST:
3216
          self.success = []
6386 amar.kumar 3217
          (_etype38, _size35) = iprot.readListBegin()
3218
          for _i39 in xrange(_size35):
3219
            _elem40 = Supplier()
3220
            _elem40.read(iprot)
3221
            self.success.append(_elem40)
4754 mandeep.dh 3222
          iprot.readListEnd()
3223
        else:
3224
          iprot.skip(ftype)
3225
      elif fid == 1:
3226
        if ftype == TType.STRUCT:
3227
          self.e = PurchaseServiceException()
3228
          self.e.read(iprot)
3229
        else:
3230
          iprot.skip(ftype)
3231
      else:
3232
        iprot.skip(ftype)
3233
      iprot.readFieldEnd()
3234
    iprot.readStructEnd()
3235
 
3236
  def write(self, oprot):
3237
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
3238
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
3239
      return
3240
    oprot.writeStructBegin('getSuppliers_result')
3241
    if self.success is not None:
3242
      oprot.writeFieldBegin('success', TType.LIST, 0)
3243
      oprot.writeListBegin(TType.STRUCT, len(self.success))
6386 amar.kumar 3244
      for iter41 in self.success:
3245
        iter41.write(oprot)
4754 mandeep.dh 3246
      oprot.writeListEnd()
3247
      oprot.writeFieldEnd()
3248
    if self.e is not None:
3249
      oprot.writeFieldBegin('e', TType.STRUCT, 1)
3250
      self.e.write(oprot)
3251
      oprot.writeFieldEnd()
3252
    oprot.writeFieldStop()
3253
    oprot.writeStructEnd()
3254
 
3255
  def validate(self):
3256
    return
3257
 
3258
 
3259
  def __repr__(self):
3260
    L = ['%s=%r' % (key, value)
3261
      for key, value in self.__dict__.iteritems()]
3262
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
3263
 
3264
  def __eq__(self, other):
3265
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
3266
 
3267
  def __ne__(self, other):
3268
    return not (self == other)
3269
 
3270
class fulfillPO_args:
3271
  """
3272
  Attributes:
3273
   - purchaseOrderId
3274
   - itemId
3275
   - quantity
3276
  """
3277
 
3278
  thrift_spec = (
3279
    None, # 0
3280
    (1, TType.I64, 'purchaseOrderId', None, None, ), # 1
3281
    (2, TType.I64, 'itemId', None, None, ), # 2
3282
    (3, TType.I64, 'quantity', None, None, ), # 3
3283
  )
3284
 
3285
  def __init__(self, purchaseOrderId=None, itemId=None, quantity=None,):
3286
    self.purchaseOrderId = purchaseOrderId
3287
    self.itemId = itemId
3288
    self.quantity = quantity
3289
 
3290
  def read(self, iprot):
3291
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
3292
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
3293
      return
3294
    iprot.readStructBegin()
3295
    while True:
3296
      (fname, ftype, fid) = iprot.readFieldBegin()
3297
      if ftype == TType.STOP:
3298
        break
3299
      if fid == 1:
3300
        if ftype == TType.I64:
3301
          self.purchaseOrderId = iprot.readI64();
3302
        else:
3303
          iprot.skip(ftype)
3304
      elif fid == 2:
3305
        if ftype == TType.I64:
3306
          self.itemId = iprot.readI64();
3307
        else:
3308
          iprot.skip(ftype)
3309
      elif fid == 3:
3310
        if ftype == TType.I64:
3311
          self.quantity = iprot.readI64();
3312
        else:
3313
          iprot.skip(ftype)
3314
      else:
3315
        iprot.skip(ftype)
3316
      iprot.readFieldEnd()
3317
    iprot.readStructEnd()
3318
 
3319
  def write(self, oprot):
3320
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
3321
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
3322
      return
3323
    oprot.writeStructBegin('fulfillPO_args')
3324
    if self.purchaseOrderId is not None:
3325
      oprot.writeFieldBegin('purchaseOrderId', TType.I64, 1)
3326
      oprot.writeI64(self.purchaseOrderId)
3327
      oprot.writeFieldEnd()
3328
    if self.itemId is not None:
3329
      oprot.writeFieldBegin('itemId', TType.I64, 2)
3330
      oprot.writeI64(self.itemId)
3331
      oprot.writeFieldEnd()
3332
    if self.quantity is not None:
3333
      oprot.writeFieldBegin('quantity', TType.I64, 3)
3334
      oprot.writeI64(self.quantity)
3335
      oprot.writeFieldEnd()
3336
    oprot.writeFieldStop()
3337
    oprot.writeStructEnd()
3338
 
3339
  def validate(self):
3340
    return
3341
 
3342
 
3343
  def __repr__(self):
3344
    L = ['%s=%r' % (key, value)
3345
      for key, value in self.__dict__.iteritems()]
3346
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
3347
 
3348
  def __eq__(self, other):
3349
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
3350
 
3351
  def __ne__(self, other):
3352
    return not (self == other)
3353
 
3354
class fulfillPO_result:
3355
  """
3356
  Attributes:
3357
   - e
3358
  """
3359
 
3360
  thrift_spec = (
3361
    None, # 0
3362
    (1, TType.STRUCT, 'e', (PurchaseServiceException, PurchaseServiceException.thrift_spec), None, ), # 1
3363
  )
3364
 
3365
  def __init__(self, e=None,):
3366
    self.e = e
3367
 
3368
  def read(self, iprot):
3369
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
3370
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
3371
      return
3372
    iprot.readStructBegin()
3373
    while True:
3374
      (fname, ftype, fid) = iprot.readFieldBegin()
3375
      if ftype == TType.STOP:
3376
        break
3377
      if fid == 1:
3378
        if ftype == TType.STRUCT:
3379
          self.e = PurchaseServiceException()
3380
          self.e.read(iprot)
3381
        else:
3382
          iprot.skip(ftype)
3383
      else:
3384
        iprot.skip(ftype)
3385
      iprot.readFieldEnd()
3386
    iprot.readStructEnd()
3387
 
3388
  def write(self, oprot):
3389
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
3390
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
3391
      return
3392
    oprot.writeStructBegin('fulfillPO_result')
3393
    if self.e is not None:
3394
      oprot.writeFieldBegin('e', TType.STRUCT, 1)
3395
      self.e.write(oprot)
3396
      oprot.writeFieldEnd()
3397
    oprot.writeFieldStop()
3398
    oprot.writeStructEnd()
3399
 
3400
  def validate(self):
3401
    return
3402
 
3403
 
3404
  def __repr__(self):
3405
    L = ['%s=%r' % (key, value)
3406
      for key, value in self.__dict__.iteritems()]
3407
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
3408
 
3409
  def __eq__(self, other):
3410
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
3411
 
3412
  def __ne__(self, other):
3413
    return not (self == other)
3414
 
3415
class updatePurchaseOrder_args:
3416
  """
3417
  Attributes:
3418
   - purchaseOrder
3419
  """
3420
 
3421
  thrift_spec = (
3422
    None, # 0
3423
    (1, TType.STRUCT, 'purchaseOrder', (PurchaseOrder, PurchaseOrder.thrift_spec), None, ), # 1
3424
  )
3425
 
3426
  def __init__(self, purchaseOrder=None,):
3427
    self.purchaseOrder = purchaseOrder
3428
 
3429
  def read(self, iprot):
3430
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
3431
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
3432
      return
3433
    iprot.readStructBegin()
3434
    while True:
3435
      (fname, ftype, fid) = iprot.readFieldBegin()
3436
      if ftype == TType.STOP:
3437
        break
3438
      if fid == 1:
3439
        if ftype == TType.STRUCT:
3440
          self.purchaseOrder = PurchaseOrder()
3441
          self.purchaseOrder.read(iprot)
3442
        else:
3443
          iprot.skip(ftype)
3444
      else:
3445
        iprot.skip(ftype)
3446
      iprot.readFieldEnd()
3447
    iprot.readStructEnd()
3448
 
3449
  def write(self, oprot):
3450
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
3451
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
3452
      return
3453
    oprot.writeStructBegin('updatePurchaseOrder_args')
3454
    if self.purchaseOrder is not None:
3455
      oprot.writeFieldBegin('purchaseOrder', TType.STRUCT, 1)
3456
      self.purchaseOrder.write(oprot)
3457
      oprot.writeFieldEnd()
3458
    oprot.writeFieldStop()
3459
    oprot.writeStructEnd()
3460
 
3461
  def validate(self):
3462
    return
3463
 
3464
 
3465
  def __repr__(self):
3466
    L = ['%s=%r' % (key, value)
3467
      for key, value in self.__dict__.iteritems()]
3468
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
3469
 
3470
  def __eq__(self, other):
3471
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
3472
 
3473
  def __ne__(self, other):
3474
    return not (self == other)
3475
 
3476
class updatePurchaseOrder_result:
3477
  """
3478
  Attributes:
3479
   - e
3480
  """
3481
 
3482
  thrift_spec = (
3483
    None, # 0
3484
    (1, TType.STRUCT, 'e', (PurchaseServiceException, PurchaseServiceException.thrift_spec), None, ), # 1
3485
  )
3486
 
3487
  def __init__(self, e=None,):
3488
    self.e = e
3489
 
3490
  def read(self, iprot):
3491
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
3492
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
3493
      return
3494
    iprot.readStructBegin()
3495
    while True:
3496
      (fname, ftype, fid) = iprot.readFieldBegin()
3497
      if ftype == TType.STOP:
3498
        break
3499
      if fid == 1:
3500
        if ftype == TType.STRUCT:
3501
          self.e = PurchaseServiceException()
3502
          self.e.read(iprot)
3503
        else:
3504
          iprot.skip(ftype)
3505
      else:
3506
        iprot.skip(ftype)
3507
      iprot.readFieldEnd()
3508
    iprot.readStructEnd()
3509
 
3510
  def write(self, oprot):
3511
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
3512
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
3513
      return
3514
    oprot.writeStructBegin('updatePurchaseOrder_result')
3515
    if self.e is not None:
3516
      oprot.writeFieldBegin('e', TType.STRUCT, 1)
3517
      self.e.write(oprot)
3518
      oprot.writeFieldEnd()
3519
    oprot.writeFieldStop()
3520
    oprot.writeStructEnd()
3521
 
3522
  def validate(self):
3523
    return
3524
 
3525
 
3526
  def __repr__(self):
3527
    L = ['%s=%r' % (key, value)
3528
      for key, value in self.__dict__.iteritems()]
3529
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
3530
 
3531
  def __eq__(self, other):
3532
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
3533
 
3534
  def __ne__(self, other):
3535
    return not (self == other)
5185 mandeep.dh 3536
 
3537
class unFulfillPO_args:
3538
  """
3539
  Attributes:
3540
   - purchaseId
3541
   - itemId
3542
   - quantity
3543
  """
3544
 
3545
  thrift_spec = (
3546
    None, # 0
3547
    (1, TType.I64, 'purchaseId', None, None, ), # 1
3548
    (2, TType.I64, 'itemId', None, None, ), # 2
3549
    (3, TType.I64, 'quantity', None, None, ), # 3
3550
  )
3551
 
3552
  def __init__(self, purchaseId=None, itemId=None, quantity=None,):
3553
    self.purchaseId = purchaseId
3554
    self.itemId = itemId
3555
    self.quantity = quantity
3556
 
3557
  def read(self, iprot):
3558
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
3559
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
3560
      return
3561
    iprot.readStructBegin()
3562
    while True:
3563
      (fname, ftype, fid) = iprot.readFieldBegin()
3564
      if ftype == TType.STOP:
3565
        break
3566
      if fid == 1:
3567
        if ftype == TType.I64:
3568
          self.purchaseId = iprot.readI64();
3569
        else:
3570
          iprot.skip(ftype)
3571
      elif fid == 2:
3572
        if ftype == TType.I64:
3573
          self.itemId = iprot.readI64();
3574
        else:
3575
          iprot.skip(ftype)
3576
      elif fid == 3:
3577
        if ftype == TType.I64:
3578
          self.quantity = iprot.readI64();
3579
        else:
3580
          iprot.skip(ftype)
3581
      else:
3582
        iprot.skip(ftype)
3583
      iprot.readFieldEnd()
3584
    iprot.readStructEnd()
3585
 
3586
  def write(self, oprot):
3587
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
3588
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
3589
      return
3590
    oprot.writeStructBegin('unFulfillPO_args')
3591
    if self.purchaseId is not None:
3592
      oprot.writeFieldBegin('purchaseId', TType.I64, 1)
3593
      oprot.writeI64(self.purchaseId)
3594
      oprot.writeFieldEnd()
3595
    if self.itemId is not None:
3596
      oprot.writeFieldBegin('itemId', TType.I64, 2)
3597
      oprot.writeI64(self.itemId)
3598
      oprot.writeFieldEnd()
3599
    if self.quantity is not None:
3600
      oprot.writeFieldBegin('quantity', TType.I64, 3)
3601
      oprot.writeI64(self.quantity)
3602
      oprot.writeFieldEnd()
3603
    oprot.writeFieldStop()
3604
    oprot.writeStructEnd()
3605
 
3606
  def validate(self):
3607
    return
3608
 
3609
 
3610
  def __repr__(self):
3611
    L = ['%s=%r' % (key, value)
3612
      for key, value in self.__dict__.iteritems()]
3613
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
3614
 
3615
  def __eq__(self, other):
3616
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
3617
 
3618
  def __ne__(self, other):
3619
    return not (self == other)
3620
 
3621
class unFulfillPO_result:
3622
  """
3623
  Attributes:
3624
   - e
3625
  """
3626
 
3627
  thrift_spec = (
3628
    None, # 0
3629
    (1, TType.STRUCT, 'e', (PurchaseServiceException, PurchaseServiceException.thrift_spec), None, ), # 1
3630
  )
3631
 
3632
  def __init__(self, e=None,):
3633
    self.e = e
3634
 
3635
  def read(self, iprot):
3636
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
3637
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
3638
      return
3639
    iprot.readStructBegin()
3640
    while True:
3641
      (fname, ftype, fid) = iprot.readFieldBegin()
3642
      if ftype == TType.STOP:
3643
        break
3644
      if fid == 1:
3645
        if ftype == TType.STRUCT:
3646
          self.e = PurchaseServiceException()
3647
          self.e.read(iprot)
3648
        else:
3649
          iprot.skip(ftype)
3650
      else:
3651
        iprot.skip(ftype)
3652
      iprot.readFieldEnd()
3653
    iprot.readStructEnd()
3654
 
3655
  def write(self, oprot):
3656
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
3657
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
3658
      return
3659
    oprot.writeStructBegin('unFulfillPO_result')
3660
    if self.e is not None:
3661
      oprot.writeFieldBegin('e', TType.STRUCT, 1)
3662
      self.e.write(oprot)
3663
      oprot.writeFieldEnd()
3664
    oprot.writeFieldStop()
3665
    oprot.writeStructEnd()
3666
 
3667
  def validate(self):
3668
    return
3669
 
3670
 
3671
  def __repr__(self):
3672
    L = ['%s=%r' % (key, value)
3673
      for key, value in self.__dict__.iteritems()]
3674
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
3675
 
3676
  def __eq__(self, other):
3677
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
3678
 
3679
  def __ne__(self, other):
3680
    return not (self == other)
5443 mandeep.dh 3681
 
3682
class getInvoices_args:
3683
  """
3684
  Attributes:
3685
   - date
3686
  """
3687
 
3688
  thrift_spec = (
3689
    None, # 0
3690
    (1, TType.I64, 'date', None, None, ), # 1
3691
  )
3692
 
3693
  def __init__(self, date=None,):
3694
    self.date = date
3695
 
3696
  def read(self, iprot):
3697
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
3698
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
3699
      return
3700
    iprot.readStructBegin()
3701
    while True:
3702
      (fname, ftype, fid) = iprot.readFieldBegin()
3703
      if ftype == TType.STOP:
3704
        break
3705
      if fid == 1:
3706
        if ftype == TType.I64:
3707
          self.date = iprot.readI64();
3708
        else:
3709
          iprot.skip(ftype)
3710
      else:
3711
        iprot.skip(ftype)
3712
      iprot.readFieldEnd()
3713
    iprot.readStructEnd()
3714
 
3715
  def write(self, oprot):
3716
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
3717
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
3718
      return
3719
    oprot.writeStructBegin('getInvoices_args')
3720
    if self.date is not None:
3721
      oprot.writeFieldBegin('date', TType.I64, 1)
3722
      oprot.writeI64(self.date)
3723
      oprot.writeFieldEnd()
3724
    oprot.writeFieldStop()
3725
    oprot.writeStructEnd()
3726
 
3727
  def validate(self):
3728
    return
3729
 
3730
 
3731
  def __repr__(self):
3732
    L = ['%s=%r' % (key, value)
3733
      for key, value in self.__dict__.iteritems()]
3734
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
3735
 
3736
  def __eq__(self, other):
3737
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
3738
 
3739
  def __ne__(self, other):
3740
    return not (self == other)
3741
 
3742
class getInvoices_result:
3743
  """
3744
  Attributes:
3745
   - success
3746
  """
3747
 
3748
  thrift_spec = (
3749
    (0, TType.LIST, 'success', (TType.STRUCT,(Invoice, Invoice.thrift_spec)), None, ), # 0
3750
  )
3751
 
3752
  def __init__(self, success=None,):
3753
    self.success = success
3754
 
3755
  def read(self, iprot):
3756
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
3757
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
3758
      return
3759
    iprot.readStructBegin()
3760
    while True:
3761
      (fname, ftype, fid) = iprot.readFieldBegin()
3762
      if ftype == TType.STOP:
3763
        break
3764
      if fid == 0:
3765
        if ftype == TType.LIST:
3766
          self.success = []
6386 amar.kumar 3767
          (_etype45, _size42) = iprot.readListBegin()
3768
          for _i46 in xrange(_size42):
3769
            _elem47 = Invoice()
3770
            _elem47.read(iprot)
3771
            self.success.append(_elem47)
5443 mandeep.dh 3772
          iprot.readListEnd()
3773
        else:
3774
          iprot.skip(ftype)
3775
      else:
3776
        iprot.skip(ftype)
3777
      iprot.readFieldEnd()
3778
    iprot.readStructEnd()
3779
 
3780
  def write(self, oprot):
3781
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
3782
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
3783
      return
3784
    oprot.writeStructBegin('getInvoices_result')
3785
    if self.success is not None:
3786
      oprot.writeFieldBegin('success', TType.LIST, 0)
3787
      oprot.writeListBegin(TType.STRUCT, len(self.success))
6386 amar.kumar 3788
      for iter48 in self.success:
3789
        iter48.write(oprot)
5443 mandeep.dh 3790
      oprot.writeListEnd()
3791
      oprot.writeFieldEnd()
3792
    oprot.writeFieldStop()
3793
    oprot.writeStructEnd()
3794
 
3795
  def validate(self):
3796
    return
3797
 
3798
 
3799
  def __repr__(self):
3800
    L = ['%s=%r' % (key, value)
3801
      for key, value in self.__dict__.iteritems()]
3802
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
3803
 
3804
  def __eq__(self, other):
3805
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
3806
 
3807
  def __ne__(self, other):
3808
    return not (self == other)
3809
 
7410 amar.kumar 3810
class getInvoicesForWarehouse_args:
3811
  """
3812
  Attributes:
3813
   - warehouseId
3814
   - supplierId
3815
   - date
3816
  """
3817
 
3818
  thrift_spec = (
3819
    None, # 0
3820
    (1, TType.I64, 'warehouseId', None, None, ), # 1
3821
    (2, TType.I64, 'supplierId', None, None, ), # 2
3822
    (3, TType.I64, 'date', None, None, ), # 3
3823
  )
3824
 
3825
  def __init__(self, warehouseId=None, supplierId=None, date=None,):
3826
    self.warehouseId = warehouseId
3827
    self.supplierId = supplierId
3828
    self.date = date
3829
 
3830
  def read(self, iprot):
3831
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
3832
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
3833
      return
3834
    iprot.readStructBegin()
3835
    while True:
3836
      (fname, ftype, fid) = iprot.readFieldBegin()
3837
      if ftype == TType.STOP:
3838
        break
3839
      if fid == 1:
3840
        if ftype == TType.I64:
3841
          self.warehouseId = iprot.readI64();
3842
        else:
3843
          iprot.skip(ftype)
3844
      elif fid == 2:
3845
        if ftype == TType.I64:
3846
          self.supplierId = iprot.readI64();
3847
        else:
3848
          iprot.skip(ftype)
3849
      elif fid == 3:
3850
        if ftype == TType.I64:
3851
          self.date = iprot.readI64();
3852
        else:
3853
          iprot.skip(ftype)
3854
      else:
3855
        iprot.skip(ftype)
3856
      iprot.readFieldEnd()
3857
    iprot.readStructEnd()
3858
 
3859
  def write(self, oprot):
3860
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
3861
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
3862
      return
3863
    oprot.writeStructBegin('getInvoicesForWarehouse_args')
3864
    if self.warehouseId is not None:
3865
      oprot.writeFieldBegin('warehouseId', TType.I64, 1)
3866
      oprot.writeI64(self.warehouseId)
3867
      oprot.writeFieldEnd()
3868
    if self.supplierId is not None:
3869
      oprot.writeFieldBegin('supplierId', TType.I64, 2)
3870
      oprot.writeI64(self.supplierId)
3871
      oprot.writeFieldEnd()
3872
    if self.date is not None:
3873
      oprot.writeFieldBegin('date', TType.I64, 3)
3874
      oprot.writeI64(self.date)
3875
      oprot.writeFieldEnd()
3876
    oprot.writeFieldStop()
3877
    oprot.writeStructEnd()
3878
 
3879
  def validate(self):
3880
    return
3881
 
3882
 
3883
  def __repr__(self):
3884
    L = ['%s=%r' % (key, value)
3885
      for key, value in self.__dict__.iteritems()]
3886
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
3887
 
3888
  def __eq__(self, other):
3889
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
3890
 
3891
  def __ne__(self, other):
3892
    return not (self == other)
3893
 
3894
class getInvoicesForWarehouse_result:
3895
  """
3896
  Attributes:
3897
   - success
3898
  """
3899
 
3900
  thrift_spec = (
3901
    (0, TType.LIST, 'success', (TType.STRUCT,(Invoice, Invoice.thrift_spec)), None, ), # 0
3902
  )
3903
 
3904
  def __init__(self, success=None,):
3905
    self.success = success
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
      if fid == 0:
3917
        if ftype == TType.LIST:
3918
          self.success = []
3919
          (_etype52, _size49) = iprot.readListBegin()
3920
          for _i53 in xrange(_size49):
3921
            _elem54 = Invoice()
3922
            _elem54.read(iprot)
3923
            self.success.append(_elem54)
3924
          iprot.readListEnd()
3925
        else:
3926
          iprot.skip(ftype)
3927
      else:
3928
        iprot.skip(ftype)
3929
      iprot.readFieldEnd()
3930
    iprot.readStructEnd()
3931
 
3932
  def write(self, oprot):
3933
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
3934
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
3935
      return
3936
    oprot.writeStructBegin('getInvoicesForWarehouse_result')
3937
    if self.success is not None:
3938
      oprot.writeFieldBegin('success', TType.LIST, 0)
3939
      oprot.writeListBegin(TType.STRUCT, len(self.success))
3940
      for iter55 in self.success:
3941
        iter55.write(oprot)
3942
      oprot.writeListEnd()
3943
      oprot.writeFieldEnd()
3944
    oprot.writeFieldStop()
3945
    oprot.writeStructEnd()
3946
 
3947
  def validate(self):
3948
    return
3949
 
3950
 
3951
  def __repr__(self):
3952
    L = ['%s=%r' % (key, value)
3953
      for key, value in self.__dict__.iteritems()]
3954
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
3955
 
3956
  def __eq__(self, other):
3957
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
3958
 
3959
  def __ne__(self, other):
3960
    return not (self == other)
3961
 
5443 mandeep.dh 3962
class createInvoice_args:
3963
  """
3964
  Attributes:
3965
   - invoice
3966
  """
3967
 
3968
  thrift_spec = (
3969
    None, # 0
3970
    (1, TType.STRUCT, 'invoice', (Invoice, Invoice.thrift_spec), None, ), # 1
3971
  )
3972
 
3973
  def __init__(self, invoice=None,):
3974
    self.invoice = invoice
3975
 
3976
  def read(self, iprot):
3977
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
3978
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
3979
      return
3980
    iprot.readStructBegin()
3981
    while True:
3982
      (fname, ftype, fid) = iprot.readFieldBegin()
3983
      if ftype == TType.STOP:
3984
        break
3985
      if fid == 1:
3986
        if ftype == TType.STRUCT:
3987
          self.invoice = Invoice()
3988
          self.invoice.read(iprot)
3989
        else:
3990
          iprot.skip(ftype)
3991
      else:
3992
        iprot.skip(ftype)
3993
      iprot.readFieldEnd()
3994
    iprot.readStructEnd()
3995
 
3996
  def write(self, oprot):
3997
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
3998
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
3999
      return
4000
    oprot.writeStructBegin('createInvoice_args')
4001
    if self.invoice is not None:
4002
      oprot.writeFieldBegin('invoice', TType.STRUCT, 1)
4003
      self.invoice.write(oprot)
4004
      oprot.writeFieldEnd()
4005
    oprot.writeFieldStop()
4006
    oprot.writeStructEnd()
4007
 
4008
  def validate(self):
4009
    return
4010
 
4011
 
4012
  def __repr__(self):
4013
    L = ['%s=%r' % (key, value)
4014
      for key, value in self.__dict__.iteritems()]
4015
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
4016
 
4017
  def __eq__(self, other):
4018
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
4019
 
4020
  def __ne__(self, other):
4021
    return not (self == other)
4022
 
4023
class createInvoice_result:
4024
  """
4025
  Attributes:
4026
   - e
4027
  """
4028
 
4029
  thrift_spec = (
4030
    None, # 0
4031
    (1, TType.STRUCT, 'e', (PurchaseServiceException, PurchaseServiceException.thrift_spec), None, ), # 1
4032
  )
4033
 
4034
  def __init__(self, e=None,):
4035
    self.e = e
4036
 
4037
  def read(self, iprot):
4038
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
4039
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
4040
      return
4041
    iprot.readStructBegin()
4042
    while True:
4043
      (fname, ftype, fid) = iprot.readFieldBegin()
4044
      if ftype == TType.STOP:
4045
        break
4046
      if fid == 1:
4047
        if ftype == TType.STRUCT:
4048
          self.e = PurchaseServiceException()
4049
          self.e.read(iprot)
4050
        else:
4051
          iprot.skip(ftype)
4052
      else:
4053
        iprot.skip(ftype)
4054
      iprot.readFieldEnd()
4055
    iprot.readStructEnd()
4056
 
4057
  def write(self, oprot):
4058
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
4059
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
4060
      return
4061
    oprot.writeStructBegin('createInvoice_result')
4062
    if self.e is not None:
4063
      oprot.writeFieldBegin('e', TType.STRUCT, 1)
4064
      self.e.write(oprot)
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)
5591 mandeep.dh 4083
 
4084
class addSupplier_args:
4085
  """
4086
  Attributes:
4087
   - supplier
4088
  """
4089
 
4090
  thrift_spec = (
4091
    None, # 0
4092
    (1, TType.STRUCT, 'supplier', (Supplier, Supplier.thrift_spec), None, ), # 1
4093
  )
4094
 
4095
  def __init__(self, supplier=None,):
4096
    self.supplier = supplier
4097
 
4098
  def read(self, iprot):
4099
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
4100
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
4101
      return
4102
    iprot.readStructBegin()
4103
    while True:
4104
      (fname, ftype, fid) = iprot.readFieldBegin()
4105
      if ftype == TType.STOP:
4106
        break
4107
      if fid == 1:
4108
        if ftype == TType.STRUCT:
4109
          self.supplier = Supplier()
4110
          self.supplier.read(iprot)
4111
        else:
4112
          iprot.skip(ftype)
4113
      else:
4114
        iprot.skip(ftype)
4115
      iprot.readFieldEnd()
4116
    iprot.readStructEnd()
4117
 
4118
  def write(self, oprot):
4119
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
4120
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
4121
      return
4122
    oprot.writeStructBegin('addSupplier_args')
4123
    if self.supplier is not None:
4124
      oprot.writeFieldBegin('supplier', TType.STRUCT, 1)
4125
      self.supplier.write(oprot)
4126
      oprot.writeFieldEnd()
4127
    oprot.writeFieldStop()
4128
    oprot.writeStructEnd()
4129
 
4130
  def validate(self):
4131
    return
4132
 
4133
 
4134
  def __repr__(self):
4135
    L = ['%s=%r' % (key, value)
4136
      for key, value in self.__dict__.iteritems()]
4137
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
4138
 
4139
  def __eq__(self, other):
4140
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
4141
 
4142
  def __ne__(self, other):
4143
    return not (self == other)
4144
 
4145
class addSupplier_result:
4146
  """
4147
  Attributes:
4148
   - success
4149
  """
4150
 
4151
  thrift_spec = (
4152
    (0, TType.STRUCT, 'success', (Supplier, Supplier.thrift_spec), None, ), # 0
4153
  )
4154
 
4155
  def __init__(self, success=None,):
4156
    self.success = success
4157
 
4158
  def read(self, iprot):
4159
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
4160
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
4161
      return
4162
    iprot.readStructBegin()
4163
    while True:
4164
      (fname, ftype, fid) = iprot.readFieldBegin()
4165
      if ftype == TType.STOP:
4166
        break
4167
      if fid == 0:
4168
        if ftype == TType.STRUCT:
4169
          self.success = Supplier()
4170
          self.success.read(iprot)
4171
        else:
4172
          iprot.skip(ftype)
4173
      else:
4174
        iprot.skip(ftype)
4175
      iprot.readFieldEnd()
4176
    iprot.readStructEnd()
4177
 
4178
  def write(self, oprot):
4179
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
4180
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
4181
      return
4182
    oprot.writeStructBegin('addSupplier_result')
4183
    if self.success is not None:
4184
      oprot.writeFieldBegin('success', TType.STRUCT, 0)
4185
      self.success.write(oprot)
4186
      oprot.writeFieldEnd()
4187
    oprot.writeFieldStop()
4188
    oprot.writeStructEnd()
4189
 
4190
  def validate(self):
4191
    return
4192
 
4193
 
4194
  def __repr__(self):
4195
    L = ['%s=%r' % (key, value)
4196
      for key, value in self.__dict__.iteritems()]
4197
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
4198
 
4199
  def __eq__(self, other):
4200
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
4201
 
4202
  def __ne__(self, other):
4203
    return not (self == other)
4204
 
4205
class updateSupplier_args:
4206
  """
4207
  Attributes:
4208
   - supplier
4209
  """
4210
 
4211
  thrift_spec = (
4212
    None, # 0
4213
    (1, TType.STRUCT, 'supplier', (Supplier, Supplier.thrift_spec), None, ), # 1
4214
  )
4215
 
4216
  def __init__(self, supplier=None,):
4217
    self.supplier = supplier
4218
 
4219
  def read(self, iprot):
4220
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
4221
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
4222
      return
4223
    iprot.readStructBegin()
4224
    while True:
4225
      (fname, ftype, fid) = iprot.readFieldBegin()
4226
      if ftype == TType.STOP:
4227
        break
4228
      if fid == 1:
4229
        if ftype == TType.STRUCT:
4230
          self.supplier = Supplier()
4231
          self.supplier.read(iprot)
4232
        else:
4233
          iprot.skip(ftype)
4234
      else:
4235
        iprot.skip(ftype)
4236
      iprot.readFieldEnd()
4237
    iprot.readStructEnd()
4238
 
4239
  def write(self, oprot):
4240
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
4241
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
4242
      return
4243
    oprot.writeStructBegin('updateSupplier_args')
4244
    if self.supplier is not None:
4245
      oprot.writeFieldBegin('supplier', TType.STRUCT, 1)
4246
      self.supplier.write(oprot)
4247
      oprot.writeFieldEnd()
4248
    oprot.writeFieldStop()
4249
    oprot.writeStructEnd()
4250
 
4251
  def validate(self):
4252
    return
4253
 
4254
 
4255
  def __repr__(self):
4256
    L = ['%s=%r' % (key, value)
4257
      for key, value in self.__dict__.iteritems()]
4258
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
4259
 
4260
  def __eq__(self, other):
4261
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
4262
 
4263
  def __ne__(self, other):
4264
    return not (self == other)
4265
 
4266
class updateSupplier_result:
4267
 
4268
  thrift_spec = (
4269
  )
4270
 
4271
  def read(self, iprot):
4272
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
4273
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
4274
      return
4275
    iprot.readStructBegin()
4276
    while True:
4277
      (fname, ftype, fid) = iprot.readFieldBegin()
4278
      if ftype == TType.STOP:
4279
        break
4280
      else:
4281
        iprot.skip(ftype)
4282
      iprot.readFieldEnd()
4283
    iprot.readStructEnd()
4284
 
4285
  def write(self, oprot):
4286
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
4287
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
4288
      return
4289
    oprot.writeStructBegin('updateSupplier_result')
4290
    oprot.writeFieldStop()
4291
    oprot.writeStructEnd()
4292
 
4293
  def validate(self):
4294
    return
4295
 
4296
 
4297
  def __repr__(self):
4298
    L = ['%s=%r' % (key, value)
4299
      for key, value in self.__dict__.iteritems()]
4300
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
4301
 
4302
  def __eq__(self, other):
4303
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
4304
 
4305
  def __ne__(self, other):
4306
    return not (self == other)
6467 amar.kumar 4307
 
4308
class createPurchaseReturn_args:
4309
  """
4310
  Attributes:
4311
   - purchaseReturn
4312
  """
4313
 
4314
  thrift_spec = (
4315
    None, # 0
4316
    (1, TType.STRUCT, 'purchaseReturn', (PurchaseReturn, PurchaseReturn.thrift_spec), None, ), # 1
4317
  )
4318
 
4319
  def __init__(self, purchaseReturn=None,):
4320
    self.purchaseReturn = purchaseReturn
4321
 
4322
  def read(self, iprot):
4323
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
4324
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
4325
      return
4326
    iprot.readStructBegin()
4327
    while True:
4328
      (fname, ftype, fid) = iprot.readFieldBegin()
4329
      if ftype == TType.STOP:
4330
        break
4331
      if fid == 1:
4332
        if ftype == TType.STRUCT:
4333
          self.purchaseReturn = PurchaseReturn()
4334
          self.purchaseReturn.read(iprot)
4335
        else:
4336
          iprot.skip(ftype)
4337
      else:
4338
        iprot.skip(ftype)
4339
      iprot.readFieldEnd()
4340
    iprot.readStructEnd()
4341
 
4342
  def write(self, oprot):
4343
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
4344
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
4345
      return
4346
    oprot.writeStructBegin('createPurchaseReturn_args')
4347
    if self.purchaseReturn is not None:
4348
      oprot.writeFieldBegin('purchaseReturn', TType.STRUCT, 1)
4349
      self.purchaseReturn.write(oprot)
4350
      oprot.writeFieldEnd()
4351
    oprot.writeFieldStop()
4352
    oprot.writeStructEnd()
4353
 
4354
  def validate(self):
4355
    return
4356
 
4357
 
4358
  def __repr__(self):
4359
    L = ['%s=%r' % (key, value)
4360
      for key, value in self.__dict__.iteritems()]
4361
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
4362
 
4363
  def __eq__(self, other):
4364
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
4365
 
4366
  def __ne__(self, other):
4367
    return not (self == other)
4368
 
4369
class createPurchaseReturn_result:
4370
  """
4371
  Attributes:
4372
   - success
4373
  """
4374
 
4375
  thrift_spec = (
4376
    (0, TType.I64, 'success', None, None, ), # 0
4377
  )
4378
 
4379
  def __init__(self, success=None,):
4380
    self.success = success
4381
 
4382
  def read(self, iprot):
4383
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
4384
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
4385
      return
4386
    iprot.readStructBegin()
4387
    while True:
4388
      (fname, ftype, fid) = iprot.readFieldBegin()
4389
      if ftype == TType.STOP:
4390
        break
4391
      if fid == 0:
4392
        if ftype == TType.I64:
4393
          self.success = iprot.readI64();
4394
        else:
4395
          iprot.skip(ftype)
4396
      else:
4397
        iprot.skip(ftype)
4398
      iprot.readFieldEnd()
4399
    iprot.readStructEnd()
4400
 
4401
  def write(self, oprot):
4402
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
4403
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
4404
      return
4405
    oprot.writeStructBegin('createPurchaseReturn_result')
4406
    if self.success is not None:
4407
      oprot.writeFieldBegin('success', TType.I64, 0)
4408
      oprot.writeI64(self.success)
4409
      oprot.writeFieldEnd()
4410
    oprot.writeFieldStop()
4411
    oprot.writeStructEnd()
4412
 
4413
  def validate(self):
4414
    return
4415
 
4416
 
4417
  def __repr__(self):
4418
    L = ['%s=%r' % (key, value)
4419
      for key, value in self.__dict__.iteritems()]
4420
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
4421
 
4422
  def __eq__(self, other):
4423
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
4424
 
4425
  def __ne__(self, other):
4426
    return not (self == other)
4427
 
4428
class settlePurchaseReturn_args:
4429
  """
4430
  Attributes:
4431
   - id
4432
  """
4433
 
4434
  thrift_spec = (
4435
    None, # 0
4436
    (1, TType.I64, 'id', None, None, ), # 1
4437
  )
4438
 
4439
  def __init__(self, id=None,):
4440
    self.id = id
4441
 
4442
  def read(self, iprot):
4443
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
4444
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
4445
      return
4446
    iprot.readStructBegin()
4447
    while True:
4448
      (fname, ftype, fid) = iprot.readFieldBegin()
4449
      if ftype == TType.STOP:
4450
        break
4451
      if fid == 1:
4452
        if ftype == TType.I64:
4453
          self.id = iprot.readI64();
4454
        else:
4455
          iprot.skip(ftype)
4456
      else:
4457
        iprot.skip(ftype)
4458
      iprot.readFieldEnd()
4459
    iprot.readStructEnd()
4460
 
4461
  def write(self, oprot):
4462
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
4463
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
4464
      return
4465
    oprot.writeStructBegin('settlePurchaseReturn_args')
4466
    if self.id is not None:
4467
      oprot.writeFieldBegin('id', TType.I64, 1)
4468
      oprot.writeI64(self.id)
4469
      oprot.writeFieldEnd()
4470
    oprot.writeFieldStop()
4471
    oprot.writeStructEnd()
4472
 
4473
  def validate(self):
4474
    return
4475
 
4476
 
4477
  def __repr__(self):
4478
    L = ['%s=%r' % (key, value)
4479
      for key, value in self.__dict__.iteritems()]
4480
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
4481
 
4482
  def __eq__(self, other):
4483
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
4484
 
4485
  def __ne__(self, other):
4486
    return not (self == other)
4487
 
4488
class settlePurchaseReturn_result:
4489
 
4490
  thrift_spec = (
4491
  )
4492
 
4493
  def read(self, iprot):
4494
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
4495
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
4496
      return
4497
    iprot.readStructBegin()
4498
    while True:
4499
      (fname, ftype, fid) = iprot.readFieldBegin()
4500
      if ftype == TType.STOP:
4501
        break
4502
      else:
4503
        iprot.skip(ftype)
4504
      iprot.readFieldEnd()
4505
    iprot.readStructEnd()
4506
 
4507
  def write(self, oprot):
4508
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
4509
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
4510
      return
4511
    oprot.writeStructBegin('settlePurchaseReturn_result')
4512
    oprot.writeFieldStop()
4513
    oprot.writeStructEnd()
4514
 
4515
  def validate(self):
4516
    return
4517
 
4518
 
4519
  def __repr__(self):
4520
    L = ['%s=%r' % (key, value)
4521
      for key, value in self.__dict__.iteritems()]
4522
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
4523
 
4524
  def __eq__(self, other):
4525
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
4526
 
4527
  def __ne__(self, other):
4528
    return not (self == other)
4529
 
4530
class getUnsettledPurchaseReturns_args:
4531
 
4532
  thrift_spec = (
4533
  )
4534
 
4535
  def read(self, iprot):
4536
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
4537
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
4538
      return
4539
    iprot.readStructBegin()
4540
    while True:
4541
      (fname, ftype, fid) = iprot.readFieldBegin()
4542
      if ftype == TType.STOP:
4543
        break
4544
      else:
4545
        iprot.skip(ftype)
4546
      iprot.readFieldEnd()
4547
    iprot.readStructEnd()
4548
 
4549
  def write(self, oprot):
4550
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
4551
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
4552
      return
4553
    oprot.writeStructBegin('getUnsettledPurchaseReturns_args')
4554
    oprot.writeFieldStop()
4555
    oprot.writeStructEnd()
4556
 
4557
  def validate(self):
4558
    return
4559
 
4560
 
4561
  def __repr__(self):
4562
    L = ['%s=%r' % (key, value)
4563
      for key, value in self.__dict__.iteritems()]
4564
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
4565
 
4566
  def __eq__(self, other):
4567
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
4568
 
4569
  def __ne__(self, other):
4570
    return not (self == other)
4571
 
4572
class getUnsettledPurchaseReturns_result:
4573
  """
4574
  Attributes:
4575
   - success
4576
  """
4577
 
4578
  thrift_spec = (
4579
    (0, TType.LIST, 'success', (TType.STRUCT,(PurchaseReturn, PurchaseReturn.thrift_spec)), None, ), # 0
4580
  )
4581
 
4582
  def __init__(self, success=None,):
4583
    self.success = success
4584
 
4585
  def read(self, iprot):
4586
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
4587
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
4588
      return
4589
    iprot.readStructBegin()
4590
    while True:
4591
      (fname, ftype, fid) = iprot.readFieldBegin()
4592
      if ftype == TType.STOP:
4593
        break
4594
      if fid == 0:
4595
        if ftype == TType.LIST:
4596
          self.success = []
7410 amar.kumar 4597
          (_etype59, _size56) = iprot.readListBegin()
4598
          for _i60 in xrange(_size56):
4599
            _elem61 = PurchaseReturn()
4600
            _elem61.read(iprot)
4601
            self.success.append(_elem61)
6467 amar.kumar 4602
          iprot.readListEnd()
4603
        else:
4604
          iprot.skip(ftype)
4605
      else:
4606
        iprot.skip(ftype)
4607
      iprot.readFieldEnd()
4608
    iprot.readStructEnd()
4609
 
4610
  def write(self, oprot):
4611
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
4612
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
4613
      return
4614
    oprot.writeStructBegin('getUnsettledPurchaseReturns_result')
4615
    if self.success is not None:
4616
      oprot.writeFieldBegin('success', TType.LIST, 0)
4617
      oprot.writeListBegin(TType.STRUCT, len(self.success))
7410 amar.kumar 4618
      for iter62 in self.success:
4619
        iter62.write(oprot)
6467 amar.kumar 4620
      oprot.writeListEnd()
4621
      oprot.writeFieldEnd()
4622
    oprot.writeFieldStop()
4623
    oprot.writeStructEnd()
4624
 
4625
  def validate(self):
4626
    return
4627
 
4628
 
4629
  def __repr__(self):
4630
    L = ['%s=%r' % (key, value)
4631
      for key, value in self.__dict__.iteritems()]
4632
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
4633
 
4634
  def __eq__(self, other):
4635
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
4636
 
4637
  def __ne__(self, other):
4638
    return not (self == other)
6630 amar.kumar 4639
 
4640
class getInvoice_args:
4641
  """
4642
  Attributes:
4643
   - invoiceNumber
4644
   - supplierId
4645
  """
4646
 
4647
  thrift_spec = (
4648
    None, # 0
4649
    (1, TType.STRING, 'invoiceNumber', None, None, ), # 1
4650
    (2, TType.I64, 'supplierId', None, None, ), # 2
4651
  )
4652
 
4653
  def __init__(self, invoiceNumber=None, supplierId=None,):
4654
    self.invoiceNumber = invoiceNumber
4655
    self.supplierId = supplierId
4656
 
4657
  def read(self, iprot):
4658
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
4659
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
4660
      return
4661
    iprot.readStructBegin()
4662
    while True:
4663
      (fname, ftype, fid) = iprot.readFieldBegin()
4664
      if ftype == TType.STOP:
4665
        break
4666
      if fid == 1:
4667
        if ftype == TType.STRING:
4668
          self.invoiceNumber = iprot.readString();
4669
        else:
4670
          iprot.skip(ftype)
4671
      elif fid == 2:
4672
        if ftype == TType.I64:
4673
          self.supplierId = iprot.readI64();
4674
        else:
4675
          iprot.skip(ftype)
4676
      else:
4677
        iprot.skip(ftype)
4678
      iprot.readFieldEnd()
4679
    iprot.readStructEnd()
4680
 
4681
  def write(self, oprot):
4682
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
4683
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
4684
      return
4685
    oprot.writeStructBegin('getInvoice_args')
4686
    if self.invoiceNumber is not None:
4687
      oprot.writeFieldBegin('invoiceNumber', TType.STRING, 1)
4688
      oprot.writeString(self.invoiceNumber)
4689
      oprot.writeFieldEnd()
4690
    if self.supplierId is not None:
4691
      oprot.writeFieldBegin('supplierId', TType.I64, 2)
4692
      oprot.writeI64(self.supplierId)
4693
      oprot.writeFieldEnd()
4694
    oprot.writeFieldStop()
4695
    oprot.writeStructEnd()
4696
 
4697
  def validate(self):
4698
    return
4699
 
4700
 
4701
  def __repr__(self):
4702
    L = ['%s=%r' % (key, value)
4703
      for key, value in self.__dict__.iteritems()]
4704
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
4705
 
4706
  def __eq__(self, other):
4707
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
4708
 
4709
  def __ne__(self, other):
4710
    return not (self == other)
4711
 
4712
class getInvoice_result:
4713
  """
4714
  Attributes:
4715
   - success
4716
  """
4717
 
4718
  thrift_spec = (
4719
    (0, TType.LIST, 'success', (TType.STRUCT,(PurchaseReturn, PurchaseReturn.thrift_spec)), None, ), # 0
4720
  )
4721
 
4722
  def __init__(self, success=None,):
4723
    self.success = success
4724
 
4725
  def read(self, iprot):
4726
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
4727
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
4728
      return
4729
    iprot.readStructBegin()
4730
    while True:
4731
      (fname, ftype, fid) = iprot.readFieldBegin()
4732
      if ftype == TType.STOP:
4733
        break
4734
      if fid == 0:
4735
        if ftype == TType.LIST:
4736
          self.success = []
7410 amar.kumar 4737
          (_etype66, _size63) = iprot.readListBegin()
4738
          for _i67 in xrange(_size63):
4739
            _elem68 = PurchaseReturn()
4740
            _elem68.read(iprot)
4741
            self.success.append(_elem68)
6630 amar.kumar 4742
          iprot.readListEnd()
4743
        else:
4744
          iprot.skip(ftype)
4745
      else:
4746
        iprot.skip(ftype)
4747
      iprot.readFieldEnd()
4748
    iprot.readStructEnd()
4749
 
4750
  def write(self, oprot):
4751
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
4752
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
4753
      return
4754
    oprot.writeStructBegin('getInvoice_result')
4755
    if self.success is not None:
4756
      oprot.writeFieldBegin('success', TType.LIST, 0)
4757
      oprot.writeListBegin(TType.STRUCT, len(self.success))
7410 amar.kumar 4758
      for iter69 in self.success:
4759
        iter69.write(oprot)
6630 amar.kumar 4760
      oprot.writeListEnd()
4761
      oprot.writeFieldEnd()
4762
    oprot.writeFieldStop()
4763
    oprot.writeStructEnd()
4764
 
4765
  def validate(self):
4766
    return
4767
 
4768
 
4769
  def __repr__(self):
4770
    L = ['%s=%r' % (key, value)
4771
      for key, value in self.__dict__.iteritems()]
4772
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
4773
 
4774
  def __eq__(self, other):
4775
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
4776
 
4777
  def __ne__(self, other):
4778
    return not (self == other)
6762 amar.kumar 4779
 
4780
class createPurchaseForOurExtBilling_args:
4781
  """
4782
  Attributes:
4783
   - invoiceNumber
4784
   - unitPrice
7672 rajveer 4785
   - nlc
6762 amar.kumar 4786
   - itemId
4787
  """
4788
 
4789
  thrift_spec = (
4790
    None, # 0
4791
    (1, TType.STRING, 'invoiceNumber', None, None, ), # 1
4792
    (2, TType.DOUBLE, 'unitPrice', None, None, ), # 2
7672 rajveer 4793
    (3, TType.DOUBLE, 'nlc', None, None, ), # 3
4794
    (4, TType.I64, 'itemId', None, None, ), # 4
6762 amar.kumar 4795
  )
4796
 
7672 rajveer 4797
  def __init__(self, invoiceNumber=None, unitPrice=None, nlc=None, itemId=None,):
6762 amar.kumar 4798
    self.invoiceNumber = invoiceNumber
4799
    self.unitPrice = unitPrice
7672 rajveer 4800
    self.nlc = nlc
6762 amar.kumar 4801
    self.itemId = itemId
4802
 
4803
  def read(self, iprot):
4804
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
4805
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
4806
      return
4807
    iprot.readStructBegin()
4808
    while True:
4809
      (fname, ftype, fid) = iprot.readFieldBegin()
4810
      if ftype == TType.STOP:
4811
        break
4812
      if fid == 1:
4813
        if ftype == TType.STRING:
4814
          self.invoiceNumber = iprot.readString();
4815
        else:
4816
          iprot.skip(ftype)
4817
      elif fid == 2:
4818
        if ftype == TType.DOUBLE:
4819
          self.unitPrice = iprot.readDouble();
4820
        else:
4821
          iprot.skip(ftype)
4822
      elif fid == 3:
7672 rajveer 4823
        if ftype == TType.DOUBLE:
4824
          self.nlc = iprot.readDouble();
4825
        else:
4826
          iprot.skip(ftype)
4827
      elif fid == 4:
6762 amar.kumar 4828
        if ftype == TType.I64:
4829
          self.itemId = iprot.readI64();
4830
        else:
4831
          iprot.skip(ftype)
4832
      else:
4833
        iprot.skip(ftype)
4834
      iprot.readFieldEnd()
4835
    iprot.readStructEnd()
4836
 
4837
  def write(self, oprot):
4838
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
4839
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
4840
      return
4841
    oprot.writeStructBegin('createPurchaseForOurExtBilling_args')
4842
    if self.invoiceNumber is not None:
4843
      oprot.writeFieldBegin('invoiceNumber', TType.STRING, 1)
4844
      oprot.writeString(self.invoiceNumber)
4845
      oprot.writeFieldEnd()
4846
    if self.unitPrice is not None:
4847
      oprot.writeFieldBegin('unitPrice', TType.DOUBLE, 2)
4848
      oprot.writeDouble(self.unitPrice)
4849
      oprot.writeFieldEnd()
7672 rajveer 4850
    if self.nlc is not None:
4851
      oprot.writeFieldBegin('nlc', TType.DOUBLE, 3)
4852
      oprot.writeDouble(self.nlc)
4853
      oprot.writeFieldEnd()
6762 amar.kumar 4854
    if self.itemId is not None:
7672 rajveer 4855
      oprot.writeFieldBegin('itemId', TType.I64, 4)
6762 amar.kumar 4856
      oprot.writeI64(self.itemId)
4857
      oprot.writeFieldEnd()
4858
    oprot.writeFieldStop()
4859
    oprot.writeStructEnd()
4860
 
4861
  def validate(self):
4862
    return
4863
 
4864
 
4865
  def __repr__(self):
4866
    L = ['%s=%r' % (key, value)
4867
      for key, value in self.__dict__.iteritems()]
4868
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
4869
 
4870
  def __eq__(self, other):
4871
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
4872
 
4873
  def __ne__(self, other):
4874
    return not (self == other)
4875
 
4876
class createPurchaseForOurExtBilling_result:
4877
  """
4878
  Attributes:
4879
   - success
4880
  """
4881
 
4882
  thrift_spec = (
4883
    (0, TType.I64, 'success', None, None, ), # 0
4884
  )
4885
 
4886
  def __init__(self, success=None,):
4887
    self.success = success
4888
 
4889
  def read(self, iprot):
4890
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
4891
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
4892
      return
4893
    iprot.readStructBegin()
4894
    while True:
4895
      (fname, ftype, fid) = iprot.readFieldBegin()
4896
      if ftype == TType.STOP:
4897
        break
4898
      if fid == 0:
4899
        if ftype == TType.I64:
4900
          self.success = iprot.readI64();
4901
        else:
4902
          iprot.skip(ftype)
4903
      else:
4904
        iprot.skip(ftype)
4905
      iprot.readFieldEnd()
4906
    iprot.readStructEnd()
4907
 
4908
  def write(self, oprot):
4909
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
4910
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
4911
      return
4912
    oprot.writeStructBegin('createPurchaseForOurExtBilling_result')
4913
    if self.success is not None:
4914
      oprot.writeFieldBegin('success', TType.I64, 0)
4915
      oprot.writeI64(self.success)
4916
      oprot.writeFieldEnd()
4917
    oprot.writeFieldStop()
4918
    oprot.writeStructEnd()
4919
 
4920
  def validate(self):
4921
    return
4922
 
4923
 
4924
  def __repr__(self):
4925
    L = ['%s=%r' % (key, value)
4926
      for key, value in self.__dict__.iteritems()]
4927
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
4928
 
4929
  def __eq__(self, other):
4930
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
4931
 
4932
  def __ne__(self, other):
4933
    return not (self == other)
4934
 
4935
class fulfillPOForExtBilling_args:
4936
  """
4937
  Attributes:
4938
   - itemId
4939
   - quantity
4940
  """
4941
 
4942
  thrift_spec = (
4943
    None, # 0
4944
    (1, TType.I64, 'itemId', None, None, ), # 1
4945
    (2, TType.I64, 'quantity', None, None, ), # 2
4946
  )
4947
 
4948
  def __init__(self, itemId=None, quantity=None,):
4949
    self.itemId = itemId
4950
    self.quantity = quantity
4951
 
4952
  def read(self, iprot):
4953
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
4954
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
4955
      return
4956
    iprot.readStructBegin()
4957
    while True:
4958
      (fname, ftype, fid) = iprot.readFieldBegin()
4959
      if ftype == TType.STOP:
4960
        break
4961
      if fid == 1:
4962
        if ftype == TType.I64:
4963
          self.itemId = iprot.readI64();
4964
        else:
4965
          iprot.skip(ftype)
4966
      elif fid == 2:
4967
        if ftype == TType.I64:
4968
          self.quantity = iprot.readI64();
4969
        else:
4970
          iprot.skip(ftype)
4971
      else:
4972
        iprot.skip(ftype)
4973
      iprot.readFieldEnd()
4974
    iprot.readStructEnd()
4975
 
4976
  def write(self, oprot):
4977
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
4978
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
4979
      return
4980
    oprot.writeStructBegin('fulfillPOForExtBilling_args')
4981
    if self.itemId is not None:
4982
      oprot.writeFieldBegin('itemId', TType.I64, 1)
4983
      oprot.writeI64(self.itemId)
4984
      oprot.writeFieldEnd()
4985
    if self.quantity is not None:
4986
      oprot.writeFieldBegin('quantity', TType.I64, 2)
4987
      oprot.writeI64(self.quantity)
4988
      oprot.writeFieldEnd()
4989
    oprot.writeFieldStop()
4990
    oprot.writeStructEnd()
4991
 
4992
  def validate(self):
4993
    return
4994
 
4995
 
4996
  def __repr__(self):
4997
    L = ['%s=%r' % (key, value)
4998
      for key, value in self.__dict__.iteritems()]
4999
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
5000
 
5001
  def __eq__(self, other):
5002
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
5003
 
5004
  def __ne__(self, other):
5005
    return not (self == other)
5006
 
5007
class fulfillPOForExtBilling_result:
5008
 
5009
  thrift_spec = (
5010
  )
5011
 
5012
  def read(self, iprot):
5013
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
5014
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
5015
      return
5016
    iprot.readStructBegin()
5017
    while True:
5018
      (fname, ftype, fid) = iprot.readFieldBegin()
5019
      if ftype == TType.STOP:
5020
        break
5021
      else:
5022
        iprot.skip(ftype)
5023
      iprot.readFieldEnd()
5024
    iprot.readStructEnd()
5025
 
5026
  def write(self, oprot):
5027
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
5028
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
5029
      return
5030
    oprot.writeStructBegin('fulfillPOForExtBilling_result')
5031
    oprot.writeFieldStop()
5032
    oprot.writeStructEnd()
5033
 
5034
  def validate(self):
5035
    return
5036
 
5037
 
5038
  def __repr__(self):
5039
    L = ['%s=%r' % (key, value)
5040
      for key, value in self.__dict__.iteritems()]
5041
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
5042
 
5043
  def __eq__(self, other):
5044
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
5045
 
5046
  def __ne__(self, other):
5047
    return not (self == other)
7410 amar.kumar 5048
 
5049
class closePO_args:
5050
  """
5051
  Attributes:
5052
   - poId
5053
  """
5054
 
5055
  thrift_spec = (
5056
    None, # 0
5057
    (1, TType.I64, 'poId', None, None, ), # 1
5058
  )
5059
 
5060
  def __init__(self, poId=None,):
5061
    self.poId = poId
5062
 
5063
  def read(self, iprot):
5064
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
5065
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
5066
      return
5067
    iprot.readStructBegin()
5068
    while True:
5069
      (fname, ftype, fid) = iprot.readFieldBegin()
5070
      if ftype == TType.STOP:
5071
        break
5072
      if fid == 1:
5073
        if ftype == TType.I64:
5074
          self.poId = iprot.readI64();
5075
        else:
5076
          iprot.skip(ftype)
5077
      else:
5078
        iprot.skip(ftype)
5079
      iprot.readFieldEnd()
5080
    iprot.readStructEnd()
5081
 
5082
  def write(self, oprot):
5083
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
5084
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
5085
      return
5086
    oprot.writeStructBegin('closePO_args')
5087
    if self.poId is not None:
5088
      oprot.writeFieldBegin('poId', TType.I64, 1)
5089
      oprot.writeI64(self.poId)
5090
      oprot.writeFieldEnd()
5091
    oprot.writeFieldStop()
5092
    oprot.writeStructEnd()
5093
 
5094
  def validate(self):
5095
    return
5096
 
5097
 
5098
  def __repr__(self):
5099
    L = ['%s=%r' % (key, value)
5100
      for key, value in self.__dict__.iteritems()]
5101
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
5102
 
5103
  def __eq__(self, other):
5104
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
5105
 
5106
  def __ne__(self, other):
5107
    return not (self == other)
5108
 
5109
class closePO_result:
5110
  """
5111
  Attributes:
5112
   - e
5113
  """
5114
 
5115
  thrift_spec = (
5116
    None, # 0
5117
    (1, TType.STRUCT, 'e', (PurchaseServiceException, PurchaseServiceException.thrift_spec), None, ), # 1
5118
  )
5119
 
5120
  def __init__(self, e=None,):
5121
    self.e = e
5122
 
5123
  def read(self, iprot):
5124
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
5125
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
5126
      return
5127
    iprot.readStructBegin()
5128
    while True:
5129
      (fname, ftype, fid) = iprot.readFieldBegin()
5130
      if ftype == TType.STOP:
5131
        break
5132
      if fid == 1:
5133
        if ftype == TType.STRUCT:
5134
          self.e = PurchaseServiceException()
5135
          self.e.read(iprot)
5136
        else:
5137
          iprot.skip(ftype)
5138
      else:
5139
        iprot.skip(ftype)
5140
      iprot.readFieldEnd()
5141
    iprot.readStructEnd()
5142
 
5143
  def write(self, oprot):
5144
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
5145
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
5146
      return
5147
    oprot.writeStructBegin('closePO_result')
5148
    if self.e is not None:
5149
      oprot.writeFieldBegin('e', TType.STRUCT, 1)
5150
      self.e.write(oprot)
5151
      oprot.writeFieldEnd()
5152
    oprot.writeFieldStop()
5153
    oprot.writeStructEnd()
5154
 
5155
  def validate(self):
5156
    return
5157
 
5158
 
5159
  def __repr__(self):
5160
    L = ['%s=%r' % (key, value)
5161
      for key, value in self.__dict__.iteritems()]
5162
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
5163
 
5164
  def __eq__(self, other):
5165
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
5166
 
5167
  def __ne__(self, other):
5168
    return not (self == other)
5169
 
5170
class isInvoiceReceived_args:
5171
  """
5172
  Attributes:
5173
   - invoiceNumber
5174
   - supplierId
5175
  """
5176
 
5177
  thrift_spec = (
5178
    None, # 0
5179
    (1, TType.STRING, 'invoiceNumber', None, None, ), # 1
5180
    (2, TType.I64, 'supplierId', None, None, ), # 2
5181
  )
5182
 
5183
  def __init__(self, invoiceNumber=None, supplierId=None,):
5184
    self.invoiceNumber = invoiceNumber
5185
    self.supplierId = supplierId
5186
 
5187
  def read(self, iprot):
5188
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
5189
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
5190
      return
5191
    iprot.readStructBegin()
5192
    while True:
5193
      (fname, ftype, fid) = iprot.readFieldBegin()
5194
      if ftype == TType.STOP:
5195
        break
5196
      if fid == 1:
5197
        if ftype == TType.STRING:
5198
          self.invoiceNumber = iprot.readString();
5199
        else:
5200
          iprot.skip(ftype)
5201
      elif fid == 2:
5202
        if ftype == TType.I64:
5203
          self.supplierId = iprot.readI64();
5204
        else:
5205
          iprot.skip(ftype)
5206
      else:
5207
        iprot.skip(ftype)
5208
      iprot.readFieldEnd()
5209
    iprot.readStructEnd()
5210
 
5211
  def write(self, oprot):
5212
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
5213
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
5214
      return
5215
    oprot.writeStructBegin('isInvoiceReceived_args')
5216
    if self.invoiceNumber is not None:
5217
      oprot.writeFieldBegin('invoiceNumber', TType.STRING, 1)
5218
      oprot.writeString(self.invoiceNumber)
5219
      oprot.writeFieldEnd()
5220
    if self.supplierId is not None:
5221
      oprot.writeFieldBegin('supplierId', TType.I64, 2)
5222
      oprot.writeI64(self.supplierId)
5223
      oprot.writeFieldEnd()
5224
    oprot.writeFieldStop()
5225
    oprot.writeStructEnd()
5226
 
5227
  def validate(self):
5228
    return
5229
 
5230
 
5231
  def __repr__(self):
5232
    L = ['%s=%r' % (key, value)
5233
      for key, value in self.__dict__.iteritems()]
5234
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
5235
 
5236
  def __eq__(self, other):
5237
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
5238
 
5239
  def __ne__(self, other):
5240
    return not (self == other)
5241
 
5242
class isInvoiceReceived_result:
5243
  """
5244
  Attributes:
5245
   - success
5246
  """
5247
 
5248
  thrift_spec = (
5249
    (0, TType.BOOL, 'success', None, None, ), # 0
5250
  )
5251
 
5252
  def __init__(self, success=None,):
5253
    self.success = success
5254
 
5255
  def read(self, iprot):
5256
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
5257
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
5258
      return
5259
    iprot.readStructBegin()
5260
    while True:
5261
      (fname, ftype, fid) = iprot.readFieldBegin()
5262
      if ftype == TType.STOP:
5263
        break
5264
      if fid == 0:
5265
        if ftype == TType.BOOL:
5266
          self.success = iprot.readBool();
5267
        else:
5268
          iprot.skip(ftype)
5269
      else:
5270
        iprot.skip(ftype)
5271
      iprot.readFieldEnd()
5272
    iprot.readStructEnd()
5273
 
5274
  def write(self, oprot):
5275
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
5276
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
5277
      return
5278
    oprot.writeStructBegin('isInvoiceReceived_result')
5279
    if self.success is not None:
5280
      oprot.writeFieldBegin('success', TType.BOOL, 0)
5281
      oprot.writeBool(self.success)
5282
      oprot.writeFieldEnd()
5283
    oprot.writeFieldStop()
5284
    oprot.writeStructEnd()
5285
 
5286
  def validate(self):
5287
    return
5288
 
5289
 
5290
  def __repr__(self):
5291
    L = ['%s=%r' % (key, value)
5292
      for key, value in self.__dict__.iteritems()]
5293
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
5294
 
5295
  def __eq__(self, other):
5296
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
5297
 
5298
  def __ne__(self, other):
5299
    return not (self == other)
9829 amar.kumar 5300
 
5301
class changeWarehouseForPO_args:
5302
  """
5303
  Attributes:
5304
   - id
5305
   - warehouseId
5306
  """
5307
 
5308
  thrift_spec = (
5309
    None, # 0
5310
    (1, TType.I64, 'id', None, None, ), # 1
5311
    (2, TType.I64, 'warehouseId', None, None, ), # 2
5312
  )
5313
 
5314
  def __init__(self, id=None, warehouseId=None,):
5315
    self.id = id
5316
    self.warehouseId = warehouseId
5317
 
5318
  def read(self, iprot):
5319
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
5320
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
5321
      return
5322
    iprot.readStructBegin()
5323
    while True:
5324
      (fname, ftype, fid) = iprot.readFieldBegin()
5325
      if ftype == TType.STOP:
5326
        break
5327
      if fid == 1:
5328
        if ftype == TType.I64:
5329
          self.id = iprot.readI64();
5330
        else:
5331
          iprot.skip(ftype)
5332
      elif fid == 2:
5333
        if ftype == TType.I64:
5334
          self.warehouseId = iprot.readI64();
5335
        else:
5336
          iprot.skip(ftype)
5337
      else:
5338
        iprot.skip(ftype)
5339
      iprot.readFieldEnd()
5340
    iprot.readStructEnd()
5341
 
5342
  def write(self, oprot):
5343
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
5344
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
5345
      return
5346
    oprot.writeStructBegin('changeWarehouseForPO_args')
5347
    if self.id is not None:
5348
      oprot.writeFieldBegin('id', TType.I64, 1)
5349
      oprot.writeI64(self.id)
5350
      oprot.writeFieldEnd()
5351
    if self.warehouseId is not None:
5352
      oprot.writeFieldBegin('warehouseId', TType.I64, 2)
5353
      oprot.writeI64(self.warehouseId)
5354
      oprot.writeFieldEnd()
5355
    oprot.writeFieldStop()
5356
    oprot.writeStructEnd()
5357
 
5358
  def validate(self):
5359
    return
5360
 
5361
 
5362
  def __repr__(self):
5363
    L = ['%s=%r' % (key, value)
5364
      for key, value in self.__dict__.iteritems()]
5365
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
5366
 
5367
  def __eq__(self, other):
5368
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
5369
 
5370
  def __ne__(self, other):
5371
    return not (self == other)
5372
 
5373
class changeWarehouseForPO_result:
5374
  """
5375
  Attributes:
5376
   - e
5377
  """
5378
 
5379
  thrift_spec = (
5380
    None, # 0
5381
    (1, TType.STRUCT, 'e', (PurchaseServiceException, PurchaseServiceException.thrift_spec), None, ), # 1
5382
  )
5383
 
5384
  def __init__(self, e=None,):
5385
    self.e = e
5386
 
5387
  def read(self, iprot):
5388
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
5389
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
5390
      return
5391
    iprot.readStructBegin()
5392
    while True:
5393
      (fname, ftype, fid) = iprot.readFieldBegin()
5394
      if ftype == TType.STOP:
5395
        break
5396
      if fid == 1:
5397
        if ftype == TType.STRUCT:
5398
          self.e = PurchaseServiceException()
5399
          self.e.read(iprot)
5400
        else:
5401
          iprot.skip(ftype)
5402
      else:
5403
        iprot.skip(ftype)
5404
      iprot.readFieldEnd()
5405
    iprot.readStructEnd()
5406
 
5407
  def write(self, oprot):
5408
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
5409
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
5410
      return
5411
    oprot.writeStructBegin('changeWarehouseForPO_result')
5412
    if self.e is not None:
5413
      oprot.writeFieldBegin('e', TType.STRUCT, 1)
5414
      self.e.write(oprot)
5415
      oprot.writeFieldEnd()
5416
    oprot.writeFieldStop()
5417
    oprot.writeStructEnd()
5418
 
5419
  def validate(self):
5420
    return
5421
 
5422
 
5423
  def __repr__(self):
5424
    L = ['%s=%r' % (key, value)
5425
      for key, value in self.__dict__.iteritems()]
5426
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
5427
 
5428
  def __eq__(self, other):
5429
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
5430
 
5431
  def __ne__(self, other):
5432
    return not (self == other)
9925 amar.kumar 5433
 
5434
class changePOStatus_args:
5435
  """
5436
  Attributes:
5437
   - id
5438
   - poStatus
5439
  """
5440
 
5441
  thrift_spec = (
5442
    None, # 0
5443
    (1, TType.I64, 'id', None, None, ), # 1
5444
    (2, TType.I32, 'poStatus', None, None, ), # 2
5445
  )
5446
 
5447
  def __init__(self, id=None, poStatus=None,):
5448
    self.id = id
5449
    self.poStatus = poStatus
5450
 
5451
  def read(self, iprot):
5452
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
5453
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
5454
      return
5455
    iprot.readStructBegin()
5456
    while True:
5457
      (fname, ftype, fid) = iprot.readFieldBegin()
5458
      if ftype == TType.STOP:
5459
        break
5460
      if fid == 1:
5461
        if ftype == TType.I64:
5462
          self.id = iprot.readI64();
5463
        else:
5464
          iprot.skip(ftype)
5465
      elif fid == 2:
5466
        if ftype == TType.I32:
5467
          self.poStatus = iprot.readI32();
5468
        else:
5469
          iprot.skip(ftype)
5470
      else:
5471
        iprot.skip(ftype)
5472
      iprot.readFieldEnd()
5473
    iprot.readStructEnd()
5474
 
5475
  def write(self, oprot):
5476
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
5477
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
5478
      return
5479
    oprot.writeStructBegin('changePOStatus_args')
5480
    if self.id is not None:
5481
      oprot.writeFieldBegin('id', TType.I64, 1)
5482
      oprot.writeI64(self.id)
5483
      oprot.writeFieldEnd()
5484
    if self.poStatus is not None:
5485
      oprot.writeFieldBegin('poStatus', TType.I32, 2)
5486
      oprot.writeI32(self.poStatus)
5487
      oprot.writeFieldEnd()
5488
    oprot.writeFieldStop()
5489
    oprot.writeStructEnd()
5490
 
5491
  def validate(self):
5492
    return
5493
 
5494
 
5495
  def __repr__(self):
5496
    L = ['%s=%r' % (key, value)
5497
      for key, value in self.__dict__.iteritems()]
5498
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
5499
 
5500
  def __eq__(self, other):
5501
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
5502
 
5503
  def __ne__(self, other):
5504
    return not (self == other)
5505
 
5506
class changePOStatus_result:
5507
  """
5508
  Attributes:
5509
   - e
5510
  """
5511
 
5512
  thrift_spec = (
5513
    None, # 0
5514
    (1, TType.STRUCT, 'e', (PurchaseServiceException, PurchaseServiceException.thrift_spec), None, ), # 1
5515
  )
5516
 
5517
  def __init__(self, e=None,):
5518
    self.e = e
5519
 
5520
  def read(self, iprot):
5521
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
5522
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
5523
      return
5524
    iprot.readStructBegin()
5525
    while True:
5526
      (fname, ftype, fid) = iprot.readFieldBegin()
5527
      if ftype == TType.STOP:
5528
        break
5529
      if fid == 1:
5530
        if ftype == TType.STRUCT:
5531
          self.e = PurchaseServiceException()
5532
          self.e.read(iprot)
5533
        else:
5534
          iprot.skip(ftype)
5535
      else:
5536
        iprot.skip(ftype)
5537
      iprot.readFieldEnd()
5538
    iprot.readStructEnd()
5539
 
5540
  def write(self, oprot):
5541
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
5542
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
5543
      return
5544
    oprot.writeStructBegin('changePOStatus_result')
5545
    if self.e is not None:
5546
      oprot.writeFieldBegin('e', TType.STRUCT, 1)
5547
      self.e.write(oprot)
5548
      oprot.writeFieldEnd()
5549
    oprot.writeFieldStop()
5550
    oprot.writeStructEnd()
5551
 
5552
  def validate(self):
5553
    return
5554
 
5555
 
5556
  def __repr__(self):
5557
    L = ['%s=%r' % (key, value)
5558
      for key, value in self.__dict__.iteritems()]
5559
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
5560
 
5561
  def __eq__(self, other):
5562
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
5563
 
5564
  def __ne__(self, other):
5565
    return not (self == other)
11751 manish.sha 5566
 
5567
class getPurchaseReturn_args:
5568
  """
5569
  Attributes:
5570
   - id
5571
  """
5572
 
5573
  thrift_spec = (
5574
    None, # 0
5575
    (1, TType.I64, 'id', None, None, ), # 1
5576
  )
5577
 
5578
  def __init__(self, id=None,):
5579
    self.id = id
5580
 
5581
  def read(self, iprot):
5582
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
5583
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
5584
      return
5585
    iprot.readStructBegin()
5586
    while True:
5587
      (fname, ftype, fid) = iprot.readFieldBegin()
5588
      if ftype == TType.STOP:
5589
        break
5590
      if fid == 1:
5591
        if ftype == TType.I64:
5592
          self.id = iprot.readI64();
5593
        else:
5594
          iprot.skip(ftype)
5595
      else:
5596
        iprot.skip(ftype)
5597
      iprot.readFieldEnd()
5598
    iprot.readStructEnd()
5599
 
5600
  def write(self, oprot):
5601
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
5602
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
5603
      return
5604
    oprot.writeStructBegin('getPurchaseReturn_args')
5605
    if self.id is not None:
5606
      oprot.writeFieldBegin('id', TType.I64, 1)
5607
      oprot.writeI64(self.id)
5608
      oprot.writeFieldEnd()
5609
    oprot.writeFieldStop()
5610
    oprot.writeStructEnd()
5611
 
5612
  def validate(self):
5613
    return
5614
 
5615
 
5616
  def __repr__(self):
5617
    L = ['%s=%r' % (key, value)
5618
      for key, value in self.__dict__.iteritems()]
5619
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
5620
 
5621
  def __eq__(self, other):
5622
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
5623
 
5624
  def __ne__(self, other):
5625
    return not (self == other)
5626
 
5627
class getPurchaseReturn_result:
5628
  """
5629
  Attributes:
5630
   - success
5631
   - e
5632
  """
5633
 
5634
  thrift_spec = (
5635
    (0, TType.STRUCT, 'success', (PurchaseReturn, PurchaseReturn.thrift_spec), None, ), # 0
5636
    (1, TType.STRUCT, 'e', (PurchaseServiceException, PurchaseServiceException.thrift_spec), None, ), # 1
5637
  )
5638
 
5639
  def __init__(self, success=None, e=None,):
5640
    self.success = success
5641
    self.e = e
5642
 
5643
  def read(self, iprot):
5644
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
5645
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
5646
      return
5647
    iprot.readStructBegin()
5648
    while True:
5649
      (fname, ftype, fid) = iprot.readFieldBegin()
5650
      if ftype == TType.STOP:
5651
        break
5652
      if fid == 0:
5653
        if ftype == TType.STRUCT:
5654
          self.success = PurchaseReturn()
5655
          self.success.read(iprot)
5656
        else:
5657
          iprot.skip(ftype)
5658
      elif fid == 1:
5659
        if ftype == TType.STRUCT:
5660
          self.e = PurchaseServiceException()
5661
          self.e.read(iprot)
5662
        else:
5663
          iprot.skip(ftype)
5664
      else:
5665
        iprot.skip(ftype)
5666
      iprot.readFieldEnd()
5667
    iprot.readStructEnd()
5668
 
5669
  def write(self, oprot):
5670
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
5671
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
5672
      return
5673
    oprot.writeStructBegin('getPurchaseReturn_result')
5674
    if self.success is not None:
5675
      oprot.writeFieldBegin('success', TType.STRUCT, 0)
5676
      self.success.write(oprot)
5677
      oprot.writeFieldEnd()
5678
    if self.e is not None:
5679
      oprot.writeFieldBegin('e', TType.STRUCT, 1)
5680
      self.e.write(oprot)
5681
      oprot.writeFieldEnd()
5682
    oprot.writeFieldStop()
5683
    oprot.writeStructEnd()
5684
 
5685
  def validate(self):
5686
    return
5687
 
5688
 
5689
  def __repr__(self):
5690
    L = ['%s=%r' % (key, value)
5691
      for key, value in self.__dict__.iteritems()]
5692
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
5693
 
5694
  def __eq__(self, other):
5695
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
5696
 
5697
  def __ne__(self, other):
5698
    return not (self == other)