Subversion Repositories SmartDukaan

Rev

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

Rev 765 Rev 921
Line 96... Line 96...
96
     - jacket_number
96
     - jacket_number
97
     - billed_by
97
     - billed_by
98
    """
98
    """
99
    pass
99
    pass
100
 
100
 
-
 
101
  def acceptOrder(self, orderId):
-
 
102
    """
-
 
103
    Parameters:
-
 
104
     - orderId
-
 
105
    """
-
 
106
    pass
-
 
107
 
-
 
108
  def billOrder(self, orderId):
-
 
109
    """
-
 
110
    Parameters:
-
 
111
     - orderId
-
 
112
    """
-
 
113
    pass
-
 
114
 
101
  def getOrdersForTransaction(self, transactionId):
115
  def getOrdersForTransaction(self, transactionId):
102
    """
116
    """
103
    Parameters:
117
    Parameters:
104
     - transactionId
118
     - transactionId
105
    """
119
    """
Line 510... Line 524...
510
      return result.success
524
      return result.success
511
    if result.ex != None:
525
    if result.ex != None:
512
      raise result.ex
526
      raise result.ex
513
    raise TApplicationException(TApplicationException.MISSING_RESULT, "addBillingDetails failed: unknown result");
527
    raise TApplicationException(TApplicationException.MISSING_RESULT, "addBillingDetails failed: unknown result");
514
 
528
 
-
 
529
  def acceptOrder(self, orderId):
-
 
530
    """
-
 
531
    Parameters:
-
 
532
     - orderId
-
 
533
    """
-
 
534
    self.send_acceptOrder(orderId)
-
 
535
    return self.recv_acceptOrder()
-
 
536
 
-
 
537
  def send_acceptOrder(self, orderId):
-
 
538
    self._oprot.writeMessageBegin('acceptOrder', TMessageType.CALL, self._seqid)
-
 
539
    args = acceptOrder_args()
-
 
540
    args.orderId = orderId
-
 
541
    args.write(self._oprot)
-
 
542
    self._oprot.writeMessageEnd()
-
 
543
    self._oprot.trans.flush()
-
 
544
 
-
 
545
  def recv_acceptOrder(self, ):
-
 
546
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
-
 
547
    if mtype == TMessageType.EXCEPTION:
-
 
548
      x = TApplicationException()
-
 
549
      x.read(self._iprot)
-
 
550
      self._iprot.readMessageEnd()
-
 
551
      raise x
-
 
552
    result = acceptOrder_result()
-
 
553
    result.read(self._iprot)
-
 
554
    self._iprot.readMessageEnd()
-
 
555
    if result.success != None:
-
 
556
      return result.success
-
 
557
    if result.ex != None:
-
 
558
      raise result.ex
-
 
559
    raise TApplicationException(TApplicationException.MISSING_RESULT, "acceptOrder failed: unknown result");
-
 
560
 
-
 
561
  def billOrder(self, orderId):
-
 
562
    """
-
 
563
    Parameters:
-
 
564
     - orderId
-
 
565
    """
-
 
566
    self.send_billOrder(orderId)
-
 
567
    return self.recv_billOrder()
-
 
568
 
-
 
569
  def send_billOrder(self, orderId):
-
 
570
    self._oprot.writeMessageBegin('billOrder', TMessageType.CALL, self._seqid)
-
 
571
    args = billOrder_args()
-
 
572
    args.orderId = orderId
-
 
573
    args.write(self._oprot)
-
 
574
    self._oprot.writeMessageEnd()
-
 
575
    self._oprot.trans.flush()
-
 
576
 
-
 
577
  def recv_billOrder(self, ):
-
 
578
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
-
 
579
    if mtype == TMessageType.EXCEPTION:
-
 
580
      x = TApplicationException()
-
 
581
      x.read(self._iprot)
-
 
582
      self._iprot.readMessageEnd()
-
 
583
      raise x
-
 
584
    result = billOrder_result()
-
 
585
    result.read(self._iprot)
-
 
