Subversion Repositories SmartDukaan

Rev

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

Rev 4369 Rev 4386
Line 782... Line 782...
782
    Parameters:
782
    Parameters:
783
     - vendorId
783
     - vendorId
784
    """
784
    """
785
    pass
785
    pass
786
 
786
 
-
 
787
  def getOrderForAwb(self, awb):
-
 
788
    """
-
 
789
    Returns the order corresponding to an AWB number
-
 
790
 
-
 
791
    Parameters:
-
 
792
     - awb
-
 
793
    """
-
 
794
    pass
-
 
795
 
787
 
796
 
788
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
797
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
789
  def __init__(self, iprot, oprot=None):
798
  def __init__(self, iprot, oprot=None):
790
    shop2020.thriftpy.generic.GenericService.Client.__init__(self, iprot, oprot)
799
    shop2020.thriftpy.generic.GenericService.Client.__init__(self, iprot, oprot)
791
 
800
 
Line 3322... Line 3331...
3322
      return result.success
3331
      return result.success
3323
    if result.ex is not None:
3332
    if result.ex is not None:
3324
      raise result.ex
3333
      raise result.ex
3325
    raise TApplicationException(TApplicationException.MISSING_RESULT, "markOrdersAsTimeout failed: unknown result");
3334
    raise TApplicationException(TApplicationException.MISSING_RESULT, "markOrdersAsTimeout failed: unknown result");
3326
 
3335
 
-
 
3336
  def getOrderForAwb(self, awb):
-
 
3337
    """
-
 
3338
    Returns the order corresponding to an AWB number
-
 
3339
 
-
 
3340
    Parameters:
-
 
3341
     - awb
-
 
3342
    """
-
 
3343
    self.send_getOrderForAwb(awb)
-
 
3344
    return self.recv_getOrderForAwb()
-
 
3345
 
-
 
3346
  def send_getOrderForAwb(self, awb):
-
 
3347
    self._oprot.writeMessageBegin('getOrderForAwb', TMessageType.CALL, self._seqid)
-
 
3348
    args = getOrderForAwb_args()
-
 
3349
    args.awb = awb
-
 
3350
    args.write(self._oprot)
-
 
3351
    self._oprot.writeMessageEnd()
-
 
3352
    self._oprot.trans.flush()
-
 
3353
 
-
 
3354
  def recv_getOrderForAwb(self, ):
-
 
3355
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
-
 
3356
    if mtype == TMessageType.EXCEPTION:
-
 
3357
      x = TApplicationException()
-
 
3358
      x.read(self._iprot)
-
 
3359
      self._iprot.readMessageEnd()
-
 
3360
      raise x
-
 
3361
    result = getOrderForAwb_result()
-
 
3362
    result.read(self._iprot)
-
 
3363
    self._iprot.readMessageEnd()
-
 
3364
    if result.success is not None:
-
 
3365
      return result.success
-
 
3366
    if result.ex is not None:
-
 
3367
      raise result.ex
-
 
3368
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getOrderForAwb failed: unknown result");
-
 
3369
 
3327
 
3370
 
3328
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
3371
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
3329
  def __init__(self, handler):
3372
  def __init__(self, handler):
3330
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
3373
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
3331
    self._processMap["createTransaction"] = Processor.process_createTransaction
3374
    self._processMap["createTransaction"] = Processor.process_createTransaction
Line 3396... Line 3439...
3396
    self._processMap["acceptOrdersForItemId"] = Processor.process_acceptOrdersForItemId
3439
    self._processMap["acceptOrdersForItemId"] = Processor.process_acceptOrdersForItemId
3397
    self._processMap["markOrdersAsPORaised"] = Processor.process_markOrdersAsPORaised
3440
    self._processMap["markOrdersAsPORaised"] = Processor.process_markOrdersAsPORaised
3398
    self._processMap["markOrdersAsReversalInitiated"] = Processor.process_markOrdersAsReversalInitiated
3441
    self._processMap["markOrdersAsReversalInitiated"] = Processor.process_markOrdersAsReversalInitiated
3399
    self._processMap["markOrdersAsNotAvailabke"] = Processor.process_markOrdersAsNotAvailabke
3442
    self._processMap["markOrdersAsNotAvailabke"] = Processor.process_markOrdersAsNotAvailabke
