Subversion Repositories SmartDukaan

Rev

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

Rev 5553 Rev 5593
Line 1219... Line 1219...
1219
    Parameters:
1219
    Parameters:
1220
     - storeId
1220
     - storeId
1221
    """
1221
    """
1222
    pass
1222
    pass
1223
 
1223
 
-
 
1224
  def acceptOrderForItem(self, itemId, quantity, fulfilmentWarehouseId, billingWarehouseId):
-
 
1225
    """
-
 
1226
    Accepts appropriate order for an item in a given billingWarehouse. Usually
-
 
1227
    invoked while scanning IN of items.
-
 
1228
 
-
 
1229
    Parameters:
-
 
1230
     - itemId
-
 
1231
     - quantity
-
 
1232
     - fulfilmentWarehouseId
-
 
1233
     - billingWarehouseId
-
 
1234
    """
-
 
1235
    pass
-
 
1236
 
1224
 
1237
 
1225
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
1238
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
1226
  def __init__(self, iprot, oprot=None):
1239
  def __init__(self, iprot, oprot=None):
1227
    shop2020.thriftpy.generic.GenericService.Client.__init__(self, iprot, oprot)
1240
    shop2020.thriftpy.generic.GenericService.Client.__init__(self, iprot, oprot)
1228
 
1241
 
Line 5422... Line 5435...
5422
    self._iprot.readMessageEnd()
5435
    self._iprot.readMessageEnd()
5423
    if result.success is not None:
5436
    if result.success is not None:
5424
      return result.success
5437
      return result.success
5425
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getReceivedAtStoreOrders failed: unknown result");
5438
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getReceivedAtStoreOrders failed: unknown result");
5426
 
5439
 
-
 
5440
  def acceptOrderForItem(self, itemId, quantity, fulfilmentWarehouseId, billingWarehouseId):
-
 
5441
    """
-
 
5442
    Accepts appropriate order for an item in a given billingWarehouse. Usually
-
 
5443
    invoked while scanning IN of items.
-
 
5444
 
-
 
5445
    Parameters:
-
 
5446
     - itemId
-
 
5447
     - quantity
-
 
5448
     - fulfilmentWarehouseId
-
 
5449
     - billingWarehouseId
-
 
5450
    """
-
 
5451
    self.send_acceptOrderForItem(itemId, quantity, fulfilmentWarehouseId, billingWarehouseId)
-
 
5452
    self.recv_acceptOrderForItem()
-
 
5453
 
-
 
5454
  def send_acceptOrderForItem(self, itemId, quantity, fulfilmentWarehouseId, billingWarehouseId):
-
 
5455
    self._oprot.writeMessageBegin('acceptOrderForItem', TMessageType.CALL, self._seqid)
-
 
5456
    args = acceptOrderForItem_args()
-
 
5457
    args.itemId = itemId
-
 
5458
    args.quantity = quantity
-
 
5459
    args.fulfilmentWarehouseId = fulfilmentWarehouseId
-
 
5460
    args.billingWarehouseId = billingWarehouseId
-
 
5461
    args.write(self._oprot)
-
 
5462
    self._oprot.writeMessageEnd()
-
 
5463
    self._oprot.trans.flush()
-
 
5464
 
-
 
5465
  def recv_acceptOrderForItem(self, ):
-
 
5466
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
-
 
5467
    if mtype == TMessageType.EXCEPTION:
-
 
5468
      x = TApplicationException()
-
 
5469
      x.read(self._iprot)
-
 
5470
      self._iprot.readMessageEnd()
-
 
5471
      raise x
-
 
5472
    result = acceptOrderForItem_result()
-
 
5473
    result.read(self._iprot)
-
 
5474
    self._iprot.readMessageEnd()
-
 
5475
    return
-
 
5476
 
5427
 
5477
 
5428
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
5478
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
5429
  def __init__(self, handler):
5479
  def __init__(self, handler):
5430
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
5480
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
5431
    self._processMap["createTransaction"] = Processor.process_createTransaction
5481
    self._processMap["createTransaction"] = Processor.process_createTransaction
Line 5546... Line 5596...
5546
    self._processMap["getAllVerificationAgents"] = Processor.process_getAllVerificationAgents
5596
    self._processMap["getAllVerificationAgents"] = Processor.process_getAllVerificationAgents
5547
    self._processMap["getAllAttributesForOrderId"] = Processor.process_getAllAttributesForOrderId
5597
    self._processMap["getAllAttributesForOrderId"] = Processor.process_getAllAttributesForOrderId
5548
    self._processMap["setOrderAttributeForTransaction"] = Processor.process_setOrderAttributeForTransaction
