Subversion Repositories SmartDukaan

Rev

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

Rev 19004 Rev 19421
Line 2529... Line 2529...
2529
     - warehouse_id
2529
     - warehouse_id
2530
     - source
2530
     - source
2531
    """
2531
    """
2532
    pass
2532
    pass
2533
 
2533
 
-
 
2534
  def setOrderAttributeForMasterOrderId(self, logisticsTransactionId, attributes):
-
 
2535
    """
-
 
2536
    sets attributes for all orders in a Master Order Id or Shipment Id
-
 
2537
 
-
 
2538
    Parameters:
-
 
2539
     - logisticsTransactionId
-
 
2540
     - attributes
-
 
2541
    """
-
 
2542
    pass
-
 
2543
 
-
 
2544
  def updateMasterOrderAWB(self, logisticsTransactionId, airwayBillNo):
-
 
2545
    """
-
 
2546
    Parameters:
-
 
2547
     - logisticsTransactionId
-
 
2548
     - airwayBillNo
-
 
2549
    """
-
 
2550
    pass
-
 
2551
 
2534
 
2552
 
2535
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
2553
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
2536
  def __init__(self, iprot, oprot=None):
2554
  def __init__(self, iprot, oprot=None):
2537
    shop2020.thriftpy.generic.GenericService.Client.__init__(self, iprot, oprot)
2555
    shop2020.thriftpy.generic.GenericService.Client.__init__(self, iprot, oprot)
2538
 
2556
 
Line 12088... Line 12106...
12088
      return result.success
12106
      return result.success
12089
    if result.ex is not None:
12107
    if result.ex is not None:
12090
      raise result.ex
12108
      raise result.ex
12091
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getOrdersInBatchAsPromisedShipping failed: unknown result");
12109
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getOrdersInBatchAsPromisedShipping failed: unknown result");
12092
 
12110
 
-
 
12111
  def setOrderAttributeForMasterOrderId(self, logisticsTransactionId, attributes):
-
 
12112
    """
-
 
12113
    sets attributes for all orders in a Master Order Id or Shipment Id
-
 
12114
 
-
 
12115
    Parameters:
-
 
12116
     - logisticsTransactionId
-
 
12117
     - attributes
-
 
12118
    """
-
 
12119
    self.send_setOrderAttributeForMasterOrderId(logisticsTransactionId, attributes)
-
 
12120
    self.recv_setOrderAttributeForMasterOrderId()
-
 
12121
 
-
 
12122
  def send_setOrderAttributeForMasterOrderId(self, logisticsTransactionId, attributes):
-
 
12123
    self._oprot.writeMessageBegin('setOrderAttributeForMasterOrderId', TMessageType.CALL, self._seqid)
-
 
12124
    args = setOrderAttributeForMasterOrderId_args()
-
 
12125
    args.logisticsTransactionId = logisticsTransactionId
-
 
12126
    args.attributes = attributes
-
 
12127
    args.write(self._oprot)
-
 
12128
    self._oprot.writeMessageEnd()
-
 
12129
    self._oprot.trans.flush()
-
 
12130
 
-
 
12131
  def recv_setOrderAttributeForMasterOrderId(self, ):
-
 
12132
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
-
 
12133
    if mtype == TMessageType.EXCEPTION:
-
 
12134
      x = TApplicationException()
-
 
12135
      x.read(self._iprot)
-
 
12136
      self._iprot.readMessageEnd()
-
 
12137
      raise x
-
 
12138
    result = setOrderAttributeForMasterOrderId_result()
-
 
12139
    result.read(self._iprot)
-
 
12140
    self._iprot.readMessageEnd()
-
 
12141
    return
-
 
12142
 
-
 
12143
  def updateMasterOrderAWB(self, logisticsTransactionId, airwayBillNo):
-
 
12144
    """
-
 
12145
    Parameters:
-
 
12146
     - logisticsTransactionId
-
 
12147
     - airwayBillNo
-
 
12148
    """
-
 
12149
    self.send_updateMasterOrderAWB(logisticsTransactionId, airwayBillNo)
-
 
12150
    return self.recv_updateMasterOrderAWB()
-
 
12151
 
-
 
12152
  def send_updateMasterOrderAWB(self, logisticsTransactionId, airwayBillNo):
-
 
