Subversion Repositories SmartDukaan

Rev

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

Rev 3376 Rev 3383
Line 34... Line 34...
34
    Parameters:
34
    Parameters:
35
     - id
35
     - id
36
    """
36
    """
37
    pass
37
    pass
38
 
38
 
-
 
39
  def getAllPurchaseOrders(self, status):
-
 
40
    """
-
 
41
    Returns a list of all the purchase orders in the given state
-
 
42
    
-
 
43
    Parameters:
-
 
44
     - status
-
 
45
    """
-
 
46
    pass
-
 
47
 
39
  def getSupplier(self, id):
48
  def getSupplier(self, id):
40
    """
49
    """
41
    Returns the supplier with the given order id. Throws an exception if there is no such supplier.
50
    Returns the supplier with the given order id. Throws an exception if there is no such supplier.
42
    
51
    
43
    Parameters:
52
    Parameters:
Line 65... Line 74...
65
    Parameters:
74
    Parameters:
66
     - purchaseId
75
     - purchaseId
67
    """
76
    """
68
    pass
77
    pass
69
 
78
 
-
 
79
  def getAllPurchases(self, purchaseOrderId, open):
-
 
80
    """
-
 
81
    Returns all open or closed purchases for the given purchase order. Throws an exception if no such purchase order exists
-
 
82
    
-
 
83
    Parameters:
-
 
84
     - purchaseOrderId
-
 
85
     - open
-
 
86
    """
-
 
87
    pass
-
 
88
 
70
  def scanIn(self, purchaseId, itemId, itemNumber, imeiNumber, type):
89
  def scanIn(self, purchaseId, itemNumber, imeiNumber, type):
71
    """
90
    """
72
    Creates a StockLedger and a Scan object using the given details.
91
    Creates a Scan object using the given details.
73
    Raises an exception if no more of the given item can be scanned in against the purchase order of the given purchase.
92
    Raises an exception if no more of the given item can be scanned in against the purchase order of the given purchase.
74
    
93
    
75
    Parameters:
94
    Parameters:
76
     - purchaseId
95
     - purchaseId
77
     - itemId
-
 
78
     - itemNumber
96
     - itemNumber
79
     - imeiNumber
97
     - imeiNumber
80
     - type
98
     - type
81
    """
99
    """
82
    pass
100
    pass
83
 
101
 
84
  def scanOut(self, itemNumber, imeiNumber, type):
102
  def scanOut(self, itemNumber, imeiNumber, type):
85
    """
103
    """
86
    Marks the StockLedger object with the given details as scanned out. In case, the imeiNumber is not given,
104
    Marks the Scan object with the given details as scanned out. In case, the imeiNumber is not given,
87
    marks the oldest ItemInventory object as being scanned out.
105
    marks the oldest ItemInventory object as being scanned out.
88
    Creats a Scan object for this action.
-
 
89
    Raises an exception if:
106
    Raises an exception if:
90
    1. There is no stock present corresponding to the given item details.
107
    1. There is no stock present corresponding to the given item details.
91
    2. An older stock is present corresponding to the itemNumber which has not been scanned out.
108
    2. An older stock is present corresponding to the itemNumber which has not been scanned out.
92
    
109
    
93
    Parameters:
110
    Parameters:
Line 169... Line 186...
169
      return result.success
186
      return result.success
170
    if result.wex != None:
187
    if result.wex != None:
171
      raise result.wex
188
      raise result.wex
172
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getPurchaseOrder failed: unknown result");
189
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getPurchaseOrder failed: unknown result");
173
 
190
 
-
 
191
  def getAllPurchaseOrders(self, status):
-
 
192
    """
-
 
193
    Returns a list of all the purchase orders in the given state
-
 
194
    
-
 
195
    Parameters:
-
 
196
     - status
-
 
197
    """
-
 
198
    self.send_getAllPurchaseOrders(status)
-
 
199
    return self.recv_getAllPurchaseOrders()
-
 
200
 
-
 
201
  def send_getAllPurchaseOrders(self, status):
-
 
202
    self._oprot.writeMessageBegin('getAllPurchaseOrders', TMessageType.CALL, self._seqid)
-
 
203
    args = getAllPurchaseOrders_args()
-
 
204
    args.status = status
-
 
205
    args.write(self._oprot)
-
 
206
    self._oprot.writeMessageEnd()
