Subversion Repositories SmartDukaan

Rev

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

Rev 4541 Rev 4555
Line 118... Line 118...
118
     - quantity
118
     - quantity
119
     - warehouseId
119
     - warehouseId
120
    """
120
    """
121
    pass
121
    pass
122
 
122
 
123
  def scanSerializedItemForOrder(self, inventoryItemId, type, orderId, warehouseId):
123
  def scanSerializedItemForOrder(self, serialNumber, type, orderId, warehouseId):
124
    """
124
    """
125
    Scan serialized items linked with an order. Returns its price.
125
    Scan serialized items linked with an order. Returns its price.
126
 
126
 
127
    Parameters:
127
    Parameters:
128
     - inventoryItemId
128
     - serialNumber
129
     - type
129
     - type
130
     - orderId
130
     - orderId
131
     - warehouseId
131
     - warehouseId
132
    """
132
    """
133
    pass
133
    pass
Line 512... Line 512...
512
    self._iprot.readMessageEnd()
512
    self._iprot.readMessageEnd()
513
    if result.wex is not None:
513
    if result.wex is not None:
514
      raise result.wex
514
      raise result.wex
515
    return
515
    return
516
 
516
 
517
  def scanSerializedItemForOrder(self, inventoryItemId, type, orderId, warehouseId):
517
  def scanSerializedItemForOrder(self, serialNumber, type, orderId, warehouseId):
518
    """
518
    """
519
    Scan serialized items linked with an order. Returns its price.
519
    Scan serialized items linked with an order. Returns its price.
520
 
520
 
521
    Parameters:
521
    Parameters:
522
     - inventoryItemId
522
     - serialNumber
523
     - type
523
     - type
524
     - orderId
524
     - orderId
525
     - warehouseId
525
     - warehouseId
526
    """
526
    """
527
    self.send_scanSerializedItemForOrder(inventoryItemId, type, orderId, warehouseId)
527
    self.send_scanSerializedItemForOrder(serialNumber, type, orderId, warehouseId)
528
    return self.recv_scanSerializedItemForOrder()
528
    return self.recv_scanSerializedItemForOrder()
529
 
529
 
530
  def send_scanSerializedItemForOrder(self, inventoryItemId, type, orderId, warehouseId):
530
  def send_scanSerializedItemForOrder(self, serialNumber, type, orderId, warehouseId):
531
    self._oprot.writeMessageBegin('scanSerializedItemForOrder', TMessageType.CALL, self._seqid)
531
    self._oprot.writeMessageBegin('scanSerializedItemForOrder', TMessageType.CALL, self._seqid)
532
    args = scanSerializedItemForOrder_args()
532
    args = scanSerializedItemForOrder_args()
533
    args.inventoryItemId = inventoryItemId
533
    args.serialNumber = serialNumber
534
    args.type = type
534
    args.type = type
535
    args.orderId = orderId
535
    args.orderId = orderId
536
    args.warehouseId = warehouseId
536
    args.warehouseId = warehouseId
537
    args.write(self._oprot)
537
    args.write(self._oprot)
538
    self._oprot.writeMessageEnd()
538
    self._oprot.writeMessageEnd()
Line 791... Line 791...
791
    args = scanSerializedItemForOrder_args()
791
    args = scanSerializedItemForOrder_args()
792
    args.read(iprot)
792
    args.read(iprot)
793
    iprot.readMessageEnd()
793
    iprot.readMessageEnd()
794
    result = scanSerializedItemForOrder_result()
794
    result = scanSerializedItemForOrder_result()
795
    try:
795
    try:
796
      result.success = self._handler.scanSerializedItemForOrder(args.inventoryItemId, args.type, args.orderId, args.warehouseId)
796
      result.success = self._handler.scanSerializedItemForOrder(args.serialNumber, args.type, args.orderId, args.warehouseId)
797
    except WarehouseServiceException, wex:
797
    except WarehouseServiceException, wex:
798
      result.wex = wex
798
      result.wex = wex
799
    oprot.writeMessageBegin("scanSerializedItemForOrder", TMessageType.REPLY, seqid)
