Subversion Repositories SmartDukaan

Rev

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

Rev 6336 Rev 6371
Line 1413... Line 1413...
1413
     - circleCode
1413
     - circleCode
1414
     - denominationType
1414
     - denominationType
1415
    """
1415
    """
1416
    pass
1416
    pass
1417
 
1417
 
-
 
1418
  def updateAvailabilityStatus(self, operatorId, circleId, isAvailable):
-
 
1419
    """
-
 
1420
    Parameters:
-
 
1421
     - operatorId
-
 
1422
     - circleId
-
 
1423
     - isAvailable
-
 
1424
    """
-
 
1425
    pass
-
 
1426
 
1418
 
1427
 
1419
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
1428
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
1420
  def __init__(self, iprot, oprot=None):
1429
  def __init__(self, iprot, oprot=None):
1421
    shop2020.thriftpy.generic.GenericService.Client.__init__(self, iprot, oprot)
1430
    shop2020.thriftpy.generic.GenericService.Client.__init__(self, iprot, oprot)
1422
 
1431
 
Line 6390... Line 6399...
6390
      return result.success
6399
      return result.success
6391
    if result.ex is not None:
6400
    if result.ex is not None:
6392
      raise result.ex
6401
      raise result.ex
6393
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getRechargeDenominations failed: unknown result");
6402
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getRechargeDenominations failed: unknown result");
6394
 
6403
 
-
 
6404
  def updateAvailabilityStatus(self, operatorId, circleId, isAvailable):
-
 
6405
    """
-
 
6406
    Parameters:
-
 
6407
     - operatorId
-
 
6408
     - circleId
-
 
6409
     - isAvailable
-
 
6410
    """
-
 
6411
    self.send_updateAvailabilityStatus(operatorId, circleId, isAvailable)
-
 
6412
    self.recv_updateAvailabilityStatus()
-
 
6413
 
-
 
6414
  def send_updateAvailabilityStatus(self, operatorId, circleId, isAvailable):
-
 
6415
    self._oprot.writeMessageBegin('updateAvailabilityStatus', TMessageType.CALL, self._seqid)
-
 
6416
    args = updateAvailabilityStatus_args()
-
 
6417
    args.operatorId = operatorId
-
 
6418
    args.circleId = circleId
-
 
6419
    args.isAvailable = isAvailable
-
 
6420
    args.write(self._oprot)
-
 
6421
    self._oprot.writeMessageEnd()
-
 
6422
    self._oprot.trans.flush()
-
 
6423
 
-
 
6424
  def recv_updateAvailabilityStatus(self, ):
-
 
6425
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
-
 
6426
    if mtype == TMessageType.EXCEPTION:
-
 
6427
      x = TApplicationException()
-
 
6428
      x.read(self._iprot)
-
 
6429
      self._iprot.readMessageEnd()
-
 
6430
      raise x
-
 
6431
    result = updateAvailabilityStatus_result()
-
 
6432
    result.read(self._iprot)
-
 
6433
    self._iprot.readMessageEnd()
-
 
6434
    return
-
 
6435
 
6395
 
6436
 
6396
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
6437
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
6397
  def __init__(self, handler):
6438
  def __init__(self, handler):
6398
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
6439
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
6399
    self._processMap["createTransaction"] = Processor.process_createTransaction
6440
    self._processMap["createTransaction"] = Processor.process_createTransaction
Line 6538... Line 6579...
6538
    self._processMap["addAmountToWallet"] = Processor.process_addAmountToWallet
6579
    self._processMap["addAmountToWallet"] = Processor.process_addAmountToWallet
6539
    self._processMap["getRechargeStatistics"] = Processor.process_getRechargeStatistics
6580
    self._processMap["getRechargeStatistics"] = Processor.process_getRechargeStatistics
6540
    self._processMap["getRechargeOrdersForStatus"] = Processor.process_getRechargeOrdersForStatus
6581
    self._processMap["getRechargeOrdersForStatus"] = Processor.process_getRechargeOrdersForStatus
6541
    self._processMap["getPlansForOperator"] = Processor.process_getPlansForOperator
