Subversion Repositories SmartDukaan

Rev

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

Rev 14371 Rev 15170
Line 23... Line 23...
23
     - skuBundleId
23
     - skuBundleId
24
     - source_id
24
     - source_id
25
    """
25
    """
26
    pass
26
    pass
27
 
27
 
-
 
28
  def updateLatestPriceForItem(self, id):
-
 
29
    """
-
 
30
    Parameters:
-
 
31
     - id
-
 
32
    """
-
 
33
    pass
-
 
34
 
28
 
35
 
29
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
36
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
30
  def __init__(self, iprot, oprot=None):
37
  def __init__(self, iprot, oprot=None):
31
    shop2020.thriftpy.generic.GenericService.Client.__init__(self, iprot, oprot)
38
    shop2020.thriftpy.generic.GenericService.Client.__init__(self, iprot, oprot)
32
 
39
 
Line 60... Line 67...
60
    self._iprot.readMessageEnd()
67
    self._iprot.readMessageEnd()
61
    if result.success is not None:
68
    if result.success is not None:
62
      return result.success
69
      return result.success
63
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getLatestPricing failed: unknown result");
70
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getLatestPricing failed: unknown result");
64
 
71
 
-
 
72
  def updateLatestPriceForItem(self, id):
-
 
73
    """
-
 
74
    Parameters:
-
 
75
     - id
-
 
76
    """
-
 
77
    self.send_updateLatestPriceForItem(id)
-
 
78
 
-
 
79
  def send_updateLatestPriceForItem(self, id):
-
 
80
    self._oprot.writeMessageBegin('updateLatestPriceForItem', TMessageType.CALL, self._seqid)
-
 
81
    args = updateLatestPriceForItem_args()
-
 
82
    args.id = id
-
 
83
    args.write(self._oprot)
-
 
84
    self._oprot.writeMessageEnd()
-
 
85
    self._oprot.trans.flush()
65
 
86
 
66
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
87
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
67
  def __init__(self, handler):
88
  def __init__(self, handler):
68
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
89
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
69
    self._processMap["getLatestPricing"] = Processor.process_getLatestPricing
90
    self._processMap["getLatestPricing"] = Processor.process_getLatestPricing
-
 
91
    self._processMap["updateLatestPriceForItem"] = Processor.process_updateLatestPriceForItem
70
 
92
 
71
  def process(self, iprot, oprot):
93
  def process(self, iprot, oprot):
72
    (name, type, seqid) = iprot.readMessageBegin()
94
    (name, type, seqid) = iprot.readMessageBegin()
73
    if name not in self._processMap:
95
    if name not in self._processMap:
74
      iprot.skip(TType.STRUCT)
96
      iprot.skip(TType.STRUCT)
Line 92... Line 114...
92
    oprot.writeMessageBegin("getLatestPricing", TMessageType.REPLY, seqid)
114
    oprot.writeMessageBegin("getLatestPricing", TMessageType.REPLY, seqid)
93
    result.write(oprot)
115
    result.write(oprot)
94
    oprot.writeMessageEnd()
116
    oprot.writeMessageEnd()
95
    oprot.trans.flush()
117
    oprot.trans.flush()
96
 
118
 
-
 
119
  def process_updateLatestPriceForItem(self, seqid, iprot, oprot):
-
 
120
    args = updateLatestPriceForItem_args()
-
 
121
    args.read(iprot)
-
 
122
    iprot.readMessageEnd()
-
 
123
    self._handler.updateLatestPriceForItem(args.id)
-
 
124
    return
-
 
125
 
97
 
126
 
98
# HELPER FUNCTIONS AND STRUCTURES
127
# HELPER FUNCTIONS AND STRUCTURES
99
 
128
 
100
class getLatestPricing_args:
129
class getLatestPricing_args:
101
  """
130
  """
Line 221... Line 250...
221
      oprot.writeFieldEnd()
250
      oprot.writeFieldEnd()
222
    oprot.writeFieldStop()
251
    oprot.writeFieldStop()
223
    oprot.writeStructEnd()
252
    oprot.writeStructEnd()
224
 
253
 
225
  def validate(self):
254
  def validate(self):
-
 
255
    return
-
 
256
 
-
 
257
 
-
 
258
  def __repr__(self):
-
 
259
    L = ['%s=%r' % (key, value)
-
 
260
      for key, value in self.__dict__.iteritems()]
-
 
261
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
262
 
-
 
263
  def __eq__(self, other):
-
 
264
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
265
 
-
 
266
  def __ne__(self, other):
-
 
267
    return not (self == other)
-
 
268
 
-
 
269
class updateLatestPriceForItem_args:
-
 
270
  """
-
 
271
  Attributes:
-
 
272
   - id
-
 
273
  """
-
 
274
 
-
 
275
  thrift_spec = (
-
 
276
    None, # 0
-
 
277
    (1, TType.I64, 'id', None, None, ), # 1
-
 
278
  )
-
 
279
 
-
 
280
  def __init__(self, id=None,):
-
 
281
    self.id = id
-
 
282
 
-
 
283
  def read(self, iprot):
-
 
284
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
285
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
286
      return
-
 
287
    iprot.readStructBegin()
-
 
288
    while True:
-
 
289
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
290
      if ftype == TType.STOP:
-
 
291
        break
-
 
292
      if fid == 1:
-
 
293
        if ftype == TType.I64:
-
 
294
          self.id = iprot.readI64();
-
 
295
        else:
-
 
296
          iprot.skip(ftype)
-
 
297
      else:
-
 
298
        iprot.skip(ftype)
-
 
299
      iprot.readFieldEnd()
-
 
300
    iprot.readStructEnd()
-
 
301
 
-
 
302
  def write(self, oprot):
-
 
303
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
304
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
305
      return
-
 
306
    oprot.writeStructBegin('updateLatestPriceForItem_args')
-
 
307
    if self.id is not None:
-
 
308
      oprot.writeFieldBegin('id', TType.I64, 1)
-
 
309
      oprot.writeI64(self.id)
-
 
310
      oprot.writeFieldEnd()
-
 
311
    oprot.writeFieldStop()
-
 
312
    oprot.writeStructEnd()
-
 
313
 
-
 
314
  def validate(self):
226
    return
315
    return
227
 
316
 
228
 
317
 
229
  def __repr__(self):
318
  def __repr__(self):
230
    L = ['%s=%r' % (key, value)
319
    L = ['%s=%r' % (key, value)