799
    oprot.writeMessageBegin("scanSerializedItemForOrder", TMessageType.REPLY, seqid)
800
    result.write(oprot)
800
    result.write(oprot)
801
    oprot.writeMessageEnd()
801
    oprot.writeMessageEnd()
Line 919... Line 919...
919
   - success
919
   - success
920
   - wex
920
   - wex
921
  """
921
  """
922
 
922
 
923
  thrift_spec = (
923
  thrift_spec = (
924
    (0, TType.I64, 'success', None, None, ), # 0
924
    (0, TType.STRUCT, 'success', (InventoryItem, InventoryItem.thrift_spec), None, ), # 0
925
    (1, TType.STRUCT, 'wex', (WarehouseServiceException, WarehouseServiceException.thrift_spec), None, ), # 1
925
    (1, TType.STRUCT, 'wex', (WarehouseServiceException, WarehouseServiceException.thrift_spec), None, ), # 1
926
  )
926
  )
927
 
927
 
928
  def __init__(self, success=None, wex=None,):
928
  def __init__(self, success=None, wex=None,):
929
    self.success = success
929
    self.success = success
Line 937... Line 937...
937
    while True:
937
    while True:
938
      (fname, ftype, fid) = iprot.readFieldBegin()
938
      (fname, ftype, fid) = iprot.readFieldBegin()
939
      if ftype == TType.STOP:
939
      if ftype == TType.STOP:
940
        break
940
        break
941
      if fid == 0:
941
      if fid == 0:
942
        if ftype == TType.I64:
942
        if ftype == TType.STRUCT:
943
          self.success = iprot.readI64();
943
          self.success = InventoryItem()
-
 
944
          self.success.read(iprot)
944
        else:
945
        else:
945
          iprot.skip(ftype)
946
          iprot.skip(ftype)
946
      elif fid == 1:
947
      elif fid == 1:
947
        if ftype == TType.STRUCT:
948
        if ftype == TType.STRUCT:
948
          self.wex = WarehouseServiceException()
949
          self.wex = WarehouseServiceException()
Line 958... Line 959...
958
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
959
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
959
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
960
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
960
      return
961
      return
961
    oprot.writeStructBegin('createSerializedInventoryItem_result')
962
    oprot.writeStructBegin('createSerializedInventoryItem_result')
962
    if self.success is not None:
963
    if self.success is not None:
963
      oprot.writeFieldBegin('success', TType.I64, 0)
964
      oprot.writeFieldBegin('success', TType.STRUCT, 0)
964
      oprot.writeI64(self.success)
965
      self.success.write(oprot)
965
      oprot.writeFieldEnd()
966
      oprot.writeFieldEnd()
966
    if self.wex is not None:
967
    if self.wex is not None:
967
      oprot.writeFieldBegin('wex', TType.STRUCT, 1)
968
      oprot.writeFieldBegin('wex', TType.STRUCT, 1)
968
      self.wex.write(oprot)
969
      self.wex.write(oprot)
969
      oprot.writeFieldEnd()
970
      oprot.writeFieldEnd()
Line 1075... Line 1076...
1075
   - success
1076
   - success
1076
   - wex
1077
   - wex
1077
  """
1078
  """
1078
 
1079
 
1079
  thrift_spec = (
1080
  thrift_spec = (
1080
    (0, TType.I64, 'success', None, None, ), # 0
1081
    (0, TType.STRUCT, 'success', (InventoryItem, InventoryItem.thrift_spec), None, ), # 0
1081
    (1, TType.STRUCT, 'wex', (WarehouseServiceException, WarehouseServiceException.thrift_spec), None, ), # 1
1082
    (1, TType.STRUCT, 'wex', (WarehouseServiceException, WarehouseServiceException.thrift_spec), None, ), # 1
1082
  )
1083
  )
1083
 
1084
 
1084
  def __init__(self, success=None, wex=None,):
1085
  def __init__(self, success=None, wex=None,):
1085
    self.success = success
1086
    self.success = success