-
 
207
    self._oprot.trans.flush()
-
 
208
 
-
 
209
  def recv_getAllPurchaseOrders(self, ):
-
 
210
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
-
 
211
    if mtype == TMessageType.EXCEPTION:
-
 
212
      x = TApplicationException()
-
 
213
      x.read(self._iprot)
-
 
214
      self._iprot.readMessageEnd()
-
 
215
      raise x
-
 
216
    result = getAllPurchaseOrders_result()
-
 
217
    result.read(self._iprot)
-
 
218
    self._iprot.readMessageEnd()
-
 
219
    if result.success != None:
-
 
220
      return result.success
-
 
221
    if result.wex != None:
-
 
222
      raise result.wex
-
 
223
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getAllPurchaseOrders failed: unknown result");
-
 
224
 
174
  def getSupplier(self, id):
225
  def getSupplier(self, id):
175
    """
226
    """
176
    Returns the supplier with the given order id. Throws an exception if there is no such supplier.
227
    Returns the supplier with the given order id. Throws an exception if there is no such supplier.
177
    
228
    
178
    Parameters:
229
    Parameters:
Line 277... Line 328...
277
      return result.success
328
      return result.success
278
    if result.wex != None:
329
    if result.wex != None:
279
      raise result.wex
330
      raise result.wex
280
    raise TApplicationException(TApplicationException.MISSING_RESULT, "closePurchase failed: unknown result");
331
    raise TApplicationException(TApplicationException.MISSING_RESULT, "closePurchase failed: unknown result");
281
 
332
 
-
 
333
  def getAllPurchases(self, purchaseOrderId, open):
-
 
334
    """
-
 
335
    Returns all open or closed purchases for the given purchase order. Throws an exception if no such purchase order exists
-
 
336
    
-
 
337
    Parameters:
-
 
338
     - purchaseOrderId
-
 
339
     - open
-
 
340
    """
-
 
341
    self.send_getAllPurchases(purchaseOrderId, open)
-
 
342
    return self.recv_getAllPurchases()
-
 
343
 
-
 
344
  def send_getAllPurchases(self, purchaseOrderId, open):
-
 
345
    self._oprot.writeMessageBegin('getAllPurchases', TMessageType.CALL, self._seqid)
-
 
346
    args = getAllPurchases_args()
-
 
347
    args.purchaseOrderId = purchaseOrderId
-
 
348
    args.open = open
-
 
349
    args.write(self._oprot)
-
 
350
    self._oprot.writeMessageEnd()
-
 
351
    self._oprot.trans.flush()
-
 
352
 
-
 
353
  def recv_getAllPurchases(self, ):
-
 
354
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
-
 
355
    if mtype == TMessageType.EXCEPTION:
-
 
356
      x = TApplicationException()
-
 
357
      x.read(self._iprot)
-
 
358
      self._iprot.readMessageEnd()
-
 
359
      raise x
-
 
360
    result = getAllPurchases_result()
-
 
361
    result.read(self._iprot)
-
 
362
    self._iprot.readMessageEnd()
-
 
363
    if result.success != None:
-
 
364
      return result.success
-
 
365
    if result.wex != None:
-
 
366
      raise result.wex
-
 
367
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getAllPurchases failed: unknown result");
-
 
368
 
282
  def scanIn(self, purchaseId, itemId, itemNumber, imeiNumber, type):
369
  def scanIn(self, purchaseId, itemNumber, imeiNumber, type):
283
    """
370
    """
284
    Creates a StockLedger and a Scan object using the given details.
371
    Creates a Scan object using the given details.
285
    Raises an exception if no more of the given item can be scanned in against the purchase order of the given purchase.
372
    Raises an exception if no more of the given item can be scanned in against the purchase order of the given purchase.
286
    
373
    
287
    Parameters:
374
    Parameters:
288
     - purchaseId
375
     - purchaseId
289
     - itemId
-
 
290
     - itemNumber
376
     - itemNumber
291
     - imeiNumber
377
     - imeiNumber
292
     - type
378
     - type
293
    """
379
    """
294
    self.send_scanIn(purchaseId, itemId, itemNumber, imeiNumber, type)
380
    self.send_scanIn(purchaseId, itemNumber, imeiNumber, type)
295
    self.recv_scanIn()
381
    self.recv_scanIn()
296
 
382
 
