Subversion Repositories SmartDukaan

Rev

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

Rev 3431 Rev 4501
Line 15... Line 15...
15
except:
15
except:
16
  fastbinary = None
16
  fastbinary = None
17
 
17
 
18
 
18
 
19
class Iface(shop2020.thriftpy.generic.GenericService.Iface):
19
class Iface(shop2020.thriftpy.generic.GenericService.Iface):
20
  def createPurchaseOrder(self, purchaseOrder):
20
  def createSerializedInventoryItem(self, itemId, serialNumber, purchaseId):
21
    """
21
    """
22
    Creates a purchase order based on the data in the given purchase order object.
-
 
23
    This method populates a nummber of missing fields
22
    Creating inventory for a serialized item
24
 
23
 
25
    Parameters:
24
    Parameters:
-
 
25
     - itemId
-
 
26
     - serialNumber
26
     - purchaseOrder
27
     - purchaseId
27
    """
28
    """
28
    pass
29
    pass
29
 
30
 
30
  def getPurchaseOrder(self, id):
31
  def createSerializedInventoryItemFromItemNumber(self, itemNumber, serialNumber, purchaseId):
31
    """
32
    """
32
    Returns the purchase order with the given id. Throws an exception if there is no such purchase order.
33
    Creating inventory for a serialized item using item number
33
 
34
 
34
    Parameters:
35
    Parameters:
-
 
36
     - itemNumber
-
 
37
     - serialNumber
35
     - id
38
     - purchaseId
36
    """
39
    """
37
    pass
40
    pass
38
 
41
 
39
  def getAllPurchaseOrders(self, status):
42
  def createInventoryItem(self, itemId, quantity, purchaseId):
40
    """
43
    """
41
    Returns a list of all the purchase orders in the given state
44
    Creates inventory for an unserailized item
42
 
45
 
43
    Parameters:
46
    Parameters:
44
     - status
47
     - itemId
-
 
48
     - quantity
-
 
49
     - purchaseId
45
    """
50
    """
46
    pass
51
    pass
47
 
52
 
48
  def getSupplier(self, id):
53
  def getInventoryItem(self, serialNumber):
49
    """
54
    """
50
    Returns the supplier with the given order id. Throws an exception if there is no such supplier.
55
    Retrieves serialized inventory item given a serial number
51
 
56
 
52
    Parameters:
57
    Parameters:
53
     - id
58
     - serialNumber
54
    """
59
    """
55
    pass
60
    pass
56
 
61
 
57
  def startPurchase(self, purchaseOrderId, invoiceNumber, freightCharges):
62
  def getNonSeralizedInventoryItems(self, itemId, quantity, supplierId):
58
    """
63
    """
59
    Creates a purchase for the given purchase order.
64
    Retrieves non-serialized inventory items from a given supplier
60
    Throws an exception if no more purchases are allowed against the given purchase order.
-
 
61
 
65
 
62
    Parameters:
66
    Parameters:
63
     - purchaseOrderId
67
     - itemId
64
     - invoiceNumber
68
     - quantity
65
     - freightCharges
69
     - supplierId
66
    """
70
    """
67
    pass
71
    pass
68
 
72
 
69
  def closePurchase(self, purchaseId):
73
  def getInventoryItems(self, itemId):
70
    """
74
    """
71
    Marks a purchase as complete and updates the receivedOn time.
-
 
72
    Throws an exception if no such purchase exists.
75
    Retrieves inventory items for a given item
73
 
76
 
74
    Parameters:
77
    Parameters:
75
     - purchaseId
78
     - itemId
76
    """
79
    """
77
    pass
80
    pass
78
 
81
 
79
  def getAllPurchases(self, purchaseOrderId, open):
82
  def getScanForOrder(self, orderId):
80
    """
83
    """
81
    Returns all open or closed purchases for the given purchase order. Throws an exception if no such purchase order exists
84
    Retrieves scans for a given order
82
 
85
 
83
    Parameters:
86
    Parameters:
84
     - purchaseOrderId
-
 
85
     - open
87
     - orderId
86
    """
88
    """
87
    pass
89
    pass
88
 
90
 
89
  def scanIn(self, purchaseId, itemNumber, imeiNumber, type):
91
  def getScan(self, inventoryItemId):
90
    """
92
    """
91
    Creates a Scan object using the given details.
93
    Retrieves scans for a given inventory item
92
    Raises an exception if no more of the given item can be scanned in against the purchase order of the given purchase.
-
 
93
 
94
 
94
    Parameters:
95
    Parameters:
95
     - purchaseId
96
     - inventoryItemId
-
 
97
    """
-
 
98
    pass
-
 
99
 
-
 
100
  def scanSerializedItem(self, inventoryItemId, type, warehouseId):
-
 
101
    """
-
 
102
    Scan serialized items.
-
 
103
 
96
     - itemNumber
104
    Parameters:
97
     - imeiNumber
105
     - inventoryItemId
98
     - type
106
     - type
-
 
107
     - warehouseId
99
    """
108
    """
100
    pass
109
    pass
101
 
110
 
102
  def scanOut(self, itemNumber, imeiNumber, type):
111
  def scan(self, inventoryItemId, type, quantity, warehouseId):
103
    """
112
    """
104
    Marks the Scan object with the given details as scanned out. In case, the imeiNumber is not given,
-
 
105
    marks the oldest ItemInventory object as being scanned out.
-
 
106
    Raises an exception if:
113
    Scan non-serialized items.
107
    1. There is no stock present corresponding to the given item details.
-
 
108
    2. An older stock is present corresponding to the itemNumber which has not been scanned out.
-
 
109
 
114
 
110
    Parameters:
115
    Parameters:
-
 
116
     - inventoryItemId
-
 
117
     - type
-
 
118
     - quantity
111
     - itemNumber
119
     - warehouseId
-
 
120
    """
-
 
121
    pass
-
 
122
 
-
 
123
  def scanSerializedItemForOrder(self, inventoryItemId, type, orderId, warehouseId):
-
 
124
    """
-
 
125
    Scan serialized items linked with an order. Returns its price.
-
 
126
 
-
 
127
    Parameters:
-
 
128
     - inventoryItemId
-
 
129
     - type
-
 
130
     - orderId
112
     - imeiNumber
131
     - warehouseId
-
 
132
    """
-
 
133
    pass
-
 
134
 
-
 
135
  def scanForOrder(self, inventoryItemId, type, quantity, orderId, warehouseId):
-
 
136
    """
-
 
137
    Scan non-serialized items linked with an order.
-
 
138
 
-
 
139
    Parameters:
-
 
140
     - inventoryItemId
113
     - type
141
     - type
-
 
142
     - quantity
-
 
143
     - orderId
-
 
144
     - warehouseId
-
 
145
    """
-
 
146
    pass
-
 
147
 
-
 
148
  def createItemNumberMapping(self, itemNumber, itemId):
-
 
149
    """
-
 
150
    Created item number to item id mapping
-
 
151
 
-
 
152
    Parameters:
-
 
153
     - itemNumber
-
 
154
     - itemId
114
    """
155
    """
115
    pass
156
    pass
116
 
157
 
117
 
158
 
118
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
159
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
119
  def __init__(self, iprot, oprot=None):
160
  def __init__(self, iprot, oprot=None):
120
    shop2020.thriftpy.generic.GenericService.Client.__init__(self, iprot, oprot)
161
    shop2020.thriftpy.generic.GenericService.Client.__init__(self, iprot, oprot)
121
 
162
 
122
  def createPurchaseOrder(self, purchaseOrder):
163
  def createSerializedInventoryItem(self, itemId, serialNumber, purchaseId):
123
    """
164
    """
124
    Creates a purchase order based on the data in the given purchase order object.
-
 
125
    This method populates a nummber of missing fields
165
    Creating inventory for a serialized item
126
 
166
 
127
    Parameters:
167
    Parameters:
-
 
168
     - itemId
-
 
169
     - serialNumber
128
     - purchaseOrder
170
     - purchaseId
129
    """
171
    """
130
    self.send_createPurchaseOrder(purchaseOrder)
172
    self.send_createSerializedInventoryItem(itemId, serialNumber, purchaseId)
131
    return self.recv_createPurchaseOrder()
173
    return self.recv_createSerializedInventoryItem()
132
 
174
 
133
  def send_createPurchaseOrder(self, purchaseOrder):
175
  def send_createSerializedInventoryItem(self, itemId, serialNumber, purchaseId):
134
    self._oprot.writeMessageBegin('createPurchaseOrder', TMessageType.CALL, self._seqid)
176
    self._oprot.writeMessageBegin('createSerializedInventoryItem', TMessageType.CALL, self._seqid)
135
    args = createPurchaseOrder_args()
177
    args = createSerializedInventoryItem_args()
-
 
178
    args.itemId = itemId
-
 
179
    args.serialNumber = serialNumber
136
    args.purchaseOrder = purchaseOrder
180
    args.purchaseId = purchaseId
137
    args.write(self._oprot)
181
    args.write(self._oprot)
138
    self._oprot.writeMessageEnd()
182
    self._oprot.writeMessageEnd()
139
    self._oprot.trans.flush()
183
    self._oprot.trans.flush()
140
 
184
 
141
  def recv_createPurchaseOrder(self, ):
185
  def recv_createSerializedInventoryItem(self, ):
142
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
186
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
143
    if mtype == TMessageType.EXCEPTION:
187
    if mtype == TMessageType.EXCEPTION:
144
      x = TApplicationException()
188
      x = TApplicationException()
145
      x.read(self._iprot)
189
      x.read(self._iprot)
146
      self._iprot.readMessageEnd()
190
      self._iprot.readMessageEnd()
147
      raise x
191
      raise x
148
    result = createPurchaseOrder_result()
192
    result = createSerializedInventoryItem_result()
149
    result.read(self._iprot)
193
    result.read(self._iprot)
150
    self._iprot.readMessageEnd()
194
    self._iprot.readMessageEnd()
151
    if result.success is not None:
195
    if result.success is not None:
152
      return result.success
196
      return result.success
153
    if result.wex is not None:
197
    if result.wex is not None:
154
      raise result.wex
198
      raise result.wex
155
    raise TApplicationException(TApplicationException.MISSING_RESULT, "createPurchaseOrder failed: unknown result");
199
    raise TApplicationException(TApplicationException.MISSING_RESULT, "createSerializedInventoryItem failed: unknown result");
156
 
200
 
157
  def getPurchaseOrder(self, id):
201
  def createSerializedInventoryItemFromItemNumber(self, itemNumber, serialNumber, purchaseId):
158
    """
202
    """
159
    Returns the purchase order with the given id. Throws an exception if there is no such purchase order.
203
    Creating inventory for a serialized item using item number
160
 
204
 
161
    Parameters:
205
    Parameters:
-
 
206
     - itemNumber
-
 
207
     - serialNumber
162
     - id
208
     - purchaseId
163
    """
209
    """
164
    self.send_getPurchaseOrder(id)
210
    self.send_createSerializedInventoryItemFromItemNumber(itemNumber, serialNumber, purchaseId)
165
    return self.recv_getPurchaseOrder()
211
    return self.recv_createSerializedInventoryItemFromItemNumber()
166
 
212
 
167
  def send_getPurchaseOrder(self, id):
213
  def send_createSerializedInventoryItemFromItemNumber(self, itemNumber, serialNumber, purchaseId):
168
    self._oprot.writeMessageBegin('getPurchaseOrder', TMessageType.CALL, self._seqid)
214
    self._oprot.writeMessageBegin('createSerializedInventoryItemFromItemNumber', TMessageType.CALL, self._seqid)
-
 
215
    args = createSerializedInventoryItemFromItemNumber_args()
169
    args = getPurchaseOrder_args()
216
    args.itemNumber = itemNumber
-
 
217
    args.serialNumber = serialNumber
170
    args.id = id
218
    args.purchaseId = purchaseId
171
    args.write(self._oprot)
219
    args.write(self._oprot)
172
    self._oprot.writeMessageEnd()
220
    self._oprot.writeMessageEnd()
173
    self._oprot.trans.flush()
221
    self._oprot.trans.flush()
174
 
222
 
175
  def recv_getPurchaseOrder(self, ):
223
  def recv_createSerializedInventoryItemFromItemNumber(self, ):
176
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
224
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
177
    if mtype == TMessageType.EXCEPTION:
225
    if mtype == TMessageType.EXCEPTION:
178
      x = TApplicationException()
226
      x = TApplicationException()
179
      x.read(self._iprot)
227
      x.read(self._iprot)
180
      self._iprot.readMessageEnd()
228
      self._iprot.readMessageEnd()
181
      raise x
229
      raise x
182
    result = getPurchaseOrder_result()
230
    result = createSerializedInventoryItemFromItemNumber_result()
183
    result.read(self._iprot)
231
    result.read(self._iprot)
184
    self._iprot.readMessageEnd()
232
    self._iprot.readMessageEnd()
185
    if result.success is not None:
233
    if result.success is not None:
186
      return result.success
234
      return result.success
187
    if result.wex is not None:
235
    if result.wex is not None:
188
      raise result.wex
236
      raise result.wex
189
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getPurchaseOrder failed: unknown result");
237
    raise TApplicationException(TApplicationException.MISSING_RESULT, "createSerializedInventoryItemFromItemNumber failed: unknown result");
190
 
238
 
191
  def getAllPurchaseOrders(self, status):
239
  def createInventoryItem(self, itemId, quantity, purchaseId):
192
    """
240
    """
193
    Returns a list of all the purchase orders in the given state
241
    Creates inventory for an unserailized item
194
 
242
 
195
    Parameters:
243
    Parameters:
196
     - status
244
     - itemId
-
 
245
     - quantity
-
 
246
     - purchaseId
197
    """
247
    """
198
    self.send_getAllPurchaseOrders(status)
248
    self.send_createInventoryItem(itemId, quantity, purchaseId)
199
    return self.recv_getAllPurchaseOrders()
249
    return self.recv_createInventoryItem()
200
 
250
 
201
  def send_getAllPurchaseOrders(self, status):
251
  def send_createInventoryItem(self, itemId, quantity, purchaseId):
202
    self._oprot.writeMessageBegin('getAllPurchaseOrders', TMessageType.CALL, self._seqid)
252
    self._oprot.writeMessageBegin('createInventoryItem', TMessageType.CALL, self._seqid)
203
    args = getAllPurchaseOrders_args()
253
    args = createInventoryItem_args()
204
    args.status = status
254
    args.itemId = itemId
-
 
255
    args.quantity = quantity
-
 
256
    args.purchaseId = purchaseId
205
    args.write(self._oprot)
257
    args.write(self._oprot)
206
    self._oprot.writeMessageEnd()
258
    self._oprot.writeMessageEnd()
207
    self._oprot.trans.flush()
259
    self._oprot.trans.flush()
208
 
260
 
209
  def recv_getAllPurchaseOrders(self, ):
261
  def recv_createInventoryItem(self, ):
210
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
262
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
211
    if mtype == TMessageType.EXCEPTION:
263
    if mtype == TMessageType.EXCEPTION:
212
      x = TApplicationException()
264
      x = TApplicationException()
213
      x.read(self._iprot)
265
      x.read(self._iprot)
214
      self._iprot.readMessageEnd()
266
      self._iprot.readMessageEnd()
215
      raise x
267
      raise x
216
    result = getAllPurchaseOrders_result()
268
    result = createInventoryItem_result()
217
    result.read(self._iprot)
269
    result.read(self._iprot)
218
    self._iprot.readMessageEnd()
270
    self._iprot.readMessageEnd()
219
    if result.success is not None:
271
    if result.success is not None:
220
      return result.success
272
      return result.success
221
    if result.wex is not None:
273
    if result.wex is not None:
222
      raise result.wex
274
      raise result.wex
223
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getAllPurchaseOrders failed: unknown result");
275
    raise TApplicationException(TApplicationException.MISSING_RESULT, "createInventoryItem failed: unknown result");
224
 
276
 
225
  def getSupplier(self, id):
277
  def getInventoryItem(self, serialNumber):
226
    """
278
    """
227
    Returns the supplier with the given order id. Throws an exception if there is no such supplier.
279
    Retrieves serialized inventory item given a serial number
228
 
280
 
229
    Parameters:
281
    Parameters:
230
     - id
282
     - serialNumber
231
    """
283
    """
232
    self.send_getSupplier(id)
284
    self.send_getInventoryItem(serialNumber)
233
    return self.recv_getSupplier()
285
    return self.recv_getInventoryItem()
234
 
286
 
235
  def send_getSupplier(self, id):
287
  def send_getInventoryItem(self, serialNumber):
236
    self._oprot.writeMessageBegin('getSupplier', TMessageType.CALL, self._seqid)
288
    self._oprot.writeMessageBegin('getInventoryItem', TMessageType.CALL, self._seqid)
237
    args = getSupplier_args()
289
    args = getInventoryItem_args()
238
    args.id = id
290
    args.serialNumber = serialNumber
239
    args.write(self._oprot)
291
    args.write(self._oprot)
240
    self._oprot.writeMessageEnd()
292
    self._oprot.writeMessageEnd()
241
    self._oprot.trans.flush()
293
    self._oprot.trans.flush()
242
 
294
 
243
  def recv_getSupplier(self, ):
295
  def recv_getInventoryItem(self, ):
244
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
296
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
245
    if mtype == TMessageType.EXCEPTION:
297
    if mtype == TMessageType.EXCEPTION:
246
      x = TApplicationException()
298
      x = TApplicationException()
247
      x.read(self._iprot)
299
      x.read(self._iprot)
248
      self._iprot.readMessageEnd()
300
      self._iprot.readMessageEnd()
249
      raise x
301
      raise x
250
    result = getSupplier_result()
302
    result = getInventoryItem_result()
251
    result.read(self._iprot)
303
    result.read(self._iprot)
252
    self._iprot.readMessageEnd()
304
    self._iprot.readMessageEnd()
253
    if result.success is not None:
305
    if result.success is not None:
254
      return result.success
306
      return result.success
255
    if result.wex is not None:
-
 
256
      raise result.wex
-
 
257
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getSupplier failed: unknown result");
307
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getInventoryItem failed: unknown result");
258
 
308
 
259
  def startPurchase(self, purchaseOrderId, invoiceNumber, freightCharges):