586
    self._iprot.readMessageEnd()
-
 
587
    if result.success != None:
-
 
588
      return result.success
-
 
589
    if result.ex != None:
-
 
590
      raise result.ex
-
 
591
    raise TApplicationException(TApplicationException.MISSING_RESULT, "billOrder failed: unknown result");
-
 
592
 
515
  def getOrdersForTransaction(self, transactionId):
593
  def getOrdersForTransaction(self, transactionId):
516
    """
594
    """
517
    Parameters:
595
    Parameters:
518
     - transactionId
596
     - transactionId
519
    """
597
    """
Line 793... Line 871...
793
    self._processMap["getTransactionStatus"] = Processor.process_getTransactionStatus
871
    self._processMap["getTransactionStatus"] = Processor.process_getTransactionStatus
794
    self._processMap["changeTransactionStatus"] = Processor.process_changeTransactionStatus
872
    self._processMap["changeTransactionStatus"] = Processor.process_changeTransactionStatus
795
    self._processMap["getAllOrders"] = Processor.process_getAllOrders
873
    self._processMap["getAllOrders"] = Processor.process_getAllOrders
796
    self._processMap["changeOrderStatus"] = Processor.process_changeOrderStatus
874
    self._processMap["changeOrderStatus"] = Processor.process_changeOrderStatus
797
    self._processMap["addBillingDetails"] = Processor.process_addBillingDetails
875
    self._processMap["addBillingDetails"] = Processor.process_addBillingDetails
-
 
876
    self._processMap["acceptOrder"] = Processor.process_acceptOrder
-
 
877
    self._processMap["billOrder"] = Processor.process_billOrder
798
    self._processMap["getOrdersForTransaction"] = Processor.process_getOrdersForTransaction
878
    self._processMap["getOrdersForTransaction"] = Processor.process_getOrdersForTransaction
799
    self._processMap["getOrdersForCustomer"] = Processor.process_getOrdersForCustomer
879
    self._processMap["getOrdersForCustomer"] = Processor.process_getOrdersForCustomer
800
    self._processMap["createOrder"] = Processor.process_createOrder
880
    self._processMap["createOrder"] = Processor.process_createOrder
801
    self._processMap["getOrder"] = Processor.process_getOrder
881
    self._processMap["getOrder"] = Processor.process_getOrder
802
    self._processMap["getLineItemsForOrder"] = Processor.process_getLineItemsForOrder
882
    self._processMap["getLineItemsForOrder"] = Processor.process_getLineItemsForOrder
Line 954... Line 1034...
954
    oprot.writeMessageBegin("addBillingDetails", TMessageType.REPLY, seqid)
1034
    oprot.writeMessageBegin("addBillingDetails", TMessageType.REPLY, seqid)
955
    result.write(oprot)
1035
    result.write(oprot)
956
    oprot.writeMessageEnd()
1036
    oprot.writeMessageEnd()
957
    oprot.trans.flush()
1037
    oprot.trans.flush()
958
 
1038
 
-
 
1039
  def process_acceptOrder(self, seqid, iprot, oprot):
-
 
1040
    args = acceptOrder_args()
-
 
1041
    args.read(iprot)
-
 
1042
    iprot.readMessageEnd()
-
 
1043
    result = acceptOrder_result()
-
 
1044
    try:
-
 
1045
      result.success = self._handler.acceptOrder(args.orderId)
-
 
1046
    except TransactionServiceException, ex:
-
 
1047
      result.ex = ex
-
 
1048
    oprot.writeMessageBegin("acceptOrder", TMessageType.REPLY, seqid)
-
 
1049
    result.write(oprot)
-
 
1050
    oprot.writeMessageEnd()
-
 
1051
    oprot.trans.flush()
-
 
1052
 
-
 
1053
  def process_billOrder(self, seqid, iprot, oprot):
-
 
1054
    args = billOrder_args()
-
 
1055
    args.read(iprot)
-
 
1056
    iprot.readMessageEnd()
-
 
1057
    result = billOrder_result()
-
 