Line 1093... Line 1094...
1093
    while True:
1094
    while True:
1094
      (fname, ftype, fid) = iprot.readFieldBegin()
1095
      (fname, ftype, fid) = iprot.readFieldBegin()
1095
      if ftype == TType.STOP:
1096
      if ftype == TType.STOP:
1096
        break
1097
        break
1097
      if fid == 0:
1098
      if fid == 0:
1098
        if ftype == TType.I64:
1099
        if ftype == TType.STRUCT:
1099
          self.success = iprot.readI64();
1100
          self.success = InventoryItem()
-
 
1101
          self.success.read(iprot)
1100
        else:
1102
        else:
1101
          iprot.skip(ftype)
1103
          iprot.skip(ftype)
1102
      elif fid == 1:
1104
      elif fid == 1:
1103
        if ftype == TType.STRUCT:
1105
        if ftype == TType.STRUCT:
1104
          self.wex = WarehouseServiceException()
1106
          self.wex = WarehouseServiceException()
Line 1114... Line 1116...
1114
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1116
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1115
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1117
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1116
      return
1118
      return
1117
    oprot.writeStructBegin('createSerializedInventoryItemFromItemNumber_result')
1119
    oprot.writeStructBegin('createSerializedInventoryItemFromItemNumber_result')
1118
    if self.success is not None:
1120
    if self.success is not None:
1119
      oprot.writeFieldBegin('success', TType.I64, 0)
1121
      oprot.writeFieldBegin('success', TType.STRUCT, 0)
1120
      oprot.writeI64(self.success)
1122
      self.success.write(oprot)
1121
      oprot.writeFieldEnd()
1123
      oprot.writeFieldEnd()
1122
    if self.wex is not None:
1124
    if self.wex is not None:
1123
      oprot.writeFieldBegin('wex', TType.STRUCT, 1)
1125
      oprot.writeFieldBegin('wex', TType.STRUCT, 1)
1124
      self.wex.write(oprot)
1126
      self.wex.write(oprot)
1125
      oprot.writeFieldEnd()
1127
      oprot.writeFieldEnd()
Line 1231... Line 1233...
1231
   - success
1233
   - success
1232
   - wex
1234
   - wex
1233
  """
1235
  """
1234
 
1236
 
1235
  thrift_spec = (
1237
  thrift_spec = (
1236
    (0, TType.I64, 'success', None, None, ), # 0
1238
    (0, TType.STRUCT, 'success', (InventoryItem, InventoryItem.thrift_spec), None, ), # 0
1237
    (1, TType.STRUCT, 'wex', (WarehouseServiceException, WarehouseServiceException.thrift_spec), None, ), # 1
1239
    (1, TType.STRUCT, 'wex', (WarehouseServiceException, WarehouseServiceException.thrift_spec), None, ), # 1
1238
  )
1240
  )
1239
 
1241
 
1240
  def __init__(self, success=None, wex=None,):
1242
  def __init__(self, success=None, wex=None,):
1241
    self.success = success
1243
    self.success = success
Line 1249... Line 1251...
1249
    while True:
1251
    while True:
1250
      (fname, ftype, fid) = iprot.readFieldBegin()
1252
      (fname, ftype, fid) = iprot.readFieldBegin()
1251
      if ftype == TType.STOP:
1253
      if ftype == TType.STOP:
1252
        break
1254
        break
1253
      if fid == 0:
1255
      if fid == 0:
1254
        if ftype == TType.I64:
1256
        if ftype == TType.STRUCT:
1255
          self.success = iprot.readI64();
1257
          self.success = InventoryItem()
-
 
1258
          self.success.read(iprot)
1256
        else:
1259
        else:
1257
          iprot.skip(ftype)
1260
          iprot.skip(ftype)
1258
      elif fid == 1:
1261
      elif fid == 1:
1259
        if ftype == TType.STRUCT:
1262
        if ftype == TType.STRUCT:
1260
          self.wex = WarehouseServiceException()
1263
          self.wex = WarehouseServiceException()
