Subversion Repositories SmartDukaan

Rev

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

Rev 5326 Rev 5469
Line 109... Line 109...
109
    Parameters:
109
    Parameters:
110
     - entityId
110
     - entityId
111
    """
111
    """
112
    pass
112
    pass
113
 
113
 
-
 
114
  def addVoucher(self, voucher):
-
 
115
    """
-
 
116
    Parameters:
-
 
117
     - voucher
-
 
118
    """
-
 
119
    pass
-
 
120
 
-
 
121
  def assignVoucher(self, userId, userEmail, voucherType, amount):
-
 
122
    """
-
 
123
    Parameters:
-
 
124
     - userId
-
 
125
     - userEmail
-
 
126
     - voucherType
-
 
127
     - amount
-
 
128
    """
-
 
129
    pass
-
 
130
 
-
 
131
  def markVoucherAsRedeemed(self, voucherCode, redeemedOn):
-
 
132
    """
-
 
133
    Parameters:
-
 
134
     - voucherCode
-
 
135
     - redeemedOn
-
 
136
    """
-
 
137
    pass
-
 
138
 
114
 
139
 
115
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
140
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
116
  """
141
  """
117
  Promotion Service
142
  Promotion Service
118
  """
143
  """
Line 504... Line 529...
504
    self._iprot.readMessageEnd()
529
    self._iprot.readMessageEnd()
505
    if result.success is not None:
530
    if result.success is not None:
506
      return result.success
531
      return result.success
507
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getDiscountsForEntity failed: unknown result");
532
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getDiscountsForEntity failed: unknown result");
508
 
533
 
-
 
534
  def addVoucher(self, voucher):
-
 
535
    """
-
 
536
    Parameters:
-
 
537
     - voucher
-
 
538
    """
-
 
539
    self.send_addVoucher(voucher)
-
 
540
    self.recv_addVoucher()
-
 
541
 
-
 
542
  def send_addVoucher(self, voucher):
-
 
543
    self._oprot.writeMessageBegin('addVoucher', TMessageType.CALL, self._seqid)
-
 
544
    args = addVoucher_args()
-
 
545
    args.voucher = voucher
-
 
546
    args.write(self._oprot)
-
 
547
    self._oprot.writeMessageEnd()
-
 
548
    self._oprot.trans.flush()
-
 
549
 
-
 
550
  def recv_addVoucher(self, ):
-
 
551
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
-
 
552
    if mtype == TMessageType.EXCEPTION:
-
 
553
      x = TApplicationException()
-
 
554
      x.read(self._iprot)
-
 
555
      self._iprot.readMessageEnd()
-
 
556
      raise x
-
 
557
    result = addVoucher_result()
-
 
558
    result.read(self._iprot)
-
 
559
    self._iprot.readMessageEnd()
-
 
560
    return
-
 
561
 
-
 
562
  def assignVoucher(self, userId, userEmail, voucherType, amount):
-
 
563
    """
-
 
564
    Parameters:
-
 
565
     - userId
-
 
566
     - userEmail
-
 
567
     - voucherType
-
 
568
     - amount
-
 
569
    """
-
 
570
    self.send_assignVoucher(userId, userEmail, voucherType, amount)
-
 
571
    return self.recv_assignVoucher()
-
 
572
 
-
 
573
  def send_assignVoucher(self, userId, userEmail, voucherType, amount):
-
 
574
    self._oprot.writeMessageBegin('assignVoucher', TMessageType.CALL, self._seqid)
-
 
575
    args = assignVoucher_args()
-
 
576
    args.userId = userId
-
 
577
    args.userEmail = userEmail
-
 
578
    args.voucherType = voucherType
-
 
579
    args.amount = amount
-
 
580
    args.write(self._oprot)
-
 
581
    self._oprot.writeMessageEnd()
-
 
582
    self._oprot.trans.flush()
-
 
583
 
-
 
584
  def recv_assignVoucher(self, ):
