Subversion Repositories SmartDukaan

Rev

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

Rev 9829 Rev 9925
Line 279... Line 279...
279
     - id
279
     - id
280
     - warehouseId
280
     - warehouseId
281
    """
281
    """
282
    pass
282
    pass
283
 
283
 
-
 
284
  def changePOStatus(self, id, poStatus):
-
 
285
    """
-
 
286
    Change status of PO
-
 
287
 
-
 
288
    Parameters:
-
 
289
     - id
-
 
290
     - poStatus
-
 
291
    """
-
 
292
    pass
-
 
293
 
284
 
294
 
285
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
295
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
286
  def __init__(self, iprot, oprot=None):
296
  def __init__(self, iprot, oprot=None):
287
    shop2020.thriftpy.generic.GenericService.Client.__init__(self, iprot, oprot)
297
    shop2020.thriftpy.generic.GenericService.Client.__init__(self, iprot, oprot)
288
 
298
 
Line 1220... Line 1230...
1220
    self._iprot.readMessageEnd()
1230
    self._iprot.readMessageEnd()
1221
    if result.e is not None:
1231
    if result.e is not None:
1222
      raise result.e
1232
      raise result.e
1223
    return
1233
    return
1224
 
1234
 
-
 
1235
  def changePOStatus(self, id, poStatus):
-
 
1236
    """
-
 
1237
    Change status of PO
-
 
1238
 
-
 
1239
    Parameters:
-
 
1240
     - id
-
 
1241
     - poStatus
-
 
1242
    """
-
 
1243
    self.send_changePOStatus(id, poStatus)
-
 
1244
    self.recv_changePOStatus()
-
 
1245
 
-
 
1246
  def send_changePOStatus(self, id, poStatus):
-
 
1247
    self._oprot.writeMessageBegin('changePOStatus', TMessageType.CALL, self._seqid)
-
 
1248
    args = changePOStatus_args()
-
 
1249
    args.id = id
-
 
1250
    args.poStatus = poStatus
-
 
1251
    args.write(self._oprot)
-
 
1252
    self._oprot.writeMessageEnd()
-
 
1253
    self._oprot.trans.flush()
-
 
1254
 
-
 
1255
  def recv_changePOStatus(self, ):
-
 
1256
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
-
 
1257
    if mtype == TMessageType.EXCEPTION:
-
 
1258
      x = TApplicationException()
-
 
1259
      x.read(self._iprot)
-
 
1260
      self._iprot.readMessageEnd()
-
 
1261
      raise x
-
 
1262
    result = changePOStatus_result()
-
 
1263
    result.read(self._iprot)
-
 
1264
    self._iprot.readMessageEnd()
-
 
1265
    if result.e is not None:
-
 
1266
      raise result.e
-
 
1267
    return
-
 
1268
 
1225
 
1269
 
1226
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
1270
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
1227
  def __init__(self, handler):
1271
  def __init__(self, handler):
1228
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
1272
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
1229
    self._processMap["createPurchaseOrder"] = Processor.process_createPurchaseOrder
1273
    self._processMap["createPurchaseOrder"] = Processor.process_createPurchaseOrder
Line 1252... Line 1296...
1252
    self._processMap["createPurchaseForOurExtBilling"] = Processor.process_createPurchaseForOurExtBilling
1296
    self._processMap["createPurchaseForOurExtBilling"] = Processor.process_createPurchaseForOurExtBilling
1253
    self._processMap["fulfillPOForExtBilling"] = Processor.process_fulfillPOForExtBilling
1297
    self._processMap["fulfillPOForExtBilling"] = Processor.process_fulfillPOForExtBilling
1254
    self._processMap["closePO"] = Processor.process_closePO
1298
    self._processMap["closePO"] = Processor.process_closePO
1255
    self._processMap["isInvoiceReceived"] = Processor.process_isInvoiceReceived
1299
    self._processMap["isInvoiceReceived"] = Processor.process_isInvoiceReceived
1256
    self._processMap["changeWarehouseForPO"] = Processor.process_changeWarehouseForPO
