Subversion Repositories SmartDukaan

Rev

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

Rev 6104 Rev 8369
Line 150... Line 150...
150
    pass
150
    pass
151
 
151
 
152
  def getOpenTicketsMap(self, ):
152
  def getOpenTicketsMap(self, ):
153
    pass
153
    pass
154
 
154
 
-
 
155
  def getFedexReconciliationDataMap(self, order_ids, method_key):
-
 
156
    """
-
 
157
    Parameters:
-
 
158
     - order_ids
-
 
159
     - method_key
-
 
160
    """
-
 
161
    pass
-
 
162
 
155
 
163
 
156
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
164
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
157
  def __init__(self, iprot, oprot=None):
165
  def __init__(self, iprot, oprot=None):
158
    shop2020.thriftpy.generic.GenericService.Client.__init__(self, iprot, oprot)
166
    shop2020.thriftpy.generic.GenericService.Client.__init__(self, iprot, oprot)
159
 
167
 
Line 738... Line 746...
738
    self._iprot.readMessageEnd()
746
    self._iprot.readMessageEnd()
739
    if result.success is not None:
747
    if result.success is not None:
740
      return result.success
748
      return result.success
741
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getOpenTicketsMap failed: unknown result");
749
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getOpenTicketsMap failed: unknown result");
742
 
750
 
-
 
751
  def getFedexReconciliationDataMap(self, order_ids, method_key):
-
 
752
    """
-
 
753
    Parameters:
-
 
754
     - order_ids
-
 
755
     - method_key
-
 
756
    """
-
 
757
    self.send_getFedexReconciliationDataMap(order_ids, method_key)
-
 
758
    return self.recv_getFedexReconciliationDataMap()
-
 
759
 
-
 
760
  def send_getFedexReconciliationDataMap(self, order_ids, method_key):
-
 
761
    self._oprot.writeMessageBegin('getFedexReconciliationDataMap', TMessageType.CALL, self._seqid)
-
 
762
    args = getFedexReconciliationDataMap_args()
-
 
763
    args.order_ids = order_ids
-
 
764
    args.method_key = method_key
-
 
765
    args.write(self._oprot)
-
 
766
    self._oprot.writeMessageEnd()
-
 
767
    self._oprot.trans.flush()
-
 
768
 
-
 
769
  def recv_getFedexReconciliationDataMap(self, ):
-
 
770
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
-
 
771
    if mtype == TMessageType.EXCEPTION:
-
 
772
      x = TApplicationException()
-
 
773
      x.read(self._iprot)
-
 
774
      self._iprot.readMessageEnd()
-
 
775
      raise x
-
 
776
    result = getFedexReconciliationDataMap_result()
-
 
777
    result.read(self._iprot)
-
 
778
    self._iprot.readMessageEnd()
-
 
779
    if result.success is not None:
-
 
780
      return result.success
-
 
781
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getFedexReconciliationDataMap failed: unknown result");
-
 
782
 
743
 
783
 
744
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
784
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
745
  def __init__(self, handler):
785
  def __init__(self, handler):
746
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
786
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
747
    self._processMap["getTickets"] = Processor.process_getTickets
787
    self._processMap["getTickets"] = Processor.process_getTickets
Line 762... Line 802...
762
    self._processMap["changeAgentStatus"] = Processor.process_changeAgentStatus
802
    self._processMap["changeAgentStatus"] = Processor.process_changeAgentStatus
763
    self._processMap["insertAgent"] = Processor.process_insertAgent
803
    self._processMap["insertAgent"] = Processor.process_insertAgent
764
    self._processMap["changeAgentRole"] = Processor.process_changeAgentRole
804
    self._processMap["changeAgentRole"] = Processor.process_changeAgentRole
765
    self._processMap["getOpenTicketCountForAgent"] = Processor.process_getOpenTicketCountForAgent
805
    self._processMap["getOpenTicketCountForAgent"] = Processor.process_getOpenTicketCountForAgent
766
    self._processMap["getOpenTicketsMap"] = Processor.process_getOpenTicketsMap
806
    self._processMap["getOpenTicketsMap"] = Processor.process_getOpenTicketsMap
-
 
807
    self._processMap["getFedexReconciliationDataMap"] = Processor.process_getFedexReconciliationDataMap
767
 
808
 