6582
    self._processMap["getPlansForOperator"] = Processor.process_getPlansForOperator
6542
    self._processMap["getRechargeDenominations"] = Processor.process_getRechargeDenominations
6583
    self._processMap["getRechargeDenominations"] = Processor.process_getRechargeDenominations
-
 
6584
    self._processMap["updateAvailabilityStatus"] = Processor.process_updateAvailabilityStatus
6543
 
6585
 
6544
  def process(self, iprot, oprot):
6586
  def process(self, iprot, oprot):
6545
    (name, type, seqid) = iprot.readMessageBegin()
6587
    (name, type, seqid) = iprot.readMessageBegin()
6546
    if name not in self._processMap:
6588
    if name not in self._processMap:
6547
      iprot.skip(TType.STRUCT)
6589
      iprot.skip(TType.STRUCT)
Line 8429... Line 8471...
8429
    oprot.writeMessageBegin("getRechargeDenominations", TMessageType.REPLY, seqid)
8471
    oprot.writeMessageBegin("getRechargeDenominations", TMessageType.REPLY, seqid)
8430
    result.write(oprot)
8472
    result.write(oprot)
8431
    oprot.writeMessageEnd()
8473
    oprot.writeMessageEnd()
8432
    oprot.trans.flush()
8474
    oprot.trans.flush()
8433
 
8475
 
-
 
8476
  def process_updateAvailabilityStatus(self, seqid, iprot, oprot):
-
 
8477
    args = updateAvailabilityStatus_args()
-
 
8478
    args.read(iprot)
-
 
8479
    iprot.readMessageEnd()
-
 
8480
    result = updateAvailabilityStatus_result()
-
 
8481
    self._handler.updateAvailabilityStatus(args.operatorId, args.circleId, args.isAvailable)
-
 
8482
    oprot.writeMessageBegin("updateAvailabilityStatus", TMessageType.REPLY, seqid)
-
 
8483
    result.write(oprot)
-
 
8484
    oprot.writeMessageEnd()
-
 
8485
    oprot.trans.flush()
-
 
8486
 
8434
 
8487
 
8435
# HELPER FUNCTIONS AND STRUCTURES
8488
# HELPER FUNCTIONS AND STRUCTURES
8436
 
8489
 
8437
class createTransaction_args:
8490
class createTransaction_args:
8438
  """
8491
  """
Line 28718... Line 28771...
28718
    oprot.writeFieldStop()
28771
    oprot.writeFieldStop()
28719
    oprot.writeStructEnd()
28772
    oprot.writeStructEnd()
28720
 
28773
 
28721
  def validate(self):
28774
  def validate(self):
28722
    return
28775
    return
-
 
28776
 
-
 
28777
 
-
 
28778
  def __repr__(self):
-
 
28779
    L = ['%s=%r' % (key, value)
-
 
28780
      for key, value in self.__dict__.iteritems()]
-
 
28781
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
28782
 
-
 
28783
  def __eq__(self, other):
-
 
28784
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
28785
 
-
 
28786
  def __ne__(self, other):
-
 
28787
    return not (self == other)
-
 
28788
 
-
 
28789
class updateAvailabilityStatus_args:
-
 
28790
  """
-
 
28791
  Attributes:
-
 
28792
   - operatorId
-
 
28793
   - circleId
-
 
28794
   - isAvailable
-
 
28795
  """
-
 
28796
 
-
 
28797
  thrift_spec = (
-
 
28798
    None, # 0
-
 
28799
    (1, TType.I64, 'operatorId', None, None, ), # 1
-
 
28800
    (2, TType.I64, 'circleId', None, None, ), # 2
-
 
28801
    (3, TType.BOOL, 'isAvailable', None, None, ), # 3
-
 
28802
  )
-
 
28803
 
-
 
28804
  def __init__(self, operatorId=None, circleId=None, isAvailable=None,):
-
 
28805
    self.operatorId = operatorId
-
 
28806
    self.circleId = circleId
-
 
28807
    self.isAvailable = isAvailable
-
 
28808
 
-
 
28809
  def read(self, iprot):