12153
    self._oprot.writeMessageBegin('updateMasterOrderAWB', TMessageType.CALL, self._seqid)
-
 
12154
    args = updateMasterOrderAWB_args()
-
 
12155
    args.logisticsTransactionId = logisticsTransactionId
-
 
12156
    args.airwayBillNo = airwayBillNo
-
 
12157
    args.write(self._oprot)
-
 
12158
    self._oprot.writeMessageEnd()
-
 
12159
    self._oprot.trans.flush()
-
 
12160
 
-
 
12161
  def recv_updateMasterOrderAWB(self, ):
-
 
12162
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
-
 
12163
    if mtype == TMessageType.EXCEPTION:
-
 
12164
      x = TApplicationException()
-
 
12165
      x.read(self._iprot)
-
 
12166
      self._iprot.readMessageEnd()
-
 
12167
      raise x
-
 
12168
    result = updateMasterOrderAWB_result()
-
 
12169
    result.read(self._iprot)
-
 
12170
    self._iprot.readMessageEnd()
-
 
12171
    if result.success is not None:
-
 
12172
      return result.success
-
 
12173
    raise TApplicationException(TApplicationException.MISSING_RESULT, "updateMasterOrderAWB failed: unknown result");
-
 
12174
 
12093
 
12175
 
12094
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
12176
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
12095
  def __init__(self, handler):
12177
  def __init__(self, handler):
12096
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
12178
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
12097
    self._processMap["createTransaction"] = Processor.process_createTransaction
12179
    self._processMap["createTransaction"] = Processor.process_createTransaction
Line 12379... Line 12461...
12379
    self._processMap["markReturnTransactionComplete"] = Processor.process_markReturnTransactionComplete
12461
    self._processMap["markReturnTransactionComplete"] = Processor.process_markReturnTransactionComplete
12380
    self._processMap["refundReturnTransactionPayment"] = Processor.process_refundReturnTransactionPayment
12462
    self._processMap["refundReturnTransactionPayment"] = Processor.process_refundReturnTransactionPayment
12381
    self._processMap["getReturnTransactionsForCustomer"] = Processor.process_getReturnTransactionsForCustomer
12463
    self._processMap["getReturnTransactionsForCustomer"] = Processor.process_getReturnTransactionsForCustomer
12382
    self._processMap["verifyOrderForTransaction"] = Processor.process_verifyOrderForTransaction
12464
    self._processMap["verifyOrderForTransaction"] = Processor.process_verifyOrderForTransaction
12383
    self._processMap["getOrdersInBatchAsPromisedShipping"] = Processor.process_getOrdersInBatchAsPromisedShipping
12465
    self._processMap["getOrdersInBatchAsPromisedShipping"] = Processor.process_getOrdersInBatchAsPromisedShipping
-
 
12466
    self._processMap["setOrderAttributeForMasterOrderId"] = Processor.process_setOrderAttributeForMasterOrderId
-
 
12467
    self._processMap["updateMasterOrderAWB"] = Processor.process_updateMasterOrderAWB
12384
 
12468
 
12385
  def process(self, iprot, oprot):
12469
  def process(self, iprot, oprot):
12386
    (name, type, seqid) = iprot.readMessageBegin()
12470
    (name, type, seqid) = iprot.readMessageBegin()
12387
    if name not in self._processMap:
12471
    if name not in self._processMap:
12388
      iprot.skip(TType.STRUCT)
12472
      iprot.skip(TType.STRUCT)
Line 15966... Line 16050...
15966
    oprot.writeMessageBegin("getOrdersInBatchAsPromisedShipping", TMessageType.REPLY, seqid)
16050
    oprot.writeMessageBegin("getOrdersInBatchAsPromisedShipping", TMessageType.REPLY, seqid)
15967
    result.write(oprot)
16051
    result.write(oprot)
15968
    oprot.writeMessageEnd()
16052
    oprot.writeMessageEnd()
15969
    oprot.trans.flush()
16053
    oprot.trans.flush()
15970
 
16054
 
-
 
16055
  def process_setOrderAttributeForMasterOrderId(self, seqid, iprot, oprot):
-
 
16056
    args = setOrderAttributeForMasterOrderId_args()
-
 
16057
    args.read(iprot)
-
 
16058
    iprot.readMessageEnd()
