Subversion Repositories SmartDukaan

Rev

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

Rev 10126 Rev 10450
Line 505... Line 505...
505
    pass
505
    pass
506
 
506
 
507
  def getAllAmazonInventory(self, ):
507
  def getAllAmazonInventory(self, ):
508
    pass
508
    pass
509
 
509
 
510
  def addOrUpdateAmazonInventoryForItem(self, amazonInventorySnapshot):
510
  def addOrUpdateAmazonInventoryForItem(self, amazonInventorySnapshot, time):
511
    """
511
    """
512
    Parameters:
512
    Parameters:
513
     - amazonInventorySnapshot
513
     - amazonInventorySnapshot
-
 
514
     - time
514
    """
515
    """
515
    pass
516
    pass
516
 
517
 
517
  def getLastNdaySaleForItem(self, itemId, numberOfDays):
518
  def getLastNdaySaleForItem(self, itemId, numberOfDays):
518
    """
519
    """
Line 619... Line 620...
619
     - warehouseId
620
     - warehouseId
620
     - source
621
     - source
621
    """
622
    """
622
    pass
623
    pass
623
 
624
 
624
  def addOrUpdateFlipkartInventorySnapshot(self, flipkartInventorySnapshot):
625
  def addOrUpdateFlipkartInventorySnapshot(self, flipkartInventorySnapshot, time):
625
    """
626
    """
626
    Parameters:
627
    Parameters:
627
     - flipkartInventorySnapshot
628
     - flipkartInventorySnapshot
-
 
629
     - time
628
    """
630
    """
629
    pass
631
    pass
630
 
632
 
631
  def getFlipkartInventorySnapshot(self, ):
633
  def getFlipkartInventorySnapshot(self, ):
632
    pass
634
    pass
Line 2476... Line 2478...
2476
    self._iprot.readMessageEnd()
2478
    self._iprot.readMessageEnd()
2477
    if result.success is not None:
2479
    if result.success is not None:
2478
      return result.success
2480
      return result.success
2479
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getAllAmazonInventory failed: unknown result");
2481
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getAllAmazonInventory failed: unknown result");
2480
 
2482
 
2481
  def addOrUpdateAmazonInventoryForItem(self, amazonInventorySnapshot):
2483
  def addOrUpdateAmazonInventoryForItem(self, amazonInventorySnapshot, time):
2482
    """
2484
    """
2483
    Parameters:
2485
    Parameters:
2484
     - amazonInventorySnapshot
2486
     - amazonInventorySnapshot
-
 
2487
     - time
2485
    """
2488
    """
2486
    self.send_addOrUpdateAmazonInventoryForItem(amazonInventorySnapshot)
2489
    self.send_addOrUpdateAmazonInventoryForItem(amazonInventorySnapshot, time)
2487
    self.recv_addOrUpdateAmazonInventoryForItem()
2490
    self.recv_addOrUpdateAmazonInventoryForItem()
2488
 
2491
 
2489
  def send_addOrUpdateAmazonInventoryForItem(self, amazonInventorySnapshot):
2492
  def send_addOrUpdateAmazonInventoryForItem(self, amazonInventorySnapshot, time):
2490
    self._oprot.writeMessageBegin('addOrUpdateAmazonInventoryForItem', TMessageType.CALL, self._seqid)
2493
    self._oprot.writeMessageBegin('addOrUpdateAmazonInventoryForItem', TMessageType.CALL, self._seqid)
2491
    args = addOrUpdateAmazonInventoryForItem_args()
2494
    args = addOrUpdateAmazonInventoryForItem_args()
2492
    args.amazonInventorySnapshot = amazonInventorySnapshot
2495
    args.amazonInventorySnapshot = amazonInventorySnapshot
-
 
2496
    args.time = time
2493
    args.write(self._oprot)
2497
    args.write(self._oprot)
2494
    self._oprot.writeMessageEnd()
2498
    self._oprot.writeMessageEnd()
2495
    self._oprot.trans.flush()
2499
    self._oprot.trans.flush()
2496
 
2500
 
2497
  def recv_addOrUpdateAmazonInventoryForItem(self, ):
2501
  def recv_addOrUpdateAmazonInventoryForItem(self, ):
Line 2956... Line 2960...
2956
    self._iprot.readMessageEnd()
2960
    self._iprot.readMessageEnd()
2957
    if result.success is not None:
2961
    if result.success is not None:
2958
      return result.success
2962
      return result.success
2959
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getHoldInventoryDetails failed: unknown result");
2963
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getHoldInventoryDetails failed: unknown result");
2960
 
2964
 
2961
  def addOrUpdateFlipkartInventorySnapshot(self, flipkartInventorySnapshot):
