Subversion Repositories SmartDukaan

Rev

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

Rev 7363 Rev 7370
Line 1663... Line 1663...
1663
    Parameters:
1663
    Parameters:
1664
     - orderId
1664
     - orderId
1665
    """
1665
    """
1666
    pass
1666
    pass
1667
 
1667
 
-
 
1668
  def addFrc(self, circleId, operatorId, denomination, maxDiscount):
-
 
1669
    """
-
 
1670
    Parameters:
-
 
1671
     - circleId
-
 
1672
     - operatorId
-
 
1673
     - denomination
-
 
1674
     - maxDiscount
-
 
1675
    """
-
 
1676
    pass
-
 
1677
 
1668
 
1678
 
1669
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
1679
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
1670
  def __init__(self, iprot, oprot=None):
1680
  def __init__(self, iprot, oprot=None):
1671
    shop2020.thriftpy.generic.GenericService.Client.__init__(self, iprot, oprot)
1681
    shop2020.thriftpy.generic.GenericService.Client.__init__(self, iprot, oprot)
1672
 
1682
 
Line 7675... Line 7685...
7675
    self._iprot.readMessageEnd()
7685
    self._iprot.readMessageEnd()
7676
    if result.success is not None:
7686
    if result.success is not None:
7677
      return result.success
7687
      return result.success
7678
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getStoreOrderAdvanceInvoice failed: unknown result");
7688
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getStoreOrderAdvanceInvoice failed: unknown result");
7679
 
7689
 
-
 
7690
  def addFrc(self, circleId, operatorId, denomination, maxDiscount):
-
 
7691
    """
-
 
7692
    Parameters:
-
 
7693
     - circleId
-
 
7694
     - operatorId
-
 
7695
     - denomination
-
 
7696
     - maxDiscount
-
 
7697
    """
-
 
7698
    self.send_addFrc(circleId, operatorId, denomination, maxDiscount)
-
 
7699
    return self.recv_addFrc()
-
 
7700
 
-
 
7701
  def send_addFrc(self, circleId, operatorId, denomination, maxDiscount):
-
 
7702
    self._oprot.writeMessageBegin('addFrc', TMessageType.CALL, self._seqid)
-
 
7703
    args = addFrc_args()
-
 
7704
    args.circleId = circleId
-
 
7705
    args.operatorId = operatorId
-
 
7706
    args.denomination = denomination
-
 
7707
    args.maxDiscount = maxDiscount
-
 
7708
    args.write(self._oprot)
-
 
7709
    self._oprot.writeMessageEnd()
-
 
7710
    self._oprot.trans.flush()
-
 
7711
 
-
 
7712
  def recv_addFrc(self, ):
-
 
7713
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
-
 
7714
    if mtype == TMessageType.EXCEPTION:
-
 
7715
      x = TApplicationException()
-
 
7716
      x.read(self._iprot)
-
 
7717
      self._iprot.readMessageEnd()
-
 
7718
      raise x
-
 
7719
    result = addFrc_result()
-
 
7720
    result.read(self._iprot)
-
 
7721
    self._iprot.readMessageEnd()
-
 
7722
    if result.success is not None:
-
 
7723
      return result.success
-
 
7724
    raise TApplicationException(TApplicationException.MISSING_RESULT, "addFrc failed: unknown result");
-
 
7725
 
7680
 
7726
 
7681
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
7727
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
7682
  def __init__(self, handler):
7728
  def __init__(self, handler):
7683
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
7729
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
7684
    self._processMap["createTransaction"] = Processor.process_createTransaction
7730
    self._processMap["createTransaction"] = Processor.process_createTransaction
Line 7856... Line 7902...
7856
    self._processMap["getAmazonOrdersShipped"] = Processor.process_getAmazonOrdersShipped
7902
    self._processMap["getAmazonOrdersShipped"] = Processor.process_getAmazonOrdersShipped
7857
    self._processMap["getAmazonOrdersCancelled"] = Processor.process_getAmazonOrdersCancelled
7903
    self._processMap["getAmazonOrdersCancelled"] = Processor.process_getAmazonOrdersCancelled
7858
    self._processMap["getAmazonOrder"] = Processor.process_getAmazonOrder
7904
    self._processMap["getAmazonOrder"] = Processor.process_getAmazonOrder
7859
    self._processMap["getOrdersForStore"] = Processor.process_getOrdersForStore
7905
    self._processMap["getOrdersForStore"] = Processor.process_getOrdersForStore
7860
    self._processMap["getStoreOrderAdvanceInvoice"] = Processor.process_getStoreOrderAdvanceInvoice
