Subversion Repositories SmartDukaan

Rev

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

Rev 13941 Rev 17470
Line 2219... Line 2219...
2219
     - hsOrderNo
2219
     - hsOrderNo
2220
     - hsSubOrderNo
2220
     - hsSubOrderNo
2221
    """
2221
    """
2222
    pass
2222
    pass
2223
 
2223
 
-
 
2224
  def splitBulkOrder(self, orderId, splitOrderQty):
-
 
2225
    """
-
 
2226
    Parameters:
-
 
2227
     - orderId
-
 
2228
     - splitOrderQty
-
 
2229
    """
-
 
2230
    pass
-
 
2231
 
2224
 
2232
 
2225
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
2233
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
2226
  def __init__(self, iprot, oprot=None):
2234
  def __init__(self, iprot, oprot=None):
2227
    shop2020.thriftpy.generic.GenericService.Client.__init__(self, iprot, oprot)
2235
    shop2020.thriftpy.generic.GenericService.Client.__init__(self, iprot, oprot)
2228
 
2236
 
Line 10509... Line 10517...
10509
    self._iprot.readMessageEnd()
10517
    self._iprot.readMessageEnd()
10510
    if result.success is not None:
10518
    if result.success is not None:
10511
      return result.success
10519
      return result.success
10512
    raise TApplicationException(TApplicationException.MISSING_RESULT, "homeShopOrderExists failed: unknown result");
10520
    raise TApplicationException(TApplicationException.MISSING_RESULT, "homeShopOrderExists failed: unknown result");
10513
 
10521
 
-
 
10522
  def splitBulkOrder(self, orderId, splitOrderQty):
-
 
10523
    """
-
 
10524
    Parameters:
-
 
10525
     - orderId
-
 
10526
     - splitOrderQty
-
 
10527
    """
-
 
10528
    self.send_splitBulkOrder(orderId, splitOrderQty)
-
 
10529
    return self.recv_splitBulkOrder()
-
 
10530
 
-
 
10531
  def send_splitBulkOrder(self, orderId, splitOrderQty):
-
 
10532
    self._oprot.writeMessageBegin('splitBulkOrder', TMessageType.CALL, self._seqid)
-
 
10533
    args = splitBulkOrder_args()
-
 
10534
    args.orderId = orderId
-
 
10535
    args.splitOrderQty = splitOrderQty
-
 
10536
    args.write(self._oprot)
-
 
10537
    self._oprot.writeMessageEnd()
-
 
10538
    self._oprot.trans.flush()
-
 
10539
 
-
 
10540
  def recv_splitBulkOrder(self, ):
-
 
10541
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
-
 
10542
    if mtype == TMessageType.EXCEPTION:
-
 
10543
      x = TApplicationException()
-
 
10544
      x.read(self._iprot)
-
 
10545
      self._iprot.readMessageEnd()
-
 
10546
      raise x
-
 
10547
    result = splitBulkOrder_result()
-
 
10548
    result.read(self._iprot)
-
 
10549
    self._iprot.readMessageEnd()
-
 
10550
    if result.success is not None:
-
 
10551
      return result.success
-
 
10552
    raise TApplicationException(TApplicationException.MISSING_RESULT, "splitBulkOrder failed: unknown result");
-
 
10553
 
10514
 
10554
 
10515
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
10555
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
10516
  def __init__(self, handler):
10556
  def __init__(self, handler):
10517
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
10557
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
10518
    self._processMap["createTransaction"] = Processor.process_createTransaction
10558
    self._processMap["createTransaction"] = Processor.process_createTransaction
Line 10762... Line 10802...
10762
    self._processMap["addBillingDetailsForGrouppedOrders"] = Processor.process_addBillingDetailsForGrouppedOrders
10802
    self._processMap["addBillingDetailsForGrouppedOrders"] = Processor.process_addBillingDetailsForGrouppedOrders
10763
    self._processMap["getInvoiceFormatLogisticsTxnId"] = Processor.process_getInvoiceFormatLogisticsTxnId
10803
    self._processMap["getInvoiceFormatLogisticsTxnId"] = Processor.process_getInvoiceFormatLogisticsTxnId
10764
    self._processMap["createHomeShopOrder"] = Processor.process_createHomeShopOrder