297
  def send_scanIn(self, purchaseId, itemId, itemNumber, imeiNumber, type):
383
  def send_scanIn(self, purchaseId, itemNumber, imeiNumber, type):
298
    self._oprot.writeMessageBegin('scanIn', TMessageType.CALL, self._seqid)
384
    self._oprot.writeMessageBegin('scanIn', TMessageType.CALL, self._seqid)
299
    args = scanIn_args()
385
    args = scanIn_args()
300
    args.purchaseId = purchaseId
386
    args.purchaseId = purchaseId
301
    args.itemId = itemId
-
 
302
    args.itemNumber = itemNumber
387
    args.itemNumber = itemNumber
303
    args.imeiNumber = imeiNumber
388
    args.imeiNumber = imeiNumber
304
    args.type = type
389
    args.type = type
305
    args.write(self._oprot)
390
    args.write(self._oprot)
306
    self._oprot.writeMessageEnd()
391
    self._oprot.writeMessageEnd()
Line 320... Line 405...
320
      raise result.wex
405
      raise result.wex
321
    return
406
    return
322
 
407
 
323
  def scanOut(self, itemNumber, imeiNumber, type):
408
  def scanOut(self, itemNumber, imeiNumber, type):
324
    """
409
    """
325
    Marks the StockLedger object with the given details as scanned out. In case, the imeiNumber is not given,
410
    Marks the Scan object with the given details as scanned out. In case, the imeiNumber is not given,
326
    marks the oldest ItemInventory object as being scanned out.
411
    marks the oldest ItemInventory object as being scanned out.
327
    Creats a Scan object for this action.
-
 
328
    Raises an exception if:
412
    Raises an exception if:
329
    1. There is no stock present corresponding to the given item details.
413
    1. There is no stock present corresponding to the given item details.
330
    2. An older stock is present corresponding to the itemNumber which has not been scanned out.
414
    2. An older stock is present corresponding to the itemNumber which has not been scanned out.
331
    
415
    
332
    Parameters:
416
    Parameters:
Line 365... Line 449...
365
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
449
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
366
  def __init__(self, handler):
450
  def __init__(self, handler):
367
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
451
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
368
    self._processMap["createPurchaseOrder"] = Processor.process_createPurchaseOrder
452
    self._processMap["createPurchaseOrder"] = Processor.process_createPurchaseOrder
369
    self._processMap["getPurchaseOrder"] = Processor.process_getPurchaseOrder
453
    self._processMap["getPurchaseOrder"] = Processor.process_getPurchaseOrder
-
 
454
    self._processMap["getAllPurchaseOrders"] = Processor.process_getAllPurchaseOrders
370
    self._processMap["getSupplier"] = Processor.process_getSupplier
455
    self._processMap["getSupplier"] = Processor.process_getSupplier
371
    self._processMap["startPurchase"] = Processor.process_startPurchase
456
    self._processMap["startPurchase"] = Processor.process_startPurchase
372
    self._processMap["closePurchase"] = Processor.process_closePurchase
457
    self._processMap["closePurchase"] = Processor.process_closePurchase
-
 
458
    self._processMap["getAllPurchases"] = Processor.process_getAllPurchases
373
    self._processMap["scanIn"] = Processor.process_scanIn
459
    self._processMap["scanIn"] = Processor.process_scanIn
374
    self._processMap["scanOut"] = Processor.process_scanOut
460
    self._processMap["scanOut"] = Processor.process_scanOut
375
 
461
 
376
  def process(self, iprot, oprot):
462
  def process(self, iprot, oprot):
377
    (name, type, seqid) = iprot.readMessageBegin()
463
    (name, type, seqid) = iprot.readMessageBegin()
Line 414... Line 500...
414
    oprot.writeMessageBegin("getPurchaseOrder", TMessageType.REPLY, seqid)
500
    oprot.writeMessageBegin("getPurchaseOrder", TMessageType.REPLY, seqid)
415
    result.write(oprot)
501
    result.write(oprot)
416
    oprot.writeMessageEnd()
502
    oprot.writeMessageEnd()
417
    oprot.trans.flush()
503
    oprot.trans.flush()
418
 
504
 
-
 
505
  def process_getAllPurchaseOrders(self, seqid, iprot, oprot):
-
 
506
    args = getAllPurchaseOrders_args()
-
 
507
    args.read(iprot)