2965
  def addOrUpdateFlipkartInventorySnapshot(self, flipkartInventorySnapshot, time):
2962
    """
2966
    """
2963
    Parameters:
2967
    Parameters:
2964
     - flipkartInventorySnapshot
2968
     - flipkartInventorySnapshot
-
 
2969
     - time
2965
    """
2970
    """
2966
    self.send_addOrUpdateFlipkartInventorySnapshot(flipkartInventorySnapshot)
2971
    self.send_addOrUpdateFlipkartInventorySnapshot(flipkartInventorySnapshot, time)
2967
    self.recv_addOrUpdateFlipkartInventorySnapshot()
2972
    self.recv_addOrUpdateFlipkartInventorySnapshot()
2968
 
2973
 
2969
  def send_addOrUpdateFlipkartInventorySnapshot(self, flipkartInventorySnapshot):
2974
  def send_addOrUpdateFlipkartInventorySnapshot(self, flipkartInventorySnapshot, time):
2970
    self._oprot.writeMessageBegin('addOrUpdateFlipkartInventorySnapshot', TMessageType.CALL, self._seqid)
2975
    self._oprot.writeMessageBegin('addOrUpdateFlipkartInventorySnapshot', TMessageType.CALL, self._seqid)
2971
    args = addOrUpdateFlipkartInventorySnapshot_args()
2976
    args = addOrUpdateFlipkartInventorySnapshot_args()
2972
    args.flipkartInventorySnapshot = flipkartInventorySnapshot
2977
    args.flipkartInventorySnapshot = flipkartInventorySnapshot
-
 
2978
    args.time = time
2973
    args.write(self._oprot)
2979
    args.write(self._oprot)
2974
    self._oprot.writeMessageEnd()
2980
    self._oprot.writeMessageEnd()
2975
    self._oprot.trans.flush()
2981
    self._oprot.trans.flush()
2976
 
2982
 
2977
  def recv_addOrUpdateFlipkartInventorySnapshot(self, ):
2983
  def recv_addOrUpdateFlipkartInventorySnapshot(self, ):
Line 3824... Line 3830...
3824
  def process_addOrUpdateAmazonInventoryForItem(self, seqid, iprot, oprot):
3830
  def process_addOrUpdateAmazonInventoryForItem(self, seqid, iprot, oprot):
3825
    args = addOrUpdateAmazonInventoryForItem_args()
3831
    args = addOrUpdateAmazonInventoryForItem_args()
3826
    args.read(iprot)
3832
    args.read(iprot)
3827
    iprot.readMessageEnd()
3833
    iprot.readMessageEnd()
3828
    result = addOrUpdateAmazonInventoryForItem_result()
3834
    result = addOrUpdateAmazonInventoryForItem_result()
3829
    self._handler.addOrUpdateAmazonInventoryForItem(args.amazonInventorySnapshot)
3835
    self._handler.addOrUpdateAmazonInventoryForItem(args.amazonInventorySnapshot, args.time)
3830
    oprot.writeMessageBegin("addOrUpdateAmazonInventoryForItem", TMessageType.REPLY, seqid)
3836
    oprot.writeMessageBegin("addOrUpdateAmazonInventoryForItem", TMessageType.REPLY, seqid)
3831
    result.write(oprot)
3837
    result.write(oprot)
3832
    oprot.writeMessageEnd()
3838
    oprot.writeMessageEnd()
3833
    oprot.trans.flush()
3839
    oprot.trans.flush()
3834
 
3840
 
Line 4003... Line 4009...
4003
  def process_addOrUpdateFlipkartInventorySnapshot(self, seqid, iprot, oprot):
4009
  def process_addOrUpdateFlipkartInventorySnapshot(self, seqid, iprot, oprot):
4004
    args = addOrUpdateFlipkartInventorySnapshot_args()
4010
    args = addOrUpdateFlipkartInventorySnapshot_args()
4005
    args.read(iprot)
4011
    args.read(iprot)
4006
    iprot.readMessageEnd()
4012
    iprot.readMessageEnd()
4007
    result = addOrUpdateFlipkartInventorySnapshot_result()
4013
    result = addOrUpdateFlipkartInventorySnapshot_result()
4008
    self._handler.addOrUpdateFlipkartInventorySnapshot(args.flipkartInventorySnapshot)
4014
    self._handler.addOrUpdateFlipkartInventorySnapshot(args.flipkartInventorySnapshot, args.time)
4009
    oprot.writeMessageBegin("addOrUpdateFlipkartInventorySnapshot", TMessageType.REPLY, seqid)
4015
    oprot.writeMessageBegin("addOrUpdateFlipkartInventorySnapshot", TMessageType.REPLY, seqid)
