Subversion Repositories SmartDukaan

Rev

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

Rev 9761 Rev 9762
Line 454... Line 454...
454
     - oosStatusMap
454
     - oosStatusMap
455
     - date
455
     - date
456
    """
456
    """
457
    pass
457
    pass
458
 
458
 
459
  def getOosStatusesForXDaysForItem(self, itemId, days):
459
  def getOosStatusesForXDaysForItem(self, itemId, sourceId, days):
460
    """
460
    """
461
    Parameters:
461
    Parameters:
462
     - itemId
462
     - itemId
-
 
463
     - sourceId
463
     - days
464
     - days
464
    """
465
    """
465
    pass
466
    pass
466
 
467
 
467
  def getNonZeroItemStockPurchaseParams(self, ):
468
  def getNonZeroItemStockPurchaseParams(self, ):
Line 2206... Line 2207...
2206
    result = addOosStatusForItem_result()
2207
    result = addOosStatusForItem_result()
2207
    result.read(self._iprot)
2208
    result.read(self._iprot)
2208
    self._iprot.readMessageEnd()
2209
    self._iprot.readMessageEnd()
2209
    return
2210
    return
2210
 
2211
 
2211
  def getOosStatusesForXDaysForItem(self, itemId, days):
2212
  def getOosStatusesForXDaysForItem(self, itemId, sourceId, days):
2212
    """
2213
    """
2213
    Parameters:
2214
    Parameters:
2214
     - itemId
2215
     - itemId
-
 
2216
     - sourceId
2215
     - days
2217
     - days
2216
    """
2218
    """
2217
    self.send_getOosStatusesForXDaysForItem(itemId, days)
2219
    self.send_getOosStatusesForXDaysForItem(itemId, sourceId, days)
2218
    return self.recv_getOosStatusesForXDaysForItem()
2220
    return self.recv_getOosStatusesForXDaysForItem()
2219
 
2221
 
2220
  def send_getOosStatusesForXDaysForItem(self, itemId, days):
2222
  def send_getOosStatusesForXDaysForItem(self, itemId, sourceId, days):
2221
    self._oprot.writeMessageBegin('getOosStatusesForXDaysForItem', TMessageType.CALL, self._seqid)
2223
    self._oprot.writeMessageBegin('getOosStatusesForXDaysForItem', TMessageType.CALL, self._seqid)
2222
    args = getOosStatusesForXDaysForItem_args()
2224
    args = getOosStatusesForXDaysForItem_args()
2223
    args.itemId = itemId
2225
    args.itemId = itemId
-
 
2226
    args.sourceId = sourceId
2224
    args.days = days
2227
    args.days = days
2225
    args.write(self._oprot)
2228
    args.write(self._oprot)
2226
    self._oprot.writeMessageEnd()
2229
    self._oprot.writeMessageEnd()
2227
    self._oprot.trans.flush()
2230
    self._oprot.trans.flush()
2228
 
2231
 
Line 2496... Line 2499...
2496
      self._iprot.readMessageEnd()
2499
      self._iprot.readMessageEnd()
2497
      raise x
2500
      raise x
2498
    result = addUpdateHoldInventory_result()
2501
    result = addUpdateHoldInventory_result()
2499
    result.read(self._iprot)
2502
    result.read(self._iprot)
2500
    self._iprot.readMessageEnd()
2503
    self._iprot.readMessageEnd()
-
 
2504
    if result.cex is not None:
-
 
2505
      raise result.cex
2501
    return
2506
    return
2502
 
2507
 
2503
  def getAmazonFbaItemInventory(self, itemId):
2508
  def getAmazonFbaItemInventory(self, itemId):
2504
    """
2509
    """
2505
    Parameters:
2510
    Parameters:
Line 3546... Line 3551...
3546
  def process_getOosStatusesForXDaysForItem(self, seqid, iprot, oprot):
3551
  def process_getOosStatusesForXDaysForItem(self, seqid, iprot, oprot):
3547
    args = getOosStatusesForXDaysForItem_args()
3552
    args = getOosStatusesForXDaysForItem_args()
3548
    args.read(iprot)
3553
    args.read(iprot)
3549
    iprot.readMessageEnd()
3554
    iprot.readMessageEnd()
3550
    result = getOosStatusesForXDaysForItem_result()
3555
    result = getOosStatusesForXDaysForItem_result()
