Subversion Repositories SmartDukaan

Rev

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

Rev 20954 Rev 21044
Line 2710... Line 2710...
2710
     - logistics_provider_id
2710
     - logistics_provider_id
2711
     - cod
2711
     - cod
2712
    """
2712
    """
2713
    pass
2713
    pass
2714
 
2714
 
-
 
2715
  def registerRsa(self, userId, activation_code):
-
 
2716
    """
-
 
2717
    Parameters:
-
 
2718
     - userId
-
 
2719
     - activation_code
-
 
2720
    """
-
 
2721
    pass
-
 
2722
 
2715
 
2723
 
2716
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
2724
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
2717
  def __init__(self, iprot, oprot=None):
2725
  def __init__(self, iprot, oprot=None):
2718
    shop2020.thriftpy.generic.GenericService.Client.__init__(self, iprot, oprot)
2726
    shop2020.thriftpy.generic.GenericService.Client.__init__(self, iprot, oprot)
2719
 
2727
 
Line 12997... Line 13005...
12997
    self._iprot.readMessageEnd()
13005
    self._iprot.readMessageEnd()
12998
    if result.success is not None:
13006
    if result.success is not None:
12999
      return result.success
13007
      return result.success
13000
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getBilledOrdersForManifestGen failed: unknown result");
13008
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getBilledOrdersForManifestGen failed: unknown result");
13001
 
13009
 
-
 
13010
  def registerRsa(self, userId, activation_code):
-
 
13011
    """
-
 
13012
    Parameters:
-
 
13013
     - userId
-
 
13014
     - activation_code
-
 
13015
    """
-
 
13016
    self.send_registerRsa(userId, activation_code)
-
 
13017
    return self.recv_registerRsa()
-
 
13018
 
-
 
13019
  def send_registerRsa(self, userId, activation_code):
-
 
13020
    self._oprot.writeMessageBegin('registerRsa', TMessageType.CALL, self._seqid)
-
 
13021
    args = registerRsa_args()
-
 
13022
    args.userId = userId
-
 
13023
    args.activation_code = activation_code
-
 
13024
    args.write(self._oprot)
-
 
13025
    self._oprot.writeMessageEnd()
-
 
13026
    self._oprot.trans.flush()
-
 
13027
 
-
 
13028
  def recv_registerRsa(self, ):
-
 
13029
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
-
 
13030
    if mtype == TMessageType.EXCEPTION:
-
 
13031
      x = TApplicationException()
-
 
13032
      x.read(self._iprot)
-
 
13033
      self._iprot.readMessageEnd()
-
 
13034
      raise x
-
 
13035
    result = registerRsa_result()
-
 
13036
    result.read(self._iprot)
-
 
13037
    self._iprot.readMessageEnd()
-
 
13038
    if result.success is not None:
-
 
13039
      return result.success
-
 
13040
    raise TApplicationException(TApplicationException.MISSING_RESULT, "registerRsa failed: unknown result");
-
 
13041
 
13002
 
13042
 
13003
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
13043
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
13004
  def __init__(self, handler):
13044
  def __init__(self, handler):
13005
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
13045
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
13006
    self._processMap["createTransaction"] = Processor.process_createTransaction
13046
    self._processMap["createTransaction"] = Processor.process_createTransaction
Line 13311... Line 13351...
13311
    self._processMap["getCostDetailForLogisticsTxnId"] = Processor.process_getCostDetailForLogisticsTxnId
13351
    self._processMap["getCostDetailForLogisticsTxnId"] = Processor.process_getCostDetailForLogisticsTxnId
13312
    self._processMap["addShipmentLogisticDetail"] = Processor.process_addShipmentLogisticDetail
13352
    self._processMap["addShipmentLogisticDetail"] = Processor.process_addShipmentLogisticDetail
13313
    self._processMap["createPayment"] = Processor.process_createPayment
13353
    self._processMap["createPayment"] = Processor.process_createPayment
13314
    self._processMap["calculatePaymentAmount"] = Processor.process_calculatePaymentAmount
