Subversion Repositories SmartDukaan

Rev

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

Rev 7311 Rev 7322
Line 1613... Line 1613...
1613
    Parameters:
1613
    Parameters:
1614
     - amazonOrder
1614
     - amazonOrder
1615
    """
1615
    """
1616
    pass
1616
    pass
1617
 
1617
 
1618
  def getOrderForAmazonOrderCode(self, orderId, status):
1618
  def updateAmazonOrderStatus(self, orderId, status):
1619
    """
1619
    """
1620
    Parameters:
1620
    Parameters:
1621
     - orderId
1621
     - orderId
1622
     - status
1622
     - status
1623
    """
1623
    """
Line 1635... Line 1635...
1635
    Parameters:
1635
    Parameters:
1636
     - interval
1636
     - interval
1637
    """
1637
    """
1638
    pass
1638
    pass
1639
 
1639
 
-
 
1640
  def getAmazonOrder(self, orderId):
-
 
1641
    """
-
 
1642
    Parameters:
-
 
1643
     - orderId
-
 
1644
    """
-
 
1645
    pass
-
 
1646
 
1640
 
1647
 
1641
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
1648
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
1642
  def __init__(self, iprot, oprot=None):
1649
  def __init__(self, iprot, oprot=None):
1643
    shop2020.thriftpy.generic.GenericService.Client.__init__(self, iprot, oprot)
1650
    shop2020.thriftpy.generic.GenericService.Client.__init__(self, iprot, oprot)
1644
 
1651
 
Line 7432... Line 7439...
7432
    result = addAmazonOrder_result()
7439
    result = addAmazonOrder_result()
7433
    result.read(self._iprot)
7440
    result.read(self._iprot)
7434
    self._iprot.readMessageEnd()
7441
    self._iprot.readMessageEnd()
7435
    return
7442
    return
7436
 
7443
 
7437
  def getOrderForAmazonOrderCode(self, orderId, status):
7444
  def updateAmazonOrderStatus(self, orderId, status):
7438
    """
7445
    """
7439
    Parameters:
7446
    Parameters:
7440
     - orderId
7447
     - orderId
7441
     - status
7448
     - status
7442
    """
7449
    """
7443
    self.send_getOrderForAmazonOrderCode(orderId, status)
7450
    self.send_updateAmazonOrderStatus(orderId, status)
7444
    return self.recv_getOrderForAmazonOrderCode()
7451
    return self.recv_updateAmazonOrderStatus()
7445
 
7452
 
7446
  def send_getOrderForAmazonOrderCode(self, orderId, status):
7453
  def send_updateAmazonOrderStatus(self, orderId, status):
7447
    self._oprot.writeMessageBegin('getOrderForAmazonOrderCode', TMessageType.CALL, self._seqid)
7454
    self._oprot.writeMessageBegin('updateAmazonOrderStatus', TMessageType.CALL, self._seqid)
7448
    args = getOrderForAmazonOrderCode_args()
7455
    args = updateAmazonOrderStatus_args()
7449
    args.orderId = orderId
7456
    args.orderId = orderId
7450
    args.status = status
7457
    args.status = status
7451
    args.write(self._oprot)
7458
    args.write(self._oprot)
7452
    self._oprot.writeMessageEnd()
7459
    self._oprot.writeMessageEnd()
7453
    self._oprot.trans.flush()
7460
    self._oprot.trans.flush()
7454
 
7461
 
7455
  def recv_getOrderForAmazonOrderCode(self, ):
7462
  def recv_updateAmazonOrderStatus(self, ):
7456
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
7463
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
7457
    if mtype == TMessageType.EXCEPTION:
7464
    if mtype == TMessageType.EXCEPTION:
7458
      x = TApplicationException()
7465
      x = TApplicationException()
7459
      x.read(self._iprot)
7466
      x.read(self._iprot)
7460
      self._iprot.readMessageEnd()
7467
      self._iprot.readMessageEnd()
7461
      raise x
7468
      raise x
7462
    result = getOrderForAmazonOrderCode_result()
7469
    result = updateAmazonOrderStatus_result()
7463
    result.read(self._iprot)