309
  def getNonSeralizedInventoryItems(self, itemId, quantity, supplierId):
260
    """
310
    """
261
    Creates a purchase for the given purchase order.
311
    Retrieves non-serialized inventory items from a given supplier
262
    Throws an exception if no more purchases are allowed against the given purchase order.
-
 
263
 
312
 
264
    Parameters:
313
    Parameters:
-
 
314
     - itemId
-
 
315
     - quantity
265
     - purchaseOrderId
316
     - supplierId
-
 
317
    """
-
 
318
    self.send_getNonSeralizedInventoryItems(itemId, quantity, supplierId)
-
 
319
    return self.recv_getNonSeralizedInventoryItems()
-
 
320
 
-
 
321
  def send_getNonSeralizedInventoryItems(self, itemId, quantity, supplierId):
-
 
322
    self._oprot.writeMessageBegin('getNonSeralizedInventoryItems', TMessageType.CALL, self._seqid)
-
 
323
    args = getNonSeralizedInventoryItems_args()
-
 
324
    args.itemId = itemId
-
 
325
    args.quantity = quantity
-
 
326
    args.supplierId = supplierId
-
 
327
    args.write(self._oprot)
-
 
328
    self._oprot.writeMessageEnd()
-
 
329
    self._oprot.trans.flush()
-
 
330
 
-
 
331
  def recv_getNonSeralizedInventoryItems(self, ):
-
 
332
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
-
 
333
    if mtype == TMessageType.EXCEPTION:
-
 
334
      x = TApplicationException()
-
 
335
      x.read(self._iprot)
-
 
336
      self._iprot.readMessageEnd()
266
     - invoiceNumber
337
      raise x
-
 
338
    result = getNonSeralizedInventoryItems_result()
-
 
339
    result.read(self._iprot)
-
 
340
    self._iprot.readMessageEnd()
-
 
341
    if result.success is not None:
-
 
342
      return result.success
-
 
343
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getNonSeralizedInventoryItems failed: unknown result");
-
 
344
 
-
 
345
  def getInventoryItems(self, itemId):
-
 
346
    """
-
 
347
    Retrieves inventory items for a given item
-
 
348
 
-
 
349
    Parameters:
267
     - freightCharges
350
     - itemId
268
    """
351
    """
269
    self.send_startPurchase(purchaseOrderId, invoiceNumber, freightCharges)
352
    self.send_getInventoryItems(itemId)
270
    return self.recv_startPurchase()
353
    return self.recv_getInventoryItems()
271
 
354
 
272
  def send_startPurchase(self, purchaseOrderId, invoiceNumber, freightCharges):
355
  def send_getInventoryItems(self, itemId):
273
    self._oprot.writeMessageBegin('startPurchase', TMessageType.CALL, self._seqid)
356
    self._oprot.writeMessageBegin('getInventoryItems', TMessageType.CALL, self._seqid)
274
    args = startPurchase_args()
357
    args = getInventoryItems_args()
275
    args.purchaseOrderId = purchaseOrderId
-
 
276
    args.invoiceNumber = invoiceNumber
358
    args.itemId = itemId
277
    args.freightCharges = freightCharges
-
 
278
    args.write(self._oprot)
359
    args.write(self._oprot)
279
    self._oprot.writeMessageEnd()
360
    self._oprot.writeMessageEnd()
280
    self._oprot.trans.flush()
361
    self._oprot.trans.flush()
281
 
362
 
282
  def recv_startPurchase(self, ):
363
  def recv_getInventoryItems(self, ):
283
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
364
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
284
    if mtype == TMessageType.EXCEPTION:
365
    if mtype == TMessageType.EXCEPTION:
285
      x = TApplicationException()
366
      x = TApplicationException()
286
      x.read(self._iprot)
367
      x.read(self._iprot)
287
      self._iprot.readMessageEnd()
368
      self._iprot.readMessageEnd()
288
      raise x
369
      raise x
289
    result = startPurchase_result()
370
    result = getInventoryItems_result()
290
    result.read(self._iprot)
371
    result.read(self._iprot)
291
    self._iprot.readMessageEnd()
372
    self._iprot.readMessageEnd()
292
    if result.success is not None:
373
    if result.success is not None:
293
      return result.success
374
      return result.success
294
    if result.wex is not None:
-
 
295
      raise result.wex
-
 
296
    raise TApplicationException(TApplicationException.MISSING_RESULT, "startPurchase failed: unknown result");
375
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getInventoryItems failed: unknown result");
297
 
376
 
298
  def closePurchase(self, purchaseId):
377
  def getScanForOrder(self, orderId):
299
    """
378
    """
300
    Marks a purchase as complete and updates the receivedOn time.
379
    Retrieves scans for a given order
301
    Throws an exception if no such purchase exists.
-
 
302
 
380
 
303
    Parameters:
381
    Parameters:
304
     - purchaseId
382
     - orderId
305
    """
383
    """
306
    self.send_closePurchase(purchaseId)
384
    self.send_getScanForOrder(orderId)
307
    return self.recv_closePurchase()
385
    return self.recv_getScanForOrder()
308
 
386
 
309
  def send_closePurchase(self, purchaseId):
387
  def send_getScanForOrder(self, orderId):
310
    self._oprot.writeMessageBegin('closePurchase', TMessageType.CALL, self._seqid)
388
    self._oprot.writeMessageBegin('getScanForOrder', TMessageType.CALL, self._seqid)
311
    args = closePurchase_args()
389
    args = getScanForOrder_args()
312
    args.purchaseId = purchaseId
390
    args.orderId = orderId
313
    args.write(self._oprot)
391
    args.write(self._oprot)
314
    self._oprot.writeMessageEnd()
392
    self._oprot.writeMessageEnd()
315
    self._oprot.trans.flush()
393
    self._oprot.trans.flush()
316
 
394
 
317
  def recv_closePurchase(self, ):
395
  def recv_getScanForOrder(self, ):
318
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
396
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
319
    if mtype == TMessageType.EXCEPTION:
397
    if mtype == TMessageType.EXCEPTION:
320
      x = TApplicationException()
398
      x = TApplicationException()
321
      x.read(self._iprot)
399
      x.read(self._iprot)
322
      self._iprot.readMessageEnd()
400
      self._iprot.readMessageEnd()
323
      raise x
401
      raise x
324
    result = closePurchase_result()
402
    result = getScanForOrder_result()
325
    result.read(self._iprot)
403
    result.read(self._iprot)
326
    self._iprot.readMessageEnd()
404
    self._iprot.readMessageEnd()
327
    if result.success is not None:
405
    if result.success is not None:
328
      return result.success
406
      return result.success
329
    if result.wex is not None:
-
 
330
      raise result.wex
-
 
331
    raise TApplicationException(TApplicationException.MISSING_RESULT, "closePurchase failed: unknown result");
407
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getScanForOrder failed: unknown result");
332
 
408
 
333
  def getAllPurchases(self, purchaseOrderId, open):
409
  def getScan(self, inventoryItemId):
334
    """
410
    """
335
    Returns all open or closed purchases for the given purchase order. Throws an exception if no such purchase order exists
411
    Retrieves scans for a given inventory item
336
 
412
 
337
    Parameters:
413
    Parameters:
338
     - purchaseOrderId
414
     - inventoryItemId
339
     - open
-
 
340
    """
415
    """
341
    self.send_getAllPurchases(purchaseOrderId, open)
416
    self.send_getScan(inventoryItemId)
342
    return self.recv_getAllPurchases()
417
    return self.recv_getScan()
343
 
418
 
344
  def send_getAllPurchases(self, purchaseOrderId, open):
419
  def send_getScan(self, inventoryItemId):
345
    self._oprot.writeMessageBegin('getAllPurchases', TMessageType.CALL, self._seqid)
420
    self._oprot.writeMessageBegin('getScan', TMessageType.CALL, self._seqid)
346
    args = getAllPurchases_args()
421
    args = getScan_args()
347
    args.purchaseOrderId = purchaseOrderId
422
    args.inventoryItemId = inventoryItemId
348
    args.open = open
-
 
349
    args.write(self._oprot)
423
    args.write(self._oprot)
350
    self._oprot.writeMessageEnd()
424
    self._oprot.writeMessageEnd()
351
    self._oprot.trans.flush()
425
    self._oprot.trans.flush()
352
 
426
 
353
  def recv_getAllPurchases(self, ):
427
  def recv_getScan(self, ):
354
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
428
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
355
    if mtype == TMessageType.EXCEPTION:
429
    if mtype == TMessageType.EXCEPTION:
356
      x = TApplicationException()
430
      x = TApplicationException()
357
      x.read(self._iprot)
431
      x.read(self._iprot)
358
      self._iprot.readMessageEnd()
432
      self._iprot.readMessageEnd()
359
      raise x
433
      raise x
360
    result = getAllPurchases_result()
434
    result = getScan_result()
361
    result.read(self._iprot)
435
    result.read(self._iprot)
362
    self._iprot.readMessageEnd()
436
    self._iprot.readMessageEnd()
363
    if result.success is not None:
437
    if result.success is not None:
364
      return result.success
438
      return result.success
-
 
439
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getScan failed: unknown result");
-
 
440
 
-
 
441
  def scanSerializedItem(self, inventoryItemId, type, warehouseId):
-
 
442
    """
-
 
443
    Scan serialized items.
-
 
444
 
-
 
445
    Parameters:
-
 
446
     - inventoryItemId
-
 
447
     - type
-
 
448
     - warehouseId
-
 
449
    """
-
 
450
    self.send_scanSerializedItem(inventoryItemId, type, warehouseId)
-
 
451
    self.recv_scanSerializedItem()
-
 
452
 
-
 
453
  def send_scanSerializedItem(self, inventoryItemId, type, warehouseId):
-
 
454
    self._oprot.writeMessageBegin('scanSerializedItem', TMessageType.CALL, self._seqid)
-
 
455
    args = scanSerializedItem_args()
-
 
456
    args.inventoryItemId = inventoryItemId
-
 
457
    args.type = type
-
 
458
    args.warehouseId = warehouseId
-
 
459
    args.write(self._oprot)
-
 
460
    self._oprot.writeMessageEnd()
-
 
461
    self._oprot.trans.flush()
-
 
462
 
-
 
463
  def recv_scanSerializedItem(self, ):
-
 
464
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
-
 
465
    if mtype == TMessageType.EXCEPTION:
-
 
466
      x = TApplicationException()
-
 
467
      x.read(self._iprot)
-
 
468
      self._iprot.readMessageEnd()
-
 
469
      raise x
-
 
470
    result = scanSerializedItem_result()
-
 
471
    result.read(self._iprot)
-
 
472
    self._iprot.readMessageEnd()
365
    if result.wex is not None:
473
    if result.wex is not None:
366
      raise result.wex
474
      raise result.wex
367
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getAllPurchases failed: unknown result");
-
 
-
 
475
    return
368
 
476
 
369
  def scanIn(self, purchaseId, itemNumber, imeiNumber, type):
477
  def scan(self, inventoryItemId, type, quantity, warehouseId):
370
    """
478
    """
371
    Creates a Scan object using the given details.
479
    Scan non-serialized items.
372
    Raises an exception if no more of the given item can be scanned in against the purchase order of the given purchase.
-
 
373
 
480
 
374
    Parameters:
481
    Parameters:
375
     - purchaseId
-
 
376
     - itemNumber
-
 
377
     - imeiNumber
482
     - inventoryItemId
378
     - type
483
     - type
-
 
484
     - quantity
-
 
485
     - warehouseId
379
    """
486
    """
380
    self.send_scanIn(purchaseId, itemNumber, imeiNumber, type)
487
    self.send_scan(inventoryItemId, type, quantity, warehouseId)
381
    self.recv_scanIn()
488
    self.recv_scan()
382
 
489
 
383
  def send_scanIn(self, purchaseId, itemNumber, imeiNumber, type):
490
  def send_scan(self, inventoryItemId, type, quantity, warehouseId):
384
    self._oprot.writeMessageBegin('scanIn', TMessageType.CALL, self._seqid)
491
    self._oprot.writeMessageBegin('scan', TMessageType.CALL, self._seqid)
385
    args = scanIn_args()
492
    args = scan_args()
386
    args.purchaseId = purchaseId
-
 
387
    args.itemNumber = itemNumber
493
    args.inventoryItemId = inventoryItemId
388
    args.imeiNumber = imeiNumber
-
 
389
    args.type = type
494
    args.type = type
-
 
495
    args.quantity = quantity
-
 
496
    args.warehouseId = warehouseId
390
    args.write(self._oprot)
497
    args.write(self._oprot)
391
    self._oprot.writeMessageEnd()
498
    self._oprot.writeMessageEnd()
392
    self._oprot.trans.flush()
499
    self._oprot.trans.flush()
393
 
500
 
394
  def recv_scanIn(self, ):
501
  def recv_scan(self, ):
395
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
502
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
396
    if mtype == TMessageType.EXCEPTION:
503
    if mtype == TMessageType.EXCEPTION:
397
      x = TApplicationException()
504
      x = TApplicationException()
398
      x.read(self._iprot)
505
      x.read(self._iprot)
399
      self._iprot.readMessageEnd()
506
      self._iprot.readMessageEnd()
400
      raise x
507
      raise x
401
    result = scanIn_result()
508
    result = scan_result()
402
    result.read(self._iprot)
509
    result.read(self._iprot)
403
    self._iprot.readMessageEnd()
510
    self._iprot.readMessageEnd()
404
    if result.wex is not None:
511
    if result.wex is not None:
405
      raise result.wex
512
      raise result.wex
406
    return
513
    return
407
 
514
 
408
  def scanOut(self, itemNumber, imeiNumber, type):
515
  def scanSerializedItemForOrder(self, inventoryItemId, type, orderId, warehouseId):
409
    """
516
    """
410
    Marks the Scan object with the given details as scanned out. In case, the imeiNumber is not given,
-
 
411
    marks the oldest ItemInventory object as being scanned out.
517
    Scan serialized items linked with an order. Returns its price.
412
    Raises an exception if:
-
 
413
    1. There is no stock present corresponding to the given item details.
-
 
414
    2. An older stock is present corresponding to the itemNumber which has not been scanned out.
-
 
415
 
518
 
416
    Parameters:
519
    Parameters:
417
     - itemNumber
-
 
418
     - imeiNumber
520
     - inventoryItemId
419
     - type
521
     - type
-
 
522
     - orderId
-
 
523
     - warehouseId
420
    """
524
    """
421
    self.send_scanOut(itemNumber, imeiNumber, type)
525
    self.send_scanSerializedItemForOrder(inventoryItemId, type, orderId, warehouseId)
422
    self.recv_scanOut()
526
    return self.recv_scanSerializedItemForOrder()
423
 
527
 
424
  def send_scanOut(self, itemNumber, imeiNumber, type):
528
  def send_scanSerializedItemForOrder(self, inventoryItemId, type, orderId, warehouseId):
425
    self._oprot.writeMessageBegin('scanOut', TMessageType.CALL, self._seqid)
529
    self._oprot.writeMessageBegin('scanSerializedItemForOrder', TMessageType.CALL, self._seqid)
426
    args = scanOut_args()
530
    args = scanSerializedItemForOrder_args()
427
    args.itemNumber = itemNumber
531
    args.inventoryItemId = inventoryItemId
428
    args.imeiNumber = imeiNumber
-
 
429
    args.type = type
532
    args.type = type
-
 
533
    args.orderId = orderId
-
 
534
    args.warehouseId = warehouseId
430
    args.write(self._oprot)
535
    args.write(self._oprot)
431
    self._oprot.writeMessageEnd()
536
    self._oprot.writeMessageEnd()
432
    self._oprot.trans.flush()
537
    self._oprot.trans.flush()
433
 
538
 
434
  def recv_scanOut(self, ):
539
  def recv_scanSerializedItemForOrder(self, ):
435
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
540
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
436
    if mtype == TMessageType.EXCEPTION:
541
    if mtype == TMessageType.EXCEPTION:
437
      x = TApplicationException()
542
      x = TApplicationException()
438
      x.read(self._iprot)
543
      x.read(self._iprot)
439
      self._iprot.readMessageEnd()
544
      self._iprot.readMessageEnd()
440
      raise x
545
      raise x
-
 
546
    result = scanSerializedItemForOrder_result()
-
 
547
    result.read(self._iprot)
-
 
548
    self._iprot.readMessageEnd()
-
 
549
    if result.success is not None:
-
 
550
      return result.success
-
 
551
    if result.wex is not None:
-
 
552
      raise result.wex
-
 
553
    raise TApplicationException(TApplicationException.MISSING_RESULT, "scanSerializedItemForOrder failed: unknown result");
-
 
554
 
-
 
555
  def scanForOrder(self, inventoryItemId, type, quantity, orderId, warehouseId):
-
 
556
    """
-
 
557
    Scan non-serialized items linked with an order.
-
 
558
 
-
 
559
    Parameters:
-
 
560
     - inventoryItemId
-
 
561
     - type
-
 
562
     - quantity
-
 
563
     - orderId
-
 
564
     - warehouseId
-
 
565
    """
-
 
566
    self.send_scanForOrder(inventoryItemId, type, quantity, orderId, warehouseId)
-
 
567
    self.recv_scanForOrder()
-
 
568
 
-
 
569
  def send_scanForOrder(self, inventoryItemId, type, quantity, orderId, warehouseId):
-
 
570
    self._oprot.writeMessageBegin('scanForOrder', TMessageType.CALL, self._seqid)
-
 
571
    args = scanForOrder_args()
-
 
572
    args.inventoryItemId = inventoryItemId
-
 
573
    args.type = type
-
 
574
    args.quantity = quantity
-
 
575
    args.orderId = orderId
-
 
576
    args.warehouseId = warehouseId
-
 
577
    args.write(self._oprot)
-
 
578
    self._oprot.writeMessageEnd()
-
 
579
    self._oprot.trans.flush()
-
 
580
 
-
 
581
  def recv_scanForOrder(self, ):
-
 
582
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
-
 
583
    if mtype == TMessageType.EXCEPTION:
-
 
584
      x = TApplicationException()
-
 
585
      x.read(self._iprot)
-
 
586
      self._iprot.readMessageEnd()
-
 
587
      raise x
441
    result = scanOut_result()