5598
    self._processMap["setOrderAttributeForTransaction"] = Processor.process_setOrderAttributeForTransaction
5549
    self._processMap["getReceivePendingOrders"] = Processor.process_getReceivePendingOrders
5599
    self._processMap["getReceivePendingOrders"] = Processor.process_getReceivePendingOrders
5550
    self._processMap["getReceivedAtStoreOrders"] = Processor.process_getReceivedAtStoreOrders
5600
    self._processMap["getReceivedAtStoreOrders"] = Processor.process_getReceivedAtStoreOrders
-
 
5601
    self._processMap["acceptOrderForItem"] = Processor.process_acceptOrderForItem
5551
 
5602
 
5552
  def process(self, iprot, oprot):
5603
  def process(self, iprot, oprot):
5553
    (name, type, seqid) = iprot.readMessageBegin()
5604
    (name, type, seqid) = iprot.readMessageBegin()
5554
    if name not in self._processMap:
5605
    if name not in self._processMap:
5555
      iprot.skip(TType.STRUCT)
5606
      iprot.skip(TType.STRUCT)
Line 7152... Line 7203...
7152
    oprot.writeMessageBegin("getReceivedAtStoreOrders", TMessageType.REPLY, seqid)
7203
    oprot.writeMessageBegin("getReceivedAtStoreOrders", TMessageType.REPLY, seqid)
7153
    result.write(oprot)
7204
    result.write(oprot)
7154
    oprot.writeMessageEnd()
7205
    oprot.writeMessageEnd()
7155
    oprot.trans.flush()
7206
    oprot.trans.flush()
7156
 
7207
 
-
 
7208
  def process_acceptOrderForItem(self, seqid, iprot, oprot):
-
 
7209
    args = acceptOrderForItem_args()
-
 
7210
    args.read(iprot)
-
 
7211
    iprot.readMessageEnd()
-
 
7212
    result = acceptOrderForItem_result()
-
 
7213
    self._handler.acceptOrderForItem(args.itemId, args.quantity, args.fulfilmentWarehouseId, args.billingWarehouseId)
-
 
7214
    oprot.writeMessageBegin("acceptOrderForItem", TMessageType.REPLY, seqid)
-
 
7215
    result.write(oprot)
-
 
7216
    oprot.writeMessageEnd()
-
 
7217
    oprot.trans.flush()
-
 
7218
 
7157
 
7219
 
7158
# HELPER FUNCTIONS AND STRUCTURES
7220
# HELPER FUNCTIONS AND STRUCTURES
7159
 
7221
 
7160
class createTransaction_args:
7222
class createTransaction_args:
7161
  """
7223
  """
Line 24216... Line 24278...
24216
    oprot.writeFieldStop()
24278
    oprot.writeFieldStop()
24217
    oprot.writeStructEnd()
24279
    oprot.writeStructEnd()
24218
 
24280
 
24219
  def validate(self):
24281
  def validate(self):
24220
    return
24282
    return
-
 
24283
 
-
 
24284
 
-
 
24285
  def __repr__(self):
-
 
24286
    L = ['%s=%r' % (key, value)
-
 
24287
      for key, value in self.__dict__.iteritems()]
-
 
24288
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
24289
 
-
 
24290
  def __eq__(self, other):
-
 
24291
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
24292
 
-
 
24293
  def __ne__(self, other):
-
 
24294
    return not (self == other)
-
 
24295
 
-
 
24296
class acceptOrderForItem_args:
-
 
24297
  """
-
 
24298
  Attributes:
-
 
24299
   - itemId
-
 
24300
   - quantity
-
 
24301
   - fulfilmentWarehouseId
-
 
24302
   - billingWarehouseId
-
 
24303
  """
-
 
24304
 
-
 
24305
  thrift_spec = (
-
 
24306
    None, # 0
-
 
24307
    (1, TType.I64, 'itemId', None, None, ), # 1
-
 
24308
    (2, TType.I64, 'quantity', None, None, ), # 2
-
 
24309
    (3, TType.I64, 'fulfilmentWarehouseId', None, None, ), # 3
-
 
24310
    (4, TType.I64, 'billingWarehouseId', None, None, ), # 4
-
 
24311
  )
-
 
24312
 
-
 
24313
  def __init__(self, itemId=None, quantity=None, fulfilmentWarehouseId=None, billingWarehouseId=None,):
-
 
24314
    self.itemId = itemId
-
 
24315
    self.quantity = quantity
-
 
24316
    self.fulfilmentWarehouseId = fulfilmentWarehouseId
-
 
24317
    self.billingWarehouseId = billingWarehouseId
-
 
24318
 
-
 
24319
  def read(self, iprot):