-
 
16059
    result = setOrderAttributeForMasterOrderId_result()
-
 
16060
    self._handler.setOrderAttributeForMasterOrderId(args.logisticsTransactionId, args.attributes)
-
 
16061
    oprot.writeMessageBegin("setOrderAttributeForMasterOrderId", TMessageType.REPLY, seqid)
-
 
16062
    result.write(oprot)
-
 
16063
    oprot.writeMessageEnd()
-
 
16064
    oprot.trans.flush()
-
 
16065
 
-
 
16066
  def process_updateMasterOrderAWB(self, seqid, iprot, oprot):
-
 
16067
    args = updateMasterOrderAWB_args()
-
 
16068
    args.read(iprot)
-
 
16069
    iprot.readMessageEnd()
-
 
16070
    result = updateMasterOrderAWB_result()
-
 
16071
    result.success = self._handler.updateMasterOrderAWB(args.logisticsTransactionId, args.airwayBillNo)
-
 
16072
    oprot.writeMessageBegin("updateMasterOrderAWB", TMessageType.REPLY, seqid)
-
 
16073
    result.write(oprot)
-
 
16074
    oprot.writeMessageEnd()
-
 
16075
    oprot.trans.flush()
-
 
16076
 
15971
 
16077
 
15972
# HELPER FUNCTIONS AND STRUCTURES
16078
# HELPER FUNCTIONS AND STRUCTURES
15973
 
16079
 
15974
class createTransaction_args:
16080
class createTransaction_args:
15975
  """
16081
  """
Line 55925... Line 56031...
55925
      oprot.writeFieldEnd()
56031
      oprot.writeFieldEnd()
55926
    oprot.writeFieldStop()
56032
    oprot.writeFieldStop()
55927
    oprot.writeStructEnd()
56033
    oprot.writeStructEnd()
55928
 
56034
 
55929
  def validate(self):
56035
  def validate(self):
-
 
56036
    return
-
 
56037
 
-
 
56038
 
-
 
56039
  def __repr__(self):
-
 
56040
    L = ['%s=%r' % (key, value)
-
 
56041
      for key, value in self.__dict__.iteritems()]
-
 
56042
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
56043
 
-
 
56044
  def __eq__(self, other):
-
 
56045
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
56046
 
-
 
56047
  def __ne__(self, other):
-
 
56048
    return not (self == other)
-
 
56049
 
-
 
56050
class setOrderAttributeForMasterOrderId_args:
-
 
56051
  """
-
 
56052
  Attributes:
-
 
56053
   - logisticsTransactionId
-
 
56054
   - attributes
-
 
56055
  """
-
 
56056
 
-
 
56057
  thrift_spec = (
-
 
56058
    None, # 0
-
 
56059
    (1, TType.STRING, 'logisticsTransactionId', None, None, ), # 1
-
 
56060
    (2, TType.LIST, 'attributes', (TType.STRUCT,(Attribute, Attribute.thrift_spec)), None, ), # 2
-
 
56061
  )
-
 
56062
 
-
 
56063
  def __init__(self, logisticsTransactionId=None, attributes=None,):
-
 
56064
    self.logisticsTransactionId = logisticsTransactionId
-
 
56065
    self.attributes = attributes
-
 
56066
 
-
 
56067
  def read(self, iprot):
-
 
56068
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
56069
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
56070
      return
-
 
56071
    iprot.readStructBegin()
-
 
56072
    while True:
-
 
56073
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
56074
      if ftype == TType.STOP:
-
 
56075
        break
-
 
56076
      if fid == 1:
-
 
56077
        if ftype == TType.STRING:
-
 
56078
          self.logisticsTransactionId = iprot.readString();
-
 
56079
        else:
-
 
56080
          iprot.skip(ftype)
-
 
56081
      elif fid == 2:
-
 
56082
        if ftype == TType.LIST:
-
 
56083
          self.attributes = []
-
 
56084
          (_etype1426, _size1423) = iprot.readListBegin()
-
 
56085
          for _i1427 in xrange(_size1423):
-
 
56086
            _elem1428 = Attribute()
-
 
56087
            _elem1428.read(iprot)
-
 
56088
            self.attributes.append(_elem1428)
-
 
56089
          iprot.readListEnd()
-
 