588
    result = scanForOrder_result()
442
    result.read(self._iprot)
589
    result.read(self._iprot)
443
    self._iprot.readMessageEnd()
590
    self._iprot.readMessageEnd()
444
    if result.wex is not None:
591
    if result.wex is not None:
445
      raise result.wex
592
      raise result.wex
446
    return
593
    return
447
 
594
 
-
 
595
  def createItemNumberMapping(self, itemNumber, itemId):
-
 
596
    """
-
 
597
    Created item number to item id mapping
-
 
598
 
-
 
599
    Parameters:
-
 
600
     - itemNumber
-
 
601
     - itemId
-
 
602
    """
-
 
603
    self.send_createItemNumberMapping(itemNumber, itemId)
-
 
604
    self.recv_createItemNumberMapping()
-
 
605
 
-
 
606
  def send_createItemNumberMapping(self, itemNumber, itemId):
-
 
607
    self._oprot.writeMessageBegin('createItemNumberMapping', TMessageType.CALL, self._seqid)
-
 
608
    args = createItemNumberMapping_args()
-
 
609
    args.itemNumber = itemNumber
-
 
610
    args.itemId = itemId
-
 
611
    args.write(self._oprot)
-
 
612
    self._oprot.writeMessageEnd()
-
 
613
    self._oprot.trans.flush()
-
 
614
 
-
 
615
  def recv_createItemNumberMapping(self, ):
-
 
616
    (fname, mtype, rseqid) = self._iprot.readMessageBegin()
-
 
617
    if mtype == TMessageType.EXCEPTION:
-
 
618
      x = TApplicationException()
-
 
619
      x.read(self._iprot)
-
 
620
      self._iprot.readMessageEnd()
-
 
621
      raise x
-
 
622
    result = createItemNumberMapping_result()
-
 
623
    result.read(self._iprot)
-
 
624
    self._iprot.readMessageEnd()
-
 
625
    return
-
 
626
 
448
 
627
 
449
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
628
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
450
  def __init__(self, handler):
629
  def __init__(self, handler):
451
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
630
    shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
-
 
631
    self._processMap["createSerializedInventoryItem"] = Processor.process_createSerializedInventoryItem
-
 
632
    self._processMap["createSerializedInventoryItemFromItemNumber"] = Processor.process_createSerializedInventoryItemFromItemNumber
452
    self._processMap["createPurchaseOrder"] = Processor.process_createPurchaseOrder
633
    self._processMap["createInventoryItem"] = Processor.process_createInventoryItem
453
    self._processMap["getPurchaseOrder"] = Processor.process_getPurchaseOrder
634
    self._processMap["getInventoryItem"] = Processor.process_getInventoryItem
454
    self._processMap["getAllPurchaseOrders"] = Processor.process_getAllPurchaseOrders
635
    self._processMap["getNonSeralizedInventoryItems"] = Processor.process_getNonSeralizedInventoryItems
455
    self._processMap["getSupplier"] = Processor.process_getSupplier
636
    self._processMap["getInventoryItems"] = Processor.process_getInventoryItems
456
    self._processMap["startPurchase"] = Processor.process_startPurchase
637
    self._processMap["getScanForOrder"] = Processor.process_getScanForOrder
457
    self._processMap["closePurchase"] = Processor.process_closePurchase
638
    self._processMap["getScan"] = Processor.process_getScan
458
    self._processMap["getAllPurchases"] = Processor.process_getAllPurchases
639
    self._processMap["scanSerializedItem"] = Processor.process_scanSerializedItem
459
    self._processMap["scanIn"] = Processor.process_scanIn
640
    self._processMap["scan"] = Processor.process_scan
-
 
641
    self._processMap["scanSerializedItemForOrder"] = Processor.process_scanSerializedItemForOrder
460
    self._processMap["scanOut"] = Processor.process_scanOut
642
    self._processMap["scanForOrder"] = Processor.process_scanForOrder
-
 
643
    self._processMap["createItemNumberMapping"] = Processor.process_createItemNumberMapping
461
 
644
 
462
  def process(self, iprot, oprot):
645
  def process(self, iprot, oprot):
463
    (name, type, seqid) = iprot.readMessageBegin()
646
    (name, type, seqid) = iprot.readMessageBegin()
464
    if name not in self._processMap:
647
    if name not in self._processMap:
465
      iprot.skip(TType.STRUCT)
648
      iprot.skip(TType.STRUCT)
Line 472... Line 655...
472
      return
655
      return
473
    else:
656
    else:
474
      self._processMap[name](self, seqid, iprot, oprot)
657
      self._processMap[name](self, seqid, iprot, oprot)
475
    return True
658
    return True
476
 
659
 
477
  def process_createPurchaseOrder(self, seqid, iprot, oprot):
660
  def process_createSerializedInventoryItem(self, seqid, iprot, oprot):
478
    args = createPurchaseOrder_args()
661
    args = createSerializedInventoryItem_args()
479
    args.read(iprot)
662
    args.read(iprot)
480
    iprot.readMessageEnd()
663
    iprot.readMessageEnd()
481
    result = createPurchaseOrder_result()
664
    result = createSerializedInventoryItem_result()
482
    try:
665
    try:
483
      result.success = self._handler.createPurchaseOrder(args.purchaseOrder)
666
      result.success = self._handler.createSerializedInventoryItem(args.itemId, args.serialNumber, args.purchaseId)
484
    except WarehouseServiceException, wex:
667
    except WarehouseServiceException, wex:
485
      result.wex = wex
668
      result.wex = wex
486
    oprot.writeMessageBegin("createPurchaseOrder", TMessageType.REPLY, seqid)
669
    oprot.writeMessageBegin("createSerializedInventoryItem", TMessageType.REPLY, seqid)
487
    result.write(oprot)
670
    result.write(oprot)
488
    oprot.writeMessageEnd()
671
    oprot.writeMessageEnd()
489
    oprot.trans.flush()
672
    oprot.trans.flush()
490
 
673
 
491
  def process_getPurchaseOrder(self, seqid, iprot, oprot):
674
  def process_createSerializedInventoryItemFromItemNumber(self, seqid, iprot, oprot):
492
    args = getPurchaseOrder_args()
675
    args = createSerializedInventoryItemFromItemNumber_args()
493
    args.read(iprot)
676
    args.read(iprot)
494
    iprot.readMessageEnd()
677
    iprot.readMessageEnd()
495
    result = getPurchaseOrder_result()
678
    result = createSerializedInventoryItemFromItemNumber_result()
496
    try:
679
    try:
497
      result.success = self._handler.getPurchaseOrder(args.id)
680
      result.success = self._handler.createSerializedInventoryItemFromItemNumber(args.itemNumber, args.serialNumber, args.purchaseId)
498
    except WarehouseServiceException, wex:
681
    except WarehouseServiceException, wex:
499
      result.wex = wex
682
      result.wex = wex
500
    oprot.writeMessageBegin("getPurchaseOrder", TMessageType.REPLY, seqid)
683
    oprot.writeMessageBegin("createSerializedInventoryItemFromItemNumber", TMessageType.REPLY, seqid)
501
    result.write(oprot)
684
    result.write(oprot)
502
    oprot.writeMessageEnd()
685
    oprot.writeMessageEnd()
503
    oprot.trans.flush()
686
    oprot.trans.flush()
504
 
687
 
505
  def process_getAllPurchaseOrders(self, seqid, iprot, oprot):
688
  def process_createInventoryItem(self, seqid, iprot, oprot):
506
    args = getAllPurchaseOrders_args()
689
    args = createInventoryItem_args()
507
    args.read(iprot)
690
    args.read(iprot)
508
    iprot.readMessageEnd()
691
    iprot.readMessageEnd()
509
    result = getAllPurchaseOrders_result()
692
    result = createInventoryItem_result()
510
    try:
693
    try:
511
      result.success = self._handler.getAllPurchaseOrders(args.status)
694
      result.success = self._handler.createInventoryItem(args.itemId, args.quantity, args.purchaseId)
512
    except WarehouseServiceException, wex:
695
    except WarehouseServiceException, wex:
513
      result.wex = wex
696
      result.wex = wex
514
    oprot.writeMessageBegin("getAllPurchaseOrders", TMessageType.REPLY, seqid)
697
    oprot.writeMessageBegin("createInventoryItem", TMessageType.REPLY, seqid)
515
    result.write(oprot)
698
    result.write(oprot)
516
    oprot.writeMessageEnd()
699
    oprot.writeMessageEnd()
517
    oprot.trans.flush()
700
    oprot.trans.flush()
518
 
701
 
519
  def process_getSupplier(self, seqid, iprot, oprot):
702
  def process_getInventoryItem(self, seqid, iprot, oprot):
520
    args = getSupplier_args()
703
    args = getInventoryItem_args()
521
    args.read(iprot)
704
    args.read(iprot)
522
    iprot.readMessageEnd()
705
    iprot.readMessageEnd()
523
    result = getSupplier_result()
706
    result = getInventoryItem_result()
524
    try:
-
 
525
      result.success = self._handler.getSupplier(args.id)
707
    result.success = self._handler.getInventoryItem(args.serialNumber)
526
    except WarehouseServiceException, wex:
-
 
527
      result.wex = wex
-
 
528
    oprot.writeMessageBegin("getSupplier", TMessageType.REPLY, seqid)
708
    oprot.writeMessageBegin("getInventoryItem", TMessageType.REPLY, seqid)
529
    result.write(oprot)
709
    result.write(oprot)
530
    oprot.writeMessageEnd()
710
    oprot.writeMessageEnd()
531
    oprot.trans.flush()
711
    oprot.trans.flush()
532
 
712
 
533
  def process_startPurchase(self, seqid, iprot, oprot):
713
  def process_getNonSeralizedInventoryItems(self, seqid, iprot, oprot):
534
    args = startPurchase_args()
714
    args = getNonSeralizedInventoryItems_args()
535
    args.read(iprot)
715
    args.read(iprot)
536
    iprot.readMessageEnd()
716
    iprot.readMessageEnd()
-
 
717
    result = getNonSeralizedInventoryItems_result()
-
 
718
    result.success = self._handler.getNonSeralizedInventoryItems(args.itemId, args.quantity, args.supplierId)
-
 
719
    oprot.writeMessageBegin("getNonSeralizedInventoryItems", TMessageType.REPLY, seqid)
-
 
720
    result.write(oprot)
-
 
721
    oprot.writeMessageEnd()
-
 
722
    oprot.trans.flush()
-
 
723
 
-
 
724
  def process_getInventoryItems(self, seqid, iprot, oprot):
-
 
725
    args = getInventoryItems_args()
-
 
726
    args.read(iprot)
-
 
727
    iprot.readMessageEnd()
537
    result = startPurchase_result()
728
    result = getInventoryItems_result()
-
 
729
    result.success = self._handler.getInventoryItems(args.itemId)
-
 
730
    oprot.writeMessageBegin("getInventoryItems", TMessageType.REPLY, seqid)
-
 
731
    result.write(oprot)
-
 
732
    oprot.writeMessageEnd()
-
 
733
    oprot.trans.flush()
-
 
734
 
-
 
735
  def process_getScanForOrder(self, seqid, iprot, oprot):
-
 
736
    args = getScanForOrder_args()
538
    try:
737
    args.read(iprot)
-
 
738
    iprot.readMessageEnd()
-
 
739
    result = getScanForOrder_result()
539
      result.success = self._handler.startPurchase(args.purchaseOrderId, args.invoiceNumber, args.freightCharges)
740
    result.success = self._handler.getScanForOrder(args.orderId)
540
    except WarehouseServiceException, wex:
741
    oprot.writeMessageBegin("getScanForOrder", TMessageType.REPLY, seqid)
541
      result.wex = wex
742
    result.write(oprot)
-
 
743
    oprot.writeMessageEnd()
-
 
744
    oprot.trans.flush()
-
 
745
 
-
 
746
  def process_getScan(self, seqid, iprot, oprot):
-
 
747
    args = getScan_args()
-
 
748
    args.read(iprot)
-
 
749
    iprot.readMessageEnd()
-
 
750
    result = getScan_result()
-
 
751
    result.success = self._handler.getScan(args.inventoryItemId)
542
    oprot.writeMessageBegin("startPurchase", TMessageType.REPLY, seqid)
752
    oprot.writeMessageBegin("getScan", TMessageType.REPLY, seqid)
543
    result.write(oprot)
753
    result.write(oprot)
544
    oprot.writeMessageEnd()
754
    oprot.writeMessageEnd()
545
    oprot.trans.flush()
755
    oprot.trans.flush()
546
 
756
 
547
  def process_closePurchase(self, seqid, iprot, oprot):
757
  def process_scanSerializedItem(self, seqid, iprot, oprot):
548
    args = closePurchase_args()
758
    args = scanSerializedItem_args()
549
    args.read(iprot)
759
    args.read(iprot)
550
    iprot.readMessageEnd()
760
    iprot.readMessageEnd()
551
    result = closePurchase_result()
761
    result = scanSerializedItem_result()
552
    try:
762
    try:
553
      result.success = self._handler.closePurchase(args.purchaseId)
763
      self._handler.scanSerializedItem(args.inventoryItemId, args.type, args.warehouseId)
554
    except WarehouseServiceException, wex:
764
    except WarehouseServiceException, wex:
555
      result.wex = wex
765
      result.wex = wex
556
    oprot.writeMessageBegin("closePurchase", TMessageType.REPLY, seqid)
766
    oprot.writeMessageBegin("scanSerializedItem", TMessageType.REPLY, seqid)
557
    result.write(oprot)
767
    result.write(oprot)
558
    oprot.writeMessageEnd()
768
    oprot.writeMessageEnd()
559
    oprot.trans.flush()
769
    oprot.trans.flush()
560
 
770
 
561
  def process_getAllPurchases(self, seqid, iprot, oprot):
771
  def process_scan(self, seqid, iprot, oprot):
562
    args = getAllPurchases_args()
772
    args = scan_args()
563
    args.read(iprot)
773
    args.read(iprot)
564
    iprot.readMessageEnd()
774
    iprot.readMessageEnd()
565
    result = getAllPurchases_result()
775
    result = scan_result()
566
    try:
776
    try:
567
      result.success = self._handler.getAllPurchases(args.purchaseOrderId, args.open)
777
      self._handler.scan(args.inventoryItemId, args.type, args.quantity, args.warehouseId)
568
    except WarehouseServiceException, wex:
778
    except WarehouseServiceException, wex:
569
      result.wex = wex
779
      result.wex = wex
570
    oprot.writeMessageBegin("getAllPurchases", TMessageType.REPLY, seqid)
780
    oprot.writeMessageBegin("scan", TMessageType.REPLY, seqid)
571
    result.write(oprot)
781
    result.write(oprot)
572
    oprot.writeMessageEnd()
782
    oprot.writeMessageEnd()
573
    oprot.trans.flush()
783
    oprot.trans.flush()
574
 
784
 
575
  def process_scanIn(self, seqid, iprot, oprot):
785
  def process_scanSerializedItemForOrder(self, seqid, iprot, oprot):
576
    args = scanIn_args()
786
    args = scanSerializedItemForOrder_args()
577
    args.read(iprot)
787
    args.read(iprot)
578
    iprot.readMessageEnd()
788
    iprot.readMessageEnd()
579
    result = scanIn_result()
789
    result = scanSerializedItemForOrder_result()
580
    try:
790
    try:
581
      self._handler.scanIn(args.purchaseId, args.itemNumber, args.imeiNumber, args.type)
791
      result.success = self._handler.scanSerializedItemForOrder(args.inventoryItemId, args.type, args.orderId, args.warehouseId)
582
    except WarehouseServiceException, wex:
792
    except WarehouseServiceException, wex:
583
      result.wex = wex
793
      result.wex = wex
584
    oprot.writeMessageBegin("scanIn", TMessageType.REPLY, seqid)
794
    oprot.writeMessageBegin("scanSerializedItemForOrder", TMessageType.REPLY, seqid)
585
    result.write(oprot)
795
    result.write(oprot)
586
    oprot.writeMessageEnd()
796
    oprot.writeMessageEnd()
587
    oprot.trans.flush()
797
    oprot.trans.flush()
588
 
798
 
589
  def process_scanOut(self, seqid, iprot, oprot):
799
  def process_scanForOrder(self, seqid, iprot, oprot):
590
    args = scanOut_args()
800
    args = scanForOrder_args()
591
    args.read(iprot)
801
    args.read(iprot)
592
    iprot.readMessageEnd()
802
    iprot.readMessageEnd()
593
    result = scanOut_result()
803
    result = scanForOrder_result()
594
    try:
804
    try:
595
      self._handler.scanOut(args.itemNumber, args.imeiNumber, args.type)
805
      self._handler.scanForOrder(args.inventoryItemId, args.type, args.quantity, args.orderId, args.warehouseId)
596
    except WarehouseServiceException, wex:
806
    except WarehouseServiceException, wex:
597
      result.wex = wex
807
      result.wex = wex
598
    oprot.writeMessageBegin("scanOut", TMessageType.REPLY, seqid)
808
    oprot.writeMessageBegin("scanForOrder", TMessageType.REPLY, seqid)
-
 
809
    result.write(oprot)
-
 
810
    oprot.writeMessageEnd()
-
 
811
    oprot.trans.flush()
-
 
812
 
-
 
813
  def process_createItemNumberMapping(self, seqid, iprot, oprot):
-
 
814
    args = createItemNumberMapping_args()
-
 
815
    args.read(iprot)
-
 
816
    iprot.readMessageEnd()
-
 
817
    result = createItemNumberMapping_result()
-
 
818
    self._handler.createItemNumberMapping(args.itemNumber, args.itemId)
-
 
819
    oprot.writeMessageBegin("createItemNumberMapping", TMessageType.REPLY, seqid)
599
    result.write(oprot)
820
    result.write(oprot)
600
    oprot.writeMessageEnd()
821
    oprot.writeMessageEnd()
601
    oprot.trans.flush()
822
    oprot.trans.flush()
602
 
823
 
603
 
824
 
604
# HELPER FUNCTIONS AND STRUCTURES
825
# HELPER FUNCTIONS AND STRUCTURES
605
 
826
 
606
class createPurchaseOrder_args:
827
class createSerializedInventoryItem_args:
607
  """
828
  """
