Subversion Repositories SmartDukaan

Rev

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