Subversion Repositories SmartDukaan

Rev

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

Rev 12363 Rev 17990
Line 666... Line 666...
666
    pass
666
    pass
667
 
667
 
668
  def getAllAvailableAmazonFbaItemInventory(self, ):
668
  def getAllAvailableAmazonFbaItemInventory(self, ):
669
    pass
669
    pass
670
 
670
 
-
 
671
  def updateItemAvailabilityForItemIds(self, itemIds):
-
 
672
    """
-
 
673
    Parameters:
-
 
674
     - itemIds
-
 
675
    """
-
 
676
    pass
-
 
677
 
671
 
678
 
672
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
679
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
673
  def __init__(self, iprot, oprot=None):
680
  def __init__(self, iprot, oprot=None):
674
    shop2020.thriftpy.generic.GenericService.Client.__init__(self, iprot, oprot)
681
    shop2020.thriftpy.generic.GenericService.Client.__init__(self, iprot, oprot)
675
 
682
 
Line 3211... Line 3218...
3211
    self._iprot.readMessageEnd()
3218
    self._iprot.readMessageEnd()
3212
    if result.success is not None:
3219
    if result.success is not None:
3213
      return result.success
3220
      return result.success
3214
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getAllAvailableAmazonFbaItemInventory failed: unknown result");
3221
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getAllAvailableAmazonFbaItemInventory failed: unknown result");
3215
 
3222
 
-
 
3223
  def updateItemAvailabilityForItemIds(self, itemIds):
-
 
3224
    """
-
 
3225
    Parameters:
-
 
3226
     - itemIds
-
 
3227
    """
-
 
3228
    self.send_updateItemAvailabilityForItemIds(itemIds)
-
 
3229
    return self.recv_updateItemAvailabilityForItemIds()
-
 
3230
 
-
 
3231
  def send_updateItemAvailabilityForItemIds(self, itemIds):
-
 
3232
    self._oprot.writeMessageBegin('updateItemAvailabilityForItemIds', TMessageType.CALL, self._seqid)
-
 
3233
    args = updateItemAvailabilityForItemIds_args()
-
 
3234
    args.itemIds = itemIds
-
 
3235
    args.write(self._oprot)
-
 
3236
    self._oprot.writeMessageEnd()
-
 
3237
    self._oprot.trans.flush()
-
 
3238
 
-
 
3239
  def recv_updateItemAvailabilityForItemIds(self, ):
-
 
3240
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
-
 
3241
    if mtype == TMessageType.EXCEPTION:
-
 
3242
      x = TApplicationException()
-
 
3243
      x.read(self._iprot)
-
 
3244
      self._iprot.readMessageEnd()
-
 
3245
      raise x
-
 
3246
    result = updateItemAvailabilityForItemIds_result()
-
 
3247
    result.read(self._iprot)
-
 
3248
    self._iprot.readMessageEnd()
-
 
3249
    if result.success is not None:
-
 
3250
      return result.success
-
 
3251
    raise TApplicationException(TApplicationException.MISSING_RESULT, "updateItemAvailabilityForItemIds failed: unknown result");
-
 
3252
 
3216
 
3253
 
3217
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
3254
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
3218
  def __init__(self, handler):
3255
  def __init__(self, handler):
3219
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
3256
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
3220
    self._processMap["addWarehouse"] = Processor.process_addWarehouse
3257
    self._processMap["addWarehouse"] = Processor.process_addWarehouse
Line 3295... Line 3332...
3295
    self._processMap["getStateMaster"] = Processor.process_getStateMaster
3332
    self._processMap["getStateMaster"] = Processor.process_getStateMaster
3296
    self._processMap["updateSnapdealStockAtEOD"] = Processor.process_updateSnapdealStockAtEOD
3333
    self._processMap["updateSnapdealStockAtEOD"] = Processor.process_updateSnapdealStockAtEOD
3297
    self._processMap["updateFlipkartStockAtEOD"] = Processor.process_updateFlipkartStockAtEOD
3334
    self._processMap["updateFlipkartStockAtEOD"] = Processor.process_updateFlipkartStockAtEOD
3298
    self._processMap["getWanNlcForSource"] = Processor.process_getWanNlcForSource