608
  Attributes:
829
  Attributes:
-
 
830
   - itemId
-
 
831
   - serialNumber
609
   - purchaseOrder
832
   - purchaseId
610
  """
833
  """
611
 
834
 
612
  thrift_spec = (
835
  thrift_spec = (
613
    None, # 0
836
    None, # 0
-
 
837
    (1, TType.I64, 'itemId', None, None, ), # 1
614
    (1, TType.STRUCT, 'purchaseOrder', (PurchaseOrder, PurchaseOrder.thrift_spec), None, ), # 1
838
    (2, TType.STRING, 'serialNumber', None, None, ), # 2
-
 
839
    (3, TType.I64, 'purchaseId', None, None, ), # 3
615
  )
840
  )
616
 
841
 
617
  def __init__(self, purchaseOrder=None,):
842
  def __init__(self, itemId=None, serialNumber=None, purchaseId=None,):
-
 
843
    self.itemId = itemId
-
 
844
    self.serialNumber = serialNumber
618
    self.purchaseOrder = purchaseOrder
845
    self.purchaseId = purchaseId
619
 
846
 
620
  def read(self, iprot):
847
  def read(self, iprot):
621
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
848
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
622
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
849
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
623
      return
850
      return
Line 625... Line 852...
625
    while True:
852
    while True:
626
      (fname, ftype, fid) = iprot.readFieldBegin()
853
      (fname, ftype, fid) = iprot.readFieldBegin()
627
      if ftype == TType.STOP:
854
      if ftype == TType.STOP:
628
        break
855
        break
629
      if fid == 1:
856
      if fid == 1:
-
 
857
        if ftype == TType.I64:
-
 
858
          self.itemId = iprot.readI64();
-
 
859
        else:
-
 
860
          iprot.skip(ftype)
-
 
861
      elif fid == 2:
630
        if ftype == TType.STRUCT:
862
        if ftype == TType.STRING:
631
          self.purchaseOrder = PurchaseOrder()
863
          self.serialNumber = iprot.readString();
-
 
864
        else:
-
 
865
          iprot.skip(ftype)
-
 
866
      elif fid == 3:
-
 
867
        if ftype == TType.I64:
632
          self.purchaseOrder.read(iprot)
868
          self.purchaseId = iprot.readI64();
633
        else:
869
        else:
634
          iprot.skip(ftype)
870
          iprot.skip(ftype)
635
      else:
871
      else:
636
        iprot.skip(ftype)
872
        iprot.skip(ftype)
637
      iprot.readFieldEnd()
873
      iprot.readFieldEnd()
Line 639... Line 875...
639
 
875
 
640
  def write(self, oprot):
876
  def write(self, oprot):
641
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
877
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
642
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
878
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
643
      return
879
      return
644
    oprot.writeStructBegin('createPurchaseOrder_args')
880
    oprot.writeStructBegin('createSerializedInventoryItem_args')
-
 
881
    if self.itemId is not None:
-
 
882
      oprot.writeFieldBegin('itemId', TType.I64, 1)
-
 
883
      oprot.writeI64(self.itemId)
-
 
884
      oprot.writeFieldEnd()
645
    if self.purchaseOrder is not None:
885
    if self.serialNumber is not None:
646
      oprot.writeFieldBegin('purchaseOrder', TType.STRUCT, 1)
886
      oprot.writeFieldBegin('serialNumber', TType.STRING, 2)
-
 
887
      oprot.writeString(self.serialNumber)
-
 
888
      oprot.writeFieldEnd()
647
      self.purchaseOrder.write(oprot)
889
    if self.purchaseId is not None:
-
 
890
      oprot.writeFieldBegin('purchaseId', TType.I64, 3)
-
 
891
      oprot.writeI64(self.purchaseId)
648
      oprot.writeFieldEnd()
892
      oprot.writeFieldEnd()
649
    oprot.writeFieldStop()
893
    oprot.writeFieldStop()
650
    oprot.writeStructEnd()
894
    oprot.writeStructEnd()
651
 
895
 
652
  def validate(self):
896
  def validate(self):
Line 662... Line 906...
662
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
906
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
663
 
907
 
664
  def __ne__(self, other):
908
  def __ne__(self, other):
665
    return not (self == other)
909
    return not (self == other)
666
 
910
 
667
class createPurchaseOrder_result:
911
class createSerializedInventoryItem_result:
668
  """
912
  """
669
  Attributes:
913
  Attributes:
670
   - success
914
   - success
671
   - wex
915
   - wex
672
  """
916
  """
Line 707... Line 951...
707
 
951
 
708
  def write(self, oprot):
952
  def write(self, oprot):
709
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
953
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
710
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
954
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
711
      return
955
      return
712
    oprot.writeStructBegin('createPurchaseOrder_result')
956
    oprot.writeStructBegin('createSerializedInventoryItem_result')
713
    if self.success is not None:
957
    if self.success is not None:
714
      oprot.writeFieldBegin('success', TType.I64, 0)
958
      oprot.writeFieldBegin('success', TType.I64, 0)
715
      oprot.writeI64(self.success)
959
      oprot.writeI64(self.success)
716
      oprot.writeFieldEnd()
960
      oprot.writeFieldEnd()
717
    if self.wex is not None:
961
    if self.wex is not None:
Line 734... Line 978...
734
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
978
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
735
 
979
 
736
  def __ne__(self, other):
980
  def __ne__(self, other):
737
    return not (self == other)
981
    return not (self == other)
738
 
982
 
739
class getPurchaseOrder_args:
983
class createSerializedInventoryItemFromItemNumber_args:
740
  """
984
  """
741
  Attributes:
985
  Attributes:
-
 
986
   - itemNumber
-
 
987
   - serialNumber
742
   - id
988
   - purchaseId
743
  """
989
  """
744
 
990
 
745
  thrift_spec = (
991
  thrift_spec = (
746
    None, # 0
992
    None, # 0
-
 
993
    (1, TType.STRING, 'itemNumber', None, None, ), # 1
-
 
994
    (2, TType.STRING, 'serialNumber', None, None, ), # 2
747
    (1, TType.I64, 'id', None, None, ), # 1
995
    (3, TType.I64, 'purchaseId', None, None, ), # 3
748
  )
996
  )
749
 
997
 
-
 
998
  def __init__(self, itemNumber=None, serialNumber=None, purchaseId=None,):
750
  def __init__(self, id=None,):
999
    self.itemNumber = itemNumber
-
 
1000
    self.serialNumber = serialNumber
751
    self.id = id
1001
    self.purchaseId = purchaseId
752
 
1002
 
753
  def read(self, iprot):
1003
  def read(self, iprot):
754
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1004
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
755
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1005
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
756
      return
1006
      return
Line 758... Line 1008...
758
    while True:
1008
    while True:
759
      (fname, ftype, fid) = iprot.readFieldBegin()
1009
      (fname, ftype, fid) = iprot.readFieldBegin()
760
      if ftype == TType.STOP:
1010
      if ftype == TType.STOP:
761
        break
1011
        break
762
      if fid == 1:
1012
      if fid == 1:
-
 
1013
        if ftype == TType.STRING:
-
 
1014
          self.itemNumber = iprot.readString();
-
 
1015
        else:
-
 
1016
          iprot.skip(ftype)
-
 
1017
      elif fid == 2:
-
 
1018
        if ftype == TType.STRING:
-
 
1019
          self.serialNumber = iprot.readString();
-
 
1020
        else:
-
 
1021
          iprot.skip(ftype)
-
 
1022
      elif fid == 3:
763
        if ftype == TType.I64:
1023
        if ftype == TType.I64:
764
          self.id = iprot.readI64();
1024
          self.purchaseId = iprot.readI64();
765
        else:
1025
        else:
766
          iprot.skip(ftype)
1026
          iprot.skip(ftype)
767
      else:
1027
      else:
768
        iprot.skip(ftype)
1028
        iprot.skip(ftype)
769
      iprot.readFieldEnd()
1029
      iprot.readFieldEnd()
Line 771... Line 1031...
771
 
1031
 
772
  def write(self, oprot):
1032
  def write(self, oprot):
773
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1033
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
774
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1034
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
775
      return
1035
      return
776
    oprot.writeStructBegin('getPurchaseOrder_args')
1036
    oprot.writeStructBegin('createSerializedInventoryItemFromItemNumber_args')
-
 
1037
    if self.itemNumber is not None:
-
 
1038
      oprot.writeFieldBegin('itemNumber', TType.STRING, 1)
-
 
1039
      oprot.writeString(self.itemNumber)
-
 
1040
      oprot.writeFieldEnd()
-
 
1041
    if self.serialNumber is not None:
-
 
1042
      oprot.writeFieldBegin('serialNumber', TType.STRING, 2)
-
 
1043
      oprot.writeString(self.serialNumber)
-
 
1044
      oprot.writeFieldEnd()
777
    if self.id is not None:
1045
    if self.purchaseId is not None:
778
      oprot.writeFieldBegin('id', TType.I64, 1)
1046
      oprot.writeFieldBegin('purchaseId', TType.I64, 3)
779
      oprot.writeI64(self.id)
1047
      oprot.writeI64(self.purchaseId)
780
      oprot.writeFieldEnd()
1048
      oprot.writeFieldEnd()
781
    oprot.writeFieldStop()
1049
    oprot.writeFieldStop()
782
    oprot.writeStructEnd()
1050
    oprot.writeStructEnd()
783
 
1051
 
784
  def validate(self):
1052
  def validate(self):
Line 794... Line 1062...
794
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1062
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
795
 
1063
 
796
  def __ne__(self, other):
1064
  def __ne__(self, other):
797
    return not (self == other)
1065
    return not (self == other)
798
 
1066
 
799
class getPurchaseOrder_result:
1067
class createSerializedInventoryItemFromItemNumber_result:
800
  """
1068
  """
801
  Attributes:
1069
  Attributes:
802
   - success
1070
   - success
803
   - wex
1071
   - wex
804
  """
1072
  """
805
 
1073
 
806
  thrift_spec = (
1074
  thrift_spec = (
807
    (0, TType.STRUCT, 'success', (PurchaseOrder, PurchaseOrder.thrift_spec), None, ), # 0
1075
    (0, TType.I64, 'success', None, None, ), # 0
808
    (1, TType.STRUCT, 'wex', (WarehouseServiceException, WarehouseServiceException.thrift_spec), None, ), # 1
1076
    (1, TType.STRUCT, 'wex', (WarehouseServiceException, WarehouseServiceException.thrift_spec), None, ), # 1
809
  )
1077
  )
810
 
1078
 
811
  def __init__(self, success=None, wex=None,):
1079
  def __init__(self, success=None, wex=None,):
812
    self.success = success
1080
    self.success = success
Line 820... Line 1088...
820
    while True:
1088
    while True:
821
      (fname, ftype, fid) = iprot.readFieldBegin()
1089
      (fname, ftype, fid) = iprot.readFieldBegin()
822
      if ftype == TType.STOP:
1090
      if ftype == TType.STOP:
823
        break
1091
        break
824
      if fid == 0:
1092
      if fid == 0:
825
        if ftype == TType.STRUCT:
1093
        if ftype == TType.I64:
826
          self.success = PurchaseOrder()
1094
          self.success = iprot.readI64();
827
          self.success.read(iprot)
-
 
828
        else:
1095
        else:
829
          iprot.skip(ftype)
1096
          iprot.skip(ftype)
830
      elif fid == 1:
1097
      elif fid == 1:
831
        if ftype == TType.STRUCT:
1098
        if ftype == TType.STRUCT:
832
          self.wex = WarehouseServiceException()
1099
          self.wex = WarehouseServiceException()
Line 840... Line 1107...
840
 
1107
 
841
  def write(self, oprot):
1108
  def write(self, oprot):
842
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1109
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
843
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1110
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
844
      return
1111
      return
845
    oprot.writeStructBegin('getPurchaseOrder_result')
1112
    oprot.writeStructBegin('createSerializedInventoryItemFromItemNumber_result')
846
    if self.success is not None:
1113
    if self.success is not None:
847
      oprot.writeFieldBegin('success', TType.STRUCT, 0)
1114
      oprot.writeFieldBegin('success', TType.I64, 0)
848
      self.success.write(oprot)
1115
      oprot.writeI64(self.success)
849
      oprot.writeFieldEnd()
1116
      oprot.writeFieldEnd()
850
    if self.wex is not None:
1117
    if self.wex is not None:
851
      oprot.writeFieldBegin('wex', TType.STRUCT, 1)
1118
      oprot.writeFieldBegin('wex', TType.STRUCT, 1)
852
      self.wex.write(oprot)
1119
      self.wex.write(oprot)
853
      oprot.writeFieldEnd()
1120
      oprot.writeFieldEnd()
Line 867... Line 1134...
867
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1134
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
868
 
1135
 
869
  def __ne__(self, other):
1136
  def __ne__(self, other):
870
    return not (self == other)
1137
    return not (self == other)
871
 
1138
 
872
class getAllPurchaseOrders_args:
1139
class createInventoryItem_args:
873
  """
1140
  """
874
  Attributes:
1141
  Attributes:
875
   - status
1142
   - itemId
-
 
1143
   - quantity
-
 
1144
   - purchaseId
876
  """
1145
  """
877
 
1146
 
878
  thrift_spec = (
1147
  thrift_spec = (
879
    None, # 0
1148
    None, # 0
880
    (1, TType.I32, 'status', None, None, ), # 1
1149
    (1, TType.I64, 'itemId', None, None, ), # 1
-
 
1150
    (2, TType.I64, 'quantity', None, None, ), # 2
-
 
1151
    (3, TType.I64, 'purchaseId', None, None, ), # 3
881
  )
1152
  )
882
 
1153
 
883
  def __init__(self, status=None,):
1154
  def __init__(self, itemId=None, quantity=None, purchaseId=None,):
884
    self.status = status
1155
    self.itemId = itemId
-
 
1156
    self.quantity = quantity
-
 
1157
    self.purchaseId = purchaseId
885
 
1158
 
886
  def read(self, iprot):
1159
  def read(self, iprot):
887
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1160
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
888
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1161
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
889
      return
1162
      return
Line 891... Line 1164...
891
    while True:
1164
    while True:
892
      (fname, ftype, fid) = iprot.readFieldBegin()
1165
      (fname, ftype, fid) = iprot.readFieldBegin()
893
      if ftype == TType.STOP:
1166
      if ftype == TType.STOP:
894
        break
1167
        break
895
      if fid == 1:
1168
      if fid == 1:
896
        if ftype == TType.I32:
1169
        if ftype == TType.I64:
897
          self.status = iprot.readI32();
1170
          self.itemId = iprot.readI64();
-
 
1171
        else:
-
 
1172
          iprot.skip(ftype)
-
 
1173
      elif fid == 2:
-
 
1174
        if ftype == TType.I64:
-
 
1175
          self.quantity = iprot.readI64();
-
 
1176
        else:
-
 
1177
          iprot.skip(ftype)
-
 
1178
      elif fid == 3:
-
 
1179
        if ftype == TType.I64:
-
 
1180
          self.purchaseId = iprot.readI64();
898
        else:
1181
        else:
899
          iprot.skip(ftype)
1182
          iprot.skip(ftype)
900
      else:
1183
      else:
901
        iprot.skip(ftype)
1184
        iprot.skip(ftype)
902
      iprot.readFieldEnd()
1185
      iprot.readFieldEnd()
Line 904... Line 1187...
904
 
1187
 
905
  def write(self, oprot):
1188
  def write(self, oprot):
906
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1189
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
907
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1190
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
908
      return
1191
      return
909
    oprot.writeStructBegin('getAllPurchaseOrders_args')
1192
    oprot.writeStructBegin('createInventoryItem_args')
910
    if self.status is not None:
1193
    if self.itemId is not None:
911
      oprot.writeFieldBegin('status', TType.I32, 1)
1194
      oprot.writeFieldBegin('itemId', TType.I64, 1)
912
      oprot.writeI32(self.status)
1195
      oprot.writeI64(self.itemId)
-
 
1196
      oprot.writeFieldEnd()
-
 
1197
    if self.quantity is not None:
-
 
1198
      oprot.writeFieldBegin('quantity', TType.I64, 2)
-
 
1199
      oprot.writeI64(self.quantity)
-
 
1200
      oprot.writeFieldEnd()
-
 
1201
    if self.purchaseId is not None:
-
 
1202
      oprot.writeFieldBegin('purchaseId', TType.I64, 3)
-
 
1203
      oprot.writeI64(self.purchaseId)
913
      oprot.writeFieldEnd()
1204
      oprot.writeFieldEnd()
914
    oprot.writeFieldStop()
1205
    oprot.writeFieldStop()
915
    oprot.writeStructEnd()
1206
    oprot.writeStructEnd()
916
 
1207
 
917
  def validate(self):
1208
  def validate(self):
Line 927... Line 1218...
927
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1218
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
928
 
1219
 
929
  def __ne__(self, other):
1220
  def __ne__(self, other):
930
    return not (self == other)
1221
    return not (self == other)
931
 
1222
 
932
class getAllPurchaseOrders_result:
1223
class createInventoryItem_result:
933
  """
1224
  """
934
  Attributes:
1225
  Attributes:
935
   - success
1226
   - success
936
   - wex
1227
   - wex
937
  """
1228
  """
938
 
1229
 
939
  thrift_spec = (
1230
  thrift_spec = (
940
    (0, TType.LIST, 'success', (TType.STRUCT,(PurchaseOrder, PurchaseOrder.thrift_spec)), None, ), # 0
1231
    (0, TType.I64, 'success', None, None, ), # 0
941
    (1, TType.STRUCT, 'wex', (WarehouseServiceException, WarehouseServiceException.thrift_spec), None, ), # 1
1232
    (1, TType.STRUCT, 'wex', (WarehouseServiceException, WarehouseServiceException.thrift_spec), None, ), # 1
942
  )
1233
  )
943
 
1234
 
944
  def __init__(self, success=None, wex=None,):
1235
  def __init__(self, success=None, wex=None,):
945
    self.success = success
1236
    self.success = success
Line 953... Line 1244...
953
    while True:
1244
    while True:
954
      (fname, ftype, fid) = iprot.readFieldBegin()