4010
    result.write(oprot)
4016
    result.write(oprot)
4011
    oprot.writeMessageEnd()
4017
    oprot.writeMessageEnd()
4012
    oprot.trans.flush()
4018
    oprot.trans.flush()
4013
 
4019
 
Line 11504... Line 11510...
11504
 
11510
 
11505
class addOrUpdateAmazonInventoryForItem_args:
11511
class addOrUpdateAmazonInventoryForItem_args:
11506
  """
11512
  """
11507
  Attributes:
11513
  Attributes:
11508
   - amazonInventorySnapshot
11514
   - amazonInventorySnapshot
-
 
11515
   - time
11509
  """
11516
  """
11510
 
11517
 
11511
  thrift_spec = (
11518
  thrift_spec = (
11512
    None, # 0
11519
    None, # 0
11513
    (1, TType.STRUCT, 'amazonInventorySnapshot', (AmazonInventorySnapshot, AmazonInventorySnapshot.thrift_spec), None, ), # 1
11520
    (1, TType.STRUCT, 'amazonInventorySnapshot', (AmazonInventorySnapshot, AmazonInventorySnapshot.thrift_spec), None, ), # 1
-
 
11521
    (2, TType.I64, 'time', None, None, ), # 2
11514
  )
11522
  )
11515
 
11523
 
11516
  def __init__(self, amazonInventorySnapshot=None,):
11524
  def __init__(self, amazonInventorySnapshot=None, time=None,):
11517
    self.amazonInventorySnapshot = amazonInventorySnapshot
11525
    self.amazonInventorySnapshot = amazonInventorySnapshot
-
 
11526
    self.time = time
11518
 
11527
 
11519
  def read(self, iprot):
11528
  def read(self, iprot):
11520
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
11529
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
11521
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
11530
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
11522
      return
11531
      return
Line 11529... Line 11538...
11529
        if ftype == TType.STRUCT:
11538
        if ftype == TType.STRUCT:
11530
          self.amazonInventorySnapshot = AmazonInventorySnapshot()
11539
          self.amazonInventorySnapshot = AmazonInventorySnapshot()
11531
          self.amazonInventorySnapshot.read(iprot)
11540
          self.amazonInventorySnapshot.read(iprot)
11532
        else:
11541
        else:
11533
          iprot.skip(ftype)
11542
          iprot.skip(ftype)
-
 
11543
      elif fid == 2:
-
 
11544
        if ftype == TType.I64:
-
 
11545
          self.time = iprot.readI64();
-
 
11546
        else:
-
 
11547
          iprot.skip(ftype)
11534
      else:
11548
      else:
11535
        iprot.skip(ftype)
11549
        iprot.skip(ftype)
11536
      iprot.readFieldEnd()
11550
      iprot.readFieldEnd()
11537
    iprot.readStructEnd()
11551
    iprot.readStructEnd()
11538
 
11552
 
Line 11543... Line 11557...
11543
    oprot.writeStructBegin('addOrUpdateAmazonInventoryForItem_args')
11557
    oprot.writeStructBegin('addOrUpdateAmazonInventoryForItem_args')
11544
    if self.amazonInventorySnapshot is not None:
11558
    if self.amazonInventorySnapshot is not None:
11545
      oprot.writeFieldBegin('amazonInventorySnapshot', TType.STRUCT, 1)
11559
      oprot.writeFieldBegin('amazonInventorySnapshot', TType.STRUCT, 1)
11546
      self.amazonInventorySnapshot.write(oprot)
11560
      self.amazonInventorySnapshot.write(oprot)
11547
      oprot.writeFieldEnd()
11561
      oprot.writeFieldEnd()
-
 
11562
    if self.time is not None:
-
 
11563
      oprot.writeFieldBegin('time', TType.I64, 2)
-
 
11564
      oprot.writeI64(self.time)
-
 
11565
      oprot.writeFieldEnd()
11548
    oprot.writeFieldStop()
11566
    oprot.writeFieldStop()
11549
    oprot.writeStructEnd()
11567
    oprot.writeStructEnd()
11550
 
11568
 
11551
  def validate(self):
11569
  def validate(self):
11552
    return
11570
    return
Line 13468... Line 13486...
13468
 
13486
 
13469
class addOrUpdateFlipkartInventorySnapshot_args:
13487
class addOrUpdateFlipkartInventorySnapshot_args:
13470
  """
13488
  """
13471
  Attributes:
13489
  Attributes:
13472
   - flipkartInventorySnapshot
13490
   - flipkartInventorySnapshot
-
 
13491
   - time
13473
  """
13492
  """
13474
 
