Subversion Repositories SmartDukaan

Rev

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

Rev 20931 Rev 20954
Line 2701... Line 2701...
2701
    Parameters:
2701
    Parameters:
2702
     - txnId
2702
     - txnId
2703
    """
2703
    """
2704
    pass
2704
    pass
2705
 
2705
 
-
 
2706
  def getBilledOrdersForManifestGen(self, warehouse_id, logistics_provider_id, cod):
-
 
2707
    """
-
 
2708
    Parameters:
-
 
2709
     - warehouse_id
-
 
2710
     - logistics_provider_id
-
 
2711
     - cod
-
 
2712
    """
-
 
2713
    pass
-
 
2714
 
2706
 
2715
 
2707
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
2716
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
2708
  def __init__(self, iprot, oprot=None):
2717
  def __init__(self, iprot, oprot=None):
2709
    shop2020.thriftpy.generic.GenericService.Client.__init__(self, iprot, oprot)
2718
    shop2020.thriftpy.generic.GenericService.Client.__init__(self, iprot, oprot)
2710
 
2719
 
Line 12954... Line 12963...
12954
    self._iprot.readMessageEnd()
12963
    self._iprot.readMessageEnd()
12955
    if result.success is not None:
12964
    if result.success is not None:
12956
      return result.success
12965
      return result.success
12957
    raise TApplicationException(TApplicationException.MISSING_RESULT, "calculatePaymentAmount failed: unknown result");
12966
    raise TApplicationException(TApplicationException.MISSING_RESULT, "calculatePaymentAmount failed: unknown result");
12958
 
12967
 
-
 
12968
  def getBilledOrdersForManifestGen(self, warehouse_id, logistics_provider_id, cod):
-
 
12969
    """
-
 
12970
    Parameters:
-
 
12971
     - warehouse_id
-
 
12972
     - logistics_provider_id
-
 
12973
     - cod
-
 
12974
    """
-
 
12975
    self.send_getBilledOrdersForManifestGen(warehouse_id, logistics_provider_id, cod)
-
 
12976
    return self.recv_getBilledOrdersForManifestGen()
-
 
12977
 
-
 
12978
  def send_getBilledOrdersForManifestGen(self, warehouse_id, logistics_provider_id, cod):
-
 
12979
    self._oprot.writeMessageBegin('getBilledOrdersForManifestGen', TMessageType.CALL, self._seqid)
-
 
12980
    args = getBilledOrdersForManifestGen_args()
-
 
12981
    args.warehouse_id = warehouse_id
-
 
12982
    args.logistics_provider_id = logistics_provider_id
-
 
12983
    args.cod = cod
-
 
12984
    args.write(self._oprot)
-
 
12985
    self._oprot.writeMessageEnd()
-
 
12986
    self._oprot.trans.flush()
-
 
12987
 
-
 
12988
  def recv_getBilledOrdersForManifestGen(self, ):
-
 
12989
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
-
 
12990
    if mtype == TMessageType.EXCEPTION:
-
 
12991
      x = TApplicationException()
-
 
12992
      x.read(self._iprot)
-
 
12993
      self._iprot.readMessageEnd()
-
 
12994
      raise x
-
 
12995
    result = getBilledOrdersForManifestGen_result()
-
 
12996
    result.read(self._iprot)
-
 
12997
    self._iprot.readMessageEnd()
-
 
12998
    if result.success is not None:
-
 
12999
      return result.success
-
 
13000
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getBilledOrdersForManifestGen failed: unknown result");
-
 
13001
 
12959
 
13002
 
12960
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
13003
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
12961
  def __init__(self, handler):
13004
  def __init__(self, handler):
12962
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
13005
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
12963
    self._processMap["createTransaction"] = Processor.process_createTransaction
13006
    self._processMap["createTransaction"] = Processor.process_createTransaction
Line 13267... Line 13310...
13267
    self._processMap["addShipmentDelay"] = Processor.process_addShipmentDelay
13310
    self._processMap["addShipmentDelay"] = Processor.process_addShipmentDelay
13268
    self._processMap["getCostDetailForLogisticsTxnId"] = Processor.process_getCostDetailForLogisticsTxnId
13311
    self._processMap["getCostDetailForLogisticsTxnId"] = Processor.process_getCostDetailForLogisticsTxnId
13269
    self._processMap["addShipmentLogisticDetail"] = Processor.process_addShipmentLogisticDetail
13312
    self._processMap["addShipmentLogisticDetail"] = Processor.process_addShipmentLogisticDetail
13270
    self._processMap["createPayment"] = Processor.process_createPayment
13313
    self._processMap["createPayment"] = Processor.process_createPayment
13271
    self._processMap["calculatePaymentAmount"] = Processor.process_calculatePaymentAmount
