Subversion Repositories SmartDukaan

Rev

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

Rev 7370 Rev 7371
Line 1673... Line 1673...
1673
     - denomination
1673
     - denomination
1674
     - maxDiscount
1674
     - maxDiscount
1675
    """
1675
    """
1676
    pass
1676
    pass
1677
 
1677
 
-
 
1678
  def addSeries(self, circle, operatorId, series):
-
 
1679
    """
-
 
1680
    Parameters:
-
 
1681
     - circle
-
 
1682
     - operatorId
-
 
1683
     - series
-
 
1684
    """
-
 
1685
    pass
-
 
1686
 
1678
 
1687
 
1679
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
1688
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
1680
  def __init__(self, iprot, oprot=None):
1689
  def __init__(self, iprot, oprot=None):
1681
    shop2020.thriftpy.generic.GenericService.Client.__init__(self, iprot, oprot)
1690
    shop2020.thriftpy.generic.GenericService.Client.__init__(self, iprot, oprot)
1682
 
1691
 
Line 7721... Line 7730...
7721
    self._iprot.readMessageEnd()
7730
    self._iprot.readMessageEnd()
7722
    if result.success is not None:
7731
    if result.success is not None:
7723
      return result.success
7732
      return result.success
7724
    raise TApplicationException(TApplicationException.MISSING_RESULT, "addFrc failed: unknown result");
7733
    raise TApplicationException(TApplicationException.MISSING_RESULT, "addFrc failed: unknown result");
7725
 
7734
 
-
 
7735
  def addSeries(self, circle, operatorId, series):
-
 
7736
    """
-
 
7737
    Parameters:
-
 
7738
     - circle
-
 
7739
     - operatorId
-
 
7740
     - series
-
 
7741
    """
-
 
7742
    self.send_addSeries(circle, operatorId, series)
-
 
7743
    return self.recv_addSeries()
-
 
7744
 
-
 
7745
  def send_addSeries(self, circle, operatorId, series):
-
 
7746
    self._oprot.writeMessageBegin('addSeries', TMessageType.CALL, self._seqid)
-
 
7747
    args = addSeries_args()
-
 
7748
    args.circle = circle
-
 
7749
    args.operatorId = operatorId
-
 
7750
    args.series = series
-
 
7751
    args.write(self._oprot)
-
 
7752
    self._oprot.writeMessageEnd()
-
 
7753
    self._oprot.trans.flush()
-
 
7754
 
-
 
7755
  def recv_addSeries(self, ):
-
 
7756
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
-
 
7757
    if mtype == TMessageType.EXCEPTION:
-
 
7758
      x = TApplicationException()
-
 
7759
      x.read(self._iprot)
-
 
7760
      self._iprot.readMessageEnd()
-
 
7761
      raise x
-
 
7762
    result = addSeries_result()
-
 
7763
    result.read(self._iprot)
-
 
7764
    self._iprot.readMessageEnd()
-
 
7765
    if result.success is not None:
-
 
7766
      return result.success
-
 
7767
    raise TApplicationException(TApplicationException.MISSING_RESULT, "addSeries failed: unknown result");
-
 
7768
 
7726
 
7769
 
7727
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
7770
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
7728
  def __init__(self, handler):
7771
  def __init__(self, handler):
7729
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
7772
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
7730
    self._processMap["createTransaction"] = Processor.process_createTransaction
7773
    self._processMap["createTransaction"] = Processor.process_createTransaction
Line 7903... Line 7946...
7903
    self._processMap["getAmazonOrdersCancelled"] = Processor.process_getAmazonOrdersCancelled
7946
    self._processMap["getAmazonOrdersCancelled"] = Processor.process_getAmazonOrdersCancelled
7904
    self._processMap["getAmazonOrder"] = Processor.process_getAmazonOrder
7947
    self._processMap["getAmazonOrder"] = Processor.process_getAmazonOrder
7905
    self._processMap["getOrdersForStore"] = Processor.process_getOrdersForStore
7948
    self._processMap["getOrdersForStore"] = Processor.process_getOrdersForStore
7906
    self._processMap["getStoreOrderAdvanceInvoice"] = Processor.process_getStoreOrderAdvanceInvoice