3400
    self._processMap["markOrdersAsTimeout"] = Processor.process_markOrdersAsTimeout
3443
    self._processMap["markOrdersAsTimeout"] = Processor.process_markOrdersAsTimeout
-
 
3444
    self._processMap["getOrderForAwb"] = Processor.process_getOrderForAwb
3401
 
3445
 
3402
  def process(self, iprot, oprot):
3446
  def process(self, iprot, oprot):
3403
    (name, type, seqid) = iprot.readMessageBegin()
3447
    (name, type, seqid) = iprot.readMessageBegin()
3404
    if name not in self._processMap:
3448
    if name not in self._processMap:
3405
      iprot.skip(TType.STRUCT)
3449
      iprot.skip(TType.STRUCT)
Line 4353... Line 4397...
4353
    oprot.writeMessageBegin("markOrdersAsTimeout", TMessageType.REPLY, seqid)
4397
    oprot.writeMessageBegin("markOrdersAsTimeout", TMessageType.REPLY, seqid)
4354
    result.write(oprot)
4398
    result.write(oprot)
4355
    oprot.writeMessageEnd()
4399
    oprot.writeMessageEnd()
4356
    oprot.trans.flush()
4400
    oprot.trans.flush()
4357
 
4401
 
-
 
4402
  def process_getOrderForAwb(self, seqid, iprot, oprot):
-
 
4403
    args = getOrderForAwb_args()
-
 
4404
    args.read(iprot)
-
 
4405
    iprot.readMessageEnd()
-
 
4406
    result = getOrderForAwb_result()
-
 
4407
    try:
-
 
4408
      result.success = self._handler.getOrderForAwb(args.awb)
-
 
4409
    except TransactionServiceException, ex:
-
 
4410
      result.ex = ex
-
 
4411
    oprot.writeMessageBegin("getOrderForAwb", TMessageType.REPLY, seqid)
-
 
4412
    result.write(oprot)
-
 
4413
    oprot.writeMessageEnd()
-
 
4414
    oprot.trans.flush()
-
 
4415
 
4358
 
4416
 
4359
# HELPER FUNCTIONS AND STRUCTURES
4417
# HELPER FUNCTIONS AND STRUCTURES
4360
 
4418
 
4361
class createTransaction_args:
4419
class createTransaction_args:
4362
  """
4420
  """
Line 14413... Line 14471...
14413
      oprot.writeFieldEnd()
14471
      oprot.writeFieldEnd()
14414
    if self.ex is not None:
14472
    if self.ex is not None:
14415
      oprot.writeFieldBegin('ex', TType.STRUCT, 1)
14473
      oprot.writeFieldBegin('ex', TType.STRUCT, 1)
14416
      self.ex.write(oprot)
14474
      self.ex.write(oprot)
14417
      oprot.writeFieldEnd()
14475
      oprot.writeFieldEnd()
-
 
14476
    oprot.writeFieldStop()
-
 
14477
    oprot.writeStructEnd()
-
 
14478
 
-
 
14479
  def validate(self):
-
 
14480
    return
-
 
14481
 
-
 
14482
 
-
 
14483
  def __repr__(self):
-
 
14484
    L = ['%s=%r' % (key, value)
-
 
14485
      for key, value in self.__dict__.iteritems()]
-
 
14486
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
14487
 
-
 
14488
  def __eq__(self, other):
-
 
14489
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
14490
 
-
 
14491
  def __ne__(self, other):
-
 
14492
    return not (self == other)
-
 
14493
 
-
 
14494
class getOrderForAwb_args:
-
 
14495
  """
-
 
14496
  Attributes:
-
 
14497
   - awb
-
 
14498
  """
-
 
14499
 
-
 
14500
  thrift_spec = (
-
 
14501
    None, # 0
-
 
14502
    (1, TType.STRING, 'awb', None, None, ), # 1
-
 
14503
  )
-
 
14504
 
-
 
14505
  def __init__(self, awb=None,):
-
 
14506
    self.awb = awb
-
 
14507
 
-
 
14508
  def read(self, iprot):
-
 
14509
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
14510
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
14511
      return
-
 
14512
    iprot.readStructBegin()
-
 
14513
    while True:
-
 