3551
    result.success = self._handler.getOosStatusesForXDaysForItem(args.itemId, args.days)
3556
    result.success = self._handler.getOosStatusesForXDaysForItem(args.itemId, args.sourceId, args.days)
3552
    oprot.writeMessageBegin("getOosStatusesForXDaysForItem", TMessageType.REPLY, seqid)
3557
    oprot.writeMessageBegin("getOosStatusesForXDaysForItem", TMessageType.REPLY, seqid)
3553
    result.write(oprot)
3558
    result.write(oprot)
3554
    oprot.writeMessageEnd()
3559
    oprot.writeMessageEnd()
3555
    oprot.trans.flush()
3560
    oprot.trans.flush()
3556
 
3561
 
Line 3645... Line 3650...
3645
  def process_addUpdateHoldInventory(self, seqid, iprot, oprot):
3650
  def process_addUpdateHoldInventory(self, seqid, iprot, oprot):
3646
    args = addUpdateHoldInventory_args()
3651
    args = addUpdateHoldInventory_args()
3647
    args.read(iprot)
3652
    args.read(iprot)
3648
    iprot.readMessageEnd()
3653
    iprot.readMessageEnd()
3649
    result = addUpdateHoldInventory_result()
3654
    result = addUpdateHoldInventory_result()
-
 
3655
    try:
3650
    self._handler.addUpdateHoldInventory(args.itemId, args.warehouseId, args.holdQuantity, args.source)
3656
      self._handler.addUpdateHoldInventory(args.itemId, args.warehouseId, args.holdQuantity, args.source)
-
 
3657
    except InventoryServiceException, cex:
-
 
3658
      result.cex = cex
3651
    oprot.writeMessageBegin("addUpdateHoldInventory", TMessageType.REPLY, seqid)
3659
    oprot.writeMessageBegin("addUpdateHoldInventory", TMessageType.REPLY, seqid)
3652
    result.write(oprot)
3660
    result.write(oprot)
3653
    oprot.writeMessageEnd()
3661
    oprot.writeMessageEnd()
3654
    oprot.trans.flush()
3662
    oprot.trans.flush()
3655
 
3663
 
Line 10255... Line 10263...
10255
 
10263
 
10256
class getOosStatusesForXDaysForItem_args:
10264
class getOosStatusesForXDaysForItem_args:
10257
  """
10265
  """
10258
  Attributes:
10266
  Attributes:
10259
   - itemId
10267
   - itemId
-
 
10268
   - sourceId
10260
   - days
10269
   - days
10261
  """
10270
  """
10262
 
10271
 
10263
  thrift_spec = (
10272
  thrift_spec = (
10264
    None, # 0
10273
    None, # 0
10265
    (1, TType.I64, 'itemId', None, None, ), # 1
10274
    (1, TType.I64, 'itemId', None, None, ), # 1
-
 
10275
    (2, TType.I32, 'sourceId', None, None, ), # 2
10266
    (2, TType.I32, 'days', None, None, ), # 2
10276
    (3, TType.I32, 'days', None, None, ), # 3
10267
  )
10277
  )
10268
 
10278
 
10269
  def __init__(self, itemId=None, days=None,):
10279
  def __init__(self, itemId=None, sourceId=None, days=None,):
10270
    self.itemId = itemId
10280
    self.itemId = itemId
-
 
10281
    self.sourceId = sourceId
10271
    self.days = days
10282
    self.days = days
10272
 
10283
 
10273
  def read(self, iprot):
10284
  def read(self, iprot):
10274
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
10285
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
10275
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
10286
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
Line 10284... Line 10295...
10284
          self.itemId = iprot.readI64();
10295
          self.itemId = iprot.readI64();
10285
        else:
10296
        else:
10286
          iprot.skip(ftype)
10297
          iprot.skip(ftype)
10287
      elif fid == 2:
10298
      elif fid == 2:
10288
        if ftype == TType.I32:
10299
        if ftype == TType.I32:
-
 
10300
          self.sourceId = iprot.readI32();
-
 
10301
        else:
-
 
10302
          iprot.skip(ftype)
-
 
10303
      elif fid == 3:
-
 
10304
        if ftype == TType.I32:
10289
          self.days = iprot.readI32();
10305
          self.days = iprot.readI32();
10290
        else:
10306
        else:
10291
          iprot.skip(ftype)
10307
          iprot.skip(ftype)
10292
      else:
10308
      else:
10293
        iprot.skip(ftype)
10309
        iprot.skip(ftype)
Line 10301... Line 10317...
10301
    oprot.writeStructBegin('getOosStatusesForXDaysForItem_args')
10317
    oprot.writeStructBegin('getOosStatusesForXDaysForItem_args')
10302
    if self.itemId is not None:
10318
    if self.itemId is not None:
10303
      oprot.writeFieldBegin('itemId', TType.I64, 1)
10319
      oprot.writeFieldBegin('itemId', TType.I64, 1)
10304
      oprot.writeI64(self.itemId)
10320
      oprot.writeI64(self.itemId)
10305
      oprot.writeFieldEnd()
10321
      oprot.writeFieldEnd()
-
 
10322
    if self.sourceId is not None:
-
 
10323
      oprot.writeFieldBegin('sourceId', TType.I32, 2)
-
 
10324
      oprot.writeI32(self.sourceId)
-
 
10325
      oprot.writeFieldEnd()
10306
    if self.days is not None:
10326
    if self.days is not None:
10307
      oprot.writeFieldBegin('days', TType.I32, 2)
10327
      oprot.writeFieldBegin('days', TType.I32, 3)
10308
      oprot.writeI32(self.days)
10328
      oprot.writeI32(self.days)
10309
      oprot.writeFieldEnd()
10329
      oprot.writeFieldEnd()
10310
    oprot.writeFieldStop()
10330
    oprot.writeFieldStop()
10311
    oprot.writeStructEnd()
10331
    oprot.writeStructEnd()
10312
 
10332
 
Line 11394... Line 11414...
11394
 
11414
 
11395
  def __ne__(self, other):
11415
  def __ne__(self, other):
11396
    return not (self == other)
11416
    return not (self == other)
11397
 
11417
 
11398
class addUpdateHoldInventory_result:
11418
class addUpdateHoldInventory_result:
-
 
11419
  """
-
 
11420
  Attributes:
-
 
11421
   - cex
-
 
11422
  """
11399
 
11423
 
11400
  thrift_spec = (
11424
  thrift_spec = (
-
 
11425
    None, # 0
-
 
11426
    (1, TType.STRUCT, 'cex', (InventoryServiceException, InventoryServiceException.thrift_spec), None, ), # 1
11401
  )
11427
  )
11402
 
11428
 
-
 
11429
  def __init__(self, cex=None,):
-
 
11430
    self.cex = cex
-
 
11431
 
11403
  def read(self, iprot):
11432
  def read(self, iprot):
11404
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
11433
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
11405
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
11434
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
11406
      return
11435
      return
11407
    iprot.readStructBegin()
11436
    iprot.readStructBegin()
11408
    while True:
11437
    while True:
11409
      (fname, ftype, fid) = iprot.readFieldBegin()
11438
      (fname, ftype, fid) = iprot.readFieldBegin()
11410
      if ftype == TType.STOP:
11439
      if ftype == TType.STOP:
11411
        break
11440
        break
-
 
11441
      if fid == 1:
-
 
11442
        if ftype == TType.STRUCT:
-
 
11443
          self.cex = InventoryServiceException()
-
 
11444
          self.cex.read(iprot)
-
 
11445
        else:
-
 
11446
          iprot.skip(ftype)
11412
      else:
11447
      else:
11413
        iprot.skip(ftype)
11448
        iprot.skip(ftype)
11414
      iprot.readFieldEnd()
11449
      iprot.readFieldEnd()
11415
    iprot.readStructEnd()
11450
    iprot.readStructEnd()
11416
 
11451
 
11417
  def write(self, oprot):
11452
  def write(self, oprot):
11418
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
11453
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
11419
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
11454
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
11420
      return
11455
      return
11421
    oprot.writeStructBegin('addUpdateHoldInventory_result')
11456
    oprot.writeStructBegin('addUpdateHoldInventory_result')
-
 
11457
    if self.cex is not None:
-
 
11458
      oprot.writeFieldBegin('cex', TType.STRUCT, 1)
-
 
11459
      self.cex.write(oprot)
-
 
11460
      oprot.writeFieldEnd()
11422
    oprot.writeFieldStop()
11461
    oprot.writeFieldStop()
11423
    oprot.writeStructEnd()
11462
    oprot.writeStructEnd()
11424
 
11463
 
11425
  def validate(self):
11464
  def validate(self):
11426
    return
11465
    return