13314
    self._processMap["calculatePaymentAmount"] = Processor.process_calculatePaymentAmount
-
 
13315
    self._processMap["getBilledOrdersForManifestGen"] = Processor.process_getBilledOrdersForManifestGen
13272
 
13316
 
13273
  def process(self, iprot, oprot):
13317
  def process(self, iprot, oprot):
13274
    (name, type, seqid) = iprot.readMessageBegin()
13318
    (name, type, seqid) = iprot.readMessageBegin()
13275
    if name not in self._processMap:
13319
    if name not in self._processMap:
13276
      iprot.skip(TType.STRUCT)
13320
      iprot.skip(TType.STRUCT)
Line 17099... Line 17143...
17099
    oprot.writeMessageBegin("calculatePaymentAmount", TMessageType.REPLY, seqid)
17143
    oprot.writeMessageBegin("calculatePaymentAmount", TMessageType.REPLY, seqid)
17100
    result.write(oprot)
17144
    result.write(oprot)
17101
    oprot.writeMessageEnd()
17145
    oprot.writeMessageEnd()
17102
    oprot.trans.flush()
17146
    oprot.trans.flush()
17103
 
17147
 
-
 
17148
  def process_getBilledOrdersForManifestGen(self, seqid, iprot, oprot):
-
 
17149
    args = getBilledOrdersForManifestGen_args()
-
 
17150
    args.read(iprot)
-
 
17151
    iprot.readMessageEnd()
-
 
17152
    result = getBilledOrdersForManifestGen_result()
-
 
17153
    result.success = self._handler.getBilledOrdersForManifestGen(args.warehouse_id, args.logistics_provider_id, args.cod)
-
 
17154
    oprot.writeMessageBegin("getBilledOrdersForManifestGen", TMessageType.REPLY, seqid)
-
 
17155
    result.write(oprot)
-
 
17156
    oprot.writeMessageEnd()
-
 
17157
    oprot.trans.flush()
-
 
17158
 
17104
 
17159
 
17105
# HELPER FUNCTIONS AND STRUCTURES
17160
# HELPER FUNCTIONS AND STRUCTURES
17106
 
17161
 
17107
class createTransaction_args:
17162
class createTransaction_args:
17108
  """
17163
  """
Line 59974... Line 60029...
59974
      oprot.writeFieldEnd()
60029
      oprot.writeFieldEnd()
59975
    oprot.writeFieldStop()
60030
    oprot.writeFieldStop()
59976
    oprot.writeStructEnd()
60031
    oprot.writeStructEnd()
59977
 
60032
 
59978
  def validate(self):
60033
  def validate(self):
-
 
60034
    return
-
 
60035
 
-
 
60036
 
-
 
60037
  def __repr__(self):
-
 
60038
    L = ['%s=%r' % (key, value)
-
 
60039
      for key, value in self.__dict__.iteritems()]
-
 
60040
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
60041
 
-
 
60042
  def __eq__(self, other):
-
 
60043
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
60044
 
-
 
60045
  def __ne__(self, other):
-
 
60046
    return not (self == other)
-
 
60047
 
-
 
60048
class getBilledOrdersForManifestGen_args:
-
 
60049
  """
-
 
60050
  Attributes:
-
 
60051
   - warehouse_id
-
 
60052
   - logistics_provider_id
-
 
60053
   - cod
-
 
60054
  """
-
 
60055
 
-
 
60056
  thrift_spec = (
-
 
60057
    None, # 0
-
 
60058
    (1, TType.I64, 'warehouse_id', None, None, ), # 1
-
 
60059
    (2, TType.I64, 'logistics_provider_id', None, None, ), # 2
-
 
60060
    (3, TType.BOOL, 'cod', None, None, ), # 3
-
 
60061
  )
-
 
60062
 
-
 
60063
  def __init__(self, warehouse_id=None, logistics_provider_id=None, cod=None,):
-
 
60064
    self.warehouse_id = warehouse_id
-
 
60065
    self.logistics_provider_id = logistics_provider_id
-
 
60066
    self.cod = cod
-
 
60067
 
-
 
60068
  def read(self, iprot):
-
 
60069
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
60070
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
60071
      return
-
 
60072
    iprot.readStructBegin()
-
 
60073
    while True:
-
 
60074
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
60075
      if ftype == TType.STOP:
-
 
60076
        break
-
 
60077
      if fid == 1:
-
 
60078
        if ftype == TType.I64:
-
 
60079
          self.warehouse_id = iprot.readI64();
-
 
60080
        else:
-
 
60081
          iprot.skip(ftype)
-
 
60082
      elif fid == 2:
-
 
60083
        if ftype == TType.I64:
-
 
60084
          self.logistics_provider_id = iprot.readI64();
