Subversion Repositories SmartDukaan

Rev

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

Rev 4386 Rev 4394
Line 214... Line 214...
214
     - orderId
214
     - orderId
215
     - customerId
215
     - customerId
216
    """
216
    """
217
    pass
217
    pass
218
 
218
 
219
  def getAlerts(self, orderId, valid):
219
  def getAlerts(self, type, status, timestamp):
220
    """
220
    """
221
    Parameters:
221
    Parameters:
222
     - orderId
222
     - type
223
     - valid
223
     - status
-
 
224
     - timestamp
224
    """
225
    """
225
    pass
226
    pass
226
 
227
 
227
  def setAlert(self, orderId, unset, type, comment):
228
  def addAlert(self, type, description):
228
    """
229
    """
229
    Parameters:
230
    Parameters:
230
     - orderId
-
 
231
     - unset
-
 
232
     - type
231
     - type
233
     - comment
232
     - description
234
    """
233
    """
235
    pass
234
    pass
236
 
235
 
237
  def getValidOrderCount(self, ):
236
  def getValidOrderCount(self, ):
238
    """
237
    """
Line 1548... Line 1547...
1548
      return result.success
1547
      return result.success
1549
    if result.ex is not None:
1548
    if result.ex is not None:
1550
      raise result.ex
1549
      raise result.ex
1551
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getOrderForCustomer failed: unknown result");
1550
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getOrderForCustomer failed: unknown result");
1552
 
1551
 
1553
  def getAlerts(self, orderId, valid):
1552
  def getAlerts(self, type, status, timestamp):
1554
    """
1553
    """
1555
    Parameters:
1554
    Parameters:
1556
     - orderId
1555
     - type
1557
     - valid
1556
     - status
-
 
1557
     - timestamp
1558
    """
1558
    """
1559
    self.send_getAlerts(orderId, valid)
1559
    self.send_getAlerts(type, status, timestamp)
1560
    return self.recv_getAlerts()
1560
    return self.recv_getAlerts()
1561
 
1561
 
1562
  def send_getAlerts(self, orderId, valid):
1562
  def send_getAlerts(self, type, status, timestamp):
1563
    self._oprot.writeMessageBegin('getAlerts', TMessageType.CALL, self._seqid)
1563
    self._oprot.writeMessageBegin('getAlerts', TMessageType.CALL, self._seqid)
1564
    args = getAlerts_args()
1564
    args = getAlerts_args()
1565
    args.orderId = orderId
1565
    args.type = type
1566
    args.valid = valid
1566
    args.status = status
-
 
1567
    args.timestamp = timestamp
1567
    args.write(self._oprot)
1568
    args.write(self._oprot)
1568
    self._oprot.writeMessageEnd()
1569
    self._oprot.writeMessageEnd()
1569
    self._oprot.trans.flush()
1570
    self._oprot.trans.flush()
1570
 
1571
 
1571
  def recv_getAlerts(self, ):
1572
  def recv_getAlerts(self, ):
Line 1580... Line 1581...
1580
    self._iprot.readMessageEnd()
1581
    self._iprot.readMessageEnd()
1581
    if result.success is not None:
1582
    if result.success is not None:
1582
      return result.success
1583
      return result.success
1583
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getAlerts failed: unknown result");
1584
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getAlerts failed: unknown result");
1584
 
1585
 
1585
  def setAlert(self, orderId, unset, type, comment):
1586
  def addAlert(self, type, description):
1586
    """
1587
    """
1587
    Parameters:
1588
    Parameters:
1588
     - orderId
-
 
1589
     - unset
-
 
1590
     - type
1589
     - type
1591
     - comment
1590
     - description
1592
    """
1591
    """
1593
    self.send_setAlert(orderId, unset, type, comment)
1592
    self.send_addAlert(type, description)
1594
    self.recv_setAlert()
1593
    self.recv_addAlert()
1595
 
1594
 
1596
  def send_setAlert(self, orderId, unset, type, comment):
1595
  def send_addAlert(self, type, description):
1597
    self._oprot.writeMessageBegin('setAlert', TMessageType.CALL, self._seqid)
1596
    self._oprot.writeMessageBegin('addAlert', TMessageType.CALL, self._seqid)