1300
    self._processMap["changeWarehouseForPO"] = Processor.process_changeWarehouseForPO
-
 
1301
    self._processMap["changePOStatus"] = Processor.process_changePOStatus
1257
 
1302
 
1258
  def process(self, iprot, oprot):
1303
  def process(self, iprot, oprot):
1259
    (name, type, seqid) = iprot.readMessageBegin()
1304
    (name, type, seqid) = iprot.readMessageBegin()
1260
    if name not in self._processMap:
1305
    if name not in self._processMap:
1261
      iprot.skip(TType.STRUCT)
1306
      iprot.skip(TType.STRUCT)
Line 1624... Line 1669...
1624
    oprot.writeMessageBegin("changeWarehouseForPO", TMessageType.REPLY, seqid)
1669
    oprot.writeMessageBegin("changeWarehouseForPO", TMessageType.REPLY, seqid)
1625
    result.write(oprot)
1670
    result.write(oprot)
1626
    oprot.writeMessageEnd()
1671
    oprot.writeMessageEnd()
1627
    oprot.trans.flush()
1672
    oprot.trans.flush()
1628
 
1673
 
-
 
1674
  def process_changePOStatus(self, seqid, iprot, oprot):
-
 
1675
    args = changePOStatus_args()
-
 
1676
    args.read(iprot)
-
 
1677
    iprot.readMessageEnd()
-
 
1678
    result = changePOStatus_result()
-
 
1679
    try:
-
 
1680
      self._handler.changePOStatus(args.id, args.poStatus)
-
 
1681
    except PurchaseServiceException, e:
-
 
1682
      result.e = e
-
 
1683
    oprot.writeMessageBegin("changePOStatus", TMessageType.REPLY, seqid)
-
 
1684
    result.write(oprot)
-
 
1685
    oprot.writeMessageEnd()
-
 
1686
    oprot.trans.flush()
-
 
1687
 
1629
 
1688
 
1630
# HELPER FUNCTIONS AND STRUCTURES
1689
# HELPER FUNCTIONS AND STRUCTURES
1631
 
1690
 
1632
class createPurchaseOrder_args:
1691
class createPurchaseOrder_args:
1633
  """
1692
  """
Line 5280... Line 5339...
5280
    if self.e is not None:
5339
    if self.e is not None:
5281
      oprot.writeFieldBegin('e', TType.STRUCT, 1)
5340
      oprot.writeFieldBegin('e', TType.STRUCT, 1)
5282
      self.e.write(oprot)
5341
      self.e.write(oprot)
5283
      oprot.writeFieldEnd()
5342
      oprot.writeFieldEnd()
5284
    oprot.writeFieldStop()
5343
    oprot.writeFieldStop()
-
 
5344
    oprot.writeStructEnd()
-
 
5345
 
-
 
5346
  def validate(self):
-
 
5347
    return
-
 
5348
 
-
 
5349
 
-
 
5350
  def __repr__(self):
-
 
5351
    L = ['%s=%r' % (key, value)
-
 
5352
      for key, value in self.__dict__.iteritems()]
-
 
5353
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
5354
 
-
 
5355
  def __eq__(self, other):
-
 
5356
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
5357
 
-
 
5358
  def __ne__(self, other):
-
 
5359
    return not (self == other)
-
 
5360
 
-
 
5361
class changePOStatus_args:
-
 
5362
  """
-
 
5363
  Attributes:
-
 
5364
   - id
-
 
5365
   - poStatus
-
 
5366
  """
-
 
5367
 
-
 
5368
  thrift_spec = (
-
 
5369
    None, # 0
-
 
5370
    (1, TType.I64, 'id', None, None, ), # 1
-
 
5371
    (2, TType.I32, 'poStatus', None, None, ), # 2
-
 
5372
  )
-
 
5373
 
-
 
5374
  def __init__(self, id=None, poStatus=None,):
-
 
5375
    self.id = id
-
 
5376
    self.poStatus = poStatus
-
 
5377
 
-
 
5378
  def read(self, iprot):
-
 
5379
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
5380
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
5381
      return
-
 
5382
    iprot.readStructBegin()