13493
 
13475
  thrift_spec = None
13494
  thrift_spec = (
-
 
13495
    None, # 0
-
 
13496
    (1, TType.LIST, 'flipkartInventorySnapshot', (TType.STRUCT,(FlipkartInventorySnapshot, FlipkartInventorySnapshot.thrift_spec)), None, ), # 1
-
 
13497
    (2, TType.I64, 'time', None, None, ), # 2
-
 
13498
  )
-
 
13499
 
13476
  def __init__(self, flipkartInventorySnapshot=None,):
13500
  def __init__(self, flipkartInventorySnapshot=None, time=None,):
13477
    self.flipkartInventorySnapshot = flipkartInventorySnapshot
13501
    self.flipkartInventorySnapshot = flipkartInventorySnapshot
-
 
13502
    self.time = time
13478
 
13503
 
13479
  def read(self, iprot):
13504
  def read(self, iprot):
13480
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
13505
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
13481
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
13506
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
13482
      return
13507
      return
13483
    iprot.readStructBegin()
13508
    iprot.readStructBegin()
13484
    while True:
13509
    while True:
13485
      (fname, ftype, fid) = iprot.readFieldBegin()
13510
      (fname, ftype, fid) = iprot.readFieldBegin()
13486
      if ftype == TType.STOP:
13511
      if ftype == TType.STOP:
13487
        break
13512
        break
13488
      if fid == -1:
13513
      if fid == 1:
13489
        if ftype == TType.LIST:
13514
        if ftype == TType.LIST:
13490
          self.flipkartInventorySnapshot = []
13515
          self.flipkartInventorySnapshot = []
13491
          (_etype298, _size295) = iprot.readListBegin()
13516
          (_etype298, _size295) = iprot.readListBegin()
13492
          for _i299 in xrange(_size295):
13517
          for _i299 in xrange(_size295):
13493
            _elem300 = FlipkartInventorySnapshot()
13518
            _elem300 = FlipkartInventorySnapshot()
13494
            _elem300.read(iprot)
13519
            _elem300.read(iprot)
13495
            self.flipkartInventorySnapshot.append(_elem300)
13520
            self.flipkartInventorySnapshot.append(_elem300)
13496
          iprot.readListEnd()
13521
          iprot.readListEnd()
13497
        else:
13522
        else:
13498
          iprot.skip(ftype)
13523
          iprot.skip(ftype)
-
 
13524
      elif fid == 2:
-
 
13525
        if ftype == TType.I64:
-
 
13526
          self.time = iprot.readI64();
-
 
13527
        else:
-
 
13528
          iprot.skip(ftype)
13499
      else:
13529
      else:
13500
        iprot.skip(ftype)
13530
        iprot.skip(ftype)
13501
      iprot.readFieldEnd()
13531
      iprot.readFieldEnd()
13502
    iprot.readStructEnd()
13532
    iprot.readStructEnd()
13503
 
13533
 
Line 13505... Line 13535...
13505
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
13535
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
13506
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
13536
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
13507
      return
13537
      return
13508
    oprot.writeStructBegin('addOrUpdateFlipkartInventorySnapshot_args')
13538
    oprot.writeStructBegin('addOrUpdateFlipkartInventorySnapshot_args')
13509
    if self.flipkartInventorySnapshot is not None:
13539
    if self.flipkartInventorySnapshot is not None:
13510
      oprot.writeFieldBegin('flipkartInventorySnapshot', TType.LIST, -1)
13540
      oprot.writeFieldBegin('flipkartInventorySnapshot', TType.LIST, 1)
13511
      oprot.writeListBegin(TType.STRUCT, len(self.flipkartInventorySnapshot))
13541
      oprot.writeListBegin(TType.STRUCT, len(self.flipkartInventorySnapshot))
13512
      for iter301 in self.flipkartInventorySnapshot:
13542
      for iter301 in self.flipkartInventorySnapshot:
13513
        iter301.write(oprot)
13543
        iter301.write(oprot)
13514
      oprot.writeListEnd()
13544
      oprot.writeListEnd()
13515
      oprot.writeFieldEnd()
13545
      oprot.writeFieldEnd()
-
 
13546
    if self.time is not None:
-
 
13547
      oprot.writeFieldBegin('time', TType.I64, 2)
-
 
13548
      oprot.writeI64(self.time)
-
 
13549
      oprot.writeFieldEnd()
13516
    oprot.writeFieldStop()
13550
    oprot.writeFieldStop()
13517
    oprot.writeStructEnd()
13551
    oprot.writeStructEnd()
13518
 
13552
 
13519
  def validate(self):
13553
  def validate(self):
13520
    return
13554
    return