1598
    args = setAlert_args()
1597
    args = addAlert_args()
1599
    args.orderId = orderId
-
 
1600
    args.unset = unset
-
 
1601
    args.type = type
1598
    args.type = type
1602
    args.comment = comment
1599
    args.description = description
1603
    args.write(self._oprot)
1600
    args.write(self._oprot)
1604
    self._oprot.writeMessageEnd()
1601
    self._oprot.writeMessageEnd()
1605
    self._oprot.trans.flush()
1602
    self._oprot.trans.flush()
1606
 
1603
 
1607
  def recv_setAlert(self, ):
1604
  def recv_addAlert(self, ):
1608
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
1605
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
1609
    if mtype == TMessageType.EXCEPTION:
1606
    if mtype == TMessageType.EXCEPTION:
1610
      x = TApplicationException()
1607
      x = TApplicationException()
1611
      x.read(self._iprot)
1608
      x.read(self._iprot)
1612
      self._iprot.readMessageEnd()
1609
      self._iprot.readMessageEnd()
1613
      raise x
1610
      raise x
1614
    result = setAlert_result()
1611
    result = addAlert_result()
1615
    result.read(self._iprot)
1612
    result.read(self._iprot)
1616
    self._iprot.readMessageEnd()
1613
    self._iprot.readMessageEnd()
1617
    return
1614
    return
1618
 
1615
 
1619
  def getValidOrderCount(self, ):
1616
  def getValidOrderCount(self, ):
Line 3391... Line 3388...
3391
    self._processMap["createOrder"] = Processor.process_createOrder
3388
    self._processMap["createOrder"] = Processor.process_createOrder
3392
    self._processMap["getOrder"] = Processor.process_getOrder
3389
    self._processMap["getOrder"] = Processor.process_getOrder
3393
    self._processMap["getLineItemsForOrder"] = Processor.process_getLineItemsForOrder
3390
    self._processMap["getLineItemsForOrder"] = Processor.process_getLineItemsForOrder
3394
    self._processMap["getOrderForCustomer"] = Processor.process_getOrderForCustomer
3391
    self._processMap["getOrderForCustomer"] = Processor.process_getOrderForCustomer
3395
    self._processMap["getAlerts"] = Processor.process_getAlerts
3392
    self._processMap["getAlerts"] = Processor.process_getAlerts
3396
    self._processMap["setAlert"] = Processor.process_setAlert
3393
    self._processMap["addAlert"] = Processor.process_addAlert
3397
    self._processMap["getValidOrderCount"] = Processor.process_getValidOrderCount
3394
    self._processMap["getValidOrderCount"] = Processor.process_getValidOrderCount
3398
    self._processMap["getNoOfCustomersWithSuccessfulTransaction"] = Processor.process_getNoOfCustomersWithSuccessfulTransaction
3395
    self._processMap["getNoOfCustomersWithSuccessfulTransaction"] = Processor.process_getNoOfCustomersWithSuccessfulTransaction
3399
    self._processMap["getValidOrdersAmountRange"] = Processor.process_getValidOrdersAmountRange
3396
    self._processMap["getValidOrdersAmountRange"] = Processor.process_getValidOrdersAmountRange
3400
    self._processMap["getValidOrders"] = Processor.process_getValidOrders
3397
    self._processMap["getValidOrders"] = Processor.process_getValidOrders
3401
    self._processMap["batchOrders"] = Processor.process_batchOrders
3398
    self._processMap["batchOrders"] = Processor.process_batchOrders
Line 3755... Line 3752...
3755
  def process_getAlerts(self, seqid, iprot, oprot):
3752
  def process_getAlerts(self, seqid, iprot, oprot):
3756
    args = getAlerts_args()
3753
    args = getAlerts_args()
3757
    args.read(iprot)
3754
    args.read(iprot)
3758
    iprot.readMessageEnd()
3755
    iprot.readMessageEnd()
3759
    result = getAlerts_result()
3756
    result = getAlerts_result()
3760
    result.success = self._handler.getAlerts(args.orderId, args.valid)
3757
    result.success = self._handler.getAlerts(args.type, args.status, args.timestamp)
