Subversion Repositories SmartDukaan

Rev

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

Rev 13709 Rev 14182
Line 1312... Line 1312...
1312
    Parameters:
1312
    Parameters:
1313
     - hsItem
1313
     - hsItem
1314
    """
1314
    """
1315
    pass
1315
    pass
1316
 
1316
 
-
 
1317
  def getPricingForDtr(self, catalogItemId):
-
 
1318
    """
-
 
1319
    Parameters:
-
 
1320
     - catalogItemId
-
 
1321
    """
-
 
1322
    pass
-
 
1323
 
1317
 
1324
 
1318
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
1325
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
1319
  def __init__(self, iprot, oprot=None):
1326
  def __init__(self, iprot, oprot=None):
1320
    shop2020.thriftpy.generic.GenericService.Client.__init__(self, iprot, oprot)
1327
    shop2020.thriftpy.generic.GenericService.Client.__init__(self, iprot, oprot)
1321
 
1328
 
Line 6986... Line 6993...
6986
    result = updateHsItem_result()
6993
    result = updateHsItem_result()
6987
    result.read(self._iprot)
6994
    result.read(self._iprot)
6988
    self._iprot.readMessageEnd()
6995
    self._iprot.readMessageEnd()
6989
    return
6996
    return
6990
 
6997
 
-
 
6998
  def getPricingForDtr(self, catalogItemId):
-
 
6999
    """
-
 
7000
    Parameters:
-
 
7001
     - catalogItemId
-
 
7002
    """
-
 
7003
    self.send_getPricingForDtr(catalogItemId)
-
 
7004
    return self.recv_getPricingForDtr()
-
 
7005
 
-
 
7006
  def send_getPricingForDtr(self, catalogItemId):
-
 
7007
    self._oprot.writeMessageBegin('getPricingForDtr', TMessageType.CALL, self._seqid)
-
 
7008
    args = getPricingForDtr_args()
-
 
7009
    args.catalogItemId = catalogItemId
-
 
7010
    args.write(self._oprot)
-
 
7011
    self._oprot.writeMessageEnd()
-
 
7012
    self._oprot.trans.flush()
-
 
7013
 
-
 
7014
  def recv_getPricingForDtr(self, ):
-
 
7015
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
-
 
7016
    if mtype == TMessageType.EXCEPTION:
-
 
7017
      x = TApplicationException()
-
 
7018
      x.read(self._iprot)
-
 
7019
      self._iprot.readMessageEnd()
-
 
7020
      raise x
-
 
7021
    result = getPricingForDtr_result()
-
 
7022
    result.read(self._iprot)
-
 
7023
    self._iprot.readMessageEnd()
-
 
7024
    if result.success is not None:
-
 
7025
      return result.success
-
 
7026
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getPricingForDtr failed: unknown result");
-
 
7027
 
6991
 
7028
 
6992
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
7029
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
6993
  def __init__(self, handler):
7030
  def __init__(self, handler):
6994
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
7031
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
6995
    self._processMap["addItem"] = Processor.process_addItem
7032
    self._processMap["addItem"] = Processor.process_addItem
Line 7176... Line 7213...
7176
    self._processMap["getAllFbgListedItems"] = Processor.process_getAllFbgListedItems
7213
    self._processMap["getAllFbgListedItems"] = Processor.process_getAllFbgListedItems
7177
    self._processMap["checkServices"] = Processor.process_checkServices
7214
    self._processMap["checkServices"] = Processor.process_checkServices
7178
    self._processMap["addHsItem"] = Processor.process_addHsItem
7215
    self._processMap["addHsItem"] = Processor.process_addHsItem
7179
    self._processMap["getHsItem"] = Processor.process_getHsItem
7216
    self._processMap["getHsItem"] = Processor.process_getHsItem
7180
    self._processMap["updateHsItem"] = Processor.process_updateHsItem
7217
    self._processMap["updateHsItem"] = Processor.process_updateHsItem
-
 
7218
    self._processMap["getPricingForDtr"] = Processor.process_getPricingForDtr
7181
 
7219
 
7182
  def process(self, iprot, oprot):
7220
  def process(self, iprot, oprot):
7183
    (name, type, seqid) = iprot.readMessageBegin()
7221
    (name, type, seqid) = iprot.readMessageBegin()
7184
    if name not in self._processMap:
7222
    if name not in self._processMap:
7185
      iprot.skip(TType.STRUCT)
7223
      iprot.skip(TType.STRUCT)
Line 9382... Line 9420...
9382
    oprot.writeMessageBegin("updateHsItem", TMessageType.REPLY, seqid)
9420
    oprot.writeMessageBegin("updateHsItem", TMessageType.REPLY, seqid)
9383
    result.write(oprot)
9421
    result.write(oprot)
9384
    oprot.writeMessageEnd()
9422
    oprot.writeMessageEnd()
9385
    oprot.trans.flush()
9423
    oprot.trans.flush()
9386
 
9424
 
-
 
9425
  def process_getPricingForDtr(self, seqid, iprot, oprot):
-
 
9426
    args = getPricingForDtr_args()
-
 
9427
    args.read(iprot)
-
 
9428
    iprot.readMessageEnd()
-
 
9429
    result = getPricingForDtr_result()
-
 
9430
    result.success = self._handler.getPricingForDtr(args.catalogItemId)
-
 
9431
    oprot.writeMessageBegin("getPricingForDtr", TMessageType.REPLY, seqid)
-
 
9432
    result.write(oprot)
-
 
9433
    oprot.writeMessageEnd()
-
 
9434
    oprot.trans.flush()