-
 
508
    iprot.readMessageEnd()
-
 
509
    result = getAllPurchaseOrders_result()
-
 
510
    try:
-
 
511
      result.success = self._handler.getAllPurchaseOrders(args.status)
-
 
512
    except WarehouseServiceException, wex:
-
 
513
      result.wex = wex
-
 
514
    oprot.writeMessageBegin("getAllPurchaseOrders", TMessageType.REPLY, seqid)
-
 
515
    result.write(oprot)
-
 
516
    oprot.writeMessageEnd()
-
 
517
    oprot.trans.flush()
-
 
518
 
419
  def process_getSupplier(self, seqid, iprot, oprot):
519
  def process_getSupplier(self, seqid, iprot, oprot):
420
    args = getSupplier_args()
520
    args = getSupplier_args()
421
    args.read(iprot)
521
    args.read(iprot)
422
    iprot.readMessageEnd()
522
    iprot.readMessageEnd()
423
    result = getSupplier_result()
523
    result = getSupplier_result()
Line 456... Line 556...
456
    oprot.writeMessageBegin("closePurchase", TMessageType.REPLY, seqid)
556
    oprot.writeMessageBegin("closePurchase", TMessageType.REPLY, seqid)
457
    result.write(oprot)
557
    result.write(oprot)
458
    oprot.writeMessageEnd()
558
    oprot.writeMessageEnd()
459
    oprot.trans.flush()
559
    oprot.trans.flush()
460
 
560
 
-
 
561
  def process_getAllPurchases(self, seqid, iprot, oprot):
-
 
562
    args = getAllPurchases_args()
-
 
563
    args.read(iprot)
-
 
564
    iprot.readMessageEnd()
-
 
565
    result = getAllPurchases_result()
-
 
566
    try:
-
 
567
      result.success = self._handler.getAllPurchases(args.purchaseOrderId, args.open)
-
 
568
    except WarehouseServiceException, wex:
-
 
569
      result.wex = wex
-
 
570
    oprot.writeMessageBegin("getAllPurchases", TMessageType.REPLY, seqid)
-
 
571
    result.write(oprot)
-
 
572
    oprot.writeMessageEnd()
-
 
573
    oprot.trans.flush()
-
 
574
 
461
  def process_scanIn(self, seqid, iprot, oprot):
575
  def process_scanIn(self, seqid, iprot, oprot):
462
    args = scanIn_args()
576
    args = scanIn_args()
463
    args.read(iprot)
577
    args.read(iprot)
464
    iprot.readMessageEnd()
578
    iprot.readMessageEnd()
465
    result = scanIn_result()
579
    result = scanIn_result()
466
    try:
580
    try:
467
      self._handler.scanIn(args.purchaseId, args.itemId, args.itemNumber, args.imeiNumber, args.type)
581
      self._handler.scanIn(args.purchaseId, args.itemNumber, args.imeiNumber, args.type)
468
    except WarehouseServiceException, wex:
582
    except WarehouseServiceException, wex:
469
      result.wex = wex
583
      result.wex = wex
470
    oprot.writeMessageBegin("scanIn", TMessageType.REPLY, seqid)
584
    oprot.writeMessageBegin("scanIn", TMessageType.REPLY, seqid)
471
    result.write(oprot)
585
    result.write(oprot)
472
    oprot.writeMessageEnd()
586
    oprot.writeMessageEnd()
Line 737... Line 851...
737
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
851
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
738
 
852
 
739
  def __ne__(self, other):
853
  def __ne__(self, other):
740
    return not (self == other)
854
    return not (self == other)
741
 
855
 
-
 
856
class getAllPurchaseOrders_args:
-
 
857
  """
-
 
858
  Attributes:
-
 
859
   - status
-
 
860
  """
-
 
861
 
-
 
862
  thrift_spec = (
-
 
863
    None, # 0
-
 
864
    (1, TType.I32, 'status', None, None, ), # 1
-
 
865
  )
-
 
866
 
-
 
867
  def __init__(self, status=None,):
-
 
868
    self.status = status
-
 
869
 
-
 
870
  def read(self, iprot):
-
 
871
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
872
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
873
      return
-
 
874
    iprot.readStructBegin()
-
 
875
    while True:
-
 
876
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
877
      if ftype == TType.STOP:
-
 
878
        break
-
 
879
      if fid == 1:
