Subversion Repositories SmartDukaan

Rev

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