7906
    self._processMap["getStoreOrderAdvanceInvoice"] = Processor.process_getStoreOrderAdvanceInvoice
-
 
7907
    self._processMap["addFrc"] = Processor.process_addFrc
7861
 
7908
 
7862
  def process(self, iprot, oprot):
7909
  def process(self, iprot, oprot):
7863
    (name, type, seqid) = iprot.readMessageBegin()
7910
    (name, type, seqid) = iprot.readMessageBegin()
7864
    if name not in self._processMap:
7911
    if name not in self._processMap:
7865
      iprot.skip(TType.STRUCT)
7912
      iprot.skip(TType.STRUCT)
Line 10113... Line 10160...
10113
    oprot.writeMessageBegin("getStoreOrderAdvanceInvoice", TMessageType.REPLY, seqid)
10160
    oprot.writeMessageBegin("getStoreOrderAdvanceInvoice", TMessageType.REPLY, seqid)
10114
    result.write(oprot)
10161
    result.write(oprot)
10115
    oprot.writeMessageEnd()
10162
    oprot.writeMessageEnd()
10116
    oprot.trans.flush()
10163
    oprot.trans.flush()
10117
 
10164
 
-
 
10165
  def process_addFrc(self, seqid, iprot, oprot):
-
 
10166
    args = addFrc_args()
-
 
10167
    args.read(iprot)
-
 
10168
    iprot.readMessageEnd()
-
 
10169
    result = addFrc_result()
-
 
10170
    result.success = self._handler.addFrc(args.circleId, args.operatorId, args.denomination, args.maxDiscount)
-
 
10171
    oprot.writeMessageBegin("addFrc", TMessageType.REPLY, seqid)
-
 
10172
    result.write(oprot)
-
 
10173
    oprot.writeMessageEnd()
-
 
10174
    oprot.trans.flush()
-
 
10175
 
10118
 
10176
 
10119
# HELPER FUNCTIONS AND STRUCTURES
10177
# HELPER FUNCTIONS AND STRUCTURES
10120
 
10178
 
10121
class createTransaction_args:
10179
class createTransaction_args:
10122
  """
10180
  """
Line 34758... Line 34816...
34758
      oprot.writeFieldEnd()
34816
      oprot.writeFieldEnd()
34759
    oprot.writeFieldStop()
34817
    oprot.writeFieldStop()
34760
    oprot.writeStructEnd()
34818
    oprot.writeStructEnd()
34761
 
34819
 
34762
  def validate(self):
34820
  def validate(self):
-
 
34821
    return
-
 
34822
 
-
 
34823
 
-
 
34824
  def __repr__(self):
-
 
34825
    L = ['%s=%r' % (key, value)
-
 
34826
      for key, value in self.__dict__.iteritems()]
-
 
34827
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
34828
 
-
 
34829
  def __eq__(self, other):
-
 
34830
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
34831
 
-
 
34832
  def __ne__(self, other):
-
 
34833
    return not (self == other)
-
 
34834
 
-
 
34835
class addFrc_args:
-
 
34836
  """
-
 
34837
  Attributes:
-
 
34838
   - circleId
-
 
34839
   - operatorId
-
 
34840
   - denomination
-
 
34841
   - maxDiscount
-
 
34842
  """
-
 
34843
 
-
 
34844
  thrift_spec = (
-
 
34845
    None, # 0
-
 
34846
    (1, TType.I64, 'circleId', None, None, ), # 1
-
 
34847
    (2, TType.I64, 'operatorId', None, None, ), # 2
-
 
34848
    (3, TType.I64, 'denomination', None, None, ), # 3
-
 
34849
    (4, TType.I64, 'maxDiscount', None, None, ), # 4
-
 
34850
  )
-
 
34851
 
-
 
34852
  def __init__(self, circleId=None, operatorId=None, denomination=None, maxDiscount=None,):
-
 
34853
    self.circleId = circleId
-
 
34854
    self.operatorId = operatorId
-
 
34855
    self.denomination = denomination
-
 
34856
    self.maxDiscount = maxDiscount
-
 
34857
 
-
 
34858
  def read(self, iprot):
-
 
34859
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
34860
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
34861
      return
-
 
34862
    iprot.readStructBegin()
-
 
34863
    while True:
-
 
34864
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
34865
      if ftype == TType.STOP:
-
 
34866
        break
-
 
34867
      if fid == 1:
-
 
34868
        if ftype == TType.I64:
-
 
34869
          self.circleId = iprot.readI64();
-
 
34870
        else:
-
 
34871
          iprot.skip(ftype)
-
 
34872
      elif fid == 2:
-
 
34873
        if ftype == TType.I64:
-
 
34874
          self.operatorId = iprot.readI64();
-
 
34875
        else:
-
 
34876
          iprot.skip(ftype)
-
 
34877
      elif fid == 3:
-
 
34878
        if ftype == TType.I64:
-
 
34879
          self.denomination = iprot.readI64();
-
 
34880
        else:
-
 
34881
          iprot.skip(ftype)
-
 
34882
      elif fid == 4:
-
 
34883
        if ftype == TType.I64:
-
 
34884
          self.maxDiscount = iprot.readI64();
-
 
34885
        else:
-
 
34886
          iprot.skip(ftype)
-
 
34887
      else:
-
 
34888
        iprot.skip(ftype)
-
 
34889
      iprot.readFieldEnd()
-
 
34890
    iprot.readStructEnd()
-
 
34891
 
-
 
34892
  def write(self, oprot):
-
 
34893
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
34894
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
34895
      return
-
 
34896
    oprot.writeStructBegin('addFrc_args')
-
 
34897
    if self.circleId is not None:
-
 
34898
      oprot.writeFieldBegin('circleId', TType.I64, 1)
-
 
34899
      oprot.writeI64(self.circleId)
-
 
34900
      oprot.writeFieldEnd()
-
 
34901
    if self.operatorId is not None:
-
 
34902
      oprot.writeFieldBegin('operatorId', TType.I64, 2)
-
 
34903
      oprot.writeI64(self.operatorId)
-
 
34904
      oprot.writeFieldEnd()
-
 
34905
    if self.denomination is not None:
-
 
34906
      oprot.writeFieldBegin('denomination', TType.I64, 3)
-
 
34907
      oprot.writeI64(self.denomination)
-
 
34908
      oprot.writeFieldEnd()
-
 
34909
    if self.maxDiscount is not None:
-
 
34910
      oprot.writeFieldBegin('maxDiscount', TType.I64, 4)
-
 
34911
      oprot.writeI64(self.maxDiscount)
-
 
34912
      oprot.writeFieldEnd()
-
 
34913
    oprot.writeFieldStop()
-
 
34914
    oprot.writeStructEnd()
-
 
34915
 
-
 
34916
  def validate(self):
-
 
34917
    return
-
 
34918
 
-
 
34919
 
-
 
34920
  def __repr__(self):
-
 
34921
    L = ['%s=%r' % (key, value)
-
 
34922
      for key, value in self.__dict__.iteritems()]
-
 
34923
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
34924
 
-
 
34925
  def __eq__(self, other):
-
 
34926
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
34927
 
-
 
34928
  def __ne__(self, other):
-
 
34929
    return not (self == other)
-
 
34930
 
-
 
34931
class addFrc_result:
-
 
34932
  """
-
 
34933
  Attributes:
-
 
34934
   - success
-
 
34935
  """
-
 
34936
 
-
 
34937
  thrift_spec = (
-
 
34938
    (0, TType.BOOL, 'success', None, None, ), # 0
-
 
34939
  )
-
 
34940
 
-
 
34941
  def __init__(self, success=None,):
-
 
34942
    self.success = success
-
 
34943
 
-
 
34944
  def read(self, iprot):
-
 
34945
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
34946
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
34947
      return
-
 
34948
    iprot.readStructBegin()
-
 
34949
    while True:
-
 
34950
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
34951
      if ftype == TType.STOP:
-
 
34952
        break
-
 
34953
      if fid == 0:
-
 
34954
        if ftype == TType.BOOL:
-
 
34955
          self.success = iprot.readBool();
-
 
34956
        else:
-
 
34957
          iprot.skip(ftype)
-
 
34958
      else:
-
 
34959
        iprot.skip(ftype)
-
 
34960
      iprot.readFieldEnd()
-
 
34961
    iprot.readStructEnd()
-
 
34962
 
-
 
34963
  def write(self, oprot):
-
 
34964
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
34965
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
34966
      return
-
 
34967
    oprot.writeStructBegin('addFrc_result')
-
 
34968
    if self.success is not None:
-
 
34969
      oprot.writeFieldBegin('success', TType.BOOL, 0)
-
 
34970
      oprot.writeBool(self.success)
-
 
34971
      oprot.writeFieldEnd()
-
 
34972
    oprot.writeFieldStop()
-
 
34973
    oprot.writeStructEnd()
-
 
34974
 
-
 
34975
  def validate(self):
34763
    return
34976
    return
34764
 
34977
 
34765
 
34978
 
34766
  def __repr__(self):
34979
  def __repr__(self):
34767
    L = ['%s=%r' % (key, value)
34980
    L = ['%s=%r' % (key, value)