1058
    try:
-
 
1059
      result.success = self._handler.billOrder(args.orderId)
-
 
1060
    except TransactionServiceException, ex:
-
 
1061
      result.ex = ex
-
 
1062
    oprot.writeMessageBegin("billOrder", TMessageType.REPLY, seqid)
-
 
1063
    result.write(oprot)
-
 
1064
    oprot.writeMessageEnd()
-
 
1065
    oprot.trans.flush()
-
 
1066
 
959
  def process_getOrdersForTransaction(self, seqid, iprot, oprot):
1067
  def process_getOrdersForTransaction(self, seqid, iprot, oprot):
960
    args = getOrdersForTransaction_args()
1068
    args = getOrdersForTransaction_args()
961
    args.read(iprot)
1069
    args.read(iprot)
962
    iprot.readMessageEnd()
1070
    iprot.readMessageEnd()
963
    result = getOrdersForTransaction_result()
1071
    result = getOrdersForTransaction_result()
Line 2423... Line 2531...
2423
    if self.success != None:
2531
    if self.success != None:
2424
      oprot.writeFieldBegin('success', TType.BOOL, 0)
2532
      oprot.writeFieldBegin('success', TType.BOOL, 0)
2425
      oprot.writeBool(self.success)
2533
      oprot.writeBool(self.success)
2426
      oprot.writeFieldEnd()
2534
      oprot.writeFieldEnd()
2427
    if self.ex != None:
2535
    if self.ex != None:
-
 
2536
      oprot.writeFieldBegin('ex', TType.STRUCT, 1)
-
 
2537
      self.ex.write(oprot)
-
 
2538
      oprot.writeFieldEnd()
-
 
2539
    oprot.writeFieldStop()
-
 
2540
    oprot.writeStructEnd()
-
 
2541
 
-
 
2542
  def __repr__(self):
-
 
2543
    L = ['%s=%r' % (key, value)
-
 
2544
      for key, value in self.__dict__.iteritems()]
-
 
2545
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
2546
 
-
 
2547
  def __eq__(self, other):
-
 
2548
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
2549
 
-
 
2550
  def __ne__(self, other):
-
 
2551
    return not (self == other)
-
 
2552
 
-
 
2553
class acceptOrder_args:
-
 
2554
  """
-
 
2555
  Attributes:
-
 
2556
   - orderId
-
 
2557
  """
-
 
2558
 
-
 
2559
  thrift_spec = (
-
 
2560
    None, # 0
-
 
2561
    (1, TType.I64, 'orderId', None, None, ), # 1
-
 
2562
  )
-
 
2563
 
-
 
2564
  def __init__(self, orderId=None,):
-
 
2565
    self.orderId = orderId
-
 
2566
 
-
 
2567
  def read(self, iprot):
-
 
2568
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
2569
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
2570
      return
-
 
2571
    iprot.readStructBegin()
-
 
2572
    while True:
-
 
2573
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
2574
      if ftype == TType.STOP:
-
 
2575
        break
-
 
2576
      if fid == 1:
-
 
2577
        if ftype == TType.I64:
-
 
2578
          self.orderId = iprot.readI64();
-
 
2579
        else:
-
 
2580
          iprot.skip(ftype)
-
 
2581
      else:
-
 
2582
        iprot.skip(ftype)
-
 
2583
      iprot.readFieldEnd()
-
 
2584
    iprot.readStructEnd()
-
 
2585
 
-
 
2586
  def write(self, oprot):
-
 
2587
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
2588
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
2589
      return
-
 
2590
    oprot.writeStructBegin('acceptOrder_args')
-
 
2591
    if self.orderId != None:
-
 
2592
      oprot.writeFieldBegin('orderId', TType.I64, 1)
-
 
2593
      oprot.writeI64(self.orderId)
-
 
2594
      oprot.writeFieldEnd()
-
 
2595
    oprot.writeFieldStop()
-
 
2596
    oprot.writeStructEnd()
-
 
2597
 
-
 
2598
  def __repr__(self):
-
 