7949
    self._processMap["getStoreOrderAdvanceInvoice"] = Processor.process_getStoreOrderAdvanceInvoice
7907
    self._processMap["addFrc"] = Processor.process_addFrc
7950
    self._processMap["addFrc"] = Processor.process_addFrc
-
 
7951
    self._processMap["addSeries"] = Processor.process_addSeries
7908
 
7952
 
7909
  def process(self, iprot, oprot):
7953
  def process(self, iprot, oprot):
7910
    (name, type, seqid) = iprot.readMessageBegin()
7954
    (name, type, seqid) = iprot.readMessageBegin()
7911
    if name not in self._processMap:
7955
    if name not in self._processMap:
7912
      iprot.skip(TType.STRUCT)
7956
      iprot.skip(TType.STRUCT)
Line 10171... Line 10215...
10171
    oprot.writeMessageBegin("addFrc", TMessageType.REPLY, seqid)
10215
    oprot.writeMessageBegin("addFrc", TMessageType.REPLY, seqid)
10172
    result.write(oprot)
10216
    result.write(oprot)
10173
    oprot.writeMessageEnd()
10217
    oprot.writeMessageEnd()
10174
    oprot.trans.flush()
10218
    oprot.trans.flush()
10175
 
10219
 
-
 
10220
  def process_addSeries(self, seqid, iprot, oprot):
-
 
10221
    args = addSeries_args()
-
 
10222
    args.read(iprot)
-
 
10223
    iprot.readMessageEnd()
-
 
10224
    result = addSeries_result()
-
 
10225
    result.success = self._handler.addSeries(args.circle, args.operatorId, args.series)
-
 
10226
    oprot.writeMessageBegin("addSeries", TMessageType.REPLY, seqid)
-
 
10227
    result.write(oprot)
-
 
10228
    oprot.writeMessageEnd()
-
 
10229
    oprot.trans.flush()
-
 
10230
 
10176
 
10231
 
10177
# HELPER FUNCTIONS AND STRUCTURES
10232
# HELPER FUNCTIONS AND STRUCTURES
10178
 
10233
 
10179
class createTransaction_args:
10234
class createTransaction_args:
10180
  """
10235
  """
Line 34971... Line 35026...
34971
      oprot.writeFieldEnd()
35026
      oprot.writeFieldEnd()
34972
    oprot.writeFieldStop()
35027
    oprot.writeFieldStop()
34973
    oprot.writeStructEnd()
35028
    oprot.writeStructEnd()
34974
 
35029
 
34975
  def validate(self):
35030
  def validate(self):
-
 
35031
    return
-
 
35032
 
-
 
35033
 
-
 
35034
  def __repr__(self):
-
 
35035
    L = ['%s=%r' % (key, value)
-
 
35036
      for key, value in self.__dict__.iteritems()]
-
 
35037
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
35038
 
-
 
35039
  def __eq__(self, other):
-
 
35040
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
35041
 
-
 
35042
  def __ne__(self, other):
-
 
35043
    return not (self == other)
-
 
35044
 
-
 
35045
class addSeries_args:
-
 
35046
  """
-
 
35047
  Attributes:
-
 
35048
   - circle
-
 
35049
   - operatorId
-
 
35050
   - series
-
 
35051
  """
-
 
35052
 
-
 
35053
  thrift_spec = (
-
 
35054
    None, # 0
-
 
35055
    (1, TType.I64, 'circle', None, None, ), # 1
-
 
35056
    (2, TType.I64, 'operatorId', None, None, ), # 2
-
 
35057
    (3, TType.I64, 'series', None, None, ), # 3
-
 
35058
  )
-
 
35059
 
-
 
35060
  def __init__(self, circle=None, operatorId=None, series=None,):
-
 
35061
    self.circle = circle
-
 
35062
    self.operatorId = operatorId
-
 
35063
    self.series = series
-
 
35064
 
-
 
35065
  def read(self, iprot):
-
 
35066
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
35067
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
35068
      return
-
 
35069
    iprot.readStructBegin()
-
 
35070
    while True:
-
 
35071
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
35072
      if ftype == TType.STOP:
-
 
35073
        break
-
 
35074
      if fid == 1:
-
 
35075
        if ftype == TType.I64:
-
 
35076
          self.circle = iprot.readI64();
-
 