3761
    oprot.writeMessageBegin("getAlerts", TMessageType.REPLY, seqid)
3758
    oprot.writeMessageBegin("getAlerts", TMessageType.REPLY, seqid)
3762
    result.write(oprot)
3759
    result.write(oprot)
3763
    oprot.writeMessageEnd()
3760
    oprot.writeMessageEnd()
3764
    oprot.trans.flush()
3761
    oprot.trans.flush()
3765
 
3762
 
3766
  def process_setAlert(self, seqid, iprot, oprot):
3763
  def process_addAlert(self, seqid, iprot, oprot):
3767
    args = setAlert_args()
3764
    args = addAlert_args()
3768
    args.read(iprot)
3765
    args.read(iprot)
3769
    iprot.readMessageEnd()
3766
    iprot.readMessageEnd()
3770
    result = setAlert_result()
3767
    result = addAlert_result()
3771
    self._handler.setAlert(args.orderId, args.unset, args.type, args.comment)
3768
    self._handler.addAlert(args.type, args.description)
3772
    oprot.writeMessageBegin("setAlert", TMessageType.REPLY, seqid)
3769
    oprot.writeMessageBegin("addAlert", TMessageType.REPLY, seqid)
3773
    result.write(oprot)
3770
    result.write(oprot)
3774
    oprot.writeMessageEnd()
3771
    oprot.writeMessageEnd()
3775
    oprot.trans.flush()
3772
    oprot.trans.flush()
3776
 
3773
 
3777
  def process_getValidOrderCount(self, seqid, iprot, oprot):
3774
  def process_getValidOrderCount(self, seqid, iprot, oprot):
Line 7651... Line 7648...
7651
    return not (self == other)
7648
    return not (self == other)
7652
 
7649
 
7653
class getAlerts_args:
7650
class getAlerts_args:
7654
  """
7651
  """
7655
  Attributes:
7652
  Attributes:
7656
   - orderId
7653
   - type
7657
   - valid
7654
   - status
-
 
7655
   - timestamp
7658
  """
7656
  """
7659
 
7657
 
7660
  thrift_spec = (
7658
  thrift_spec = (
7661
    None, # 0
7659
    None, # 0
7662
    (1, TType.I64, 'orderId', None, None, ), # 1
7660
    (1, TType.I64, 'type', None, None, ), # 1
7663
    (2, TType.BOOL, 'valid', None, None, ), # 2
7661
    (2, TType.I64, 'status', None, None, ), # 2
-
 
7662
    (3, TType.I64, 'timestamp', None, None, ), # 3
7664
  )
7663
  )
7665
 
7664
 
7666
  def __init__(self, orderId=None, valid=None,):
7665
  def __init__(self, type=None, status=None, timestamp=None,):
7667
    self.orderId = orderId
7666
    self.type = type
7668
    self.valid = valid
7667
    self.status = status
-
 
7668
    self.timestamp = timestamp
7669
 
7669
 
7670
  def read(self, iprot):
7670
  def read(self, iprot):
7671
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
7671
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
7672
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
7672
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
7673
      return
7673
      return
Line 7676... Line 7676...
7676
      (fname, ftype, fid) = iprot.readFieldBegin()
7676
      (fname, ftype, fid) = iprot.readFieldBegin()
7677
      if ftype == TType.STOP:
7677
      if ftype == TType.STOP:
7678
        break
7678
        break
7679
      if fid == 1:
7679
      if fid == 1:
7680
        if ftype == TType.I64:
7680
        if ftype == TType.I64:
7681
          self.orderId = iprot.readI64();
7681
          self.type = iprot.readI64();
7682
        else:
7682
        else:
7683
          iprot.skip(ftype)
7683
          iprot.skip(ftype)
7684
      elif fid == 2:
7684
      elif fid == 2:
7685
        if ftype == TType.BOOL:
7685
        if ftype == TType.I64:
7686
          self.valid = iprot.readBool();
7686
          self.status = iprot.readI64();
-
 
7687
        else:
-
 
7688
          iprot.skip(ftype)
-
 
7689
      elif fid == 3:
-
 
7690
        if ftype == TType.I64:
-
 