-
 
880
        if ftype == TType.I32:
-
 
881
          self.status = iprot.readI32();
-
 
882
        else:
-
 
883
          iprot.skip(ftype)
-
 
884
      else:
-
 
885
        iprot.skip(ftype)
-
 
886
      iprot.readFieldEnd()
-
 
887
    iprot.readStructEnd()
-
 
888
 
-
 
889
  def write(self, oprot):
-
 
890
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
891
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
892
      return
-
 
893
    oprot.writeStructBegin('getAllPurchaseOrders_args')
-
 
894
    if self.status != None:
-
 
895
      oprot.writeFieldBegin('status', TType.I32, 1)
-
 
896
      oprot.writeI32(self.status)
-
 
897
      oprot.writeFieldEnd()
-
 
898
    oprot.writeFieldStop()
-
 
899
    oprot.writeStructEnd()
-
 
900
 
-
 
901
  def __repr__(self):
-
 
902
    L = ['%s=%r' % (key, value)
-
 
903
      for key, value in self.__dict__.iteritems()]
-
 
904
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
905
 
-
 
906
  def __eq__(self, other):
-
 
907
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
908
 
-
 
909
  def __ne__(self, other):
-
 
910
    return not (self == other)
-
 
911
 
-
 
912
class getAllPurchaseOrders_result:
-
 
913
  """
-
 
914
  Attributes:
-
 
915
   - success
-
 
916
   - wex
-
 
917
  """
-
 
918
 
-
 
919
  thrift_spec = (
-
 
920
    (0, TType.LIST, 'success', (TType.STRUCT,(PurchaseOrder, PurchaseOrder.thrift_spec)), None, ), # 0
-
 
921
    (1, TType.STRUCT, 'wex', (WarehouseServiceException, WarehouseServiceException.thrift_spec), None, ), # 1
-
 
922
  )
-
 
923
 
-
 
924
  def __init__(self, success=None, wex=None,):
-
 
925
    self.success = success
-
 
926
    self.wex = wex
-
 
927
 
-
 
928
  def read(self, iprot):
-
 
929
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
930
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
931
      return
-
 
932
    iprot.readStructBegin()
-
 
933
    while True:
-
 
934
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
935
      if ftype == TType.STOP:
-
 
936
        break
-
 
937
      if fid == 0:
-
 
938
        if ftype == TType.LIST:
-
 
939
          self.success = []
-
 
940
          (_etype10, _size7) = iprot.readListBegin()
-
 
941
          for _i11 in xrange(_size7):
-
 
942
            _elem12 = PurchaseOrder()
-
 
943
            _elem12.read(iprot)
-
 
944
            self.success.append(_elem12)
-
 
945
          iprot.readListEnd()
-
 
946
        else:
-
 
947
          iprot.skip(ftype)
-
 
948
      elif fid == 1:
-
 
949
        if ftype == TType.STRUCT:
-
 
950
          self.wex = WarehouseServiceException()
-
 
951
          self.wex.read(iprot)
-
 
952
        else:
-
 
953
          iprot.skip(ftype)
-
 
954
      else:
-
 
955
        iprot.skip(ftype)
-
 
956
      iprot.readFieldEnd()
-
 
957
    iprot.readStructEnd()
-
 
958
 
-
 
959
  def write(self, oprot):
-
 
960
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
961
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
962
      return
-
 
963
    oprot.writeStructBegin('getAllPurchaseOrders_result')
-
 
964
    if self.success != None:
-
 
965
      oprot.writeFieldBegin('success', TType.LIST, 0)
-
 
966
      oprot.writeListBegin(TType.STRUCT, len(self.success))
-
 
967
      for iter13 in self.success:
-
 
968
        iter13.write(oprot)
-
 
969
      oprot.writeListEnd()
-
 
970
      oprot.writeFieldEnd()
-
 
971
    if self.wex != None:
-
 
972
      oprot.writeFieldBegin('wex', TType.STRUCT, 1)
-
 
973
      self.wex.write(oprot)
-
 
974
      oprot.writeFieldEnd()
-
 
975
    oprot.writeFieldStop()
-
 
976
    oprot.writeStructEnd()
-
 
977
 
-
 
978
  def __repr__(self):
-
 
979
    L = ['%s=%r' % (key, value)
-
 
980
      for key, value in self.__dict__.iteritems()]
