| 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.ttypes
|
|
|
9 |
|
|
|
10 |
|
|
|
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 POStatus:
|
|
|
20 |
INIT = 0
|
|
|
21 |
READY = 1
|
|
|
22 |
PARTIALLY_FULFILLED = 2
|
|
|
23 |
PRECLOSED = 3
|
|
|
24 |
CLOSED = 4
|
|
|
25 |
|
|
|
26 |
_VALUES_TO_NAMES = {
|
|
|
27 |
0: "INIT",
|
|
|
28 |
1: "READY",
|
|
|
29 |
2: "PARTIALLY_FULFILLED",
|
|
|
30 |
3: "PRECLOSED",
|
|
|
31 |
4: "CLOSED",
|
|
|
32 |
}
|
|
|
33 |
|
|
|
34 |
_NAMES_TO_VALUES = {
|
|
|
35 |
"INIT": 0,
|
|
|
36 |
"READY": 1,
|
|
|
37 |
"PARTIALLY_FULFILLED": 2,
|
|
|
38 |
"PRECLOSED": 3,
|
|
|
39 |
"CLOSED": 4,
|
|
|
40 |
}
|
|
|
41 |
|
| 6821 |
amar.kumar |
42 |
class POType:
|
|
|
43 |
REAL = 1
|
|
|
44 |
VIRTUAL = 2
|
| 4502 |
mandeep.dh |
45 |
|
| 6821 |
amar.kumar |
46 |
_VALUES_TO_NAMES = {
|
|
|
47 |
1: "REAL",
|
|
|
48 |
2: "VIRTUAL",
|
|
|
49 |
}
|
|
|
50 |
|
|
|
51 |
_NAMES_TO_VALUES = {
|
|
|
52 |
"REAL": 1,
|
|
|
53 |
"VIRTUAL": 2,
|
|
|
54 |
}
|
|
|
55 |
|
|
|
56 |
class PurchaseReturnType:
|
|
|
57 |
REAL = 1
|
|
|
58 |
VIRTUAL = 2
|
|
|
59 |
|
|
|
60 |
_VALUES_TO_NAMES = {
|
|
|
61 |
1: "REAL",
|
|
|
62 |
2: "VIRTUAL",
|
|
|
63 |
}
|
|
|
64 |
|
|
|
65 |
_NAMES_TO_VALUES = {
|
|
|
66 |
"REAL": 1,
|
|
|
67 |
"VIRTUAL": 2,
|
|
|
68 |
}
|
|
|
69 |
|
| 10864 |
manish.sha |
70 |
class PurchaseReturnInventoryType:
|
|
|
71 |
GOOD = 1
|
|
|
72 |
BAD = 2
|
|
|
73 |
|
|
|
74 |
_VALUES_TO_NAMES = {
|
|
|
75 |
1: "GOOD",
|
|
|
76 |
2: "BAD",
|
|
|
77 |
}
|
|
|
78 |
|
|
|
79 |
_NAMES_TO_VALUES = {
|
|
|
80 |
"GOOD": 1,
|
|
|
81 |
"BAD": 2,
|
|
|
82 |
}
|
|
|
83 |
|
| 9416 |
amar.kumar |
84 |
class TaxType:
|
|
|
85 |
VAT = 0
|
|
|
86 |
CST = 1
|
|
|
87 |
CFORM = 2
|
| 21844 |
amit.gupta |
88 |
IGST = 3
|
|
|
89 |
SGST = 4
|
| 6821 |
amar.kumar |
90 |
|
| 9416 |
amar.kumar |
91 |
_VALUES_TO_NAMES = {
|
|
|
92 |
0: "VAT",
|
|
|
93 |
1: "CST",
|
|
|
94 |
2: "CFORM",
|
| 21844 |
amit.gupta |
95 |
3: "IGST",
|
|
|
96 |
4: "SGST",
|
| 9416 |
amar.kumar |
97 |
}
|
|
|
98 |
|
|
|
99 |
_NAMES_TO_VALUES = {
|
|
|
100 |
"VAT": 0,
|
|
|
101 |
"CST": 1,
|
|
|
102 |
"CFORM": 2,
|
| 21844 |
amit.gupta |
103 |
"IGST": 3,
|
|
|
104 |
"SGST": 4,
|
| 9416 |
amar.kumar |
105 |
}
|
|
|
106 |
|
| 13600 |
manish.sha |
107 |
class PrReasonType:
|
|
|
108 |
WRONG_GRN = 1
|
|
|
109 |
ACTUAL_PR = 2
|
|
|
110 |
REPLACEMENT = 3
|
| 9416 |
amar.kumar |
111 |
|
| 13600 |
manish.sha |
112 |
_VALUES_TO_NAMES = {
|
|
|
113 |
1: "WRONG_GRN",
|
|
|
114 |
2: "ACTUAL_PR",
|
|
|
115 |
3: "REPLACEMENT",
|
|
|
116 |
}
|
|
|
117 |
|
|
|
118 |
_NAMES_TO_VALUES = {
|
|
|
119 |
"WRONG_GRN": 1,
|
|
|
120 |
"ACTUAL_PR": 2,
|
|
|
121 |
"REPLACEMENT": 3,
|
|
|
122 |
}
|
|
|
123 |
|
|
|
124 |
class SettlementType:
|
|
|
125 |
CREDIT_NOTE = 1
|
|
|
126 |
REPLACEMENT = 2
|
|
|
127 |
AGAINST_GRN = 3
|
|
|
128 |
|
|
|
129 |
_VALUES_TO_NAMES = {
|
|
|
130 |
1: "CREDIT_NOTE",
|
|
|
131 |
2: "REPLACEMENT",
|
|
|
132 |
3: "AGAINST_GRN",
|
|
|
133 |
}
|
|
|
134 |
|
|
|
135 |
_NAMES_TO_VALUES = {
|
|
|
136 |
"CREDIT_NOTE": 1,
|
|
|
137 |
"REPLACEMENT": 2,
|
|
|
138 |
"AGAINST_GRN": 3,
|
|
|
139 |
}
|
|
|
140 |
|
|
|
141 |
|
| 4502 |
mandeep.dh |
142 |
class Supplier:
|
|
|
143 |
"""
|
|
|
144 |
Attributes:
|
|
|
145 |
- id
|
|
|
146 |
- name
|
|
|
147 |
- phone
|
|
|
148 |
- fax
|
|
|
149 |
- tin
|
|
|
150 |
- pan
|
|
|
151 |
- headName
|
|
|
152 |
- headDesignation
|
|
|
153 |
- headEmail
|
|
|
154 |
- contactName
|
|
|
155 |
- contactPhone
|
|
|
156 |
- contactFax
|
|
|
157 |
- contactEmail
|
|
|
158 |
- registeredAddress
|
|
|
159 |
- communicationAddress
|
| 10295 |
amar.kumar |
160 |
- stateId
|
| 14072 |
manish.sha |
161 |
- poValidityLimit
|
| 21844 |
amit.gupta |
162 |
- gstin
|
| 23081 |
amit.gupta |
163 |
- tnc
|
| 4502 |
mandeep.dh |
164 |
"""
|
|
|
165 |
|
|
|
166 |
thrift_spec = (
|
|
|
167 |
None, # 0
|
|
|
168 |
(1, TType.I64, 'id', None, None, ), # 1
|
|
|
169 |
(2, TType.STRING, 'name', None, None, ), # 2
|
|
|
170 |
(3, TType.STRING, 'phone', None, None, ), # 3
|
|
|
171 |
(4, TType.STRING, 'fax', None, None, ), # 4
|
|
|
172 |
(5, TType.STRING, 'tin', None, None, ), # 5
|
|
|
173 |
(6, TType.STRING, 'pan', None, None, ), # 6
|
|
|
174 |
(7, TType.STRING, 'headName', None, None, ), # 7
|
|
|
175 |
(8, TType.STRING, 'headDesignation', None, None, ), # 8
|
|
|
176 |
(9, TType.STRING, 'headEmail', None, None, ), # 9
|
|
|
177 |
(10, TType.STRING, 'contactName', None, None, ), # 10
|
|
|
178 |
(11, TType.STRING, 'contactPhone', None, None, ), # 11
|
|
|
179 |
(12, TType.STRING, 'contactFax', None, None, ), # 12
|
|
|
180 |
(13, TType.STRING, 'contactEmail', None, None, ), # 13
|
|
|
181 |
(14, TType.STRING, 'registeredAddress', None, None, ), # 14
|
|
|
182 |
(15, TType.STRING, 'communicationAddress', None, None, ), # 15
|
| 10295 |
amar.kumar |
183 |
(16, TType.I64, 'stateId', None, None, ), # 16
|
| 14072 |
manish.sha |
184 |
(17, TType.I64, 'poValidityLimit', None, None, ), # 17
|
| 21844 |
amit.gupta |
185 |
(18, TType.STRING, 'gstin', None, None, ), # 18
|
| 23081 |
amit.gupta |
186 |
(19, TType.STRING, 'tnc', None, None, ), # 19
|
| 4502 |
mandeep.dh |
187 |
)
|
|
|
188 |
|
| 23081 |
amit.gupta |
189 |
def __init__(self, id=None, name=None, phone=None, fax=None, tin=None, pan=None, headName=None, headDesignation=None, headEmail=None, contactName=None, contactPhone=None, contactFax=None, contactEmail=None, registeredAddress=None, communicationAddress=None, stateId=None, poValidityLimit=None, gstin=None, tnc=None,):
|
| 4502 |
mandeep.dh |
190 |
self.id = id
|
|
|
191 |
self.name = name
|
|
|
192 |
self.phone = phone
|
|
|
193 |
self.fax = fax
|
|
|
194 |
self.tin = tin
|
|
|
195 |
self.pan = pan
|
|
|
196 |
self.headName = headName
|
|
|
197 |
self.headDesignation = headDesignation
|
|
|
198 |
self.headEmail = headEmail
|
|
|
199 |
self.contactName = contactName
|
|
|
200 |
self.contactPhone = contactPhone
|
|
|
201 |
self.contactFax = contactFax
|
|
|
202 |
self.contactEmail = contactEmail
|
|
|
203 |
self.registeredAddress = registeredAddress
|
|
|
204 |
self.communicationAddress = communicationAddress
|
| 10295 |
amar.kumar |
205 |
self.stateId = stateId
|
| 14072 |
manish.sha |
206 |
self.poValidityLimit = poValidityLimit
|
| 21844 |
amit.gupta |
207 |
self.gstin = gstin
|
| 23081 |
amit.gupta |
208 |
self.tnc = tnc
|
| 4502 |
mandeep.dh |
209 |
|
|
|
210 |
def read(self, iprot):
|
|
|
211 |
if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
|
|
|
212 |
fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
|
|
|
213 |
return
|
|
|
214 |
iprot.readStructBegin()
|
|
|
215 |
while True:
|
|
|
216 |
(fname, ftype, fid) = iprot.readFieldBegin()
|
|
|
217 |
if ftype == TType.STOP:
|
|
|
218 |
break
|
|
|
219 |
if fid == 1:
|
|
|
220 |
if ftype == TType.I64:
|
|
|
221 |
self.id = iprot.readI64();
|
|
|
222 |
else:
|
|
|
223 |
iprot.skip(ftype)
|
|
|
224 |
elif fid == 2:
|
|
|
225 |
if ftype == TType.STRING:
|
|
|
226 |
self.name = iprot.readString();
|
|
|
227 |
else:
|
|
|
228 |
iprot.skip(ftype)
|
|
|
229 |
elif fid == 3:
|
|
|
230 |
if ftype == TType.STRING:
|
|
|
231 |
self.phone = iprot.readString();
|
|
|
232 |
else:
|
|
|
233 |
iprot.skip(ftype)
|
|
|
234 |
elif fid == 4:
|
|
|
235 |
if ftype == TType.STRING:
|
|
|
236 |
self.fax = iprot.readString();
|
|
|
237 |
else:
|
|
|
238 |
iprot.skip(ftype)
|
|
|
239 |
elif fid == 5:
|
|
|
240 |
if ftype == TType.STRING:
|
|
|
241 |
self.tin = iprot.readString();
|
|
|
242 |
else:
|
|
|
243 |
iprot.skip(ftype)
|
|
|
244 |
elif fid == 6:
|
|
|
245 |
if ftype == TType.STRING:
|
|
|
246 |
self.pan = iprot.readString();
|
|
|
247 |
else:
|
|
|
248 |
iprot.skip(ftype)
|
|
|
249 |
elif fid == 7:
|
|
|
250 |
if ftype == TType.STRING:
|
|
|
251 |
self.headName = iprot.readString();
|
|
|
252 |
else:
|
|
|
253 |
iprot.skip(ftype)
|
|
|
254 |
elif fid == 8:
|
|
|
255 |
if ftype == TType.STRING:
|
|
|
256 |
self.headDesignation = iprot.readString();
|
|
|
257 |
else:
|
|
|
258 |
iprot.skip(ftype)
|
|
|
259 |
elif fid == 9:
|
|
|
260 |
if ftype == TType.STRING:
|
|
|
261 |
self.headEmail = iprot.readString();
|
|
|
262 |
else:
|
|
|
263 |
iprot.skip(ftype)
|
|
|
264 |
elif fid == 10:
|
|
|
265 |
if ftype == TType.STRING:
|
|
|
266 |
self.contactName = iprot.readString();
|
|
|
267 |
else:
|
|
|
268 |
iprot.skip(ftype)
|
|
|
269 |
elif fid == 11:
|
|
|
270 |
if ftype == TType.STRING:
|
|
|
271 |
self.contactPhone = iprot.readString();
|
|
|
272 |
else:
|
|
|
273 |
iprot.skip(ftype)
|
|
|
274 |
elif fid == 12:
|
|
|
275 |
if ftype == TType.STRING:
|
|
|
276 |
self.contactFax = iprot.readString();
|
|
|
277 |
else:
|
|
|
278 |
iprot.skip(ftype)
|
|
|
279 |
elif fid == 13:
|
|
|
280 |
if ftype == TType.STRING:
|
|
|
281 |
self.contactEmail = iprot.readString();
|
|
|
282 |
else:
|
|
|
283 |
iprot.skip(ftype)
|
|
|
284 |
elif fid == 14:
|
|
|
285 |
if ftype == TType.STRING:
|
|
|
286 |
self.registeredAddress = iprot.readString();
|
|
|
287 |
else:
|
|
|
288 |
iprot.skip(ftype)
|
|
|
289 |
elif fid == 15:
|
|
|
290 |
if ftype == TType.STRING:
|
|
|
291 |
self.communicationAddress = iprot.readString();
|
|
|
292 |
else:
|
|
|
293 |
iprot.skip(ftype)
|
| 10295 |
amar.kumar |
294 |
elif fid == 16:
|
|
|
295 |
if ftype == TType.I64:
|
|
|
296 |
self.stateId = iprot.readI64();
|
|
|
297 |
else:
|
|
|
298 |
iprot.skip(ftype)
|
| 14072 |
manish.sha |
299 |
elif fid == 17:
|
|
|
300 |
if ftype == TType.I64:
|
|
|
301 |
self.poValidityLimit = iprot.readI64();
|
|
|
302 |
else:
|
|
|
303 |
iprot.skip(ftype)
|
| 21844 |
amit.gupta |
304 |
elif fid == 18:
|
|
|
305 |
if ftype == TType.STRING:
|
|
|
306 |
self.gstin = iprot.readString();
|
|
|
307 |
else:
|
|
|
308 |
iprot.skip(ftype)
|
| 23081 |
amit.gupta |
309 |
elif fid == 19:
|
|
|
310 |
if ftype == TType.STRING:
|
|
|
311 |
self.tnc = iprot.readString();
|
|
|
312 |
else:
|
|
|
313 |
iprot.skip(ftype)
|
| 4502 |
mandeep.dh |
314 |
else:
|
|
|
315 |
iprot.skip(ftype)
|
|
|
316 |
iprot.readFieldEnd()
|
|
|
317 |
iprot.readStructEnd()
|
|
|
318 |
|
|
|
319 |
def write(self, oprot):
|
|
|
320 |
if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
|
|
|
321 |
oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
|
|
|
322 |
return
|
|
|
323 |
oprot.writeStructBegin('Supplier')
|
|
|
324 |
if self.id is not None:
|
|
|
325 |
oprot.writeFieldBegin('id', TType.I64, 1)
|
|
|
326 |
oprot.writeI64(self.id)
|
|
|
327 |
oprot.writeFieldEnd()
|
|
|
328 |
if self.name is not None:
|
|
|
329 |
oprot.writeFieldBegin('name', TType.STRING, 2)
|
|
|
330 |
oprot.writeString(self.name)
|
|
|
331 |
oprot.writeFieldEnd()
|
|
|
332 |
if self.phone is not None:
|
|
|
333 |
oprot.writeFieldBegin('phone', TType.STRING, 3)
|
|
|
334 |
oprot.writeString(self.phone)
|
|
|
335 |
oprot.writeFieldEnd()
|
|
|
336 |
if self.fax is not None:
|
|
|
337 |
oprot.writeFieldBegin('fax', TType.STRING, 4)
|
|
|
338 |
oprot.writeString(self.fax)
|
|
|
339 |
oprot.writeFieldEnd()
|
|
|
340 |
if self.tin is not None:
|
|
|
341 |
oprot.writeFieldBegin('tin', TType.STRING, 5)
|
|
|
342 |
oprot.writeString(self.tin)
|
|
|
343 |
oprot.writeFieldEnd()
|
|
|
344 |
if self.pan is not None:
|
|
|
345 |
oprot.writeFieldBegin('pan', TType.STRING, 6)
|
|
|
346 |
oprot.writeString(self.pan)
|
|
|
347 |
oprot.writeFieldEnd()
|
|
|
348 |
if self.headName is not None:
|
|
|
349 |
oprot.writeFieldBegin('headName', TType.STRING, 7)
|
|
|
350 |
oprot.writeString(self.headName)
|
|
|
351 |
oprot.writeFieldEnd()
|
|
|
352 |
if self.headDesignation is not None:
|
|
|
353 |
oprot.writeFieldBegin('headDesignation', TType.STRING, 8)
|
|
|
354 |
oprot.writeString(self.headDesignation)
|
|
|
355 |
oprot.writeFieldEnd()
|
|
|
356 |
if self.headEmail is not None:
|
|
|
357 |
oprot.writeFieldBegin('headEmail', TType.STRING, 9)
|
|
|
358 |
oprot.writeString(self.headEmail)
|
|
|
359 |
oprot.writeFieldEnd()
|
|
|
360 |
if self.contactName is not None:
|
|
|
361 |
oprot.writeFieldBegin('contactName', TType.STRING, 10)
|
|
|
362 |
oprot.writeString(self.contactName)
|
|
|
363 |
oprot.writeFieldEnd()
|
|
|
364 |
if self.contactPhone is not None:
|
|
|
365 |
oprot.writeFieldBegin('contactPhone', TType.STRING, 11)
|
|
|
366 |
oprot.writeString(self.contactPhone)
|
|
|
367 |
oprot.writeFieldEnd()
|
|
|
368 |
if self.contactFax is not None:
|
|
|
369 |
oprot.writeFieldBegin('contactFax', TType.STRING, 12)
|
|
|
370 |
oprot.writeString(self.contactFax)
|
|
|
371 |
oprot.writeFieldEnd()
|
|
|
372 |
if self.contactEmail is not None:
|
|
|
373 |
oprot.writeFieldBegin('contactEmail', TType.STRING, 13)
|
|
|
374 |
oprot.writeString(self.contactEmail)
|
|
|
375 |
oprot.writeFieldEnd()
|
|
|
376 |
if self.registeredAddress is not None:
|
|
|
377 |
oprot.writeFieldBegin('registeredAddress', TType.STRING, 14)
|
|
|
378 |
oprot.writeString(self.registeredAddress)
|
|
|
379 |
oprot.writeFieldEnd()
|
|
|
380 |
if self.communicationAddress is not None:
|
|
|
381 |
oprot.writeFieldBegin('communicationAddress', TType.STRING, 15)
|
|
|
382 |
oprot.writeString(self.communicationAddress)
|
|
|
383 |
oprot.writeFieldEnd()
|
| 10295 |
amar.kumar |
384 |
if self.stateId is not None:
|
|
|
385 |
oprot.writeFieldBegin('stateId', TType.I64, 16)
|
|
|
386 |
oprot.writeI64(self.stateId)
|
|
|
387 |
oprot.writeFieldEnd()
|
| 14072 |
manish.sha |
388 |
if self.poValidityLimit is not None:
|
|
|
389 |
oprot.writeFieldBegin('poValidityLimit', TType.I64, 17)
|
|
|
390 |
oprot.writeI64(self.poValidityLimit)
|
|
|
391 |
oprot.writeFieldEnd()
|
| 21844 |
amit.gupta |
392 |
if self.gstin is not None:
|
|
|
393 |
oprot.writeFieldBegin('gstin', TType.STRING, 18)
|
|
|
394 |
oprot.writeString(self.gstin)
|
|
|
395 |
oprot.writeFieldEnd()
|
| 23081 |
amit.gupta |
396 |
if self.tnc is not None:
|
|
|
397 |
oprot.writeFieldBegin('tnc', TType.STRING, 19)
|
|
|
398 |
oprot.writeString(self.tnc)
|
|
|
399 |
oprot.writeFieldEnd()
|
| 4502 |
mandeep.dh |
400 |
oprot.writeFieldStop()
|
|
|
401 |
oprot.writeStructEnd()
|
|
|
402 |
|
|
|
403 |
def validate(self):
|
|
|
404 |
return
|
|
|
405 |
|
|
|
406 |
|
|
|
407 |
def __repr__(self):
|
|
|
408 |
L = ['%s=%r' % (key, value)
|
|
|
409 |
for key, value in self.__dict__.iteritems()]
|
|
|
410 |
return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
|
|
|
411 |
|
|
|
412 |
def __eq__(self, other):
|
|
|
413 |
return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
|
|
|
414 |
|
|
|
415 |
def __ne__(self, other):
|
|
|
416 |
return not (self == other)
|
|
|
417 |
|
|
|
418 |
class LineItem:
|
|
|
419 |
"""
|
|
|
420 |
Attributes:
|
|
|
421 |
- orderId
|
|
|
422 |
- itemId
|
|
|
423 |
- productGroup
|
|
|
424 |
- brand
|
|
|
425 |
- modelNumber
|
|
|
426 |
- modelName
|
|
|
427 |
- color
|
|
|
428 |
- itemNumber
|
|
|
429 |
- quantity
|
|
|
430 |
- unfulfilledQuantity
|
|
|
431 |
- createdAt
|
|
|
432 |
- unitPrice
|
|
|
433 |
- fulfilled
|
| 4754 |
mandeep.dh |
434 |
- codCount
|
| 6821 |
amar.kumar |
435 |
- availableQuantity
|
|
|
436 |
- reservedQuantity
|
|
|
437 |
- avgSales
|
|
|
438 |
- minStockLevel
|
|
|
439 |
- numberOfDaysStock
|
|
|
440 |
- suggestedQuantity
|
|
|
441 |
- numberOfDaysInStock
|
| 8182 |
amar.kumar |
442 |
- rtoOrders
|
| 6857 |
amar.kumar |
443 |
- lastXdaysSale
|
| 6880 |
amar.kumar |
444 |
- previouslyOrderedQty
|
| 7672 |
rajveer |
445 |
- nlc
|
| 9416 |
amar.kumar |
446 |
- mrp
|
| 12357 |
manish.sha |
447 |
- nlcP
|
|
|
448 |
- vatDiff
|
| 21844 |
amit.gupta |
449 |
- igstRate
|
|
|
450 |
- cgstRate
|
|
|
451 |
- sgstRate
|
|
|
452 |
- hsnCode
|
| 24832 |
tejbeer |
453 |
- invoicePrice
|
|
|
454 |
- tp
|
| 4502 |
mandeep.dh |
455 |
"""
|
|
|
456 |
|
|
|
457 |
thrift_spec = (
|
|
|
458 |
None, # 0
|
|
|
459 |
(1, TType.I64, 'orderId', None, None, ), # 1
|
|
|
460 |
(2, TType.I64, 'itemId', None, None, ), # 2
|
|
|
461 |
(3, TType.STRING, 'productGroup', None, None, ), # 3
|
|
|
462 |
(4, TType.STRING, 'brand', None, None, ), # 4
|
|
|
463 |
(5, TType.STRING, 'modelNumber', None, None, ), # 5
|
|
|
464 |
(6, TType.STRING, 'modelName', None, None, ), # 6
|
|
|
465 |
(7, TType.STRING, 'color', None, None, ), # 7
|
|
|
466 |
(8, TType.STRING, 'itemNumber', None, None, ), # 8
|
|
|
467 |
(9, TType.DOUBLE, 'quantity', None, None, ), # 9
|
|
|
468 |
(10, TType.DOUBLE, 'unfulfilledQuantity', None, None, ), # 10
|
|
|
469 |
(11, TType.I64, 'createdAt', None, None, ), # 11
|
|
|
470 |
(12, TType.DOUBLE, 'unitPrice', None, None, ), # 12
|
|
|
471 |
(13, TType.BOOL, 'fulfilled', None, None, ), # 13
|
| 4754 |
mandeep.dh |
472 |
(14, TType.I64, 'codCount', None, None, ), # 14
|
| 6821 |
amar.kumar |
473 |
(15, TType.I64, 'availableQuantity', None, None, ), # 15
|
|
|
474 |
(16, TType.I64, 'reservedQuantity', None, None, ), # 16
|
|
|
475 |
(17, TType.DOUBLE, 'avgSales', None, None, ), # 17
|
|
|
476 |
(18, TType.I64, 'minStockLevel', None, None, ), # 18
|
|
|
477 |
(19, TType.I64, 'numberOfDaysStock', None, None, ), # 19
|
|
|
478 |
(20, TType.I64, 'suggestedQuantity', None, None, ), # 20
|
|
|
479 |
(21, TType.I64, 'numberOfDaysInStock', None, None, ), # 21
|
| 8182 |
amar.kumar |
480 |
(22, TType.I64, 'rtoOrders', None, None, ), # 22
|
|
|
481 |
(23, TType.STRING, 'lastXdaysSale', None, None, ), # 23
|
|
|
482 |
(24, TType.I64, 'previouslyOrderedQty', None, None, ), # 24
|
|
|
483 |
(25, TType.DOUBLE, 'nlc', None, None, ), # 25
|
| 9416 |
amar.kumar |
484 |
(26, TType.DOUBLE, 'mrp', None, None, ), # 26
|
| 12357 |
manish.sha |
485 |
(27, TType.DOUBLE, 'nlcP', None, None, ), # 27
|
|
|
486 |
(28, TType.DOUBLE, 'vatDiff', None, None, ), # 28
|
| 21844 |
amit.gupta |
487 |
(29, TType.DOUBLE, 'igstRate', None, None, ), # 29
|
|
|
488 |
(30, TType.DOUBLE, 'cgstRate', None, None, ), # 30
|
|
|
489 |
(31, TType.DOUBLE, 'sgstRate', None, None, ), # 31
|
|
|
490 |
(32, TType.STRING, 'hsnCode', None, None, ), # 32
|
| 24832 |
tejbeer |
491 |
(33, TType.DOUBLE, 'invoicePrice', None, None, ), # 33
|
|
|
492 |
(34, TType.DOUBLE, 'tp', None, None, ), # 34
|
| 4502 |
mandeep.dh |
493 |
)
|
|
|
494 |
|
| 24832 |
tejbeer |
495 |
def __init__(self, orderId=None, itemId=None, productGroup=None, brand=None, modelNumber=None, modelName=None, color=None, itemNumber=None, quantity=None, unfulfilledQuantity=None, createdAt=None, unitPrice=None, fulfilled=None, codCount=None, availableQuantity=None, reservedQuantity=None, avgSales=None, minStockLevel=None, numberOfDaysStock=None, suggestedQuantity=None, numberOfDaysInStock=None, rtoOrders=None, lastXdaysSale=None, previouslyOrderedQty=None, nlc=None, mrp=None, nlcP=None, vatDiff=None, igstRate=None, cgstRate=None, sgstRate=None, hsnCode=None, invoicePrice=None, tp=None,):
|
| 4502 |
mandeep.dh |
496 |
self.orderId = orderId
|
|
|
497 |
self.itemId = itemId
|
|
|
498 |
self.productGroup = productGroup
|
|
|
499 |
self.brand = brand
|
|
|
500 |
self.modelNumber = modelNumber
|
|
|
501 |
self.modelName = modelName
|
|
|
502 |
self.color = color
|
|
|
503 |
self.itemNumber = itemNumber
|
|
|
504 |
self.quantity = quantity
|
|
|
505 |
self.unfulfilledQuantity = unfulfilledQuantity
|
|
|
506 |
self.createdAt = createdAt
|
|
|
507 |
self.unitPrice = unitPrice
|
|
|
508 |
self.fulfilled = fulfilled
|
| 4754 |
mandeep.dh |
509 |
self.codCount = codCount
|
| 6821 |
amar.kumar |
510 |
self.availableQuantity = availableQuantity
|
|
|
511 |
self.reservedQuantity = reservedQuantity
|
|
|
512 |
self.avgSales = avgSales
|
|
|
513 |
self.minStockLevel = minStockLevel
|
|
|
514 |
self.numberOfDaysStock = numberOfDaysStock
|
|
|
515 |
self.suggestedQuantity = suggestedQuantity
|
|
|
516 |
self.numberOfDaysInStock = numberOfDaysInStock
|
| 8182 |
amar.kumar |
517 |
self.rtoOrders = rtoOrders
|
| 6857 |
amar.kumar |
518 |
self.lastXdaysSale = lastXdaysSale
|
| 6880 |
amar.kumar |
519 |
self.previouslyOrderedQty = previouslyOrderedQty
|
| 7672 |
rajveer |
520 |
self.nlc = nlc
|
| 9416 |
amar.kumar |
521 |
self.mrp = mrp
|
| 12357 |
manish.sha |
522 |
self.nlcP = nlcP
|
|
|
523 |
self.vatDiff = vatDiff
|
| 21844 |
amit.gupta |
524 |
self.igstRate = igstRate
|
|
|
525 |
self.cgstRate = cgstRate
|
|
|
526 |
self.sgstRate = sgstRate
|
|
|
527 |
self.hsnCode = hsnCode
|
| 24832 |
tejbeer |
528 |
self.invoicePrice = invoicePrice
|
|
|
529 |
self.tp = tp
|
| 4502 |
mandeep.dh |
530 |
|
|
|
531 |
def read(self, iprot):
|
|
|
532 |
if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
|
|
|
533 |
fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
|
|
|
534 |
return
|
|
|
535 |
iprot.readStructBegin()
|
|
|
536 |
while True:
|
|
|
537 |
(fname, ftype, fid) = iprot.readFieldBegin()
|
|
|
538 |
if ftype == TType.STOP:
|
|
|
539 |
break
|
|
|
540 |
if fid == 1:
|
|
|
541 |
if ftype == TType.I64:
|
|
|
542 |
self.orderId = iprot.readI64();
|
|
|
543 |
else:
|
|
|
544 |
iprot.skip(ftype)
|
|
|
545 |
elif fid == 2:
|
|
|
546 |
if ftype == TType.I64:
|
|
|
547 |
self.itemId = iprot.readI64();
|
|
|
548 |
else:
|
|
|
549 |
iprot.skip(ftype)
|
|
|
550 |
elif fid == 3:
|
|
|
551 |
if ftype == TType.STRING:
|
|
|
552 |
self.productGroup = iprot.readString();
|
|
|
553 |
else:
|
|
|
554 |
iprot.skip(ftype)
|
|
|
555 |
elif fid == 4:
|
|
|
556 |
if ftype == TType.STRING:
|
|
|
557 |
self.brand = iprot.readString();
|
|
|
558 |
else:
|
|
|
559 |
iprot.skip(ftype)
|
|
|
560 |
elif fid == 5:
|
|
|
561 |
if ftype == TType.STRING:
|
|
|
562 |
self.modelNumber = iprot.readString();
|
|
|
563 |
else:
|
|
|
564 |
iprot.skip(ftype)
|
|
|
565 |
elif fid == 6:
|
|
|
566 |
if ftype == TType.STRING:
|
|
|
567 |
self.modelName = iprot.readString();
|
|
|
568 |
else:
|
|
|
569 |
iprot.skip(ftype)
|
|
|
570 |
elif fid == 7:
|
|
|
571 |
if ftype == TType.STRING:
|
|
|
572 |
self.color = iprot.readString();
|
|
|
573 |
else:
|
|
|
574 |
iprot.skip(ftype)
|
|
|
575 |
elif fid == 8:
|
|
|
576 |
if ftype == TType.STRING:
|
|
|
577 |
self.itemNumber = iprot.readString();
|
|
|
578 |
else:
|
|
|
579 |
iprot.skip(ftype)
|
|
|
580 |
elif fid == 9:
|
|
|
581 |
if ftype == TType.DOUBLE:
|
|
|
582 |
self.quantity = iprot.readDouble();
|
|
|
583 |
else:
|
|
|
584 |
iprot.skip(ftype)
|
|
|
585 |
elif fid == 10:
|
|
|
586 |
if ftype == TType.DOUBLE:
|
|
|
587 |
self.unfulfilledQuantity = iprot.readDouble();
|
|
|
588 |
else:
|
|
|
589 |
iprot.skip(ftype)
|
|
|
590 |
elif fid == 11:
|
|
|
591 |
if ftype == TType.I64:
|
|
|
592 |
self.createdAt = iprot.readI64();
|
|
|
593 |
else:
|
|
|
594 |
iprot.skip(ftype)
|
|
|
595 |
elif fid == 12:
|
|
|
596 |
if ftype == TType.DOUBLE:
|
|
|
597 |
self.unitPrice = iprot.readDouble();
|
|
|
598 |
else:
|
|
|
599 |
iprot.skip(ftype)
|
|
|
600 |
elif fid == 13:
|
|
|
601 |
if ftype == TType.BOOL:
|
|
|
602 |
self.fulfilled = iprot.readBool();
|
|
|
603 |
else:
|
|
|
604 |
iprot.skip(ftype)
|
| 4754 |
mandeep.dh |
605 |
elif fid == 14:
|
|
|
606 |
if ftype == TType.I64:
|
|
|
607 |
self.codCount = iprot.readI64();
|
|
|
608 |
else:
|
|
|
609 |
iprot.skip(ftype)
|
| 6821 |
amar.kumar |
610 |
elif fid == 15:
|
|
|
611 |
if ftype == TType.I64:
|
|
|
612 |
self.availableQuantity = iprot.readI64();
|
|
|
613 |
else:
|
|
|
614 |
iprot.skip(ftype)
|
|
|
615 |
elif fid == 16:
|
|
|
616 |
if ftype == TType.I64:
|
|
|
617 |
self.reservedQuantity = iprot.readI64();
|
|
|
618 |
else:
|
|
|
619 |
iprot.skip(ftype)
|
|
|
620 |
elif fid == 17:
|
|
|
621 |
if ftype == TType.DOUBLE:
|
|
|
622 |
self.avgSales = iprot.readDouble();
|
|
|
623 |
else:
|
|
|
624 |
iprot.skip(ftype)
|
|
|
625 |
elif fid == 18:
|
|
|
626 |
if ftype == TType.I64:
|
|
|
627 |
self.minStockLevel = iprot.readI64();
|
|
|
628 |
else:
|
|
|
629 |
iprot.skip(ftype)
|
|
|
630 |
elif fid == 19:
|
|
|
631 |
if ftype == TType.I64:
|
|
|
632 |
self.numberOfDaysStock = iprot.readI64();
|
|
|
633 |
else:
|
|
|
634 |
iprot.skip(ftype)
|
|
|
635 |
elif fid == 20:
|
|
|
636 |
if ftype == TType.I64:
|
|
|
637 |
self.suggestedQuantity = iprot.readI64();
|
|
|
638 |
else:
|
|
|
639 |
iprot.skip(ftype)
|
|
|
640 |
elif fid == 21:
|
|
|
641 |
if ftype == TType.I64:
|
|
|
642 |
self.numberOfDaysInStock = iprot.readI64();
|
|
|
643 |
else:
|
|
|
644 |
iprot.skip(ftype)
|
| 6857 |
amar.kumar |
645 |
elif fid == 22:
|
| 8182 |
amar.kumar |
646 |
if ftype == TType.I64:
|
|
|
647 |
self.rtoOrders = iprot.readI64();
|
|
|
648 |
else:
|
|
|
649 |
iprot.skip(ftype)
|
|
|
650 |
elif fid == 23:
|
| 6857 |
amar.kumar |
651 |
if ftype == TType.STRING:
|
|
|
652 |
self.lastXdaysSale = iprot.readString();
|
|
|
653 |
else:
|
|
|
654 |
iprot.skip(ftype)
|
| 8182 |
amar.kumar |
655 |
elif fid == 24:
|
| 6880 |
amar.kumar |
656 |
if ftype == TType.I64:
|
|
|
657 |
self.previouslyOrderedQty = iprot.readI64();
|
|
|
658 |
else:
|
|
|
659 |
iprot.skip(ftype)
|
| 8182 |
amar.kumar |
660 |
elif fid == 25:
|
| 7672 |
rajveer |
661 |
if ftype == TType.DOUBLE:
|
|
|
662 |
self.nlc = iprot.readDouble();
|
|
|
663 |
else:
|
|
|
664 |
iprot.skip(ftype)
|
| 9416 |
amar.kumar |
665 |
elif fid == 26:
|
|
|
666 |
if ftype == TType.DOUBLE:
|
|
|
667 |
self.mrp = iprot.readDouble();
|
|
|
668 |
else:
|
|
|
669 |
iprot.skip(ftype)
|
| 12357 |
manish.sha |
670 |
elif fid == 27:
|
|
|
671 |
if ftype == TType.DOUBLE:
|
|
|
672 |
self.nlcP = iprot.readDouble();
|
|
|
673 |
else:
|
|
|
674 |
iprot.skip(ftype)
|
|
|
675 |
elif fid == 28:
|
|
|
676 |
if ftype == TType.DOUBLE:
|
|
|
677 |
self.vatDiff = iprot.readDouble();
|
|
|
678 |
else:
|
|
|
679 |
iprot.skip(ftype)
|
| 21844 |
amit.gupta |
680 |
elif fid == 29:
|
|
|
681 |
if ftype == TType.DOUBLE:
|
|
|
682 |
self.igstRate = iprot.readDouble();
|
|
|
683 |
else:
|
|
|
684 |
iprot.skip(ftype)
|
|
|
685 |
elif fid == 30:
|
|
|
686 |
if ftype == TType.DOUBLE:
|
|
|
687 |
self.cgstRate = iprot.readDouble();
|
|
|
688 |
else:
|
|
|
689 |
iprot.skip(ftype)
|
|
|
690 |
elif fid == 31:
|
|
|
691 |
if ftype == TType.DOUBLE:
|
|
|
692 |
self.sgstRate = iprot.readDouble();
|
|
|
693 |
else:
|
|
|
694 |
iprot.skip(ftype)
|
|
|
695 |
elif fid == 32:
|
|
|
696 |
if ftype == TType.STRING:
|
|
|
697 |
self.hsnCode = iprot.readString();
|
|
|
698 |
else:
|
|
|
699 |
iprot.skip(ftype)
|
| 24832 |
tejbeer |
700 |
elif fid == 33:
|
|
|
701 |
if ftype == TType.DOUBLE:
|
|
|
702 |
self.invoicePrice = iprot.readDouble();
|
|
|
703 |
else:
|
|
|
704 |
iprot.skip(ftype)
|
|
|
705 |
elif fid == 34:
|
|
|
706 |
if ftype == TType.DOUBLE:
|
|
|
707 |
self.tp = iprot.readDouble();
|
|
|
708 |
else:
|
|
|
709 |
iprot.skip(ftype)
|
| 4502 |
mandeep.dh |
710 |
else:
|
|
|
711 |
iprot.skip(ftype)
|
|
|
712 |
iprot.readFieldEnd()
|
|
|
713 |
iprot.readStructEnd()
|
|
|
714 |
|
|
|
715 |
def write(self, oprot):
|
|
|
716 |
if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
|
|
|
717 |
oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
|
|
|
718 |
return
|
|
|
719 |
oprot.writeStructBegin('LineItem')
|
|
|
720 |
if self.orderId is not None:
|
|
|
721 |
oprot.writeFieldBegin('orderId', TType.I64, 1)
|
|
|
722 |
oprot.writeI64(self.orderId)
|
|
|
723 |
oprot.writeFieldEnd()
|
|
|
724 |
if self.itemId is not None:
|
|
|
725 |
oprot.writeFieldBegin('itemId', TType.I64, 2)
|
|
|
726 |
oprot.writeI64(self.itemId)
|
|
|
727 |
oprot.writeFieldEnd()
|
|
|
728 |
if self.productGroup is not None:
|
|
|
729 |
oprot.writeFieldBegin('productGroup', TType.STRING, 3)
|
|
|
730 |
oprot.writeString(self.productGroup)
|
|
|
731 |
oprot.writeFieldEnd()
|
|
|
732 |
if self.brand is not None:
|
|
|
733 |
oprot.writeFieldBegin('brand', TType.STRING, 4)
|
|
|
734 |
oprot.writeString(self.brand)
|
|
|
735 |
oprot.writeFieldEnd()
|
|
|
736 |
if self.modelNumber is not None:
|
|
|
737 |
oprot.writeFieldBegin('modelNumber', TType.STRING, 5)
|
|
|
738 |
oprot.writeString(self.modelNumber)
|
|
|
739 |
oprot.writeFieldEnd()
|
|
|
740 |
if self.modelName is not None:
|
|
|
741 |
oprot.writeFieldBegin('modelName', TType.STRING, 6)
|
|
|
742 |
oprot.writeString(self.modelName)
|
|
|
743 |
oprot.writeFieldEnd()
|
|
|
744 |
if self.color is not None:
|
|
|
745 |
oprot.writeFieldBegin('color', TType.STRING, 7)
|
|
|
746 |
oprot.writeString(self.color)
|
|
|
747 |
oprot.writeFieldEnd()
|
|
|
748 |
if self.itemNumber is not None:
|
|
|
749 |
oprot.writeFieldBegin('itemNumber', TType.STRING, 8)
|
|
|
750 |
oprot.writeString(self.itemNumber)
|
|
|
751 |
oprot.writeFieldEnd()
|
|
|
752 |
if self.quantity is not None:
|
|
|
753 |
oprot.writeFieldBegin('quantity', TType.DOUBLE, 9)
|
|
|
754 |
oprot.writeDouble(self.quantity)
|
|
|
755 |
oprot.writeFieldEnd()
|
|
|
756 |
if self.unfulfilledQuantity is not None:
|
|
|
757 |
oprot.writeFieldBegin('unfulfilledQuantity', TType.DOUBLE, 10)
|
|
|
758 |
oprot.writeDouble(self.unfulfilledQuantity)
|
|
|
759 |
oprot.writeFieldEnd()
|
|
|
760 |
if self.createdAt is not None:
|
|
|
761 |
oprot.writeFieldBegin('createdAt', TType.I64, 11)
|
|
|
762 |
oprot.writeI64(self.createdAt)
|
|
|
763 |
oprot.writeFieldEnd()
|
|
|
764 |
if self.unitPrice is not None:
|
|
|
765 |
oprot.writeFieldBegin('unitPrice', TType.DOUBLE, 12)
|
|
|
766 |
oprot.writeDouble(self.unitPrice)
|
|
|
767 |
oprot.writeFieldEnd()
|
|
|
768 |
if self.fulfilled is not None:
|
|
|
769 |
oprot.writeFieldBegin('fulfilled', TType.BOOL, 13)
|
|
|
770 |
oprot.writeBool(self.fulfilled)
|
|
|
771 |
oprot.writeFieldEnd()
|
| 4754 |
mandeep.dh |
772 |
if self.codCount is not None:
|
|
|
773 |
oprot.writeFieldBegin('codCount', TType.I64, 14)
|
|
|
774 |
oprot.writeI64(self.codCount)
|
|
|
775 |
oprot.writeFieldEnd()
|
| 6821 |
amar.kumar |
776 |
if self.availableQuantity is not None:
|
|
|
777 |
oprot.writeFieldBegin('availableQuantity', TType.I64, 15)
|
|
|
778 |
oprot.writeI64(self.availableQuantity)
|
|
|
779 |
oprot.writeFieldEnd()
|
|
|
780 |
if self.reservedQuantity is not None:
|
|
|
781 |
oprot.writeFieldBegin('reservedQuantity', TType.I64, 16)
|
|
|
782 |
oprot.writeI64(self.reservedQuantity)
|
|
|
783 |
oprot.writeFieldEnd()
|
|
|
784 |
if self.avgSales is not None:
|
|
|
785 |
oprot.writeFieldBegin('avgSales', TType.DOUBLE, 17)
|
|
|
786 |
oprot.writeDouble(self.avgSales)
|
|
|
787 |
oprot.writeFieldEnd()
|
|
|
788 |
if self.minStockLevel is not None:
|
|
|
789 |
oprot.writeFieldBegin('minStockLevel', TType.I64, 18)
|
|
|
790 |
oprot.writeI64(self.minStockLevel)
|
|
|
791 |
oprot.writeFieldEnd()
|
|
|
792 |
if self.numberOfDaysStock is not None:
|
|
|
793 |
oprot.writeFieldBegin('numberOfDaysStock', TType.I64, 19)
|
|
|
794 |
oprot.writeI64(self.numberOfDaysStock)
|
|
|
795 |
oprot.writeFieldEnd()
|
|
|
796 |
if self.suggestedQuantity is not None:
|
|
|
797 |
oprot.writeFieldBegin('suggestedQuantity', TType.I64, 20)
|
|
|
798 |
oprot.writeI64(self.suggestedQuantity)
|
|
|
799 |
oprot.writeFieldEnd()
|
|
|
800 |
if self.numberOfDaysInStock is not None:
|
|
|
801 |
oprot.writeFieldBegin('numberOfDaysInStock', TType.I64, 21)
|
|
|
802 |
oprot.writeI64(self.numberOfDaysInStock)
|
|
|
803 |
oprot.writeFieldEnd()
|
| 8182 |
amar.kumar |
804 |
if self.rtoOrders is not None:
|
|
|
805 |
oprot.writeFieldBegin('rtoOrders', TType.I64, 22)
|
|
|
806 |
oprot.writeI64(self.rtoOrders)
|
|
|
807 |
oprot.writeFieldEnd()
|
| 6857 |
amar.kumar |
808 |
if self.lastXdaysSale is not None:
|
| 8182 |
amar.kumar |
809 |
oprot.writeFieldBegin('lastXdaysSale', TType.STRING, 23)
|
| 6857 |
amar.kumar |
810 |
oprot.writeString(self.lastXdaysSale)
|
|
|
811 |
oprot.writeFieldEnd()
|
| 6880 |
amar.kumar |
812 |
if self.previouslyOrderedQty is not None:
|
| 8182 |
amar.kumar |
813 |
oprot.writeFieldBegin('previouslyOrderedQty', TType.I64, 24)
|
| 6880 |
amar.kumar |
814 |
oprot.writeI64(self.previouslyOrderedQty)
|
|
|
815 |
oprot.writeFieldEnd()
|
| 7672 |
rajveer |
816 |
if self.nlc is not None:
|
| 8182 |
amar.kumar |
817 |
oprot.writeFieldBegin('nlc', TType.DOUBLE, 25)
|
| 7672 |
rajveer |
818 |
oprot.writeDouble(self.nlc)
|
|
|
819 |
oprot.writeFieldEnd()
|
| 9416 |
amar.kumar |
820 |
if self.mrp is not None:
|
|
|
821 |
oprot.writeFieldBegin('mrp', TType.DOUBLE, 26)
|
|
|
822 |
oprot.writeDouble(self.mrp)
|
|
|
823 |
oprot.writeFieldEnd()
|
| 12357 |
manish.sha |
824 |
if self.nlcP is not None:
|
|
|
825 |
oprot.writeFieldBegin('nlcP', TType.DOUBLE, 27)
|
|
|
826 |
oprot.writeDouble(self.nlcP)
|
|
|
827 |
oprot.writeFieldEnd()
|
|
|
828 |
if self.vatDiff is not None:
|
|
|
829 |
oprot.writeFieldBegin('vatDiff', TType.DOUBLE, 28)
|
|
|
830 |
oprot.writeDouble(self.vatDiff)
|
|
|
831 |
oprot.writeFieldEnd()
|
| 21844 |
amit.gupta |
832 |
if self.igstRate is not None:
|
|
|
833 |
oprot.writeFieldBegin('igstRate', TType.DOUBLE, 29)
|
|
|
834 |
oprot.writeDouble(self.igstRate)
|
|
|
835 |
oprot.writeFieldEnd()
|
|
|
836 |
if self.cgstRate is not None:
|
|
|
837 |
oprot.writeFieldBegin('cgstRate', TType.DOUBLE, 30)
|
|
|
838 |
oprot.writeDouble(self.cgstRate)
|
|
|
839 |
oprot.writeFieldEnd()
|
|
|
840 |
if self.sgstRate is not None:
|
|
|
841 |
oprot.writeFieldBegin('sgstRate', TType.DOUBLE, 31)
|
|
|
842 |
oprot.writeDouble(self.sgstRate)
|
|
|
843 |
oprot.writeFieldEnd()
|
|
|
844 |
if self.hsnCode is not None:
|
|
|
845 |
oprot.writeFieldBegin('hsnCode', TType.STRING, 32)
|
|
|
846 |
oprot.writeString(self.hsnCode)
|
|
|
847 |
oprot.writeFieldEnd()
|
| 24832 |
tejbeer |
848 |
if self.invoicePrice is not None:
|
|
|
849 |
oprot.writeFieldBegin('invoicePrice', TType.DOUBLE, 33)
|
|
|
850 |
oprot.writeDouble(self.invoicePrice)
|
|
|
851 |
oprot.writeFieldEnd()
|
|
|
852 |
if self.tp is not None:
|
|
|
853 |
oprot.writeFieldBegin('tp', TType.DOUBLE, 34)
|
|
|
854 |
oprot.writeDouble(self.tp)
|
|
|
855 |
oprot.writeFieldEnd()
|
| 4502 |
mandeep.dh |
856 |
oprot.writeFieldStop()
|
|
|
857 |
oprot.writeStructEnd()
|
|
|
858 |
|
|
|
859 |
def validate(self):
|
|
|
860 |
return
|
|
|
861 |
|
|
|
862 |
|
|
|
863 |
def __repr__(self):
|
|
|
864 |
L = ['%s=%r' % (key, value)
|
|
|
865 |
for key, value in self.__dict__.iteritems()]
|
|
|
866 |
return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
|
|
|
867 |
|
|
|
868 |
def __eq__(self, other):
|
|
|
869 |
return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
|
|
|
870 |
|
|
|
871 |
def __ne__(self, other):
|
|
|
872 |
return not (self == other)
|
|
|
873 |
|
|
|
874 |
class PurchaseOrder:
|
|
|
875 |
"""
|
|
|
876 |
Attributes:
|
|
|
877 |
- id
|
|
|
878 |
- poNumber
|
|
|
879 |
- lineitems
|
|
|
880 |
- supplierId
|
|
|
881 |
- warehouseId
|
| 9925 |
amar.kumar |
882 |
- shippingWarehouseId
|
| 4502 |
mandeep.dh |
883 |
- status
|
|
|
884 |
- createdAt
|
|
|
885 |
- updatedAt
|
|
|
886 |
- totalCost
|
|
|
887 |
- freightCharges
|
|
|
888 |
- realizedCost
|
|
|
889 |
- realizedFreightCharges
|
| 6821 |
amar.kumar |
890 |
- type
|
| 9416 |
amar.kumar |
891 |
- taxType
|
| 20025 |
amit.gupta |
892 |
- warehouseAddressId
|
|
|
893 |
- shippingWarehouseAddressId
|
|
|
894 |
- buyerId
|
| 4502 |
mandeep.dh |
895 |
"""
|
|
|
896 |
|
|
|
897 |
thrift_spec = (
|
|
|
898 |
None, # 0
|
|
|
899 |
(1, TType.I64, 'id', None, None, ), # 1
|
|
|
900 |
(2, TType.STRING, 'poNumber', None, None, ), # 2
|
|
|
901 |
(3, TType.LIST, 'lineitems', (TType.STRUCT,(LineItem, LineItem.thrift_spec)), None, ), # 3
|
|
|
902 |
(4, TType.I64, 'supplierId', None, None, ), # 4
|
|
|
903 |
(5, TType.I64, 'warehouseId', None, None, ), # 5
|
| 9925 |
amar.kumar |
904 |
(6, TType.I64, 'shippingWarehouseId', None, None, ), # 6
|
|
|
905 |
(7, TType.I32, 'status', None, None, ), # 7
|
|
|
906 |
(8, TType.I64, 'createdAt', None, None, ), # 8
|
|
|
907 |
(9, TType.I64, 'updatedAt', None, None, ), # 9
|
|
|
908 |
(10, TType.DOUBLE, 'totalCost', None, None, ), # 10
|
|
|
909 |
(11, TType.DOUBLE, 'freightCharges', None, None, ), # 11
|
|
|
910 |
(12, TType.DOUBLE, 'realizedCost', None, None, ), # 12
|
|
|
911 |
(13, TType.DOUBLE, 'realizedFreightCharges', None, None, ), # 13
|
|
|
912 |
(14, TType.I32, 'type', None, None, ), # 14
|
|
|
913 |
(15, TType.I32, 'taxType', None, None, ), # 15
|
| 20025 |
amit.gupta |
914 |
(16, TType.I64, 'warehouseAddressId', None, None, ), # 16
|
|
|
915 |
(17, TType.I64, 'shippingWarehouseAddressId', None, None, ), # 17
|
|
|
916 |
(18, TType.I64, 'buyerId', None, None, ), # 18
|
| 4502 |
mandeep.dh |
917 |
)
|
|
|
918 |
|
| 20025 |
amit.gupta |
919 |
def __init__(self, id=None, poNumber=None, lineitems=None, supplierId=None, warehouseId=None, shippingWarehouseId=None, status=None, createdAt=None, updatedAt=None, totalCost=None, freightCharges=None, realizedCost=None, realizedFreightCharges=None, type=None, taxType=None, warehouseAddressId=None, shippingWarehouseAddressId=None, buyerId=None,):
|
| 4502 |
mandeep.dh |
920 |
self.id = id
|
|
|
921 |
self.poNumber = poNumber
|
|
|
922 |
self.lineitems = lineitems
|
|
|
923 |
self.supplierId = supplierId
|
|
|
924 |
self.warehouseId = warehouseId
|
| 9925 |
amar.kumar |
925 |
self.shippingWarehouseId = shippingWarehouseId
|
| 4502 |
mandeep.dh |
926 |
self.status = status
|
|
|
927 |
self.createdAt = createdAt
|
|
|
928 |
self.updatedAt = updatedAt
|
|
|
929 |
self.totalCost = totalCost
|
|
|
930 |
self.freightCharges = freightCharges
|
|
|
931 |
self.realizedCost = realizedCost
|
|
|
932 |
self.realizedFreightCharges = realizedFreightCharges
|
| 6821 |
amar.kumar |
933 |
self.type = type
|
| 9416 |
amar.kumar |
934 |
self.taxType = taxType
|
| 20025 |
amit.gupta |
935 |
self.warehouseAddressId = warehouseAddressId
|
|
|
936 |
self.shippingWarehouseAddressId = shippingWarehouseAddressId
|
|
|
937 |
self.buyerId = buyerId
|
| 4502 |
mandeep.dh |
938 |
|
|
|
939 |
def read(self, iprot):
|
|
|
940 |
if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
|
|
|
941 |
fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
|
|
|
942 |
return
|
|
|
943 |
iprot.readStructBegin()
|
|
|
944 |
while True:
|
|
|
945 |
(fname, ftype, fid) = iprot.readFieldBegin()
|
|
|
946 |
if ftype == TType.STOP:
|
|
|
947 |
break
|
|
|
948 |
if fid == 1:
|
|
|
949 |
if ftype == TType.I64:
|
|
|
950 |
self.id = iprot.readI64();
|
|
|
951 |
else:
|
|
|
952 |
iprot.skip(ftype)
|
|
|
953 |
elif fid == 2:
|
|
|
954 |
if ftype == TType.STRING:
|
|
|
955 |
self.poNumber = iprot.readString();
|
|
|
956 |
else:
|
|
|
957 |
iprot.skip(ftype)
|
|
|
958 |
elif fid == 3:
|
|
|
959 |
if ftype == TType.LIST:
|
|
|
960 |
self.lineitems = []
|
|
|
961 |
(_etype3, _size0) = iprot.readListBegin()
|
|
|
962 |
for _i4 in xrange(_size0):
|
|
|
963 |
_elem5 = LineItem()
|
|
|
964 |
_elem5.read(iprot)
|
|
|
965 |
self.lineitems.append(_elem5)
|
|
|
966 |
iprot.readListEnd()
|
|
|
967 |
else:
|
|
|
968 |
iprot.skip(ftype)
|
|
|
969 |
elif fid == 4:
|
|
|
970 |
if ftype == TType.I64:
|
|
|
971 |
self.supplierId = iprot.readI64();
|
|
|
972 |
else:
|
|
|
973 |
iprot.skip(ftype)
|
|
|
974 |
elif fid == 5:
|
|
|
975 |
if ftype == TType.I64:
|
|
|
976 |
self.warehouseId = iprot.readI64();
|
|
|
977 |
else:
|
|
|
978 |
iprot.skip(ftype)
|
|
|
979 |
elif fid == 6:
|
| 9925 |
amar.kumar |
980 |
if ftype == TType.I64:
|
|
|
981 |
self.shippingWarehouseId = iprot.readI64();
|
|
|
982 |
else:
|
|
|
983 |
iprot.skip(ftype)
|
|
|
984 |
elif fid == 7:
|
| 4502 |
mandeep.dh |
985 |
if ftype == TType.I32:
|
|
|
986 |
self.status = iprot.readI32();
|
|
|
987 |
else:
|
|
|
988 |
iprot.skip(ftype)
|
| 9925 |
amar.kumar |
989 |
elif fid == 8:
|
| 4502 |
mandeep.dh |
990 |
if ftype == TType.I64:
|
|
|
991 |
self.createdAt = iprot.readI64();
|
|
|
992 |
else:
|
|
|
993 |
iprot.skip(ftype)
|
| 9925 |
amar.kumar |
994 |
elif fid == 9:
|
| 4502 |
mandeep.dh |
995 |
if ftype == TType.I64:
|
|
|
996 |
self.updatedAt = iprot.readI64();
|
|
|
997 |
else:
|
|
|
998 |
iprot.skip(ftype)
|
| 9925 |
amar.kumar |
999 |
elif fid == 10:
|
| 4502 |
mandeep.dh |
1000 |
if ftype == TType.DOUBLE:
|
|
|
1001 |
self.totalCost = iprot.readDouble();
|
|
|
1002 |
else:
|
|
|
1003 |
iprot.skip(ftype)
|
| 9925 |
amar.kumar |
1004 |
elif fid == 11:
|
| 4502 |
mandeep.dh |
1005 |
if ftype == TType.DOUBLE:
|
|
|
1006 |
self.freightCharges = iprot.readDouble();
|
|
|
1007 |
else:
|
|
|
1008 |
iprot.skip(ftype)
|
| 9925 |
amar.kumar |
1009 |
elif fid == 12:
|
| 4502 |
mandeep.dh |
1010 |
if ftype == TType.DOUBLE:
|
|
|
1011 |
self.realizedCost = iprot.readDouble();
|
|
|
1012 |
else:
|
|
|
1013 |
iprot.skip(ftype)
|
| 9925 |
amar.kumar |
1014 |
elif fid == 13:
|
| 4502 |
mandeep.dh |
1015 |
if ftype == TType.DOUBLE:
|
|
|
1016 |
self.realizedFreightCharges = iprot.readDouble();
|
|
|
1017 |
else:
|
|
|
1018 |
iprot.skip(ftype)
|
| 9925 |
amar.kumar |
1019 |
elif fid == 14:
|
| 6821 |
amar.kumar |
1020 |
if ftype == TType.I32:
|
|
|
1021 |
self.type = iprot.readI32();
|
|
|
1022 |
else:
|
|
|
1023 |
iprot.skip(ftype)
|
| 9925 |
amar.kumar |
1024 |
elif fid == 15:
|
| 9416 |
amar.kumar |
1025 |
if ftype == TType.I32:
|
|
|
1026 |
self.taxType = iprot.readI32();
|
|
|
1027 |
else:
|
|
|
1028 |
iprot.skip(ftype)
|
| 20025 |
amit.gupta |
1029 |
elif fid == 16:
|
|
|
1030 |
if ftype == TType.I64:
|
|
|
1031 |
self.warehouseAddressId = iprot.readI64();
|
|
|
1032 |
else:
|
|
|
1033 |
iprot.skip(ftype)
|
|
|
1034 |
elif fid == 17:
|
|
|
1035 |
if ftype == TType.I64:
|
|
|
1036 |
self.shippingWarehouseAddressId = iprot.readI64();
|
|
|
1037 |
else:
|
|
|
1038 |
iprot.skip(ftype)
|
|
|
1039 |
elif fid == 18:
|
|
|
1040 |
if ftype == TType.I64:
|
|
|
1041 |
self.buyerId = iprot.readI64();
|
|
|
1042 |
else:
|
|
|
1043 |
iprot.skip(ftype)
|
| 4502 |
mandeep.dh |
1044 |
else:
|
|
|
1045 |
iprot.skip(ftype)
|
|
|
1046 |
iprot.readFieldEnd()
|
|
|
1047 |
iprot.readStructEnd()
|
|
|
1048 |
|
|
|
1049 |
def write(self, oprot):
|
|
|
1050 |
if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
|
|
|
1051 |
oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
|
|
|
1052 |
return
|
|
|
1053 |
oprot.writeStructBegin('PurchaseOrder')
|
|
|
1054 |
if self.id is not None:
|
|
|
1055 |
oprot.writeFieldBegin('id', TType.I64, 1)
|
|
|
1056 |
oprot.writeI64(self.id)
|
|
|
1057 |
oprot.writeFieldEnd()
|
|
|
1058 |
if self.poNumber is not None:
|
|
|
1059 |
oprot.writeFieldBegin('poNumber', TType.STRING, 2)
|
|
|
1060 |
oprot.writeString(self.poNumber)
|
|
|
1061 |
oprot.writeFieldEnd()
|
|
|
1062 |
if self.lineitems is not None:
|
|
|
1063 |
oprot.writeFieldBegin('lineitems', TType.LIST, 3)
|
|
|
1064 |
oprot.writeListBegin(TType.STRUCT, len(self.lineitems))
|
|
|
1065 |
for iter6 in self.lineitems:
|
|
|
1066 |
iter6.write(oprot)
|
|
|
1067 |
oprot.writeListEnd()
|
|
|
1068 |
oprot.writeFieldEnd()
|
|
|
1069 |
if self.supplierId is not None:
|
|
|
1070 |
oprot.writeFieldBegin('supplierId', TType.I64, 4)
|
|
|
1071 |
oprot.writeI64(self.supplierId)
|
|
|
1072 |
oprot.writeFieldEnd()
|
|
|
1073 |
if self.warehouseId is not None:
|
|
|
1074 |
oprot.writeFieldBegin('warehouseId', TType.I64, 5)
|
|
|
1075 |
oprot.writeI64(self.warehouseId)
|
|
|
1076 |
oprot.writeFieldEnd()
|
| 9925 |
amar.kumar |
1077 |
if self.shippingWarehouseId is not None:
|
|
|
1078 |
oprot.writeFieldBegin('shippingWarehouseId', TType.I64, 6)
|
|
|
1079 |
oprot.writeI64(self.shippingWarehouseId)
|
|
|
1080 |
oprot.writeFieldEnd()
|
| 4502 |
mandeep.dh |
1081 |
if self.status is not None:
|
| 9925 |
amar.kumar |
1082 |
oprot.writeFieldBegin('status', TType.I32, 7)
|
| 4502 |
mandeep.dh |
1083 |
oprot.writeI32(self.status)
|
|
|
1084 |
oprot.writeFieldEnd()
|
|
|
1085 |
if self.createdAt is not None:
|
| 9925 |
amar.kumar |
1086 |
oprot.writeFieldBegin('createdAt', TType.I64, 8)
|
| 4502 |
mandeep.dh |
1087 |
oprot.writeI64(self.createdAt)
|
|
|
1088 |
oprot.writeFieldEnd()
|
|
|
1089 |
if self.updatedAt is not None:
|
| 9925 |
amar.kumar |
1090 |
oprot.writeFieldBegin('updatedAt', TType.I64, 9)
|
| 4502 |
mandeep.dh |
1091 |
oprot.writeI64(self.updatedAt)
|
|
|
1092 |
oprot.writeFieldEnd()
|
|
|
1093 |
if self.totalCost is not None:
|
| 9925 |
amar.kumar |
1094 |
oprot.writeFieldBegin('totalCost', TType.DOUBLE, 10)
|
| 4502 |
mandeep.dh |
1095 |
oprot.writeDouble(self.totalCost)
|
|
|
1096 |
oprot.writeFieldEnd()
|
|
|
1097 |
if self.freightCharges is not None:
|
| 9925 |
amar.kumar |
1098 |
oprot.writeFieldBegin('freightCharges', TType.DOUBLE, 11)
|
| 4502 |
mandeep.dh |
1099 |
oprot.writeDouble(self.freightCharges)
|
|
|
1100 |
oprot.writeFieldEnd()
|
|
|
1101 |
if self.realizedCost is not None:
|
| 9925 |
amar.kumar |
1102 |
oprot.writeFieldBegin('realizedCost', TType.DOUBLE, 12)
|
| 4502 |
mandeep.dh |
1103 |
oprot.writeDouble(self.realizedCost)
|
|
|
1104 |
oprot.writeFieldEnd()
|
|
|
1105 |
if self.realizedFreightCharges is not None:
|
| 9925 |
amar.kumar |
1106 |
oprot.writeFieldBegin('realizedFreightCharges', TType.DOUBLE, 13)
|
| 4502 |
mandeep.dh |
1107 |
oprot.writeDouble(self.realizedFreightCharges)
|
|
|
1108 |
oprot.writeFieldEnd()
|
| 6821 |
amar.kumar |
1109 |
if self.type is not None:
|
| 9925 |
amar.kumar |
1110 |
oprot.writeFieldBegin('type', TType.I32, 14)
|
| 6821 |
amar.kumar |
1111 |
oprot.writeI32(self.type)
|
|
|
1112 |
oprot.writeFieldEnd()
|
| 9416 |
amar.kumar |
1113 |
if self.taxType is not None:
|
| 9925 |
amar.kumar |
1114 |
oprot.writeFieldBegin('taxType', TType.I32, 15)
|
| 9416 |
amar.kumar |
1115 |
oprot.writeI32(self.taxType)
|
|
|
1116 |
oprot.writeFieldEnd()
|
| 20025 |
amit.gupta |
1117 |
if self.warehouseAddressId is not None:
|
|
|
1118 |
oprot.writeFieldBegin('warehouseAddressId', TType.I64, 16)
|
|
|
1119 |
oprot.writeI64(self.warehouseAddressId)
|
|
|
1120 |
oprot.writeFieldEnd()
|
|
|
1121 |
if self.shippingWarehouseAddressId is not None:
|
|
|
1122 |
oprot.writeFieldBegin('shippingWarehouseAddressId', TType.I64, 17)
|
|
|
1123 |
oprot.writeI64(self.shippingWarehouseAddressId)
|
|
|
1124 |
oprot.writeFieldEnd()
|
|
|
1125 |
if self.buyerId is not None:
|
|
|
1126 |
oprot.writeFieldBegin('buyerId', TType.I64, 18)
|
|
|
1127 |
oprot.writeI64(self.buyerId)
|
|
|
1128 |
oprot.writeFieldEnd()
|
| 4502 |
mandeep.dh |
1129 |
oprot.writeFieldStop()
|
|
|
1130 |
oprot.writeStructEnd()
|
|
|
1131 |
|
|
|
1132 |
def validate(self):
|
|
|
1133 |
return
|
|
|
1134 |
|
|
|
1135 |
|
|
|
1136 |
def __repr__(self):
|
|
|
1137 |
L = ['%s=%r' % (key, value)
|
|
|
1138 |
for key, value in self.__dict__.iteritems()]
|
|
|
1139 |
return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
|
|
|
1140 |
|
|
|
1141 |
def __eq__(self, other):
|
|
|
1142 |
return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
|
|
|
1143 |
|
|
|
1144 |
def __ne__(self, other):
|
|
|
1145 |
return not (self == other)
|
|
|
1146 |
|
|
|
1147 |
class Purchase:
|
|
|
1148 |
"""
|
|
|
1149 |
Attributes:
|
|
|
1150 |
- id
|
|
|
1151 |
- poId
|
|
|
1152 |
- invoiceNumber
|
|
|
1153 |
- receivedOn
|
|
|
1154 |
- freightCharges
|
| 11801 |
manish.sha |
1155 |
- purchaseComments
|
| 4502 |
mandeep.dh |
1156 |
"""
|
|
|
1157 |
|
|
|
1158 |
thrift_spec = (
|
|
|
1159 |
None, # 0
|
|
|
1160 |
(1, TType.I64, 'id', None, None, ), # 1
|
|
|
1161 |
(2, TType.I64, 'poId', None, None, ), # 2
|
|
|
1162 |
(3, TType.STRING, 'invoiceNumber', None, None, ), # 3
|
|
|
1163 |
(4, TType.I64, 'receivedOn', None, None, ), # 4
|
|
|
1164 |
(5, TType.DOUBLE, 'freightCharges', None, None, ), # 5
|
| 11801 |
manish.sha |
1165 |
(6, TType.STRING, 'purchaseComments', None, None, ), # 6
|
| 4502 |
mandeep.dh |
1166 |
)
|
|
|
1167 |
|
| 11801 |
manish.sha |
1168 |
def __init__(self, id=None, poId=None, invoiceNumber=None, receivedOn=None, freightCharges=None, purchaseComments=None,):
|
| 4502 |
mandeep.dh |
1169 |
self.id = id
|
|
|
1170 |
self.poId = poId
|
|
|
1171 |
self.invoiceNumber = invoiceNumber
|
|
|
1172 |
self.receivedOn = receivedOn
|
|
|
1173 |
self.freightCharges = freightCharges
|
| 11801 |
manish.sha |
1174 |
self.purchaseComments = purchaseComments
|
| 4502 |
mandeep.dh |
1175 |
|
|
|
1176 |
def read(self, iprot):
|
|
|
1177 |
if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
|
|
|
1178 |
fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
|
|
|
1179 |
return
|
|
|
1180 |
iprot.readStructBegin()
|
|
|
1181 |
while True:
|
|
|
1182 |
(fname, ftype, fid) = iprot.readFieldBegin()
|
|
|
1183 |
if ftype == TType.STOP:
|
|
|
1184 |
break
|
|
|
1185 |
if fid == 1:
|
|
|
1186 |
if ftype == TType.I64:
|
|
|
1187 |
self.id = iprot.readI64();
|
|
|
1188 |
else:
|
|
|
1189 |
iprot.skip(ftype)
|
|
|
1190 |
elif fid == 2:
|
|
|
1191 |
if ftype == TType.I64:
|
|
|
1192 |
self.poId = iprot.readI64();
|
|
|
1193 |
else:
|
|
|
1194 |
iprot.skip(ftype)
|
|
|
1195 |
elif fid == 3:
|
|
|
1196 |
if ftype == TType.STRING:
|
|
|
1197 |
self.invoiceNumber = iprot.readString();
|
|
|
1198 |
else:
|
|
|
1199 |
iprot.skip(ftype)
|
|
|
1200 |
elif fid == 4:
|
|
|
1201 |
if ftype == TType.I64:
|
|
|
1202 |
self.receivedOn = iprot.readI64();
|
|
|
1203 |
else:
|
|
|
1204 |
iprot.skip(ftype)
|
|
|
1205 |
elif fid == 5:
|
|
|
1206 |
if ftype == TType.DOUBLE:
|
|
|
1207 |
self.freightCharges = iprot.readDouble();
|
|
|
1208 |
else:
|
|
|
1209 |
iprot.skip(ftype)
|
| 11801 |
manish.sha |
1210 |
elif fid == 6:
|
|
|
1211 |
if ftype == TType.STRING:
|
|
|
1212 |
self.purchaseComments = iprot.readString();
|
|
|
1213 |
else:
|
|
|
1214 |
iprot.skip(ftype)
|
| 4502 |
mandeep.dh |
1215 |
else:
|
|
|
1216 |
iprot.skip(ftype)
|
|
|
1217 |
iprot.readFieldEnd()
|
|
|
1218 |
iprot.readStructEnd()
|
|
|
1219 |
|
|
|
1220 |
def write(self, oprot):
|
|
|
1221 |
if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
|
|
|
1222 |
oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
|
|
|
1223 |
return
|
|
|
1224 |
oprot.writeStructBegin('Purchase')
|
|
|
1225 |
if self.id is not None:
|
|
|
1226 |
oprot.writeFieldBegin('id', TType.I64, 1)
|
|
|
1227 |
oprot.writeI64(self.id)
|
|
|
1228 |
oprot.writeFieldEnd()
|
|
|
1229 |
if self.poId is not None:
|
|
|
1230 |
oprot.writeFieldBegin('poId', TType.I64, 2)
|
|
|
1231 |
oprot.writeI64(self.poId)
|
|
|
1232 |
oprot.writeFieldEnd()
|
|
|
1233 |
if self.invoiceNumber is not None:
|
|
|
1234 |
oprot.writeFieldBegin('invoiceNumber', TType.STRING, 3)
|
|
|
1235 |
oprot.writeString(self.invoiceNumber)
|
|
|
1236 |
oprot.writeFieldEnd()
|
|
|
1237 |
if self.receivedOn is not None:
|
|
|
1238 |
oprot.writeFieldBegin('receivedOn', TType.I64, 4)
|
|
|
1239 |
oprot.writeI64(self.receivedOn)
|
|
|
1240 |
oprot.writeFieldEnd()
|
|
|
1241 |
if self.freightCharges is not None:
|
|
|
1242 |
oprot.writeFieldBegin('freightCharges', TType.DOUBLE, 5)
|
|
|
1243 |
oprot.writeDouble(self.freightCharges)
|
|
|
1244 |
oprot.writeFieldEnd()
|
| 11801 |
manish.sha |
1245 |
if self.purchaseComments is not None:
|
|
|
1246 |
oprot.writeFieldBegin('purchaseComments', TType.STRING, 6)
|
|
|
1247 |
oprot.writeString(self.purchaseComments)
|
|
|
1248 |
oprot.writeFieldEnd()
|
| 4502 |
mandeep.dh |
1249 |
oprot.writeFieldStop()
|
|
|
1250 |
oprot.writeStructEnd()
|
|
|
1251 |
|
|
|
1252 |
def validate(self):
|
|
|
1253 |
return
|
|
|
1254 |
|
|
|
1255 |
|
|
|
1256 |
def __repr__(self):
|
|
|
1257 |
L = ['%s=%r' % (key, value)
|
|
|
1258 |
for key, value in self.__dict__.iteritems()]
|
|
|
1259 |
return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
|
|
|
1260 |
|
|
|
1261 |
def __eq__(self, other):
|
|
|
1262 |
return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
|
|
|
1263 |
|
|
|
1264 |
def __ne__(self, other):
|
|
|
1265 |
return not (self == other)
|
|
|
1266 |
|
| 6467 |
amar.kumar |
1267 |
class PurchaseReturn:
|
|
|
1268 |
"""
|
|
|
1269 |
Attributes:
|
|
|
1270 |
- id
|
|
|
1271 |
- vendorId
|
|
|
1272 |
- amount
|
|
|
1273 |
- returnTimestamp
|
|
|
1274 |
- isSettled
|
| 6821 |
amar.kumar |
1275 |
- type
|
| 10864 |
manish.sha |
1276 |
- returnInventoryType
|
| 13600 |
manish.sha |
1277 |
- currentSettlementType
|
|
|
1278 |
- latestSettlementDate
|
|
|
1279 |
- purchaseReturnType
|
|
|
1280 |
- reasonText
|
|
|
1281 |
- documentNumber
|
|
|
1282 |
- createdBy
|
|
|
1283 |
- unsettledAmount
|
| 6467 |
amar.kumar |
1284 |
"""
|
|
|
1285 |
|
|
|
1286 |
thrift_spec = (
|
|
|
1287 |
None, # 0
|
|
|
1288 |
(1, TType.I64, 'id', None, None, ), # 1
|
|
|
1289 |
(2, TType.I64, 'vendorId', None, None, ), # 2
|
|
|
1290 |
(3, TType.I64, 'amount', None, None, ), # 3
|
|
|
1291 |
(4, TType.I64, 'returnTimestamp', None, None, ), # 4
|
|
|
1292 |
(5, TType.BOOL, 'isSettled', None, None, ), # 5
|
| 6821 |
amar.kumar |
1293 |
(6, TType.I32, 'type', None, None, ), # 6
|
| 10864 |
manish.sha |
1294 |
(7, TType.I32, 'returnInventoryType', None, None, ), # 7
|
| 13600 |
manish.sha |
1295 |
(8, TType.I32, 'currentSettlementType', None, None, ), # 8
|
|
|
1296 |
(9, TType.I64, 'latestSettlementDate', None, None, ), # 9
|
|
|
1297 |
(10, TType.I32, 'purchaseReturnType', None, None, ), # 10
|
|
|
1298 |
(11, TType.STRING, 'reasonText', None, None, ), # 11
|
|
|
1299 |
(12, TType.STRING, 'documentNumber', None, None, ), # 12
|
|
|
1300 |
(13, TType.STRING, 'createdBy', None, None, ), # 13
|
|
|
1301 |
(14, TType.I64, 'unsettledAmount', None, None, ), # 14
|
| 6467 |
amar.kumar |
1302 |
)
|
|
|
1303 |
|
| 13600 |
manish.sha |
1304 |
def __init__(self, id=None, vendorId=None, amount=None, returnTimestamp=None, isSettled=None, type=None, returnInventoryType=None, currentSettlementType=None, latestSettlementDate=None, purchaseReturnType=None, reasonText=None, documentNumber=None, createdBy=None, unsettledAmount=None,):
|
| 6467 |
amar.kumar |
1305 |
self.id = id
|
|
|
1306 |
self.vendorId = vendorId
|
|
|
1307 |
self.amount = amount
|
|
|
1308 |
self.returnTimestamp = returnTimestamp
|
|
|
1309 |
self.isSettled = isSettled
|
| 6821 |
amar.kumar |
1310 |
self.type = type
|
| 10864 |
manish.sha |
1311 |
self.returnInventoryType = returnInventoryType
|
| 13600 |
manish.sha |
1312 |
self.currentSettlementType = currentSettlementType
|
|
|
1313 |
self.latestSettlementDate = latestSettlementDate
|
|
|
1314 |
self.purchaseReturnType = purchaseReturnType
|
|
|
1315 |
self.reasonText = reasonText
|
|
|
1316 |
self.documentNumber = documentNumber
|
|
|
1317 |
self.createdBy = createdBy
|
|
|
1318 |
self.unsettledAmount = unsettledAmount
|
| 6467 |
amar.kumar |
1319 |
|
|
|
1320 |
def read(self, iprot):
|
|
|
1321 |
if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
|
|
|
1322 |
fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
|
|
|
1323 |
return
|
|
|
1324 |
iprot.readStructBegin()
|
|
|
1325 |
while True:
|
|
|
1326 |
(fname, ftype, fid) = iprot.readFieldBegin()
|
|
|
1327 |
if ftype == TType.STOP:
|
|
|
1328 |
break
|
|
|
1329 |
if fid == 1:
|
|
|
1330 |
if ftype == TType.I64:
|
|
|
1331 |
self.id = iprot.readI64();
|
|
|
1332 |
else:
|
|
|
1333 |
iprot.skip(ftype)
|
|
|
1334 |
elif fid == 2:
|
|
|
1335 |
if ftype == TType.I64:
|
|
|
1336 |
self.vendorId = iprot.readI64();
|
|
|
1337 |
else:
|
|
|
1338 |
iprot.skip(ftype)
|
|
|
1339 |
elif fid == 3:
|
|
|
1340 |
if ftype == TType.I64:
|
|
|
1341 |
self.amount = iprot.readI64();
|
|
|
1342 |
else:
|
|
|
1343 |
iprot.skip(ftype)
|
|
|
1344 |
elif fid == 4:
|
|
|
1345 |
if ftype == TType.I64:
|
|
|
1346 |
self.returnTimestamp = iprot.readI64();
|
|
|
1347 |
else:
|
|
|
1348 |
iprot.skip(ftype)
|
|
|
1349 |
elif fid == 5:
|
|
|
1350 |
if ftype == TType.BOOL:
|
|
|
1351 |
self.isSettled = iprot.readBool();
|
|
|
1352 |
else:
|
|
|
1353 |
iprot.skip(ftype)
|
| 6821 |
amar.kumar |
1354 |
elif fid == 6:
|
|
|
1355 |
if ftype == TType.I32:
|
|
|
1356 |
self.type = iprot.readI32();
|
|
|
1357 |
else:
|
|
|
1358 |
iprot.skip(ftype)
|
| 10864 |
manish.sha |
1359 |
elif fid == 7:
|
|
|
1360 |
if ftype == TType.I32:
|
|
|
1361 |
self.returnInventoryType = iprot.readI32();
|
|
|
1362 |
else:
|
|
|
1363 |
iprot.skip(ftype)
|
| 13600 |
manish.sha |
1364 |
elif fid == 8:
|
|
|
1365 |
if ftype == TType.I32:
|
|
|
1366 |
self.currentSettlementType = iprot.readI32();
|
|
|
1367 |
else:
|
|
|
1368 |
iprot.skip(ftype)
|
|
|
1369 |
elif fid == 9:
|
|
|
1370 |
if ftype == TType.I64:
|
|
|
1371 |
self.latestSettlementDate = iprot.readI64();
|
|
|
1372 |
else:
|
|
|
1373 |
iprot.skip(ftype)
|
|
|
1374 |
elif fid == 10:
|
|
|
1375 |
if ftype == TType.I32:
|
|
|
1376 |
self.purchaseReturnType = iprot.readI32();
|
|
|
1377 |
else:
|
|
|
1378 |
iprot.skip(ftype)
|
|
|
1379 |
elif fid == 11:
|
|
|
1380 |
if ftype == TType.STRING:
|
|
|
1381 |
self.reasonText = iprot.readString();
|
|
|
1382 |
else:
|
|
|
1383 |
iprot.skip(ftype)
|
|
|
1384 |
elif fid == 12:
|
|
|
1385 |
if ftype == TType.STRING:
|
|
|
1386 |
self.documentNumber = iprot.readString();
|
|
|
1387 |
else:
|
|
|
1388 |
iprot.skip(ftype)
|
|
|
1389 |
elif fid == 13:
|
|
|
1390 |
if ftype == TType.STRING:
|
|
|
1391 |
self.createdBy = iprot.readString();
|
|
|
1392 |
else:
|
|
|
1393 |
iprot.skip(ftype)
|
|
|
1394 |
elif fid == 14:
|
|
|
1395 |
if ftype == TType.I64:
|
|
|
1396 |
self.unsettledAmount = iprot.readI64();
|
|
|
1397 |
else:
|
|
|
1398 |
iprot.skip(ftype)
|
| 6467 |
amar.kumar |
1399 |
else:
|
|
|
1400 |
iprot.skip(ftype)
|
|
|
1401 |
iprot.readFieldEnd()
|
|
|
1402 |
iprot.readStructEnd()
|
|
|
1403 |
|
|
|
1404 |
def write(self, oprot):
|
|
|
1405 |
if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
|
|
|
1406 |
oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
|
|
|
1407 |
return
|
|
|
1408 |
oprot.writeStructBegin('PurchaseReturn')
|
|
|
1409 |
if self.id is not None:
|
|
|
1410 |
oprot.writeFieldBegin('id', TType.I64, 1)
|
|
|
1411 |
oprot.writeI64(self.id)
|
|
|
1412 |
oprot.writeFieldEnd()
|
|
|
1413 |
if self.vendorId is not None:
|
|
|
1414 |
oprot.writeFieldBegin('vendorId', TType.I64, 2)
|
|
|
1415 |
oprot.writeI64(self.vendorId)
|
|
|
1416 |
oprot.writeFieldEnd()
|
|
|
1417 |
if self.amount is not None:
|
|
|
1418 |
oprot.writeFieldBegin('amount', TType.I64, 3)
|
|
|
1419 |
oprot.writeI64(self.amount)
|
|
|
1420 |
oprot.writeFieldEnd()
|
|
|
1421 |
if self.returnTimestamp is not None:
|
|
|
1422 |
oprot.writeFieldBegin('returnTimestamp', TType.I64, 4)
|
|
|
1423 |
oprot.writeI64(self.returnTimestamp)
|
|
|
1424 |
oprot.writeFieldEnd()
|
|
|
1425 |
if self.isSettled is not None:
|
|
|
1426 |
oprot.writeFieldBegin('isSettled', TType.BOOL, 5)
|
|
|
1427 |
oprot.writeBool(self.isSettled)
|
|
|
1428 |
oprot.writeFieldEnd()
|
| 6821 |
amar.kumar |
1429 |
if self.type is not None:
|
|
|
1430 |
oprot.writeFieldBegin('type', TType.I32, 6)
|
|
|
1431 |
oprot.writeI32(self.type)
|
|
|
1432 |
oprot.writeFieldEnd()
|
| 10864 |
manish.sha |
1433 |
if self.returnInventoryType is not None:
|
|
|
1434 |
oprot.writeFieldBegin('returnInventoryType', TType.I32, 7)
|
|
|
1435 |
oprot.writeI32(self.returnInventoryType)
|
|
|
1436 |
oprot.writeFieldEnd()
|
| 13600 |
manish.sha |
1437 |
if self.currentSettlementType is not None:
|
|
|
1438 |
oprot.writeFieldBegin('currentSettlementType', TType.I32, 8)
|
|
|
1439 |
oprot.writeI32(self.currentSettlementType)
|
|
|
1440 |
oprot.writeFieldEnd()
|
|
|
1441 |
if self.latestSettlementDate is not None:
|
|
|
1442 |
oprot.writeFieldBegin('latestSettlementDate', TType.I64, 9)
|
|
|
1443 |
oprot.writeI64(self.latestSettlementDate)
|
|
|
1444 |
oprot.writeFieldEnd()
|
|
|
1445 |
if self.purchaseReturnType is not None:
|
|
|
1446 |
oprot.writeFieldBegin('purchaseReturnType', TType.I32, 10)
|
|
|
1447 |
oprot.writeI32(self.purchaseReturnType)
|
|
|
1448 |
oprot.writeFieldEnd()
|
|
|
1449 |
if self.reasonText is not None:
|
|
|
1450 |
oprot.writeFieldBegin('reasonText', TType.STRING, 11)
|
|
|
1451 |
oprot.writeString(self.reasonText)
|
|
|
1452 |
oprot.writeFieldEnd()
|
|
|
1453 |
if self.documentNumber is not None:
|
|
|
1454 |
oprot.writeFieldBegin('documentNumber', TType.STRING, 12)
|
|
|
1455 |
oprot.writeString(self.documentNumber)
|
|
|
1456 |
oprot.writeFieldEnd()
|
|
|
1457 |
if self.createdBy is not None:
|
|
|
1458 |
oprot.writeFieldBegin('createdBy', TType.STRING, 13)
|
|
|
1459 |
oprot.writeString(self.createdBy)
|
|
|
1460 |
oprot.writeFieldEnd()
|
|
|
1461 |
if self.unsettledAmount is not None:
|
|
|
1462 |
oprot.writeFieldBegin('unsettledAmount', TType.I64, 14)
|
|
|
1463 |
oprot.writeI64(self.unsettledAmount)
|
|
|
1464 |
oprot.writeFieldEnd()
|
| 6467 |
amar.kumar |
1465 |
oprot.writeFieldStop()
|
|
|
1466 |
oprot.writeStructEnd()
|
|
|
1467 |
|
|
|
1468 |
def validate(self):
|
|
|
1469 |
return
|
|
|
1470 |
|
|
|
1471 |
|
|
|
1472 |
def __repr__(self):
|
|
|
1473 |
L = ['%s=%r' % (key, value)
|
|
|
1474 |
for key, value in self.__dict__.iteritems()]
|
|
|
1475 |
return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
|
|
|
1476 |
|
|
|
1477 |
def __eq__(self, other):
|
|
|
1478 |
return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
|
|
|
1479 |
|
|
|
1480 |
def __ne__(self, other):
|
|
|
1481 |
return not (self == other)
|
|
|
1482 |
|
| 13600 |
manish.sha |
1483 |
class PurchaseReturnSettlement:
|
|
|
1484 |
"""
|
|
|
1485 |
Attributes:
|
|
|
1486 |
- purchaseReturnId
|
|
|
1487 |
- settlementType
|
|
|
1488 |
- settlementAmount
|
|
|
1489 |
- settlementDate
|
|
|
1490 |
- settlementBy
|
|
|
1491 |
- documentNumber
|
|
|
1492 |
"""
|
|
|
1493 |
|
|
|
1494 |
thrift_spec = (
|
|
|
1495 |
None, # 0
|
|
|
1496 |
(1, TType.I64, 'purchaseReturnId', None, None, ), # 1
|
|
|
1497 |
(2, TType.I32, 'settlementType', None, None, ), # 2
|
|
|
1498 |
(3, TType.I64, 'settlementAmount', None, None, ), # 3
|
|
|
1499 |
(4, TType.I64, 'settlementDate', None, None, ), # 4
|
|
|
1500 |
(5, TType.STRING, 'settlementBy', None, None, ), # 5
|
|
|
1501 |
(6, TType.STRING, 'documentNumber', None, None, ), # 6
|
|
|
1502 |
)
|
|
|
1503 |
|
|
|
1504 |
def __init__(self, purchaseReturnId=None, settlementType=None, settlementAmount=None, settlementDate=None, settlementBy=None, documentNumber=None,):
|
|
|
1505 |
self.purchaseReturnId = purchaseReturnId
|
|
|
1506 |
self.settlementType = settlementType
|
|
|
1507 |
self.settlementAmount = settlementAmount
|
|
|
1508 |
self.settlementDate = settlementDate
|
|
|
1509 |
self.settlementBy = settlementBy
|
|
|
1510 |
self.documentNumber = documentNumber
|
|
|
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 == 1:
|
|
|
1522 |
if ftype == TType.I64:
|
|
|
1523 |
self.purchaseReturnId = iprot.readI64();
|
|
|
1524 |
else:
|
|
|
1525 |
iprot.skip(ftype)
|
|
|
1526 |
elif fid == 2:
|
|
|
1527 |
if ftype == TType.I32:
|
|
|
1528 |
self.settlementType = iprot.readI32();
|
|
|
1529 |
else:
|
|
|
1530 |
iprot.skip(ftype)
|
|
|
1531 |
elif fid == 3:
|
|
|
1532 |
if ftype == TType.I64:
|
|
|
1533 |
self.settlementAmount = iprot.readI64();
|
|
|
1534 |
else:
|
|
|
1535 |
iprot.skip(ftype)
|
|
|
1536 |
elif fid == 4:
|
|
|
1537 |
if ftype == TType.I64:
|
|
|
1538 |
self.settlementDate = iprot.readI64();
|
|
|
1539 |
else:
|
|
|
1540 |
iprot.skip(ftype)
|
|
|
1541 |
elif fid == 5:
|
|
|
1542 |
if ftype == TType.STRING:
|
|
|
1543 |
self.settlementBy = iprot.readString();
|
|
|
1544 |
else:
|
|
|
1545 |
iprot.skip(ftype)
|
|
|
1546 |
elif fid == 6:
|
|
|
1547 |
if ftype == TType.STRING:
|
|
|
1548 |
self.documentNumber = iprot.readString();
|
|
|
1549 |
else:
|
|
|
1550 |
iprot.skip(ftype)
|
|
|
1551 |
else:
|
|
|
1552 |
iprot.skip(ftype)
|
|
|
1553 |
iprot.readFieldEnd()
|
|
|
1554 |
iprot.readStructEnd()
|
|
|
1555 |
|
|
|
1556 |
def write(self, oprot):
|
|
|
1557 |
if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
|
|
|
1558 |
oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
|
|
|
1559 |
return
|
|
|
1560 |
oprot.writeStructBegin('PurchaseReturnSettlement')
|
|
|
1561 |
if self.purchaseReturnId is not None:
|
|
|
1562 |
oprot.writeFieldBegin('purchaseReturnId', TType.I64, 1)
|
|
|
1563 |
oprot.writeI64(self.purchaseReturnId)
|
|
|
1564 |
oprot.writeFieldEnd()
|
|
|
1565 |
if self.settlementType is not None:
|
|
|
1566 |
oprot.writeFieldBegin('settlementType', TType.I32, 2)
|
|
|
1567 |
oprot.writeI32(self.settlementType)
|
|
|
1568 |
oprot.writeFieldEnd()
|
|
|
1569 |
if self.settlementAmount is not None:
|
|
|
1570 |
oprot.writeFieldBegin('settlementAmount', TType.I64, 3)
|
|
|
1571 |
oprot.writeI64(self.settlementAmount)
|
|
|
1572 |
oprot.writeFieldEnd()
|
|
|
1573 |
if self.settlementDate is not None:
|
|
|
1574 |
oprot.writeFieldBegin('settlementDate', TType.I64, 4)
|
|
|
1575 |
oprot.writeI64(self.settlementDate)
|
|
|
1576 |
oprot.writeFieldEnd()
|
|
|
1577 |
if self.settlementBy is not None:
|
|
|
1578 |
oprot.writeFieldBegin('settlementBy', TType.STRING, 5)
|
|
|
1579 |
oprot.writeString(self.settlementBy)
|
|
|
1580 |
oprot.writeFieldEnd()
|
|
|
1581 |
if self.documentNumber is not None:
|
|
|
1582 |
oprot.writeFieldBegin('documentNumber', TType.STRING, 6)
|
|
|
1583 |
oprot.writeString(self.documentNumber)
|
|
|
1584 |
oprot.writeFieldEnd()
|
|
|
1585 |
oprot.writeFieldStop()
|
|
|
1586 |
oprot.writeStructEnd()
|
|
|
1587 |
|
|
|
1588 |
def validate(self):
|
|
|
1589 |
return
|
|
|
1590 |
|
|
|
1591 |
|
|
|
1592 |
def __repr__(self):
|
|
|
1593 |
L = ['%s=%r' % (key, value)
|
|
|
1594 |
for key, value in self.__dict__.iteritems()]
|
|
|
1595 |
return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
|
|
|
1596 |
|
|
|
1597 |
def __eq__(self, other):
|
|
|
1598 |
return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
|
|
|
1599 |
|
|
|
1600 |
def __ne__(self, other):
|
|
|
1601 |
return not (self == other)
|
|
|
1602 |
|
| 5443 |
mandeep.dh |
1603 |
class Invoice:
|
|
|
1604 |
"""
|
|
|
1605 |
Attributes:
|
|
|
1606 |
- id
|
|
|
1607 |
- invoiceNumber
|
|
|
1608 |
- date
|
|
|
1609 |
- numItems
|
|
|
1610 |
- receivedFrom
|
|
|
1611 |
- supplierId
|
| 7410 |
amar.kumar |
1612 |
- warehouseId
|
| 11219 |
manish.sha |
1613 |
- invoiceDate
|
| 5443 |
mandeep.dh |
1614 |
"""
|
|
|
1615 |
|
|
|
1616 |
thrift_spec = (
|
|
|
1617 |
None, # 0
|
|
|
1618 |
(1, TType.I64, 'id', None, None, ), # 1
|
|
|
1619 |
(2, TType.STRING, 'invoiceNumber', None, None, ), # 2
|
|
|
1620 |
(3, TType.I64, 'date', None, None, ), # 3
|
|
|
1621 |
(4, TType.I64, 'numItems', None, None, ), # 4
|
|
|
1622 |
(5, TType.STRING, 'receivedFrom', None, None, ), # 5
|
|
|
1623 |
(6, TType.I64, 'supplierId', None, None, ), # 6
|
| 7410 |
amar.kumar |
1624 |
(7, TType.I64, 'warehouseId', None, None, ), # 7
|
| 11219 |
manish.sha |
1625 |
(8, TType.I64, 'invoiceDate', None, None, ), # 8
|
| 5443 |
mandeep.dh |
1626 |
)
|
|
|
1627 |
|
| 11219 |
manish.sha |
1628 |
def __init__(self, id=None, invoiceNumber=None, date=None, numItems=None, receivedFrom=None, supplierId=None, warehouseId=None, invoiceDate=None,):
|
| 5443 |
mandeep.dh |
1629 |
self.id = id
|
|
|
1630 |
self.invoiceNumber = invoiceNumber
|
|
|
1631 |
self.date = date
|
|
|
1632 |
self.numItems = numItems
|
|
|
1633 |
self.receivedFrom = receivedFrom
|
|
|
1634 |
self.supplierId = supplierId
|
| 7410 |
amar.kumar |
1635 |
self.warehouseId = warehouseId
|
| 11219 |
manish.sha |
1636 |
self.invoiceDate = invoiceDate
|
| 5443 |
mandeep.dh |
1637 |
|
|
|
1638 |
def read(self, iprot):
|
|
|
1639 |
if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
|
|
|
1640 |
fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
|
|
|
1641 |
return
|
|
|
1642 |
iprot.readStructBegin()
|
|
|
1643 |
while True:
|
|
|
1644 |
(fname, ftype, fid) = iprot.readFieldBegin()
|
|
|
1645 |
if ftype == TType.STOP:
|
|
|
1646 |
break
|
|
|
1647 |
if fid == 1:
|
|
|
1648 |
if ftype == TType.I64:
|
|
|
1649 |
self.id = iprot.readI64();
|
|
|
1650 |
else:
|
|
|
1651 |
iprot.skip(ftype)
|
|
|
1652 |
elif fid == 2:
|
|
|
1653 |
if ftype == TType.STRING:
|
|
|
1654 |
self.invoiceNumber = iprot.readString();
|
|
|
1655 |
else:
|
|
|
1656 |
iprot.skip(ftype)
|
|
|
1657 |
elif fid == 3:
|
|
|
1658 |
if ftype == TType.I64:
|
|
|
1659 |
self.date = iprot.readI64();
|
|
|
1660 |
else:
|
|
|
1661 |
iprot.skip(ftype)
|
|
|
1662 |
elif fid == 4:
|
|
|
1663 |
if ftype == TType.I64:
|
|
|
1664 |
self.numItems = iprot.readI64();
|
|
|
1665 |
else:
|
|
|
1666 |
iprot.skip(ftype)
|
|
|
1667 |
elif fid == 5:
|
|
|
1668 |
if ftype == TType.STRING:
|
|
|
1669 |
self.receivedFrom = iprot.readString();
|
|
|
1670 |
else:
|
|
|
1671 |
iprot.skip(ftype)
|
|
|
1672 |
elif fid == 6:
|
|
|
1673 |
if ftype == TType.I64:
|
|
|
1674 |
self.supplierId = iprot.readI64();
|
|
|
1675 |
else:
|
|
|
1676 |
iprot.skip(ftype)
|
| 7410 |
amar.kumar |
1677 |
elif fid == 7:
|
|
|
1678 |
if ftype == TType.I64:
|
|
|
1679 |
self.warehouseId = iprot.readI64();
|
|
|
1680 |
else:
|
|
|
1681 |
iprot.skip(ftype)
|
| 11219 |
manish.sha |
1682 |
elif fid == 8:
|
|
|
1683 |
if ftype == TType.I64:
|
|
|
1684 |
self.invoiceDate = iprot.readI64();
|
|
|
1685 |
else:
|
|
|
1686 |
iprot.skip(ftype)
|
| 5443 |
mandeep.dh |
1687 |
else:
|
|
|
1688 |
iprot.skip(ftype)
|
|
|
1689 |
iprot.readFieldEnd()
|
|
|
1690 |
iprot.readStructEnd()
|
|
|
1691 |
|
|
|
1692 |
def write(self, oprot):
|
|
|
1693 |
if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
|
|
|
1694 |
oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
|
|
|
1695 |
return
|
|
|
1696 |
oprot.writeStructBegin('Invoice')
|
|
|
1697 |
if self.id is not None:
|
|
|
1698 |
oprot.writeFieldBegin('id', TType.I64, 1)
|
|
|
1699 |
oprot.writeI64(self.id)
|
|
|
1700 |
oprot.writeFieldEnd()
|
|
|
1701 |
if self.invoiceNumber is not None:
|
|
|
1702 |
oprot.writeFieldBegin('invoiceNumber', TType.STRING, 2)
|
|
|
1703 |
oprot.writeString(self.invoiceNumber)
|
|
|
1704 |
oprot.writeFieldEnd()
|
|
|
1705 |
if self.date is not None:
|
|
|
1706 |
oprot.writeFieldBegin('date', TType.I64, 3)
|
|
|
1707 |
oprot.writeI64(self.date)
|
|
|
1708 |
oprot.writeFieldEnd()
|
|
|
1709 |
if self.numItems is not None:
|
|
|
1710 |
oprot.writeFieldBegin('numItems', TType.I64, 4)
|
|
|
1711 |
oprot.writeI64(self.numItems)
|
|
|
1712 |
oprot.writeFieldEnd()
|
|
|
1713 |
if self.receivedFrom is not None:
|
|
|
1714 |
oprot.writeFieldBegin('receivedFrom', TType.STRING, 5)
|
|
|
1715 |
oprot.writeString(self.receivedFrom)
|
|
|
1716 |
oprot.writeFieldEnd()
|
|
|
1717 |
if self.supplierId is not None:
|
|
|
1718 |
oprot.writeFieldBegin('supplierId', TType.I64, 6)
|
|
|
1719 |
oprot.writeI64(self.supplierId)
|
|
|
1720 |
oprot.writeFieldEnd()
|
| 7410 |
amar.kumar |
1721 |
if self.warehouseId is not None:
|
|
|
1722 |
oprot.writeFieldBegin('warehouseId', TType.I64, 7)
|
|
|
1723 |
oprot.writeI64(self.warehouseId)
|
|
|
1724 |
oprot.writeFieldEnd()
|
| 11219 |
manish.sha |
1725 |
if self.invoiceDate is not None:
|
|
|
1726 |
oprot.writeFieldBegin('invoiceDate', TType.I64, 8)
|
|
|
1727 |
oprot.writeI64(self.invoiceDate)
|
|
|
1728 |
oprot.writeFieldEnd()
|
| 5443 |
mandeep.dh |
1729 |
oprot.writeFieldStop()
|
|
|
1730 |
oprot.writeStructEnd()
|
|
|
1731 |
|
|
|
1732 |
def validate(self):
|
|
|
1733 |
return
|
|
|
1734 |
|
|
|
1735 |
|
|
|
1736 |
def __repr__(self):
|
|
|
1737 |
L = ['%s=%r' % (key, value)
|
|
|
1738 |
for key, value in self.__dict__.iteritems()]
|
|
|
1739 |
return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
|
|
|
1740 |
|
|
|
1741 |
def __eq__(self, other):
|
|
|
1742 |
return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
|
|
|
1743 |
|
|
|
1744 |
def __ne__(self, other):
|
|
|
1745 |
return not (self == other)
|
|
|
1746 |
|
| 4502 |
mandeep.dh |
1747 |
class PurchaseServiceException(Exception):
|
|
|
1748 |
"""
|
|
|
1749 |
Attributes:
|
|
|
1750 |
- exceptionType
|
|
|
1751 |
- message
|
|
|
1752 |
"""
|
|
|
1753 |
|
|
|
1754 |
thrift_spec = (
|
|
|
1755 |
None, # 0
|
|
|
1756 |
(1, TType.I32, 'exceptionType', None, None, ), # 1
|
|
|
1757 |
(2, TType.STRING, 'message', None, None, ), # 2
|
|
|
1758 |
)
|
|
|
1759 |
|
|
|
1760 |
def __init__(self, exceptionType=None, message=None,):
|
|
|
1761 |
self.exceptionType = exceptionType
|
|
|
1762 |
self.message = message
|
|
|
1763 |
|
|
|
1764 |
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:
|
|
|
1766 |
fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
|
|
|
1767 |
return
|
|
|
1768 |
iprot.readStructBegin()
|
|
|
1769 |
while True:
|
|
|
1770 |
(fname, ftype, fid) = iprot.readFieldBegin()
|
|
|
1771 |
if ftype == TType.STOP:
|
|
|
1772 |
break
|
|
|
1773 |
if fid == 1:
|
|
|
1774 |
if ftype == TType.I32:
|
|
|
1775 |
self.exceptionType = iprot.readI32();
|
|
|
1776 |
else:
|
|
|
1777 |
iprot.skip(ftype)
|
|
|
1778 |
elif fid == 2:
|
|
|
1779 |
if ftype == TType.STRING:
|
|
|
1780 |
self.message = iprot.readString();
|
|
|
1781 |
else:
|
|
|
1782 |
iprot.skip(ftype)
|
|
|
1783 |
else:
|
|
|
1784 |
iprot.skip(ftype)
|
|
|
1785 |
iprot.readFieldEnd()
|
|
|
1786 |
iprot.readStructEnd()
|
|
|
1787 |
|
|
|
1788 |
def write(self, oprot):
|
|
|
1789 |
if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
|
|
|
1790 |
oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
|
|
|
1791 |
return
|
|
|
1792 |
oprot.writeStructBegin('PurchaseServiceException')
|
|
|
1793 |
if self.exceptionType is not None:
|
|
|
1794 |
oprot.writeFieldBegin('exceptionType', TType.I32, 1)
|
|
|
1795 |
oprot.writeI32(self.exceptionType)
|
|
|
1796 |
oprot.writeFieldEnd()
|
|
|
1797 |
if self.message is not None:
|
|
|
1798 |
oprot.writeFieldBegin('message', TType.STRING, 2)
|
|
|
1799 |
oprot.writeString(self.message)
|
|
|
1800 |
oprot.writeFieldEnd()
|
|
|
1801 |
oprot.writeFieldStop()
|
|
|
1802 |
oprot.writeStructEnd()
|
|
|
1803 |
|
|
|
1804 |
def validate(self):
|
|
|
1805 |
return
|
|
|
1806 |
|
|
|
1807 |
|
|
|
1808 |
def __str__(self):
|
|
|
1809 |
return repr(self)
|
|
|
1810 |
|
|
|
1811 |
def __repr__(self):
|
|
|
1812 |
L = ['%s=%r' % (key, value)
|
|
|
1813 |
for key, value in self.__dict__.iteritems()]
|
|
|
1814 |
return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
|
|
|
1815 |
|
|
|
1816 |
def __eq__(self, other):
|
|
|
1817 |
return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
|
|
|
1818 |
|
|
|
1819 |
def __ne__(self, other):
|
|
|
1820 |
return not (self == other)
|