-
 
9435
 
9387
 
9436
 
9388
# HELPER FUNCTIONS AND STRUCTURES
9437
# HELPER FUNCTIONS AND STRUCTURES
9389
 
9438
 
9390
class addItem_args:
9439
class addItem_args:
9391
  """
9440
  """
Line 33063... Line 33112...
33063
    oprot.writeFieldStop()
33112
    oprot.writeFieldStop()
33064
    oprot.writeStructEnd()
33113
    oprot.writeStructEnd()
33065
 
33114
 
33066
  def validate(self):
33115
  def validate(self):
33067
    return
33116
    return
-
 
33117
 
-
 
33118
 
-
 
33119
  def __repr__(self):
-
 
33120
    L = ['%s=%r' % (key, value)
-
 
33121
      for key, value in self.__dict__.iteritems()]
-
 
33122
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
33123
 
-
 
33124
  def __eq__(self, other):
-
 
33125
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
33126
 
-
 
33127
  def __ne__(self, other):
-
 
33128
    return not (self == other)
-
 
33129
 
-
 
33130
class getPricingForDtr_args:
-
 
33131
  """
-
 
33132
  Attributes:
-
 
33133
   - catalogItemId
-
 
33134
  """
-
 
33135
 
-
 
33136
  thrift_spec = (
-
 
33137
    None, # 0
-
 
33138
    (1, TType.I64, 'catalogItemId', None, None, ), # 1
-
 
33139
  )
-
 
33140
 
-
 
33141
  def __init__(self, catalogItemId=None,):
-
 
33142
    self.catalogItemId = catalogItemId
-
 
33143
 
-
 
33144
  def read(self, iprot):
-
 
33145
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
33146
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
33147
      return
-
 
33148
    iprot.readStructBegin()
-
 
33149
    while True:
-
 
33150
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
33151
      if ftype == TType.STOP:
-
 
33152
        break
-
 
33153
      if fid == 1:
-
 
33154
        if ftype == TType.I64:
-
 
33155
          self.catalogItemId = iprot.readI64();
-
 
33156
        else:
-
 
33157
          iprot.skip(ftype)
-
 
33158
      else:
-
 
33159
        iprot.skip(ftype)
-
 
33160
      iprot.readFieldEnd()
-
 
33161
    iprot.readStructEnd()
-
 
33162
 
-
 
33163
  def write(self, oprot):
-
 
33164
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
33165
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
33166
      return
-
 
33167
    oprot.writeStructBegin('getPricingForDtr_args')
-
 
33168
    if self.catalogItemId is not None:
-
 
33169
      oprot.writeFieldBegin('catalogItemId', TType.I64, 1)
-
 
33170
      oprot.writeI64(self.catalogItemId)
-
 
33171
      oprot.writeFieldEnd()
-
 
33172
    oprot.writeFieldStop()
-
 
33173
    oprot.writeStructEnd()
-
 
33174
 
-
 
33175
  def validate(self):
-
 
33176
    return
-
 
33177
 
-
 
33178
 
-
 
33179
  def __repr__(self):
-
 
33180
    L = ['%s=%r' % (key, value)
-
 
33181
      for key, value in self.__dict__.iteritems()]
-
 
33182
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
33183
 
-
 
33184
  def __eq__(self, other):
-
 
33185
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
33186
 
-
 
33187
  def __ne__(self, other):
-
 
33188
    return not (self == other)
-
 
33189
 
-
 
33190
class getPricingForDtr_result:
-
 
33191
  """
-
 
33192
  Attributes:
-
 
33193
   - success
-
 
33194
  """
-
 
33195
 
-
 
33196
  thrift_spec = (
-
 
33197
    (0, TType.STRUCT, 'success', (Item, Item.thrift_spec), None, ), # 0
-
 
33198
  )
-
 
33199
 
-
 
33200
  def __init__(self, success=None,):
-
 
33201
    self.success = success
-
 
33202
 
-
 
33203
  def read(self, iprot):
-
 
33204
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
33205
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
33206
      return
-
 
33207
    iprot.readStructBegin()
-
 
33208
    while True:
-
 
33209
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
33210
      if ftype == TType.STOP:
-
 
33211
        break
-
 
33212
      if fid == 0:
-
 
33213
        if ftype == TType.STRUCT:
-
 
33214
          self.success = Item()
-
 
33215
          self.success.read(iprot)
-
 
33216
        else:
-
 
33217
          iprot.skip(ftype)
-
 
33218
      else:
-
 
33219
        iprot.skip(ftype)
-
 
33220
      iprot.readFieldEnd()
-
 
33221
    iprot.readStructEnd()
-
 
33222
 
-
 
33223
  def write(self, oprot):
-
 
33224
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
33225
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
33226
      return
-
 
33227
    oprot.writeStructBegin('getPricingForDtr_result')
-
 
33228
    if self.success is not None:
-
 
33229
      oprot.writeFieldBegin('success', TType.STRUCT, 0)
-
 
33230
      self.success.write(oprot)
-
 
33231
      oprot.writeFieldEnd()
-
 
33232
    oprot.writeFieldStop()
-
 
33233
    oprot.writeStructEnd()
-
 
33234
 
-
 
33235
  def validate(self):
-
 
33236
    return
33068
 
33237
 
33069
 
33238
 
33070
  def __repr__(self):
33239
  def __repr__(self):
33071
    L = ['%s=%r' % (key, value)
33240
    L = ['%s=%r' % (key, value)
33072
      for key, value in self.__dict__.iteritems()]
33241
      for key, value in self.__dict__.iteritems()]