13354
    self._processMap["calculatePaymentAmount"] = Processor.process_calculatePaymentAmount
13315
    self._processMap["getBilledOrdersForManifestGen"] = Processor.process_getBilledOrdersForManifestGen
13355
    self._processMap["getBilledOrdersForManifestGen"] = Processor.process_getBilledOrdersForManifestGen
-
 
13356
    self._processMap["registerRsa"] = Processor.process_registerRsa
13316
 
13357
 
13317
  def process(self, iprot, oprot):
13358
  def process(self, iprot, oprot):
13318
    (name, type, seqid) = iprot.readMessageBegin()
13359
    (name, type, seqid) = iprot.readMessageBegin()
13319
    if name not in self._processMap:
13360
    if name not in self._processMap:
13320
      iprot.skip(TType.STRUCT)
13361
      iprot.skip(TType.STRUCT)
Line 17154... Line 17195...
17154
    oprot.writeMessageBegin("getBilledOrdersForManifestGen", TMessageType.REPLY, seqid)
17195
    oprot.writeMessageBegin("getBilledOrdersForManifestGen", TMessageType.REPLY, seqid)
17155
    result.write(oprot)
17196
    result.write(oprot)
17156
    oprot.writeMessageEnd()
17197
    oprot.writeMessageEnd()
17157
    oprot.trans.flush()
17198
    oprot.trans.flush()
17158
 
17199
 
-
 
17200
  def process_registerRsa(self, seqid, iprot, oprot):
-
 
17201
    args = registerRsa_args()
-
 
17202
    args.read(iprot)
-
 
17203
    iprot.readMessageEnd()
-
 
17204
    result = registerRsa_result()
-
 
17205
    result.success = self._handler.registerRsa(args.userId, args.activation_code)
-
 
17206
    oprot.writeMessageBegin("registerRsa", TMessageType.REPLY, seqid)
-
 
17207
    result.write(oprot)
-
 
17208
    oprot.writeMessageEnd()
-
 
17209
    oprot.trans.flush()
-
 
17210
 
17159
 
17211
 
17160
# HELPER FUNCTIONS AND STRUCTURES
17212
# HELPER FUNCTIONS AND STRUCTURES
17161
 
17213
 
17162
class createTransaction_args:
17214
class createTransaction_args:
17163
  """
17215
  """
Line 60181... Line 60233...
60181
      oprot.writeFieldEnd()
60233
      oprot.writeFieldEnd()
60182
    oprot.writeFieldStop()
60234
    oprot.writeFieldStop()
60183
    oprot.writeStructEnd()
60235
    oprot.writeStructEnd()
60184
 
60236
 
60185
  def validate(self):
60237
  def validate(self):
-
 
60238
    return
-
 
60239
 
-
 
60240
 
-
 
60241
  def __repr__(self):
-
 
60242
    L = ['%s=%r' % (key, value)
-
 
60243
      for key, value in self.__dict__.iteritems()]
-
 
60244
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
60245
 
-
 
60246
  def __eq__(self, other):
-
 
60247
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
60248
 
-
 
60249
  def __ne__(self, other):
-
 
60250
    return not (self == other)
-
 
60251
 
-
 
60252
class registerRsa_args:
-
 
60253
  """
-
 
60254
  Attributes:
-
 
60255
   - userId
-
 
60256
   - activation_code
-
 
60257
  """
-
 
60258
 
-
 
60259
  thrift_spec = (
-
 
60260
    None, # 0
-
 
60261
    (1, TType.I64, 'userId', None, None, ), # 1
-
 
60262
    (2, TType.STRING, 'activation_code', None, None, ), # 2
-
 
60263
  )
-
 
60264
 
-
 
60265
  def __init__(self, userId=None, activation_code=None,):
-
 
60266
    self.userId = userId
-
 
60267
    self.activation_code = activation_code
-
 
60268
 
-
 
60269
  def read(self, iprot):
-
 
60270
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
60271
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
60272
      return
-
 
60273
    iprot.readStructBegin()
-
 
60274
    while True:
-
 