3335
    self._processMap["getWanNlcForSource"] = Processor.process_getWanNlcForSource
3299
    self._processMap["getAllAvailableAmazonFbaItemInventory"] = Processor.process_getAllAvailableAmazonFbaItemInventory
3336
    self._processMap["getAllAvailableAmazonFbaItemInventory"] = Processor.process_getAllAvailableAmazonFbaItemInventory
-
 
3337
    self._processMap["updateItemAvailabilityForItemIds"] = Processor.process_updateItemAvailabilityForItemIds
3300
 
3338
 
3301
  def process(self, iprot, oprot):
3339
  def process(self, iprot, oprot):
3302
    (name, type, seqid) = iprot.readMessageBegin()
3340
    (name, type, seqid) = iprot.readMessageBegin()
3303
    if name not in self._processMap:
3341
    if name not in self._processMap:
3304
      iprot.skip(TType.STRUCT)
3342
      iprot.skip(TType.STRUCT)
Line 4263... Line 4301...
4263
    oprot.writeMessageBegin("getAllAvailableAmazonFbaItemInventory", TMessageType.REPLY, seqid)
4301
    oprot.writeMessageBegin("getAllAvailableAmazonFbaItemInventory", TMessageType.REPLY, seqid)
4264
    result.write(oprot)
4302
    result.write(oprot)
4265
    oprot.writeMessageEnd()
4303
    oprot.writeMessageEnd()
4266
    oprot.trans.flush()
4304
    oprot.trans.flush()
4267
 
4305
 
-
 
4306
  def process_updateItemAvailabilityForItemIds(self, seqid, iprot, oprot):
-
 
4307
    args = updateItemAvailabilityForItemIds_args()
-
 
4308
    args.read(iprot)
-
 
4309
    iprot.readMessageEnd()
-
 
4310
    result = updateItemAvailabilityForItemIds_result()
-
 
4311
    result.success = self._handler.updateItemAvailabilityForItemIds(args.itemIds)
-
 
4312
    oprot.writeMessageBegin("updateItemAvailabilityForItemIds", TMessageType.REPLY, seqid)
-
 
4313
    result.write(oprot)
-
 
4314
    oprot.writeMessageEnd()
-
 
4315
    oprot.trans.flush()
-
 
4316
 
4268
 
4317
 
4269
# HELPER FUNCTIONS AND STRUCTURES
4318
# HELPER FUNCTIONS AND STRUCTURES
4270
 
4319
 
4271
class addWarehouse_args:
4320
class addWarehouse_args:
4272
  """
4321
  """
Line 14623... Line 14672...
14623
      oprot.writeFieldEnd()
14672
      oprot.writeFieldEnd()
14624
    oprot.writeFieldStop()
14673
    oprot.writeFieldStop()
14625
    oprot.writeStructEnd()
14674
    oprot.writeStructEnd()
14626
 
14675
 
14627
  def validate(self):
14676
  def validate(self):
-
 
14677
    return
-
 
14678
 
-
 
14679
 
-
 
14680
  def __repr__(self):
-
 
14681
    L = ['%s=%r' % (key, value)
-
 
14682
      for key, value in self.__dict__.iteritems()]
-
 
14683
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
14684
 
-
 
14685
  def __eq__(self, other):
-
 
14686
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
14687
 
-
 
14688
  def __ne__(self, other):
-
 
14689
    return not (self == other)
-
 
14690
 
-
 
14691
class updateItemAvailabilityForItemIds_args:
-
 
14692
  """
-
 
14693
  Attributes:
-
 
14694
   - itemIds
-
 
14695
  """
-
 
14696
 
-
 
14697
  thrift_spec = (
-
 
14698
    None, # 0
-
 
14699
    (1, TType.LIST, 'itemIds', (TType.I64,None), None, ), # 1
-
 
14700
  )
-
 
14701
 
-
 
14702
  def __init__(self, itemIds=None,):
-
 
14703
    self.itemIds = itemIds
-
 
14704
 
-
 
14705
  def read(self, iprot):
-
 
14706
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
14707
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
14708
      return
-
 
14709
    iprot.readStructBegin()