-
 
585
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
-
 
586
    if mtype == TMessageType.EXCEPTION:
-
 
587
      x = TApplicationException()
-
 
588
      x.read(self._iprot)
-
 
589
      self._iprot.readMessageEnd()
-
 
590
      raise x
-
 
591
    result = assignVoucher_result()
-
 
592
    result.read(self._iprot)
-
 
593
    self._iprot.readMessageEnd()
-
 
594
    if result.success is not None:
-
 
595
      return result.success
-
 
596
    raise TApplicationException(TApplicationException.MISSING_RESULT, "assignVoucher failed: unknown result");
-
 
597
 
-
 
598
  def markVoucherAsRedeemed(self, voucherCode, redeemedOn):
-
 
599
    """
-
 
600
    Parameters:
-
 
601
     - voucherCode
-
 
602
     - redeemedOn
-
 
603
    """
-
 
604
    self.send_markVoucherAsRedeemed(voucherCode, redeemedOn)
-
 
605
    return self.recv_markVoucherAsRedeemed()
-
 
606
 
-
 
607
  def send_markVoucherAsRedeemed(self, voucherCode, redeemedOn):
-
 
608
    self._oprot.writeMessageBegin('markVoucherAsRedeemed', TMessageType.CALL, self._seqid)
-
 
609
    args = markVoucherAsRedeemed_args()
-
 
610
    args.voucherCode = voucherCode
-
 
611
    args.redeemedOn = redeemedOn
-
 
612
    args.write(self._oprot)
-
 
613
    self._oprot.writeMessageEnd()
-
 
614
    self._oprot.trans.flush()
-
 
615
 
-
 
616
  def recv_markVoucherAsRedeemed(self, ):
-
 
617
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
-
 
618
    if mtype == TMessageType.EXCEPTION:
-
 
619
      x = TApplicationException()
-
 
620
      x.read(self._iprot)
-
 
621
      self._iprot.readMessageEnd()
-
 
622
      raise x
-
 
623
    result = markVoucherAsRedeemed_result()
-
 
624
    result.read(self._iprot)
-
 
625
    self._iprot.readMessageEnd()
-
 
626
    if result.success is not None:
-
 
627
      return result.success
-
 
628
    raise TApplicationException(TApplicationException.MISSING_RESULT, "markVoucherAsRedeemed failed: unknown result");
-
 
629
 
509
 
630
 
510
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
631
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
511
  def __init__(self, handler):
632
  def __init__(self, handler):
512
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
633
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
513
    self._processMap["createPromotion"] = Processor.process_createPromotion
634
    self._processMap["createPromotion"] = Processor.process_createPromotion
Line 520... Line 641...
520
    self._processMap["getActiveCoupons"] = Processor.process_getActiveCoupons
641
    self._processMap["getActiveCoupons"] = Processor.process_getActiveCoupons
521
    self._processMap["getSuccessfulPaymentCountForCoupon"] = Processor.process_getSuccessfulPaymentCountForCoupon
642
    self._processMap["getSuccessfulPaymentCountForCoupon"] = Processor.process_getSuccessfulPaymentCountForCoupon
522
    self._processMap["getRuleDocString"] = Processor.process_getRuleDocString
643
    self._processMap["getRuleDocString"] = Processor.process_getRuleDocString
523
    self._processMap["getItemDiscountMap"] = Processor.process_getItemDiscountMap
644
    self._processMap["getItemDiscountMap"] = Processor.process_getItemDiscountMap
524
    self._processMap["getDiscountsForEntity"] = Processor.process_getDiscountsForEntity
645
    self._processMap["getDiscountsForEntity"] = Processor.process_getDiscountsForEntity
-
 
646
    self._processMap["addVoucher"] = Processor.process_addVoucher
-
 
647
    self._processMap["assignVoucher"] = Processor.process_assignVoucher
-
 