14514
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
14515
      if ftype == TType.STOP:
-
 
14516
        break
-
 
14517
      if fid == 1:
-
 
14518
        if ftype == TType.STRING:
-
 
14519
          self.awb = iprot.readString();
-
 
14520
        else:
-
 
14521
          iprot.skip(ftype)
-
 
14522
      else:
-
 
14523
        iprot.skip(ftype)
-
 
14524
      iprot.readFieldEnd()
-
 
14525
    iprot.readStructEnd()
-
 
14526
 
-
 
14527
  def write(self, oprot):
-
 
14528
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
14529
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
14530
      return
-
 
14531
    oprot.writeStructBegin('getOrderForAwb_args')
-
 
14532
    if self.awb is not None:
-
 
14533
      oprot.writeFieldBegin('awb', TType.STRING, 1)
-
 
14534
      oprot.writeString(self.awb)
-
 
14535
      oprot.writeFieldEnd()
-
 
14536
    oprot.writeFieldStop()
-
 
14537
    oprot.writeStructEnd()
-
 
14538
 
-
 
14539
  def validate(self):
-
 
14540
    return
-
 
14541
 
-
 
14542
 
-
 
14543
  def __repr__(self):
-
 
14544
    L = ['%s=%r' % (key, value)
-
 
14545
      for key, value in self.__dict__.iteritems()]
-
 
14546
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
14547
 
-
 
14548
  def __eq__(self, other):
-
 
14549
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
14550
 
-
 
14551
  def __ne__(self, other):
-
 
14552
    return not (self == other)
-
 
14553
 
-
 
14554
class getOrderForAwb_result:
-
 
14555
  """
-
 
14556
  Attributes:
-
 
14557
   - success
-
 
14558
   - ex
-
 
14559
  """
-
 
14560
 
-
 
14561
  thrift_spec = (
-
 
14562
    (0, TType.STRUCT, 'success', (Order, Order.thrift_spec), None, ), # 0
-
 
14563
    (1, TType.STRUCT, 'ex', (TransactionServiceException, TransactionServiceException.thrift_spec), None, ), # 1
-
 
14564
  )
-
 
14565
 
-
 
14566
  def __init__(self, success=None, ex=None,):
-
 
14567
    self.success = success
-
 
14568
    self.ex = ex
-
 
14569
 
-
 
14570
  def read(self, iprot):
-
 
14571
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
14572
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
14573
      return
-
 
14574
    iprot.readStructBegin()
-
 
14575
    while True:
-
 
14576
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
14577
      if ftype == TType.STOP:
-
 
14578
        break
-
 
14579
      if fid == 0:
-
 
14580
        if ftype == TType.STRUCT:
-
 
14581
          self.success = Order()
-
 
14582
          self.success.read(iprot)
-
 
14583
        else:
-
 
14584
          iprot.skip(ftype)
-
 
14585
      elif fid == 1:
-
 
14586
        if ftype == TType.STRUCT:
-
 
14587
          self.ex = TransactionServiceException()
-
 
14588
          self.ex.read(iprot)
-
 
14589
        else:
-
 
14590
          iprot.skip(ftype)
-
 
14591
      else:
-
 
14592
        iprot.skip(ftype)
-
 
14593
      iprot.readFieldEnd()
-
 
14594
    iprot.readStructEnd()
-
 
14595
 
-
 
14596
  def write(self, oprot):
-
 
14597
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
14598
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
14599
      return
-
 
14600
    oprot.writeStructBegin('getOrderForAwb_result')
-
 
14601
    if self.success is not None:
-
 
14602
      oprot.writeFieldBegin('success', TType.STRUCT, 0)
-
 
14603
      self.success.write(oprot)
-
 
14604
      oprot.writeFieldEnd()
-
 
14605
    if self.ex is not None:
-
 
14606
      oprot.writeFieldBegin('ex', TType.STRUCT, 1)
-
 
14607
      self.ex.write(oprot)
-
 
14608
      oprot.writeFieldEnd()
14418
    oprot.writeFieldStop()
14609
    oprot.writeFieldStop()
14419
    oprot.writeStructEnd()
14610
    oprot.writeStructEnd()
14420
 
14611
 
14421
  def validate(self):
14612
  def validate(self):
14422
    return
14613
    return