-
 
28810
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
28811
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
28812
      return
-
 
28813
    iprot.readStructBegin()
-
 
28814
    while True:
-
 
28815
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
28816
      if ftype == TType.STOP:
-
 
28817
        break
-
 
28818
      if fid == 1:
-
 
28819
        if ftype == TType.I64:
-
 
28820
          self.operatorId = iprot.readI64();
-
 
28821
        else:
-
 
28822
          iprot.skip(ftype)
-
 
28823
      elif fid == 2:
-
 
28824
        if ftype == TType.I64:
-
 
28825
          self.circleId = iprot.readI64();
-
 
28826
        else:
-
 
28827
          iprot.skip(ftype)
-
 
28828
      elif fid == 3:
-
 
28829
        if ftype == TType.BOOL:
-
 
28830
          self.isAvailable = iprot.readBool();
-
 
28831
        else:
-
 
28832
          iprot.skip(ftype)
-
 
28833
      else:
-
 
28834
        iprot.skip(ftype)
-
 
28835
      iprot.readFieldEnd()
-
 
28836
    iprot.readStructEnd()
-
 
28837
 
-
 
28838
  def write(self, oprot):
-
 
28839
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
28840
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
28841
      return
-
 
28842
    oprot.writeStructBegin('updateAvailabilityStatus_args')
-
 
28843
    if self.operatorId is not None:
-
 
28844
      oprot.writeFieldBegin('operatorId', TType.I64, 1)
-
 
28845
      oprot.writeI64(self.operatorId)
-
 
28846
      oprot.writeFieldEnd()
-
 
28847
    if self.circleId is not None:
-
 
28848
      oprot.writeFieldBegin('circleId', TType.I64, 2)
-
 
28849
      oprot.writeI64(self.circleId)
-
 
28850
      oprot.writeFieldEnd()
-
 
28851
    if self.isAvailable is not None:
-
 
28852
      oprot.writeFieldBegin('isAvailable', TType.BOOL, 3)
-
 
28853
      oprot.writeBool(self.isAvailable)
-
 
28854
      oprot.writeFieldEnd()
-
 
28855
    oprot.writeFieldStop()
-
 
28856
    oprot.writeStructEnd()
-
 
28857
 
-
 
28858
  def validate(self):
-
 
28859
    return
-
 
28860
 
-
 
28861
 
-
 
28862
  def __repr__(self):
-
 
28863
    L = ['%s=%r' % (key, value)
-
 
28864
      for key, value in self.__dict__.iteritems()]
-
 
28865
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
28866
 
-
 
28867
  def __eq__(self, other):
-
 
28868
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
28869
 
-
 
28870
  def __ne__(self, other):
-
 
28871
    return not (self == other)
-
 
28872
 
-
 
28873
class updateAvailabilityStatus_result:
-
 
28874
 
-
 
28875
  thrift_spec = (
-
 
28876
  )
-
 
28877
 
-
 
28878
  def read(self, iprot):
-
 
28879
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
28880
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
28881
      return
-
 
28882
    iprot.readStructBegin()
-
 
28883
    while True:
-
 
28884
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
28885
      if ftype == TType.STOP:
-
 
28886
        break
-
 
28887
      else:
-
 
28888
        iprot.skip(ftype)
-
 
28889
      iprot.readFieldEnd()
-
 
28890
    iprot.readStructEnd()
-
 
28891
 
-
 
28892
  def write(self, oprot):
-
 
28893
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
28894
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
28895
      return
-
 
28896
    oprot.writeStructBegin('updateAvailabilityStatus_result')
-
 
28897
    oprot.writeFieldStop()
-
 
28898
    oprot.writeStructEnd()
-
 
28899
 
-
 
28900
  def validate(self):
-
 
28901
    return
28723
 
28902
 
28724
 
28903
 
28725
  def __repr__(self):
28904
  def __repr__(self):
28726
    L = ['%s=%r' % (key, value)
28905
    L = ['%s=%r' % (key, value)
28727
      for key, value in self.__dict__.iteritems()]
28906
      for key, value in self.__dict__.iteritems()]