7470
    result.read(self._iprot)
7464
    self._iprot.readMessageEnd()
7471
    self._iprot.readMessageEnd()
7465
    if result.success is not None:
7472
    if result.success is not None:
7466
      return result.success
7473
      return result.success
7467
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getOrderForAmazonOrderCode failed: unknown result");
7474
    raise TApplicationException(TApplicationException.MISSING_RESULT, "updateAmazonOrderStatus failed: unknown result");
7468
 
7475
 
7469
  def getAmazonOrdersShipped(self, interval):
7476
  def getAmazonOrdersShipped(self, interval):
7470
    """
7477
    """
7471
    Parameters:
7478
    Parameters:
7472
     - interval
7479
     - interval
Line 7524... Line 7531...
7524
    self._iprot.readMessageEnd()
7531
    self._iprot.readMessageEnd()
7525
    if result.success is not None:
7532
    if result.success is not None:
7526
      return result.success
7533
      return result.success
7527
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getAmazonOrdersCancelled failed: unknown result");
7534
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getAmazonOrdersCancelled failed: unknown result");
7528
 
7535
 
-
 
7536
  def getAmazonOrder(self, orderId):
-
 
7537
    """
-
 
7538
    Parameters:
-
 
7539
     - orderId
-
 
7540
    """
-
 
7541
    self.send_getAmazonOrder(orderId)
-
 
7542
    return self.recv_getAmazonOrder()
-
 
7543
 
-
 
7544
  def send_getAmazonOrder(self, orderId):
-
 
7545
    self._oprot.writeMessageBegin('getAmazonOrder', TMessageType.CALL, self._seqid)
-
 
7546
    args = getAmazonOrder_args()
-
 
7547
    args.orderId = orderId
-
 
7548
    args.write(self._oprot)
-
 
7549
    self._oprot.writeMessageEnd()
-
 
7550
    self._oprot.trans.flush()
-
 
7551
 
-
 
7552
  def recv_getAmazonOrder(self, ):
-
 
7553
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
-
 
7554
    if mtype == TMessageType.EXCEPTION:
-
 
7555
      x = TApplicationException()
-
 
7556
      x.read(self._iprot)
-
 
7557
      self._iprot.readMessageEnd()
-
 
7558
      raise x
-
 
7559
    result = getAmazonOrder_result()
-
 
7560
    result.read(self._iprot)
-
 
7561
    self._iprot.readMessageEnd()
-
 
7562
    if result.success is not None:
-
 
7563
      return result.success
-
 
7564
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getAmazonOrder failed: unknown result");
-
 
7565
 
7529
 
7566
 
7530
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
7567
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
7531
  def __init__(self, handler):
7568
  def __init__(self, handler):
7532
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
7569
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
7533
    self._processMap["createTransaction"] = Processor.process_createTransaction
7570
    self._processMap["createTransaction"] = Processor.process_createTransaction
Line 7698... Line 7735...
7698
    self._processMap["getWalletBalanceForCompany"] = Processor.process_getWalletBalanceForCompany
7735
    self._processMap["getWalletBalanceForCompany"] = Processor.process_getWalletBalanceForCompany
7699
    self._processMap["getSourceDetail"] = Processor.process_getSourceDetail
7736
    self._processMap["getSourceDetail"] = Processor.process_getSourceDetail
7700
    self._processMap["getAllCircles"] = Processor.process_getAllCircles
7737
    self._processMap["getAllCircles"] = Processor.process_getAllCircles
7701
    self._processMap["deleteFrcs"] = Processor.process_deleteFrcs
7738
    self._processMap["deleteFrcs"] = Processor.process_deleteFrcs
7702
    self._processMap["addAmazonOrder"] = Processor.process_addAmazonOrder
7739
    self._processMap["addAmazonOrder"] = Processor.process_addAmazonOrder
7703
    self._processMap["getOrderForAmazonOrderCode"] = Processor.process_getOrderForAmazonOrderCode
7740
    self._processMap["updateAmazonOrderStatus"] = Processor.process_updateAmazonOrderStatus
7704
    self._processMap["getAmazonOrdersShipped"] = Processor.process_getAmazonOrdersShipped
