| 5944 |
mandeep.dh |
1 |
#!/usr/bin/env python
|
|
|
2 |
#
|
|
|
3 |
# Autogenerated by Thrift Compiler (0.7.0)
|
|
|
4 |
#
|
|
|
5 |
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
|
|
|
6 |
#
|
|
|
7 |
|
|
|
8 |
import sys
|
|
|
9 |
import pprint
|
|
|
10 |
from urlparse import urlparse
|
|
|
11 |
from thrift.transport import TTransport
|
|
|
12 |
from thrift.transport import TSocket
|
|
|
13 |
from thrift.transport import THttpClient
|
|
|
14 |
from thrift.protocol import TBinaryProtocol
|
|
|
15 |
|
|
|
16 |
import CatalogService
|
|
|
17 |
from ttypes import *
|
|
|
18 |
|
|
|
19 |
if len(sys.argv) <= 1 or sys.argv[1] == '--help':
|
|
|
20 |
print ''
|
|
|
21 |
print 'Usage: ' + sys.argv[0] + ' [-h host:port] [-u url] [-f[ramed]] function [arg1 [arg2...]]'
|
|
|
22 |
print ''
|
|
|
23 |
print 'Functions:'
|
|
|
24 |
print ' i64 addItem(Item item)'
|
|
|
25 |
print ' i64 updateItem(Item item)'
|
|
|
26 |
print ' ItemShippingInfo isActive(i64 itemId)'
|
|
|
27 |
print ' string getItemStatusDescription(i64 itemId)'
|
|
|
28 |
print ' void startItemOn(i64 item_id, i64 timestamp)'
|
|
|
29 |
print ' void retireItemOn(i64 item_id, i64 timestamp)'
|
|
|
30 |
print ' void changeItemStatus(i64 item_id, i64 timestamp, status newstatus)'
|
|
|
31 |
print ' Item getItem(i64 item_id)'
|
|
|
32 |
print ' getItemsByCatalogId(i64 catalog_item_id)'
|
|
|
33 |
print ' getValidItemsByCatalogId(i64 catalog_item_id)'
|
|
|
34 |
print ' getAllItems(bool isActive)'
|
|
|
35 |
print ' getAllItemsByStatus(status itemStatus)'
|
|
|
36 |
print ' bool markItemAsContentComplete(i64 entityId, i64 category, string brand, string modelName, string modelNumber)'
|
|
|
37 |
print ' getAllItemsInRange(i64 offset, i64 limit)'
|
|
|
38 |
print ' getAllItemsByStatusInRange(status itemStatus, i64 offset, i64 limit)'
|
|
|
39 |
print ' i32 getItemCountByStatus(bool useStatus, status itemStatus)'
|
|
|
40 |
print ' getBestSellers()'
|
|
|
41 |
print ' getBestSellersCatalogIds(i64 beginIndex, i64 totalItems, string brand, i64 category)'
|
|
|
42 |
print ' i64 getBestSellersCount()'
|
|
|
43 |
print ' getBestDeals()'
|
|
|
44 |
print ' getBestDealsCatalogIds(i64 beginIndex, i64 totalItems, string brand, i64 category)'
|
|
|
45 |
print ' i64 getBestDealsCount()'
|
|
|
46 |
print ' getComingSoon()'
|
|
|
47 |
print ' getComingSoonCatalogIds(i64 beginIndex, i64 totalItems, string brand, i64 category)'
|
|
|
48 |
print ' i64 getComingSoonCount()'
|
|
|
49 |
print ' getLatestArrivals()'
|
|
|
50 |
print ' getLatestArrivalsCatalogIds(i64 beginIndex, i64 totalItems, string brand, categories)'
|
|
|
51 |
print ' i64 getLatestArrivalsCount()'
|
|
|
52 |
print ' i64 generateNewEntityID()'
|
|
|
53 |
print ' bool addCategory(Category category)'
|
|
|
54 |
print ' Category getCategory(i64 id)'
|
|
|
55 |
print ' getAllCategories()'
|
|
|
56 |
print ' getAllSimilarItems(i64 itemId)'
|
|
|
57 |
print ' Item addSimilarItem(i64 itemId, i64 catalogItemId)'
|
| 6512 |
kshitij.so |
58 |
print ' bool addTag(string displayName, i64 itemId)'
|
|
|
59 |
print ' bool deleteEntityTag(string displayName, i64 itemId)'
|
|
|
60 |
print ' bool deleteTag(string displayName)'
|
|
|
61 |
print ' getAllTags()'
|
|
|
62 |
print ' getAllEntitiesByTagName(string displayName)'
|
| 5944 |
mandeep.dh |
63 |
print ' bool deleteSimilarItem(i64 itemId, i64 catalogItemId)'
|
|
|
64 |
print ' i64 checkSimilarItem(string brand, string modelNumber, string modelName, string color)'
|
|
|
65 |
print ' void validateRiskyStatus(i64 itemId)'
|
|
|
66 |
print ' void changeItemRiskyFlag(i64 itemId, bool risky)'
|
|
|
67 |
print ' getItemsByRiskyFlag()'
|
|
|
68 |
print ' getItemsForMasterSheet(string category, string brand)'
|
|
|
69 |
print ' getSimilarItemsCatalogIds(i64 beginIndex, i64 totalItems, i64 itemId)'
|
|
|
70 |
print ' bool addProductNotification(i64 itemId, string email)'
|
|
|
71 |
print ' bool sendProductNotifications()'
|
|
|
72 |
print ' getAllBrandsByCategory(i64 categoryId)'
|
|
|
73 |
print ' getAllBrands()'
|
|
|
74 |
print ' getAllSources()'
|
|
|
75 |
print ' SourceItemPricing getItemPricingBySource(i64 itemId, i64 sourceId)'
|
|
|
76 |
print ' void addSourceItemPricing(SourceItemPricing sourceItemPricing)'
|
|
|
77 |
print ' getAllSourcePricing(i64 itemId)'
|
|
|
78 |
print ' Item getItemForSource(i64 item_id, i64 sourceId)'
|
|
|
79 |
print ' searchItemsInRange( searchTerms, i64 offset, i64 limit)'
|
|
|
80 |
print ' i32 getSearchResultCount( searchTerms)'
|
|
|
81 |
print ' getProductNotifications(i64 startDateTime)'
|
|
|
82 |
print ' getProductNotificationRequestCount(i64 startDateTime)'
|
|
|
83 |
print ' bool addAuthorizationLog(i64 itemId, string username, string reason)'
|
|
|
84 |
print ' getClearanceSaleCatalogIds()'
|
|
|
85 |
print ' bool addupdateVoucherForItem(i64 catalog_item_id, i64 voucherType, i64 voucherAmount)'
|
|
|
86 |
print ' bool deleteVoucherForItem(i64 catalog_item_id, i64 voucherType)'
|
|
|
87 |
print ' i64 getVoucherAmount(i64 itemId, i64 voucherType)'
|
|
|
88 |
print ' getAllItemVouchers(i64 itemId)'
|
|
|
89 |
print ' bool isValidCatalogItemId(i64 catalog_item_id)'
|
| 6039 |
amit.gupta |
90 |
print ' double getVatPercentageForItem(i64 itemId, double price)'
|
|
|
91 |
print ' double getVatAmountForItem(i64 itemId, double price)'
|
| 6531 |
vikram.rag |
92 |
print ' getAllIgnoredInventoryUpdateItemsList(i32 offset, i32 limit)'
|
| 6805 |
anupam.sin |
93 |
print ' i64 getInsuranceAmount(i64 itemId, i64 insurerId, i64 quantity)'
|
|
|
94 |
print ' Insurer getInsurer(i64 insurerId)'
|
| 5944 |
mandeep.dh |
95 |
print ''
|
|
|
96 |
sys.exit(0)
|
|
|
97 |
|
|
|
98 |
pp = pprint.PrettyPrinter(indent = 2)
|
|
|
99 |
host = 'localhost'
|
|
|
100 |
port = 9090
|
|
|
101 |
uri = ''
|
|
|
102 |
framed = False
|
|
|
103 |
http = False
|
|
|
104 |
argi = 1
|
|
|
105 |
|
|
|
106 |
if sys.argv[argi] == '-h':
|
|
|
107 |
parts = sys.argv[argi+1].split(':')
|
|
|
108 |
host = parts[0]
|
|
|
109 |
port = int(parts[1])
|
|
|
110 |
argi += 2
|
|
|
111 |
|
|
|
112 |
if sys.argv[argi] == '-u':
|
|
|
113 |
url = urlparse(sys.argv[argi+1])
|
|
|
114 |
parts = url[1].split(':')
|
|
|
115 |
host = parts[0]
|
|
|
116 |
if len(parts) > 1:
|
|
|
117 |
port = int(parts[1])
|
|
|
118 |
else:
|
|
|
119 |
port = 80
|
|
|
120 |
uri = url[2]
|
|
|
121 |
if url[4]:
|
|
|
122 |
uri += '?%s' % url[4]
|
|
|
123 |
http = True
|
|
|
124 |
argi += 2
|
|
|
125 |
|
|
|
126 |
if sys.argv[argi] == '-f' or sys.argv[argi] == '-framed':
|
|
|
127 |
framed = True
|
|
|
128 |
argi += 1
|
|
|
129 |
|
|
|
130 |
cmd = sys.argv[argi]
|
|
|
131 |
args = sys.argv[argi+1:]
|
|
|
132 |
|
|
|
133 |
if http:
|
|
|
134 |
transport = THttpClient.THttpClient(host, port, uri)
|
|
|
135 |
else:
|
|
|
136 |
socket = TSocket.TSocket(host, port)
|
|
|
137 |
if framed:
|
|
|
138 |
transport = TTransport.TFramedTransport(socket)
|
|
|
139 |
else:
|
|
|
140 |
transport = TTransport.TBufferedTransport(socket)
|
|
|
141 |
protocol = TBinaryProtocol.TBinaryProtocol(transport)
|
|
|
142 |
client = CatalogService.Client(protocol)
|
|
|
143 |
transport.open()
|
|
|
144 |
|
|
|
145 |
if cmd == 'addItem':
|
|
|
146 |
if len(args) != 1:
|
|
|
147 |
print 'addItem requires 1 args'
|
|
|
148 |
sys.exit(1)
|
|
|
149 |
pp.pprint(client.addItem(eval(args[0]),))
|
|
|
150 |
|
|
|
151 |
elif cmd == 'updateItem':
|
|
|
152 |
if len(args) != 1:
|
|
|
153 |
print 'updateItem requires 1 args'
|
|
|
154 |
sys.exit(1)
|
|
|
155 |
pp.pprint(client.updateItem(eval(args[0]),))
|
|
|
156 |
|
|
|
157 |
elif cmd == 'isActive':
|
|
|
158 |
if len(args) != 1:
|
|
|
159 |
print 'isActive requires 1 args'
|
|
|
160 |
sys.exit(1)
|
|
|
161 |
pp.pprint(client.isActive(eval(args[0]),))
|
|
|
162 |
|
|
|
163 |
elif cmd == 'getItemStatusDescription':
|
|
|
164 |
if len(args) != 1:
|
|
|
165 |
print 'getItemStatusDescription requires 1 args'
|
|
|
166 |
sys.exit(1)
|
|
|
167 |
pp.pprint(client.getItemStatusDescription(eval(args[0]),))
|
|
|
168 |
|
|
|
169 |
elif cmd == 'startItemOn':
|
|
|
170 |
if len(args) != 2:
|
|
|
171 |
print 'startItemOn requires 2 args'
|
|
|
172 |
sys.exit(1)
|
|
|
173 |
pp.pprint(client.startItemOn(eval(args[0]),eval(args[1]),))
|
|
|
174 |
|
|
|
175 |
elif cmd == 'retireItemOn':
|
|
|
176 |
if len(args) != 2:
|
|
|
177 |
print 'retireItemOn requires 2 args'
|
|
|
178 |
sys.exit(1)
|
|
|
179 |
pp.pprint(client.retireItemOn(eval(args[0]),eval(args[1]),))
|
|
|
180 |
|
|
|
181 |
elif cmd == 'changeItemStatus':
|
|
|
182 |
if len(args) != 3:
|
|
|
183 |
print 'changeItemStatus requires 3 args'
|
|
|
184 |
sys.exit(1)
|
|
|
185 |
pp.pprint(client.changeItemStatus(eval(args[0]),eval(args[1]),eval(args[2]),))
|
|
|
186 |
|
|
|
187 |
elif cmd == 'getItem':
|
|
|
188 |
if len(args) != 1:
|
|
|
189 |
print 'getItem requires 1 args'
|
|
|
190 |
sys.exit(1)
|
|
|
191 |
pp.pprint(client.getItem(eval(args[0]),))
|
|
|
192 |
|
|
|
193 |
elif cmd == 'getItemsByCatalogId':
|
|
|
194 |
if len(args) != 1:
|
|
|
195 |
print 'getItemsByCatalogId requires 1 args'
|
|
|
196 |
sys.exit(1)
|
|
|
197 |
pp.pprint(client.getItemsByCatalogId(eval(args[0]),))
|
|
|
198 |
|
|
|
199 |
elif cmd == 'getValidItemsByCatalogId':
|
|
|
200 |
if len(args) != 1:
|
|
|
201 |
print 'getValidItemsByCatalogId requires 1 args'
|
|
|
202 |
sys.exit(1)
|
|
|
203 |
pp.pprint(client.getValidItemsByCatalogId(eval(args[0]),))
|
|
|
204 |
|
|
|
205 |
elif cmd == 'getAllItems':
|
|
|
206 |
if len(args) != 1:
|
|
|
207 |
print 'getAllItems requires 1 args'
|
|
|
208 |
sys.exit(1)
|
|
|
209 |
pp.pprint(client.getAllItems(eval(args[0]),))
|
|
|
210 |
|
|
|
211 |
elif cmd == 'getAllItemsByStatus':
|
|
|
212 |
if len(args) != 1:
|
|
|
213 |
print 'getAllItemsByStatus requires 1 args'
|
|
|
214 |
sys.exit(1)
|
|
|
215 |
pp.pprint(client.getAllItemsByStatus(eval(args[0]),))
|
|
|
216 |
|
|
|
217 |
elif cmd == 'markItemAsContentComplete':
|
|
|
218 |
if len(args) != 5:
|
|
|
219 |
print 'markItemAsContentComplete requires 5 args'
|
|
|
220 |
sys.exit(1)
|
|
|
221 |
pp.pprint(client.markItemAsContentComplete(eval(args[0]),eval(args[1]),args[2],args[3],args[4],))
|
|
|
222 |
|
|
|
223 |
elif cmd == 'getAllItemsInRange':
|
|
|
224 |
if len(args) != 2:
|
|
|
225 |
print 'getAllItemsInRange requires 2 args'
|
|
|
226 |
sys.exit(1)
|
|
|
227 |
pp.pprint(client.getAllItemsInRange(eval(args[0]),eval(args[1]),))
|
|
|
228 |
|
|
|
229 |
elif cmd == 'getAllItemsByStatusInRange':
|
|
|
230 |
if len(args) != 3:
|
|
|
231 |
print 'getAllItemsByStatusInRange requires 3 args'
|
|
|
232 |
sys.exit(1)
|
|
|
233 |
pp.pprint(client.getAllItemsByStatusInRange(eval(args[0]),eval(args[1]),eval(args[2]),))
|
|
|
234 |
|
|
|
235 |
elif cmd == 'getItemCountByStatus':
|
|
|
236 |
if len(args) != 2:
|
|
|
237 |
print 'getItemCountByStatus requires 2 args'
|
|
|
238 |
sys.exit(1)
|
|
|
239 |
pp.pprint(client.getItemCountByStatus(eval(args[0]),eval(args[1]),))
|
|
|
240 |
|
|
|
241 |
elif cmd == 'getBestSellers':
|
|
|
242 |
if len(args) != 0:
|
|
|
243 |
print 'getBestSellers requires 0 args'
|
|
|
244 |
sys.exit(1)
|
|
|
245 |
pp.pprint(client.getBestSellers())
|
|
|
246 |
|
|
|
247 |
elif cmd == 'getBestSellersCatalogIds':
|
|
|
248 |
if len(args) != 4:
|
|
|
249 |
print 'getBestSellersCatalogIds requires 4 args'
|
|
|
250 |
sys.exit(1)
|
|
|
251 |
pp.pprint(client.getBestSellersCatalogIds(eval(args[0]),eval(args[1]),args[2],eval(args[3]),))
|
|
|
252 |
|
|
|
253 |
elif cmd == 'getBestSellersCount':
|
|
|
254 |
if len(args) != 0:
|
|
|
255 |
print 'getBestSellersCount requires 0 args'
|
|
|
256 |
sys.exit(1)
|
|
|
257 |
pp.pprint(client.getBestSellersCount())
|
|
|
258 |
|
|
|
259 |
elif cmd == 'getBestDeals':
|
|
|
260 |
if len(args) != 0:
|
|
|
261 |
print 'getBestDeals requires 0 args'
|
|
|
262 |
sys.exit(1)
|
|
|
263 |
pp.pprint(client.getBestDeals())
|
|
|
264 |
|
|
|
265 |
elif cmd == 'getBestDealsCatalogIds':
|
|
|
266 |
if len(args) != 4:
|
|
|
267 |
print 'getBestDealsCatalogIds requires 4 args'
|
|
|
268 |
sys.exit(1)
|
|
|
269 |
pp.pprint(client.getBestDealsCatalogIds(eval(args[0]),eval(args[1]),args[2],eval(args[3]),))
|
|
|
270 |
|
|
|
271 |
elif cmd == 'getBestDealsCount':
|
|
|
272 |
if len(args) != 0:
|
|
|
273 |
print 'getBestDealsCount requires 0 args'
|
|
|
274 |
sys.exit(1)
|
|
|
275 |
pp.pprint(client.getBestDealsCount())
|
|
|
276 |
|
|
|
277 |
elif cmd == 'getComingSoon':
|
|
|
278 |
if len(args) != 0:
|
|
|
279 |
print 'getComingSoon requires 0 args'
|
|
|
280 |
sys.exit(1)
|
|
|
281 |
pp.pprint(client.getComingSoon())
|
|
|
282 |
|
|
|
283 |
elif cmd == 'getComingSoonCatalogIds':
|
|
|
284 |
if len(args) != 4:
|
|
|
285 |
print 'getComingSoonCatalogIds requires 4 args'
|
|
|
286 |
sys.exit(1)
|
|
|
287 |
pp.pprint(client.getComingSoonCatalogIds(eval(args[0]),eval(args[1]),args[2],eval(args[3]),))
|
|
|
288 |
|
|
|
289 |
elif cmd == 'getComingSoonCount':
|
|
|
290 |
if len(args) != 0:
|
|
|
291 |
print 'getComingSoonCount requires 0 args'
|
|
|
292 |
sys.exit(1)
|
|
|
293 |
pp.pprint(client.getComingSoonCount())
|
|
|
294 |
|
|
|
295 |
elif cmd == 'getLatestArrivals':
|
|
|
296 |
if len(args) != 0:
|
|
|
297 |
print 'getLatestArrivals requires 0 args'
|
|
|
298 |
sys.exit(1)
|
|
|
299 |
pp.pprint(client.getLatestArrivals())
|
|
|
300 |
|
|
|
301 |
elif cmd == 'getLatestArrivalsCatalogIds':
|
|
|
302 |
if len(args) != 4:
|
|
|
303 |
print 'getLatestArrivalsCatalogIds requires 4 args'
|
|
|
304 |
sys.exit(1)
|
|
|
305 |
pp.pprint(client.getLatestArrivalsCatalogIds(eval(args[0]),eval(args[1]),args[2],eval(args[3]),))
|
|
|
306 |
|
|
|
307 |
elif cmd == 'getLatestArrivalsCount':
|
|
|
308 |
if len(args) != 0:
|
|
|
309 |
print 'getLatestArrivalsCount requires 0 args'
|
|
|
310 |
sys.exit(1)
|
|
|
311 |
pp.pprint(client.getLatestArrivalsCount())
|
|
|
312 |
|
|
|
313 |
elif cmd == 'generateNewEntityID':
|
|
|
314 |
if len(args) != 0:
|
|
|
315 |
print 'generateNewEntityID requires 0 args'
|
|
|
316 |
sys.exit(1)
|
|
|
317 |
pp.pprint(client.generateNewEntityID())
|
|
|
318 |
|
|
|
319 |
elif cmd == 'addCategory':
|
|
|
320 |
if len(args) != 1:
|
|
|
321 |
print 'addCategory requires 1 args'
|
|
|
322 |
sys.exit(1)
|
|
|
323 |
pp.pprint(client.addCategory(eval(args[0]),))
|
|
|
324 |
|
|
|
325 |
elif cmd == 'getCategory':
|
|
|
326 |
if len(args) != 1:
|
|
|
327 |
print 'getCategory requires 1 args'
|
|
|
328 |
sys.exit(1)
|
|
|
329 |
pp.pprint(client.getCategory(eval(args[0]),))
|
|
|
330 |
|
|
|
331 |
elif cmd == 'getAllCategories':
|
|
|
332 |
if len(args) != 0:
|
|
|
333 |
print 'getAllCategories requires 0 args'
|
|
|
334 |
sys.exit(1)
|
|
|
335 |
pp.pprint(client.getAllCategories())
|
|
|
336 |
|
|
|
337 |
elif cmd == 'getAllSimilarItems':
|
|
|
338 |
if len(args) != 1:
|
|
|
339 |
print 'getAllSimilarItems requires 1 args'
|
|
|
340 |
sys.exit(1)
|
|
|
341 |
pp.pprint(client.getAllSimilarItems(eval(args[0]),))
|
|
|
342 |
|
|
|
343 |
elif cmd == 'addSimilarItem':
|
|
|
344 |
if len(args) != 2:
|
|
|
345 |
print 'addSimilarItem requires 2 args'
|
|
|
346 |
sys.exit(1)
|
|
|
347 |
pp.pprint(client.addSimilarItem(eval(args[0]),eval(args[1]),))
|
|
|
348 |
|
| 6512 |
kshitij.so |
349 |
elif cmd == 'addTag':
|
|
|
350 |
if len(args) != 2:
|
|
|
351 |
print 'addTag requires 2 args'
|
|
|
352 |
sys.exit(1)
|
|
|
353 |
pp.pprint(client.addTag(args[0],eval(args[1]),))
|
|
|
354 |
|
|
|
355 |
elif cmd == 'deleteEntityTag':
|
|
|
356 |
if len(args) != 2:
|
|
|
357 |
print 'deleteEntityTag requires 2 args'
|
|
|
358 |
sys.exit(1)
|
|
|
359 |
pp.pprint(client.deleteEntityTag(args[0],eval(args[1]),))
|
|
|
360 |
|
|
|
361 |
elif cmd == 'deleteTag':
|
|
|
362 |
if len(args) != 1:
|
|
|
363 |
print 'deleteTag requires 1 args'
|
|
|
364 |
sys.exit(1)
|
|
|
365 |
pp.pprint(client.deleteTag(args[0],))
|
|
|
366 |
|
|
|
367 |
elif cmd == 'getAllTags':
|
|
|
368 |
if len(args) != 0:
|
|
|
369 |
print 'getAllTags requires 0 args'
|
|
|
370 |
sys.exit(1)
|
|
|
371 |
pp.pprint(client.getAllTags())
|
|
|
372 |
|
|
|
373 |
elif cmd == 'getAllEntitiesByTagName':
|
|
|
374 |
if len(args) != 1:
|
|
|
375 |
print 'getAllEntitiesByTagName requires 1 args'
|
|
|
376 |
sys.exit(1)
|
|
|
377 |
pp.pprint(client.getAllEntitiesByTagName(args[0],))
|
|
|
378 |
|
| 5944 |
mandeep.dh |
379 |
elif cmd == 'deleteSimilarItem':
|
|
|
380 |
if len(args) != 2:
|
|
|
381 |
print 'deleteSimilarItem requires 2 args'
|
|
|
382 |
sys.exit(1)
|
|
|
383 |
pp.pprint(client.deleteSimilarItem(eval(args[0]),eval(args[1]),))
|
|
|
384 |
|
|
|
385 |
elif cmd == 'checkSimilarItem':
|
|
|
386 |
if len(args) != 4:
|
|
|
387 |
print 'checkSimilarItem requires 4 args'
|
|
|
388 |
sys.exit(1)
|
|
|
389 |
pp.pprint(client.checkSimilarItem(args[0],args[1],args[2],args[3],))
|
|
|
390 |
|
|
|
391 |
elif cmd == 'validateRiskyStatus':
|
|
|
392 |
if len(args) != 1:
|
|
|
393 |
print 'validateRiskyStatus requires 1 args'
|
|
|
394 |
sys.exit(1)
|
|
|
395 |
pp.pprint(client.validateRiskyStatus(eval(args[0]),))
|
|
|
396 |
|
|
|
397 |
elif cmd == 'changeItemRiskyFlag':
|
|
|
398 |
if len(args) != 2:
|
|
|
399 |
print 'changeItemRiskyFlag requires 2 args'
|
|
|
400 |
sys.exit(1)
|
|
|
401 |
pp.pprint(client.changeItemRiskyFlag(eval(args[0]),eval(args[1]),))
|
|
|
402 |
|
|
|
403 |
elif cmd == 'getItemsByRiskyFlag':
|
|
|
404 |
if len(args) != 0:
|
|
|
405 |
print 'getItemsByRiskyFlag requires 0 args'
|
|
|
406 |
sys.exit(1)
|
|
|
407 |
pp.pprint(client.getItemsByRiskyFlag())
|
|
|
408 |
|
|
|
409 |
elif cmd == 'getItemsForMasterSheet':
|
|
|
410 |
if len(args) != 2:
|
|
|
411 |
print 'getItemsForMasterSheet requires 2 args'
|
|
|
412 |
sys.exit(1)
|
|
|
413 |
pp.pprint(client.getItemsForMasterSheet(args[0],args[1],))
|
|
|
414 |
|
|
|
415 |
elif cmd == 'getSimilarItemsCatalogIds':
|
|
|
416 |
if len(args) != 3:
|
|
|
417 |
print 'getSimilarItemsCatalogIds requires 3 args'
|
|
|
418 |
sys.exit(1)
|
|
|
419 |
pp.pprint(client.getSimilarItemsCatalogIds(eval(args[0]),eval(args[1]),eval(args[2]),))
|
|
|
420 |
|
|
|
421 |
elif cmd == 'addProductNotification':
|
|
|
422 |
if len(args) != 2:
|
|
|
423 |
print 'addProductNotification requires 2 args'
|
|
|
424 |
sys.exit(1)
|
|
|
425 |
pp.pprint(client.addProductNotification(eval(args[0]),args[1],))
|
|
|
426 |
|
|
|
427 |
elif cmd == 'sendProductNotifications':
|
|
|
428 |
if len(args) != 0:
|
|
|
429 |
print 'sendProductNotifications requires 0 args'
|
|
|
430 |
sys.exit(1)
|
|
|
431 |
pp.pprint(client.sendProductNotifications())
|
|
|
432 |
|
|
|
433 |
elif cmd == 'getAllBrandsByCategory':
|
|
|
434 |
if len(args) != 1:
|
|
|
435 |
print 'getAllBrandsByCategory requires 1 args'
|
|
|
436 |
sys.exit(1)
|
|
|
437 |
pp.pprint(client.getAllBrandsByCategory(eval(args[0]),))
|
|
|
438 |
|
|
|
439 |
elif cmd == 'getAllBrands':
|
|
|
440 |
if len(args) != 0:
|
|
|
441 |
print 'getAllBrands requires 0 args'
|
|
|
442 |
sys.exit(1)
|
|
|
443 |
pp.pprint(client.getAllBrands())
|
|
|
444 |
|
|
|
445 |
elif cmd == 'getAllSources':
|
|
|
446 |
if len(args) != 0:
|
|
|
447 |
print 'getAllSources requires 0 args'
|
|
|
448 |
sys.exit(1)
|
|
|
449 |
pp.pprint(client.getAllSources())
|
|
|
450 |
|
|
|
451 |
elif cmd == 'getItemPricingBySource':
|
|
|
452 |
if len(args) != 2:
|
|
|
453 |
print 'getItemPricingBySource requires 2 args'
|
|
|
454 |
sys.exit(1)
|
|
|
455 |
pp.pprint(client.getItemPricingBySource(eval(args[0]),eval(args[1]),))
|
|
|
456 |
|
|
|
457 |
elif cmd == 'addSourceItemPricing':
|
|
|
458 |
if len(args) != 1:
|
|
|
459 |
print 'addSourceItemPricing requires 1 args'
|
|
|
460 |
sys.exit(1)
|
|
|
461 |
pp.pprint(client.addSourceItemPricing(eval(args[0]),))
|
|
|
462 |
|
|
|
463 |
elif cmd == 'getAllSourcePricing':
|
|
|
464 |
if len(args) != 1:
|
|
|
465 |
print 'getAllSourcePricing requires 1 args'
|
|
|
466 |
sys.exit(1)
|
|
|
467 |
pp.pprint(client.getAllSourcePricing(eval(args[0]),))
|
|
|
468 |
|
|
|
469 |
elif cmd == 'getItemForSource':
|
|
|
470 |
if len(args) != 2:
|
|
|
471 |
print 'getItemForSource requires 2 args'
|
|
|
472 |
sys.exit(1)
|
|
|
473 |
pp.pprint(client.getItemForSource(eval(args[0]),eval(args[1]),))
|
|
|
474 |
|
|
|
475 |
elif cmd == 'searchItemsInRange':
|
|
|
476 |
if len(args) != 3:
|
|
|
477 |
print 'searchItemsInRange requires 3 args'
|
|
|
478 |
sys.exit(1)
|
|
|
479 |
pp.pprint(client.searchItemsInRange(eval(args[0]),eval(args[1]),eval(args[2]),))
|
|
|
480 |
|
|
|
481 |
elif cmd == 'getSearchResultCount':
|
|
|
482 |
if len(args) != 1:
|
|
|
483 |
print 'getSearchResultCount requires 1 args'
|
|
|
484 |
sys.exit(1)
|
|
|
485 |
pp.pprint(client.getSearchResultCount(eval(args[0]),))
|
|
|
486 |
|
|
|
487 |
elif cmd == 'getProductNotifications':
|
|
|
488 |
if len(args) != 1:
|
|
|
489 |
print 'getProductNotifications requires 1 args'
|
|
|
490 |
sys.exit(1)
|
|
|
491 |
pp.pprint(client.getProductNotifications(eval(args[0]),))
|
|
|
492 |
|
|
|
493 |
elif cmd == 'getProductNotificationRequestCount':
|
|
|
494 |
if len(args) != 1:
|
|
|
495 |
print 'getProductNotificationRequestCount requires 1 args'
|
|
|
496 |
sys.exit(1)
|
|
|
497 |
pp.pprint(client.getProductNotificationRequestCount(eval(args[0]),))
|
|
|
498 |
|
|
|
499 |
elif cmd == 'addAuthorizationLog':
|
|
|
500 |
if len(args) != 3:
|
|
|
501 |
print 'addAuthorizationLog requires 3 args'
|
|
|
502 |
sys.exit(1)
|
|
|
503 |
pp.pprint(client.addAuthorizationLog(eval(args[0]),args[1],args[2],))
|
|
|
504 |
|
|
|
505 |
elif cmd == 'getClearanceSaleCatalogIds':
|
|
|
506 |
if len(args) != 0:
|
|
|
507 |
print 'getClearanceSaleCatalogIds requires 0 args'
|
|
|
508 |
sys.exit(1)
|
|
|
509 |
pp.pprint(client.getClearanceSaleCatalogIds())
|
|
|
510 |
|
|
|
511 |
elif cmd == 'addupdateVoucherForItem':
|
|
|
512 |
if len(args) != 3:
|
|
|
513 |
print 'addupdateVoucherForItem requires 3 args'
|
|
|
514 |
sys.exit(1)
|
|
|
515 |
pp.pprint(client.addupdateVoucherForItem(eval(args[0]),eval(args[1]),eval(args[2]),))
|
|
|
516 |
|
|
|
517 |
elif cmd == 'deleteVoucherForItem':
|
|
|
518 |
if len(args) != 2:
|
|
|
519 |
print 'deleteVoucherForItem requires 2 args'
|
|
|
520 |
sys.exit(1)
|
|
|
521 |
pp.pprint(client.deleteVoucherForItem(eval(args[0]),eval(args[1]),))
|
|
|
522 |
|
|
|
523 |
elif cmd == 'getVoucherAmount':
|
|
|
524 |
if len(args) != 2:
|
|
|
525 |
print 'getVoucherAmount requires 2 args'
|
|
|
526 |
sys.exit(1)
|
|
|
527 |
pp.pprint(client.getVoucherAmount(eval(args[0]),eval(args[1]),))
|
|
|
528 |
|
|
|
529 |
elif cmd == 'getAllItemVouchers':
|
|
|
530 |
if len(args) != 1:
|
|
|
531 |
print 'getAllItemVouchers requires 1 args'
|
|
|
532 |
sys.exit(1)
|
|
|
533 |
pp.pprint(client.getAllItemVouchers(eval(args[0]),))
|
|
|
534 |
|
|
|
535 |
elif cmd == 'isValidCatalogItemId':
|
|
|
536 |
if len(args) != 1:
|
|
|
537 |
print 'isValidCatalogItemId requires 1 args'
|
|
|
538 |
sys.exit(1)
|
|
|
539 |
pp.pprint(client.isValidCatalogItemId(eval(args[0]),))
|
|
|
540 |
|
| 6039 |
amit.gupta |
541 |
elif cmd == 'getVatPercentageForItem':
|
|
|
542 |
if len(args) != 2:
|
|
|
543 |
print 'getVatPercentageForItem requires 2 args'
|
|
|
544 |
sys.exit(1)
|
|
|
545 |
pp.pprint(client.getVatPercentageForItem(eval(args[0]),eval(args[1]),))
|
|
|
546 |
|
|
|
547 |
elif cmd == 'getVatAmountForItem':
|
|
|
548 |
if len(args) != 2:
|
|
|
549 |
print 'getVatAmountForItem requires 2 args'
|
|
|
550 |
sys.exit(1)
|
|
|
551 |
pp.pprint(client.getVatAmountForItem(eval(args[0]),eval(args[1]),))
|
|
|
552 |
|
| 6531 |
vikram.rag |
553 |
elif cmd == 'getAllIgnoredInventoryUpdateItemsList':
|
|
|
554 |
if len(args) != 2:
|
|
|
555 |
print 'getAllIgnoredInventoryUpdateItemsList requires 2 args'
|
|
|
556 |
sys.exit(1)
|
|
|
557 |
pp.pprint(client.getAllIgnoredInventoryUpdateItemsList(eval(args[0]),eval(args[1]),))
|
|
|
558 |
|
| 6805 |
anupam.sin |
559 |
elif cmd == 'getInsuranceAmount':
|
|
|
560 |
if len(args) != 3:
|
|
|
561 |
print 'getInsuranceAmount requires 3 args'
|
|
|
562 |
sys.exit(1)
|
|
|
563 |
pp.pprint(client.getInsuranceAmount(eval(args[0]),eval(args[1]),eval(args[2]),))
|
|
|
564 |
|
|
|
565 |
elif cmd == 'getInsurer':
|
|
|
566 |
if len(args) != 1:
|
|
|
567 |
print 'getInsurer requires 1 args'
|
|
|
568 |
sys.exit(1)
|
|
|
569 |
pp.pprint(client.getInsurer(eval(args[0]),))
|
|
|
570 |
|
| 5944 |
mandeep.dh |
571 |
else:
|
|
|
572 |
print 'Unrecognized method %s' % cmd
|
|
|
573 |
sys.exit(1)
|
|
|
574 |
|
|
|
575 |
transport.close()
|