Subversion Repositories SmartDukaan

Rev

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

Rev 7460 Rev 7770
Line 753... Line 753...
753
     - holdInventory
753
     - holdInventory
754
     - defaultInventory
754
     - defaultInventory
755
    """
755
    """
756
    pass
756
    pass
757
 
757
 
-
 
758
  def updateTimestampForAmazonFeeds(self, type, sku, timestamp):
-
 
759
    """
-
 
760
    Parameters:
-
 
761
     - type
-
 
762
     - sku
-
 
763
     - timestamp
-
 
764
    """
-
 
765
    pass
-
 
766
 
758
 
767
 
759
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
768
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
760
  def __init__(self, iprot, oprot=None):
769
  def __init__(self, iprot, oprot=None):
761
    shop2020.thriftpy.generic.GenericService.Client.__init__(self, iprot, oprot)
770
    shop2020.thriftpy.generic.GenericService.Client.__init__(self, iprot, oprot)
762
 
771
 
Line 3848... Line 3857...
3848
    self._iprot.readMessageEnd()
3857
    self._iprot.readMessageEnd()
3849
    if result.success is not None:
3858
    if result.success is not None:
3850
      return result.success
3859
      return result.success
3851
    raise TApplicationException(TApplicationException.MISSING_RESULT, "updateItemInventory failed: unknown result");
3860
    raise TApplicationException(TApplicationException.MISSING_RESULT, "updateItemInventory failed: unknown result");
3852
 
3861
 
-
 
3862
  def updateTimestampForAmazonFeeds(self, type, sku, timestamp):
-
 
3863
    """
-
 
3864
    Parameters:
-
 
3865
     - type
-
 
3866
     - sku
-
 
3867
     - timestamp
-
 
3868
    """
-
 
3869
    self.send_updateTimestampForAmazonFeeds(type, sku, timestamp)
-
 
3870
    return self.recv_updateTimestampForAmazonFeeds()
-
 
3871
 
-
 
3872
  def send_updateTimestampForAmazonFeeds(self, type, sku, timestamp):
-
 
3873
    self._oprot.writeMessageBegin('updateTimestampForAmazonFeeds', TMessageType.CALL, self._seqid)
-
 
3874
    args = updateTimestampForAmazonFeeds_args()
-
 
3875
    args.type = type
-
 
3876
    args.sku = sku
-
 
3877
    args.timestamp = timestamp
-
 
3878
    args.write(self._oprot)
-
 
3879
    self._oprot.writeMessageEnd()
-
 
3880
    self._oprot.trans.flush()
-
 
3881
 
-
 
3882
  def recv_updateTimestampForAmazonFeeds(self, ):
-
 
3883
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
-
 
3884
    if mtype == TMessageType.EXCEPTION:
-
 
3885
      x = TApplicationException()
-
 
3886
      x.read(self._iprot)
-
 
3887
      self._iprot.readMessageEnd()
-
 
3888
      raise x
-
 
3889
    result = updateTimestampForAmazonFeeds_result()
-
 
3890
    result.read(self._iprot)
-
 
3891
    self._iprot.readMessageEnd()
-
 
3892
    if result.success is not None:
-
 
3893
      return result.success
-
 
3894
    raise TApplicationException(TApplicationException.MISSING_RESULT, "updateTimestampForAmazonFeeds failed: unknown result");
-
 
3895
 
3853
 
3896
 
3854
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
3897
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
3855
  def __init__(self, handler):
3898
  def __init__(self, handler):
3856
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
3899
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
3857
    self._processMap["addItem"] = Processor.process_addItem
3900
    self._processMap["addItem"] = Processor.process_addItem
Line 3950... Line 3993...
3950
    self._processMap["addAmazonItem"] = Processor.process_addAmazonItem
3993
    self._processMap["addAmazonItem"] = Processor.process_addAmazonItem
3951
    self._processMap["getAsinItems"] = Processor.process_getAsinItems
3994
    self._processMap["getAsinItems"] = Processor.process_getAsinItems
3952
    self._processMap["getAllFbaListedItems"] = Processor.process_getAllFbaListedItems
3995
    self._processMap["getAllFbaListedItems"] = Processor.process_getAllFbaListedItems
3953
    self._processMap["getAllNonFbaListedItems"] = Processor.process_getAllNonFbaListedItems
3996
    self._processMap["getAllNonFbaListedItems"] = Processor.process_getAllNonFbaListedItems
3954
    self._processMap["updateItemInventory"] = Processor.process_updateItemInventory
3997
    self._processMap["updateItemInventory"] = Processor.process_updateItemInventory