1245
      (fname, ftype, fid) = iprot.readFieldBegin()
955
      if ftype == TType.STOP:
1246
      if ftype == TType.STOP:
956
        break
1247
        break
957
      if fid == 0:
1248
      if fid == 0:
958
        if ftype == TType.LIST:
1249
        if ftype == TType.I64:
959
          self.success = []
-
 
960
          (_etype10, _size7) = iprot.readListBegin()
-
 
961
          for _i11 in xrange(_size7):
-
 
962
            _elem12 = PurchaseOrder()
-
 
963
            _elem12.read(iprot)
-
 
964
            self.success.append(_elem12)
1250
          self.success = iprot.readI64();
965
          iprot.readListEnd()
-
 
966
        else:
1251
        else:
967
          iprot.skip(ftype)
1252
          iprot.skip(ftype)
968
      elif fid == 1:
1253
      elif fid == 1:
969
        if ftype == TType.STRUCT:
1254
        if ftype == TType.STRUCT:
970
          self.wex = WarehouseServiceException()
1255
          self.wex = WarehouseServiceException()
Line 978... Line 1263...
978
 
1263
 
979
  def write(self, oprot):
1264
  def write(self, oprot):
980
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1265
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
981
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1266
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
982
      return
1267
      return
983
    oprot.writeStructBegin('getAllPurchaseOrders_result')
1268
    oprot.writeStructBegin('createInventoryItem_result')
984
    if self.success is not None:
1269
    if self.success is not None:
985
      oprot.writeFieldBegin('success', TType.LIST, 0)
1270
      oprot.writeFieldBegin('success', TType.I64, 0)
986
      oprot.writeListBegin(TType.STRUCT, len(self.success))
-
 
987
      for iter13 in self.success:
1271
      oprot.writeI64(self.success)
988
        iter13.write(oprot)
-
 
989
      oprot.writeListEnd()
-
 
990
      oprot.writeFieldEnd()
1272
      oprot.writeFieldEnd()
991
    if self.wex is not None:
1273
    if self.wex is not None:
992
      oprot.writeFieldBegin('wex', TType.STRUCT, 1)
1274
      oprot.writeFieldBegin('wex', TType.STRUCT, 1)
993
      self.wex.write(oprot)
1275
      self.wex.write(oprot)
994
      oprot.writeFieldEnd()
1276
      oprot.writeFieldEnd()
Line 1008... Line 1290...
1008
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1290
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1009
 
1291
 
1010
  def __ne__(self, other):
1292
  def __ne__(self, other):
1011
    return not (self == other)
1293
    return not (self == other)
1012
 
1294
 
1013
class getSupplier_args:
1295
class getInventoryItem_args:
1014
  """
1296
  """
1015
  Attributes:
1297
  Attributes:
1016
   - id
1298
   - serialNumber
1017
  """
1299
  """
1018
 
1300
 
1019
  thrift_spec = (
1301
  thrift_spec = (
1020
    None, # 0
1302
    None, # 0
1021
    (1, TType.I64, 'id', None, None, ), # 1
1303
    (1, TType.STRING, 'serialNumber', None, None, ), # 1
1022
  )
1304
  )
1023
 
1305
 
1024
  def __init__(self, id=None,):
1306
  def __init__(self, serialNumber=None,):
1025
    self.id = id
1307
    self.serialNumber = serialNumber
1026
 
1308
 
1027
  def read(self, iprot):
1309
  def read(self, iprot):
1028
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1310
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1029
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1311
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1030
      return
1312
      return
Line 1032... Line 1314...
1032
    while True:
1314
    while True:
1033
      (fname, ftype, fid) = iprot.readFieldBegin()
1315
      (fname, ftype, fid) = iprot.readFieldBegin()
1034
      if ftype == TType.STOP:
1316
      if ftype == TType.STOP:
1035
        break
1317
        break
1036
      if fid == 1:
1318
      if fid == 1:
1037
        if ftype == TType.I64:
1319
        if ftype == TType.STRING:
1038
          self.id = iprot.readI64();
1320
          self.serialNumber = iprot.readString();
1039
        else:
1321
        else:
1040
          iprot.skip(ftype)
1322
          iprot.skip(ftype)
1041
      else:
1323
      else:
1042
        iprot.skip(ftype)
1324
        iprot.skip(ftype)
1043
      iprot.readFieldEnd()
1325
      iprot.readFieldEnd()
Line 1045... Line 1327...
1045
 
1327
 
1046
  def write(self, oprot):
1328
  def write(self, oprot):
1047
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1329
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1048
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1330
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1049
      return
1331
      return
1050
    oprot.writeStructBegin('getSupplier_args')
1332
    oprot.writeStructBegin('getInventoryItem_args')
1051
    if self.id is not None:
1333
    if self.serialNumber is not None:
1052
      oprot.writeFieldBegin('id', TType.I64, 1)
1334
      oprot.writeFieldBegin('serialNumber', TType.STRING, 1)
1053
      oprot.writeI64(self.id)
1335
      oprot.writeString(self.serialNumber)
1054
      oprot.writeFieldEnd()
1336
      oprot.writeFieldEnd()
1055
    oprot.writeFieldStop()
1337
    oprot.writeFieldStop()
1056
    oprot.writeStructEnd()
1338
    oprot.writeStructEnd()
1057
 
1339
 
1058
  def validate(self):
1340
  def validate(self):
Line 1068... Line 1350...
1068
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1350
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1069
 
1351
 
1070
  def __ne__(self, other):
1352
  def __ne__(self, other):
1071
    return not (self == other)
1353
    return not (self == other)
1072
 
1354
 
1073
class getSupplier_result:
1355
class getInventoryItem_result:
1074
  """
1356
  """
1075
  Attributes:
1357
  Attributes:
1076
   - success
1358
   - success
1077
   - wex
-
 
1078
  """
1359
  """
1079
 
1360
 
1080
  thrift_spec = (
1361
  thrift_spec = (
1081
    (0, TType.STRUCT, 'success', (Supplier, Supplier.thrift_spec), None, ), # 0
1362
    (0, TType.STRUCT, 'success', (InventoryItem, InventoryItem.thrift_spec), None, ), # 0
1082
    (1, TType.STRUCT, 'wex', (WarehouseServiceException, WarehouseServiceException.thrift_spec), None, ), # 1
-
 
1083
  )
1363
  )
1084
 
1364
 
1085
  def __init__(self, success=None, wex=None,):
1365
  def __init__(self, success=None,):
1086
    self.success = success
1366
    self.success = success
1087
    self.wex = wex
-
 
1088
 
1367
 
1089
  def read(self, iprot):
1368
  def read(self, iprot):
1090
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1369
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1091
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1370
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1092
      return
1371
      return
Line 1095... Line 1374...
1095
      (fname, ftype, fid) = iprot.readFieldBegin()
1374
      (fname, ftype, fid) = iprot.readFieldBegin()
1096
      if ftype == TType.STOP:
1375
      if ftype == TType.STOP:
1097
        break
1376
        break
1098
      if fid == 0:
1377
      if fid == 0:
1099
        if ftype == TType.STRUCT:
1378
        if ftype == TType.STRUCT:
1100
          self.success = Supplier()
1379
          self.success = InventoryItem()
1101
          self.success.read(iprot)
1380
          self.success.read(iprot)
1102
        else:
1381
        else:
1103
          iprot.skip(ftype)
1382
          iprot.skip(ftype)
1104
      elif fid == 1:
-
 
1105
        if ftype == TType.STRUCT:
-
 
1106
          self.wex = WarehouseServiceException()
-
 
1107
          self.wex.read(iprot)
-
 
1108
        else:
-
 
1109
          iprot.skip(ftype)
-
 
1110
      else:
1383
      else:
1111
        iprot.skip(ftype)
1384
        iprot.skip(ftype)
1112
      iprot.readFieldEnd()
1385
      iprot.readFieldEnd()
1113
    iprot.readStructEnd()
1386
    iprot.readStructEnd()
1114
 
1387
 
1115
  def write(self, oprot):
1388
  def write(self, oprot):
1116
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1389
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1117
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1390
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1118
      return
1391
      return
1119
    oprot.writeStructBegin('getSupplier_result')
1392
    oprot.writeStructBegin('getInventoryItem_result')
1120
    if self.success is not None:
1393
    if self.success is not None:
1121
      oprot.writeFieldBegin('success', TType.STRUCT, 0)
1394
      oprot.writeFieldBegin('success', TType.STRUCT, 0)
1122
      self.success.write(oprot)
1395
      self.success.write(oprot)
1123
      oprot.writeFieldEnd()
1396
      oprot.writeFieldEnd()
1124
    if self.wex is not None:
-
 
1125
      oprot.writeFieldBegin('wex', TType.STRUCT, 1)
-
 
1126
      self.wex.write(oprot)
-
 
1127
      oprot.writeFieldEnd()
-
 
1128
    oprot.writeFieldStop()
1397
    oprot.writeFieldStop()
1129
    oprot.writeStructEnd()
1398
    oprot.writeStructEnd()
1130
 
1399
 
1131
  def validate(self):
1400
  def validate(self):
1132
    return
1401
    return
Line 1141... Line 1410...
1141
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1410
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1142
 
1411
 
1143
  def __ne__(self, other):
1412
  def __ne__(self, other):
1144
    return not (self == other)
1413
    return not (self == other)
1145
 
1414
 
1146
class startPurchase_args:
1415
class getNonSeralizedInventoryItems_args:
1147
  """
1416
  """
1148
  Attributes:
1417
  Attributes:
1149
   - purchaseOrderId
1418
   - itemId
1150
   - invoiceNumber
1419
   - quantity
1151
   - freightCharges
1420
   - supplierId
1152
  """
1421
  """
1153
 
1422
 
1154
  thrift_spec = (
1423
  thrift_spec = (
1155
    None, # 0
1424
    None, # 0
1156
    (1, TType.I64, 'purchaseOrderId', None, None, ), # 1
1425
    (1, TType.I64, 'itemId', None, None, ), # 1
1157
    (2, TType.STRING, 'invoiceNumber', None, None, ), # 2
1426
    (2, TType.I64, 'quantity', None, None, ), # 2
1158
    (3, TType.DOUBLE, 'freightCharges', None, None, ), # 3
1427
    (3, TType.I64, 'supplierId', None, None, ), # 3
1159
  )
1428
  )
1160
 
1429
 
1161
  def __init__(self, purchaseOrderId=None, invoiceNumber=None, freightCharges=None,):
1430
  def __init__(self, itemId=None, quantity=None, supplierId=None,):
1162
    self.purchaseOrderId = purchaseOrderId
1431
    self.itemId = itemId
1163
    self.invoiceNumber = invoiceNumber
1432
    self.quantity = quantity
1164
    self.freightCharges = freightCharges
1433
    self.supplierId = supplierId
1165
 
1434
 
1166
  def read(self, iprot):
1435
  def read(self, iprot):
1167
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1436
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1168
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1437
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1169
      return
1438
      return
Line 1172... Line 1441...
1172
      (fname, ftype, fid) = iprot.readFieldBegin()
1441
      (fname, ftype, fid) = iprot.readFieldBegin()
1173
      if ftype == TType.STOP:
1442
      if ftype == TType.STOP:
1174
        break
1443
        break
1175
      if fid == 1:
1444
      if fid == 1:
1176
        if ftype == TType.I64:
1445
        if ftype == TType.I64:
1177
          self.purchaseOrderId = iprot.readI64();
1446
          self.itemId = iprot.readI64();
1178
        else:
1447
        else:
1179
          iprot.skip(ftype)
1448
          iprot.skip(ftype)
1180
      elif fid == 2:
1449
      elif fid == 2:
1181
        if ftype == TType.STRING:
1450
        if ftype == TType.I64:
1182
          self.invoiceNumber = iprot.readString();
1451
          self.quantity = iprot.readI64();
1183
        else:
1452
        else:
1184
          iprot.skip(ftype)
1453
          iprot.skip(ftype)
1185
      elif fid == 3:
1454
      elif fid == 3:
1186
        if ftype == TType.DOUBLE:
1455
        if ftype == TType.I64:
1187
          self.freightCharges = iprot.readDouble();
1456
          self.supplierId = iprot.readI64();
1188
        else:
1457
        else:
1189
          iprot.skip(ftype)
1458
          iprot.skip(ftype)
1190
      else:
1459
      else:
1191
        iprot.skip(ftype)
1460
        iprot.skip(ftype)
1192
      iprot.readFieldEnd()
1461
      iprot.readFieldEnd()
Line 1194... Line 1463...
1194
 
1463
 
1195
  def write(self, oprot):
1464
  def write(self, oprot):
1196
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1465
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1197
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1466
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1198
      return
1467
      return
1199
    oprot.writeStructBegin('startPurchase_args')
1468
    oprot.writeStructBegin('getNonSeralizedInventoryItems_args')
-
 
1469
    if self.itemId is not None:
-
 
1470
      oprot.writeFieldBegin('itemId', TType.I64, 1)
-
 
1471
      oprot.writeI64(self.itemId)
-
 
1472
      oprot.writeFieldEnd()
-
 
1473
    if self.quantity is not None:
-
 
1474
      oprot.writeFieldBegin('quantity', TType.I64, 2)
-
 
1475
      oprot.writeI64(self.quantity)
-
 
1476
      oprot.writeFieldEnd()
1200
    if self.purchaseOrderId is not None:
1477
    if self.supplierId is not None:
1201
      oprot.writeFieldBegin('purchaseOrderId', TType.I64, 1)
1478
      oprot.writeFieldBegin('supplierId', TType.I64, 3)
1202
      oprot.writeI64(self.purchaseOrderId)
1479
      oprot.writeI64(self.supplierId)
1203
      oprot.writeFieldEnd()
1480
      oprot.writeFieldEnd()
-
 
1481
    oprot.writeFieldStop()
-
 
1482
    oprot.writeStructEnd()
-
 
1483
 
-
 
1484
  def validate(self):
-
 
1485
    return
-
 
1486
 
-
 
1487
 
-
 
1488
  def __repr__(self):
-
 
1489
    L = ['%s=%r' % (key, value)
-
 
1490
      for key, value in self.__dict__.iteritems()]
-
 
1491
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
1492
 
-
 
1493
  def __eq__(self, other):
-
 
1494
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
1495
 
-
 
1496
  def __ne__(self, other):
-
 
1497
    return not (self == other)
-
 
1498
 
-
 
1499
class getNonSeralizedInventoryItems_result:
-
 
1500
  """
-
 
1501
  Attributes:
-
 
1502
   - success
-
 
1503
  """
-
 
1504
 
-
 
1505
  thrift_spec = (
-
 
1506
    (0, TType.LIST, 'success', (TType.STRUCT,(InventoryItem, InventoryItem.thrift_spec)), None, ), # 0
-
 
1507
  )
-
 
1508
 
-
 
1509
  def __init__(self, success=None,):
-
 
1510
    self.success = success
-
 
1511
 
-
 
1512
  def read(self, iprot):
-
 
1513
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
1514
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
1515
      return
-
 
1516
    iprot.readStructBegin()
-
 
1517
    while True:
-
 
1518
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
1519
      if ftype == TType.STOP:
-
 
1520
        break
-
 
1521
      if fid == 0:
-
 
1522
        if ftype == TType.LIST:
-
 
1523
          self.success = []
-
 
1524
          (_etype3, _size0) = iprot.readListBegin()
-
 
1525
          for _i4 in xrange(_size0):
-
 
1526
            _elem5 = InventoryItem()
-
 
1527
            _elem5.read(iprot)
-
 
1528
            self.success.append(_elem5)
-
 
1529
          iprot.readListEnd()
-
 
1530
        else:
-
 
1531
          iprot.skip(ftype)
-
 
1532
      else:
-
 
1533
        iprot.skip(ftype)
-
 
1534
      iprot.readFieldEnd()
-
 
1535
    iprot.readStructEnd()
-
 
1536
 
-
 
1537
  def write(self, oprot):
-
 
1538
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
1539
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
1540
      return
-
 
1541
    oprot.writeStructBegin('getNonSeralizedInventoryItems_result')
1204
    if self.invoiceNumber is not None:
1542
    if self.success is not None:
1205
      oprot.writeFieldBegin('invoiceNumber', TType.STRING, 2)
1543
      oprot.writeFieldBegin('success', TType.LIST, 0)
-
 
1544
      oprot.writeListBegin(TType.STRUCT, len(self.success))
-
 
1545
      for iter6 in self.success:
-
 
1546
        iter6.write(oprot)
1206
      oprot.writeString(self.invoiceNumber)
1547
      oprot.writeListEnd()
1207
      oprot.writeFieldEnd()
1548
      oprot.writeFieldEnd()
-
 
1549
    oprot.writeFieldStop()
-
 
1550
    oprot.writeStructEnd()
-
 
1551
 
-
 
1552
  def validate(self):
-
 
1553
    return
-
 
1554
 
-
 
1555
 
-
 
1556
  def __repr__(self):
-
 
1557
    L = ['%s=%r' % (key, value)
-
 
1558
      for key, value in self.__dict__.iteritems()]
-
 
1559
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
1560
 
-
 
1561
  def __eq__(self, other):
-
 
1562
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
1563
 
-
 
1564
  def __ne__(self, other):
-
 
1565
    return not (self == other)
-
 
1566
 
-
 
1567
class getInventoryItems_args:
-
 
1568
  """
-
 
1569
  Attributes:
-
 
1570
   - itemId
-
 
1571
  """
-
 
1572
 
-
 
1573
  thrift_spec = (
-
 
1574
    None, # 0
-
 
1575
    (1, TType.I64, 'itemId', None, None, ), # 1
-
 
1576
  )
-
 
1577
 
-
 
1578
  def __init__(self, itemId=None,):
-
 
1579
    self.itemId = itemId
-
 
1580
 
-
 
1581
  def read(self, iprot):
-
 
1582
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
1583
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
1584
      return
-
 
1585
    iprot.readStructBegin()
-
 
1586
    while True:
-
 
1587
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
1588
      if ftype == TType.STOP:
-
 
1589
        break
-
 
1590
      if fid == 1:
-
 
1591
        if ftype == TType.I64:
-
 
1592
          self.itemId = iprot.readI64();
-
 
1593
        else:
-
 
1594
          iprot.skip(ftype)