7741
    self._processMap["getAmazonOrdersShipped"] = Processor.process_getAmazonOrdersShipped
7705
    self._processMap["getAmazonOrdersCancelled"] = Processor.process_getAmazonOrdersCancelled
7742
    self._processMap["getAmazonOrdersCancelled"] = Processor.process_getAmazonOrdersCancelled
-
 
7743
    self._processMap["getAmazonOrder"] = Processor.process_getAmazonOrder
7706
 
7744
 
7707
  def process(self, iprot, oprot):
7745
  def process(self, iprot, oprot):
7708
    (name, type, seqid) = iprot.readMessageBegin()
7746
    (name, type, seqid) = iprot.readMessageBegin()
7709
    if name not in self._processMap:
7747
    if name not in self._processMap:
7710
      iprot.skip(TType.STRUCT)
7748
      iprot.skip(TType.STRUCT)
Line 9881... Line 9919...
9881
    oprot.writeMessageBegin("addAmazonOrder", TMessageType.REPLY, seqid)
9919
    oprot.writeMessageBegin("addAmazonOrder", TMessageType.REPLY, seqid)
9882
    result.write(oprot)
9920
    result.write(oprot)
9883
    oprot.writeMessageEnd()
9921
    oprot.writeMessageEnd()
9884
    oprot.trans.flush()
9922
    oprot.trans.flush()
9885
 
9923
 
9886
  def process_getOrderForAmazonOrderCode(self, seqid, iprot, oprot):
9924
  def process_updateAmazonOrderStatus(self, seqid, iprot, oprot):
9887
    args = getOrderForAmazonOrderCode_args()
9925
    args = updateAmazonOrderStatus_args()
9888
    args.read(iprot)
9926
    args.read(iprot)
9889
    iprot.readMessageEnd()
9927
    iprot.readMessageEnd()
9890
    result = getOrderForAmazonOrderCode_result()
9928
    result = updateAmazonOrderStatus_result()
9891
    result.success = self._handler.getOrderForAmazonOrderCode(args.orderId, args.status)
9929
    result.success = self._handler.updateAmazonOrderStatus(args.orderId, args.status)
9892
    oprot.writeMessageBegin("getOrderForAmazonOrderCode", TMessageType.REPLY, seqid)
9930
    oprot.writeMessageBegin("updateAmazonOrderStatus", TMessageType.REPLY, seqid)
9893
    result.write(oprot)
9931
    result.write(oprot)
9894
    oprot.writeMessageEnd()
9932
    oprot.writeMessageEnd()
9895
    oprot.trans.flush()
9933
    oprot.trans.flush()
9896
 
9934
 
9897
  def process_getAmazonOrdersShipped(self, seqid, iprot, oprot):
9935
  def process_getAmazonOrdersShipped(self, seqid, iprot, oprot):
Line 9914... Line 9952...
9914
    oprot.writeMessageBegin("getAmazonOrdersCancelled", TMessageType.REPLY, seqid)
9952
    oprot.writeMessageBegin("getAmazonOrdersCancelled", TMessageType.REPLY, seqid)
9915
    result.write(oprot)
9953
    result.write(oprot)
9916
    oprot.writeMessageEnd()
9954
    oprot.writeMessageEnd()
9917
    oprot.trans.flush()
9955
    oprot.trans.flush()
9918
 
9956
 
-
 
9957
  def process_getAmazonOrder(self, seqid, iprot, oprot):
-
 
9958
    args = getAmazonOrder_args()
-
 
9959
    args.read(iprot)
-
 
9960
    iprot.readMessageEnd()
-
 
9961
    result = getAmazonOrder_result()
-
 
9962
    result.success = self._handler.getAmazonOrder(args.orderId)
-
 
9963
    oprot.writeMessageBegin("getAmazonOrder", TMessageType.REPLY, seqid)
-
 
9964
    result.write(oprot)
-
 
9965
    oprot.writeMessageEnd()
-
 
9966
    oprot.trans.flush()
-
 
9967
 
9919
 
9968
 