2599
    L = ['%s=%r' % (key, value)
-
 
2600
      for key, value in self.__dict__.iteritems()]
-
 
2601
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
2602
 
-
 
2603
  def __eq__(self, other):
-
 
2604
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
2605
 
-
 
2606
  def __ne__(self, other):
-
 
2607
    return not (self == other)
-
 
2608
 
-
 
2609
class acceptOrder_result:
-
 
2610
  """
-
 
2611
  Attributes:
-
 
2612
   - success
-
 
2613
   - ex
-
 
2614
  """
-
 
2615
 
-
 
2616
  thrift_spec = (
-
 
2617
    (0, TType.BOOL, 'success', None, None, ), # 0
-
 
2618
    (1, TType.STRUCT, 'ex', (TransactionServiceException, TransactionServiceException.thrift_spec), None, ), # 1
-
 
2619
  )
-
 
2620
 
-
 
2621
  def __init__(self, success=None, ex=None,):
-
 
2622
    self.success = success
-
 
2623
    self.ex = ex
-
 
2624
 
-
 
2625
  def read(self, iprot):
-
 
2626
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
2627
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
2628
      return
-
 
2629
    iprot.readStructBegin()
-
 
2630
    while True:
-
 
2631
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
2632
      if ftype == TType.STOP:
-
 
2633
        break
-
 
2634
      if fid == 0:
-
 
2635
        if ftype == TType.BOOL:
-
 
2636
          self.success = iprot.readBool();
-
 
2637
        else:
-
 
2638
          iprot.skip(ftype)
-
 
2639
      elif fid == 1:
-
 
2640
        if ftype == TType.STRUCT:
-
 
2641
          self.ex = TransactionServiceException()
-
 
2642
          self.ex.read(iprot)
-
 
2643
        else:
-
 
2644
          iprot.skip(ftype)
-
 
2645
      else:
-
 
2646
        iprot.skip(ftype)
-
 
2647
      iprot.readFieldEnd()
-
 
2648
    iprot.readStructEnd()
-
 
2649
 
-
 
2650
  def write(self, oprot):
-
 
2651
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
2652
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
2653
      return
-
 
2654
    oprot.writeStructBegin('acceptOrder_result')
-
 
2655
    if self.success != None:
-
 
2656
      oprot.writeFieldBegin('success', TType.BOOL, 0)
-
 
2657
      oprot.writeBool(self.success)
-
 
2658
      oprot.writeFieldEnd()
-
 
2659
    if self.ex != None:
-
 
2660
      oprot.writeFieldBegin('ex', TType.STRUCT, 1)
-
 
2661
      self.ex.write(oprot)
-
 
2662
      oprot.writeFieldEnd()
-
 
2663
    oprot.writeFieldStop()
-
 
2664
    oprot.writeStructEnd()
-
 
2665
 
-
 
2666
  def __repr__(self):
-
 
2667
    L = ['%s=%r' % (key, value)
-
 
2668
      for key, value in self.__dict__.iteritems()]
-
 
2669
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
2670
 
-
 
2671
  def __eq__(self, other):
-
 
2672
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
2673
 
-
 
2674
  def __ne__(self, other):
-
 
2675
    return not (self == other)
-
 
2676
 
-
 
2677
class billOrder_args:
-
 
2678
  """
-
 
2679
  Attributes:
-
 
2680
   - orderId
-
 
2681
  """
-
 
2682
 
-
 
2683
  thrift_spec = (
-
 
2684
    None, # 0
-
 
2685
    (1, TType.I64, 'orderId', None, None, ), # 1
-
 
2686
  )
-
 
2687
 
-
 
2688
  def __init__(self, orderId=None,):
-
 
2689
    self.orderId = orderId
-
 
2690
 
-
 
2691
  def read(self, iprot):
-
 
2692
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
2693
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
2694
      return
-
 
2695
    iprot.readStructBegin()
-
 
2696
    while True:
-
 
2697
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
2698
      if ftype == TType.STOP:
-
 
2699
        break