56090
        else:
-
 
56091
          iprot.skip(ftype)
-
 
56092
      else:
-
 
56093
        iprot.skip(ftype)
-
 
56094
      iprot.readFieldEnd()
-
 
56095
    iprot.readStructEnd()
-
 
56096
 
-
 
56097
  def write(self, oprot):
-
 
56098
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
56099
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
56100
      return
-
 
56101
    oprot.writeStructBegin('setOrderAttributeForMasterOrderId_args')
-
 
56102
    if self.logisticsTransactionId is not None:
-
 
56103
      oprot.writeFieldBegin('logisticsTransactionId', TType.STRING, 1)
-
 
56104
      oprot.writeString(self.logisticsTransactionId)
-
 
56105
      oprot.writeFieldEnd()
-
 
56106
    if self.attributes is not None:
-
 
56107
      oprot.writeFieldBegin('attributes', TType.LIST, 2)
-
 
56108
      oprot.writeListBegin(TType.STRUCT, len(self.attributes))
-
 
56109
      for iter1429 in self.attributes:
-
 
56110
        iter1429.write(oprot)
-
 
56111
      oprot.writeListEnd()
-
 
56112
      oprot.writeFieldEnd()
-
 
56113
    oprot.writeFieldStop()
-
 
56114
    oprot.writeStructEnd()
-
 
56115
 
-
 
56116
  def validate(self):
-
 
56117
    return
-
 
56118
 
-
 
56119
 
-
 
56120
  def __repr__(self):
-
 
56121
    L = ['%s=%r' % (key, value)
-
 
56122
      for key, value in self.__dict__.iteritems()]
-
 
56123
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
56124
 
-
 
56125
  def __eq__(self, other):
-
 
56126
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
56127
 
-
 
56128
  def __ne__(self, other):
-
 
56129
    return not (self == other)
-
 
56130
 
-
 
56131
class setOrderAttributeForMasterOrderId_result:
-
 
56132
 
-
 
56133
  thrift_spec = (
-
 
56134
  )
-
 
56135
 
-
 
56136
  def read(self, iprot):
-
 
56137
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
56138
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
56139
      return
-
 
56140
    iprot.readStructBegin()
-
 
56141
    while True:
-
 
56142
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
56143
      if ftype == TType.STOP:
-
 
56144
        break
-
 
56145
      else:
-
 
56146
        iprot.skip(ftype)
-
 
56147
      iprot.readFieldEnd()
-
 
56148
    iprot.readStructEnd()
-
 
56149
 
-
 
56150
  def write(self, oprot):
-
 
56151
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
56152
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
56153
      return
-
 
56154
    oprot.writeStructBegin('setOrderAttributeForMasterOrderId_result')
-
 
56155
    oprot.writeFieldStop()
-
 
56156
    oprot.writeStructEnd()
-
 
56157
 
-
 
56158
  def validate(self):
-
 
56159
    return
-
 
56160
 
-
 
56161
 
-
 
56162
  def __repr__(self):
-
 
56163
    L = ['%s=%r' % (key, value)
-
 
56164
      for key, value in self.__dict__.iteritems()]
-
 
56165
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
56166
 
-
 
56167
  def __eq__(self, other):
-
 
56168
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
56169
 
-
 
56170
  def __ne__(self, other):
-
 
56171
    return not (self == other)
-
 
56172
 
-
 
56173
class updateMasterOrderAWB_args:
-
 
56174
  """
-
 
56175
  Attributes:
-
 
56176
   - logisticsTransactionId
-
 
56177
   - airwayBillNo
-
 
56178
  """
-
 
56179
 
-
 
56180
  thrift_spec = (
-
 
56181
    None, # 0
-
 
56182
    (1, TType.STRING, 'logisticsTransactionId', None, None, ), # 1
-
 
56183
    (2, TType.STRING, 'airwayBillNo', None, None, ), # 2
-
 
56184
  )
-
 
56185
 
-
 
56186
  def __init__(self, logisticsTransactionId=None, airwayBillNo=None,):
-
 
56187
    self.logisticsTransactionId = logisticsTransactionId
-
 
56188
    self.airwayBillNo = airwayBillNo
-
 
56189
 
-
 
56190
  def read(self, iprot):
-
 
56191
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
56192
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
56193
      return
