Subversion Repositories SmartDukaan

Rev

Rev 2832 | Rev 3383 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2832 Rev 3376
Line 3... Line 3...
3
#
3
#
4
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
4
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
5
#
5
#
6
 
6
 
7
from thrift.Thrift import *
7
from thrift.Thrift import *
-
 
8
import shop2020.thriftpy.generic.GenericService
8
from ttypes import *
9
from ttypes import *
9
from thrift.Thrift import TProcessor
10
from thrift.Thrift import TProcessor
10
from thrift.transport import TTransport
11
from thrift.transport import TTransport
11
from thrift.protocol import TBinaryProtocol
12
from thrift.protocol import TBinaryProtocol
12
try:
13
try:
13
  from thrift.protocol import fastbinary
14
  from thrift.protocol import fastbinary
14
except:
15
except:
15
  fastbinary = None
16
  fastbinary = None
16
 
17
 
17
 
18
 
18
class Iface:
19
class Iface(shop2020.thriftpy.generic.GenericService.Iface):
19
  def createPurchaseOrder(self, purchaseOrder):
20
  def createPurchaseOrder(self, purchaseOrder):
20
    """
21
    """
21
    Creates a purchase order based on the data in the given purchase order object.
22
    Creates a purchase order based on the data in the given purchase order object.
22
    This method populates a nummber of missing fields
23
    This method populates a nummber of missing fields
23
    
24
    
Line 95... Line 96...
95
     - type
96
     - type
96
    """
97
    """
97
    pass
98
    pass
98
 
99
 
99
 
100
 
100
class Client(Iface):
101
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
101
  def __init__(self, iprot, oprot=None):
102
  def __init__(self, iprot, oprot=None):
102
    self._iprot = self._oprot = iprot
103
    shop2020.thriftpy.generic.GenericService.Client.__init__(self, iprot, oprot)
103
    if oprot != None:
-
 
104
      self._oprot = oprot
-
 
105
    self._seqid = 0
-
 
106
 
104
 
107
  def createPurchaseOrder(self, purchaseOrder):
105
  def createPurchaseOrder(self, purchaseOrder):
108
    """
106
    """
109
    Creates a purchase order based on the data in the given purchase order object.
107
    Creates a purchase order based on the data in the given purchase order object.
110
    This method populates a nummber of missing fields
108
    This method populates a nummber of missing fields
Line 362... Line 360...
362
    if result.wex != None:
360
    if result.wex != None:
363
      raise result.wex
361
      raise result.wex
364
    return
362
    return
365
 
363
 
366
 
364
 
367
class Processor(Iface, TProcessor):
365
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
368
  def __init__(self, handler):
366
  def __init__(self, handler):
369
    self._handler = handler
367
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
370
    self._processMap = {}
-
 
371
    self._processMap["createPurchaseOrder"] = Processor.process_createPurchaseOrder
368
    self._processMap["createPurchaseOrder"] = Processor.process_createPurchaseOrder
372
    self._processMap["getPurchaseOrder"] = Processor.process_getPurchaseOrder
369
    self._processMap["getPurchaseOrder"] = Processor.process_getPurchaseOrder
373
    self._processMap["getSupplier"] = Processor.process_getSupplier
370
    self._processMap["getSupplier"] = Processor.process_getSupplier
374
    self._processMap["startPurchase"] = Processor.process_startPurchase
371
    self._processMap["startPurchase"] = Processor.process_startPurchase
375
    self._processMap["closePurchase"] = Processor.process_closePurchase
372
    self._processMap["closePurchase"] = Processor.process_closePurchase