35077
        else:
-
 
35078
          iprot.skip(ftype)
-
 
35079
      elif fid == 2:
-
 
35080
        if ftype == TType.I64:
-
 
35081
          self.operatorId = iprot.readI64();
-
 
35082
        else:
-
 
35083
          iprot.skip(ftype)
-
 
35084
      elif fid == 3:
-
 
35085
        if ftype == TType.I64:
-
 
35086
          self.series = iprot.readI64();
-
 
35087
        else:
-
 
35088
          iprot.skip(ftype)
-
 
35089
      else:
-
 
35090
        iprot.skip(ftype)
-
 
35091
      iprot.readFieldEnd()
-
 
35092
    iprot.readStructEnd()
-
 
35093
 
-
 
35094
  def write(self, oprot):
-
 
35095
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
35096
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
35097
      return
-
 
35098
    oprot.writeStructBegin('addSeries_args')
-
 
35099
    if self.circle is not None:
-
 
35100
      oprot.writeFieldBegin('circle', TType.I64, 1)
-
 
35101
      oprot.writeI64(self.circle)
-
 
35102
      oprot.writeFieldEnd()
-
 
35103
    if self.operatorId is not None:
-
 
35104
      oprot.writeFieldBegin('operatorId', TType.I64, 2)
-
 
35105
      oprot.writeI64(self.operatorId)
-
 
35106
      oprot.writeFieldEnd()
-
 
35107
    if self.series is not None:
-
 
35108
      oprot.writeFieldBegin('series', TType.I64, 3)
-
 
35109
      oprot.writeI64(self.series)
-
 
35110
      oprot.writeFieldEnd()
-
 
35111
    oprot.writeFieldStop()
-
 
35112
    oprot.writeStructEnd()
-
 
35113
 
-
 
35114
  def validate(self):
-
 
35115
    return
-
 
35116
 
-
 
35117
 
-
 
35118
  def __repr__(self):
-
 
35119
    L = ['%s=%r' % (key, value)
-
 
35120
      for key, value in self.__dict__.iteritems()]
-
 
35121
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
35122
 
-
 
35123
  def __eq__(self, other):
-
 
35124
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
35125
 
-
 
35126
  def __ne__(self, other):
-
 
35127
    return not (self == other)
-
 
35128
 
-
 
35129
class addSeries_result:
-
 
35130
  """
-
 
35131
  Attributes:
-
 
35132
   - success
-
 
35133
  """
-
 
35134
 
-
 
35135
  thrift_spec = (
-
 
35136
    (0, TType.STRING, 'success', None, None, ), # 0
-
 
35137
  )
-
 
35138
 
-
 
35139
  def __init__(self, success=None,):
-
 
35140
    self.success = success
-
 
35141
 
-
 
35142
  def read(self, iprot):
-
 
35143
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
35144
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
35145
      return
-
 
35146
    iprot.readStructBegin()
-
 
35147
    while True:
-
 
35148
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
35149
      if ftype == TType.STOP:
-
 
35150
        break
-
 
35151
      if fid == 0:
-
 
35152
        if ftype == TType.STRING:
-
 
35153
          self.success = iprot.readString();
-
 
35154
        else:
-
 
35155
          iprot.skip(ftype)
-
 
35156
      else:
-
 
35157
        iprot.skip(ftype)
-
 
35158
      iprot.readFieldEnd()
-
 
35159
    iprot.readStructEnd()
-
 
35160
 
-
 
35161
  def write(self, oprot):
-
 
35162
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
35163
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
35164
      return
-
 
35165
    oprot.writeStructBegin('addSeries_result')
-
 
35166
    if self.success is not None:
-
 
35167
      oprot.writeFieldBegin('success', TType.STRING, 0)
-
 
35168
      oprot.writeString(self.success)
-
 
35169
      oprot.writeFieldEnd()
-
 
35170
    oprot.writeFieldStop()
-
 
35171
    oprot.writeStructEnd()
-
 
35172
 
-
 
35173
  def validate(self):
34976
    return
35174
    return
34977
 
35175
 
34978
 
35176
 
34979
  def __repr__(self):
35177
  def __repr__(self):
34980
    L = ['%s=%r' % (key, value)
35178
    L = ['%s=%r' % (key, value)