Subversion Repositories SmartDukaan

Rev

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