648
    self._processMap["markVoucherAsRedeemed"] = Processor.process_markVoucherAsRedeemed
525
 
649
 
526
  def process(self, iprot, oprot):
650
  def process(self, iprot, oprot):
527
    (name, type, seqid) = iprot.readMessageBegin()
651
    (name, type, seqid) = iprot.readMessageBegin()
528
    if name not in self._processMap:
652
    if name not in self._processMap:
529
      iprot.skip(TType.STRUCT)
653
      iprot.skip(TType.STRUCT)
Line 698... Line 822...
698
    oprot.writeMessageBegin("getDiscountsForEntity", TMessageType.REPLY, seqid)
822
    oprot.writeMessageBegin("getDiscountsForEntity", TMessageType.REPLY, seqid)
699
    result.write(oprot)
823
    result.write(oprot)
700
    oprot.writeMessageEnd()
824
    oprot.writeMessageEnd()
701
    oprot.trans.flush()
825
    oprot.trans.flush()
702
 
826
 
-
 
827
  def process_addVoucher(self, seqid, iprot, oprot):
-
 
828
    args = addVoucher_args()
-
 
829
    args.read(iprot)
-
 
830
    iprot.readMessageEnd()
-
 
831
    result = addVoucher_result()
-
 
832
    self._handler.addVoucher(args.voucher)
-
 
833
    oprot.writeMessageBegin("addVoucher", TMessageType.REPLY, seqid)
-
 
834
    result.write(oprot)
-
 
835
    oprot.writeMessageEnd()
-
 
836
    oprot.trans.flush()
-
 
837
 
-
 
838
  def process_assignVoucher(self, seqid, iprot, oprot):
-
 
839
    args = assignVoucher_args()
-
 
840
    args.read(iprot)
-
 
841
    iprot.readMessageEnd()
-
 
842
    result = assignVoucher_result()
-
 
843
    result.success = self._handler.assignVoucher(args.userId, args.userEmail, args.voucherType, args.amount)
-
 
844
    oprot.writeMessageBegin("assignVoucher", TMessageType.REPLY, seqid)
-
 
845
    result.write(oprot)
-
 
846
    oprot.writeMessageEnd()
-
 
847
    oprot.trans.flush()
-
 
848
 
-
 
849
  def process_markVoucherAsRedeemed(self, seqid, iprot, oprot):
-
 
850
    args = markVoucherAsRedeemed_args()
-
 
851
    args.read(iprot)
-
 
852
    iprot.readMessageEnd()
-
 
853
    result = markVoucherAsRedeemed_result()
-
 
854
    result.success = self._handler.markVoucherAsRedeemed(args.voucherCode, args.redeemedOn)
-
 
855
    oprot.writeMessageBegin("markVoucherAsRedeemed", TMessageType.REPLY, seqid)
-
 
856
    result.write(oprot)
-
 
857
    oprot.writeMessageEnd()
-
 
858
    oprot.trans.flush()
-
 
859
 
703
 
860
 
704
# HELPER FUNCTIONS AND STRUCTURES
861
# HELPER FUNCTIONS AND STRUCTURES
705
 
862
 
706
class createPromotion_args:
863
class createPromotion_args:
707
  """
864
  """
Line 2319... Line 2476...
2319
      oprot.writeFieldEnd()
2476
      oprot.writeFieldEnd()
2320
    oprot.writeFieldStop()
2477
    oprot.writeFieldStop()
2321
    oprot.writeStructEnd()
2478
    oprot.writeStructEnd()
2322
 
2479
 
2323
  def validate(self):
2480
  def validate(self):
-
 
2481
    return
-
 
2482
 
-
 
2483
 
-
 
2484
  def __repr__(self):
-
 
2485
    L = ['%s=%r' % (key, value)
-
 
2486
      for key, value in self.__dict__.iteritems()]
-
 
2487
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
2488
 
-
 
2489
  def __eq__(self, other):
-
 
2490
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
2491
 