-
 
3998
    self._processMap["updateTimestampForAmazonFeeds"] = Processor.process_updateTimestampForAmazonFeeds
3955
 
3999
 
3956
  def process(self, iprot, oprot):
4000
  def process(self, iprot, oprot):
3957
    (name, type, seqid) = iprot.readMessageBegin()
4001
    (name, type, seqid) = iprot.readMessageBegin()
3958
    if name not in self._processMap:
4002
    if name not in self._processMap:
3959
      iprot.skip(TType.STRUCT)
4003
      iprot.skip(TType.STRUCT)
Line 5158... Line 5202...
5158
    oprot.writeMessageBegin("updateItemInventory", TMessageType.REPLY, seqid)
5202
    oprot.writeMessageBegin("updateItemInventory", TMessageType.REPLY, seqid)
5159
    result.write(oprot)
5203
    result.write(oprot)
5160
    oprot.writeMessageEnd()
5204
    oprot.writeMessageEnd()
5161
    oprot.trans.flush()
5205
    oprot.trans.flush()
5162
 
5206
 
-
 
5207
  def process_updateTimestampForAmazonFeeds(self, seqid, iprot, oprot):
-
 
5208
    args = updateTimestampForAmazonFeeds_args()
-
 
5209
    args.read(iprot)
-
 
5210
    iprot.readMessageEnd()
-
 
5211
    result = updateTimestampForAmazonFeeds_result()
-
 
5212
    result.success = self._handler.updateTimestampForAmazonFeeds(args.type, args.sku, args.timestamp)
-
 
5213
    oprot.writeMessageBegin("updateTimestampForAmazonFeeds", TMessageType.REPLY, seqid)
-
 
5214
    result.write(oprot)
-
 
5215
    oprot.writeMessageEnd()
-
 
5216
    oprot.trans.flush()
-
 
5217
 
5163
 
5218
 
5164
# HELPER FUNCTIONS AND STRUCTURES
5219
# HELPER FUNCTIONS AND STRUCTURES
5165
 
5220
 
5166
class addItem_args:
5221
class addItem_args:
5167
  """
5222
  """
Line 17964... Line 18019...
17964
    if self.success is not None:
18019
    if self.success is not None:
17965
      oprot.writeFieldBegin('success', TType.BOOL, 0)
18020
      oprot.writeFieldBegin('success', TType.BOOL, 0)
17966
      oprot.writeBool(self.success)
18021
      oprot.writeBool(self.success)
17967
      oprot.writeFieldEnd()
18022
      oprot.writeFieldEnd()
17968
    oprot.writeFieldStop()
18023
    oprot.writeFieldStop()
-
 
18024
    oprot.writeStructEnd()
-
 
18025
 
-
 
18026
  def validate(self):
-
 
18027
    return
-
 
18028
 
-
 
18029
 
-
 
18030
  def __repr__(self):
-
 
18031
    L = ['%s=%r' % (key, value)
-
 
18032
      for key, value in self.__dict__.iteritems()]
-
 
18033
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
18034
 
-
 
18035
  def __eq__(self, other):
-
 
18036
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
18037
 
-
 
18038
  def __ne__(self, other):
-
 
18039
    return not (self == other)
-
 
18040
 
-
 
18041
class updateTimestampForAmazonFeeds_args:
-
 
18042
  """
-
 
18043
  Attributes:
-
 
18044
   - type
-
 
18045
   - sku
-
 
18046
   - timestamp
-
 
18047
  """
-
 
18048
 
-
 
18049
  thrift_spec = (
-
 
18050
    None, # 0
-
 
18051
    (1, TType.STRING, 'type', None, None, ), # 1
-
 
18052
    (2, TType.LIST, 'sku', (TType.I64,None), None, ), # 2
-
 
18053
    (3, TType.I64, 'timestamp', None, None, ), # 3
-
 
18054
  )
-
 
18055
 
-
 
18056
  def __init__(self, type=None, sku=None, timestamp=None,):
-
 
18057
    self.type = type
-
 
18058
    self.sku = sku
-
 
18059
    self.timestamp = timestamp
-
 
18060
 
-
 
18061
  def read(self, iprot):
-
 
18062
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
18063
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
18064
      return
-
 
18065
    iprot.readStructBegin()
-
 
18066
    while True:
-
 
18067
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
18068
      if ftype == TType.STOP:
-
 
18069
        break
-
 
18070
      if fid == 1:
-
 
18071
        if ftype == TType.STRING:
-
 
18072
          self.type = iprot.readString();
-
 
18073
        else:
-
 
18074
          iprot.skip(ftype)
