| 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)'
|
| 6845 |
amit.gupta |
63 |
print ' getAllEntityTags()'
|
| 6903 |
anupam.sin |
64 |
print ' bool addBanner(string bannerName, string imageName, string link, i64 priority, bool isActive, bool hasMap)'
|
|
|
65 |
print ' getAllBanners()'
|
|
|
66 |
print ' bool deleteBanner(string bannerName)'
|
|
|
67 |
print ' Banner getBannerDetails(string bannerName)'
|
|
|
68 |
print ' getActiveBanners()'
|
| 6849 |
kshitij.so |
69 |
print ' bool addBannerMap(string bannerName, string mapLink, string coordinates)'
|
|
|
70 |
print ' bool deleteBannerMap(string bannerName)'
|
|
|
71 |
print ' getBannerMapDetails(string bannerName)'
|
| 5944 |
mandeep.dh |
72 |
print ' bool deleteSimilarItem(i64 itemId, i64 catalogItemId)'
|
|
|
73 |
print ' i64 checkSimilarItem(string brand, string modelNumber, string modelName, string color)'
|
|
|
74 |
print ' void validateRiskyStatus(i64 itemId)'
|
|
|
75 |
print ' void changeItemRiskyFlag(i64 itemId, bool risky)'
|
|
|
76 |
print ' getItemsByRiskyFlag()'
|
|
|
77 |
print ' getItemsForMasterSheet(string category, string brand)'
|
|
|
78 |
print ' getSimilarItemsCatalogIds(i64 beginIndex, i64 totalItems, i64 itemId)'
|
|
|
79 |
print ' bool addProductNotification(i64 itemId, string email)'
|
|
|
80 |
print ' bool sendProductNotifications()'
|
|
|
81 |
print ' getAllBrandsByCategory(i64 categoryId)'
|
|
|
82 |
print ' getAllBrands()'
|
|
|
83 |
print ' getAllSources()'
|
|
|
84 |
print ' SourceItemPricing getItemPricingBySource(i64 itemId, i64 sourceId)'
|
|
|
85 |
print ' void addSourceItemPricing(SourceItemPricing sourceItemPricing)'
|
|
|
86 |
print ' getAllSourcePricing(i64 itemId)'
|
|
|
87 |
print ' Item getItemForSource(i64 item_id, i64 sourceId)'
|
|
|
88 |
print ' searchItemsInRange( searchTerms, i64 offset, i64 limit)'
|
|
|
89 |
print ' i32 getSearchResultCount( searchTerms)'
|
|
|
90 |
print ' getProductNotifications(i64 startDateTime)'
|
|
|
91 |
print ' getProductNotificationRequestCount(i64 startDateTime)'
|
|
|
92 |
print ' bool addAuthorizationLog(i64 itemId, string username, string reason)'
|
|
|
93 |
print ' getClearanceSaleCatalogIds()'
|
|
|
94 |
print ' bool addupdateVoucherForItem(i64 catalog_item_id, i64 voucherType, i64 voucherAmount)'
|
|
|
95 |
print ' bool deleteVoucherForItem(i64 catalog_item_id, i64 voucherType)'
|
|
|
96 |
print ' i64 getVoucherAmount(i64 itemId, i64 voucherType)'
|
|
|
97 |
print ' getAllItemVouchers(i64 itemId)'
|
|
|
98 |
print ' bool isValidCatalogItemId(i64 catalog_item_id)'
|
| 6039 |
amit.gupta |
99 |
print ' double getVatPercentageForItem(i64 itemId, double price)'
|
|
|
100 |
print ' double getVatAmountForItem(i64 itemId, double price)'
|
| 6531 |
vikram.rag |
101 |
print ' getAllIgnoredInventoryUpdateItemsList(i32 offset, i32 limit)'
|
| 6845 |
amit.gupta |
102 |
print ' getAllAliveItems()'
|
| 6921 |
anupam.sin |
103 |
print ' i64 getInsuranceAmount(i64 itemId, double price, i64 insurerId, i64 quantity)'
|
| 6805 |
anupam.sin |
104 |
print ' Insurer getInsurer(i64 insurerId)'
|
| 6849 |
kshitij.so |
105 |
print ' getAllInsurers()'
|
| 5944 |
mandeep.dh |
106 |
print ''
|
|
|
107 |
sys.exit(0)
|
|
|
108 |
|
|
|
109 |
pp = pprint.PrettyPrinter(indent = 2)
|
|
|
110 |
host = 'localhost'
|
|
|
111 |
port = 9090
|
|
|
112 |
uri = ''
|
|
|
113 |
framed = False
|
|
|
114 |
http = False
|
|
|
115 |
argi = 1
|
|
|
116 |
|
|
|
117 |
if sys.argv[argi] == '-h':
|
|
|
118 |
parts = sys.argv[argi+1].split(':')
|
|
|
119 |
host = parts[0]
|
|
|
120 |
port = int(parts[1])
|
|
|
121 |
argi += 2
|
|
|
122 |
|
|
|
123 |
if sys.argv[argi] == '-u':
|
|
|
124 |
url = urlparse(sys.argv[argi+1])
|
|
|
125 |
parts = url[1].split(':')
|
|
|
126 |
host = parts[0]
|
|
|
127 |
if len(parts) > 1:
|
|
|
128 |
port = int(parts[1])
|
|
|
129 |
else:
|
|
|
130 |
port = 80
|
|
|
131 |
uri = url[2]
|
|
|
132 |
if url[4]:
|
|
|
133 |
uri += '?%s' % url[4]
|
|
|
134 |
http = True
|
|
|
135 |
argi += 2
|
|
|
136 |
|
|
|
137 |
if sys.argv[argi] == '-f' or sys.argv[argi] == '-framed':
|
|
|
138 |
framed = True
|
|
|
139 |
argi += 1
|
|
|
140 |
|
|
|
141 |
cmd = sys.argv[argi]
|
|
|
142 |
args = sys.argv[argi+1:]
|
|
|
143 |
|
|
|
144 |
if http:
|
|
|
145 |
transport = THttpClient.THttpClient(host, port, uri)
|
|
|
146 |
else:
|
|
|
147 |
socket = TSocket.TSocket(host, port)
|
|
|
148 |
if framed:
|
|
|
149 |
transport = TTransport.TFramedTransport(socket)
|
|
|
150 |
else:
|
|
|
151 |
transport = TTransport.TBufferedTransport(socket)
|
|
|
152 |
protocol = TBinaryProtocol.TBinaryProtocol(transport)
|
|
|
153 |
client = CatalogService.Client(protocol)
|
|
|
154 |
transport.open()
|
|
|
155 |
|
|
|
156 |
if cmd == 'addItem':
|
|
|
157 |
if len(args) != 1:
|
|
|
158 |
print 'addItem requires 1 args'
|
|
|
159 |
sys.exit(1)
|
|
|
160 |
pp.pprint(client.addItem(eval(args[0]),))
|
|
|
161 |
|
|
|
162 |
elif cmd == 'updateItem':
|
|
|
163 |
if len(args) != 1:
|
|
|
164 |
print 'updateItem requires 1 args'
|
|
|
165 |
sys.exit(1)
|
|
|
166 |
pp.pprint(client.updateItem(eval(args[0]),))
|
|
|
167 |
|
|
|
168 |
elif cmd == 'isActive':
|
|
|
169 |
if len(args) != 1:
|
|
|
170 |
print 'isActive requires 1 args'
|
|
|
171 |
sys.exit(1)
|
|
|
172 |
pp.pprint(client.isActive(eval(args[0]),))
|
|
|
173 |
|
|
|
174 |
elif cmd == 'getItemStatusDescription':
|
|
|
175 |
if len(args) != 1:
|
|
|
176 |
print 'getItemStatusDescription requires 1 args'
|
|
|
177 |
sys.exit(1)
|
|
|
178 |
pp.pprint(client.getItemStatusDescription(eval(args[0]),))
|
|
|
179 |
|
|
|
180 |
elif cmd == 'startItemOn':
|
|
|
181 |
if len(args) != 2:
|
|
|
182 |
print 'startItemOn requires 2 args'
|
|
|
183 |
sys.exit(1)
|
|
|
184 |
pp.pprint(client.startItemOn(eval(args[0]),eval(args[1]),))
|
|
|
185 |
|
|
|
186 |
elif cmd == 'retireItemOn':
|
|
|
187 |
if len(args) != 2:
|
|
|
188 |
print 'retireItemOn requires 2 args'
|
|
|
189 |
sys.exit(1)
|
|
|
190 |
pp.pprint(client.retireItemOn(eval(args[0]),eval(args[1]),))
|
|
|
191 |
|
|
|
192 |
elif cmd == 'changeItemStatus':
|
|
|
193 |
if len(args) != 3:
|
|
|
194 |
print 'changeItemStatus requires 3 args'
|
|
|
195 |
sys.exit(1)
|
|
|
196 |
pp.pprint(client.changeItemStatus(eval(args[0]),eval(args[1]),eval(args[2]),))
|
|
|
197 |
|
|
|
198 |
elif cmd == 'getItem':
|
|
|
199 |
if len(args) != 1:
|
|
|
200 |
print 'getItem requires 1 args'
|
|
|
201 |
sys.exit(1)
|
|
|
202 |
pp.pprint(client.getItem(eval(args[0]),))
|
|
|
203 |
|
|
|
204 |
elif cmd == 'getItemsByCatalogId':
|
|
|
205 |
if len(args) != 1:
|
|
|
206 |
print 'getItemsByCatalogId requires 1 args'
|
|
|
207 |
sys.exit(1)
|
|
|
208 |
pp.pprint(client.getItemsByCatalogId(eval(args[0]),))
|
|
|
209 |
|
|
|
210 |
elif cmd == 'getValidItemsByCatalogId':
|
|
|
211 |
if len(args) != 1:
|
|
|
212 |
print 'getValidItemsByCatalogId requires 1 args'
|
|
|
213 |
sys.exit(1)
|
|
|
214 |
pp.pprint(client.getValidItemsByCatalogId(eval(args[0]),))
|
|
|
215 |
|
|
|
216 |
elif cmd == 'getAllItems':
|
|
|
217 |
if len(args) != 1:
|
|
|
218 |
print 'getAllItems requires 1 args'
|
|
|
219 |
sys.exit(1)
|
|
|
220 |
pp.pprint(client.getAllItems(eval(args[0]),))
|
|
|
221 |
|
|
|
222 |
elif cmd == 'getAllItemsByStatus':
|
|
|
223 |
if len(args) != 1:
|
|
|
224 |
print 'getAllItemsByStatus requires 1 args'
|
|
|
225 |
sys.exit(1)
|
|
|
226 |
pp.pprint(client.getAllItemsByStatus(eval(args[0]),))
|
|
|
227 |
|
|
|
228 |
elif cmd == 'markItemAsContentComplete':
|
|
|
229 |
if len(args) != 5:
|
|
|
230 |
print 'markItemAsContentComplete requires 5 args'
|
|
|
231 |
sys.exit(1)
|
|
|
232 |
pp.pprint(client.markItemAsContentComplete(eval(args[0]),eval(args[1]),args[2],args[3],args[4],))
|
|
|
233 |
|
|
|
234 |
elif cmd == 'getAllItemsInRange':
|
|
|
235 |
if len(args) != 2:
|
|
|
236 |
print 'getAllItemsInRange requires 2 args'
|
|
|
237 |
sys.exit(1)
|
|
|
238 |
pp.pprint(client.getAllItemsInRange(eval(args[0]),eval(args[1]),))
|
|
|
239 |
|
|
|
240 |
elif cmd == 'getAllItemsByStatusInRange':
|
|
|
241 |
if len(args) != 3:
|
|
|
242 |
print 'getAllItemsByStatusInRange requires 3 args'
|
|
|
243 |
sys.exit(1)
|
|
|
244 |
pp.pprint(client.getAllItemsByStatusInRange(eval(args[0]),eval(args[1]),eval(args[2]),))
|
|
|
245 |
|
|
|
246 |
elif cmd == 'getItemCountByStatus':
|
|
|
247 |
if len(args) != 2:
|
|
|
248 |
print 'getItemCountByStatus requires 2 args'
|
|
|
249 |
sys.exit(1)
|
|
|
250 |
pp.pprint(client.getItemCountByStatus(eval(args[0]),eval(args[1]),))
|
|
|
251 |
|
|
|
252 |
elif cmd == 'getBestSellers':
|
|
|
253 |
if len(args) != 0:
|
|
|
254 |
print 'getBestSellers requires 0 args'
|
|
|
255 |
sys.exit(1)
|
|
|
256 |
pp.pprint(client.getBestSellers())
|
|
|
257 |
|
|
|
258 |
elif cmd == 'getBestSellersCatalogIds':
|
|
|
259 |
if len(args) != 4:
|
|
|
260 |
print 'getBestSellersCatalogIds requires 4 args'
|
|
|
261 |
sys.exit(1)
|
|
|
262 |
pp.pprint(client.getBestSellersCatalogIds(eval(args[0]),eval(args[1]),args[2],eval(args[3]),))
|
|
|
263 |
|
|
|
264 |
elif cmd == 'getBestSellersCount':
|
|
|
265 |
if len(args) != 0:
|
|
|
266 |
print 'getBestSellersCount requires 0 args'
|
|
|
267 |
sys.exit(1)
|
|
|
268 |
pp.pprint(client.getBestSellersCount())
|
|
|
269 |
|
|
|
270 |
elif cmd == 'getBestDeals':
|
|
|
271 |
if len(args) != 0:
|
|
|
272 |
print 'getBestDeals requires 0 args'
|
|
|
273 |
sys.exit(1)
|
|
|
274 |
pp.pprint(client.getBestDeals())
|
|
|
275 |
|
|
|
276 |
elif cmd == 'getBestDealsCatalogIds':
|
|
|
277 |
if len(args) != 4:
|
|
|
278 |
print 'getBestDealsCatalogIds requires 4 args'
|
|
|
279 |
sys.exit(1)
|
|
|
280 |
pp.pprint(client.getBestDealsCatalogIds(eval(args[0]),eval(args[1]),args[2],eval(args[3]),))
|
|
|
281 |
|
|
|
282 |
elif cmd == 'getBestDealsCount':
|
|
|
283 |
if len(args) != 0:
|
|
|
284 |
print 'getBestDealsCount requires 0 args'
|
|
|
285 |
sys.exit(1)
|
|
|
286 |
pp.pprint(client.getBestDealsCount())
|
|
|
287 |
|
|
|
288 |
elif cmd == 'getComingSoon':
|
|
|
289 |
if len(args) != 0:
|
|
|
290 |
print 'getComingSoon requires 0 args'
|
|
|
291 |
sys.exit(1)
|
|
|
292 |
pp.pprint(client.getComingSoon())
|
|
|
293 |
|
|
|
294 |
elif cmd == 'getComingSoonCatalogIds':
|
|
|
295 |
if len(args) != 4:
|
|
|
296 |
print 'getComingSoonCatalogIds requires 4 args'
|
|
|
297 |
sys.exit(1)
|
|
|
298 |
pp.pprint(client.getComingSoonCatalogIds(eval(args[0]),eval(args[1]),args[2],eval(args[3]),))
|
|
|
299 |
|
|
|
300 |
elif cmd == 'getComingSoonCount':
|
|
|
301 |
if len(args) != 0:
|
|
|
302 |
print 'getComingSoonCount requires 0 args'
|
|
|
303 |
sys.exit(1)
|
|
|
304 |
pp.pprint(client.getComingSoonCount())
|
|
|
305 |
|
|
|
306 |
elif cmd == 'getLatestArrivals':
|
|
|
307 |
if len(args) != 0:
|
|
|
308 |
print 'getLatestArrivals requires 0 args'
|
|
|
309 |
sys.exit(1)
|
|
|
310 |
pp.pprint(client.getLatestArrivals())
|
|
|
311 |
|
|
|
312 |
elif cmd == 'getLatestArrivalsCatalogIds':
|
|
|
313 |
if len(args) != 4:
|
|
|
314 |
print 'getLatestArrivalsCatalogIds requires 4 args'
|
|
|
315 |
sys.exit(1)
|
|
|
316 |
pp.pprint(client.getLatestArrivalsCatalogIds(eval(args[0]),eval(args[1]),args[2],eval(args[3]),))
|
|
|
317 |
|
|
|
318 |
elif cmd == 'getLatestArrivalsCount':
|
|
|
319 |
if len(args) != 0:
|
|
|
320 |
print 'getLatestArrivalsCount requires 0 args'
|
|
|
321 |
sys.exit(1)
|
|
|
322 |
pp.pprint(client.getLatestArrivalsCount())
|
|
|
323 |
|
|
|
324 |
elif cmd == 'generateNewEntityID':
|
|
|
325 |
if len(args) != 0:
|
|
|
326 |
print 'generateNewEntityID requires 0 args'
|
|
|
327 |
sys.exit(1)
|
|
|
328 |
pp.pprint(client.generateNewEntityID())
|
|
|
329 |
|
|
|
330 |
elif cmd == 'addCategory':
|
|
|
331 |
if len(args) != 1:
|
|
|
332 |
print 'addCategory requires 1 args'
|
|
|
333 |
sys.exit(1)
|
|
|
334 |
pp.pprint(client.addCategory(eval(args[0]),))
|
|
|
335 |
|
|
|
336 |
elif cmd == 'getCategory':
|
|
|
337 |
if len(args) != 1:
|
|
|
338 |
print 'getCategory requires 1 args'
|
|
|
339 |
sys.exit(1)
|
|
|
340 |
pp.pprint(client.getCategory(eval(args[0]),))
|
|
|
341 |
|
|
|
342 |
elif cmd == 'getAllCategories':
|
|
|
343 |
if len(args) != 0:
|
|
|
344 |
print 'getAllCategories requires 0 args'
|
|
|
345 |
sys.exit(1)
|
|
|
346 |
pp.pprint(client.getAllCategories())
|
|
|
347 |
|
|
|
348 |
elif cmd == 'getAllSimilarItems':
|
|
|
349 |
if len(args) != 1:
|
|
|
350 |
print 'getAllSimilarItems requires 1 args'
|
|
|
351 |
sys.exit(1)
|
|
|
352 |
pp.pprint(client.getAllSimilarItems(eval(args[0]),))
|
|
|
353 |
|
|
|
354 |
elif cmd == 'addSimilarItem':
|
|
|
355 |
if len(args) != 2:
|
|
|
356 |
print 'addSimilarItem requires 2 args'
|
|
|
357 |
sys.exit(1)
|
|
|
358 |
pp.pprint(client.addSimilarItem(eval(args[0]),eval(args[1]),))
|
|
|
359 |
|
| 6512 |
kshitij.so |
360 |
elif cmd == 'addTag':
|
|
|
361 |
if len(args) != 2:
|
|
|
362 |
print 'addTag requires 2 args'
|
|
|
363 |
sys.exit(1)
|
|
|
364 |
pp.pprint(client.addTag(args[0],eval(args[1]),))
|
|
|
365 |
|
|
|
366 |
elif cmd == 'deleteEntityTag':
|
|
|
367 |
if len(args) != 2:
|
|
|
368 |
print 'deleteEntityTag requires 2 args'
|
|
|
369 |
sys.exit(1)
|
|
|
370 |
pp.pprint(client.deleteEntityTag(args[0],eval(args[1]),))
|
|
|
371 |
|
|
|
372 |
elif cmd == 'deleteTag':
|
|
|
373 |
if len(args) != 1:
|
|
|
374 |
print 'deleteTag requires 1 args'
|
|
|
375 |
sys.exit(1)
|
|
|
376 |
pp.pprint(client.deleteTag(args[0],))
|
|
|
377 |
|
|
|
378 |
elif cmd == 'getAllTags':
|
|
|
379 |
if len(args) != 0:
|
|
|
380 |
print 'getAllTags requires 0 args'
|
|
|
381 |
sys.exit(1)
|
|
|
382 |
pp.pprint(client.getAllTags())
|
|
|
383 |
|
|
|
384 |
elif cmd == 'getAllEntitiesByTagName':
|
|
|
385 |
if len(args) != 1:
|
|
|
386 |
print 'getAllEntitiesByTagName requires 1 args'
|
|
|
387 |
sys.exit(1)
|
|
|
388 |
pp.pprint(client.getAllEntitiesByTagName(args[0],))
|
|
|
389 |
|
| 6845 |
amit.gupta |
390 |
elif cmd == 'getAllEntityTags':
|
|
|
391 |
if len(args) != 0:
|
|
|
392 |
print 'getAllEntityTags requires 0 args'
|
|
|
393 |
sys.exit(1)
|
|
|
394 |
pp.pprint(client.getAllEntityTags())
|
|
|
395 |
|
| 6903 |
anupam.sin |
396 |
elif cmd == 'addBanner':
|
|
|
397 |
if len(args) != 6:
|
|
|
398 |
print 'addBanner requires 6 args'
|
|
|
399 |
sys.exit(1)
|
|
|
400 |
pp.pprint(client.addBanner(args[0],args[1],args[2],eval(args[3]),eval(args[4]),eval(args[5]),))
|
|
|
401 |
|
|
|
402 |
elif cmd == 'getAllBanners':
|
|
|
403 |
if len(args) != 0:
|
|
|
404 |
print 'getAllBanners requires 0 args'
|
|
|
405 |
sys.exit(1)
|
|
|
406 |
pp.pprint(client.getAllBanners())
|
|
|
407 |
|
|
|
408 |
elif cmd == 'deleteBanner':
|
|
|
409 |
if len(args) != 1:
|
|
|
410 |
print 'deleteBanner requires 1 args'
|
|
|
411 |
sys.exit(1)
|
|
|
412 |
pp.pprint(client.deleteBanner(args[0],))
|
|
|
413 |
|
|
|
414 |
elif cmd == 'getBannerDetails':
|
|
|
415 |
if len(args) != 1:
|
|
|
416 |
print 'getBannerDetails requires 1 args'
|
|
|
417 |
sys.exit(1)
|
|
|
418 |
pp.pprint(client.getBannerDetails(args[0],))
|
|
|
419 |
|
|
|
420 |
elif cmd == 'getActiveBanners':
|
|
|
421 |
if len(args) != 0:
|
|
|
422 |
print 'getActiveBanners requires 0 args'
|
|
|
423 |
sys.exit(1)
|
|
|
424 |
pp.pprint(client.getActiveBanners())
|
|
|
425 |
|
| 6849 |
kshitij.so |
426 |
elif cmd == 'addBannerMap':
|
|
|
427 |
if len(args) != 3:
|
|
|
428 |
print 'addBannerMap requires 3 args'
|
|
|
429 |
sys.exit(1)
|
|
|
430 |
pp.pprint(client.addBannerMap(args[0],args[1],args[2],))
|
|
|
431 |
|
|
|
432 |
elif cmd == 'deleteBannerMap':
|
|
|
433 |
if len(args) != 1:
|
|
|
434 |
print 'deleteBannerMap requires 1 args'
|
|
|
435 |
sys.exit(1)
|
|
|
436 |
pp.pprint(client.deleteBannerMap(args[0],))
|
|
|
437 |
|
|
|
438 |
elif cmd == 'getBannerMapDetails':
|
|
|
439 |
if len(args) != 1:
|
|
|
440 |
print 'getBannerMapDetails requires 1 args'
|
|
|
441 |
sys.exit(1)
|
|
|
442 |
pp.pprint(client.getBannerMapDetails(args[0],))
|
|
|
443 |
|
| 5944 |
mandeep.dh |
444 |
elif cmd == 'deleteSimilarItem':
|
|
|
445 |
if len(args) != 2:
|
|
|
446 |
print 'deleteSimilarItem requires 2 args'
|
|
|
447 |
sys.exit(1)
|
|
|
448 |
pp.pprint(client.deleteSimilarItem(eval(args[0]),eval(args[1]),))
|
|
|
449 |
|
|
|
450 |
elif cmd == 'checkSimilarItem':
|
|
|
451 |
if len(args) != 4:
|
|
|
452 |
print 'checkSimilarItem requires 4 args'
|
|
|
453 |
sys.exit(1)
|
|
|
454 |
pp.pprint(client.checkSimilarItem(args[0],args[1],args[2],args[3],))
|
|
|
455 |
|
|
|
456 |
elif cmd == 'validateRiskyStatus':
|
|
|
457 |
if len(args) != 1:
|
|
|
458 |
print 'validateRiskyStatus requires 1 args'
|
|
|
459 |
sys.exit(1)
|
|
|
460 |
pp.pprint(client.validateRiskyStatus(eval(args[0]),))
|
|
|
461 |
|
|
|
462 |
elif cmd == 'changeItemRiskyFlag':
|
|
|
463 |
if len(args) != 2:
|
|
|
464 |
print 'changeItemRiskyFlag requires 2 args'
|
|
|
465 |
sys.exit(1)
|
|
|
466 |
pp.pprint(client.changeItemRiskyFlag(eval(args[0]),eval(args[1]),))
|
|
|
467 |
|
|
|
468 |
elif cmd == 'getItemsByRiskyFlag':
|
|
|
469 |
if len(args) != 0:
|
|
|
470 |
print 'getItemsByRiskyFlag requires 0 args'
|
|
|
471 |
sys.exit(1)
|
|
|
472 |
pp.pprint(client.getItemsByRiskyFlag())
|
|
|
473 |
|
|
|
474 |
elif cmd == 'getItemsForMasterSheet':
|
|
|
475 |
if len(args) != 2:
|
|
|
476 |
print 'getItemsForMasterSheet requires 2 args'
|
|
|
477 |
sys.exit(1)
|
|
|
478 |
pp.pprint(client.getItemsForMasterSheet(args[0],args[1],))
|
|
|
479 |
|
|
|
480 |
elif cmd == 'getSimilarItemsCatalogIds':
|
|
|
481 |
if len(args) != 3:
|
|
|
482 |
print 'getSimilarItemsCatalogIds requires 3 args'
|
|
|
483 |
sys.exit(1)
|
|
|
484 |
pp.pprint(client.getSimilarItemsCatalogIds(eval(args[0]),eval(args[1]),eval(args[2]),))
|
|
|
485 |
|
|
|
486 |
elif cmd == 'addProductNotification':
|
|
|
487 |
if len(args) != 2:
|
|
|
488 |
print 'addProductNotification requires 2 args'
|
|
|
489 |
sys.exit(1)
|
|
|
490 |
pp.pprint(client.addProductNotification(eval(args[0]),args[1],))
|
|
|
491 |
|
|
|
492 |
elif cmd == 'sendProductNotifications':
|
|
|
493 |
if len(args) != 0:
|
|
|
494 |
print 'sendProductNotifications requires 0 args'
|
|
|
495 |
sys.exit(1)
|
|
|
496 |
pp.pprint(client.sendProductNotifications())
|
|
|
497 |
|
|
|
498 |
elif cmd == 'getAllBrandsByCategory':
|
|
|
499 |
if len(args) != 1:
|
|
|
500 |
print 'getAllBrandsByCategory requires 1 args'
|
|
|
501 |
sys.exit(1)
|
|
|
502 |
pp.pprint(client.getAllBrandsByCategory(eval(args[0]),))
|
|
|
503 |
|
|
|
504 |
elif cmd == 'getAllBrands':
|
|
|
505 |
if len(args) != 0:
|
|
|
506 |
print 'getAllBrands requires 0 args'
|
|
|
507 |
sys.exit(1)
|
|
|
508 |
pp.pprint(client.getAllBrands())
|
|
|
509 |
|
|
|
510 |
elif cmd == 'getAllSources':
|
|
|
511 |
if len(args) != 0:
|
|
|
512 |
print 'getAllSources requires 0 args'
|
|
|
513 |
sys.exit(1)
|
|
|
514 |
pp.pprint(client.getAllSources())
|
|
|
515 |
|
|
|
516 |
elif cmd == 'getItemPricingBySource':
|
|
|
517 |
if len(args) != 2:
|
|
|
518 |
print 'getItemPricingBySource requires 2 args'
|
|
|
519 |
sys.exit(1)
|
|
|
520 |
pp.pprint(client.getItemPricingBySource(eval(args[0]),eval(args[1]),))
|
|
|
521 |
|
|
|
522 |
elif cmd == 'addSourceItemPricing':
|
|
|
523 |
if len(args) != 1:
|
|
|
524 |
print 'addSourceItemPricing requires 1 args'
|
|
|
525 |
sys.exit(1)
|
|
|
526 |
pp.pprint(client.addSourceItemPricing(eval(args[0]),))
|
|
|
527 |
|
|
|
528 |
elif cmd == 'getAllSourcePricing':
|
|
|
529 |
if len(args) != 1:
|
|
|
530 |
print 'getAllSourcePricing requires 1 args'
|
|
|
531 |
sys.exit(1)
|
|
|
532 |
pp.pprint(client.getAllSourcePricing(eval(args[0]),))
|
|
|
533 |
|
|
|
534 |
elif cmd == 'getItemForSource':
|
|
|
535 |
if len(args) != 2:
|
|
|
536 |
print 'getItemForSource requires 2 args'
|
|
|
537 |
sys.exit(1)
|
|
|
538 |
pp.pprint(client.getItemForSource(eval(args[0]),eval(args[1]),))
|
|
|
539 |
|
|
|
540 |
elif cmd == 'searchItemsInRange':
|
|
|
541 |
if len(args) != 3:
|
|
|
542 |
print 'searchItemsInRange requires 3 args'
|
|
|
543 |
sys.exit(1)
|
|
|
544 |
pp.pprint(client.searchItemsInRange(eval(args[0]),eval(args[1]),eval(args[2]),))
|
|
|
545 |
|
|
|
546 |
elif cmd == 'getSearchResultCount':
|
|
|
547 |
if len(args) != 1:
|
|
|
548 |
print 'getSearchResultCount requires 1 args'
|
|
|
549 |
sys.exit(1)
|
|
|
550 |
pp.pprint(client.getSearchResultCount(eval(args[0]),))
|
|
|
551 |
|
|
|
552 |
elif cmd == 'getProductNotifications':
|
|
|
553 |
if len(args) != 1:
|
|
|
554 |
print 'getProductNotifications requires 1 args'
|
|
|
555 |
sys.exit(1)
|
|
|
556 |
pp.pprint(client.getProductNotifications(eval(args[0]),))
|
|
|
557 |
|
|
|
558 |
elif cmd == 'getProductNotificationRequestCount':
|
|
|
559 |
if len(args) != 1:
|
|
|
560 |
print 'getProductNotificationRequestCount requires 1 args'
|
|
|
561 |
sys.exit(1)
|
|
|
562 |
pp.pprint(client.getProductNotificationRequestCount(eval(args[0]),))
|
|
|
563 |
|
|
|
564 |
elif cmd == 'addAuthorizationLog':
|
|
|
565 |
if len(args) != 3:
|
|
|
566 |
print 'addAuthorizationLog requires 3 args'
|
|
|
567 |
sys.exit(1)
|
|
|
568 |
pp.pprint(client.addAuthorizationLog(eval(args[0]),args[1],args[2],))
|
|
|
569 |
|
|
|
570 |
elif cmd == 'getClearanceSaleCatalogIds':
|
|
|
571 |
if len(args) != 0:
|
|
|
572 |
print 'getClearanceSaleCatalogIds requires 0 args'
|
|
|
573 |
sys.exit(1)
|
|
|
574 |
pp.pprint(client.getClearanceSaleCatalogIds())
|
|
|
575 |
|
|
|
576 |
elif cmd == 'addupdateVoucherForItem':
|
|
|
577 |
if len(args) != 3:
|
|
|
578 |
print 'addupdateVoucherForItem requires 3 args'
|
|
|
579 |
sys.exit(1)
|
|
|
580 |
pp.pprint(client.addupdateVoucherForItem(eval(args[0]),eval(args[1]),eval(args[2]),))
|
|
|
581 |
|
|
|
582 |
elif cmd == 'deleteVoucherForItem':
|
|
|
583 |
if len(args) != 2:
|
|
|
584 |
print 'deleteVoucherForItem requires 2 args'
|
|
|
585 |
sys.exit(1)
|
|
|
586 |
pp.pprint(client.deleteVoucherForItem(eval(args[0]),eval(args[1]),))
|
|
|
587 |
|
|
|
588 |
elif cmd == 'getVoucherAmount':
|
|
|
589 |
if len(args) != 2:
|
|
|
590 |
print 'getVoucherAmount requires 2 args'
|
|
|
591 |
sys.exit(1)
|
|
|
592 |
pp.pprint(client.getVoucherAmount(eval(args[0]),eval(args[1]),))
|
|
|
593 |
|
|
|
594 |
elif cmd == 'getAllItemVouchers':
|
|
|
595 |
if len(args) != 1:
|
|
|
596 |
print 'getAllItemVouchers requires 1 args'
|
|
|
597 |
sys.exit(1)
|
|
|
598 |
pp.pprint(client.getAllItemVouchers(eval(args[0]),))
|
|
|
599 |
|
|
|
600 |
elif cmd == 'isValidCatalogItemId':
|
|
|
601 |
if len(args) != 1:
|
|
|
602 |
print 'isValidCatalogItemId requires 1 args'
|
|
|
603 |
sys.exit(1)
|
|
|
604 |
pp.pprint(client.isValidCatalogItemId(eval(args[0]),))
|
|
|
605 |
|
| 6039 |
amit.gupta |
606 |
elif cmd == 'getVatPercentageForItem':
|
|
|
607 |
if len(args) != 2:
|
|
|
608 |
print 'getVatPercentageForItem requires 2 args'
|
|
|
609 |
sys.exit(1)
|
|
|
610 |
pp.pprint(client.getVatPercentageForItem(eval(args[0]),eval(args[1]),))
|
|
|
611 |
|
|
|
612 |
elif cmd == 'getVatAmountForItem':
|
|
|
613 |
if len(args) != 2:
|
|
|
614 |
print 'getVatAmountForItem requires 2 args'
|
|
|
615 |
sys.exit(1)
|
|
|
616 |
pp.pprint(client.getVatAmountForItem(eval(args[0]),eval(args[1]),))
|
|
|
617 |
|
| 6531 |
vikram.rag |
618 |
elif cmd == 'getAllIgnoredInventoryUpdateItemsList':
|
|
|
619 |
if len(args) != 2:
|
|
|
620 |
print 'getAllIgnoredInventoryUpdateItemsList requires 2 args'
|
|
|
621 |
sys.exit(1)
|
|
|
622 |
pp.pprint(client.getAllIgnoredInventoryUpdateItemsList(eval(args[0]),eval(args[1]),))
|
|
|
623 |
|
| 6845 |
amit.gupta |
624 |
elif cmd == 'getAllAliveItems':
|
|
|
625 |
if len(args) != 0:
|
|
|
626 |
print 'getAllAliveItems requires 0 args'
|
|
|
627 |
sys.exit(1)
|
|
|
628 |
pp.pprint(client.getAllAliveItems())
|
|
|
629 |
|
| 6805 |
anupam.sin |
630 |
elif cmd == 'getInsuranceAmount':
|
| 6921 |
anupam.sin |
631 |
if len(args) != 4:
|
|
|
632 |
print 'getInsuranceAmount requires 4 args'
|
| 6805 |
anupam.sin |
633 |
sys.exit(1)
|
| 6921 |
anupam.sin |
634 |
pp.pprint(client.getInsuranceAmount(eval(args[0]),eval(args[1]),eval(args[2]),eval(args[3]),))
|
| 6805 |
anupam.sin |
635 |
|
|
|
636 |
elif cmd == 'getInsurer':
|
|
|
637 |
if len(args) != 1:
|
|
|
638 |
print 'getInsurer requires 1 args'
|
|
|
639 |
sys.exit(1)
|
|
|
640 |
pp.pprint(client.getInsurer(eval(args[0]),))
|
|
|
641 |
|
| 6849 |
kshitij.so |
642 |
elif cmd == 'getAllInsurers':
|
|
|
643 |
if len(args) != 0:
|
|
|
644 |
print 'getAllInsurers requires 0 args'
|
|
|
645 |
sys.exit(1)
|
|
|
646 |
pp.pprint(client.getAllInsurers())
|
|
|
647 |
|
| 5944 |
mandeep.dh |
648 |
else:
|
|
|
649 |
print 'Unrecognized method %s' % cmd
|
|
|
650 |
sys.exit(1)
|
|
|
651 |
|
|
|
652 |
transport.close()
|