Line 1270... Line 1273...
1270
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1273
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1271
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1274
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1272
      return
1275
      return
1273
    oprot.writeStructBegin('createInventoryItem_result')
1276
    oprot.writeStructBegin('createInventoryItem_result')
1274
    if self.success is not None:
1277
    if self.success is not None:
1275
      oprot.writeFieldBegin('success', TType.I64, 0)
1278
      oprot.writeFieldBegin('success', TType.STRUCT, 0)
1276
      oprot.writeI64(self.success)
1279
      self.success.write(oprot)
1277
      oprot.writeFieldEnd()
1280
      oprot.writeFieldEnd()
1278
    if self.wex is not None:
1281
    if self.wex is not None:
1279
      oprot.writeFieldBegin('wex', TType.STRUCT, 1)
1282
      oprot.writeFieldBegin('wex', TType.STRUCT, 1)
1280
      self.wex.write(oprot)
1283
      self.wex.write(oprot)
1281
      oprot.writeFieldEnd()
1284
      oprot.writeFieldEnd()
Line 2269... Line 2272...
2269
    return not (self == other)
2272
    return not (self == other)
2270
 
2273
 
2271
class scanSerializedItemForOrder_args:
2274
class scanSerializedItemForOrder_args:
2272
  """
2275
  """
2273
  Attributes:
2276
  Attributes:
2274
   - inventoryItemId
2277
   - serialNumber
2275
   - type
2278
   - type
2276
   - orderId
2279
   - orderId
2277
   - warehouseId
2280
   - warehouseId
2278
  """
2281
  """
2279
 
2282
 
2280
  thrift_spec = (
2283
  thrift_spec = (
2281
    None, # 0
2284
    None, # 0
2282
    (1, TType.I64, 'inventoryItemId', None, None, ), # 1
2285
    (1, TType.STRING, 'serialNumber', None, None, ), # 1
2283
    (2, TType.I32, 'type', None, None, ), # 2
2286
    (2, TType.I32, 'type', None, None, ), # 2
2284
    (3, TType.I64, 'orderId', None, None, ), # 3
2287
    (3, TType.I64, 'orderId', None, None, ), # 3
2285
    (4, TType.I64, 'warehouseId', None, None, ), # 4
2288
    (4, TType.I64, 'warehouseId', None, None, ), # 4
2286
  )
2289
  )
2287
 
2290
 
2288
  def __init__(self, inventoryItemId=None, type=None, orderId=None, warehouseId=None,):
2291
  def __init__(self, serialNumber=None, type=None, orderId=None, warehouseId=None,):
2289
    self.inventoryItemId = inventoryItemId
2292
    self.serialNumber = serialNumber
2290
    self.type = type
2293
    self.type = type
2291
    self.orderId = orderId
2294
    self.orderId = orderId
2292
    self.warehouseId = warehouseId
2295
    self.warehouseId = warehouseId
2293
 
2296
 
2294
  def read(self, iprot):
2297
  def read(self, iprot):
Line 2299... Line 2302...
2299
    while True:
2302
    while True:
2300
      (fname, ftype, fid) = iprot.readFieldBegin()
2303
      (fname, ftype, fid) = iprot.readFieldBegin()
2301
      if ftype == TType.STOP:
2304
      if ftype == TType.STOP:
2302
        break
2305
        break
2303
      if fid == 1:
2306
      if fid == 1:
2304
        if ftype == TType.I64:
2307
        if ftype == TType.STRING:
2305
          self.inventoryItemId = iprot.readI64();
2308
          self.serialNumber = iprot.readString();
2306
        else:
2309
        else:
2307
          iprot.skip(ftype)
2310
          iprot.skip(ftype)
2308
      elif fid == 2:
2311
      elif fid == 2:
2309
        if ftype == TType.I32:
2312
        if ftype == TType.I32:
2310
          self.type = iprot.readI32();
2313
          self.type = iprot.readI32();
Line 2328... Line 2331...
2328
  def write(self, oprot):
2331
  def write(self, oprot):
2329
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
2332
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
2330
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
2333
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
2331
      return