-
 
2492
  def __ne__(self, other):
-
 
2493
    return not (self == other)
-
 
2494
 
-
 
2495
class addVoucher_args:
-
 
2496
  """
-
 
2497
  Attributes:
-
 
2498
   - voucher
-
 
2499
  """
-
 
2500
 
-
 
2501
  thrift_spec = (
-
 
2502
    None, # 0
-
 
2503
    (1, TType.STRUCT, 'voucher', (Voucher, Voucher.thrift_spec), None, ), # 1
-
 
2504
  )
-
 
2505
 
-
 
2506
  def __init__(self, voucher=None,):
-
 
2507
    self.voucher = voucher
-
 
2508
 
-
 
2509
  def read(self, iprot):
-
 
2510
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
2511
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
2512
      return
-
 
2513
    iprot.readStructBegin()
-
 
2514
    while True:
-
 
2515
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
2516
      if ftype == TType.STOP:
-
 
2517
        break
-
 
2518
      if fid == 1:
-
 
2519
        if ftype == TType.STRUCT:
-
 
2520
          self.voucher = Voucher()
-
 
2521
          self.voucher.read(iprot)
-
 
2522
        else:
-
 
2523
          iprot.skip(ftype)
-
 
2524
      else:
-
 
2525
        iprot.skip(ftype)
-
 
2526
      iprot.readFieldEnd()
-
 
2527
    iprot.readStructEnd()
-
 
2528
 
-
 
2529
  def write(self, oprot):
-
 
2530
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
2531
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
2532
      return
-
 
2533
    oprot.writeStructBegin('addVoucher_args')
-
 
2534
    if self.voucher is not None:
-
 
2535
      oprot.writeFieldBegin('voucher', TType.STRUCT, 1)
-
 
2536
      self.voucher.write(oprot)
-
 
2537
      oprot.writeFieldEnd()
-
 
2538
    oprot.writeFieldStop()
-
 
2539
    oprot.writeStructEnd()
-
 
2540
 
-
 
2541
  def validate(self):
-
 
2542
    return
-
 
2543
 
-
 
2544
 
-
 
2545
  def __repr__(self):
-
 
2546
    L = ['%s=%r' % (key, value)
-
 
2547
      for key, value in self.__dict__.iteritems()]
-
 
2548
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
2549
 
-
 
2550
  def __eq__(self, other):
-
 
2551
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
2552
 
-
 
2553
  def __ne__(self, other):
-
 
2554
    return not (self == other)
-
 
2555
 
-
 
2556
class addVoucher_result:
-
 
2557
 
-
 
2558
  thrift_spec = (
-
 
2559
  )
-
 
2560
 
-
 
2561
  def read(self, iprot):
-
 
2562
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
2563
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
2564
      return
-
 
2565
    iprot.readStructBegin()
-
 
2566
    while True:
-
 
2567
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
2568
      if ftype == TType.STOP:
-
 
2569
        break
-
 
2570
      else:
-
 
2571
        iprot.skip(ftype)
-
 
2572
      iprot.readFieldEnd()
-
 
2573
    iprot.readStructEnd()
-
 
2574
 
-
 
2575
  def write(self, oprot):
-
 
2576
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
2577
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
2578
      return
-
 
2579
    oprot.writeStructBegin('addVoucher_result')
-
 
2580
    oprot.writeFieldStop()
-
 
2581
    oprot.writeStructEnd()
-
 
2582
 
-
 
2583
  def validate(self):
-
 
2584
    return
-
 
2585
 
-
 
2586
 
-
 
2587
  def __repr__(self):
-
 
2588
    L = ['%s=%r' % (key, value)
-
 
2589
      for key, value in self.__dict__.iteritems()]
-
 
2590
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
2591
 
-
 
2592
  def __eq__(self, other):
-
 
2593
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
2594
 
-
 
2595
  def __ne__(self, other):
-
 
2596
    return not (self == other)