7691
          self.timestamp = iprot.readI64();
7687
        else:
7692
        else:
7688
          iprot.skip(ftype)
7693
          iprot.skip(ftype)
7689
      else:
7694
      else:
7690
        iprot.skip(ftype)
7695
        iprot.skip(ftype)
7691
      iprot.readFieldEnd()
7696
      iprot.readFieldEnd()
Line 7694... Line 7699...
7694
  def write(self, oprot):
7699
  def write(self, oprot):
7695
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
7700
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
7696
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
7701
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
7697
      return
7702
      return
7698
    oprot.writeStructBegin('getAlerts_args')
7703
    oprot.writeStructBegin('getAlerts_args')
7699
    if self.orderId is not None:
7704
    if self.type is not None:
7700
      oprot.writeFieldBegin('orderId', TType.I64, 1)
7705
      oprot.writeFieldBegin('type', TType.I64, 1)
7701
      oprot.writeI64(self.orderId)
7706
      oprot.writeI64(self.type)
7702
      oprot.writeFieldEnd()
7707
      oprot.writeFieldEnd()
7703
    if self.valid is not None:
7708
    if self.status is not None:
7704
      oprot.writeFieldBegin('valid', TType.BOOL, 2)
7709
      oprot.writeFieldBegin('status', TType.I64, 2)
7705
      oprot.writeBool(self.valid)
7710
      oprot.writeI64(self.status)
-
 
7711
      oprot.writeFieldEnd()
-
 
7712
    if self.timestamp is not None:
-
 
7713
      oprot.writeFieldBegin('timestamp', TType.I64, 3)
-
 
7714
      oprot.writeI64(self.timestamp)
7706
      oprot.writeFieldEnd()
7715
      oprot.writeFieldEnd()
7707
    oprot.writeFieldStop()
7716
    oprot.writeFieldStop()
7708
    oprot.writeStructEnd()
7717
    oprot.writeStructEnd()
7709
 
7718
 
7710
  def validate(self):
7719
  def validate(self):
Line 7788... Line 7797...
7788
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
7797
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
7789
 
7798
 
7790
  def __ne__(self, other):
7799
  def __ne__(self, other):
7791
    return not (self == other)
7800
    return not (self == other)
7792
 
7801
 
7793
class setAlert_args:
7802
class addAlert_args:
7794
  """
7803
  """
7795
  Attributes:
7804
  Attributes:
7796
   - orderId
-
 
7797
   - unset
-
 
7798
   - type
7805
   - type
7799
   - comment
7806
   - description
7800
  """
7807
  """
7801
 
7808
 
7802
  thrift_spec = (
7809
  thrift_spec = (
7803
    None, # 0
7810
    None, # 0
7804
    (1, TType.I64, 'orderId', None, None, ), # 1
-
 
7805
    (2, TType.BOOL, 'unset', None, None, ), # 2
-
 
7806
    (3, TType.I64, 'type', None, None, ), # 3
7811
    (1, TType.I64, 'type', None, None, ), # 1
7807
    (4, TType.STRING, 'comment', None, None, ), # 4
7812
    (2, TType.STRING, 'description', None, None, ), # 2
7808
  )
7813
  )
7809
 
7814
 
7810
  def __init__(self, orderId=None, unset=None, type=None, comment=None,):
7815
  def __init__(self, type=None, description=None,):
7811
    self.orderId = orderId
-
 
7812
    self.unset = unset
-
 
7813
    self.type = type
7816
    self.type = type
7814
    self.comment = comment
7817
    self.description = description
7815
 
7818
 
7816
  def read(self, iprot):
7819
  def read(self, iprot):
7817
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
7820
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
7818
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
7821
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
7819
      return
7822
      return
Line 7822... Line 7825...
7822
      (fname, ftype, fid) = iprot.readFieldBegin()
7825
      (fname, ftype, fid) = iprot.readFieldBegin()
7823
      if ftype == TType.STOP:
7826
      if ftype == TType.STOP:
7824
        break
7827
        break
7825
      if fid == 1:
7828
      if fid == 1:
7826
        if ftype == TType.I64:
7829
        if ftype == TType.I64:
7827
          self.orderId = iprot.readI64();