-
 
981
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
982
 
-
 
983
  def __eq__(self, other):
-
 
984
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
985
 
-
 
986
  def __ne__(self, other):
-
 
987
    return not (self == other)
-
 
988
 
742
class getSupplier_args:
989
class getSupplier_args:
743
  """
990
  """
744
  Attributes:
991
  Attributes:
745
   - id
992
   - id
746
  """
993
  """
Line 1134... Line 1381...
1134
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1381
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1135
 
1382
 
1136
  def __ne__(self, other):
1383
  def __ne__(self, other):
1137
    return not (self == other)
1384
    return not (self == other)
1138
 
1385
 
-
 
1386
class getAllPurchases_args:
-
 
1387
  """
-
 
1388
  Attributes:
-
 
1389
   - purchaseOrderId
-
 
1390
   - open
-
 
1391
  """
-
 
1392
 
-
 
1393
  thrift_spec = (
-
 
1394
    None, # 0
-
 
1395
    (1, TType.I64, 'purchaseOrderId', None, None, ), # 1
-
 
1396
    (2, TType.BOOL, 'open', None, None, ), # 2
-
 
1397
  )
-
 
1398
 
-
 
1399
  def __init__(self, purchaseOrderId=None, open=None,):
-
 
1400
    self.purchaseOrderId = purchaseOrderId
-
 
1401
    self.open = open
-
 
1402
 
-
 
1403
  def read(self, iprot):
-
 
1404
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
1405
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
1406
      return
-
 
1407
    iprot.readStructBegin()
-
 
1408
    while True:
-
 
1409
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
1410
      if ftype == TType.STOP:
-
 
1411
        break
-
 
1412
      if fid == 1:
-
 
1413
        if ftype == TType.I64:
-
 
1414
          self.purchaseOrderId = iprot.readI64();
-
 
1415
        else:
-
 
1416
          iprot.skip(ftype)
-
 
1417
      elif fid == 2:
-
 
1418
        if ftype == TType.BOOL:
-
 
1419
          self.open = iprot.readBool();
-
 
1420
        else:
-
 
1421
          iprot.skip(ftype)
-
 
1422
      else:
-
 
1423
        iprot.skip(ftype)
-
 
1424
      iprot.readFieldEnd()
-
 
1425
    iprot.readStructEnd()
-
 
1426
 
-
 
1427
  def write(self, oprot):
-
 
1428
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
1429
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
1430
      return
-
 
1431
    oprot.writeStructBegin('getAllPurchases_args')
-
 
1432
    if self.purchaseOrderId != None:
-
 
1433
      oprot.writeFieldBegin('purchaseOrderId', TType.I64, 1)
-
 
1434
      oprot.writeI64(self.purchaseOrderId)
-
 
1435
      oprot.writeFieldEnd()
-
 
1436
    if self.open != None:
-
 
1437
      oprot.writeFieldBegin('open', TType.BOOL, 2)
-
 
1438
      oprot.writeBool(self.open)
-
 
1439
      oprot.writeFieldEnd()
-
 
1440
    oprot.writeFieldStop()
-
 
1441
    oprot.writeStructEnd()
-
 
1442
 
-
 
1443
  def __repr__(self):
-
 
1444
    L = ['%s=%r' % (key, value)
-
 
1445
      for key, value in self.__dict__.iteritems()]
-
 
1446
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
1447
 
-
 
1448
  def __eq__(self, other):
-
 
1449
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
1450
 
-
 
1451
  def __ne__(self, other):
-
 
1452
    return not (self == other)
-
 
1453
 
-
 
1454
class getAllPurchases_result:
-
 
1455
  """
-
 
1456
  Attributes:
-
 
1457
   - success
-
 
1458
   - wex
-
 
1459
  """
-
 
1460
 
-
 
1461
  thrift_spec = (
-
 
1462
    (0, TType.LIST, 'success', (TType.STRUCT,(Purchase, Purchase.thrift_spec)), None, ), # 0
-
 
1463
    (1, TType.STRUCT, 'wex', (WarehouseServiceException, WarehouseServiceException.thrift_spec), None, ), # 1
-
 
1464
  )
-
 
1465
 
-
 
1466
  def __init__(self, success=None, wex=None,):
-
 
1467
    self.success = success
-
 
1468
    self.wex = wex
-
 
1469
 
-
 