-
 
1595
      else:
-
 
1596
        iprot.skip(ftype)
-
 
1597
      iprot.readFieldEnd()
-
 
1598
    iprot.readStructEnd()
-
 
1599
 
-
 
1600
  def write(self, oprot):
-
 
1601
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
1602
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
1603
      return
-
 
1604
    oprot.writeStructBegin('getInventoryItems_args')
1208
    if self.freightCharges is not None:
1605
    if self.itemId is not None:
1209
      oprot.writeFieldBegin('freightCharges', TType.DOUBLE, 3)
1606
      oprot.writeFieldBegin('itemId', TType.I64, 1)
1210
      oprot.writeDouble(self.freightCharges)
1607
      oprot.writeI64(self.itemId)
1211
      oprot.writeFieldEnd()
1608
      oprot.writeFieldEnd()
1212
    oprot.writeFieldStop()
1609
    oprot.writeFieldStop()
1213
    oprot.writeStructEnd()
1610
    oprot.writeStructEnd()
1214
 
1611
 
1215
  def validate(self):
1612
  def validate(self):
Line 1225... Line 1622...
1225
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1622
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1226
 
1623
 
1227
  def __ne__(self, other):
1624
  def __ne__(self, other):
1228
    return not (self == other)
1625
    return not (self == other)
1229
 
1626
 
1230
class startPurchase_result:
1627
class getInventoryItems_result:
1231
  """
1628
  """
1232
  Attributes:
1629
  Attributes:
1233
   - success
1630
   - success
1234
   - wex
-
 
1235
  """
1631
  """
1236
 
1632
 
1237
  thrift_spec = (
1633
  thrift_spec = (
1238
    (0, TType.I64, 'success', None, None, ), # 0
-
 
1239
    (1, TType.STRUCT, 'wex', (WarehouseServiceException, WarehouseServiceException.thrift_spec), None, ), # 1
1634
    (0, TType.LIST, 'success', (TType.STRUCT,(InventoryItem, InventoryItem.thrift_spec)), None, ), # 0
1240
  )
1635
  )
1241
 
1636
 
1242
  def __init__(self, success=None, wex=None,):
1637
  def __init__(self, success=None,):
1243
    self.success = success
1638
    self.success = success
1244
    self.wex = wex
-
 
1245
 
1639
 
1246
  def read(self, iprot):
1640
  def read(self, iprot):
1247
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1641
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1248
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1642
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1249
      return
1643
      return
Line 1251... Line 1645...
1251
    while True:
1645
    while True:
1252
      (fname, ftype, fid) = iprot.readFieldBegin()
1646
      (fname, ftype, fid) = iprot.readFieldBegin()
1253
      if ftype == TType.STOP:
1647
      if ftype == TType.STOP:
1254
        break
1648
        break
1255
      if fid == 0:
1649
      if fid == 0:
-
 
1650
        if ftype == TType.LIST:
-
 
1651
          self.success = []
-
 
1652
          (_etype10, _size7) = iprot.readListBegin()
-
 
1653
          for _i11 in xrange(_size7):
-
 
1654
            _elem12 = InventoryItem()
-
 
1655
            _elem12.read(iprot)
-
 
1656
            self.success.append(_elem12)
-
 
1657
          iprot.readListEnd()
-
 
1658
        else:
-
 
1659
          iprot.skip(ftype)
-
 
1660
      else:
-
 
1661
        iprot.skip(ftype)
-
 
1662
      iprot.readFieldEnd()
-
 
1663
    iprot.readStructEnd()
-
 
1664
 
-
 
1665
  def write(self, oprot):
-
 
1666
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
1667
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
1668
      return
-
 
1669
    oprot.writeStructBegin('getInventoryItems_result')
-
 
1670
    if self.success is not None:
-
 
1671
      oprot.writeFieldBegin('success', TType.LIST, 0)
-
 
1672
      oprot.writeListBegin(TType.STRUCT, len(self.success))
-
 
1673
      for iter13 in self.success:
-
 
1674
        iter13.write(oprot)
-
 
1675
      oprot.writeListEnd()
-
 
1676
      oprot.writeFieldEnd()
-
 
1677
    oprot.writeFieldStop()
-
 
1678
    oprot.writeStructEnd()
-
 
1679
 
-
 
1680
  def validate(self):
-
 
1681
    return
-
 
1682
 
-
 
1683
 
-
 
1684
  def __repr__(self):
-
 
1685
    L = ['%s=%r' % (key, value)
-
 
1686
      for key, value in self.__dict__.iteritems()]
-
 
1687
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
1688
 
-
 
1689
  def __eq__(self, other):
-
 
1690
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
1691
 
-
 
1692
  def __ne__(self, other):
-
 
1693
    return not (self == other)
-
 
1694
 
-
 
1695
class getScanForOrder_args:
-
 
1696
  """
-
 
1697
  Attributes:
-
 
1698
   - orderId
-
 
1699
  """
-
 
1700
 
-
 
1701
  thrift_spec = (
-
 
1702
    None, # 0
-
 
1703
    (1, TType.I64, 'orderId', None, None, ), # 1
-
 
1704
  )
-
 
1705
 
-
 
1706
  def __init__(self, orderId=None,):
-
 
1707
    self.orderId = orderId
-
 
1708
 
-
 
1709
  def read(self, iprot):
-
 
1710
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
1711
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
1712
      return
-
 
1713
    iprot.readStructBegin()
-
 
1714
    while True:
-
 
1715
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
1716
      if ftype == TType.STOP:
-
 
1717
        break
-
 
1718
      if fid == 1:
1256
        if ftype == TType.I64:
1719
        if ftype == TType.I64:
1257
          self.success = iprot.readI64();
1720
          self.orderId = iprot.readI64();
1258
        else:
1721
        else:
1259
          iprot.skip(ftype)
1722
          iprot.skip(ftype)
-
 
1723
      else:
-
 
1724
        iprot.skip(ftype)
-
 
1725
      iprot.readFieldEnd()
-
 
1726
    iprot.readStructEnd()
-
 
1727
 
-
 
1728
  def write(self, oprot):
-
 
1729
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
1730
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
1731
      return
-
 
1732
    oprot.writeStructBegin('getScanForOrder_args')
-
 
1733
    if self.orderId is not None:
-
 
1734
      oprot.writeFieldBegin('orderId', TType.I64, 1)
-
 
1735
      oprot.writeI64(self.orderId)
-
 
1736
      oprot.writeFieldEnd()
-
 
1737
    oprot.writeFieldStop()
-
 
1738
    oprot.writeStructEnd()
-
 
1739
 
-
 
1740
  def validate(self):
-
 
1741
    return
-
 
1742
 
-
 
1743
 
-
 
1744
  def __repr__(self):
-
 
1745
    L = ['%s=%r' % (key, value)
-
 
1746
      for key, value in self.__dict__.iteritems()]
-
 
1747
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
1748
 
-
 
1749
  def __eq__(self, other):
-
 
1750
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
1751
 
-
 
1752
  def __ne__(self, other):
-
 
1753
    return not (self == other)
-
 
1754
 
-
 
1755
class getScanForOrder_result:
-
 
1756
  """
-
 
1757
  Attributes:
-
 
1758
   - success
-
 
1759
  """
-
 
1760
 
-
 
1761
  thrift_spec = (
-
 
1762
    (0, TType.LIST, 'success', (TType.STRUCT,(Scan, Scan.thrift_spec)), None, ), # 0
-
 
1763
  )
-
 
1764
 
-
 
1765
  def __init__(self, success=None,):
-
 
1766
    self.success = success
-
 
1767
 
-
 
1768
  def read(self, iprot):
-
 
1769
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
1770
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
1771
      return
-
 
1772
    iprot.readStructBegin()
-
 
1773
    while True:
-
 
1774
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
1775
      if ftype == TType.STOP:
-
 
1776
        break
1260
      elif fid == 1:
1777
      if fid == 0:
1261
        if ftype == TType.STRUCT:
1778
        if ftype == TType.LIST:
-
 
1779
          self.success = []
1262
          self.wex = WarehouseServiceException()
1780
          (_etype17, _size14) = iprot.readListBegin()
-
 
1781
          for _i18 in xrange(_size14):
-
 
1782
            _elem19 = Scan()
1263
          self.wex.read(iprot)
1783
            _elem19.read(iprot)
-
 
1784
            self.success.append(_elem19)
-
 
1785
          iprot.readListEnd()
1264
        else:
1786
        else:
1265
          iprot.skip(ftype)
1787
          iprot.skip(ftype)
1266
      else:
1788
      else:
1267
        iprot.skip(ftype)
1789
        iprot.skip(ftype)
1268
      iprot.readFieldEnd()
1790
      iprot.readFieldEnd()
Line 1270... Line 1792...
1270
 
1792
 
1271
  def write(self, oprot):
1793
  def write(self, oprot):
1272
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1794
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1273
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1795
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1274
      return
1796
      return
1275
    oprot.writeStructBegin('startPurchase_result')
1797
    oprot.writeStructBegin('getScanForOrder_result')
1276
    if self.success is not None:
1798
    if self.success is not None:
1277
      oprot.writeFieldBegin('success', TType.I64, 0)
1799
      oprot.writeFieldBegin('success', TType.LIST, 0)
1278
      oprot.writeI64(self.success)
1800
      oprot.writeListBegin(TType.STRUCT, len(self.success))
1279
      oprot.writeFieldEnd()
1801
      for iter20 in self.success:
1280
    if self.wex is not None:
1802
        iter20.write(oprot)
1281
      oprot.writeFieldBegin('wex', TType.STRUCT, 1)
-
 
1282
      self.wex.write(oprot)
1803
      oprot.writeListEnd()
1283
      oprot.writeFieldEnd()
1804
      oprot.writeFieldEnd()
1284
    oprot.writeFieldStop()
1805
    oprot.writeFieldStop()
1285
    oprot.writeStructEnd()
1806
    oprot.writeStructEnd()
1286
 
1807
 
1287
  def validate(self):
1808
  def validate(self):
Line 1297... Line 1818...
1297
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1818
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1298
 
1819
 
1299
  def __ne__(self, other):
1820
  def __ne__(self, other):
1300
    return not (self == other)
1821
    return not (self == other)
1301
 
1822
 
1302
class closePurchase_args:
1823
class getScan_args:
1303
  """
1824
  """
1304
  Attributes:
1825
  Attributes:
1305
   - purchaseId
1826
   - inventoryItemId
1306
  """
1827
  """
1307
 
1828
 
1308
  thrift_spec = (
1829
  thrift_spec = (
1309
    None, # 0
1830
    None, # 0
1310
    (1, TType.I64, 'purchaseId', None, None, ), # 1
1831
    (1, TType.I64, 'inventoryItemId', None, None, ), # 1
1311
  )
1832
  )
1312
 
1833
 
1313
  def __init__(self, purchaseId=None,):
1834
  def __init__(self, inventoryItemId=None,):
1314
    self.purchaseId = purchaseId
1835
    self.inventoryItemId = inventoryItemId
1315
 
1836
 
1316
  def read(self, iprot):
1837
  def read(self, iprot):
1317
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1838
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1318
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1839
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1319
      return
1840
      return
Line 1322... Line 1843...
1322
      (fname, ftype, fid) = iprot.readFieldBegin()
1843
      (fname, ftype, fid) = iprot.readFieldBegin()
1323
      if ftype == TType.STOP:
1844
      if ftype == TType.STOP:
1324
        break
1845
        break
1325
      if fid == 1:
1846
      if fid == 1:
1326
        if ftype == TType.I64:
1847
        if ftype == TType.I64:
1327
          self.purchaseId = iprot.readI64();
1848
          self.inventoryItemId = iprot.readI64();
1328
        else:
1849
        else:
1329
          iprot.skip(ftype)
1850
          iprot.skip(ftype)
1330
      else:
1851
      else:
1331
        iprot.skip(ftype)
1852
        iprot.skip(ftype)
1332
      iprot.readFieldEnd()
1853
      iprot.readFieldEnd()
Line 1334... Line 1855...
1334
 
1855
 
1335
  def write(self, oprot):
1856
  def write(self, oprot):
1336
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1857
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1337
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1858
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1338
      return
1859
      return
1339
    oprot.writeStructBegin('closePurchase_args')
1860
    oprot.writeStructBegin('getScan_args')
1340
    if self.purchaseId is not None:
1861
    if self.inventoryItemId is not None:
1341
      oprot.writeFieldBegin('purchaseId', TType.I64, 1)
1862
      oprot.writeFieldBegin('inventoryItemId', TType.I64, 1)
1342
      oprot.writeI64(self.purchaseId)
1863
      oprot.writeI64(self.inventoryItemId)
1343
      oprot.writeFieldEnd()
1864
      oprot.writeFieldEnd()
1344
    oprot.writeFieldStop()
1865
    oprot.writeFieldStop()
1345
    oprot.writeStructEnd()
1866
    oprot.writeStructEnd()
1346
 
1867
 
1347
  def validate(self):
1868
  def validate(self):
Line 1357... Line 1878...
1357
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1878
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1358
 
1879
 
1359
  def __ne__(self, other):
1880
  def __ne__(self, other):
1360
    return not (self == other)
1881
    return not (self == other)
1361
 
1882
 
1362
class closePurchase_result:
1883
class getScan_result:
1363
  """
1884
  """
1364
  Attributes:
1885
  Attributes:
1365
   - success
1886
   - success
1366
   - wex
-
 
1367
  """
1887
  """
1368
 
1888
 
1369
  thrift_spec = (
1889
  thrift_spec = (
1370
    (0, TType.I64, 'success', None, None, ), # 0
1890
    (0, TType.LIST, 'success', (TType.STRUCT,(Scan, Scan.thrift_spec)), None, ), # 0
1371
    (1, TType.STRUCT, 'wex', (WarehouseServiceException, WarehouseServiceException.thrift_spec), None, ), # 1
-
 
1372
  )
1891
  )
1373
 
1892
 
1374
  def __init__(self, success=None, wex=None,):
1893
  def __init__(self, success=None,):
1375
    self.success = success
1894
    self.success = success
1376
    self.wex = wex
-
 
1377
 
1895
 
1378
  def read(self, iprot):
1896
  def read(self, iprot):
1379
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1897
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1380
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1898
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1381
      return
1899
      return
Line 1383... Line 1901...
1383
    while True:
1901
    while True:
1384
      (fname, ftype, fid) = iprot.readFieldBegin()
1902
      (fname, ftype, fid) = iprot.readFieldBegin()
1385
      if ftype == TType.STOP:
1903
      if ftype == TType.STOP:
1386
        break
1904
        break
1387
      if fid == 0:
1905
      if fid == 0:
-
 
1906
        if ftype == TType.LIST:
-
 
1907
          self.success = []
-
 
1908
          (_etype24, _size21) = iprot.readListBegin()
-
 
1909
          for _i25 in xrange(_size21):
-
 
1910
            _elem26 = Scan()
-
 
1911
            _elem26.read(iprot)
-
 
1912
            self.success.append(_elem26)
-
 
1913
          iprot.readListEnd()
-
 
1914
        else:
-
 
1915
          iprot.skip(ftype)
-
 
1916
      else:
-
 
1917
        iprot.skip(ftype)
-
 
1918
      iprot.readFieldEnd()
-
 
1919
    iprot.readStructEnd()
-
 
1920
 
-
 
1921
  def write(self, oprot):
-
 
1922
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
1923
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
1924
      return
-
 
1925
    oprot.writeStructBegin('getScan_result')
-
 
1926
    if self.success is not None:
-
 
1927
      oprot.writeFieldBegin('success', TType.LIST, 0)
-
 
1928
      oprot.writeListBegin(TType.STRUCT, len(self.success))
-
 
1929
      for iter27 in self.success:
-
 
1930
        iter27.write(oprot)
-
 
1931
      oprot.writeListEnd()
-
 
1932
      oprot.writeFieldEnd()
-
 
1933
    oprot.writeFieldStop()
-
 
1934
    oprot.writeStructEnd()
-
 
1935
 
-
 
1936
  def validate(self):
-
 
1937
    return
-
 
1938
 
-
 
1939
 
-
 
1940
  def __repr__(self):
-
 
1941
    L = ['%s=%r' % (key, value)
-
 
1942
      for key, value in self.__dict__.iteritems()]
-
 
1943
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
1944
 
-
 
1945
  def __eq__(self, other):
-
 
1946
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
1947
 
-
 
1948
  def __ne__(self, other):
-
 
1949
    return not (self == other)
-
 
1950
 
-
 
1951
class scanSerializedItem_args:
-
 
1952
  """
-
 
1953
  Attributes:
-
 
1954
   - inventoryItemId
-
 
1955
   - type
-
 
1956
   - warehouseId
-
 
1957
  """
-
 
1958
 
-
 
1959
  thrift_spec = (
-
 
1960
    None, # 0
-
 
1961
    (1, TType.I64, 'inventoryItemId', None, None, ), # 1
-
 
1962
    (2, TType.I32, 'type', None, None, ), # 2
-
 
1963
    (3, TType.I64, 'warehouseId', None, None, ), # 3
-
 
1964
  )
-
 
1965
 
-
 
1966
  def __init__(self, inventoryItemId=None, type=None, warehouseId=None,):
-
 
1967
    self.inventoryItemId = inventoryItemId
-
 
1968
    self.type = type
-
 
1969
    self.warehouseId = warehouseId
-
 
1970
 
-
 
1971
  def read(self, iprot):
-
 
1972
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
1973
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
1974
      return
-
 
1975
    iprot.readStructBegin()
-
 
1976
    while True:
-
 
1977
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
1978
      if ftype == TType.STOP:
-
 
1979
        break
-
 
1980
      if fid == 1:
1388
        if ftype == TType.I64:
1981
        if ftype == TType.I64:
1389
          self.success = iprot.readI64();
1982
          self.inventoryItemId = iprot.readI64();
1390
        else:
1983
        else:
1391
          iprot.skip(ftype)
1984
          iprot.skip(ftype)
1392
      elif fid == 1:
1985
      elif fid == 2:
-
 
1986
        if ftype == TType.I32:
-
 
1987
          self.type = iprot.readI32();
-
 
1988
        else:
-
 
1989
          iprot.skip(ftype)
-
 
