| 4502 |
mandeep.dh |
1 |
#
|
|
|
2 |
# Autogenerated by Thrift Compiler (0.7.0)
|
|
|
3 |
#
|
|
|
4 |
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
|
|
|
5 |
#
|
|
|
6 |
|
|
|
7 |
from thrift.Thrift import *
|
|
|
8 |
import shop2020.thriftpy.generic.GenericService
|
|
|
9 |
from ttypes import *
|
|
|
10 |
from thrift.Thrift import TProcessor
|
|
|
11 |
from thrift.transport import TTransport
|
|
|
12 |
from thrift.protocol import TBinaryProtocol, TProtocol
|
|
|
13 |
try:
|
|
|
14 |
from thrift.protocol import fastbinary
|
|
|
15 |
except:
|
|
|
16 |
fastbinary = None
|
|
|
17 |
|
|
|
18 |
|
|
|
19 |
class Iface(shop2020.thriftpy.generic.GenericService.Iface):
|
|
|
20 |
def createPurchaseOrder(self, purchaseOrder):
|
|
|
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
|
|
|
24 |
|
|
|
25 |
Parameters:
|
|
|
26 |
- purchaseOrder
|
|
|
27 |
"""
|
|
|
28 |
pass
|
|
|
29 |
|
|
|
30 |
def getPurchaseOrder(self, id):
|
|
|
31 |
"""
|
|
|
32 |
Returns the purchase order with the given id. Throws an exception if there is no such purchase order.
|
|
|
33 |
|
|
|
34 |
Parameters:
|
|
|
35 |
- id
|
|
|
36 |
"""
|
|
|
37 |
pass
|
|
|
38 |
|
|
|
39 |
def getAllPurchaseOrders(self, status):
|
|
|
40 |
"""
|
|
|
41 |
Returns a list of all the purchase orders in the given state
|
|
|
42 |
|
|
|
43 |
Parameters:
|
|
|
44 |
- status
|
|
|
45 |
"""
|
|
|
46 |
pass
|
|
|
47 |
|
|
|
48 |
def getSupplier(self, id):
|
|
|
49 |
"""
|
|
|
50 |
Returns the supplier with the given order id. Throws an exception if there is no such supplier.
|
|
|
51 |
|
|
|
52 |
Parameters:
|
|
|
53 |
- id
|
|
|
54 |
"""
|
|
|
55 |
pass
|
|
|
56 |
|
|
|
57 |
def startPurchase(self, purchaseOrderId, invoiceNumber, freightCharges):
|
|
|
58 |
"""
|
|
|
59 |
Creates a purchase for the given purchase order.
|
|
|
60 |
Throws an exception if no more purchases are allowed against the given purchase order.
|
|
|
61 |
|
|
|
62 |
Parameters:
|
|
|
63 |
- purchaseOrderId
|
|
|
64 |
- invoiceNumber
|
|
|
65 |
- freightCharges
|
|
|
66 |
"""
|
|
|
67 |
pass
|
|
|
68 |
|
|
|
69 |
def closePurchase(self, purchaseId):
|
|
|
70 |
"""
|
|
|
71 |
Marks a purchase as complete and updates the receivedOn time.
|
|
|
72 |
Throws an exception if no such purchase exists.
|
|
|
73 |
|
|
|
74 |
Parameters:
|
|
|
75 |
- purchaseId
|
|
|
76 |
"""
|
|
|
77 |
pass
|
|
|
78 |
|
|
|
79 |
def getAllPurchases(self, purchaseOrderId, open):
|
|
|
80 |
"""
|
|
|
81 |
Returns all open or closed purchases for the given purchase order. Throws an exception if no such purchase order exists
|
|
|
82 |
|
|
|
83 |
Parameters:
|
|
|
84 |
- purchaseOrderId
|
|
|
85 |
- open
|
|
|
86 |
"""
|
|
|
87 |
pass
|
|
|
88 |
|
| 4555 |
mandeep.dh |
89 |
def getPurchaseOrderForPurchase(self, purchaseId):
|
| 4502 |
mandeep.dh |
90 |
"""
|
| 4555 |
mandeep.dh |
91 |
Returns the purchase order object for a given purchase
|
| 4502 |
mandeep.dh |
92 |
|
|
|
93 |
Parameters:
|
|
|
94 |
- purchaseId
|
|
|
95 |
"""
|
|
|
96 |
pass
|
|
|
97 |
|
|
|
98 |
|
|
|
99 |
class Client(shop2020.thriftpy.generic.GenericService.Client, Iface):
|
|
|
100 |
def __init__(self, iprot, oprot=None):
|
|
|
101 |
shop2020.thriftpy.generic.GenericService.Client.__init__(self, iprot, oprot)
|
|
|
102 |
|
|
|
103 |
def createPurchaseOrder(self, purchaseOrder):
|
|
|
104 |
"""
|
|
|
105 |
Creates a purchase order based on the data in the given purchase order object.
|
|
|
106 |
This method populates a nummber of missing fields
|
|
|
107 |
|
|
|
108 |
Parameters:
|
|
|
109 |
- purchaseOrder
|
|
|
110 |
"""
|
|
|
111 |
self.send_createPurchaseOrder(purchaseOrder)
|
|
|
112 |
return self.recv_createPurchaseOrder()
|
|
|
113 |
|
|
|
114 |
def send_createPurchaseOrder(self, purchaseOrder):
|
|
|
115 |
self._oprot.writeMessageBegin('createPurchaseOrder', TMessageType.CALL, self._seqid)
|
|
|
116 |
args = createPurchaseOrder_args()
|
|
|
117 |
args.purchaseOrder = purchaseOrder
|
|
|
118 |
args.write(self._oprot)
|
|
|
119 |
self._oprot.writeMessageEnd()
|
|
|
120 |
self._oprot.trans.flush()
|
|
|
121 |
|
|
|
122 |
def recv_createPurchaseOrder(self, ):
|
|
|
123 |
(fname, mtype, rseqid) = self._iprot.readMessageBegin()
|
|
|
124 |
if mtype == TMessageType.EXCEPTION:
|
|
|
125 |
x = TApplicationException()
|
|
|
126 |
x.read(self._iprot)
|
|
|
127 |
self._iprot.readMessageEnd()
|
|
|
128 |
raise x
|
|
|
129 |
result = createPurchaseOrder_result()
|
|
|
130 |
result.read(self._iprot)
|
|
|
131 |
self._iprot.readMessageEnd()
|
|
|
132 |
if result.success is not None:
|
|
|
133 |
return result.success
|
|
|
134 |
if result.e is not None:
|
|
|
135 |
raise result.e
|
|
|
136 |
raise TApplicationException(TApplicationException.MISSING_RESULT, "createPurchaseOrder failed: unknown result");
|
|
|
137 |
|
|
|
138 |
def getPurchaseOrder(self, id):
|
|
|
139 |
"""
|
|
|
140 |
Returns the purchase order with the given id. Throws an exception if there is no such purchase order.
|
|
|
141 |
|
|
|
142 |
Parameters:
|
|
|
143 |
- id
|
|
|
144 |
"""
|
|
|
145 |
self.send_getPurchaseOrder(id)
|
|
|
146 |
return self.recv_getPurchaseOrder()
|
|
|
147 |
|
|
|
148 |
def send_getPurchaseOrder(self, id):
|
|
|
149 |
self._oprot.writeMessageBegin('getPurchaseOrder', TMessageType.CALL, self._seqid)
|
|
|
150 |
args = getPurchaseOrder_args()
|
|
|
151 |
args.id = id
|
|
|
152 |
args.write(self._oprot)
|
|
|
153 |
self._oprot.writeMessageEnd()
|
|
|
154 |
self._oprot.trans.flush()
|
|
|
155 |
|
|
|
156 |
def recv_getPurchaseOrder(self, ):
|
|
|
157 |
(fname, mtype, rseqid) = self._iprot.readMessageBegin()
|
|
|
158 |
if mtype == TMessageType.EXCEPTION:
|
|
|
159 |
x = TApplicationException()
|
|
|
160 |
x.read(self._iprot)
|
|
|
161 |
self._iprot.readMessageEnd()
|
|
|
162 |
raise x
|
|
|
163 |
result = getPurchaseOrder_result()
|
|
|
164 |
result.read(self._iprot)
|
|
|
165 |
self._iprot.readMessageEnd()
|
|
|
166 |
if result.success is not None:
|
|
|
167 |
return result.success
|
|
|
168 |
if result.e is not None:
|
|
|
169 |
raise result.e
|
|
|
170 |
raise TApplicationException(TApplicationException.MISSING_RESULT, "getPurchaseOrder failed: unknown result");
|
|
|
171 |
|
|
|
172 |
def getAllPurchaseOrders(self, status):
|
|
|
173 |
"""
|
|
|
174 |
Returns a list of all the purchase orders in the given state
|
|
|
175 |
|
|
|
176 |
Parameters:
|
|
|
177 |
- status
|
|
|
178 |
"""
|
|
|
179 |
self.send_getAllPurchaseOrders(status)
|
|
|
180 |
return self.recv_getAllPurchaseOrders()
|
|
|
181 |
|
|
|
182 |
def send_getAllPurchaseOrders(self, status):
|
|
|
183 |
self._oprot.writeMessageBegin('getAllPurchaseOrders', TMessageType.CALL, self._seqid)
|
|
|
184 |
args = getAllPurchaseOrders_args()
|
|
|
185 |
args.status = status
|
|
|
186 |
args.write(self._oprot)
|
|
|
187 |
self._oprot.writeMessageEnd()
|
|
|
188 |
self._oprot.trans.flush()
|
|
|
189 |
|
|
|
190 |
def recv_getAllPurchaseOrders(self, ):
|
|
|
191 |
(fname, mtype, rseqid) = self._iprot.readMessageBegin()
|
|
|
192 |
if mtype == TMessageType.EXCEPTION:
|
|
|
193 |
x = TApplicationException()
|
|
|
194 |
x.read(self._iprot)
|
|
|
195 |
self._iprot.readMessageEnd()
|
|
|
196 |
raise x
|
|
|
197 |
result = getAllPurchaseOrders_result()
|
|
|
198 |
result.read(self._iprot)
|
|
|
199 |
self._iprot.readMessageEnd()
|
|
|
200 |
if result.success is not None:
|
|
|
201 |
return result.success
|
|
|
202 |
if result.e is not None:
|
|
|
203 |
raise result.e
|
|
|
204 |
raise TApplicationException(TApplicationException.MISSING_RESULT, "getAllPurchaseOrders failed: unknown result");
|
|
|
205 |
|
|
|
206 |
def getSupplier(self, id):
|
|
|
207 |
"""
|
|
|
208 |
Returns the supplier with the given order id. Throws an exception if there is no such supplier.
|
|
|
209 |
|
|
|
210 |
Parameters:
|
|
|
211 |
- id
|
|
|
212 |
"""
|
|
|
213 |
self.send_getSupplier(id)
|
|
|
214 |
return self.recv_getSupplier()
|
|
|
215 |
|
|
|
216 |
def send_getSupplier(self, id):
|
|
|
217 |
self._oprot.writeMessageBegin('getSupplier', TMessageType.CALL, self._seqid)
|
|
|
218 |
args = getSupplier_args()
|
|
|
219 |
args.id = id
|
|
|
220 |
args.write(self._oprot)
|
|
|
221 |
self._oprot.writeMessageEnd()
|
|
|
222 |
self._oprot.trans.flush()
|
|
|
223 |
|
|
|
224 |
def recv_getSupplier(self, ):
|
|
|
225 |
(fname, mtype, rseqid) = self._iprot.readMessageBegin()
|
|
|
226 |
if mtype == TMessageType.EXCEPTION:
|
|
|
227 |
x = TApplicationException()
|
|
|
228 |
x.read(self._iprot)
|
|
|
229 |
self._iprot.readMessageEnd()
|
|
|
230 |
raise x
|
|
|
231 |
result = getSupplier_result()
|
|
|
232 |
result.read(self._iprot)
|
|
|
233 |
self._iprot.readMessageEnd()
|
|
|
234 |
if result.success is not None:
|
|
|
235 |
return result.success
|
|
|
236 |
if result.e is not None:
|
|
|
237 |
raise result.e
|
|
|
238 |
raise TApplicationException(TApplicationException.MISSING_RESULT, "getSupplier failed: unknown result");
|
|
|
239 |
|
|
|
240 |
def startPurchase(self, purchaseOrderId, invoiceNumber, freightCharges):
|
|
|
241 |
"""
|
|
|
242 |
Creates a purchase for the given purchase order.
|
|
|
243 |
Throws an exception if no more purchases are allowed against the given purchase order.
|
|
|
244 |
|
|
|
245 |
Parameters:
|
|
|
246 |
- purchaseOrderId
|
|
|
247 |
- invoiceNumber
|
|
|
248 |
- freightCharges
|
|
|
249 |
"""
|
|
|
250 |
self.send_startPurchase(purchaseOrderId, invoiceNumber, freightCharges)
|
|
|
251 |
return self.recv_startPurchase()
|
|
|
252 |
|
|
|
253 |
def send_startPurchase(self, purchaseOrderId, invoiceNumber, freightCharges):
|
|
|
254 |
self._oprot.writeMessageBegin('startPurchase', TMessageType.CALL, self._seqid)
|
|
|
255 |
args = startPurchase_args()
|
|
|
256 |
args.purchaseOrderId = purchaseOrderId
|
|
|
257 |
args.invoiceNumber = invoiceNumber
|
|
|
258 |
args.freightCharges = freightCharges
|
|
|
259 |
args.write(self._oprot)
|
|
|
260 |
self._oprot.writeMessageEnd()
|
|
|
261 |
self._oprot.trans.flush()
|
|
|
262 |
|
|
|
263 |
def recv_startPurchase(self, ):
|
|
|
264 |
(fname, mtype, rseqid) = self._iprot.readMessageBegin()
|
|
|
265 |
if mtype == TMessageType.EXCEPTION:
|
|
|
266 |
x = TApplicationException()
|
|
|
267 |
x.read(self._iprot)
|
|
|
268 |
self._iprot.readMessageEnd()
|
|
|
269 |
raise x
|
|
|
270 |
result = startPurchase_result()
|
|
|
271 |
result.read(self._iprot)
|
|
|
272 |
self._iprot.readMessageEnd()
|
|
|
273 |
if result.success is not None:
|
|
|
274 |
return result.success
|
|
|
275 |
if result.e is not None:
|
|
|
276 |
raise result.e
|
|
|
277 |
raise TApplicationException(TApplicationException.MISSING_RESULT, "startPurchase failed: unknown result");
|
|
|
278 |
|
|
|
279 |
def closePurchase(self, purchaseId):
|
|
|
280 |
"""
|
|
|
281 |
Marks a purchase as complete and updates the receivedOn time.
|
|
|
282 |
Throws an exception if no such purchase exists.
|
|
|
283 |
|
|
|
284 |
Parameters:
|
|
|
285 |
- purchaseId
|
|
|
286 |
"""
|
|
|
287 |
self.send_closePurchase(purchaseId)
|
|
|
288 |
return self.recv_closePurchase()
|
|
|
289 |
|
|
|
290 |
def send_closePurchase(self, purchaseId):
|
|
|
291 |
self._oprot.writeMessageBegin('closePurchase', TMessageType.CALL, self._seqid)
|
|
|
292 |
args = closePurchase_args()
|
|
|
293 |
args.purchaseId = purchaseId
|
|
|
294 |
args.write(self._oprot)
|
|
|
295 |
self._oprot.writeMessageEnd()
|
|
|
296 |
self._oprot.trans.flush()
|
|
|
297 |
|
|
|
298 |
def recv_closePurchase(self, ):
|
|
|
299 |
(fname, mtype, rseqid) = self._iprot.readMessageBegin()
|
|
|
300 |
if mtype == TMessageType.EXCEPTION:
|
|
|
301 |
x = TApplicationException()
|
|
|
302 |
x.read(self._iprot)
|
|
|
303 |
self._iprot.readMessageEnd()
|
|
|
304 |
raise x
|
|
|
305 |
result = closePurchase_result()
|
|
|
306 |
result.read(self._iprot)
|
|
|
307 |
self._iprot.readMessageEnd()
|
|
|
308 |
if result.success is not None:
|
|
|
309 |
return result.success
|
|
|
310 |
if result.e is not None:
|
|
|
311 |
raise result.e
|
|
|
312 |
raise TApplicationException(TApplicationException.MISSING_RESULT, "closePurchase failed: unknown result");
|
|
|
313 |
|
|
|
314 |
def getAllPurchases(self, purchaseOrderId, open):
|
|
|
315 |
"""
|
|
|
316 |
Returns all open or closed purchases for the given purchase order. Throws an exception if no such purchase order exists
|
|
|
317 |
|
|
|
318 |
Parameters:
|
|
|
319 |
- purchaseOrderId
|
|
|
320 |
- open
|
|
|
321 |
"""
|
|
|
322 |
self.send_getAllPurchases(purchaseOrderId, open)
|
|
|
323 |
return self.recv_getAllPurchases()
|
|
|
324 |
|
|
|
325 |
def send_getAllPurchases(self, purchaseOrderId, open):
|
|
|
326 |
self._oprot.writeMessageBegin('getAllPurchases', TMessageType.CALL, self._seqid)
|
|
|
327 |
args = getAllPurchases_args()
|
|
|
328 |
args.purchaseOrderId = purchaseOrderId
|
|
|
329 |
args.open = open
|
|
|
330 |
args.write(self._oprot)
|
|
|
331 |
self._oprot.writeMessageEnd()
|
|
|
332 |
self._oprot.trans.flush()
|
|
|
333 |
|
|
|
334 |
def recv_getAllPurchases(self, ):
|
|
|
335 |
(fname, mtype, rseqid) = self._iprot.readMessageBegin()
|
|
|
336 |
if mtype == TMessageType.EXCEPTION:
|
|
|
337 |
x = TApplicationException()
|
|
|
338 |
x.read(self._iprot)
|
|
|
339 |
self._iprot.readMessageEnd()
|
|
|
340 |
raise x
|
|
|
341 |
result = getAllPurchases_result()
|
|
|
342 |
result.read(self._iprot)
|
|
|
343 |
self._iprot.readMessageEnd()
|
|
|
344 |
if result.success is not None:
|
|
|
345 |
return result.success
|
|
|
346 |
if result.e is not None:
|
|
|
347 |
raise result.e
|
|
|
348 |
raise TApplicationException(TApplicationException.MISSING_RESULT, "getAllPurchases failed: unknown result");
|
|
|
349 |
|
| 4555 |
mandeep.dh |
350 |
def getPurchaseOrderForPurchase(self, purchaseId):
|
| 4502 |
mandeep.dh |
351 |
"""
|
| 4555 |
mandeep.dh |
352 |
Returns the purchase order object for a given purchase
|
| 4502 |
mandeep.dh |
353 |
|
|
|
354 |
Parameters:
|
|
|
355 |
- purchaseId
|
|
|
356 |
"""
|
| 4555 |
mandeep.dh |
357 |
self.send_getPurchaseOrderForPurchase(purchaseId)
|
|
|
358 |
return self.recv_getPurchaseOrderForPurchase()
|
| 4502 |
mandeep.dh |
359 |
|
| 4555 |
mandeep.dh |
360 |
def send_getPurchaseOrderForPurchase(self, purchaseId):
|
|
|
361 |
self._oprot.writeMessageBegin('getPurchaseOrderForPurchase', TMessageType.CALL, self._seqid)
|
|
|
362 |
args = getPurchaseOrderForPurchase_args()
|
| 4502 |
mandeep.dh |
363 |
args.purchaseId = purchaseId
|
|
|
364 |
args.write(self._oprot)
|
|
|
365 |
self._oprot.writeMessageEnd()
|
|
|
366 |
self._oprot.trans.flush()
|
|
|
367 |
|
| 4555 |
mandeep.dh |
368 |
def recv_getPurchaseOrderForPurchase(self, ):
|
| 4502 |
mandeep.dh |
369 |
(fname, mtype, rseqid) = self._iprot.readMessageBegin()
|
|
|
370 |
if mtype == TMessageType.EXCEPTION:
|
|
|
371 |
x = TApplicationException()
|
|
|
372 |
x.read(self._iprot)
|
|
|
373 |
self._iprot.readMessageEnd()
|
|
|
374 |
raise x
|
| 4555 |
mandeep.dh |
375 |
result = getPurchaseOrderForPurchase_result()
|
| 4502 |
mandeep.dh |
376 |
result.read(self._iprot)
|
|
|
377 |
self._iprot.readMessageEnd()
|
|
|
378 |
if result.success is not None:
|
|
|
379 |
return result.success
|
| 4555 |
mandeep.dh |
380 |
raise TApplicationException(TApplicationException.MISSING_RESULT, "getPurchaseOrderForPurchase failed: unknown result");
|
| 4502 |
mandeep.dh |
381 |
|
|
|
382 |
|
|
|
383 |
class Processor(shop2020.thriftpy.generic.GenericService.Processor, Iface, TProcessor):
|
|
|
384 |
def __init__(self, handler):
|
|
|
385 |
shop2020.thriftpy.generic.GenericService.Processor.__init__(self, handler)
|
|
|
386 |
self._processMap["createPurchaseOrder"] = Processor.process_createPurchaseOrder
|
|
|
387 |
self._processMap["getPurchaseOrder"] = Processor.process_getPurchaseOrder
|
|
|
388 |
self._processMap["getAllPurchaseOrders"] = Processor.process_getAllPurchaseOrders
|
|
|
389 |
self._processMap["getSupplier"] = Processor.process_getSupplier
|
|
|
390 |
self._processMap["startPurchase"] = Processor.process_startPurchase
|
|
|
391 |
self._processMap["closePurchase"] = Processor.process_closePurchase
|
|
|
392 |
self._processMap["getAllPurchases"] = Processor.process_getAllPurchases
|
| 4555 |
mandeep.dh |
393 |
self._processMap["getPurchaseOrderForPurchase"] = Processor.process_getPurchaseOrderForPurchase
|
| 4502 |
mandeep.dh |
394 |
|
|
|
395 |
def process(self, iprot, oprot):
|
|
|
396 |
(name, type, seqid) = iprot.readMessageBegin()
|
|
|
397 |
if name not in self._processMap:
|
|
|
398 |
iprot.skip(TType.STRUCT)
|
|
|
399 |
iprot.readMessageEnd()
|
|
|
400 |
x = TApplicationException(TApplicationException.UNKNOWN_METHOD, 'Unknown function %s' % (name))
|
|
|
401 |
oprot.writeMessageBegin(name, TMessageType.EXCEPTION, seqid)
|
|
|
402 |
x.write(oprot)
|
|
|
403 |
oprot.writeMessageEnd()
|
|
|
404 |
oprot.trans.flush()
|
|
|
405 |
return
|
|
|
406 |
else:
|
|
|
407 |
self._processMap[name](self, seqid, iprot, oprot)
|
|
|
408 |
return True
|
|
|
409 |
|
|
|
410 |
def process_createPurchaseOrder(self, seqid, iprot, oprot):
|
|
|
411 |
args = createPurchaseOrder_args()
|
|
|
412 |
args.read(iprot)
|
|
|
413 |
iprot.readMessageEnd()
|
|
|
414 |
result = createPurchaseOrder_result()
|
|
|
415 |
try:
|
|
|
416 |
result.success = self._handler.createPurchaseOrder(args.purchaseOrder)
|
|
|
417 |
except PurchaseServiceException, e:
|
|
|
418 |
result.e = e
|
|
|
419 |
oprot.writeMessageBegin("createPurchaseOrder", TMessageType.REPLY, seqid)
|
|
|
420 |
result.write(oprot)
|
|
|
421 |
oprot.writeMessageEnd()
|
|
|
422 |
oprot.trans.flush()
|
|
|
423 |
|
|
|
424 |
def process_getPurchaseOrder(self, seqid, iprot, oprot):
|
|
|
425 |
args = getPurchaseOrder_args()
|
|
|
426 |
args.read(iprot)
|
|
|
427 |
iprot.readMessageEnd()
|
|
|
428 |
result = getPurchaseOrder_result()
|
|
|
429 |
try:
|
|
|
430 |
result.success = self._handler.getPurchaseOrder(args.id)
|
|
|
431 |
except PurchaseServiceException, e:
|
|
|
432 |
result.e = e
|
|
|
433 |
oprot.writeMessageBegin("getPurchaseOrder", TMessageType.REPLY, seqid)
|
|
|
434 |
result.write(oprot)
|
|
|
435 |
oprot.writeMessageEnd()
|
|
|
436 |
oprot.trans.flush()
|
|
|
437 |
|
|
|
438 |
def process_getAllPurchaseOrders(self, seqid, iprot, oprot):
|
|
|
439 |
args = getAllPurchaseOrders_args()
|
|
|
440 |
args.read(iprot)
|
|
|
441 |
iprot.readMessageEnd()
|
|
|
442 |
result = getAllPurchaseOrders_result()
|
|
|
443 |
try:
|
|
|
444 |
result.success = self._handler.getAllPurchaseOrders(args.status)
|
|
|
445 |
except PurchaseServiceException, e:
|
|
|
446 |
result.e = e
|
|
|
447 |
oprot.writeMessageBegin("getAllPurchaseOrders", TMessageType.REPLY, seqid)
|
|
|
448 |
result.write(oprot)
|
|
|
449 |
oprot.writeMessageEnd()
|
|
|
450 |
oprot.trans.flush()
|
|
|
451 |
|
|
|
452 |
def process_getSupplier(self, seqid, iprot, oprot):
|
|
|
453 |
args = getSupplier_args()
|
|
|
454 |
args.read(iprot)
|
|
|
455 |
iprot.readMessageEnd()
|
|
|
456 |
result = getSupplier_result()
|
|
|
457 |
try:
|
|
|
458 |
result.success = self._handler.getSupplier(args.id)
|
|
|
459 |
except PurchaseServiceException, e:
|
|
|
460 |
result.e = e
|
|
|
461 |
oprot.writeMessageBegin("getSupplier", TMessageType.REPLY, seqid)
|
|
|
462 |
result.write(oprot)
|
|
|
463 |
oprot.writeMessageEnd()
|
|
|
464 |
oprot.trans.flush()
|
|
|
465 |
|
|
|
466 |
def process_startPurchase(self, seqid, iprot, oprot):
|
|
|
467 |
args = startPurchase_args()
|
|
|
468 |
args.read(iprot)
|
|
|
469 |
iprot.readMessageEnd()
|
|
|
470 |
result = startPurchase_result()
|
|
|
471 |
try:
|
|
|
472 |
result.success = self._handler.startPurchase(args.purchaseOrderId, args.invoiceNumber, args.freightCharges)
|
|
|
473 |
except PurchaseServiceException, e:
|
|
|
474 |
result.e = e
|
|
|
475 |
oprot.writeMessageBegin("startPurchase", TMessageType.REPLY, seqid)
|
|
|
476 |
result.write(oprot)
|
|
|
477 |
oprot.writeMessageEnd()
|
|
|
478 |
oprot.trans.flush()
|
|
|
479 |
|
|
|
480 |
def process_closePurchase(self, seqid, iprot, oprot):
|
|
|
481 |
args = closePurchase_args()
|
|
|
482 |
args.read(iprot)
|
|
|
483 |
iprot.readMessageEnd()
|
|
|
484 |
result = closePurchase_result()
|
|
|
485 |
try:
|
|
|
486 |
result.success = self._handler.closePurchase(args.purchaseId)
|
|
|
487 |
except PurchaseServiceException, e:
|
|
|
488 |
result.e = e
|
|
|
489 |
oprot.writeMessageBegin("closePurchase", TMessageType.REPLY, seqid)
|
|
|
490 |
result.write(oprot)
|
|
|
491 |
oprot.writeMessageEnd()
|
|
|
492 |
oprot.trans.flush()
|
|
|
493 |
|
|
|
494 |
def process_getAllPurchases(self, seqid, iprot, oprot):
|
|
|
495 |
args = getAllPurchases_args()
|
|
|
496 |
args.read(iprot)
|
|
|
497 |
iprot.readMessageEnd()
|
|
|
498 |
result = getAllPurchases_result()
|
|
|
499 |
try:
|
|
|
500 |
result.success = self._handler.getAllPurchases(args.purchaseOrderId, args.open)
|
|
|
501 |
except PurchaseServiceException, e:
|
|
|
502 |
result.e = e
|
|
|
503 |
oprot.writeMessageBegin("getAllPurchases", TMessageType.REPLY, seqid)
|
|
|
504 |
result.write(oprot)
|
|
|
505 |
oprot.writeMessageEnd()
|
|
|
506 |
oprot.trans.flush()
|
|
|
507 |
|
| 4555 |
mandeep.dh |
508 |
def process_getPurchaseOrderForPurchase(self, seqid, iprot, oprot):
|
|
|
509 |
args = getPurchaseOrderForPurchase_args()
|
| 4502 |
mandeep.dh |
510 |
args.read(iprot)
|
|
|
511 |
iprot.readMessageEnd()
|
| 4555 |
mandeep.dh |
512 |
result = getPurchaseOrderForPurchase_result()
|
|
|
513 |
result.success = self._handler.getPurchaseOrderForPurchase(args.purchaseId)
|
|
|
514 |
oprot.writeMessageBegin("getPurchaseOrderForPurchase", TMessageType.REPLY, seqid)
|
| 4502 |
mandeep.dh |
515 |
result.write(oprot)
|
|
|
516 |
oprot.writeMessageEnd()
|
|
|
517 |
oprot.trans.flush()
|
|
|
518 |
|
|
|
519 |
|
|
|
520 |
# HELPER FUNCTIONS AND STRUCTURES
|
|
|
521 |
|
|
|
522 |
class createPurchaseOrder_args:
|
|
|
523 |
"""
|
|
|
524 |
Attributes:
|
|
|
525 |
- purchaseOrder
|
|
|
526 |
"""
|
|
|
527 |
|
|
|
528 |
thrift_spec = (
|
|
|
529 |
None, # 0
|
|
|
530 |
(1, TType.STRUCT, 'purchaseOrder', (PurchaseOrder, PurchaseOrder.thrift_spec), None, ), # 1
|
|
|
531 |
)
|
|
|
532 |
|
|
|
533 |
def __init__(self, purchaseOrder=None,):
|
|
|
534 |
self.purchaseOrder = purchaseOrder
|
|
|
535 |
|
|
|
536 |
def read(self, iprot):
|
|
|
537 |
if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
|
|
|
538 |
fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
|
|
|
539 |
return
|
|
|
540 |
iprot.readStructBegin()
|
|
|
541 |
while True:
|
|
|
542 |
(fname, ftype, fid) = iprot.readFieldBegin()
|
|
|
543 |
if ftype == TType.STOP:
|
|
|
544 |
break
|
|
|
545 |
if fid == 1:
|
|
|
546 |
if ftype == TType.STRUCT:
|
|
|
547 |
self.purchaseOrder = PurchaseOrder()
|
|
|
548 |
self.purchaseOrder.read(iprot)
|
|
|
549 |
else:
|
|
|
550 |
iprot.skip(ftype)
|
|
|
551 |
else:
|
|
|
552 |
iprot.skip(ftype)
|
|
|
553 |
iprot.readFieldEnd()
|
|
|
554 |
iprot.readStructEnd()
|
|
|
555 |
|
|
|
556 |
def write(self, oprot):
|
|
|
557 |
if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
|
|
|
558 |
oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
|
|
|
559 |
return
|
|
|
560 |
oprot.writeStructBegin('createPurchaseOrder_args')
|
|
|
561 |
if self.purchaseOrder is not None:
|
|
|
562 |
oprot.writeFieldBegin('purchaseOrder', TType.STRUCT, 1)
|
|
|
563 |
self.purchaseOrder.write(oprot)
|
|
|
564 |
oprot.writeFieldEnd()
|
|
|
565 |
oprot.writeFieldStop()
|
|
|
566 |
oprot.writeStructEnd()
|
|
|
567 |
|
|
|
568 |
def validate(self):
|
|
|
569 |
return
|
|
|
570 |
|
|
|
571 |
|
|
|
572 |
def __repr__(self):
|
|
|
573 |
L = ['%s=%r' % (key, value)
|
|
|
574 |
for key, value in self.__dict__.iteritems()]
|
|
|
575 |
return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
|
|
|
576 |
|
|
|
577 |
def __eq__(self, other):
|
|
|
578 |
return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
|
|
|
579 |
|
|
|
580 |
def __ne__(self, other):
|
|
|
581 |
return not (self == other)
|
|
|
582 |
|
|
|
583 |
class createPurchaseOrder_result:
|
|
|
584 |
"""
|
|
|
585 |
Attributes:
|
|
|
586 |
- success
|
|
|
587 |
- e
|
|
|
588 |
"""
|
|
|
589 |
|
|
|
590 |
thrift_spec = (
|
|
|
591 |
(0, TType.I64, 'success', None, None, ), # 0
|
|
|
592 |
(1, TType.STRUCT, 'e', (PurchaseServiceException, PurchaseServiceException.thrift_spec), None, ), # 1
|
|
|
593 |
)
|
|
|
594 |
|
|
|
595 |
def __init__(self, success=None, e=None,):
|
|
|
596 |
self.success = success
|
|
|
597 |
self.e = e
|
|
|
598 |
|
|
|
599 |
def read(self, iprot):
|
|
|
600 |
if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
|
|
|
601 |
fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
|
|
|
602 |
return
|
|
|
603 |
iprot.readStructBegin()
|
|
|
604 |
while True:
|
|
|
605 |
(fname, ftype, fid) = iprot.readFieldBegin()
|
|
|
606 |
if ftype == TType.STOP:
|
|
|
607 |
break
|
|
|
608 |
if fid == 0:
|
|
|
609 |
if ftype == TType.I64:
|
|
|
610 |
self.success = iprot.readI64();
|
|
|
611 |
else:
|
|
|
612 |
iprot.skip(ftype)
|
|
|
613 |
elif fid == 1:
|
|
|
614 |
if ftype == TType.STRUCT:
|
|
|
615 |
self.e = PurchaseServiceException()
|
|
|
616 |
self.e.read(iprot)
|
|
|
617 |
else:
|
|
|
618 |
iprot.skip(ftype)
|
|
|
619 |
else:
|
|
|
620 |
iprot.skip(ftype)
|
|
|
621 |
iprot.readFieldEnd()
|
|
|
622 |
iprot.readStructEnd()
|
|
|
623 |
|
|
|
624 |
def write(self, oprot):
|
|
|
625 |
if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
|
|
|
626 |
oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
|
|
|
627 |
return
|
|
|
628 |
oprot.writeStructBegin('createPurchaseOrder_result')
|
|
|
629 |
if self.success is not None:
|
|
|
630 |
oprot.writeFieldBegin('success', TType.I64, 0)
|
|
|
631 |
oprot.writeI64(self.success)
|
|
|
632 |
oprot.writeFieldEnd()
|
|
|
633 |
if self.e is not None:
|
|
|
634 |
oprot.writeFieldBegin('e', TType.STRUCT, 1)
|
|
|
635 |
self.e.write(oprot)
|
|
|
636 |
oprot.writeFieldEnd()
|
|
|
637 |
oprot.writeFieldStop()
|
|
|
638 |
oprot.writeStructEnd()
|
|
|
639 |
|
|
|
640 |
def validate(self):
|
|
|
641 |
return
|
|
|
642 |
|
|
|
643 |
|
|
|
644 |
def __repr__(self):
|
|
|
645 |
L = ['%s=%r' % (key, value)
|
|
|
646 |
for key, value in self.__dict__.iteritems()]
|
|
|
647 |
return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
|
|
|
648 |
|
|
|
649 |
def __eq__(self, other):
|
|
|
650 |
return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
|
|
|
651 |
|
|
|
652 |
def __ne__(self, other):
|
|
|
653 |
return not (self == other)
|
|
|
654 |
|
|
|
655 |
class getPurchaseOrder_args:
|
|
|
656 |
"""
|
|
|
657 |
Attributes:
|
|
|
658 |
- id
|
|
|
659 |
"""
|
|
|
660 |
|
|
|
661 |
thrift_spec = (
|
|
|
662 |
None, # 0
|
|
|
663 |
(1, TType.I64, 'id', None, None, ), # 1
|
|
|
664 |
)
|
|
|
665 |
|
|
|
666 |
def __init__(self, id=None,):
|
|
|
667 |
self.id = id
|
|
|
668 |
|
|
|
669 |
def read(self, iprot):
|
|
|
670 |
if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
|
|
|
671 |
fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
|
|
|
672 |
return
|
|
|
673 |
iprot.readStructBegin()
|
|
|
674 |
while True:
|
|
|
675 |
(fname, ftype, fid) = iprot.readFieldBegin()
|
|
|
676 |
if ftype == TType.STOP:
|
|
|
677 |
break
|
|
|
678 |
if fid == 1:
|
|
|
679 |
if ftype == TType.I64:
|
|
|
680 |
self.id = iprot.readI64();
|
|
|
681 |
else:
|
|
|
682 |
iprot.skip(ftype)
|
|
|
683 |
else:
|
|
|
684 |
iprot.skip(ftype)
|
|
|
685 |
iprot.readFieldEnd()
|
|
|
686 |
iprot.readStructEnd()
|
|
|
687 |
|
|
|
688 |
def write(self, oprot):
|
|
|
689 |
if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
|
|
|
690 |
oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
|
|
|
691 |
return
|
|
|
692 |
oprot.writeStructBegin('getPurchaseOrder_args')
|
|
|
693 |
if self.id is not None:
|
|
|
694 |
oprot.writeFieldBegin('id', TType.I64, 1)
|
|
|
695 |
oprot.writeI64(self.id)
|
|
|
696 |
oprot.writeFieldEnd()
|
|
|
697 |
oprot.writeFieldStop()
|
|
|
698 |
oprot.writeStructEnd()
|
|
|
699 |
|
|
|
700 |
def validate(self):
|
|
|
701 |
return
|
|
|
702 |
|
|
|
703 |
|
|
|
704 |
def __repr__(self):
|
|
|
705 |
L = ['%s=%r' % (key, value)
|
|
|
706 |
for key, value in self.__dict__.iteritems()]
|
|
|
707 |
return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
|
|
|
708 |
|
|
|
709 |
def __eq__(self, other):
|
|
|
710 |
return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
|
|
|
711 |
|
|
|
712 |
def __ne__(self, other):
|
|
|
713 |
return not (self == other)
|
|
|
714 |
|
|
|
715 |
class getPurchaseOrder_result:
|
|
|
716 |
"""
|
|
|
717 |
Attributes:
|
|
|
718 |
- success
|
|
|
719 |
- e
|
|
|
720 |
"""
|
|
|
721 |
|
|
|
722 |
thrift_spec = (
|
|
|
723 |
(0, TType.STRUCT, 'success', (PurchaseOrder, PurchaseOrder.thrift_spec), None, ), # 0
|
|
|
724 |
(1, TType.STRUCT, 'e', (PurchaseServiceException, PurchaseServiceException.thrift_spec), None, ), # 1
|
|
|
725 |
)
|
|
|
726 |
|
|
|
727 |
def __init__(self, success=None, e=None,):
|
|
|
728 |
self.success = success
|
|
|
729 |
self.e = e
|
|
|
730 |
|
|
|
731 |
def read(self, iprot):
|
|
|
732 |
if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
|
|
|
733 |
fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
|
|
|
734 |
return
|
|
|
735 |
iprot.readStructBegin()
|
|
|
736 |
while True:
|
|
|
737 |
(fname, ftype, fid) = iprot.readFieldBegin()
|
|
|
738 |
if ftype == TType.STOP:
|
|
|
739 |
break
|
|
|
740 |
if fid == 0:
|
|
|
741 |
if ftype == TType.STRUCT:
|
|
|
742 |
self.success = PurchaseOrder()
|
|
|
743 |
self.success.read(iprot)
|
|
|
744 |
else:
|
|
|
745 |
iprot.skip(ftype)
|
|
|
746 |
elif fid == 1:
|
|
|
747 |
if ftype == TType.STRUCT:
|
|
|
748 |
self.e = PurchaseServiceException()
|
|
|
749 |
self.e.read(iprot)
|
|
|
750 |
else:
|
|
|
751 |
iprot.skip(ftype)
|
|
|
752 |
else:
|
|
|
753 |
iprot.skip(ftype)
|
|
|
754 |
iprot.readFieldEnd()
|
|
|
755 |
iprot.readStructEnd()
|
|
|
756 |
|
|
|
757 |
def write(self, oprot):
|
|
|
758 |
if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
|
|
|
759 |
oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
|
|
|
760 |
return
|
|
|
761 |
oprot.writeStructBegin('getPurchaseOrder_result')
|
|
|
762 |
if self.success is not None:
|
|
|
763 |
oprot.writeFieldBegin('success', TType.STRUCT, 0)
|
|
|
764 |
self.success.write(oprot)
|
|
|
765 |
oprot.writeFieldEnd()
|
|
|
766 |
if self.e is not None:
|
|
|
767 |
oprot.writeFieldBegin('e', TType.STRUCT, 1)
|
|
|
768 |
self.e.write(oprot)
|
|
|
769 |
oprot.writeFieldEnd()
|
|
|
770 |
oprot.writeFieldStop()
|
|
|
771 |
oprot.writeStructEnd()
|
|
|
772 |
|
|
|
773 |
def validate(self):
|
|
|
774 |
return
|
|
|
775 |
|
|
|
776 |
|
|
|
777 |
def __repr__(self):
|
|
|
778 |
L = ['%s=%r' % (key, value)
|
|
|
779 |
for key, value in self.__dict__.iteritems()]
|
|
|
780 |
return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
|
|
|
781 |
|
|
|
782 |
def __eq__(self, other):
|
|
|
783 |
return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
|
|
|
784 |
|
|
|
785 |
def __ne__(self, other):
|
|
|
786 |
return not (self == other)
|
|
|
787 |
|
|
|
788 |
class getAllPurchaseOrders_args:
|
|
|
789 |
"""
|
|
|
790 |
Attributes:
|
|
|
791 |
- status
|
|
|
792 |
"""
|
|
|
793 |
|
|
|
794 |
thrift_spec = (
|
|
|
795 |
None, # 0
|
|
|
796 |
(1, TType.I32, 'status', None, None, ), # 1
|
|
|
797 |
)
|
|
|
798 |
|
|
|
799 |
def __init__(self, status=None,):
|
|
|
800 |
self.status = status
|
|
|
801 |
|
|
|
802 |
def read(self, iprot):
|
|
|
803 |
if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
|
|
|
804 |
fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
|
|
|
805 |
return
|
|
|
806 |
iprot.readStructBegin()
|
|
|
807 |
while True:
|
|
|
808 |
(fname, ftype, fid) = iprot.readFieldBegin()
|
|
|
809 |
if ftype == TType.STOP:
|
|
|
810 |
break
|
|
|
811 |
if fid == 1:
|
|
|
812 |
if ftype == TType.I32:
|
|
|
813 |
self.status = iprot.readI32();
|
|
|
814 |
else:
|
|
|
815 |
iprot.skip(ftype)
|
|
|
816 |
else:
|
|
|
817 |
iprot.skip(ftype)
|
|
|
818 |
iprot.readFieldEnd()
|
|
|
819 |
iprot.readStructEnd()
|
|
|
820 |
|
|
|
821 |
def write(self, oprot):
|
|
|
822 |
if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
|
|
|
823 |
oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
|
|
|
824 |
return
|
|
|
825 |
oprot.writeStructBegin('getAllPurchaseOrders_args')
|
|
|
826 |
if self.status is not None:
|
|
|
827 |
oprot.writeFieldBegin('status', TType.I32, 1)
|
|
|
828 |
oprot.writeI32(self.status)
|
|
|
829 |
oprot.writeFieldEnd()
|
|
|
830 |
oprot.writeFieldStop()
|
|
|
831 |
oprot.writeStructEnd()
|
|
|
832 |
|
|
|
833 |
def validate(self):
|
|
|
834 |
return
|
|
|
835 |
|
|
|
836 |
|
|
|
837 |
def __repr__(self):
|
|
|
838 |
L = ['%s=%r' % (key, value)
|
|
|
839 |
for key, value in self.__dict__.iteritems()]
|
|
|
840 |
return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
|
|
|
841 |
|
|
|
842 |
def __eq__(self, other):
|
|
|
843 |
return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
|
|
|
844 |
|
|
|
845 |
def __ne__(self, other):
|
|
|
846 |
return not (self == other)
|
|
|
847 |
|
|
|
848 |
class getAllPurchaseOrders_result:
|
|
|
849 |
"""
|
|
|
850 |
Attributes:
|
|
|
851 |
- success
|
|
|
852 |
- e
|
|
|
853 |
"""
|
|
|
854 |
|
|
|
855 |
thrift_spec = (
|
|
|
856 |
(0, TType.LIST, 'success', (TType.STRUCT,(PurchaseOrder, PurchaseOrder.thrift_spec)), None, ), # 0
|
|
|
857 |
(1, TType.STRUCT, 'e', (PurchaseServiceException, PurchaseServiceException.thrift_spec), None, ), # 1
|
|
|
858 |
)
|
|
|
859 |
|
|
|
860 |
def __init__(self, success=None, e=None,):
|
|
|
861 |
self.success = success
|
|
|
862 |
self.e = e
|
|
|
863 |
|
|
|
864 |
def read(self, iprot):
|
|
|
865 |
if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
|
|
|
866 |
fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
|
|
|
867 |
return
|
|
|
868 |
iprot.readStructBegin()
|
|
|
869 |
while True:
|
|
|
870 |
(fname, ftype, fid) = iprot.readFieldBegin()
|
|
|
871 |
if ftype == TType.STOP:
|
|
|
872 |
break
|
|
|
873 |
if fid == 0:
|
|
|
874 |
if ftype == TType.LIST:
|
|
|
875 |
self.success = []
|
|
|
876 |
(_etype10, _size7) = iprot.readListBegin()
|
|
|
877 |
for _i11 in xrange(_size7):
|
|
|
878 |
_elem12 = PurchaseOrder()
|
|
|
879 |
_elem12.read(iprot)
|
|
|
880 |
self.success.append(_elem12)
|
|
|
881 |
iprot.readListEnd()
|
|
|
882 |
else:
|
|
|
883 |
iprot.skip(ftype)
|
|
|
884 |
elif fid == 1:
|
|
|
885 |
if ftype == TType.STRUCT:
|
|
|
886 |
self.e = PurchaseServiceException()
|
|
|
887 |
self.e.read(iprot)
|
|
|
888 |
else:
|
|
|
889 |
iprot.skip(ftype)
|
|
|
890 |
else:
|
|
|
891 |
iprot.skip(ftype)
|
|
|
892 |
iprot.readFieldEnd()
|
|
|
893 |
iprot.readStructEnd()
|
|
|
894 |
|
|
|
895 |
def write(self, oprot):
|
|
|
896 |
if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
|
|
|
897 |
oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
|
|
|
898 |
return
|
|
|
899 |
oprot.writeStructBegin('getAllPurchaseOrders_result')
|
|
|
900 |
if self.success is not None:
|
|
|
901 |
oprot.writeFieldBegin('success', TType.LIST, 0)
|
|
|
902 |
oprot.writeListBegin(TType.STRUCT, len(self.success))
|
|
|
903 |
for iter13 in self.success:
|
|
|
904 |
iter13.write(oprot)
|
|
|
905 |
oprot.writeListEnd()
|
|
|
906 |
oprot.writeFieldEnd()
|
|
|
907 |
if self.e is not None:
|
|
|
908 |
oprot.writeFieldBegin('e', TType.STRUCT, 1)
|
|
|
909 |
self.e.write(oprot)
|
|
|
910 |
oprot.writeFieldEnd()
|
|
|
911 |
oprot.writeFieldStop()
|
|
|
912 |
oprot.writeStructEnd()
|
|
|
913 |
|
|
|
914 |
def validate(self):
|
|
|
915 |
return
|
|
|
916 |
|
|
|
917 |
|
|
|
918 |
def __repr__(self):
|
|
|
919 |
L = ['%s=%r' % (key, value)
|
|
|
920 |
for key, value in self.__dict__.iteritems()]
|
|
|
921 |
return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
|
|
|
922 |
|
|
|
923 |
def __eq__(self, other):
|
|
|
924 |
return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
|
|
|
925 |
|
|
|
926 |
def __ne__(self, other):
|
|
|
927 |
return not (self == other)
|
|
|
928 |
|
|
|
929 |
class getSupplier_args:
|
|
|
930 |
"""
|
|
|
931 |
Attributes:
|
|
|
932 |
- id
|
|
|
933 |
"""
|
|
|
934 |
|
|
|
935 |
thrift_spec = (
|
|
|
936 |
None, # 0
|
|
|
937 |
(1, TType.I64, 'id', None, None, ), # 1
|
|
|
938 |
)
|
|
|
939 |
|
|
|
940 |
def __init__(self, id=None,):
|
|
|
941 |
self.id = id
|
|
|
942 |
|
|
|
943 |
def read(self, iprot):
|
|
|
944 |
if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
|
|
|
945 |
fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
|
|
|
946 |
return
|
|
|
947 |
iprot.readStructBegin()
|
|
|
948 |
while True:
|
|
|
949 |
(fname, ftype, fid) = iprot.readFieldBegin()
|
|
|
950 |
if ftype == TType.STOP:
|
|
|
951 |
break
|
|
|
952 |
if fid == 1:
|
|
|
953 |
if ftype == TType.I64:
|
|
|
954 |
self.id = iprot.readI64();
|
|
|
955 |
else:
|
|
|
956 |
iprot.skip(ftype)
|
|
|
957 |
else:
|
|
|
958 |
iprot.skip(ftype)
|
|
|
959 |
iprot.readFieldEnd()
|
|
|
960 |
iprot.readStructEnd()
|
|
|
961 |
|
|
|
962 |
def write(self, oprot):
|
|
|
963 |
if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
|
|
|
964 |
oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
|
|
|
965 |
return
|
|
|
966 |
oprot.writeStructBegin('getSupplier_args')
|
|
|
967 |
if self.id is not None:
|
|
|
968 |
oprot.writeFieldBegin('id', TType.I64, 1)
|
|
|
969 |
oprot.writeI64(self.id)
|
|
|
970 |
oprot.writeFieldEnd()
|
|
|
971 |
oprot.writeFieldStop()
|
|
|
972 |
oprot.writeStructEnd()
|
|
|
973 |
|
|
|
974 |
def validate(self):
|
|
|
975 |
return
|
|
|
976 |
|
|
|
977 |
|
|
|
978 |
def __repr__(self):
|
|
|
979 |
L = ['%s=%r' % (key, value)
|
|
|
980 |
for key, value in self.__dict__.iteritems()]
|
|
|
981 |
return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
|
|
|
982 |
|
|
|
983 |
def __eq__(self, other):
|
|
|
984 |
return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
|
|
|
985 |
|
|
|
986 |
def __ne__(self, other):
|
|
|
987 |
return not (self == other)
|
|
|
988 |
|
|
|
989 |
class getSupplier_result:
|
|
|
990 |
"""
|
|
|
991 |
Attributes:
|
|
|
992 |
- success
|
|
|
993 |
- e
|
|
|
994 |
"""
|
|
|
995 |
|
|
|
996 |
thrift_spec = (
|
|
|
997 |
(0, TType.STRUCT, 'success', (Supplier, Supplier.thrift_spec), None, ), # 0
|
|
|
998 |
(1, TType.STRUCT, 'e', (PurchaseServiceException, PurchaseServiceException.thrift_spec), None, ), # 1
|
|
|
999 |
)
|
|
|
1000 |
|
|
|
1001 |
def __init__(self, success=None, e=None,):
|
|
|
1002 |
self.success = success
|
|
|
1003 |
self.e = e
|
|
|
1004 |
|
|
|
1005 |
def read(self, iprot):
|
|
|
1006 |
if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
|
|
|
1007 |
fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
|
|
|
1008 |
return
|
|
|
1009 |
iprot.readStructBegin()
|
|
|
1010 |
while True:
|
|
|
1011 |
(fname, ftype, fid) = iprot.readFieldBegin()
|
|
|
1012 |
if ftype == TType.STOP:
|
|
|
1013 |
break
|
|
|
1014 |
if fid == 0:
|
|
|
1015 |
if ftype == TType.STRUCT:
|
|
|
1016 |
self.success = Supplier()
|
|
|
1017 |
self.success.read(iprot)
|
|
|
1018 |
else:
|
|
|
1019 |
iprot.skip(ftype)
|
|
|
1020 |
elif fid == 1:
|
|
|
1021 |
if ftype == TType.STRUCT:
|
|
|
1022 |
self.e = PurchaseServiceException()
|
|
|
1023 |
self.e.read(iprot)
|
|
|
1024 |
else:
|
|
|
1025 |
iprot.skip(ftype)
|
|
|
1026 |
else:
|
|
|
1027 |
iprot.skip(ftype)
|
|
|
1028 |
iprot.readFieldEnd()
|
|
|
1029 |
iprot.readStructEnd()
|
|
|
1030 |
|
|
|
1031 |
def write(self, oprot):
|
|
|
1032 |
if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
|
|
|
1033 |
oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
|
|
|
1034 |
return
|
|
|
1035 |
oprot.writeStructBegin('getSupplier_result')
|
|
|
1036 |
if self.success is not None:
|
|
|
1037 |
oprot.writeFieldBegin('success', TType.STRUCT, 0)
|
|
|
1038 |
self.success.write(oprot)
|
|
|
1039 |
oprot.writeFieldEnd()
|
|
|
1040 |
if self.e is not None:
|
|
|
1041 |
oprot.writeFieldBegin('e', TType.STRUCT, 1)
|
|
|
1042 |
self.e.write(oprot)
|
|
|
1043 |
oprot.writeFieldEnd()
|
|
|
1044 |
oprot.writeFieldStop()
|
|
|
1045 |
oprot.writeStructEnd()
|
|
|
1046 |
|
|
|
1047 |
def validate(self):
|
|
|
1048 |
return
|
|
|
1049 |
|
|
|
1050 |
|
|
|
1051 |
def __repr__(self):
|
|
|
1052 |
L = ['%s=%r' % (key, value)
|
|
|
1053 |
for key, value in self.__dict__.iteritems()]
|
|
|
1054 |
return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
|
|
|
1055 |
|
|
|
1056 |
def __eq__(self, other):
|
|
|
1057 |
return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
|
|
|
1058 |
|
|
|
1059 |
def __ne__(self, other):
|
|
|
1060 |
return not (self == other)
|
|
|
1061 |
|
|
|
1062 |
class startPurchase_args:
|
|
|
1063 |
"""
|
|
|
1064 |
Attributes:
|
|
|
1065 |
- purchaseOrderId
|
|
|
1066 |
- invoiceNumber
|
|
|
1067 |
- freightCharges
|
|
|
1068 |
"""
|
|
|
1069 |
|
|
|
1070 |
thrift_spec = (
|
|
|
1071 |
None, # 0
|
|
|
1072 |
(1, TType.I64, 'purchaseOrderId', None, None, ), # 1
|
|
|
1073 |
(2, TType.STRING, 'invoiceNumber', None, None, ), # 2
|
|
|
1074 |
(3, TType.DOUBLE, 'freightCharges', None, None, ), # 3
|
|
|
1075 |
)
|
|
|
1076 |
|
|
|
1077 |
def __init__(self, purchaseOrderId=None, invoiceNumber=None, freightCharges=None,):
|
|
|
1078 |
self.purchaseOrderId = purchaseOrderId
|
|
|
1079 |
self.invoiceNumber = invoiceNumber
|
|
|
1080 |
self.freightCharges = freightCharges
|
|
|
1081 |
|
|
|
1082 |
def read(self, iprot):
|
|
|
1083 |
if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
|
|
|
1084 |
fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
|
|
|
1085 |
return
|
|
|
1086 |
iprot.readStructBegin()
|
|
|
1087 |
while True:
|
|
|
1088 |
(fname, ftype, fid) = iprot.readFieldBegin()
|
|
|
1089 |
if ftype == TType.STOP:
|
|
|
1090 |
break
|
|
|
1091 |
if fid == 1:
|
|
|
1092 |
if ftype == TType.I64:
|
|
|
1093 |
self.purchaseOrderId = iprot.readI64();
|
|
|
1094 |
else:
|
|
|
1095 |
iprot.skip(ftype)
|
|
|
1096 |
elif fid == 2:
|
|
|
1097 |
if ftype == TType.STRING:
|
|
|
1098 |
self.invoiceNumber = iprot.readString();
|
|
|
1099 |
else:
|
|
|
1100 |
iprot.skip(ftype)
|
|
|
1101 |
elif fid == 3:
|
|
|
1102 |
if ftype == TType.DOUBLE:
|
|
|
1103 |
self.freightCharges = iprot.readDouble();
|
|
|
1104 |
else:
|
|
|
1105 |
iprot.skip(ftype)
|
|
|
1106 |
else:
|
|
|
1107 |
iprot.skip(ftype)
|
|
|
1108 |
iprot.readFieldEnd()
|
|
|
1109 |
iprot.readStructEnd()
|
|
|
1110 |
|
|
|
1111 |
def write(self, oprot):
|
|
|
1112 |
if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
|
|
|
1113 |
oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
|
|
|
1114 |
return
|
|
|
1115 |
oprot.writeStructBegin('startPurchase_args')
|
|
|
1116 |
if self.purchaseOrderId is not None:
|
|
|
1117 |
oprot.writeFieldBegin('purchaseOrderId', TType.I64, 1)
|
|
|
1118 |
oprot.writeI64(self.purchaseOrderId)
|
|
|
1119 |
oprot.writeFieldEnd()
|
|
|
1120 |
if self.invoiceNumber is not None:
|
|
|
1121 |
oprot.writeFieldBegin('invoiceNumber', TType.STRING, 2)
|
|
|
1122 |
oprot.writeString(self.invoiceNumber)
|
|
|
1123 |
oprot.writeFieldEnd()
|
|
|
1124 |
if self.freightCharges is not None:
|
|
|
1125 |
oprot.writeFieldBegin('freightCharges', TType.DOUBLE, 3)
|
|
|
1126 |
oprot.writeDouble(self.freightCharges)
|
|
|
1127 |
oprot.writeFieldEnd()
|
|
|
1128 |
oprot.writeFieldStop()
|
|
|
1129 |
oprot.writeStructEnd()
|
|
|
1130 |
|
|
|
1131 |
def validate(self):
|
|
|
1132 |
return
|
|
|
1133 |
|
|
|
1134 |
|
|
|
1135 |
def __repr__(self):
|
|
|
1136 |
L = ['%s=%r' % (key, value)
|
|
|
1137 |
for key, value in self.__dict__.iteritems()]
|
|
|
1138 |
return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
|
|
|
1139 |
|
|
|
1140 |
def __eq__(self, other):
|
|
|
1141 |
return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
|
|
|
1142 |
|
|
|
1143 |
def __ne__(self, other):
|
|
|
1144 |
return not (self == other)
|
|
|
1145 |
|
|
|
1146 |
class startPurchase_result:
|
|
|
1147 |
"""
|
|
|
1148 |
Attributes:
|
|
|
1149 |
- success
|
|
|
1150 |
- e
|
|
|
1151 |
"""
|
|
|
1152 |
|
|
|
1153 |
thrift_spec = (
|
|
|
1154 |
(0, TType.I64, 'success', None, None, ), # 0
|
|
|
1155 |
(1, TType.STRUCT, 'e', (PurchaseServiceException, PurchaseServiceException.thrift_spec), None, ), # 1
|
|
|
1156 |
)
|
|
|
1157 |
|
|
|
1158 |
def __init__(self, success=None, e=None,):
|
|
|
1159 |
self.success = success
|
|
|
1160 |
self.e = e
|
|
|
1161 |
|
|
|
1162 |
def read(self, iprot):
|
|
|
1163 |
if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
|
|
|
1164 |
fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
|
|
|
1165 |
return
|
|
|
1166 |
iprot.readStructBegin()
|
|
|
1167 |
while True:
|
|
|
1168 |
(fname, ftype, fid) = iprot.readFieldBegin()
|
|
|
1169 |
if ftype == TType.STOP:
|
|
|
1170 |
break
|
|
|
1171 |
if fid == 0:
|
|
|
1172 |
if ftype == TType.I64:
|
|
|
1173 |
self.success = iprot.readI64();
|
|
|
1174 |
else:
|
|
|
1175 |
iprot.skip(ftype)
|
|
|
1176 |
elif fid == 1:
|
|
|
1177 |
if ftype == TType.STRUCT:
|
|
|
1178 |
self.e = PurchaseServiceException()
|
|
|
1179 |
self.e.read(iprot)
|
|
|
1180 |
else:
|
|
|
1181 |
iprot.skip(ftype)
|
|
|
1182 |
else:
|
|
|
1183 |
iprot.skip(ftype)
|
|
|
1184 |
iprot.readFieldEnd()
|
|
|
1185 |
iprot.readStructEnd()
|
|
|
1186 |
|
|
|
1187 |
def write(self, oprot):
|
|
|
1188 |
if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
|
|
|
1189 |
oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
|
|
|
1190 |
return
|
|
|
1191 |
oprot.writeStructBegin('startPurchase_result')
|
|
|
1192 |
if self.success is not None:
|
|
|
1193 |
oprot.writeFieldBegin('success', TType.I64, 0)
|
|
|
1194 |
oprot.writeI64(self.success)
|
|
|
1195 |
oprot.writeFieldEnd()
|
|
|
1196 |
if self.e is not None:
|
|
|
1197 |
oprot.writeFieldBegin('e', TType.STRUCT, 1)
|
|
|
1198 |
self.e.write(oprot)
|
|
|
1199 |
oprot.writeFieldEnd()
|
|
|
1200 |
oprot.writeFieldStop()
|
|
|
1201 |
oprot.writeStructEnd()
|
|
|
1202 |
|
|
|
1203 |
def validate(self):
|
|
|
1204 |
return
|
|
|
1205 |
|
|
|
1206 |
|
|
|
1207 |
def __repr__(self):
|
|
|
1208 |
L = ['%s=%r' % (key, value)
|
|
|
1209 |
for key, value in self.__dict__.iteritems()]
|
|
|
1210 |
return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
|
|
|
1211 |
|
|
|
1212 |
def __eq__(self, other):
|
|
|
1213 |
return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
|
|
|
1214 |
|
|
|
1215 |
def __ne__(self, other):
|
|
|
1216 |
return not (self == other)
|
|
|
1217 |
|
|
|
1218 |
class closePurchase_args:
|
|
|
1219 |
"""
|
|
|
1220 |
Attributes:
|
|
|
1221 |
- purchaseId
|
|
|
1222 |
"""
|
|
|
1223 |
|
|
|
1224 |
thrift_spec = (
|
|
|
1225 |
None, # 0
|
|
|
1226 |
(1, TType.I64, 'purchaseId', None, None, ), # 1
|
|
|
1227 |
)
|
|
|
1228 |
|
|
|
1229 |
def __init__(self, purchaseId=None,):
|
|
|
1230 |
self.purchaseId = purchaseId
|
|
|
1231 |
|
|
|
1232 |
def read(self, iprot):
|
|
|
1233 |
if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
|
|
|
1234 |
fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
|
|
|
1235 |
return
|
|
|
1236 |
iprot.readStructBegin()
|
|
|
1237 |
while True:
|
|
|
1238 |
(fname, ftype, fid) = iprot.readFieldBegin()
|
|
|
1239 |
if ftype == TType.STOP:
|
|
|
1240 |
break
|
|
|
1241 |
if fid == 1:
|
|
|
1242 |
if ftype == TType.I64:
|
|
|
1243 |
self.purchaseId = iprot.readI64();
|
|
|
1244 |
else:
|
|
|
1245 |
iprot.skip(ftype)
|
|
|
1246 |
else:
|
|
|
1247 |
iprot.skip(ftype)
|
|
|
1248 |
iprot.readFieldEnd()
|
|
|
1249 |
iprot.readStructEnd()
|
|
|
1250 |
|
|
|
1251 |
def write(self, oprot):
|
|
|
1252 |
if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
|
|
|
1253 |
oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
|
|
|
1254 |
return
|
|
|
1255 |
oprot.writeStructBegin('closePurchase_args')
|
|
|
1256 |
if self.purchaseId is not None:
|
|
|
1257 |
oprot.writeFieldBegin('purchaseId', TType.I64, 1)
|
|
|
1258 |
oprot.writeI64(self.purchaseId)
|
|
|
1259 |
oprot.writeFieldEnd()
|
|
|
1260 |
oprot.writeFieldStop()
|
|
|
1261 |
oprot.writeStructEnd()
|
|
|
1262 |
|
|
|
1263 |
def validate(self):
|
|
|
1264 |
return
|
|
|
1265 |
|
|
|
1266 |
|
|
|
1267 |
def __repr__(self):
|
|
|
1268 |
L = ['%s=%r' % (key, value)
|
|
|
1269 |
for key, value in self.__dict__.iteritems()]
|
|
|
1270 |
return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
|
|
|
1271 |
|
|
|
1272 |
def __eq__(self, other):
|
|
|
1273 |
return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
|
|
|
1274 |
|
|
|
1275 |
def __ne__(self, other):
|
|
|
1276 |
return not (self == other)
|
|
|
1277 |
|
|
|
1278 |
class closePurchase_result:
|
|
|
1279 |
"""
|
|
|
1280 |
Attributes:
|
|
|
1281 |
- success
|
|
|
1282 |
- e
|
|
|
1283 |
"""
|
|
|
1284 |
|
|
|
1285 |
thrift_spec = (
|
|
|
1286 |
(0, TType.I64, 'success', None, None, ), # 0
|
|
|
1287 |
(1, TType.STRUCT, 'e', (PurchaseServiceException, PurchaseServiceException.thrift_spec), None, ), # 1
|
|
|
1288 |
)
|
|
|
1289 |
|
|
|
1290 |
def __init__(self, success=None, e=None,):
|
|
|
1291 |
self.success = success
|
|
|
1292 |
self.e = e
|
|
|
1293 |
|
|
|
1294 |
def read(self, iprot):
|
|
|
1295 |
if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
|
|
|
1296 |
fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
|
|
|
1297 |
return
|
|
|
1298 |
iprot.readStructBegin()
|
|
|
1299 |
while True:
|
|
|
1300 |
(fname, ftype, fid) = iprot.readFieldBegin()
|
|
|
1301 |
if ftype == TType.STOP:
|
|
|
1302 |
break
|
|
|
1303 |
if fid == 0:
|
|
|
1304 |
if ftype == TType.I64:
|
|
|
1305 |
self.success = iprot.readI64();
|
|
|
1306 |
else:
|
|
|
1307 |
iprot.skip(ftype)
|
|
|
1308 |
elif fid == 1:
|
|
|
1309 |
if ftype == TType.STRUCT:
|
|
|
1310 |
self.e = PurchaseServiceException()
|
|
|
1311 |
self.e.read(iprot)
|
|
|
1312 |
else:
|
|
|
1313 |
iprot.skip(ftype)
|
|
|
1314 |
else:
|
|
|
1315 |
iprot.skip(ftype)
|
|
|
1316 |
iprot.readFieldEnd()
|
|
|
1317 |
iprot.readStructEnd()
|
|
|
1318 |
|
|
|
1319 |
def write(self, oprot):
|
|
|
1320 |
if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
|
|
|
1321 |
oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
|
|
|
1322 |
return
|
|
|
1323 |
oprot.writeStructBegin('closePurchase_result')
|
|
|
1324 |
if self.success is not None:
|
|
|
1325 |
oprot.writeFieldBegin('success', TType.I64, 0)
|
|
|
1326 |
oprot.writeI64(self.success)
|
|
|
1327 |
oprot.writeFieldEnd()
|
|
|
1328 |
if self.e is not None:
|
|
|
1329 |
oprot.writeFieldBegin('e', TType.STRUCT, 1)
|
|
|
1330 |
self.e.write(oprot)
|
|
|
1331 |
oprot.writeFieldEnd()
|
|
|
1332 |
oprot.writeFieldStop()
|
|
|
1333 |
oprot.writeStructEnd()
|
|
|
1334 |
|
|
|
1335 |
def validate(self):
|
|
|
1336 |
return
|
|
|
1337 |
|
|
|
1338 |
|
|
|
1339 |
def __repr__(self):
|
|
|
1340 |
L = ['%s=%r' % (key, value)
|
|
|
1341 |
for key, value in self.__dict__.iteritems()]
|
|
|
1342 |
return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
|
|
|
1343 |
|
|
|
1344 |
def __eq__(self, other):
|
|
|
1345 |
return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
|
|
|
1346 |
|
|
|
1347 |
def __ne__(self, other):
|
|
|
1348 |
return not (self == other)
|
|
|
1349 |
|
|
|
1350 |
class getAllPurchases_args:
|
|
|
1351 |
"""
|
|
|
1352 |
Attributes:
|
|
|
1353 |
- purchaseOrderId
|
|
|
1354 |
- open
|
|
|
1355 |
"""
|
|
|
1356 |
|
|
|
1357 |
thrift_spec = (
|
|
|
1358 |
None, # 0
|
|
|
1359 |
(1, TType.I64, 'purchaseOrderId', None, None, ), # 1
|
|
|
1360 |
(2, TType.BOOL, 'open', None, None, ), # 2
|
|
|
1361 |
)
|
|
|
1362 |
|
|
|
1363 |
def __init__(self, purchaseOrderId=None, open=None,):
|
|
|
1364 |
self.purchaseOrderId = purchaseOrderId
|
|
|
1365 |
self.open = open
|
|
|
1366 |
|
|
|
1367 |
def read(self, iprot):
|
|
|
1368 |
if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
|
|
|
1369 |
fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
|
|
|
1370 |
return
|
|
|
1371 |
iprot.readStructBegin()
|
|
|
1372 |
while True:
|
|
|
1373 |
(fname, ftype, fid) = iprot.readFieldBegin()
|
|
|
1374 |
if ftype == TType.STOP:
|
|
|
1375 |
break
|
|
|
1376 |
if fid == 1:
|
|
|
1377 |
if ftype == TType.I64:
|
|
|
1378 |
self.purchaseOrderId = iprot.readI64();
|
|
|
1379 |
else:
|
|
|
1380 |
iprot.skip(ftype)
|
|
|
1381 |
elif fid == 2:
|
|
|
1382 |
if ftype == TType.BOOL:
|
|
|
1383 |
self.open = iprot.readBool();
|
|
|
1384 |
else:
|
|
|
1385 |
iprot.skip(ftype)
|
|
|
1386 |
else:
|
|
|
1387 |
iprot.skip(ftype)
|
|
|
1388 |
iprot.readFieldEnd()
|
|
|
1389 |
iprot.readStructEnd()
|
|
|
1390 |
|
|
|
1391 |
def write(self, oprot):
|
|
|
1392 |
if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
|
|
|
1393 |
oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
|
|
|
1394 |
return
|
|
|
1395 |
oprot.writeStructBegin('getAllPurchases_args')
|
|
|
1396 |
if self.purchaseOrderId is not None:
|
|
|
1397 |
oprot.writeFieldBegin('purchaseOrderId', TType.I64, 1)
|
|
|
1398 |
oprot.writeI64(self.purchaseOrderId)
|
|
|
1399 |
oprot.writeFieldEnd()
|
|
|
1400 |
if self.open is not None:
|
|
|
1401 |
oprot.writeFieldBegin('open', TType.BOOL, 2)
|
|
|
1402 |
oprot.writeBool(self.open)
|
|
|
1403 |
oprot.writeFieldEnd()
|
|
|
1404 |
oprot.writeFieldStop()
|
|
|
1405 |
oprot.writeStructEnd()
|
|
|
1406 |
|
|
|
1407 |
def validate(self):
|
|
|
1408 |
return
|
|
|
1409 |
|
|
|
1410 |
|
|
|
1411 |
def __repr__(self):
|
|
|
1412 |
L = ['%s=%r' % (key, value)
|
|
|
1413 |
for key, value in self.__dict__.iteritems()]
|
|
|
1414 |
return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
|
|
|
1415 |
|
|
|
1416 |
def __eq__(self, other):
|
|
|
1417 |
return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
|
|
|
1418 |
|
|
|
1419 |
def __ne__(self, other):
|
|
|
1420 |
return not (self == other)
|
|
|
1421 |
|
|
|
1422 |
class getAllPurchases_result:
|
|
|
1423 |
"""
|
|
|
1424 |
Attributes:
|
|
|
1425 |
- success
|
|
|
1426 |
- e
|
|
|
1427 |
"""
|
|
|
1428 |
|
|
|
1429 |
thrift_spec = (
|
|
|
1430 |
(0, TType.LIST, 'success', (TType.STRUCT,(Purchase, Purchase.thrift_spec)), None, ), # 0
|
|
|
1431 |
(1, TType.STRUCT, 'e', (PurchaseServiceException, PurchaseServiceException.thrift_spec), None, ), # 1
|
|
|
1432 |
)
|
|
|
1433 |
|
|
|
1434 |
def __init__(self, success=None, e=None,):
|
|
|
1435 |
self.success = success
|
|
|
1436 |
self.e = e
|
|
|
1437 |
|
|
|
1438 |
def read(self, iprot):
|
|
|
1439 |
if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
|
|
|
1440 |
fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
|
|
|
1441 |
return
|
|
|
1442 |
iprot.readStructBegin()
|
|
|
1443 |
while True:
|
|
|
1444 |
(fname, ftype, fid) = iprot.readFieldBegin()
|
|
|
1445 |
if ftype == TType.STOP:
|
|
|
1446 |
break
|
|
|
1447 |
if fid == 0:
|
|
|
1448 |
if ftype == TType.LIST:
|
|
|
1449 |
self.success = []
|
|
|
1450 |
(_etype17, _size14) = iprot.readListBegin()
|
|
|
1451 |
for _i18 in xrange(_size14):
|
|
|
1452 |
_elem19 = Purchase()
|
|
|
1453 |
_elem19.read(iprot)
|
|
|
1454 |
self.success.append(_elem19)
|
|
|
1455 |
iprot.readListEnd()
|
|
|
1456 |
else:
|
|
|
1457 |
iprot.skip(ftype)
|
|
|
1458 |
elif fid == 1:
|
|
|
1459 |
if ftype == TType.STRUCT:
|
|
|
1460 |
self.e = PurchaseServiceException()
|
|
|
1461 |
self.e.read(iprot)
|
|
|
1462 |
else:
|
|
|
1463 |
iprot.skip(ftype)
|
|
|
1464 |
else:
|
|
|
1465 |
iprot.skip(ftype)
|
|
|
1466 |
iprot.readFieldEnd()
|
|
|
1467 |
iprot.readStructEnd()
|
|
|
1468 |
|
|
|
1469 |
def write(self, oprot):
|
|
|
1470 |
if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
|
|
|
1471 |
oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
|
|
|
1472 |
return
|
|
|
1473 |
oprot.writeStructBegin('getAllPurchases_result')
|
|
|
1474 |
if self.success is not None:
|
|
|
1475 |
oprot.writeFieldBegin('success', TType.LIST, 0)
|
|
|
1476 |
oprot.writeListBegin(TType.STRUCT, len(self.success))
|
|
|
1477 |
for iter20 in self.success:
|
|
|
1478 |
iter20.write(oprot)
|
|
|
1479 |
oprot.writeListEnd()
|
|
|
1480 |
oprot.writeFieldEnd()
|
|
|
1481 |
if self.e is not None:
|
|
|
1482 |
oprot.writeFieldBegin('e', TType.STRUCT, 1)
|
|
|
1483 |
self.e.write(oprot)
|
|
|
1484 |
oprot.writeFieldEnd()
|
|
|
1485 |
oprot.writeFieldStop()
|
|
|
1486 |
oprot.writeStructEnd()
|
|
|
1487 |
|
|
|
1488 |
def validate(self):
|
|
|
1489 |
return
|
|
|
1490 |
|
|
|
1491 |
|
|
|
1492 |
def __repr__(self):
|
|
|
1493 |
L = ['%s=%r' % (key, value)
|
|
|
1494 |
for key, value in self.__dict__.iteritems()]
|
|
|
1495 |
return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
|
|
|
1496 |
|
|
|
1497 |
def __eq__(self, other):
|
|
|
1498 |
return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
|
|
|
1499 |
|
|
|
1500 |
def __ne__(self, other):
|
|
|
1501 |
return not (self == other)
|
|
|
1502 |
|
| 4555 |
mandeep.dh |
1503 |
class getPurchaseOrderForPurchase_args:
|
| 4502 |
mandeep.dh |
1504 |
"""
|
|
|
1505 |
Attributes:
|
|
|
1506 |
- purchaseId
|
|
|
1507 |
"""
|
|
|
1508 |
|
|
|
1509 |
thrift_spec = (
|
|
|
1510 |
None, # 0
|
|
|
1511 |
(1, TType.I64, 'purchaseId', None, None, ), # 1
|
|
|
1512 |
)
|
|
|
1513 |
|
| 4555 |
mandeep.dh |
1514 |
def __init__(self, purchaseId=None,):
|
| 4502 |
mandeep.dh |
1515 |
self.purchaseId = purchaseId
|
|
|
1516 |
|
|
|
1517 |
def read(self, iprot):
|
|
|
1518 |
if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
|
|
|
1519 |
fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
|
|
|
1520 |
return
|
|
|
1521 |
iprot.readStructBegin()
|
|
|
1522 |
while True:
|
|
|
1523 |
(fname, ftype, fid) = iprot.readFieldBegin()
|
|
|
1524 |
if ftype == TType.STOP:
|
|
|
1525 |
break
|
|
|
1526 |
if fid == 1:
|
|
|
1527 |
if ftype == TType.I64:
|
|
|
1528 |
self.purchaseId = iprot.readI64();
|
|
|
1529 |
else:
|
|
|
1530 |
iprot.skip(ftype)
|
|
|
1531 |
else:
|
|
|
1532 |
iprot.skip(ftype)
|
|
|
1533 |
iprot.readFieldEnd()
|
|
|
1534 |
iprot.readStructEnd()
|
|
|
1535 |
|
|
|
1536 |
def write(self, oprot):
|
|
|
1537 |
if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
|
|
|
1538 |
oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
|
|
|
1539 |
return
|
| 4555 |
mandeep.dh |
1540 |
oprot.writeStructBegin('getPurchaseOrderForPurchase_args')
|
| 4502 |
mandeep.dh |
1541 |
if self.purchaseId is not None:
|
|
|
1542 |
oprot.writeFieldBegin('purchaseId', TType.I64, 1)
|
|
|
1543 |
oprot.writeI64(self.purchaseId)
|
|
|
1544 |
oprot.writeFieldEnd()
|
|
|
1545 |
oprot.writeFieldStop()
|
|
|
1546 |
oprot.writeStructEnd()
|
|
|
1547 |
|
|
|
1548 |
def validate(self):
|
|
|
1549 |
return
|
|
|
1550 |
|
|
|
1551 |
|
|
|
1552 |
def __repr__(self):
|
|
|
1553 |
L = ['%s=%r' % (key, value)
|
|
|
1554 |
for key, value in self.__dict__.iteritems()]
|
|
|
1555 |
return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
|
|
|
1556 |
|
|
|
1557 |
def __eq__(self, other):
|
|
|
1558 |
return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
|
|
|
1559 |
|
|
|
1560 |
def __ne__(self, other):
|
|
|
1561 |
return not (self == other)
|
|
|
1562 |
|
| 4555 |
mandeep.dh |
1563 |
class getPurchaseOrderForPurchase_result:
|
| 4502 |
mandeep.dh |
1564 |
"""
|
|
|
1565 |
Attributes:
|
|
|
1566 |
- success
|
|
|
1567 |
"""
|
|
|
1568 |
|
|
|
1569 |
thrift_spec = (
|
| 4555 |
mandeep.dh |
1570 |
(0, TType.STRUCT, 'success', (PurchaseOrder, PurchaseOrder.thrift_spec), None, ), # 0
|
| 4502 |
mandeep.dh |
1571 |
)
|
|
|
1572 |
|
|
|
1573 |
def __init__(self, success=None,):
|
|
|
1574 |
self.success = success
|
|
|
1575 |
|
|
|
1576 |
def read(self, iprot):
|
|
|
1577 |
if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
|
|
|
1578 |
fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
|
|
|
1579 |
return
|
|
|
1580 |
iprot.readStructBegin()
|
|
|
1581 |
while True:
|
|
|
1582 |
(fname, ftype, fid) = iprot.readFieldBegin()
|
|
|
1583 |
if ftype == TType.STOP:
|
|
|
1584 |
break
|
|
|
1585 |
if fid == 0:
|
| 4555 |
mandeep.dh |
1586 |
if ftype == TType.STRUCT:
|
|
|
1587 |
self.success = PurchaseOrder()
|
|
|
1588 |
self.success.read(iprot)
|
| 4502 |
mandeep.dh |
1589 |
else:
|
|
|
1590 |
iprot.skip(ftype)
|
|
|
1591 |
else:
|
|
|
1592 |
iprot.skip(ftype)
|
|
|
1593 |
iprot.readFieldEnd()
|
|
|
1594 |
iprot.readStructEnd()
|
|
|
1595 |
|
|
|
1596 |
def write(self, oprot):
|
|
|
1597 |
if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
|
|
|
1598 |
oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
|
|
|
1599 |
return
|
| 4555 |
mandeep.dh |
1600 |
oprot.writeStructBegin('getPurchaseOrderForPurchase_result')
|
| 4502 |
mandeep.dh |
1601 |
if self.success is not None:
|
| 4555 |
mandeep.dh |
1602 |
oprot.writeFieldBegin('success', TType.STRUCT, 0)
|
|
|
1603 |
self.success.write(oprot)
|
| 4502 |
mandeep.dh |
1604 |
oprot.writeFieldEnd()
|
|
|
1605 |
oprot.writeFieldStop()
|
|
|
1606 |
oprot.writeStructEnd()
|
|
|
1607 |
|
|
|
1608 |
def validate(self):
|
|
|
1609 |
return
|
|
|
1610 |
|
|
|
1611 |
|
|
|
1612 |
def __repr__(self):
|
|
|
1613 |
L = ['%s=%r' % (key, value)
|
|
|
1614 |
for key, value in self.__dict__.iteritems()]
|
|
|
1615 |
return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
|
|
|
1616 |
|
|
|
1617 |
def __eq__(self, other):
|
|
|
1618 |
return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
|
|
|
1619 |
|
|
|
1620 |
def __ne__(self, other):
|
|
|
1621 |
return not (self == other)
|