1470
  def read(self, iprot):
-
 
1471
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
1472
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
1473
      return
-
 
1474
    iprot.readStructBegin()
-
 
1475
    while True:
-
 
1476
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
1477
      if ftype == TType.STOP:
-
 
1478
        break
-
 
1479
      if fid == 0:
-
 
1480
        if ftype == TType.LIST:
-
 
1481
          self.success = []
-
 
1482
          (_etype17, _size14) = iprot.readListBegin()
-
 
1483
          for _i18 in xrange(_size14):
-
 
1484
            _elem19 = Purchase()
-
 
1485
            _elem19.read(iprot)
-
 
1486
            self.success.append(_elem19)
-
 
1487
          iprot.readListEnd()
-
 
1488
        else:
-
 
1489
          iprot.skip(ftype)
-
 
1490
      elif fid == 1:
-
 
1491
        if ftype == TType.STRUCT:
-
 
1492
          self.wex = WarehouseServiceException()
-
 
1493
          self.wex.read(iprot)
-
 
1494
        else:
-
 
1495
          iprot.skip(ftype)
-
 
1496
      else:
-
 
1497
        iprot.skip(ftype)
-
 
1498
      iprot.readFieldEnd()
-
 
1499
    iprot.readStructEnd()
-
 
1500
 
-
 
1501
  def write(self, oprot):
-
 
1502
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
1503
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
1504
      return
-
 
1505
    oprot.writeStructBegin('getAllPurchases_result')
-
 
1506
    if self.success != None:
-
 
1507
      oprot.writeFieldBegin('success', TType.LIST, 0)
-
 
1508
      oprot.writeListBegin(TType.STRUCT, len(self.success))
-
 
1509
      for iter20 in self.success:
-
 
1510
        iter20.write(oprot)
-
 
1511
      oprot.writeListEnd()
-
 
1512
      oprot.writeFieldEnd()
-
 
1513
    if self.wex != None:
-
 
1514
      oprot.writeFieldBegin('wex', TType.STRUCT, 1)
-
 
1515
      self.wex.write(oprot)
-
 
1516
      oprot.writeFieldEnd()
-
 
1517
    oprot.writeFieldStop()
-
 
1518
    oprot.writeStructEnd()
-
 
1519
 
-
 
1520
  def __repr__(self):
-
 
1521
    L = ['%s=%r' % (key, value)
-
 
1522
      for key, value in self.__dict__.iteritems()]
-
 
1523
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
1524
 
-
 
1525
  def __eq__(self, other):
-
 
1526
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
1527
 
-
 
1528
  def __ne__(self, other):
-
 
1529
    return not (self == other)
-
 
1530
 
1139
class scanIn_args:
1531
class scanIn_args:
1140
  """
1532
  """
1141
  Attributes:
1533
  Attributes:
1142
   - purchaseId
1534
   - purchaseId
1143
   - itemId
-
 
1144
   - itemNumber
1535
   - itemNumber
1145
   - imeiNumber
1536
   - imeiNumber
1146
   - type
1537
   - type
1147
  """
1538
  """
1148
 
1539
 
1149
  thrift_spec = (
1540
  thrift_spec = (
1150
    None, # 0
1541
    None, # 0
1151
    (1, TType.I64, 'purchaseId', None, None, ), # 1
1542
    (1, TType.I64, 'purchaseId', None, None, ), # 1
1152
    (2, TType.I64, 'itemId', None, None, ), # 2
-
 
1153
    (3, TType.STRING, 'itemNumber', None, None, ), # 3
1543
    (2, TType.STRING, 'itemNumber', None, None, ), # 2
1154
    (4, TType.STRING, 'imeiNumber', None, None, ), # 4
1544
    (3, TType.STRING, 'imeiNumber', None, None, ), # 3
1155
    (5, TType.I32, 'type', None, None, ), # 5
1545
    (4, TType.I32, 'type', None, None, ), # 4
1156
  )
1546
  )
1157
 
1547
 
1158
  def __init__(self, purchaseId=None, itemId=None, itemNumber=None, imeiNumber=None, type=None,):
1548
  def __init__(self, purchaseId=None, itemNumber=None, imeiNumber=None, type=None,):
1159
    self.purchaseId = purchaseId
1549
    self.purchaseId = purchaseId
1160
    self.itemId = itemId
-
 
1161
    self.itemNumber = itemNumber