1990
      elif fid == 3:
-
 
1991
        if ftype == TType.I64:
-
 
1992
          self.warehouseId = iprot.readI64();
-
 
1993
        else:
-
 
1994
          iprot.skip(ftype)
-
 
1995
      else:
-
 
1996
        iprot.skip(ftype)
-
 
1997
      iprot.readFieldEnd()
-
 
1998
    iprot.readStructEnd()
-
 
1999
 
-
 
2000
  def write(self, oprot):
-
 
2001
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
2002
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
2003
      return
-
 
2004
    oprot.writeStructBegin('scanSerializedItem_args')
-
 
2005
    if self.inventoryItemId is not None:
-
 
2006
      oprot.writeFieldBegin('inventoryItemId', TType.I64, 1)
-
 
2007
      oprot.writeI64(self.inventoryItemId)
-
 
2008
      oprot.writeFieldEnd()
-
 
2009
    if self.type is not None:
-
 
2010
      oprot.writeFieldBegin('type', TType.I32, 2)
-
 
2011
      oprot.writeI32(self.type)
-
 
2012
      oprot.writeFieldEnd()
-
 
2013
    if self.warehouseId is not None:
-
 
2014
      oprot.writeFieldBegin('warehouseId', TType.I64, 3)
-
 
2015
      oprot.writeI64(self.warehouseId)
-
 
2016
      oprot.writeFieldEnd()
-
 
2017
    oprot.writeFieldStop()
-
 
2018
    oprot.writeStructEnd()
-
 
2019
 
-
 
2020
  def validate(self):
-
 
2021
    return
-
 
2022
 
-
 
2023
 
-
 
2024
  def __repr__(self):
-
 
2025
    L = ['%s=%r' % (key, value)
-
 
2026
      for key, value in self.__dict__.iteritems()]
-
 
2027
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
2028
 
-
 
2029
  def __eq__(self, other):
-
 
2030
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
2031
 
-
 
2032
  def __ne__(self, other):
-
 
2033
    return not (self == other)
-
 
2034
 
-
 
2035
class scanSerializedItem_result:
-
 
2036
  """
-
 
2037
  Attributes:
-
 
2038
   - wex
-
 
2039
  """
-
 
2040
 
-
 
2041
  thrift_spec = (
-
 
2042
    None, # 0
-
 
2043
    (1, TType.STRUCT, 'wex', (WarehouseServiceException, WarehouseServiceException.thrift_spec), None, ), # 1
-
 
2044
  )
-
 
2045
 
-
 
2046
  def __init__(self, wex=None,):
-
 
2047
    self.wex = wex
-
 
2048
 
-
 
2049
  def read(self, iprot):
-
 
2050
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
2051
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
2052
      return
-
 
2053
    iprot.readStructBegin()
-
 
2054
    while True:
-
 
2055
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
2056
      if ftype == TType.STOP:
-
 
2057
        break
-
 
2058
      if fid == 1:
1393
        if ftype == TType.STRUCT:
2059
        if ftype == TType.STRUCT:
1394
          self.wex = WarehouseServiceException()
2060
          self.wex = WarehouseServiceException()
1395
          self.wex.read(iprot)
2061
          self.wex.read(iprot)
1396
        else:
2062
        else:
1397
          iprot.skip(ftype)
2063
          iprot.skip(ftype)
Line 1402... Line 2068...
1402
 
2068
 
1403
  def write(self, oprot):
2069
  def write(self, oprot):
1404
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
2070
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1405
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
2071
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1406
      return
2072
      return
1407
    oprot.writeStructBegin('closePurchase_result')
2073
    oprot.writeStructBegin('scanSerializedItem_result')
1408
    if self.success is not None:
-
 
1409
      oprot.writeFieldBegin('success', TType.I64, 0)
-
 
1410
      oprot.writeI64(self.success)
-
 
1411
      oprot.writeFieldEnd()
-
 
1412
    if self.wex is not None:
2074
    if self.wex is not None:
1413
      oprot.writeFieldBegin('wex', TType.STRUCT, 1)
2075
      oprot.writeFieldBegin('wex', TType.STRUCT, 1)
1414
      self.wex.write(oprot)
2076
      self.wex.write(oprot)
1415
      oprot.writeFieldEnd()
2077
      oprot.writeFieldEnd()
1416
    oprot.writeFieldStop()
2078
    oprot.writeFieldStop()
Line 1429... Line 2091...
1429
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
2091
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1430
 
2092
 
1431
  def __ne__(self, other):
2093
  def __ne__(self, other):
1432
    return not (self == other)
2094
    return not (self == other)
1433
 
2095
 
1434
class getAllPurchases_args:
2096
class scan_args:
1435
  """
2097
  """
1436
  Attributes:
2098
  Attributes:
1437
   - purchaseOrderId
2099
   - inventoryItemId
1438
   - open
2100
   - type
-
 
2101
   - quantity
-
 
2102
   - warehouseId
1439
  """
2103
  """
1440
 
2104
 
1441
  thrift_spec = (
2105
  thrift_spec = (
1442
    None, # 0
2106
    None, # 0
1443
    (1, TType.I64, 'purchaseOrderId', None, None, ), # 1
2107
    (1, TType.I64, 'inventoryItemId', None, None, ), # 1
1444
    (2, TType.BOOL, 'open', None, None, ), # 2
2108
    (2, TType.I32, 'type', None, None, ), # 2
-
 
2109
    (3, TType.I64, 'quantity', None, None, ), # 3
-
 
2110
    (4, TType.I64, 'warehouseId', None, None, ), # 4
1445
  )
2111
  )
1446
 
2112
 
1447
  def __init__(self, purchaseOrderId=None, open=None,):
2113
  def __init__(self, inventoryItemId=None, type=None, quantity=None, warehouseId=None,):
1448
    self.purchaseOrderId = purchaseOrderId
2114
    self.inventoryItemId = inventoryItemId
1449
    self.open = open
2115
    self.type = type
-
 
2116
    self.quantity = quantity
-
 
2117
    self.warehouseId = warehouseId
1450
 
2118
 
1451
  def read(self, iprot):
2119
  def read(self, iprot):
1452
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
2120
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1453
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
2121
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1454
      return
2122
      return
Line 1457... Line 2125...
1457
      (fname, ftype, fid) = iprot.readFieldBegin()
2125
      (fname, ftype, fid) = iprot.readFieldBegin()
1458
      if ftype == TType.STOP:
2126
      if ftype == TType.STOP:
1459
        break
2127
        break
1460
      if fid == 1:
2128
      if fid == 1:
1461
        if ftype == TType.I64:
2129
        if ftype == TType.I64:
1462
          self.purchaseOrderId = iprot.readI64();
2130
          self.inventoryItemId = iprot.readI64();
1463
        else:
2131
        else:
1464
          iprot.skip(ftype)
2132
          iprot.skip(ftype)
1465
      elif fid == 2:
2133
      elif fid == 2:
1466
        if ftype == TType.BOOL:
2134
        if ftype == TType.I32:
1467
          self.open = iprot.readBool();
2135
          self.type = iprot.readI32();
-
 
2136
        else:
-
 
2137
          iprot.skip(ftype)
-
 
2138
      elif fid == 3:
-
 
2139
        if ftype == TType.I64:
-
 
2140
          self.quantity = iprot.readI64();
-
 
2141
        else:
-
 
2142
          iprot.skip(ftype)
-
 
2143
      elif fid == 4:
-
 
2144
        if ftype == TType.I64:
-
 
2145
          self.warehouseId = iprot.readI64();
1468
        else:
2146
        else:
1469
          iprot.skip(ftype)
2147
          iprot.skip(ftype)
1470
      else:
2148
      else:
1471
        iprot.skip(ftype)
2149
        iprot.skip(ftype)
1472
      iprot.readFieldEnd()
2150
      iprot.readFieldEnd()
Line 1474... Line 2152...
1474
 
2152
 
1475
  def write(self, oprot):
2153
  def write(self, oprot):
1476
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
2154
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1477
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
2155
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1478
      return
2156
      return
1479
    oprot.writeStructBegin('getAllPurchases_args')
2157
    oprot.writeStructBegin('scan_args')
1480
    if self.purchaseOrderId is not None:
2158
    if self.inventoryItemId is not None:
1481
      oprot.writeFieldBegin('purchaseOrderId', TType.I64, 1)
2159
      oprot.writeFieldBegin('inventoryItemId', TType.I64, 1)
1482
      oprot.writeI64(self.purchaseOrderId)
2160
      oprot.writeI64(self.inventoryItemId)
-
 
2161
      oprot.writeFieldEnd()
-
 
2162
    if self.type is not None:
-
 
2163
      oprot.writeFieldBegin('type', TType.I32, 2)
-
 
2164
      oprot.writeI32(self.type)
1483
      oprot.writeFieldEnd()
2165
      oprot.writeFieldEnd()
1484
    if self.open is not None:
2166
    if self.quantity is not None:
1485
      oprot.writeFieldBegin('open', TType.BOOL, 2)
2167
      oprot.writeFieldBegin('quantity', TType.I64, 3)
1486
      oprot.writeBool(self.open)
2168
      oprot.writeI64(self.quantity)
-
 
2169
      oprot.writeFieldEnd()
-
 
2170
    if self.warehouseId is not None:
-
 
2171
      oprot.writeFieldBegin('warehouseId', TType.I64, 4)
-
 
2172
      oprot.writeI64(self.warehouseId)
1487
      oprot.writeFieldEnd()
2173
      oprot.writeFieldEnd()
1488
    oprot.writeFieldStop()
2174
    oprot.writeFieldStop()
1489
    oprot.writeStructEnd()
2175
    oprot.writeStructEnd()
1490
 
2176
 
1491
  def validate(self):
2177
  def validate(self):
Line 1501... Line 2187...
1501
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
2187
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1502
 
2188
 
1503
  def __ne__(self, other):
2189
  def __ne__(self, other):
1504
    return not (self == other)
2190
    return not (self == other)
1505
 
2191
 
1506
class getAllPurchases_result:
2192
class scan_result:
1507
  """
2193
  """
1508
  Attributes:
2194
  Attributes:
1509
   - success
-
 
1510
   - wex
2195
   - wex
1511
  """
2196
  """
1512
 
2197
 
1513
  thrift_spec = (
2198
  thrift_spec = (
1514
    (0, TType.LIST, 'success', (TType.STRUCT,(Purchase, Purchase.thrift_spec)), None, ), # 0
2199
    None, # 0
1515
    (1, TType.STRUCT, 'wex', (WarehouseServiceException, WarehouseServiceException.thrift_spec), None, ), # 1
2200
    (1, TType.STRUCT, 'wex', (WarehouseServiceException, WarehouseServiceException.thrift_spec), None, ), # 1
1516
  )
2201
  )
1517
 
2202
 
1518
  def __init__(self, success=None, wex=None,):
2203
  def __init__(self, wex=None,):
1519
    self.success = success
-
 
1520
    self.wex = wex
2204
    self.wex = wex
1521
 
2205
 
1522
  def read(self, iprot):
2206
  def read(self, iprot):
1523
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
2207
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1524
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
2208
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
Line 1526... Line 2210...
1526
    iprot.readStructBegin()
2210
    iprot.readStructBegin()
1527
    while True:
2211
    while True:
1528
      (fname, ftype, fid) = iprot.readFieldBegin()
2212
      (fname, ftype, fid) = iprot.readFieldBegin()
1529
      if ftype == TType.STOP:
2213
      if ftype == TType.STOP:
1530
        break
2214
        break
1531
      if fid == 0:
2215
      if fid == 1:
1532
        if ftype == TType.LIST:
-
 
1533
          self.success = []
-
 
1534
          (_etype17, _size14) = iprot.readListBegin()
-
 
1535
          for _i18 in xrange(_size14):
-
 
1536
            _elem19 = Purchase()
-
 
1537
            _elem19.read(iprot)
-
 
1538
            self.success.append(_elem19)
-
 
1539
          iprot.readListEnd()
-
 
1540
        else:
-
 
1541
          iprot.skip(ftype)
-
 
1542
      elif fid == 1:
-
 
1543
        if ftype == TType.STRUCT:
2216
        if ftype == TType.STRUCT:
1544
          self.wex = WarehouseServiceException()
2217
          self.wex = WarehouseServiceException()
1545
          self.wex.read(iprot)
2218
          self.wex.read(iprot)
1546
        else:
2219
        else:
1547
          iprot.skip(ftype)
2220
          iprot.skip(ftype)
Line 1552... Line 2225...
1552
 
2225
 
1553
  def write(self, oprot):
2226
  def write(self, oprot):
1554
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
2227
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1555
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
2228
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1556
      return
2229
      return
1557
    oprot.writeStructBegin('getAllPurchases_result')
2230
    oprot.writeStructBegin('scan_result')
1558
    if self.success is not None:
-
 
1559
      oprot.writeFieldBegin('success', TType.LIST, 0)
-
 
1560
      oprot.writeListBegin(TType.STRUCT, len(self.success))
-
 
1561
      for iter20 in self.success:
-
 
1562
        iter20.write(oprot)
-
 
1563
      oprot.writeListEnd()
-
 
1564
      oprot.writeFieldEnd()
-
 
1565
    if self.wex is not None:
2231
    if self.wex is not None:
1566
      oprot.writeFieldBegin('wex', TType.STRUCT, 1)
2232
      oprot.writeFieldBegin('wex', TType.STRUCT, 1)
1567
      self.wex.write(oprot)
2233
      self.wex.write(oprot)
1568
      oprot.writeFieldEnd()
2234
      oprot.writeFieldEnd()
1569
    oprot.writeFieldStop()
2235
    oprot.writeFieldStop()
Line 1582... Line 2248...
1582
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
2248
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1583
 
2249
 
1584
  def __ne__(self, other):
2250
  def __ne__(self, other):
1585
    return not (self == other)
2251
    return not (self == other)
1586
 
2252
 
1587
class scanIn_args:
2253
class scanSerializedItemForOrder_args:
1588
  """
2254
  """
1589
  Attributes:
2255
  Attributes:
1590
   - purchaseId
-
 
1591
   - itemNumber
-
 
1592
   - imeiNumber
2256
   - inventoryItemId
1593
   - type
2257
   - type
-
 
2258
   - orderId
-
 
2259
   - warehouseId
1594
  """
2260
  """
1595
 
2261
 
1596
  thrift_spec = (
2262
  thrift_spec = (
1597
    None, # 0
2263
    None, # 0
1598
    (1, TType.I64, 'purchaseId', None, None, ), # 1
2264
    (1, TType.I64, 'inventoryItemId', None, None, ), # 1
1599
    (2, TType.STRING, 'itemNumber', None, None, ), # 2
2265
    (2, TType.I32, 'type', None, None, ), # 2
1600
    (3, TType.STRING, 'imeiNumber', None, None, ), # 3
2266
    (3, TType.I64, 'orderId', None, None, ), # 3
1601
    (4, TType.I32, 'type', None, None, ), # 4
2267
    (4, TType.I64, 'warehouseId', None, None, ), # 4
1602
  )
2268
  )
1603
 
2269
 
1604
  def __init__(self, purchaseId=None, itemNumber=None, imeiNumber=None, type=None,):
2270
  def __init__(self, inventoryItemId=None, type=None, orderId=None, warehouseId=None,):
1605
    self.purchaseId = purchaseId
2271
    self.inventoryItemId = inventoryItemId
1606
    self.itemNumber = itemNumber
-
 
1607
    self.imeiNumber = imeiNumber
-
 
1608
    self.type = type
2272
    self.type = type
-
 
2273
    self.orderId = orderId
-
 
2274
    self.warehouseId = warehouseId
1609
 
2275
 
1610
  def read(self, iprot):
2276
  def read(self, iprot):
1611
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
2277
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1612
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
2278
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1613
      return
2279
      return
Line 1616... Line 2282...
1616
      (fname, ftype, fid) = iprot.readFieldBegin()
2282
      (fname, ftype, fid) = iprot.readFieldBegin()
1617
      if ftype == TType.STOP:
2283
      if ftype == TType.STOP:
1618
        break
2284
        break
1619
      if fid == 1:
2285
      if fid == 1:
1620
        if ftype == TType.I64:
2286
        if ftype == TType.I64:
1621
          self.purchaseId = iprot.readI64();
2287
          self.inventoryItemId = iprot.readI64();
1622
        else:
2288
        else:
1623
          iprot.skip(ftype)
2289
          iprot.skip(ftype)
1624
      elif fid == 2:
2290
      elif fid == 2:
1625
        if ftype == TType.STRING:
2291
        if ftype == TType.I32:
1626
          self.itemNumber = iprot.readString();
2292
          self.type = iprot.readI32();
1627
        else:
2293
        else:
1628
          iprot.skip(ftype)
2294
          iprot.skip(ftype)
1629
      elif fid == 3:
2295
      elif fid == 3:
1630
        if ftype == TType.STRING:
2296
        if ftype == TType.I64:
1631
          self.imeiNumber = iprot.readString();
2297
          self.orderId = iprot.readI64();
1632
        else:
2298
        else:
1633
          iprot.skip(ftype)
2299
          iprot.skip(ftype)
1634
      elif fid == 4:
2300
      elif fid == 4:
1635
        if ftype == TType.I32:
2301
        if ftype == TType.I64:
1636
          self.type = iprot.readI32();
2302
          self.warehouseId = iprot.readI64();
1637
        else:
2303
        else:
1638
          iprot.skip(ftype)
2304
          iprot.skip(ftype)
1639
      else:
2305
      else:
1640
        iprot.skip(ftype)
2306
        iprot.skip(ftype)
1641
      iprot.readFieldEnd()
2307
      iprot.readFieldEnd()
Line 1643... Line 2309...
1643
 
2309
 
1644
  def write(self, oprot):
2310
  def write(self, oprot):
1645
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
2311
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1646
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
2312
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1647
      return
2313
      return
1648
    oprot.writeStructBegin('scanIn_args')
2314
    oprot.writeStructBegin('scanSerializedItemForOrder_args')
1649
    if self.purchaseId is not None:
2315
    if self.inventoryItemId is not None:
1650
      oprot.writeFieldBegin('purchaseId', TType.I64, 1)
2316
      oprot.writeFieldBegin('inventoryItemId', TType.I64, 1)