768
  def process(self, iprot, oprot):
809
  def process(self, iprot, oprot):
769
    (name, type, seqid) = iprot.readMessageBegin()
810
    (name, type, seqid) = iprot.readMessageBegin()
770
    if name not in self._processMap:
811
    if name not in self._processMap:
771
      iprot.skip(TType.STRUCT)
812
      iprot.skip(TType.STRUCT)
Line 998... Line 1039...
998
    oprot.writeMessageBegin("getOpenTicketsMap", TMessageType.REPLY, seqid)
1039
    oprot.writeMessageBegin("getOpenTicketsMap", TMessageType.REPLY, seqid)
999
    result.write(oprot)
1040
    result.write(oprot)
1000
    oprot.writeMessageEnd()
1041
    oprot.writeMessageEnd()
1001
    oprot.trans.flush()
1042
    oprot.trans.flush()
1002
 
1043
 
-
 
1044
  def process_getFedexReconciliationDataMap(self, seqid, iprot, oprot):
-
 
1045
    args = getFedexReconciliationDataMap_args()
-
 
1046
    args.read(iprot)
-
 
1047
    iprot.readMessageEnd()
-
 
1048
    result = getFedexReconciliationDataMap_result()
-
 
1049
    result.success = self._handler.getFedexReconciliationDataMap(args.order_ids, args.method_key)
-
 
1050
    oprot.writeMessageBegin("getFedexReconciliationDataMap", TMessageType.REPLY, seqid)
-
 
1051
    result.write(oprot)
-
 
1052
    oprot.writeMessageEnd()
-
 
1053
    oprot.trans.flush()
-
 
1054
 
1003
 
1055
 
1004
# HELPER FUNCTIONS AND STRUCTURES
1056
# HELPER FUNCTIONS AND STRUCTURES
1005
 
1057
 
1006
class getTickets_args:
1058
class getTickets_args:
1007
  """
1059
  """
Line 3357... Line 3409...
3357
      oprot.writeMapEnd()
3409
      oprot.writeMapEnd()
3358
      oprot.writeFieldEnd()
3410
      oprot.writeFieldEnd()
3359
    oprot.writeFieldStop()
3411
    oprot.writeFieldStop()
3360
    oprot.writeStructEnd()
3412
    oprot.writeStructEnd()
3361
 
3413
 
-
 
3414
  def validate(self):
-
 
3415
    return
-
 
3416
 
-
 
3417
 
-
 
3418
  def __repr__(self):
-
 
3419
    L = ['%s=%r' % (key, value)
-
 
3420
      for key, value in self.__dict__.iteritems()]
-
 
3421
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
3422
 
-
 
3423
  def __eq__(self, other):
-
 
3424
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
3425
 
-
 
3426
  def __ne__(self, other):
-
 
3427
    return not (self == other)
-
 
3428
 
-
 
3429
class getFedexReconciliationDataMap_args:
-
 
3430
  """
-
 
3431
  Attributes:
-
 
3432
   - order_ids
-
 
3433
   - method_key
-
 
3434
  """
-
 
3435
 
-
 
3436
  thrift_spec = None
-
 
3437
  def __init__(self, order_ids=None, method_key=None,):
-
 
3438
    self.order_ids = order_ids
-
 
3439
    self.method_key = method_key
-
 
3440
 
-
 
3441
  def read(self, iprot):
-
 
3442
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
3443
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
3444
      return
-
 
3445
    iprot.readStructBegin()
-
 
3446
    while True:
-
 
3447
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
3448
      if ftype == TType.STOP:
-
 
3449
        break
-
 
3450
      if fid == 1:
-
 
3451
        if ftype == TType.LIST:
-
 
3452
          self.order_ids = []
-
 
3453
          (_etype96, _size93) = iprot.readListBegin()
-
 
3454
          for _i97 in xrange(_size93):
-
 
3455
            _elem98 = iprot.readI64();
-
 
3456
            self.order_ids.append(_elem98)
-
 
3457
          iprot.readListEnd()
-
 
3458
        else:
-
 
3459
          iprot.skip(ftype)
-
 
3460
      elif fid == -1:
-
 
3461
        if ftype == TType.STRING:
-
 
3462
          self.method_key = iprot.readString();
-
 
3463
        else:
-
 
3464
          iprot.skip(ftype)