-
 
18075
      elif fid == 2:
-
 
18076
        if ftype == TType.LIST:
-
 
18077
          self.sku = []
-
 
18078
          (_etype368, _size365) = iprot.readListBegin()
-
 
18079
          for _i369 in xrange(_size365):
-
 
18080
            _elem370 = iprot.readI64();
-
 
18081
            self.sku.append(_elem370)
-
 
18082
          iprot.readListEnd()
-
 
18083
        else:
-
 
18084
          iprot.skip(ftype)
-
 
18085
      elif fid == 3:
-
 
18086
        if ftype == TType.I64:
-
 
18087
          self.timestamp = iprot.readI64();
-
 
18088
        else:
-
 
18089
          iprot.skip(ftype)
-
 
18090
      else:
-
 
18091
        iprot.skip(ftype)
-
 
18092
      iprot.readFieldEnd()
-
 
18093
    iprot.readStructEnd()
-
 
18094
 
-
 
18095
  def write(self, oprot):
-
 
18096
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
18097
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
18098
      return
-
 
18099
    oprot.writeStructBegin('updateTimestampForAmazonFeeds_args')
-
 
18100
    if self.type is not None:
-
 
18101
      oprot.writeFieldBegin('type', TType.STRING, 1)
-
 
18102
      oprot.writeString(self.type)
-
 
18103
      oprot.writeFieldEnd()
-
 
18104
    if self.sku is not None:
-
 
18105
      oprot.writeFieldBegin('sku', TType.LIST, 2)
-
 
18106
      oprot.writeListBegin(TType.I64, len(self.sku))
-
 
18107
      for iter371 in self.sku:
-
 
18108
        oprot.writeI64(iter371)
-
 
18109
      oprot.writeListEnd()
-
 
18110
      oprot.writeFieldEnd()
-
 
18111
    if self.timestamp is not None:
-
 
18112
      oprot.writeFieldBegin('timestamp', TType.I64, 3)
-
 
18113
      oprot.writeI64(self.timestamp)
-
 
18114
      oprot.writeFieldEnd()
-
 
18115
    oprot.writeFieldStop()
-
 
18116
    oprot.writeStructEnd()
-
 
18117
 
-
 
18118
  def validate(self):
-
 
18119
    return
-
 
18120
 
-
 
18121
 
-
 
18122
  def __repr__(self):
-
 
18123
    L = ['%s=%r' % (key, value)
-
 
18124
      for key, value in self.__dict__.iteritems()]
-
 
18125
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
18126
 
-
 
18127
  def __eq__(self, other):
-
 
18128
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
18129
 
-
 
18130
  def __ne__(self, other):
-
 
18131
    return not (self == other)
-
 
18132
 
-
 
18133
class updateTimestampForAmazonFeeds_result:
-
 
18134
  """
-
 
18135
  Attributes:
-
 
18136
   - success
-
 
18137
  """
-
 
18138
 
-
 
18139
  thrift_spec = (
-
 
18140
    (0, TType.BOOL, 'success', None, None, ), # 0
-
 
18141
  )
-
 
18142
 
-
 
18143
  def __init__(self, success=None,):
-
 
18144
    self.success = success
-
 
18145
 
-
 
18146
  def read(self, iprot):
-
 
18147
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
18148
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
18149
      return
-
 
18150
    iprot.readStructBegin()
-
 
18151
    while True:
-
 
18152
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
18153
      if ftype == TType.STOP:
-
 
18154
        break
-
 
18155
      if fid == 0:
-
 
18156
        if ftype == TType.BOOL:
-
 
18157
          self.success = iprot.readBool();
-
 
18158
        else:
-
 
18159
          iprot.skip(ftype)
-
 
18160
      else:
-
 
18161
        iprot.skip(ftype)
-
 
18162
      iprot.readFieldEnd()
-
 
18163
    iprot.readStructEnd()
-
 
18164
 
-
 
18165
  def write(self, oprot):
-
 
18166
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
18167
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
18168
      return
-
 
18169
    oprot.writeStructBegin('updateTimestampForAmazonFeeds_result')
-
 
18170
    if self.success is not None:
-
 
18171
      oprot.writeFieldBegin('success', TType.BOOL, 0)
-
 
18172
      oprot.writeBool(self.success)
-
 
18173
      oprot.writeFieldEnd()
-
 
18174
    oprot.writeFieldStop()
17969
    oprot.writeStructEnd()
18175
    oprot.writeStructEnd()
17970
 
18176
 
17971
  def validate(self):
18177
  def validate(self):
17972
    return
18178
    return
17973
 
18179