-
 
5383
    while True:
-
 
5384
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
5385
      if ftype == TType.STOP:
-
 
5386
        break
-
 
5387
      if fid == 1:
-
 
5388
        if ftype == TType.I64:
-
 
5389
          self.id = iprot.readI64();
-
 
5390
        else:
-
 
5391
          iprot.skip(ftype)
-
 
5392
      elif fid == 2:
-
 
5393
        if ftype == TType.I32:
-
 
5394
          self.poStatus = iprot.readI32();
-
 
5395
        else:
-
 
5396
          iprot.skip(ftype)
-
 
5397
      else:
-
 
5398
        iprot.skip(ftype)
-
 
5399
      iprot.readFieldEnd()
-
 
5400
    iprot.readStructEnd()
-
 
5401
 
-
 
5402
  def write(self, oprot):
-
 
5403
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
5404
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
5405
      return
-
 
5406
    oprot.writeStructBegin('changePOStatus_args')
-
 
5407
    if self.id is not None:
-
 
5408
      oprot.writeFieldBegin('id', TType.I64, 1)
-
 
5409
      oprot.writeI64(self.id)
-
 
5410
      oprot.writeFieldEnd()
-
 
5411
    if self.poStatus is not None:
-
 
5412
      oprot.writeFieldBegin('poStatus', TType.I32, 2)
-
 
5413
      oprot.writeI32(self.poStatus)
-
 
5414
      oprot.writeFieldEnd()
-
 
5415
    oprot.writeFieldStop()
-
 
5416
    oprot.writeStructEnd()
-
 
5417
 
-
 
5418
  def validate(self):
-
 
5419
    return
-
 
5420
 
-
 
5421
 
-
 
5422
  def __repr__(self):
-
 
5423
    L = ['%s=%r' % (key, value)
-
 
5424
      for key, value in self.__dict__.iteritems()]
-
 
5425
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
5426
 
-
 
5427
  def __eq__(self, other):
-
 
5428
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
5429
 
-
 
5430
  def __ne__(self, other):
-
 
5431
    return not (self == other)
-
 
5432
 
-
 
5433
class changePOStatus_result:
-
 
5434
  """
-
 
5435
  Attributes:
-
 
5436
   - e
-
 
5437
  """
-
 
5438
 
-
 
5439
  thrift_spec = (
-
 
5440
    None, # 0
-
 
5441
    (1, TType.STRUCT, 'e', (PurchaseServiceException, PurchaseServiceException.thrift_spec), None, ), # 1
-
 
5442
  )
-
 
5443
 
-
 
5444
  def __init__(self, e=None,):
-
 
5445
    self.e = e
-
 
5446
 
-
 
5447
  def read(self, iprot):
-
 
5448
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
5449
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
5450
      return
-
 
5451
    iprot.readStructBegin()
-
 
5452
    while True:
-
 
5453
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
5454
      if ftype == TType.STOP:
-
 
5455
        break
-
 
5456
      if fid == 1:
-
 
5457
        if ftype == TType.STRUCT:
-
 
5458
          self.e = PurchaseServiceException()
-
 
5459
          self.e.read(iprot)
-
 
5460
        else:
-
 
5461
          iprot.skip(ftype)
-
 
5462
      else:
-
 
5463
        iprot.skip(ftype)
-
 
5464
      iprot.readFieldEnd()
-
 
5465
    iprot.readStructEnd()
-
 
5466
 
-
 
5467
  def write(self, oprot):
-
 
5468
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
5469
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
5470
      return
-
 
5471
    oprot.writeStructBegin('changePOStatus_result')
-
 
5472
    if self.e is not None:
-
 
5473
      oprot.writeFieldBegin('e', TType.STRUCT, 1)
-
 
5474
      self.e.write(oprot)
-
 
5475
      oprot.writeFieldEnd()
-
 
5476
    oprot.writeFieldStop()
5285
    oprot.writeStructEnd()
5477
    oprot.writeStructEnd()
5286
 
5478
 
5287
  def validate(self):
5479
  def validate(self):
5288
    return
5480
    return
5289
 
5481