2334
      return
2332
    oprot.writeStructBegin('scanSerializedItemForOrder_args')
2335
    oprot.writeStructBegin('scanSerializedItemForOrder_args')
2333
    if self.inventoryItemId is not None:
2336
    if self.serialNumber is not None:
2334
      oprot.writeFieldBegin('inventoryItemId', TType.I64, 1)
2337
      oprot.writeFieldBegin('serialNumber', TType.STRING, 1)
2335
      oprot.writeI64(self.inventoryItemId)
2338
      oprot.writeString(self.serialNumber)
2336
      oprot.writeFieldEnd()
2339
      oprot.writeFieldEnd()
2337
    if self.type is not None:
2340
    if self.type is not None:
2338
      oprot.writeFieldBegin('type', TType.I32, 2)
2341
      oprot.writeFieldBegin('type', TType.I32, 2)
2339
      oprot.writeI32(self.type)
2342
      oprot.writeI32(self.type)
2340
      oprot.writeFieldEnd()
2343
      oprot.writeFieldEnd()
Line 2370... Line 2373...
2370
   - success
2373
   - success
2371
   - wex
2374
   - wex
2372
  """
2375
  """
2373
 
2376
 
2374
  thrift_spec = (
2377
  thrift_spec = (
2375
    (0, TType.I64, 'success', None, None, ), # 0
2378
    (0, TType.STRUCT, 'success', (InventoryItem, InventoryItem.thrift_spec), None, ), # 0
2376
    (1, TType.STRUCT, 'wex', (WarehouseServiceException, WarehouseServiceException.thrift_spec), None, ), # 1
2379
    (1, TType.STRUCT, 'wex', (WarehouseServiceException, WarehouseServiceException.thrift_spec), None, ), # 1
2377
  )
2380
  )
2378
 
2381
 
2379
  def __init__(self, success=None, wex=None,):
2382
  def __init__(self, success=None, wex=None,):
2380
    self.success = success
2383
    self.success = success
Line 2388... Line 2391...
2388
    while True:
2391
    while True:
2389
      (fname, ftype, fid) = iprot.readFieldBegin()
2392
      (fname, ftype, fid) = iprot.readFieldBegin()
2390
      if ftype == TType.STOP:
2393
      if ftype == TType.STOP:
2391
        break
2394
        break
2392
      if fid == 0:
2395
      if fid == 0:
2393
        if ftype == TType.I64:
2396
        if ftype == TType.STRUCT:
2394
          self.success = iprot.readI64();
2397
          self.success = InventoryItem()
-
 
2398
          self.success.read(iprot)
2395
        else:
2399
        else:
2396
          iprot.skip(ftype)
2400
          iprot.skip(ftype)
2397
      elif fid == 1:
2401
      elif fid == 1:
2398
        if ftype == TType.STRUCT:
2402
        if ftype == TType.STRUCT:
2399
          self.wex = WarehouseServiceException()
2403
          self.wex = WarehouseServiceException()
Line 2409... Line 2413...
2409
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
2413
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
2410
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
2414
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
2411
      return
2415
      return
2412
    oprot.writeStructBegin('scanSerializedItemForOrder_result')
2416
    oprot.writeStructBegin('scanSerializedItemForOrder_result')
2413
    if self.success is not None:
2417
    if self.success is not None:
2414
      oprot.writeFieldBegin('success', TType.I64, 0)
2418
      oprot.writeFieldBegin('success', TType.STRUCT, 0)
2415
      oprot.writeI64(self.success)
2419
      self.success.write(oprot)
2416
      oprot.writeFieldEnd()
2420
      oprot.writeFieldEnd()
2417
    if self.wex is not None:
2421
    if self.wex is not None:
2418
      oprot.writeFieldBegin('wex', TType.STRUCT, 1)
2422
      oprot.writeFieldBegin('wex', TType.STRUCT, 1)
2419
      self.wex.write(oprot)
2423
      self.wex.write(oprot)
2420
      oprot.writeFieldEnd()
2424
      oprot.writeFieldEnd()