1651
      oprot.writeI64(self.purchaseId)
2317
      oprot.writeI64(self.inventoryItemId)
1652
      oprot.writeFieldEnd()
-
 
1653
    if self.itemNumber is not None:
-
 
1654
      oprot.writeFieldBegin('itemNumber', TType.STRING, 2)
-
 
1655
      oprot.writeString(self.itemNumber)
-
 
1656
      oprot.writeFieldEnd()
-
 
1657
    if self.imeiNumber is not None:
-
 
1658
      oprot.writeFieldBegin('imeiNumber', TType.STRING, 3)
-
 
1659
      oprot.writeString(self.imeiNumber)
-
 
1660
      oprot.writeFieldEnd()
2318
      oprot.writeFieldEnd()
1661
    if self.type is not None:
2319
    if self.type is not None:
1662
      oprot.writeFieldBegin('type', TType.I32, 4)
2320
      oprot.writeFieldBegin('type', TType.I32, 2)
1663
      oprot.writeI32(self.type)
2321
      oprot.writeI32(self.type)
1664
      oprot.writeFieldEnd()
2322
      oprot.writeFieldEnd()
-
 
2323
    if self.orderId is not None:
-
 
2324
      oprot.writeFieldBegin('orderId', TType.I64, 3)
-
 
2325
      oprot.writeI64(self.orderId)
-
 
2326
      oprot.writeFieldEnd()
-
 
2327
    if self.warehouseId is not None:
-
 
2328
      oprot.writeFieldBegin('warehouseId', TType.I64, 4)
-
 
2329
      oprot.writeI64(self.warehouseId)
-
 
2330
      oprot.writeFieldEnd()
1665
    oprot.writeFieldStop()
2331
    oprot.writeFieldStop()
1666
    oprot.writeStructEnd()
2332
    oprot.writeStructEnd()
1667
 
2333
 
1668
  def validate(self):
2334
  def validate(self):
1669
    return
2335
    return
Line 1678... Line 2344...
1678
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
2344
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1679
 
2345
 
1680
  def __ne__(self, other):
2346
  def __ne__(self, other):
1681
    return not (self == other)
2347
    return not (self == other)
1682
 
2348
 
1683
class scanIn_result:
2349
class scanSerializedItemForOrder_result:
1684
  """
2350
  """
1685
  Attributes:
2351
  Attributes:
-
 
2352
   - success
1686
   - wex
2353
   - wex
1687
  """
2354
  """
1688
 
2355
 
1689
  thrift_spec = (
2356
  thrift_spec = (
1690
    None, # 0
2357
    (0, TType.I64, 'success', None, None, ), # 0
1691
    (1, TType.STRUCT, 'wex', (WarehouseServiceException, WarehouseServiceException.thrift_spec), None, ), # 1
2358
    (1, TType.STRUCT, 'wex', (WarehouseServiceException, WarehouseServiceException.thrift_spec), None, ), # 1
1692
  )
2359
  )
1693
 
2360
 
1694
  def __init__(self, wex=None,):
2361
  def __init__(self, success=None, wex=None,):
-
 
2362
    self.success = success
1695
    self.wex = wex
2363
    self.wex = wex
1696
 
2364
 
1697
  def read(self, iprot):
2365
  def read(self, iprot):
1698
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
2366
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1699
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
2367
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
Line 1701... Line 2369...
1701
    iprot.readStructBegin()
2369
    iprot.readStructBegin()
1702
    while True:
2370
    while True:
1703
      (fname, ftype, fid) = iprot.readFieldBegin()
2371
      (fname, ftype, fid) = iprot.readFieldBegin()
1704
      if ftype == TType.STOP:
2372
      if ftype == TType.STOP:
1705
        break
2373
        break
1706
      if fid == 1:
2374
      if fid == 0:
-
 
2375
        if ftype == TType.I64:
-
 
2376
          self.success = iprot.readI64();
-
 
2377
        else:
-
 
2378
          iprot.skip(ftype)
-
 
2379
      elif fid == 1:
1707
        if ftype == TType.STRUCT:
2380
        if ftype == TType.STRUCT:
1708
          self.wex = WarehouseServiceException()
2381
          self.wex = WarehouseServiceException()
1709
          self.wex.read(iprot)
2382
          self.wex.read(iprot)
1710
        else:
2383
        else:
1711
          iprot.skip(ftype)
2384
          iprot.skip(ftype)
Line 1716... Line 2389...
1716
 
2389
 
1717
  def write(self, oprot):
2390
  def write(self, oprot):
1718
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
2391
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1719
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
2392
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1720
      return
2393
      return
1721
    oprot.writeStructBegin('scanIn_result')
2394
    oprot.writeStructBegin('scanSerializedItemForOrder_result')
-
 
2395
    if self.success is not None:
-
 
2396
      oprot.writeFieldBegin('success', TType.I64, 0)
-
 
2397
      oprot.writeI64(self.success)
-
 
2398
      oprot.writeFieldEnd()
1722
    if self.wex is not None:
2399
    if self.wex is not None:
1723
      oprot.writeFieldBegin('wex', TType.STRUCT, 1)
2400
      oprot.writeFieldBegin('wex', TType.STRUCT, 1)
1724
      self.wex.write(oprot)
2401
      self.wex.write(oprot)
1725
      oprot.writeFieldEnd()
2402
      oprot.writeFieldEnd()
1726
    oprot.writeFieldStop()
2403
    oprot.writeFieldStop()
Line 1739... Line 2416...
1739
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
2416
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1740
 
2417
 
1741
  def __ne__(self, other):
2418
  def __ne__(self, other):
1742
    return not (self == other)
2419
    return not (self == other)
1743
 
2420
 
1744
class scanOut_args:
2421
class scanForOrder_args:
1745
  """
2422
  """
1746
  Attributes:
2423
  Attributes:
1747
   - itemNumber
-
 
1748
   - imeiNumber
2424
   - inventoryItemId
1749
   - type
2425
   - type
-
 
2426
   - quantity
-
 
2427
   - orderId
-
 
2428
   - warehouseId
1750
  """
2429
  """
1751
 
2430
 
1752
  thrift_spec = (
2431
  thrift_spec = (
1753
    None, # 0
2432
    None, # 0
1754
    (1, TType.STRING, 'itemNumber', None, None, ), # 1
2433
    (1, TType.I64, 'inventoryItemId', None, None, ), # 1
1755
    (2, TType.STRING, 'imeiNumber', None, None, ), # 2
2434
    (2, TType.I32, 'type', None, None, ), # 2
1756
    (3, TType.I32, 'type', None, None, ), # 3
2435
    (3, TType.I64, 'quantity', None, None, ), # 3
-
 
2436
    (4, TType.I64, 'orderId', None, None, ), # 4
-
 
2437
    (5, TType.I64, 'warehouseId', None, None, ), # 5
1757
  )
2438
  )
1758
 
2439
 
1759
  def __init__(self, itemNumber=None, imeiNumber=None, type=None,):
2440
  def __init__(self, inventoryItemId=None, type=None, quantity=None, orderId=None, warehouseId=None,):
1760
    self.itemNumber = itemNumber
2441
    self.inventoryItemId = inventoryItemId
1761
    self.imeiNumber = imeiNumber
-
 
1762
    self.type = type
2442
    self.type = type
-
 
2443
    self.quantity = quantity
-
 
2444
    self.orderId = orderId
-
 
2445
    self.warehouseId = warehouseId
1763
 
2446
 
1764
  def read(self, iprot):
2447
  def read(self, iprot):
1765
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
2448
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
1766
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
2449
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
1767
      return
2450
      return
Line 1769... Line 2452...
1769
    while True:
2452
    while True:
1770
      (fname, ftype, fid) = iprot.readFieldBegin()
2453
      (fname, ftype, fid) = iprot.readFieldBegin()
1771
      if ftype == TType.STOP:
2454
      if ftype == TType.STOP:
1772
        break
2455
        break
1773
      if fid == 1:
2456
      if fid == 1:
1774
        if ftype == TType.STRING:
2457
        if ftype == TType.I64:
1775
          self.itemNumber = iprot.readString();
2458
          self.inventoryItemId = iprot.readI64();
1776
        else:
2459
        else:
1777
          iprot.skip(ftype)
2460
          iprot.skip(ftype)
1778
      elif fid == 2:
2461
      elif fid == 2:
1779
        if ftype == TType.STRING:
2462
        if ftype == TType.I32:
1780
          self.imeiNumber = iprot.readString();
2463
          self.type = iprot.readI32();
1781
        else:
2464
        else:
1782
          iprot.skip(ftype)
2465
          iprot.skip(ftype)
1783
      elif fid == 3:
2466
      elif fid == 3:
1784
        if ftype == TType.I32:
2467
        if ftype == TType.I64:
-
 
2468
          self.quantity = iprot.readI64();
-
 
2469
        else:
-
 
2470
          iprot.skip(ftype)
-
 
2471
      elif fid == 4:
-
 
2472
        if ftype == TType.I64:
1785
          self.type = iprot.readI32();
2473
          self.orderId = iprot.readI64();
-
 
2474
        else:
-
 
2475
          iprot.skip(ftype)
-
 
2476
      elif fid == 5:
-
 
2477
        if ftype == TType.I64:
-
 
2478
          self.warehouseId = iprot.readI64();
1786
        else:
2479
        else:
1787
          iprot.skip(ftype)
2480
          iprot.skip(ftype)
1788
      else:
2481
      else:
1789
        iprot.skip(ftype)
2482
        iprot.skip(ftype)
1790
      iprot.readFieldEnd()
2483
      iprot.readFieldEnd()
Line 1792... Line 2485...
1792
 
2485
 
1793
  def write(self, oprot):
2486
  def write(self, oprot):
1794
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
2487
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1795
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
2488
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1796
      return
2489
      return
1797
    oprot.writeStructBegin('scanOut_args')
2490
    oprot.writeStructBegin('scanForOrder_args')
1798
    if self.itemNumber is not None:
2491
    if self.inventoryItemId is not None:
1799
      oprot.writeFieldBegin('itemNumber', TType.STRING, 1)
2492
      oprot.writeFieldBegin('inventoryItemId', TType.I64, 1)
1800
      oprot.writeString(self.itemNumber)
-
 
1801
      oprot.writeFieldEnd()
-
 
1802
    if self.imeiNumber is not None:
-
 
1803
      oprot.writeFieldBegin('imeiNumber', TType.STRING, 2)
-
 
1804
      oprot.writeString(self.imeiNumber)
2493
      oprot.writeI64(self.inventoryItemId)
1805
      oprot.writeFieldEnd()
2494
      oprot.writeFieldEnd()
1806
    if self.type is not None:
2495
    if self.type is not None:
1807
      oprot.writeFieldBegin('type', TType.I32, 3)
2496
      oprot.writeFieldBegin('type', TType.I32, 2)
1808
      oprot.writeI32(self.type)
2497
      oprot.writeI32(self.type)
1809
      oprot.writeFieldEnd()
2498
      oprot.writeFieldEnd()
-
 
2499
    if self.quantity is not None:
-
 
2500
      oprot.writeFieldBegin('quantity', TType.I64, 3)
-
 
2501
      oprot.writeI64(self.quantity)
-
 
2502
      oprot.writeFieldEnd()
-
 
2503
    if self.orderId is not None:
-
 
2504
      oprot.writeFieldBegin('orderId', TType.I64, 4)
-
 
2505
      oprot.writeI64(self.orderId)
-
 
2506
      oprot.writeFieldEnd()
-
 
2507
    if self.warehouseId is not None:
-
 
2508
      oprot.writeFieldBegin('warehouseId', TType.I64, 5)
-
 
2509
      oprot.writeI64(self.warehouseId)
-
 
2510
      oprot.writeFieldEnd()
1810
    oprot.writeFieldStop()
2511
    oprot.writeFieldStop()
1811
    oprot.writeStructEnd()
2512
    oprot.writeStructEnd()
1812
 
2513
 
1813
  def validate(self):
2514
  def validate(self):
1814
    return
2515
    return
Line 1823... Line 2524...
1823
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
2524
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
1824
 
2525
 
1825
  def __ne__(self, other):
2526
  def __ne__(self, other):
1826
    return not (self == other)
2527
    return not (self == other)
1827
 
2528
 
1828
class scanOut_result:
2529
class scanForOrder_result:
1829
  """
2530
  """
1830
  Attributes:
2531
  Attributes:
1831
   - wex
2532
   - wex
1832
  """
2533
  """
1833
 
2534
 
Line 1861... Line 2562...
1861
 
2562
 
1862
  def write(self, oprot):
2563
  def write(self, oprot):
1863
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
2564
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
1864
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
2565
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
1865
      return
2566
      return
1866
    oprot.writeStructBegin('scanOut_result')
2567
    oprot.writeStructBegin('scanForOrder_result')
1867
    if self.wex is not None:
2568
    if self.wex is not None:
1868
      oprot.writeFieldBegin('wex', TType.STRUCT, 1)
2569
      oprot.writeFieldBegin('wex', TType.STRUCT, 1)
1869
      self.wex.write(oprot)
2570
      self.wex.write(oprot)
1870
      oprot.writeFieldEnd()
2571
      oprot.writeFieldEnd()
1871
    oprot.writeFieldStop()
2572
    oprot.writeFieldStop()
1872
    oprot.writeStructEnd()
2573
    oprot.writeStructEnd()
1873
 
2574
 
1874
  def validate(self):
2575
  def validate(self):
1875
    return
2576
    return
-
 
2577
 
-
 
2578
 
-
 
2579
  def __repr__(self):
-
 
2580
    L = ['%s=%r' % (key, value)
-
 
2581
      for key, value in self.__dict__.iteritems()]
-
 
2582
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
2583
 
-
 
2584
  def __eq__(self, other):
-
 
2585
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
2586
 
-
 
2587
  def __ne__(self, other):
-
 
2588
    return not (self == other)
-
 
2589
 
-
 
2590
class createItemNumberMapping_args:
-
 
2591
  """
-
 
2592
  Attributes:
-
 
2593
   - itemNumber
-
 
2594
   - itemId
-
 
2595
  """
-
 
2596
 
-
 
2597
  thrift_spec = (
-
 
2598
    None, # 0
-
 
2599
    (1, TType.STRING, 'itemNumber', None, None, ), # 1
-
 
2600
    (2, TType.I64, 'itemId', None, None, ), # 2
-
 
2601
  )
-
 
2602
 
-
 
2603
  def __init__(self, itemNumber=None, itemId=None,):
-
 
2604
    self.itemNumber = itemNumber
-
 
2605
    self.itemId = itemId
-
 
2606
 
-
 
2607
  def read(self, iprot):
-
 
2608
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
2609
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
2610
      return
-
 
2611
    iprot.readStructBegin()
-
 
2612
    while True:
-
 
2613
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
2614
      if ftype == TType.STOP:
-
 
2615
        break
-
 
2616
      if fid == 1:
-
 
2617
        if ftype == TType.STRING:
-
 
2618
          self.itemNumber = iprot.readString();
-
 
2619
        else:
-
 
2620
          iprot.skip(ftype)
-
 
2621
      elif fid == 2:
-
 
2622
        if ftype == TType.I64:
-
 
2623
          self.itemId = iprot.readI64();
-
 
2624
        else:
-
 
2625
          iprot.skip(ftype)
-
 
2626
      else:
-
 
2627
        iprot.skip(ftype)
-
 
2628
      iprot.readFieldEnd()
-
 
2629
    iprot.readStructEnd()
-
 
2630
 
-
 
2631
  def write(self, oprot):
-
 
2632
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
2633
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
2634
      return
-
 
2635
    oprot.writeStructBegin('createItemNumberMapping_args')
-
 
2636
    if self.itemNumber is not None:
-
 
2637
      oprot.writeFieldBegin('itemNumber', TType.STRING, 1)
-
 
2638
      oprot.writeString(self.itemNumber)
-
 
2639
      oprot.writeFieldEnd()
-
 
2640
    if self.itemId is not None:
-
 
2641
      oprot.writeFieldBegin('itemId', TType.I64, 2)
-
 
2642
      oprot.writeI64(self.itemId)
-
 
2643
      oprot.writeFieldEnd()
-
 
2644
    oprot.writeFieldStop()
-
 
2645
    oprot.writeStructEnd()
-
 
2646
 
-
 
2647
  def validate(self):
-
 
2648
    return
-
 
2649
 
-
 
2650
 
-
 
2651
  def __repr__(self):
-
 
2652
    L = ['%s=%r' % (key, value)
-
 
2653
      for key, value in self.__dict__.iteritems()]
-
 
2654
    return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
-
 
2655
 
-
 
2656
  def __eq__(self, other):
-
 
2657
    return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
-
 
2658
 
-
 
2659
  def __ne__(self, other):
-
 
2660
    return not (self == other)
-
 
2661
 
-
 
2662
class createItemNumberMapping_result:
-
 
2663
 
-
 
2664
  thrift_spec = (
-
 
2665
  )
-
 
2666
 
-
 
2667
  def read(self, iprot):
-
 
2668
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
-
 
2669
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
-
 
2670
      return
-
 
2671
    iprot.readStructBegin()
-
 
2672
    while True:
-
 
2673
      (fname, ftype, fid) = iprot.readFieldBegin()
-
 
2674
      if ftype == TType.STOP:
-
 
2675
        break
-
 
2676
      else:
-
 
2677
        iprot.skip(ftype)
-
 
2678
      iprot.readFieldEnd()
-
 
2679
    iprot.readStructEnd()
-
 
2680
 
-
 
2681
  def write(self, oprot):
-
 
2682
    if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
-
 
2683
      oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
-
 
2684
      return
-
 
2685
    oprot.writeStructBegin('createItemNumberMapping_result')
-
 
2686
    oprot.writeFieldStop()
-
 
2687
    oprot.writeStructEnd()
-
 
2688
 
-
 
2689
  def validate(self):
-
 
2690
    return
1876
 
2691
 
1877
 
2692
 
1878
  def __repr__(self):
2693
  def __repr__(self):
1879
    L = ['%s=%r' % (key, value)
2694
    L = ['%s=%r' % (key, value)
1880
      for key, value in self.__dict__.iteritems()]
2695
      for key, value in self.__dict__.iteritems()]