Subversion Repositories SmartDukaan

Rev

Rev 7672 | Rev 9925 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

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