Subversion Repositories SmartDukaan

Rev

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