Subversion Repositories SmartDukaan

Rev

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