-
 
24320
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
24321
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
24322
      return
-
 
24323
    iprot.readStructBegin()
-
 
24324
    while True:
-
 
24325
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
24326
      if ftype == TType.STOP:
-
 
24327
        break
-
 
24328
      if fid == 1:
-
 
24329
        if ftype == TType.I64:
-
 
24330
          self.itemId = iprot.readI64();
-
 
24331
        else:
-
 
24332
          iprot.skip(ftype)
-
 
24333
      elif fid == 2:
-
 
24334
        if ftype == TType.I64:
-
 
24335
          self.quantity = iprot.readI64();
-
 
24336
        else:
-
 
24337
          iprot.skip(ftype)
-
 
24338
      elif fid == 3:
-
 
24339
        if ftype == TType.I64:
-
 
24340
          self.fulfilmentWarehouseId = iprot.readI64();
-
 
24341
        else:
-
 
24342
          iprot.skip(ftype)
-
 
24343
      elif fid == 4:
-
 
24344
        if ftype == TType.I64:
-
 
24345
          self.billingWarehouseId = iprot.readI64();
-
 
24346
        else:
-
 
24347
          iprot.skip(ftype)
-
 
24348
      else:
-
 
24349
        iprot.skip(ftype)
-
 
24350
      iprot.readFieldEnd()
-
 
24351
    iprot.readStructEnd()
-
 
24352
 
-
 
24353
  def write(self, oprot):
-
 
24354
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
24355
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
24356
      return
-
 
24357
    oprot.writeStructBegin('acceptOrderForItem_args')
-
 
24358
    if self.itemId is not None:
-
 
24359
      oprot.writeFieldBegin('itemId', TType.I64, 1)
-
 
24360
      oprot.writeI64(self.itemId)
-
 
24361
      oprot.writeFieldEnd()
-
 
24362
    if self.quantity is not None:
-
 
24363
      oprot.writeFieldBegin('quantity', TType.I64, 2)
-
 
24364
      oprot.writeI64(self.quantity)
-
 
24365
      oprot.writeFieldEnd()
-
 
24366
    if self.fulfilmentWarehouseId is not None:
-
 
24367
      oprot.writeFieldBegin('fulfilmentWarehouseId', TType.I64, 3)
-
 
24368
      oprot.writeI64(self.fulfilmentWarehouseId)
-
 
24369
      oprot.writeFieldEnd()
-
 
24370
    if self.billingWarehouseId is not None:
-
 
24371
      oprot.writeFieldBegin('billingWarehouseId', TType.I64, 4)
-
 
24372
      oprot.writeI64(self.billingWarehouseId)
-
 
24373
      oprot.writeFieldEnd()
-
 
24374
    oprot.writeFieldStop()
-
 
24375
    oprot.writeStructEnd()
-
 
24376
 
-
 
24377
  def validate(self):
-
 
24378
    return
-
 
24379
 
-
 
24380
 
-
 
24381
  def __repr__(self):
-
 
24382
    L = ['%s=%r' % (key, value)
-
 
24383
      for key, value in self.__dict__.iteritems()]
-
 
24384
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
24385
 
-
 
24386
  def __eq__(self, other):
-
 
24387
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
24388
 
-
 
24389
  def __ne__(self, other):
-
 
24390
    return not (self == other)
-
 
24391
 
-
 
24392
class acceptOrderForItem_result:
-
 
24393
 
-
 
24394
  thrift_spec = (
-
 
24395
  )
-
 
24396
 
-
 
24397
  def read(self, iprot):
-
 
24398
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
24399
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
24400
      return
-
 
24401
    iprot.readStructBegin()
-
 
24402
    while True:
-
 
24403
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
24404
      if ftype == TType.STOP:
-
 
24405
        break
-
 
24406
      else:
-
 
24407
        iprot.skip(ftype)
-
 
24408
      iprot.readFieldEnd()
-
 
24409
    iprot.readStructEnd()
-
 
24410
 
-
 
24411
  def write(self, oprot):
-
 
24412
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
24413
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
24414
      return
-
 
24415
    oprot.writeStructBegin('acceptOrderForItem_result')
-
 
24416
    oprot.writeFieldStop()
-
 
24417
    oprot.writeStructEnd()
-
 
24418
 
-
 
24419
  def validate(self):
-
 
24420
    return
24221
 
24421
 
24222
 
24422
 
24223
  def __repr__(self):
24423
  def __repr__(self):
24224
    L = ['%s=%r' % (key, value)
24424
    L = ['%s=%r' % (key, value)
24225
      for key, value in self.__dict__.iteritems()]
24425
      for key, value in self.__dict__.iteritems()]