-
 
2597
 
-
 
2598
class assignVoucher_args:
-
 
2599
  """
-
 
2600
  Attributes:
-
 
2601
   - userId
-
 
2602
   - userEmail
-
 
2603
   - voucherType
-
 
2604
   - amount
-
 
2605
  """
-
 
2606
 
-
 
2607
  thrift_spec = (
-
 
2608
    None, # 0
-
 
2609
    (1, TType.I64, 'userId', None, None, ), # 1
-
 
2610
    (2, TType.STRING, 'userEmail', None, None, ), # 2
-
 
2611
    (3, TType.I32, 'voucherType', None, None, ), # 3
-
 
2612
    (4, TType.I64, 'amount', None, None, ), # 4
-
 
2613
  )
-
 
2614
 
-
 
2615
  def __init__(self, userId=None, userEmail=None, voucherType=None, amount=None,):
-
 
2616
    self.userId = userId
-
 
2617
    self.userEmail = userEmail
-
 
2618
    self.voucherType = voucherType
-
 
2619
    self.amount = amount
-
 
2620
 
-
 
2621
  def read(self, iprot):
-
 
2622
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
2623
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
2624
      return
-
 
2625
    iprot.readStructBegin()
-
 
2626
    while True:
-
 
2627
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
2628
      if ftype == TType.STOP:
-
 
2629
        break
-
 
2630
      if fid == 1:
-
 
2631
        if ftype == TType.I64:
-
 
2632
          self.userId = iprot.readI64();
-
 
2633
        else:
-
 
2634
          iprot.skip(ftype)
-
 
2635
      elif fid == 2:
-
 
2636
        if ftype == TType.STRING:
-
 
2637
          self.userEmail = iprot.readString();
-
 
2638
        else:
-
 
2639
          iprot.skip(ftype)
-
 
2640
      elif fid == 3:
-
 
2641
        if ftype == TType.I32:
-
 
2642
          self.voucherType = iprot.readI32();
-
 
2643
        else:
-
 
2644
          iprot.skip(ftype)
-
 
2645
      elif fid == 4:
-
 
2646
        if ftype == TType.I64:
-
 
2647
          self.amount = iprot.readI64();
-
 
2648
        else:
-
 
2649
          iprot.skip(ftype)
-
 
2650
      else:
-
 
2651
        iprot.skip(ftype)
-
 
2652
      iprot.readFieldEnd()
-
 
2653
    iprot.readStructEnd()
-
 
2654
 
-
 
2655
  def write(self, oprot):
-
 
2656
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
2657
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
2658
      return
-
 
2659
    oprot.writeStructBegin('assignVoucher_args')
-
 
2660
    if self.userId is not None:
-
 
2661
      oprot.writeFieldBegin('userId', TType.I64, 1)
-
 
2662
      oprot.writeI64(self.userId)
-
 
2663
      oprot.writeFieldEnd()
-
 
2664
    if self.userEmail is not None:
-
 
2665
      oprot.writeFieldBegin('userEmail', TType.STRING, 2)
-
 
2666
      oprot.writeString(self.userEmail)
-
 
2667
      oprot.writeFieldEnd()
-
 
2668
    if self.voucherType is not None:
-
 
2669
      oprot.writeFieldBegin('voucherType', TType.I32, 3)
-
 
2670
      oprot.writeI32(self.voucherType)
-
 
2671
      oprot.writeFieldEnd()
-
 
2672
    if self.amount is not None:
-
 
2673
      oprot.writeFieldBegin('amount', TType.I64, 4)
-
 
2674
      oprot.writeI64(self.amount)
-
 
2675
      oprot.writeFieldEnd()
-
 
2676
    oprot.writeFieldStop()
-
 
2677
    oprot.writeStructEnd()
-
 
2678
 
-
 
2679
  def validate(self):
-
 
2680
    return
-
 
2681
 
-
 
2682
 
-
 
