Subversion Repositories SmartDukaan

Rev

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

Rev 304 Rev 358
Line 31... Line 31...
31
    Parameters:
31
    Parameters:
32
     - id
32
     - id
33
    """
33
    """
34
    pass
34
    pass
35
 
35
 
36
  def getAllTransactions(self, status, from_date, to_date):
36
  def getAllTransactions(self, status, from_date, to_date, warehouse_id):
37
    """
37
    """
38
    Parameters:
38
    Parameters:
39
     - status
39
     - status
40
     - from_date
40
     - from_date
41
     - to_date
41
     - to_date
-
 
42
     - warehouse_id
42
    """
43
    """
43
    pass
44
    pass
44
 
45
 
45
  def getTransactionsForShipmentStatus(self, status, from_date, to_date):
46
  def getTransactionsForShipmentStatus(self, status, from_date, to_date):
46
    """
47
    """
Line 282... Line 283...
282
      return result.success
283
      return result.success
283
    if result.ex != None:
284
    if result.ex != None:
284
      raise result.ex
285
      raise result.ex
285
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getTransaction failed: unknown result");
286
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getTransaction failed: unknown result");
286
 
287
 
287
  def getAllTransactions(self, status, from_date, to_date):
288
  def getAllTransactions(self, status, from_date, to_date, warehouse_id):
288
    """
289
    """
289
    Parameters:
290
    Parameters:
290
     - status
291
     - status
291
     - from_date
292
     - from_date
292
     - to_date
293
     - to_date
-
 
294
     - warehouse_id
293
    """
295
    """
294
    self.send_getAllTransactions(status, from_date, to_date)
296
    self.send_getAllTransactions(status, from_date, to_date, warehouse_id)
295
    return self.recv_getAllTransactions()
297
    return self.recv_getAllTransactions()
296
 
298
 
297
  def send_getAllTransactions(self, status, from_date, to_date):
299
  def send_getAllTransactions(self, status, from_date, to_date, warehouse_id):
298
    self._oprot.writeMessageBegin('getAllTransactions', TMessageType.CALL, self._seqid)
300
    self._oprot.writeMessageBegin('getAllTransactions', TMessageType.CALL, self._seqid)
299
    args = getAllTransactions_args()
301
    args = getAllTransactions_args()
300
    args.status = status
302
    args.status = status
301
    args.from_date = from_date
303
    args.from_date = from_date
302
    args.to_date = to_date
304
    args.to_date = to_date
-
 
305
    args.warehouse_id = warehouse_id
303
    args.write(self._oprot)
306
    args.write(self._oprot)
304
    self._oprot.writeMessageEnd()
307
    self._oprot.writeMessageEnd()
305
    self._oprot.trans.flush()
308
    self._oprot.trans.flush()
306
 
309
 
307
  def recv_getAllTransactions(self, ):
310
  def recv_getAllTransactions(self, ):
Line 1056... Line 1059...
1056
    args = getAllTransactions_args()
1059
    args = getAllTransactions_args()
1057
    args.read(iprot)
1060
    args.read(iprot)
1058
    iprot.readMessageEnd()
1061
    iprot.readMessageEnd()
1059
    result = getAllTransactions_result()
1062
    result = getAllTransactions_result()
1060
    try:
1063
    try:
1061
      result.success = self._handler.getAllTransactions(args.status, args.from_date, args.to_date)
1064
      result.success = self._handler.getAllTransactions(args.status, args.from_date, args.to_date, args.warehouse_id)
1062
    except TransactionServiceException, ex:
1065
    except TransactionServiceException, ex:
1063
      result.ex = ex
1066
      result.ex = ex
1064
    oprot.writeMessageBegin("getAllTransactions", TMessageType.REPLY, seqid)
1067
    oprot.writeMessageBegin("getAllTransactions", TMessageType.REPLY, seqid)
1065
    result.write(oprot)
1068
    result.write(oprot)
1066
    oprot.writeMessageEnd()
1069
    oprot.writeMessageEnd()
Line 1577... Line 1580...
1577
  """
1580
  """
1578
  Attributes:
1581
  Attributes:
1579
   - status
1582
   - status
1580
   - from_date
1583
   - from_date
1581
   - to_date
1584
   - to_date
-
 
1585
   - warehouse_id
1582
  """
1586
  """
1583
 
1587
 
1584
  thrift_spec = (
1588
  thrift_spec = (
1585
    None, # 0
1589
    None, # 0
1586
    (1, TType.I32, 'status', None, None, ), # 1
1590
    (1, TType.I32, 'status', None, None, ), # 1
1587
    (2, TType.I64, 'from_date', None, None, ), # 2
1591
    (2, TType.I64, 'from_date', None, None, ), # 2
1588
    (3, TType.I64, 'to_date', None, None, ), # 3
1592
    (3, TType.I64, 'to_date', None, None, ), # 3
-
 
1593
    (4, TType.I64, 'warehouse_id', None, None, ), # 4
1589
  )
1594
  )
1590
 
1595
 
1591
  def __init__(self, status=None, from_date=None, to_date=None,):
1596
  def __init__(self, status=None, from_date=None, to_date=None, warehouse_id=None,):
1592
    self.status = status
1597
    self.status = status
1593
    self.from_date = from_date
1598
    self.from_date = from_date
1594
    self.to_date = to_date
1599
    self.to_date = to_date
-
 
1600
    self.warehouse_id = warehouse_id
1595
 
1601
 
1596
  def read(self, iprot):
1602
  def read(self, iprot):
1597
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1603
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1598
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1604
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1599
      return
1605
      return
Line 1615... Line 1621...
1615
      elif fid == 3:
1621
      elif fid == 3:
1616
        if ftype == TType.I64:
1622
        if ftype == TType.I64:
1617
          self.to_date = iprot.readI64();
1623
          self.to_date = iprot.readI64();
1618
        else:
1624
        else:
1619
          iprot.skip(ftype)
1625
          iprot.skip(ftype)
-
 
1626
      elif fid == 4:
-
 
1627
        if ftype == TType.I64:
-
 
1628
          self.warehouse_id = iprot.readI64();
-
 
1629
        else:
-
 
1630
          iprot.skip(ftype)
1620
      else:
1631
      else:
1621
        iprot.skip(ftype)
1632
        iprot.skip(ftype)
1622
      iprot.readFieldEnd()
1633
      iprot.readFieldEnd()
1623
    iprot.readStructEnd()
1634
    iprot.readStructEnd()
1624
 
1635
 
Line 1637... Line 1648...
1637
      oprot.writeFieldEnd()
1648
      oprot.writeFieldEnd()
1638
    if self.to_date != None:
1649
    if self.to_date != None:
1639
      oprot.writeFieldBegin('to_date', TType.I64, 3)
1650
      oprot.writeFieldBegin('to_date', TType.I64, 3)
1640
      oprot.writeI64(self.to_date)
1651
      oprot.writeI64(self.to_date)
1641
      oprot.writeFieldEnd()
1652
      oprot.writeFieldEnd()
-
 
1653
    if self.warehouse_id != None:
-
 
1654
      oprot.writeFieldBegin('warehouse_id', TType.I64, 4)
-
 
1655
      oprot.writeI64(self.warehouse_id)
-
 
1656
      oprot.writeFieldEnd()
1642
    oprot.writeFieldStop()
1657
    oprot.writeFieldStop()
1643
    oprot.writeStructEnd()
1658
    oprot.writeStructEnd()
1644
 
1659
 
1645
  def __repr__(self):
1660
  def __repr__(self):
1646
    L = ['%s=%r' % (key, value)
1661
    L = ['%s=%r' % (key, value)