60275
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
60276
      if ftype == TType.STOP:
-
 
60277
        break
-
 
60278
      if fid == 1:
-
 
60279
        if ftype == TType.I64:
-
 
60280
          self.userId = iprot.readI64();
-
 
60281
        else:
-
 
60282
          iprot.skip(ftype)
-
 
60283
      elif fid == 2:
-
 
60284
        if ftype == TType.STRING:
-
 
60285
          self.activation_code = iprot.readString();
-
 
60286
        else:
-
 
60287
          iprot.skip(ftype)
-
 
60288
      else:
-
 
60289
        iprot.skip(ftype)
-
 
60290
      iprot.readFieldEnd()
-
 
60291
    iprot.readStructEnd()
-
 
60292
 
-
 
60293
  def write(self, oprot):
-
 
60294
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
60295
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
60296
      return
-
 
60297
    oprot.writeStructBegin('registerRsa_args')
-
 
60298
    if self.userId is not None:
-
 
60299
      oprot.writeFieldBegin('userId', TType.I64, 1)
-
 
60300
      oprot.writeI64(self.userId)
-
 
60301
      oprot.writeFieldEnd()
-
 
60302
    if self.activation_code is not None:
-
 
60303
      oprot.writeFieldBegin('activation_code', TType.STRING, 2)
-
 
60304
      oprot.writeString(self.activation_code)
-
 
60305
      oprot.writeFieldEnd()
-
 
60306
    oprot.writeFieldStop()
-
 
60307
    oprot.writeStructEnd()
-
 
60308
 
-
 
60309
  def validate(self):
-
 
60310
    return
-
 
60311
 
-
 
60312
 
-
 
60313
  def __repr__(self):
-
 
60314
    L = ['%s=%r' % (key, value)
-
 
60315
      for key, value in self.__dict__.iteritems()]
-
 
60316
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
60317
 
-
 
60318
  def __eq__(self, other):
-
 
60319
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
60320
 
-
 
60321
  def __ne__(self, other):
-
 
60322
    return not (self == other)
-
 
60323
 
-
 
60324
class registerRsa_result:
-
 
60325
  """
-
 
60326
  Attributes:
-
 
60327
   - success
-
 
60328
  """
-
 
60329
 
-
 
60330
  thrift_spec = (
-
 
60331
    (0, TType.BOOL, 'success', None, None, ), # 0
-
 
60332
  )
-
 
60333
 
-
 
60334
  def __init__(self, success=None,):
-
 
60335
    self.success = success
-
 
60336
 
-
 
60337
  def read(self, iprot):
-
 
60338
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
60339
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
60340
      return
-
 
60341
    iprot.readStructBegin()
-
 
60342
    while True:
-
 
60343
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
60344
      if ftype == TType.STOP:
-
 
60345
        break
-
 
60346
      if fid == 0:
-
 
60347
        if ftype == TType.BOOL:
-
 
60348
          self.success = iprot.readBool();
-
 
60349
        else:
-
 
60350
          iprot.skip(ftype)
-
 
60351
      else:
-
 
60352
        iprot.skip(ftype)
-
 
60353
      iprot.readFieldEnd()
-
 
60354
    iprot.readStructEnd()
-
 
60355
 
-
 
60356
  def write(self, oprot):
-
 
60357
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
60358
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
60359
      return
-
 
60360
    oprot.writeStructBegin('registerRsa_result')
-
 
60361
    if self.success is not None:
-
 
60362
      oprot.writeFieldBegin('success', TType.BOOL, 0)
-
 
60363
      oprot.writeBool(self.success)
-
 
60364
      oprot.writeFieldEnd()
-
 
60365
    oprot.writeFieldStop()
-
 
60366
    oprot.writeStructEnd()
-
 
60367
 
-
 
60368
  def validate(self):
60186
    return
60369
    return
60187
 
60370
 
60188
 
60371
 
60189
  def __repr__(self):
60372
  def __repr__(self):
60190
    L = ['%s=%r' % (key, value)
60373
    L = ['%s=%r' % (key, value)