2683
  def __repr__(self):
-
 
2684
    L = ['%s=%r' % (key, value)
-
 
2685
      for key, value in self.__dict__.iteritems()]
-
 
2686
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
2687
 
-
 
2688
  def __eq__(self, other):
-
 
2689
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
2690
 
-
 
2691
  def __ne__(self, other):
-
 
2692
    return not (self == other)
-
 
2693
 
-
 
2694
class assignVoucher_result:
-
 
2695
  """
-
 
2696
  Attributes:
-
 
2697
   - success
-
 
2698
  """
-
 
2699
 
-
 
2700
  thrift_spec = (
-
 
2701
    (0, TType.STRUCT, 'success', (Voucher, Voucher.thrift_spec), None, ), # 0
-
 
2702
  )
-
 
2703
 
-
 
2704
  def __init__(self, success=None,):
-
 
2705
    self.success = success
-
 
2706
 
-
 
2707
  def read(self, iprot):
-
 
2708
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
2709
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
2710
      return
-
 
2711
    iprot.readStructBegin()
-
 
2712
    while True:
-
 
2713
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
2714
      if ftype == TType.STOP:
-
 
2715
        break
-
 
2716
      if fid == 0:
-
 
2717
        if ftype == TType.STRUCT:
-
 
2718
          self.success = Voucher()
-
 
2719
          self.success.read(iprot)
-
 
2720
        else:
-
 
2721
          iprot.skip(ftype)
-
 
2722
      else:
-
 
2723
        iprot.skip(ftype)
-
 
2724
      iprot.readFieldEnd()
-
 
2725
    iprot.readStructEnd()
-
 
2726
 
-
 
2727
  def write(self, oprot):
-
 
2728
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
2729
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
2730
      return
-
 
2731
    oprot.writeStructBegin('assignVoucher_result')
-
 
2732
    if self.success is not None:
-
 
2733
      oprot.writeFieldBegin('success', TType.STRUCT, 0)
-
 
2734
      self.success.write(oprot)
-
 
2735
      oprot.writeFieldEnd()
-
 
2736
    oprot.writeFieldStop()
-
 
2737
    oprot.writeStructEnd()
-
 
2738
 
-
 
2739
  def validate(self):
-
 
2740
    return
-
 
2741
 
-
 
2742
 
-
 
2743
  def __repr__(self):
-
 
2744
    L = ['%s=%r' % (key, value)
-
 
2745
      for key, value in self.__dict__.iteritems()]
-
 
2746
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
2747
 
-
 
2748
  def __eq__(self, other):
-
 
2749
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
2750
 
-
 
2751
  def __ne__(self, other):
-
 
2752
    return not (self == other)
-
 
2753
 
-
 
2754
class markVoucherAsRedeemed_args:
-
 
2755
  """
-
 
2756
  Attributes:
-
 
2757
   - voucherCode
-
 
2758
   - redeemedOn
-
 
2759
  """
-
 
2760
 
-
 
2761
  thrift_spec = (
-
 
2762
    None, # 0
-
 
2763
    (1, TType.STRING, 'voucherCode', None, None, ), # 1
-
 
2764
    (2, TType.I64, 'redeemedOn', None, None, ), # 2
-
 
2765
  )
-
 
2766
 
-
 
2767
  def __init__(self, voucherCode=None, redeemedOn=None,):
-
 
2768
    self.voucherCode = voucherCode
-
 
2769
    self.redeemedOn = redeemedOn
-
 
2770
 
-
 
2771
  def read(self, iprot):
-
 
2772
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
2773
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
2774
      return
-
 
2775
    iprot.readStructBegin()
-
 
2776
    while True:
-
 
2777
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
2778
      if ftype == TType.STOP:
-
 
2779
        break
-
 
2780
      if fid == 1:
-
 
2781
        if ftype == TType.STRING:
-
 
2782
          self.voucherCode = iprot.readString();
-
 