10804
    self._processMap["createHomeShopOrder"] = Processor.process_createHomeShopOrder
10765
    self._processMap["getHomeShopOrder"] = Processor.process_getHomeShopOrder
10805
    self._processMap["getHomeShopOrder"] = Processor.process_getHomeShopOrder
10766
    self._processMap["homeShopOrderExists"] = Processor.process_homeShopOrderExists
10806
    self._processMap["homeShopOrderExists"] = Processor.process_homeShopOrderExists
-
 
10807
    self._processMap["splitBulkOrder"] = Processor.process_splitBulkOrder
10767
 
10808
 
10768
  def process(self, iprot, oprot):
10809
  def process(self, iprot, oprot):
10769
    (name, type, seqid) = iprot.readMessageBegin()
10810
    (name, type, seqid) = iprot.readMessageBegin()
10770
    if name not in self._processMap:
10811
    if name not in self._processMap:
10771
      iprot.skip(TType.STRUCT)
10812
      iprot.skip(TType.STRUCT)
Line 13868... Line 13909...
13868
    oprot.writeMessageBegin("homeShopOrderExists", TMessageType.REPLY, seqid)
13909
    oprot.writeMessageBegin("homeShopOrderExists", TMessageType.REPLY, seqid)
13869
    result.write(oprot)
13910
    result.write(oprot)
13870
    oprot.writeMessageEnd()
13911
    oprot.writeMessageEnd()
13871
    oprot.trans.flush()
13912
    oprot.trans.flush()
13872
 
13913
 
-
 
13914
  def process_splitBulkOrder(self, seqid, iprot, oprot):
-
 
13915
    args = splitBulkOrder_args()
-
 
13916
    args.read(iprot)
-
 
13917
    iprot.readMessageEnd()
-
 
13918
    result = splitBulkOrder_result()
-
 
13919
    result.success = self._handler.splitBulkOrder(args.orderId, args.splitOrderQty)
-
 
13920
    oprot.writeMessageBegin("splitBulkOrder", TMessageType.REPLY, seqid)
-
 
13921
    result.write(oprot)
-
 
13922
    oprot.writeMessageEnd()
-
 
13923
    oprot.trans.flush()
-
 
13924
 
13873
 
13925
 
13874
# HELPER FUNCTIONS AND STRUCTURES
13926
# HELPER FUNCTIONS AND STRUCTURES
13875
 
13927
 
13876
class createTransaction_args:
13928
class createTransaction_args:
13877
  """
13929
  """
Line 48213... Line 48265...
48213
      oprot.writeFieldEnd()
48265
      oprot.writeFieldEnd()
48214
    oprot.writeFieldStop()
48266
    oprot.writeFieldStop()
48215
    oprot.writeStructEnd()
48267
    oprot.writeStructEnd()
48216
 
48268
 
48217
  def validate(self):
48269
  def validate(self):
-
 
48270
    return
-
 
48271
 
-
 
48272
 
-
 
48273
  def __repr__(self):
-
 
48274
    L = ['%s=%r' % (key, value)
-
 
48275
      for key, value in self.__dict__.iteritems()]
-
 
48276
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
48277
 
-
 
48278
  def __eq__(self, other):
-
 
48279
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
48280
 
-
 
48281
  def __ne__(self, other):
-
 
48282
    return not (self == other)
-
 
48283
 
-
 
48284
class splitBulkOrder_args:
-
 
48285
  """
-
 
48286
  Attributes:
-
 
48287
   - orderId
-
 
48288
   - splitOrderQty
-
 
48289
  """
-
 
48290
 
-
 
48291
  thrift_spec = (
-
 
48292
    None, # 0
-
 
48293
    (1, TType.I64, 'orderId', None, None, ), # 1
-
 
48294
    (2, TType.I64, 'splitOrderQty', None, None, ), # 2
-
 
48295
  )
-
 
48296
 
-
 
48297
  def __init__(self, orderId=None, splitOrderQty=None,):
-
 
48298
    self.orderId = orderId
-
 
48299
    self.splitOrderQty = splitOrderQty
-
 
48300
 
-
 
48301
  def read(self, iprot):
-
 
48302
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
48303
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
48304
      return
-
 
48305
    iprot.readStructBegin()