-
 
2700
      if fid == 1:
-
 
2701
        if ftype == TType.I64:
-
 
2702
          self.orderId = iprot.readI64();
-
 
2703
        else:
-
 
2704
          iprot.skip(ftype)
-
 
2705
      else:
-
 
2706
        iprot.skip(ftype)
-
 
2707
      iprot.readFieldEnd()
-
 
2708
    iprot.readStructEnd()
-
 
2709
 
-
 
2710
  def write(self, oprot):
-
 
2711
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
2712
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
2713
      return
-
 
2714
    oprot.writeStructBegin('billOrder_args')
-
 
2715
    if self.orderId != None:
-
 
2716
      oprot.writeFieldBegin('orderId', TType.I64, 1)
-
 
2717
      oprot.writeI64(self.orderId)
-
 
2718
      oprot.writeFieldEnd()
-
 
2719
    oprot.writeFieldStop()
-
 
2720
    oprot.writeStructEnd()
-
 
2721
 
-
 
2722
  def __repr__(self):
-
 
2723
    L = ['%s=%r' % (key, value)
-
 
2724
      for key, value in self.__dict__.iteritems()]
-
 
2725
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
2726
 
-
 
2727
  def __eq__(self, other):
-
 
2728
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
2729
 
-
 
2730
  def __ne__(self, other):
-
 
2731
    return not (self == other)
-
 
2732
 
-
 
2733
class billOrder_result:
-
 
2734
  """
-
 
2735
  Attributes:
-
 
2736
   - success
-
 
2737
   - ex
-
 
2738
  """
-
 
2739
 
-
 
2740
  thrift_spec = (
-
 
2741
    (0, TType.BOOL, 'success', None, None, ), # 0
-
 
2742
    (1, TType.STRUCT, 'ex', (TransactionServiceException, TransactionServiceException.thrift_spec), None, ), # 1
-
 
2743
  )
-
 
2744
 
-
 
2745
  def __init__(self, success=None, ex=None,):
-
 
2746
    self.success = success
-
 
2747
    self.ex = ex
-
 
2748
 
-
 
2749
  def read(self, iprot):
-
 
2750
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
2751
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
2752
      return
-
 
2753
    iprot.readStructBegin()
-
 
2754
    while True:
-
 
2755
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
2756
      if ftype == TType.STOP:
-
 
2757
        break
-
 
2758
      if fid == 0:
-
 
2759
        if ftype == TType.BOOL:
-
 
2760
          self.success = iprot.readBool();
-
 
2761
        else:
-
 
2762
          iprot.skip(ftype)
-
 
2763
      elif fid == 1:
-
 
2764
        if ftype == TType.STRUCT:
-
 
2765
          self.ex = TransactionServiceException()
-
 
2766
          self.ex.read(iprot)
-
 
2767
        else:
-
 
2768
          iprot.skip(ftype)
-
 
2769
      else:
-
 
2770
        iprot.skip(ftype)
-
 
2771
      iprot.readFieldEnd()
-
 
2772
    iprot.readStructEnd()
-
 
2773
 
-
 
2774
  def write(self, oprot):
-
 
2775
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
2776
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
2777
      return
-
 
2778
    oprot.writeStructBegin('billOrder_result')
-
 
2779
    if self.success != None:
-
 
2780
      oprot.writeFieldBegin('success', TType.BOOL, 0)
-
 
2781
      oprot.writeBool(self.success)
-
 
2782
      oprot.writeFieldEnd()
-
 
2783
    if self.ex != None:
2428
      oprot.writeFieldBegin('ex', TType.STRUCT, 1)
2784
      oprot.writeFieldBegin('ex', TType.STRUCT, 1)
2429
      self.ex.write(oprot)
2785
      self.ex.write(oprot)
2430
      oprot.writeFieldEnd()
2786
      oprot.writeFieldEnd()
2431
    oprot.writeFieldStop()
2787
    oprot.writeFieldStop()
2432
    oprot.writeStructEnd()
2788
    oprot.writeStructEnd()