-
 
14710
    while True:
-
 
14711
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
14712
      if ftype == TType.STOP:
-
 
14713
        break
-
 
14714
      if fid == 1:
-
 
14715
        if ftype == TType.LIST:
-
 
14716
          self.itemIds = []
-
 
14717
          (_etype349, _size346) = iprot.readListBegin()
-
 
14718
          for _i350 in xrange(_size346):
-
 
14719
            _elem351 = iprot.readI64();
-
 
14720
            self.itemIds.append(_elem351)
-
 
14721
          iprot.readListEnd()
-
 
14722
        else:
-
 
14723
          iprot.skip(ftype)
-
 
14724
      else:
-
 
14725
        iprot.skip(ftype)
-
 
14726
      iprot.readFieldEnd()
-
 
14727
    iprot.readStructEnd()
-
 
14728
 
-
 
14729
  def write(self, oprot):
-
 
14730
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
14731
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
14732
      return
-
 
14733
    oprot.writeStructBegin('updateItemAvailabilityForItemIds_args')
-
 
14734
    if self.itemIds is not None:
-
 
14735
      oprot.writeFieldBegin('itemIds', TType.LIST, 1)
-
 
14736
      oprot.writeListBegin(TType.I64, len(self.itemIds))
-
 
14737
      for iter352 in self.itemIds:
-
 
14738
        oprot.writeI64(iter352)
-
 
14739
      oprot.writeListEnd()
-
 
14740
      oprot.writeFieldEnd()
-
 
14741
    oprot.writeFieldStop()
-
 
14742
    oprot.writeStructEnd()
-
 
14743
 
-
 
14744
  def validate(self):
-
 
14745
    return
-
 
14746
 
-
 
14747
 
-
 
14748
  def __repr__(self):
-
 
14749
    L = ['%s=%r' % (key, value)
-
 
14750
      for key, value in self.__dict__.iteritems()]
-
 
14751
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
14752
 
-
 
14753
  def __eq__(self, other):
-
 
14754
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
14755
 
-
 
14756
  def __ne__(self, other):
-
 
14757
    return not (self == other)
-
 
14758
 
-
 
14759
class updateItemAvailabilityForItemIds_result:
-
 
14760
  """
-
 
14761
  Attributes:
-
 
14762
   - success
-
 
14763
  """
-
 
14764
 
-
 
14765
  thrift_spec = (
-
 
14766
    (0, TType.BOOL, 'success', None, None, ), # 0
-
 
14767
  )
-
 
14768
 
-
 
14769
  def __init__(self, success=None,):
-
 
14770
    self.success = success
-
 
14771
 
-
 
14772
  def read(self, iprot):
-
 
14773
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
14774
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
14775
      return
-
 
14776
    iprot.readStructBegin()
-
 
14777
    while True:
-
 
14778
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
14779
      if ftype == TType.STOP:
-
 
14780
        break
-
 
14781
      if fid == 0:
-
 
14782
        if ftype == TType.BOOL:
-
 
14783
          self.success = iprot.readBool();
-
 
14784
        else:
-
 
14785
          iprot.skip(ftype)
-
 
14786
      else:
-
 
14787
        iprot.skip(ftype)
-
 
14788
      iprot.readFieldEnd()
-
 
14789
    iprot.readStructEnd()
-
 
14790
 
-
 
14791
  def write(self, oprot):
-
 
14792
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
14793
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
14794
      return
-
 
14795
    oprot.writeStructBegin('updateItemAvailabilityForItemIds_result')
-
 
14796
    if self.success is not None:
-
 
14797
      oprot.writeFieldBegin('success', TType.BOOL, 0)
-
 
14798
      oprot.writeBool(self.success)
-
 
14799
      oprot.writeFieldEnd()
-
 
14800
    oprot.writeFieldStop()
-
 
14801
    oprot.writeStructEnd()
-
 
14802
 
-
 
14803
  def validate(self):
14628
    return
14804
    return
14629
 
14805
 
14630
 
14806
 
14631
  def __repr__(self):
14807
  def __repr__(self):
14632
    L = ['%s=%r' % (key, value)
14808
    L = ['%s=%r' % (key, value)