-
 
48306
    while True:
-
 
48307
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
48308
      if ftype == TType.STOP:
-
 
48309
        break
-
 
48310
      if fid == 1:
-
 
48311
        if ftype == TType.I64:
-
 
48312
          self.orderId = iprot.readI64();
-
 
48313
        else:
-
 
48314
          iprot.skip(ftype)
-
 
48315
      elif fid == 2:
-
 
48316
        if ftype == TType.I64:
-
 
48317
          self.splitOrderQty = iprot.readI64();
-
 
48318
        else:
-
 
48319
          iprot.skip(ftype)
-
 
48320
      else:
-
 
48321
        iprot.skip(ftype)
-
 
48322
      iprot.readFieldEnd()
-
 
48323
    iprot.readStructEnd()
-
 
48324
 
-
 
48325
  def write(self, oprot):
-
 
48326
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
48327
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
48328
      return
-
 
48329
    oprot.writeStructBegin('splitBulkOrder_args')
-
 
48330
    if self.orderId is not None:
-
 
48331
      oprot.writeFieldBegin('orderId', TType.I64, 1)
-
 
48332
      oprot.writeI64(self.orderId)
-
 
48333
      oprot.writeFieldEnd()
-
 
48334
    if self.splitOrderQty is not None:
-
 
48335
      oprot.writeFieldBegin('splitOrderQty', TType.I64, 2)
-
 
48336
      oprot.writeI64(self.splitOrderQty)
-
 
48337
      oprot.writeFieldEnd()
-
 
48338
    oprot.writeFieldStop()
-
 
48339
    oprot.writeStructEnd()
-
 
48340
 
-
 
48341
  def validate(self):
-
 
48342
    return
-
 
48343
 
-
 
48344
 
-
 
48345
  def __repr__(self):
-
 
48346
    L = ['%s=%r' % (key, value)
-
 
48347
      for key, value in self.__dict__.iteritems()]
-
 
48348
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
48349
 
-
 
48350
  def __eq__(self, other):
-
 
48351
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
48352
 
-
 
48353
  def __ne__(self, other):
-
 
48354
    return not (self == other)
-
 
48355
 
-
 
48356
class splitBulkOrder_result:
-
 
48357
  """
-
 
48358
  Attributes:
-
 
48359
   - success
-
 
48360
  """
-
 
48361
 
-
 
48362
  thrift_spec = (
-
 
48363
    (0, TType.STRUCT, 'success', (Order, Order.thrift_spec), None, ), # 0
-
 
48364
  )
-
 
48365
 
-
 
48366
  def __init__(self, success=None,):
-
 
48367
    self.success = success
-
 
48368
 
-
 
48369
  def read(self, iprot):
-
 
48370
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
48371
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
48372
      return
-
 
48373
    iprot.readStructBegin()
-
 
48374
    while True:
-
 
48375
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
48376
      if ftype == TType.STOP:
-
 
48377
        break
-
 
48378
      if fid == 0:
-
 
48379
        if ftype == TType.STRUCT:
-
 
48380
          self.success = Order()
-
 
48381
          self.success.read(iprot)
-
 
48382
        else:
-
 
48383
          iprot.skip(ftype)
-
 
48384
      else:
-
 
48385
        iprot.skip(ftype)
-
 
48386
      iprot.readFieldEnd()
-
 
48387
    iprot.readStructEnd()
-
 
48388
 
-
 
48389
  def write(self, oprot):
-
 
48390
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
48391
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
48392
      return
-
 
48393
    oprot.writeStructBegin('splitBulkOrder_result')
-
 
48394
    if self.success is not None:
-
 
48395
      oprot.writeFieldBegin('success', TType.STRUCT, 0)
-
 
48396
      self.success.write(oprot)
-
 
48397
      oprot.writeFieldEnd()
-
 
48398
    oprot.writeFieldStop()
-
 
48399
    oprot.writeStructEnd()
-
 
48400
 
-
 
48401
  def validate(self):
48218
    return
48402
    return
48219
 
48403
 
48220
 
48404
 
48221
  def __repr__(self):
48405
  def __repr__(self):
48222
    L = ['%s=%r' % (key, value)
48406
    L = ['%s=%r' % (key, value)