-
 
7828
        else:
-
 
7829
          iprot.skip(ftype)
-
 
7830
      elif fid == 2:
-
 
7831
        if ftype == TType.BOOL:
-
 
7832
          self.unset = iprot.readBool();
-
 
7833
        else:
-
 
7834
          iprot.skip(ftype)
-
 
7835
      elif fid == 3:
-
 
7836
        if ftype == TType.I64:
-
 
7837
          self.type = iprot.readI64();
7830
          self.type = iprot.readI64();
7838
        else:
7831
        else:
7839
          iprot.skip(ftype)
7832
          iprot.skip(ftype)
7840
      elif fid == 4:
7833
      elif fid == 2:
7841
        if ftype == TType.STRING:
7834
        if ftype == TType.STRING:
7842
          self.comment = iprot.readString();
7835
          self.description = iprot.readString();
7843
        else:
7836
        else:
7844
          iprot.skip(ftype)
7837
          iprot.skip(ftype)
7845
      else:
7838
      else:
7846
        iprot.skip(ftype)
7839
        iprot.skip(ftype)
7847
      iprot.readFieldEnd()
7840
      iprot.readFieldEnd()
Line 7849... Line 7842...
7849
 
7842
 
7850
  def write(self, oprot):
7843
  def write(self, oprot):
7851
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
7844
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
7852
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
7845
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
7853
      return
7846
      return
7854
    oprot.writeStructBegin('setAlert_args')
7847
    oprot.writeStructBegin('addAlert_args')
7855
    if self.orderId is not None:
-
 
7856
      oprot.writeFieldBegin('orderId', TType.I64, 1)
-
 
7857
      oprot.writeI64(self.orderId)
-
 
7858
      oprot.writeFieldEnd()
-
 
7859
    if self.unset is not None:
-
 
7860
      oprot.writeFieldBegin('unset', TType.BOOL, 2)
-
 
7861
      oprot.writeBool(self.unset)
-
 
7862
      oprot.writeFieldEnd()
-
 
7863
    if self.type is not None:
7848
    if self.type is not None:
7864
      oprot.writeFieldBegin('type', TType.I64, 3)
7849
      oprot.writeFieldBegin('type', TType.I64, 1)
7865
      oprot.writeI64(self.type)
7850
      oprot.writeI64(self.type)
7866
      oprot.writeFieldEnd()
7851
      oprot.writeFieldEnd()
7867
    if self.comment is not None:
7852
    if self.description is not None:
7868
      oprot.writeFieldBegin('comment', TType.STRING, 4)
7853
      oprot.writeFieldBegin('description', TType.STRING, 2)
7869
      oprot.writeString(self.comment)
7854
      oprot.writeString(self.description)
7870
      oprot.writeFieldEnd()
7855
      oprot.writeFieldEnd()
7871
    oprot.writeFieldStop()
7856
    oprot.writeFieldStop()
7872
    oprot.writeStructEnd()
7857
    oprot.writeStructEnd()
7873
 
7858
 
7874
  def validate(self):
7859
  def validate(self):
Line 7884... Line 7869...
7884
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
7869
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
7885
 
7870
 
7886
  def __ne__(self, other):
7871
  def __ne__(self, other):
7887
    return not (self == other)
7872
    return not (self == other)
7888
 
7873
 
7889
class setAlert_result:
7874
class addAlert_result:
7890
 
7875
 
7891
  thrift_spec = (
7876
  thrift_spec = (
7892
  )
7877
  )
7893
 
7878
 
7894
  def read(self, iprot):
7879
  def read(self, iprot):
Line 7907... Line 7892...
7907
 
7892
 
7908
  def write(self, oprot):
7893
  def write(self, oprot):
7909
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
7894
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
7910
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
7895
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
7911
      return
7896
      return
7912
    oprot.writeStructBegin('setAlert_result')
7897
    oprot.writeStructBegin('addAlert_result')
7913
    oprot.writeFieldStop()
7898
    oprot.writeFieldStop()
7914
    oprot.writeStructEnd()
7899
    oprot.writeStructEnd()
7915
 
7900
 
7916
  def validate(self):
7901
  def validate(self):
7917
    return
7902
    return