2783
        else:
-
 
2784
          iprot.skip(ftype)
-
 
2785
      elif fid == 2:
-
 
2786
        if ftype == TType.I64:
-
 
2787
          self.redeemedOn = iprot.readI64();
-
 
2788
        else:
-
 
2789
          iprot.skip(ftype)
-
 
2790
      else:
-
 
2791
        iprot.skip(ftype)
-
 
2792
      iprot.readFieldEnd()
-
 
2793
    iprot.readStructEnd()
-
 
2794
 
-
 
2795
  def write(self, oprot):
-
 
2796
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
2797
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
2798
      return
-
 
2799
    oprot.writeStructBegin('markVoucherAsRedeemed_args')
-
 
2800
    if self.voucherCode is not None:
-
 
2801
      oprot.writeFieldBegin('voucherCode', TType.STRING, 1)
-
 
2802
      oprot.writeString(self.voucherCode)
-
 
2803
      oprot.writeFieldEnd()
-
 
2804
    if self.redeemedOn is not None:
-
 
2805
      oprot.writeFieldBegin('redeemedOn', TType.I64, 2)
-
 
2806
      oprot.writeI64(self.redeemedOn)
-
 
2807
      oprot.writeFieldEnd()
-
 
2808
    oprot.writeFieldStop()
-
 
2809
    oprot.writeStructEnd()
-
 
2810
 
-
 
2811
  def validate(self):
-
 
2812
    return
-
 
2813
 
-
 
2814
 
-
 
2815
  def __repr__(self):
-
 
2816
    L = ['%s=%r' % (key, value)
-
 
2817
      for key, value in self.__dict__.iteritems()]
-
 
2818
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
2819
 
-
 
2820
  def __eq__(self, other):
-
 
2821
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
2822
 
-
 
2823
  def __ne__(self, other):
-
 
2824
    return not (self == other)
-
 
2825
 
-
 
2826
class markVoucherAsRedeemed_result:
-
 
2827
  """
-
 
2828
  Attributes:
-
 
2829
   - success
-
 
2830
  """
-
 
2831
 
-
 
2832
  thrift_spec = (
-
 
2833
    (0, TType.BOOL, 'success', None, None, ), # 0
-
 
2834
  )
-
 
2835
 
-
 
2836
  def __init__(self, success=None,):
-
 
2837
    self.success = success
-
 
2838
 
-
 
2839
  def read(self, iprot):
-
 
2840
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
2841
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
2842
      return
-
 
2843
    iprot.readStructBegin()
-
 
2844
    while True:
-
 
2845
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
2846
      if ftype == TType.STOP:
-
 
2847
        break
-
 
2848
      if fid == 0:
-
 
2849
        if ftype == TType.BOOL:
-
 
2850
          self.success = iprot.readBool();
-
 
2851
        else:
-
 
2852
          iprot.skip(ftype)
-
 
2853
      else:
-
 
2854
        iprot.skip(ftype)
-
 
2855
      iprot.readFieldEnd()
-
 
2856
    iprot.readStructEnd()
-
 
2857
 
-
 
2858
  def write(self, oprot):
-
 
2859
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
2860
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
2861
      return
-
 
2862
    oprot.writeStructBegin('markVoucherAsRedeemed_result')
-
 
2863
    if self.success is not None:
-
 
2864
      oprot.writeFieldBegin('success', TType.BOOL, 0)
-
 
2865
      oprot.writeBool(self.success)
-
 
2866
      oprot.writeFieldEnd()
-
 
2867
    oprot.writeFieldStop()
-
 
2868
    oprot.writeStructEnd()
-
 
2869
 
-
 
2870
  def validate(self):
2324
    return
2871
    return
2325
 
2872
 
2326
 
2873
 
2327
  def __repr__(self):
2874
  def __repr__(self):
2328
    L = ['%s=%r' % (key, value)
2875
    L = ['%s=%r' % (key, value)