-
 
3465
      else:
-
 
3466
        iprot.skip(ftype)
-
 
3467
      iprot.readFieldEnd()
-
 
3468
    iprot.readStructEnd()
-
 
3469
 
-
 
3470
  def write(self, oprot):
-
 
3471
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
3472
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
3473
      return
-
 
3474
    oprot.writeStructBegin('getFedexReconciliationDataMap_args')
-
 
3475
    if self.method_key is not None:
-
 
3476
      oprot.writeFieldBegin('method_key', TType.STRING, -1)
-
 
3477
      oprot.writeString(self.method_key)
-
 
3478
      oprot.writeFieldEnd()
-
 
3479
    if self.order_ids is not None:
-
 
3480
      oprot.writeFieldBegin('order_ids', TType.LIST, 1)
-
 
3481
      oprot.writeListBegin(TType.I64, len(self.order_ids))
-
 
3482
      for iter99 in self.order_ids:
-
 
3483
        oprot.writeI64(iter99)
-
 
3484
      oprot.writeListEnd()
-
 
3485
      oprot.writeFieldEnd()
-
 
3486
    oprot.writeFieldStop()
-
 
3487
    oprot.writeStructEnd()
-
 
3488
 
-
 
3489
  def validate(self):
-
 
3490
    return
-
 
3491
 
-
 
3492
 
-
 
3493
  def __repr__(self):
-
 
3494
    L = ['%s=%r' % (key, value)
-
 
3495
      for key, value in self.__dict__.iteritems()]
-
 
3496
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
3497
 
-
 
3498
  def __eq__(self, other):
-
 
3499
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
3500
 
-
 
3501
  def __ne__(self, other):
-
 
3502
    return not (self == other)
-
 
3503
 
-
 
3504
class getFedexReconciliationDataMap_result:
-
 
3505
  """
-
 
3506
  Attributes:
-
 
3507
   - success
-
 
3508
  """
-
 
3509
 
-
 
3510
  thrift_spec = (
-
 
3511
    (0, TType.MAP, 'success', (TType.STRING,None,TType.STRING,None), None, ), # 0
-
 
3512
  )
-
 
3513
 
-
 
3514
  def __init__(self, success=None,):
-
 
3515
    self.success = success
-
 
3516
 
-
 
3517
  def read(self, iprot):
-
 
3518
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
3519
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
3520
      return
-
 
3521
    iprot.readStructBegin()
-
 
3522
    while True:
-
 
3523
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
3524
      if ftype == TType.STOP:
-
 
3525
        break
-
 
3526
      if fid == 0:
-
 
3527
        if ftype == TType.MAP:
-
 
3528
          self.success = {}
-
 
3529
          (_ktype101, _vtype102, _size100 ) = iprot.readMapBegin() 
-
 
3530
          for _i104 in xrange(_size100):
-
 
3531
            _key105 = iprot.readString();
-
 
3532
            _val106 = iprot.readString();
-
 
3533
            self.success[_key105] = _val106
-
 
3534
          iprot.readMapEnd()
-
 
3535
        else:
-
 
3536
          iprot.skip(ftype)
-
 
3537
      else:
-
 
3538
        iprot.skip(ftype)
-
 
3539
      iprot.readFieldEnd()
-
 
3540
    iprot.readStructEnd()
-
 
3541
 
-
 
3542
  def write(self, oprot):
-
 
3543
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
3544
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
3545
      return
-
 
3546
    oprot.writeStructBegin('getFedexReconciliationDataMap_result')
-
 
3547
    if self.success is not None:
-
 
3548
      oprot.writeFieldBegin('success', TType.MAP, 0)
-
 
3549
      oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.success))
-
 
3550
      for kiter107,viter108 in self.success.items():
-
 
3551
        oprot.writeString(kiter107)
-
 
3552
        oprot.writeString(viter108)
-
 
3553
      oprot.writeMapEnd()
-
 
3554
      oprot.writeFieldEnd()
-
 
3555
    oprot.writeFieldStop()
-
 
3556
    oprot.writeStructEnd()
-
 
3557
 
3362
  def validate(self):
3558
  def validate(self):
3363
    return
3559
    return
3364
 
3560
 
3365
 
3561
 
3366
  def __repr__(self):
3562
  def __repr__(self):