-
 
56194
    iprot.readStructBegin()
-
 
56195
    while True:
-
 
56196
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
56197
      if ftype == TType.STOP:
-
 
56198
        break
-
 
56199
      if fid == 1:
-
 
56200
        if ftype == TType.STRING:
-
 
56201
          self.logisticsTransactionId = iprot.readString();
-
 
56202
        else:
-
 
56203
          iprot.skip(ftype)
-
 
56204
      elif fid == 2:
-
 
56205
        if ftype == TType.STRING:
-
 
56206
          self.airwayBillNo = iprot.readString();
-
 
56207
        else:
-
 
56208
          iprot.skip(ftype)
-
 
56209
      else:
-
 
56210
        iprot.skip(ftype)
-
 
56211
      iprot.readFieldEnd()
-
 
56212
    iprot.readStructEnd()
-
 
56213
 
-
 
56214
  def write(self, oprot):
-
 
56215
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
56216
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
56217
      return
-
 
56218
    oprot.writeStructBegin('updateMasterOrderAWB_args')
-
 
56219
    if self.logisticsTransactionId is not None:
-
 
56220
      oprot.writeFieldBegin('logisticsTransactionId', TType.STRING, 1)
-
 
56221
      oprot.writeString(self.logisticsTransactionId)
-
 
56222
      oprot.writeFieldEnd()
-
 
56223
    if self.airwayBillNo is not None:
-
 
56224
      oprot.writeFieldBegin('airwayBillNo', TType.STRING, 2)
-
 
56225
      oprot.writeString(self.airwayBillNo)
-
 
56226
      oprot.writeFieldEnd()
-
 
56227
    oprot.writeFieldStop()
-
 
56228
    oprot.writeStructEnd()
-
 
56229
 
-
 
56230
  def validate(self):
-
 
56231
    return
-
 
56232
 
-
 
56233
 
-
 
56234
  def __repr__(self):
-
 
56235
    L = ['%s=%r' % (key, value)
-
 
56236
      for key, value in self.__dict__.iteritems()]
-
 
56237
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
56238
 
-
 
56239
  def __eq__(self, other):
-
 
56240
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
56241
 
-
 
56242
  def __ne__(self, other):
-
 
56243
    return not (self == other)
-
 
56244
 
-
 
56245
class updateMasterOrderAWB_result:
-
 
56246
  """
-
 
56247
  Attributes:
-
 
56248
   - success
-
 
56249
  """
-
 
56250
 
-
 
56251
  thrift_spec = (
-
 
56252
    (0, TType.BOOL, 'success', None, None, ), # 0
-
 
56253
  )
-
 
56254
 
-
 
56255
  def __init__(self, success=None,):
-
 
56256
    self.success = success
-
 
56257
 
-
 
56258
  def read(self, iprot):
-
 
56259
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
56260
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
56261
      return
-
 
56262
    iprot.readStructBegin()
-
 
56263
    while True:
-
 
56264
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
56265
      if ftype == TType.STOP:
-
 
56266
        break
-
 
56267
      if fid == 0:
-
 
56268
        if ftype == TType.BOOL:
-
 
56269
          self.success = iprot.readBool();
-
 
56270
        else:
-
 
56271
          iprot.skip(ftype)
-
 
56272
      else:
-
 
56273
        iprot.skip(ftype)
-
 
56274
      iprot.readFieldEnd()
-
 
56275
    iprot.readStructEnd()
-
 
56276
 
-
 
56277
  def write(self, oprot):
-
 
56278
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
56279
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
56280
      return
-
 
56281
    oprot.writeStructBegin('updateMasterOrderAWB_result')
-
 
56282
    if self.success is not None:
-
 
56283
      oprot.writeFieldBegin('success', TType.BOOL, 0)
-
 
56284
      oprot.writeBool(self.success)
-
 
56285
      oprot.writeFieldEnd()
-
 
56286
    oprot.writeFieldStop()
-
 
56287
    oprot.writeStructEnd()
-
 
56288
 
-
 
56289
  def validate(self):
55930
    return
56290
    return
55931
 
56291
 
55932
 
56292
 
55933
  def __repr__(self):
56293
  def __repr__(self):
55934
    L = ['%s=%r' % (key, value)
56294
    L = ['%s=%r' % (key, value)