9920
# HELPER FUNCTIONS AND STRUCTURES
9969
# HELPER FUNCTIONS AND STRUCTURES
9921
 
9970
 
9922
class createTransaction_args:
9971
class createTransaction_args:
9923
  """
9972
  """
Line 33662... Line 33711...
33662
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
33711
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
33663
 
33712
 
33664
  def __ne__(self, other):
33713
  def __ne__(self, other):
33665
    return not (self == other)
33714
    return not (self == other)
33666
 
33715
 
33667
class getOrderForAmazonOrderCode_args:
33716
class updateAmazonOrderStatus_args:
33668
  """
33717
  """
33669
  Attributes:
33718
  Attributes:
33670
   - orderId
33719
   - orderId
33671
   - status
33720
   - status
33672
  """
33721
  """
Line 33707... Line 33756...
33707
 
33756
 
33708
  def write(self, oprot):
33757
  def write(self, oprot):
33709
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
33758
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
33710
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
33759
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
33711
      return
33760
      return
33712
    oprot.writeStructBegin('getOrderForAmazonOrderCode_args')
33761
    oprot.writeStructBegin('updateAmazonOrderStatus_args')
33713
    if self.orderId is not None:
33762
    if self.orderId is not None:
33714
      oprot.writeFieldBegin('orderId', TType.I64, 1)
33763
      oprot.writeFieldBegin('orderId', TType.I64, 1)
33715
      oprot.writeI64(self.orderId)
33764
      oprot.writeI64(self.orderId)
33716
      oprot.writeFieldEnd()
33765
      oprot.writeFieldEnd()
33717
    if self.status is not None:
33766
    if self.status is not None:
Line 33734... Line 33783...
33734
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
33783
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
33735
 
33784
 
33736
  def __ne__(self, other):
33785
  def __ne__(self, other):
33737
    return not (self == other)
33786
    return not (self == other)
33738
 
33787
 
33739
class getOrderForAmazonOrderCode_result:
33788
class updateAmazonOrderStatus_result:
33740
  """
33789
  """
33741
  Attributes:
33790
  Attributes:
33742
   - success
33791
   - success
33743
  """
33792
  """
33744
 
33793
 
Line 33770... Line 33819...
33770
 
33819
 
33771
  def write(self, oprot):
33820
  def write(self, oprot):
33772
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
33821
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
33773
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
33822
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
33774
      return
33823
      return
33775
    oprot.writeStructBegin('getOrderForAmazonOrderCode_result')
33824
    oprot.writeStructBegin('updateAmazonOrderStatus_result')
33776
    if self.success is not None:
33825
    if self.success is not None:
33777
      oprot.writeFieldBegin('success', TType.BOOL, 0)
33826
      oprot.writeFieldBegin('success', TType.BOOL, 0)
33778
      oprot.writeBool(self.success)
33827
      oprot.writeBool(self.success)
33779
      oprot.writeFieldEnd()
33828
      oprot.writeFieldEnd()
33780
    oprot.writeFieldStop()
33829
    oprot.writeFieldStop()
Line 34035... Line 34084...
34035
      oprot.writeFieldEnd()
34084
      oprot.writeFieldEnd()
34036
    oprot.writeFieldStop()
34085
    oprot.writeFieldStop()
34037
    oprot.writeStructEnd()
34086
    oprot.writeStructEnd()
34038
 
34087
 
34039
  def validate(self):
34088
  def validate(self):
-
 
34089
    return
-
 
34090
 
-
 
34091
 
-
 
34092
  def __repr__(self):
-
 
34093
    L = ['%s=%r' % (key, value)
-
 
34094
      for key, value in self.__dict__.iteritems()]
-
 
34095
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
34096
 
-
 
34097
  def __eq__(self, other):
-
 
34098
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
34099
 
-
 
34100
  def __ne__(self, other):
-
 
34101
    return not (self == other)
-
 
34102
 
-
 
34103
class getAmazonOrder_args:
-
 
34104
  """
-
 
34105
  Attributes:
-
 
34106
   - orderId
-
 
34107
  """
-
 
34108
 
-
 