1550
    self.itemNumber = itemNumber
1162
    self.imeiNumber = imeiNumber
1551
    self.imeiNumber = imeiNumber
1163
    self.type = type
1552
    self.type = type
1164
 
1553
 
1165
  def read(self, iprot):
1554
  def read(self, iprot):
Line 1175... Line 1564...
1175
        if ftype == TType.I64:
1564
        if ftype == TType.I64:
1176
          self.purchaseId = iprot.readI64();
1565
          self.purchaseId = iprot.readI64();
1177
        else:
1566
        else:
1178
          iprot.skip(ftype)
1567
          iprot.skip(ftype)
1179
      elif fid == 2:
1568
      elif fid == 2:
1180
        if ftype == TType.I64:
-
 
1181
          self.itemId = iprot.readI64();
-
 
1182
        else:
-
 
1183
          iprot.skip(ftype)
-
 
1184
      elif fid == 3:
-
 
1185
        if ftype == TType.STRING:
1569
        if ftype == TType.STRING:
1186
          self.itemNumber = iprot.readString();
1570
          self.itemNumber = iprot.readString();
1187
        else:
1571
        else:
1188
          iprot.skip(ftype)
1572
          iprot.skip(ftype)
1189
      elif fid == 4:
1573
      elif fid == 3:
1190
        if ftype == TType.STRING:
1574
        if ftype == TType.STRING:
1191
          self.imeiNumber = iprot.readString();
1575
          self.imeiNumber = iprot.readString();
1192
        else:
1576
        else:
1193
          iprot.skip(ftype)
1577
          iprot.skip(ftype)
1194
      elif fid == 5:
1578
      elif fid == 4:
1195
        if ftype == TType.I32:
1579
        if ftype == TType.I32:
1196
          self.type = iprot.readI32();
1580
          self.type = iprot.readI32();
1197
        else:
1581
        else:
1198
          iprot.skip(ftype)
1582
          iprot.skip(ftype)
1199
      else:
1583
      else:
Line 1208... Line 1592...
1208
    oprot.writeStructBegin('scanIn_args')
1592
    oprot.writeStructBegin('scanIn_args')
1209
    if self.purchaseId != None:
1593
    if self.purchaseId != None:
1210
      oprot.writeFieldBegin('purchaseId', TType.I64, 1)
1594
      oprot.writeFieldBegin('purchaseId', TType.I64, 1)
1211
      oprot.writeI64(self.purchaseId)
1595
      oprot.writeI64(self.purchaseId)
1212
      oprot.writeFieldEnd()
1596
      oprot.writeFieldEnd()
1213
    if self.itemId != None:
-
 
1214
      oprot.writeFieldBegin('itemId', TType.I64, 2)
-
 
1215
      oprot.writeI64(self.itemId)
-
 
1216
      oprot.writeFieldEnd()
-
 
1217
    if self.itemNumber != None:
1597
    if self.itemNumber != None:
1218
      oprot.writeFieldBegin('itemNumber', TType.STRING, 3)
1598
      oprot.writeFieldBegin('itemNumber', TType.STRING, 2)
1219
      oprot.writeString(self.itemNumber)
1599
      oprot.writeString(self.itemNumber)
1220
      oprot.writeFieldEnd()
1600
      oprot.writeFieldEnd()
1221
    if self.imeiNumber != None:
1601
    if self.imeiNumber != None:
1222
      oprot.writeFieldBegin('imeiNumber', TType.STRING, 4)
1602
      oprot.writeFieldBegin('imeiNumber', TType.STRING, 3)
1223
      oprot.writeString(self.imeiNumber)
1603
      oprot.writeString(self.imeiNumber)
1224
      oprot.writeFieldEnd()
1604
      oprot.writeFieldEnd()
1225
    if self.type != None:
1605
    if self.type != None:
1226
      oprot.writeFieldBegin('type', TType.I32, 5)
1606
      oprot.writeFieldBegin('type', TType.I32, 4)
1227
      oprot.writeI32(self.type)
1607
      oprot.writeI32(self.type)
1228
      oprot.writeFieldEnd()
1608
      oprot.writeFieldEnd()
1229
    oprot.writeFieldStop()
1609
    oprot.writeFieldStop()
1230
    oprot.writeStructEnd()
1610
    oprot.writeStructEnd()
1231
 
1611