-
 
60085
        else:
-
 
60086
          iprot.skip(ftype)
-
 
60087
      elif fid == 3:
-
 
60088
        if ftype == TType.BOOL:
-
 
60089
          self.cod = iprot.readBool();
-
 
60090
        else:
-
 
60091
          iprot.skip(ftype)
-
 
60092
      else:
-
 
60093
        iprot.skip(ftype)
-
 
60094
      iprot.readFieldEnd()
-
 
60095
    iprot.readStructEnd()
-
 
60096
 
-
 
60097
  def write(self, oprot):
-
 
60098
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
60099
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
60100
      return
-
 
60101
    oprot.writeStructBegin('getBilledOrdersForManifestGen_args')
-
 
60102
    if self.warehouse_id is not None:
-
 
60103
      oprot.writeFieldBegin('warehouse_id', TType.I64, 1)
-
 
60104
      oprot.writeI64(self.warehouse_id)
-
 
60105
      oprot.writeFieldEnd()
-
 
60106
    if self.logistics_provider_id is not None:
-
 
60107
      oprot.writeFieldBegin('logistics_provider_id', TType.I64, 2)
-
 
60108
      oprot.writeI64(self.logistics_provider_id)
-
 
60109
      oprot.writeFieldEnd()
-
 
60110
    if self.cod is not None:
-
 
60111
      oprot.writeFieldBegin('cod', TType.BOOL, 3)
-
 
60112
      oprot.writeBool(self.cod)
-
 
60113
      oprot.writeFieldEnd()
-
 
60114
    oprot.writeFieldStop()
-
 
60115
    oprot.writeStructEnd()
-
 
60116
 
-
 
60117
  def validate(self):
-
 
60118
    return
-
 
60119
 
-
 
60120
 
-
 
60121
  def __repr__(self):
-
 
60122
    L = ['%s=%r' % (key, value)
-
 
60123
      for key, value in self.__dict__.iteritems()]
-
 
60124
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
60125
 
-
 
60126
  def __eq__(self, other):
-
 
60127
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
60128
 
-
 
60129
  def __ne__(self, other):
-
 
60130
    return not (self == other)
-
 
60131
 
-
 
60132
class getBilledOrdersForManifestGen_result:
-
 
60133
  """
-
 
60134
  Attributes:
-
 
60135
   - success
-
 
60136
  """
-
 
60137
 
-
 
60138
  thrift_spec = (
-
 
60139
    (0, TType.LIST, 'success', (TType.STRUCT,(Order, Order.thrift_spec)), None, ), # 0
-
 
60140
  )
-
 
60141
 
-
 
60142
  def __init__(self, success=None,):
-
 
60143
    self.success = success
-
 
60144
 
-
 
60145
  def read(self, iprot):
-
 
60146
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
60147
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
60148
      return
-
 
60149
    iprot.readStructBegin()
-
 
60150
    while True:
-
 
60151
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
60152
      if ftype == TType.STOP:
-
 
60153
        break
-
 
60154
      if fid == 0:
-
 
60155
        if ftype == TType.LIST:
-
 
60156
          self.success = []
-
 
60157
          (_etype1507, _size1504) = iprot.readListBegin()
-
 
60158
          for _i1508 in xrange(_size1504):
-
 
60159
            _elem1509 = Order()
-
 
60160
            _elem1509.read(iprot)
-
 
60161
            self.success.append(_elem1509)
-
 
60162
          iprot.readListEnd()
-
 
60163
        else:
-
 
60164
          iprot.skip(ftype)
-
 
60165
      else:
-
 
60166
        iprot.skip(ftype)
-
 
60167
      iprot.readFieldEnd()
-
 
60168
    iprot.readStructEnd()
-
 
60169
 
-
 
60170
  def write(self, oprot):
-
 
60171
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
60172
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
60173
      return
-
 
60174
    oprot.writeStructBegin('getBilledOrdersForManifestGen_result')
-
 
60175
    if self.success is not None:
-
 
60176
      oprot.writeFieldBegin('success', TType.LIST, 0)
-
 
60177
      oprot.writeListBegin(TType.STRUCT, len(self.success))
-
 
60178
      for iter1510 in self.success:
-
 
60179
        iter1510.write(oprot)
-
 
60180
      oprot.writeListEnd()
-
 
60181
      oprot.writeFieldEnd()
-
 
60182
    oprot.writeFieldStop()
-
 
60183
    oprot.writeStructEnd()
-
 
60184
 
-
 
60185
  def validate(self):
59979
    return
60186
    return
59980
 
60187
 
59981
 
60188
 
59982
  def __repr__(self):
60189
  def __repr__(self):
59983
    L = ['%s=%r' % (key, value)
60190
    L = ['%s=%r' % (key, value)