34109
  thrift_spec = (
-
 
34110
    None, # 0
-
 
34111
    (1, TType.I64, 'orderId', None, None, ), # 1
-
 
34112
  )
-
 
34113
 
-
 
34114
  def __init__(self, orderId=None,):
-
 
34115
    self.orderId = orderId
-
 
34116
 
-
 
34117
  def read(self, iprot):
-
 
34118
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
34119
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
34120
      return
-
 
34121
    iprot.readStructBegin()
-
 
34122
    while True:
-
 
34123
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
34124
      if ftype == TType.STOP:
-
 
34125
        break
-
 
34126
      if fid == 1:
-
 
34127
        if ftype == TType.I64:
-
 
34128
          self.orderId = iprot.readI64();
-
 
34129
        else:
-
 
34130
          iprot.skip(ftype)
-
 
34131
      else:
-
 
34132
        iprot.skip(ftype)
-
 
34133
      iprot.readFieldEnd()
-
 
34134
    iprot.readStructEnd()
-
 
34135
 
-
 
34136
  def write(self, oprot):
-
 
34137
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
34138
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
34139
      return
-
 
34140
    oprot.writeStructBegin('getAmazonOrder_args')
-
 
34141
    if self.orderId is not None:
-
 
34142
      oprot.writeFieldBegin('orderId', TType.I64, 1)
-
 
34143
      oprot.writeI64(self.orderId)
-
 
34144
      oprot.writeFieldEnd()
-
 
34145
    oprot.writeFieldStop()
-
 
34146
    oprot.writeStructEnd()
-
 
34147
 
-
 
34148
  def validate(self):
-
 
34149
    return
-
 
34150
 
-
 
34151
 
-
 
34152
  def __repr__(self):
-
 
34153
    L = ['%s=%r' % (key, value)
-
 
34154
      for key, value in self.__dict__.iteritems()]
-
 
34155
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
34156
 
-
 
34157
  def __eq__(self, other):
-
 
34158
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
34159
 
-
 
34160
  def __ne__(self, other):
-
 
34161
    return not (self == other)
-
 
34162
 
-
 
34163
class getAmazonOrder_result:
-
 
34164
  """
-
 
34165
  Attributes:
-
 
34166
   - success
-
 
34167
  """
-
 
34168
 
-
 
34169
  thrift_spec = (
-
 
34170
    (0, TType.STRUCT, 'success', (AmazonOrder, AmazonOrder.thrift_spec), None, ), # 0
-
 
34171
  )
-
 
34172
 
-
 
34173
  def __init__(self, success=None,):
-
 
34174
    self.success = success
-
 
34175
 
-
 
34176
  def read(self, iprot):
-
 
34177
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
34178
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
34179
      return
-
 
34180
    iprot.readStructBegin()
-
 
34181
    while True:
-
 
34182
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
34183
      if ftype == TType.STOP:
-
 
34184
        break
-
 
34185
      if fid == 0:
-
 
34186
        if ftype == TType.STRUCT:
-
 
34187
          self.success = AmazonOrder()
-
 
34188
          self.success.read(iprot)
-
 
34189
        else:
-
 
34190
          iprot.skip(ftype)
-
 
34191
      else:
-
 
34192
        iprot.skip(ftype)
-
 
34193
      iprot.readFieldEnd()
-
 
34194
    iprot.readStructEnd()
-
 
34195
 
-
 
34196
  def write(self, oprot):
-
 
34197
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
34198
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
34199
      return
-
 
34200
    oprot.writeStructBegin('getAmazonOrder_result')
-
 
34201
    if self.success is not None:
-
 
34202
      oprot.writeFieldBegin('success', TType.STRUCT, 0)
-
 
34203
      self.success.write(oprot)
-
 
34204
      oprot.writeFieldEnd()
-
 
34205
    oprot.writeFieldStop()
-
 
34206
    oprot.writeStructEnd()
-
 
34207
 
-
 
34208
  def validate(self):
34040
    return
34209
    return
34041
 
34210
 
34042
 
34211
 
34043
  def __repr__(self):
34212
  def __repr__(self):
34044
    L = ['%s=%r' % (key, value)
34213
    L = ['%s=%r' % (key, value)