| 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 ' bool addupdateVoucherForItem(i64 catalog_item_id, i64 voucherType, i64 voucherAmount)'
|
|
|
94 |
print ' bool deleteVoucherForItem(i64 catalog_item_id, i64 voucherType)'
|
|
|
95 |
print ' i64 getVoucherAmount(i64 itemId, i64 voucherType)'
|
|
|
96 |
print ' getAllItemVouchers(i64 itemId)'
|
|
|
97 |
print ' bool isValidCatalogItemId(i64 catalog_item_id)'
|
| 6039 |
amit.gupta |
98 |
print ' double getVatPercentageForItem(i64 itemId, double price)'
|
|
|
99 |
print ' double getVatAmountForItem(i64 itemId, double price)'
|
| 6531 |
vikram.rag |
100 |
print ' getAllIgnoredInventoryUpdateItemsList(i32 offset, i32 limit)'
|
| 6845 |
amit.gupta |
101 |
print ' getAllAliveItems()'
|
| 6921 |
anupam.sin |
102 |
print ' i64 getInsuranceAmount(i64 itemId, double price, i64 insurerId, i64 quantity)'
|
| 6805 |
anupam.sin |
103 |
print ' Insurer getInsurer(i64 insurerId)'
|
| 6849 |
kshitij.so |
104 |
print ' getAllInsurers()'
|
| 6962 |
rajveer |
105 |
print ' void updateInsuranceDeclaredAmount(i64 insurerId, double amount)'
|
| 7256 |
rajveer |
106 |
print ' i64 getFreebieForItem(i64 itemId)'
|
|
|
107 |
print ' void addOrUpdateFreebieForItem(FreebieItem freebieItem)'
|
| 7272 |
amit.gupta |
108 |
print ' void addOrUpdateBrandInfo(BrandInfo brandInfo)'
|
|
|
109 |
print ' getBrandInfo()'
|
| 7256 |
rajveer |
110 |
print ' StorePricing getStorePricing(i64 itemId)'
|
| 7306 |
rajveer |
111 |
print ' getStorePricings( itemIds)'
|
| 7265 |
rajveer |
112 |
print ' void updateStorePricing(StorePricing sp)'
|
| 7306 |
rajveer |
113 |
print ' getAllAmazonListedItems()'
|
|
|
114 |
print ' Amazonlisted getAmazonItemDetails(i64 itemId)'
|
|
|
115 |
print ' void updateAmazonItemDetails(i64 itemId, double fbaPrice, double sellingPrice, bool isFba, bool isNonFba, bool isInventoryOverride)'
|
|
|
116 |
print ' void addAmazonItem(Amazonlisted amazonlisted)'
|
|
|
117 |
print ' getAsinItems()'
|
|
|
118 |
print ' getAllFbaListedItems()'
|
|
|
119 |
print ' getAllNonFbaListedItems()'
|
| 5944 |
mandeep.dh |
120 |
print ''
|
|
|
121 |
sys.exit(0)
|
|
|
122 |
|
|
|
123 |
pp = pprint.PrettyPrinter(indent = 2)
|
|
|
124 |
host = 'localhost'
|
|
|
125 |
port = 9090
|
|
|
126 |
uri = ''
|
|
|
127 |
framed = False
|
|
|
128 |
http = False
|
|
|
129 |
argi = 1
|
|
|
130 |
|
|
|
131 |
if sys.argv[argi] == '-h':
|
|
|
132 |
parts = sys.argv[argi+1].split(':')
|
|
|
133 |
host = parts[0]
|
|
|
134 |
port = int(parts[1])
|
|
|
135 |
argi += 2
|
|
|
136 |
|
|
|
137 |
if sys.argv[argi] == '-u':
|
|
|
138 |
url = urlparse(sys.argv[argi+1])
|
|
|
139 |
parts = url[1].split(':')
|
|
|
140 |
host = parts[0]
|
|
|
141 |
if len(parts) > 1:
|
|
|
142 |
port = int(parts[1])
|
|
|
143 |
else:
|
|
|
144 |
port = 80
|
|
|
145 |
uri = url[2]
|
|
|
146 |
if url[4]:
|
|
|
147 |
uri += '?%s' % url[4]
|
|
|
148 |
http = True
|
|
|
149 |
argi += 2
|
|
|
150 |
|
|
|
151 |
if sys.argv[argi] == '-f' or sys.argv[argi] == '-framed':
|
|
|
152 |
framed = True
|
|
|
153 |
argi += 1
|
|
|
154 |
|
|
|
155 |
cmd = sys.argv[argi]
|
|
|
156 |
args = sys.argv[argi+1:]
|
|
|
157 |
|
|
|
158 |
if http:
|
|
|
159 |
transport = THttpClient.THttpClient(host, port, uri)
|
|
|
160 |
else:
|
|
|
161 |
socket = TSocket.TSocket(host, port)
|
|
|
162 |
if framed:
|
|
|
163 |
transport = TTransport.TFramedTransport(socket)
|
|
|
164 |
else:
|
|
|
165 |
transport = TTransport.TBufferedTransport(socket)
|
|
|
166 |
protocol = TBinaryProtocol.TBinaryProtocol(transport)
|
|
|
167 |
client = CatalogService.Client(protocol)
|
|
|
168 |
transport.open()
|
|
|
169 |
|
|
|
170 |
if cmd == 'addItem':
|
|
|
171 |
if len(args) != 1:
|
|
|
172 |
print 'addItem requires 1 args'
|
|
|
173 |
sys.exit(1)
|
|
|
174 |
pp.pprint(client.addItem(eval(args[0]),))
|
|
|
175 |
|
|
|
176 |
elif cmd == 'updateItem':
|
|
|
177 |
if len(args) != 1:
|
|
|
178 |
print 'updateItem requires 1 args'
|
|
|
179 |
sys.exit(1)
|
|
|
180 |
pp.pprint(client.updateItem(eval(args[0]),))
|
|
|
181 |
|
|
|
182 |
elif cmd == 'isActive':
|
|
|
183 |
if len(args) != 1:
|
|
|
184 |
print 'isActive requires 1 args'
|
|
|
185 |
sys.exit(1)
|
|
|
186 |
pp.pprint(client.isActive(eval(args[0]),))
|
|
|
187 |
|
|
|
188 |
elif cmd == 'getItemStatusDescription':
|
|
|
189 |
if len(args) != 1:
|
|
|
190 |
print 'getItemStatusDescription requires 1 args'
|
|
|
191 |
sys.exit(1)
|
|
|
192 |
pp.pprint(client.getItemStatusDescription(eval(args[0]),))
|
|
|
193 |
|
|
|
194 |
elif cmd == 'startItemOn':
|
|
|
195 |
if len(args) != 2:
|
|
|
196 |
print 'startItemOn requires 2 args'
|
|
|
197 |
sys.exit(1)
|
|
|
198 |
pp.pprint(client.startItemOn(eval(args[0]),eval(args[1]),))
|
|
|
199 |
|
|
|
200 |
elif cmd == 'retireItemOn':
|
|
|
201 |
if len(args) != 2:
|
|
|
202 |
print 'retireItemOn requires 2 args'
|
|
|
203 |
sys.exit(1)
|
|
|
204 |
pp.pprint(client.retireItemOn(eval(args[0]),eval(args[1]),))
|
|
|
205 |
|
|
|
206 |
elif cmd == 'changeItemStatus':
|
|
|
207 |
if len(args) != 3:
|
|
|
208 |
print 'changeItemStatus requires 3 args'
|
|
|
209 |
sys.exit(1)
|
|
|
210 |
pp.pprint(client.changeItemStatus(eval(args[0]),eval(args[1]),eval(args[2]),))
|
|
|
211 |
|
|
|
212 |
elif cmd == 'getItem':
|
|
|
213 |
if len(args) != 1:
|
|
|
214 |
print 'getItem requires 1 args'
|
|
|
215 |
sys.exit(1)
|
|
|
216 |
pp.pprint(client.getItem(eval(args[0]),))
|
|
|
217 |
|
|
|
218 |
elif cmd == 'getItemsByCatalogId':
|
|
|
219 |
if len(args) != 1:
|
|
|
220 |
print 'getItemsByCatalogId requires 1 args'
|
|
|
221 |
sys.exit(1)
|
|
|
222 |
pp.pprint(client.getItemsByCatalogId(eval(args[0]),))
|
|
|
223 |
|
|
|
224 |
elif cmd == 'getValidItemsByCatalogId':
|
|
|
225 |
if len(args) != 1:
|
|
|
226 |
print 'getValidItemsByCatalogId requires 1 args'
|
|
|
227 |
sys.exit(1)
|
|
|
228 |
pp.pprint(client.getValidItemsByCatalogId(eval(args[0]),))
|
|
|
229 |
|
|
|
230 |
elif cmd == 'getAllItems':
|
|
|
231 |
if len(args) != 1:
|
|
|
232 |
print 'getAllItems requires 1 args'
|
|
|
233 |
sys.exit(1)
|
|
|
234 |
pp.pprint(client.getAllItems(eval(args[0]),))
|
|
|
235 |
|
|
|
236 |
elif cmd == 'getAllItemsByStatus':
|
|
|
237 |
if len(args) != 1:
|
|
|
238 |
print 'getAllItemsByStatus requires 1 args'
|
|
|
239 |
sys.exit(1)
|
|
|
240 |
pp.pprint(client.getAllItemsByStatus(eval(args[0]),))
|
|
|
241 |
|
|
|
242 |
elif cmd == 'markItemAsContentComplete':
|
|
|
243 |
if len(args) != 5:
|
|
|
244 |
print 'markItemAsContentComplete requires 5 args'
|
|
|
245 |
sys.exit(1)
|
|
|
246 |
pp.pprint(client.markItemAsContentComplete(eval(args[0]),eval(args[1]),args[2],args[3],args[4],))
|
|
|
247 |
|
|
|
248 |
elif cmd == 'getAllItemsInRange':
|
|
|
249 |
if len(args) != 2:
|
|
|
250 |
print 'getAllItemsInRange requires 2 args'
|
|
|
251 |
sys.exit(1)
|
|
|
252 |
pp.pprint(client.getAllItemsInRange(eval(args[0]),eval(args[1]),))
|
|
|
253 |
|
|
|
254 |
elif cmd == 'getAllItemsByStatusInRange':
|
|
|
255 |
if len(args) != 3:
|
|
|
256 |
print 'getAllItemsByStatusInRange requires 3 args'
|
|
|
257 |
sys.exit(1)
|
|
|
258 |
pp.pprint(client.getAllItemsByStatusInRange(eval(args[0]),eval(args[1]),eval(args[2]),))
|
|
|
259 |
|
|
|
260 |
elif cmd == 'getItemCountByStatus':
|
|
|
261 |
if len(args) != 2:
|
|
|
262 |
print 'getItemCountByStatus requires 2 args'
|
|
|
263 |
sys.exit(1)
|
|
|
264 |
pp.pprint(client.getItemCountByStatus(eval(args[0]),eval(args[1]),))
|
|
|
265 |
|
|
|
266 |
elif cmd == 'getBestSellers':
|
|
|
267 |
if len(args) != 0:
|
|
|
268 |
print 'getBestSellers requires 0 args'
|
|
|
269 |
sys.exit(1)
|
|
|
270 |
pp.pprint(client.getBestSellers())
|
|
|
271 |
|
|
|
272 |
elif cmd == 'getBestSellersCatalogIds':
|
|
|
273 |
if len(args) != 4:
|
|
|
274 |
print 'getBestSellersCatalogIds requires 4 args'
|
|
|
275 |
sys.exit(1)
|
|
|
276 |
pp.pprint(client.getBestSellersCatalogIds(eval(args[0]),eval(args[1]),args[2],eval(args[3]),))
|
|
|
277 |
|
|
|
278 |
elif cmd == 'getBestSellersCount':
|
|
|
279 |
if len(args) != 0:
|
|
|
280 |
print 'getBestSellersCount requires 0 args'
|
|
|
281 |
sys.exit(1)
|
|
|
282 |
pp.pprint(client.getBestSellersCount())
|
|
|
283 |
|
|
|
284 |
elif cmd == 'getBestDeals':
|
|
|
285 |
if len(args) != 0:
|
|
|
286 |
print 'getBestDeals requires 0 args'
|
|
|
287 |
sys.exit(1)
|
|
|
288 |
pp.pprint(client.getBestDeals())
|
|
|
289 |
|
|
|
290 |
elif cmd == 'getBestDealsCatalogIds':
|
|
|
291 |
if len(args) != 4:
|
|
|
292 |
print 'getBestDealsCatalogIds requires 4 args'
|
|
|
293 |
sys.exit(1)
|
|
|
294 |
pp.pprint(client.getBestDealsCatalogIds(eval(args[0]),eval(args[1]),args[2],eval(args[3]),))
|
|
|
295 |
|
|
|
296 |
elif cmd == 'getBestDealsCount':
|
|
|
297 |
if len(args) != 0:
|
|
|
298 |
print 'getBestDealsCount requires 0 args'
|
|
|
299 |
sys.exit(1)
|
|
|
300 |
pp.pprint(client.getBestDealsCount())
|
|
|
301 |
|
|
|
302 |
elif cmd == 'getComingSoon':
|
|
|
303 |
if len(args) != 0:
|
|
|
304 |
print 'getComingSoon requires 0 args'
|
|
|
305 |
sys.exit(1)
|
|
|
306 |
pp.pprint(client.getComingSoon())
|
|
|
307 |
|
|
|
308 |
elif cmd == 'getComingSoonCatalogIds':
|
|
|
309 |
if len(args) != 4:
|
|
|
310 |
print 'getComingSoonCatalogIds requires 4 args'
|
|
|
311 |
sys.exit(1)
|
|
|
312 |
pp.pprint(client.getComingSoonCatalogIds(eval(args[0]),eval(args[1]),args[2],eval(args[3]),))
|
|
|
313 |
|
|
|
314 |
elif cmd == 'getComingSoonCount':
|
|
|
315 |
if len(args) != 0:
|
|
|
316 |
print 'getComingSoonCount requires 0 args'
|
|
|
317 |
sys.exit(1)
|
|
|
318 |
pp.pprint(client.getComingSoonCount())
|
|
|
319 |
|
|
|
320 |
elif cmd == 'getLatestArrivals':
|
|
|
321 |
if len(args) != 0:
|
|
|
322 |
print 'getLatestArrivals requires 0 args'
|
|
|
323 |
sys.exit(1)
|
|
|
324 |
pp.pprint(client.getLatestArrivals())
|
|
|
325 |
|
|
|
326 |
elif cmd == 'getLatestArrivalsCatalogIds':
|
|
|
327 |
if len(args) != 4:
|
|
|
328 |
print 'getLatestArrivalsCatalogIds requires 4 args'
|
|
|
329 |
sys.exit(1)
|
|
|
330 |
pp.pprint(client.getLatestArrivalsCatalogIds(eval(args[0]),eval(args[1]),args[2],eval(args[3]),))
|
|
|
331 |
|
|
|
332 |
elif cmd == 'getLatestArrivalsCount':
|
|
|
333 |
if len(args) != 0:
|
|
|
334 |
print 'getLatestArrivalsCount requires 0 args'
|
|
|
335 |
sys.exit(1)
|
|
|
336 |
pp.pprint(client.getLatestArrivalsCount())
|
|
|
337 |
|
|
|
338 |
elif cmd == 'generateNewEntityID':
|
|
|
339 |
if len(args) != 0:
|
|
|
340 |
print 'generateNewEntityID requires 0 args'
|
|
|
341 |
sys.exit(1)
|
|
|
342 |
pp.pprint(client.generateNewEntityID())
|
|
|
343 |
|
|
|
344 |
elif cmd == 'addCategory':
|
|
|
345 |
if len(args) != 1:
|
|
|
346 |
print 'addCategory requires 1 args'
|
|
|
347 |
sys.exit(1)
|
|
|
348 |
pp.pprint(client.addCategory(eval(args[0]),))
|
|
|
349 |
|
|
|
350 |
elif cmd == 'getCategory':
|
|
|
351 |
if len(args) != 1:
|
|
|
352 |
print 'getCategory requires 1 args'
|
|
|
353 |
sys.exit(1)
|
|
|
354 |
pp.pprint(client.getCategory(eval(args[0]),))
|
|
|
355 |
|
|
|
356 |
elif cmd == 'getAllCategories':
|
|
|
357 |
if len(args) != 0:
|
|
|
358 |
print 'getAllCategories requires 0 args'
|
|
|
359 |
sys.exit(1)
|
|
|
360 |
pp.pprint(client.getAllCategories())
|
|
|
361 |
|
|
|
362 |
elif cmd == 'getAllSimilarItems':
|
|
|
363 |
if len(args) != 1:
|
|
|
364 |
print 'getAllSimilarItems requires 1 args'
|
|
|
365 |
sys.exit(1)
|
|
|
366 |
pp.pprint(client.getAllSimilarItems(eval(args[0]),))
|
|
|
367 |
|
|
|
368 |
elif cmd == 'addSimilarItem':
|
|
|
369 |
if len(args) != 2:
|
|
|
370 |
print 'addSimilarItem requires 2 args'
|
|
|
371 |
sys.exit(1)
|
|
|
372 |
pp.pprint(client.addSimilarItem(eval(args[0]),eval(args[1]),))
|
|
|
373 |
|
| 6512 |
kshitij.so |
374 |
elif cmd == 'addTag':
|
|
|
375 |
if len(args) != 2:
|
|
|
376 |
print 'addTag requires 2 args'
|
|
|
377 |
sys.exit(1)
|
|
|
378 |
pp.pprint(client.addTag(args[0],eval(args[1]),))
|
|
|
379 |
|
|
|
380 |
elif cmd == 'deleteEntityTag':
|
|
|
381 |
if len(args) != 2:
|
|
|
382 |
print 'deleteEntityTag requires 2 args'
|
|
|
383 |
sys.exit(1)
|
|
|
384 |
pp.pprint(client.deleteEntityTag(args[0],eval(args[1]),))
|
|
|
385 |
|
|
|
386 |
elif cmd == 'deleteTag':
|
|
|
387 |
if len(args) != 1:
|
|
|
388 |
print 'deleteTag requires 1 args'
|
|
|
389 |
sys.exit(1)
|
|
|
390 |
pp.pprint(client.deleteTag(args[0],))
|
|
|
391 |
|
|
|
392 |
elif cmd == 'getAllTags':
|
|
|
393 |
if len(args) != 0:
|
|
|
394 |
print 'getAllTags requires 0 args'
|
|
|
395 |
sys.exit(1)
|
|
|
396 |
pp.pprint(client.getAllTags())
|
|
|
397 |
|
|
|
398 |
elif cmd == 'getAllEntitiesByTagName':
|
|
|
399 |
if len(args) != 1:
|
|
|
400 |
print 'getAllEntitiesByTagName requires 1 args'
|
|
|
401 |
sys.exit(1)
|
|
|
402 |
pp.pprint(client.getAllEntitiesByTagName(args[0],))
|
|
|
403 |
|
| 6845 |
amit.gupta |
404 |
elif cmd == 'getAllEntityTags':
|
|
|
405 |
if len(args) != 0:
|
|
|
406 |
print 'getAllEntityTags requires 0 args'
|
|
|
407 |
sys.exit(1)
|
|
|
408 |
pp.pprint(client.getAllEntityTags())
|
|
|
409 |
|
| 6903 |
anupam.sin |
410 |
elif cmd == 'addBanner':
|
|
|
411 |
if len(args) != 6:
|
|
|
412 |
print 'addBanner requires 6 args'
|
|
|
413 |
sys.exit(1)
|
|
|
414 |
pp.pprint(client.addBanner(args[0],args[1],args[2],eval(args[3]),eval(args[4]),eval(args[5]),))
|
|
|
415 |
|
|
|
416 |
elif cmd == 'getAllBanners':
|
|
|
417 |
if len(args) != 0:
|
|
|
418 |
print 'getAllBanners requires 0 args'
|
|
|
419 |
sys.exit(1)
|
|
|
420 |
pp.pprint(client.getAllBanners())
|
|
|
421 |
|
|
|
422 |
elif cmd == 'deleteBanner':
|
|
|
423 |
if len(args) != 1:
|
|
|
424 |
print 'deleteBanner requires 1 args'
|
|
|
425 |
sys.exit(1)
|
|
|
426 |
pp.pprint(client.deleteBanner(args[0],))
|
|
|
427 |
|
|
|
428 |
elif cmd == 'getBannerDetails':
|
|
|
429 |
if len(args) != 1:
|
|
|
430 |
print 'getBannerDetails requires 1 args'
|
|
|
431 |
sys.exit(1)
|
|
|
432 |
pp.pprint(client.getBannerDetails(args[0],))
|
|
|
433 |
|
|
|
434 |
elif cmd == 'getActiveBanners':
|
|
|
435 |
if len(args) != 0:
|
|
|
436 |
print 'getActiveBanners requires 0 args'
|
|
|
437 |
sys.exit(1)
|
|
|
438 |
pp.pprint(client.getActiveBanners())
|
|
|
439 |
|
| 6849 |
kshitij.so |
440 |
elif cmd == 'addBannerMap':
|
|
|
441 |
if len(args) != 3:
|
|
|
442 |
print 'addBannerMap requires 3 args'
|
|
|
443 |
sys.exit(1)
|
|
|
444 |
pp.pprint(client.addBannerMap(args[0],args[1],args[2],))
|
|
|
445 |
|
|
|
446 |
elif cmd == 'deleteBannerMap':
|
|
|
447 |
if len(args) != 1:
|
|
|
448 |
print 'deleteBannerMap requires 1 args'
|
|
|
449 |
sys.exit(1)
|
|
|
450 |
pp.pprint(client.deleteBannerMap(args[0],))
|
|
|
451 |
|
|
|
452 |
elif cmd == 'getBannerMapDetails':
|
|
|
453 |
if len(args) != 1:
|
|
|
454 |
print 'getBannerMapDetails requires 1 args'
|
|
|
455 |
sys.exit(1)
|
|
|
456 |
pp.pprint(client.getBannerMapDetails(args[0],))
|
|
|
457 |
|
| 5944 |
mandeep.dh |
458 |
elif cmd == 'deleteSimilarItem':
|
|
|
459 |
if len(args) != 2:
|
|
|
460 |
print 'deleteSimilarItem requires 2 args'
|
|
|
461 |
sys.exit(1)
|
|
|
462 |
pp.pprint(client.deleteSimilarItem(eval(args[0]),eval(args[1]),))
|
|
|
463 |
|
|
|
464 |
elif cmd == 'checkSimilarItem':
|
|
|
465 |
if len(args) != 4:
|
|
|
466 |
print 'checkSimilarItem requires 4 args'
|
|
|
467 |
sys.exit(1)
|
|
|
468 |
pp.pprint(client.checkSimilarItem(args[0],args[1],args[2],args[3],))
|
|
|
469 |
|
|
|
470 |
elif cmd == 'validateRiskyStatus':
|
|
|
471 |
if len(args) != 1:
|
|
|
472 |
print 'validateRiskyStatus requires 1 args'
|
|
|
473 |
sys.exit(1)
|
|
|
474 |
pp.pprint(client.validateRiskyStatus(eval(args[0]),))
|
|
|
475 |
|
|
|
476 |
elif cmd == 'changeItemRiskyFlag':
|
|
|
477 |
if len(args) != 2:
|
|
|
478 |
print 'changeItemRiskyFlag requires 2 args'
|
|
|
479 |
sys.exit(1)
|
|
|
480 |
pp.pprint(client.changeItemRiskyFlag(eval(args[0]),eval(args[1]),))
|
|
|
481 |
|
|
|
482 |
elif cmd == 'getItemsByRiskyFlag':
|
|
|
483 |
if len(args) != 0:
|
|
|
484 |
print 'getItemsByRiskyFlag requires 0 args'
|
|
|
485 |
sys.exit(1)
|
|
|
486 |
pp.pprint(client.getItemsByRiskyFlag())
|
|
|
487 |
|
|
|
488 |
elif cmd == 'getItemsForMasterSheet':
|
|
|
489 |
if len(args) != 2:
|
|
|
490 |
print 'getItemsForMasterSheet requires 2 args'
|
|
|
491 |
sys.exit(1)
|
|
|
492 |
pp.pprint(client.getItemsForMasterSheet(args[0],args[1],))
|
|
|
493 |
|
|
|
494 |
elif cmd == 'getSimilarItemsCatalogIds':
|
|
|
495 |
if len(args) != 3:
|
|
|
496 |
print 'getSimilarItemsCatalogIds requires 3 args'
|
|
|
497 |
sys.exit(1)
|
|
|
498 |
pp.pprint(client.getSimilarItemsCatalogIds(eval(args[0]),eval(args[1]),eval(args[2]),))
|
|
|
499 |
|
|
|
500 |
elif cmd == 'addProductNotification':
|
|
|
501 |
if len(args) != 2:
|
|
|
502 |
print 'addProductNotification requires 2 args'
|
|
|
503 |
sys.exit(1)
|
|
|
504 |
pp.pprint(client.addProductNotification(eval(args[0]),args[1],))
|
|
|
505 |
|
|
|
506 |
elif cmd == 'sendProductNotifications':
|
|
|
507 |
if len(args) != 0:
|
|
|
508 |
print 'sendProductNotifications requires 0 args'
|
|
|
509 |
sys.exit(1)
|
|
|
510 |
pp.pprint(client.sendProductNotifications())
|
|
|
511 |
|
|
|
512 |
elif cmd == 'getAllBrandsByCategory':
|
|
|
513 |
if len(args) != 1:
|
|
|
514 |
print 'getAllBrandsByCategory requires 1 args'
|
|
|
515 |
sys.exit(1)
|
|
|
516 |
pp.pprint(client.getAllBrandsByCategory(eval(args[0]),))
|
|
|
517 |
|
|
|
518 |
elif cmd == 'getAllBrands':
|
|
|
519 |
if len(args) != 0:
|
|
|
520 |
print 'getAllBrands requires 0 args'
|
|
|
521 |
sys.exit(1)
|
|
|
522 |
pp.pprint(client.getAllBrands())
|
|
|
523 |
|
|
|
524 |
elif cmd == 'getAllSources':
|
|
|
525 |
if len(args) != 0:
|
|
|
526 |
print 'getAllSources requires 0 args'
|
|
|
527 |
sys.exit(1)
|
|
|
528 |
pp.pprint(client.getAllSources())
|
|
|
529 |
|
|
|
530 |
elif cmd == 'getItemPricingBySource':
|
|
|
531 |
if len(args) != 2:
|
|
|
532 |
print 'getItemPricingBySource requires 2 args'
|
|
|
533 |
sys.exit(1)
|
|
|
534 |
pp.pprint(client.getItemPricingBySource(eval(args[0]),eval(args[1]),))
|
|
|
535 |
|
|
|
536 |
elif cmd == 'addSourceItemPricing':
|
|
|
537 |
if len(args) != 1:
|
|
|
538 |
print 'addSourceItemPricing requires 1 args'
|
|
|
539 |
sys.exit(1)
|
|
|
540 |
pp.pprint(client.addSourceItemPricing(eval(args[0]),))
|
|
|
541 |
|
|
|
542 |
elif cmd == 'getAllSourcePricing':
|
|
|
543 |
if len(args) != 1:
|
|
|
544 |
print 'getAllSourcePricing requires 1 args'
|
|
|
545 |
sys.exit(1)
|
|
|
546 |
pp.pprint(client.getAllSourcePricing(eval(args[0]),))
|
|
|
547 |
|
|
|
548 |
elif cmd == 'getItemForSource':
|
|
|
549 |
if len(args) != 2:
|
|
|
550 |
print 'getItemForSource requires 2 args'
|
|
|
551 |
sys.exit(1)
|
|
|
552 |
pp.pprint(client.getItemForSource(eval(args[0]),eval(args[1]),))
|
|
|
553 |
|
|
|
554 |
elif cmd == 'searchItemsInRange':
|
|
|
555 |
if len(args) != 3:
|
|
|
556 |
print 'searchItemsInRange requires 3 args'
|
|
|
557 |
sys.exit(1)
|
|
|
558 |
pp.pprint(client.searchItemsInRange(eval(args[0]),eval(args[1]),eval(args[2]),))
|
|
|
559 |
|
|
|
560 |
elif cmd == 'getSearchResultCount':
|
|
|
561 |
if len(args) != 1:
|
|
|
562 |
print 'getSearchResultCount requires 1 args'
|
|
|
563 |
sys.exit(1)
|
|
|
564 |
pp.pprint(client.getSearchResultCount(eval(args[0]),))
|
|
|
565 |
|
|
|
566 |
elif cmd == 'getProductNotifications':
|
|
|
567 |
if len(args) != 1:
|
|
|
568 |
print 'getProductNotifications requires 1 args'
|
|
|
569 |
sys.exit(1)
|
|
|
570 |
pp.pprint(client.getProductNotifications(eval(args[0]),))
|
|
|
571 |
|
|
|
572 |
elif cmd == 'getProductNotificationRequestCount':
|
|
|
573 |
if len(args) != 1:
|
|
|
574 |
print 'getProductNotificationRequestCount requires 1 args'
|
|
|
575 |
sys.exit(1)
|
|
|
576 |
pp.pprint(client.getProductNotificationRequestCount(eval(args[0]),))
|
|
|
577 |
|
|
|
578 |
elif cmd == 'addAuthorizationLog':
|
|
|
579 |
if len(args) != 3:
|
|
|
580 |
print 'addAuthorizationLog requires 3 args'
|
|
|
581 |
sys.exit(1)
|
|
|
582 |
pp.pprint(client.addAuthorizationLog(eval(args[0]),args[1],args[2],))
|
|
|
583 |
|
|
|
584 |
elif cmd == 'addupdateVoucherForItem':
|
|
|
585 |
if len(args) != 3:
|
|
|
586 |
print 'addupdateVoucherForItem requires 3 args'
|
|
|
587 |
sys.exit(1)
|
|
|
588 |
pp.pprint(client.addupdateVoucherForItem(eval(args[0]),eval(args[1]),eval(args[2]),))
|
|
|
589 |
|
|
|
590 |
elif cmd == 'deleteVoucherForItem':
|
|
|
591 |
if len(args) != 2:
|
|
|
592 |
print 'deleteVoucherForItem requires 2 args'
|
|
|
593 |
sys.exit(1)
|
|
|
594 |
pp.pprint(client.deleteVoucherForItem(eval(args[0]),eval(args[1]),))
|
|
|
595 |
|
|
|
596 |
elif cmd == 'getVoucherAmount':
|
|
|
597 |
if len(args) != 2:
|
|
|
598 |
print 'getVoucherAmount requires 2 args'
|
|
|
599 |
sys.exit(1)
|
|
|
600 |
pp.pprint(client.getVoucherAmount(eval(args[0]),eval(args[1]),))
|
|
|
601 |
|
|
|
602 |
elif cmd == 'getAllItemVouchers':
|
|
|
603 |
if len(args) != 1:
|
|
|
604 |
print 'getAllItemVouchers requires 1 args'
|
|
|
605 |
sys.exit(1)
|
|
|
606 |
pp.pprint(client.getAllItemVouchers(eval(args[0]),))
|
|
|
607 |
|
|
|
608 |
elif cmd == 'isValidCatalogItemId':
|
|
|
609 |
if len(args) != 1:
|
|
|
610 |
print 'isValidCatalogItemId requires 1 args'
|
|
|
611 |
sys.exit(1)
|
|
|
612 |
pp.pprint(client.isValidCatalogItemId(eval(args[0]),))
|
|
|
613 |
|
| 6039 |
amit.gupta |
614 |
elif cmd == 'getVatPercentageForItem':
|
|
|
615 |
if len(args) != 2:
|
|
|
616 |
print 'getVatPercentageForItem requires 2 args'
|
|
|
617 |
sys.exit(1)
|
|
|
618 |
pp.pprint(client.getVatPercentageForItem(eval(args[0]),eval(args[1]),))
|
|
|
619 |
|
|
|
620 |
elif cmd == 'getVatAmountForItem':
|
|
|
621 |
if len(args) != 2:
|
|
|
622 |
print 'getVatAmountForItem requires 2 args'
|
|
|
623 |
sys.exit(1)
|
|
|
624 |
pp.pprint(client.getVatAmountForItem(eval(args[0]),eval(args[1]),))
|
|
|
625 |
|
| 6531 |
vikram.rag |
626 |
elif cmd == 'getAllIgnoredInventoryUpdateItemsList':
|
|
|
627 |
if len(args) != 2:
|
|
|
628 |
print 'getAllIgnoredInventoryUpdateItemsList requires 2 args'
|
|
|
629 |
sys.exit(1)
|
|
|
630 |
pp.pprint(client.getAllIgnoredInventoryUpdateItemsList(eval(args[0]),eval(args[1]),))
|
|
|
631 |
|
| 6845 |
amit.gupta |
632 |
elif cmd == 'getAllAliveItems':
|
|
|
633 |
if len(args) != 0:
|
|
|
634 |
print 'getAllAliveItems requires 0 args'
|
|
|
635 |
sys.exit(1)
|
|
|
636 |
pp.pprint(client.getAllAliveItems())
|
|
|
637 |
|
| 6805 |
anupam.sin |
638 |
elif cmd == 'getInsuranceAmount':
|
| 6921 |
anupam.sin |
639 |
if len(args) != 4:
|
|
|
640 |
print 'getInsuranceAmount requires 4 args'
|
| 6805 |
anupam.sin |
641 |
sys.exit(1)
|
| 6921 |
anupam.sin |
642 |
pp.pprint(client.getInsuranceAmount(eval(args[0]),eval(args[1]),eval(args[2]),eval(args[3]),))
|
| 6805 |
anupam.sin |
643 |
|
|
|
644 |
elif cmd == 'getInsurer':
|
|
|
645 |
if len(args) != 1:
|
|
|
646 |
print 'getInsurer requires 1 args'
|
|
|
647 |
sys.exit(1)
|
|
|
648 |
pp.pprint(client.getInsurer(eval(args[0]),))
|
|
|
649 |
|
| 6849 |
kshitij.so |
650 |
elif cmd == 'getAllInsurers':
|
|
|
651 |
if len(args) != 0:
|
|
|
652 |
print 'getAllInsurers requires 0 args'
|
|
|
653 |
sys.exit(1)
|
|
|
654 |
pp.pprint(client.getAllInsurers())
|
|
|
655 |
|
| 6962 |
rajveer |
656 |
elif cmd == 'updateInsuranceDeclaredAmount':
|
|
|
657 |
if len(args) != 2:
|
|
|
658 |
print 'updateInsuranceDeclaredAmount requires 2 args'
|
|
|
659 |
sys.exit(1)
|
|
|
660 |
pp.pprint(client.updateInsuranceDeclaredAmount(eval(args[0]),eval(args[1]),))
|
|
|
661 |
|
| 7256 |
rajveer |
662 |
elif cmd == 'getFreebieForItem':
|
|
|
663 |
if len(args) != 1:
|
|
|
664 |
print 'getFreebieForItem requires 1 args'
|
|
|
665 |
sys.exit(1)
|
|
|
666 |
pp.pprint(client.getFreebieForItem(eval(args[0]),))
|
|
|
667 |
|
|
|
668 |
elif cmd == 'addOrUpdateFreebieForItem':
|
|
|
669 |
if len(args) != 1:
|
|
|
670 |
print 'addOrUpdateFreebieForItem requires 1 args'
|
|
|
671 |
sys.exit(1)
|
|
|
672 |
pp.pprint(client.addOrUpdateFreebieForItem(eval(args[0]),))
|
|
|
673 |
|
| 7272 |
amit.gupta |
674 |
elif cmd == 'addOrUpdateBrandInfo':
|
|
|
675 |
if len(args) != 1:
|
|
|
676 |
print 'addOrUpdateBrandInfo requires 1 args'
|
|
|
677 |
sys.exit(1)
|
|
|
678 |
pp.pprint(client.addOrUpdateBrandInfo(eval(args[0]),))
|
|
|
679 |
|
|
|
680 |
elif cmd == 'getBrandInfo':
|
|
|
681 |
if len(args) != 0:
|
|
|
682 |
print 'getBrandInfo requires 0 args'
|
|
|
683 |
sys.exit(1)
|
|
|
684 |
pp.pprint(client.getBrandInfo())
|
|
|
685 |
|
| 7256 |
rajveer |
686 |
elif cmd == 'getStorePricing':
|
|
|
687 |
if len(args) != 1:
|
|
|
688 |
print 'getStorePricing requires 1 args'
|
|
|
689 |
sys.exit(1)
|
|
|
690 |
pp.pprint(client.getStorePricing(eval(args[0]),))
|
|
|
691 |
|
| 7306 |
rajveer |
692 |
elif cmd == 'getStorePricings':
|
|
|
693 |
if len(args) != 1:
|
|
|
694 |
print 'getStorePricings requires 1 args'
|
|
|
695 |
sys.exit(1)
|
|
|
696 |
pp.pprint(client.getStorePricings(eval(args[0]),))
|
|
|
697 |
|
| 7265 |
rajveer |
698 |
elif cmd == 'updateStorePricing':
|
|
|
699 |
if len(args) != 1:
|
|
|
700 |
print 'updateStorePricing requires 1 args'
|
|
|
701 |
sys.exit(1)
|
|
|
702 |
pp.pprint(client.updateStorePricing(eval(args[0]),))
|
|
|
703 |
|
| 7306 |
rajveer |
704 |
elif cmd == 'getAllAmazonListedItems':
|
|
|
705 |
if len(args) != 0:
|
|
|
706 |
print 'getAllAmazonListedItems requires 0 args'
|
|
|
707 |
sys.exit(1)
|
|
|
708 |
pp.pprint(client.getAllAmazonListedItems())
|
|
|
709 |
|
|
|
710 |
elif cmd == 'getAmazonItemDetails':
|
|
|
711 |
if len(args) != 1:
|
|
|
712 |
print 'getAmazonItemDetails requires 1 args'
|
|
|
713 |
sys.exit(1)
|
|
|
714 |
pp.pprint(client.getAmazonItemDetails(eval(args[0]),))
|
|
|
715 |
|
|
|
716 |
elif cmd == 'updateAmazonItemDetails':
|
|
|
717 |
if len(args) != 6:
|
|
|
718 |
print 'updateAmazonItemDetails requires 6 args'
|
|
|
719 |
sys.exit(1)
|
|
|
720 |
pp.pprint(client.updateAmazonItemDetails(eval(args[0]),eval(args[1]),eval(args[2]),eval(args[3]),eval(args[4]),eval(args[5]),))
|
|
|
721 |
|
|
|
722 |
elif cmd == 'addAmazonItem':
|
|
|
723 |
if len(args) != 1:
|
|
|
724 |
print 'addAmazonItem requires 1 args'
|
|
|
725 |
sys.exit(1)
|
|
|
726 |
pp.pprint(client.addAmazonItem(eval(args[0]),))
|
|
|
727 |
|
|
|
728 |
elif cmd == 'getAsinItems':
|
|
|
729 |
if len(args) != 0:
|
|
|
730 |
print 'getAsinItems requires 0 args'
|
|
|
731 |
sys.exit(1)
|
|
|
732 |
pp.pprint(client.getAsinItems())
|
|
|
733 |
|
|
|
734 |
elif cmd == 'getAllFbaListedItems':
|
|
|
735 |
if len(args) != 0:
|
|
|
736 |
print 'getAllFbaListedItems requires 0 args'
|
|
|
737 |
sys.exit(1)
|
|
|
738 |
pp.pprint(client.getAllFbaListedItems())
|
|
|
739 |
|
|
|
740 |
elif cmd == 'getAllNonFbaListedItems':
|
|
|
741 |
if len(args) != 0:
|
|
|
742 |
print 'getAllNonFbaListedItems requires 0 args'
|
|
|
743 |
sys.exit(1)
|
|
|
744 |
pp.pprint(client.getAllNonFbaListedItems())
|
|
|
745 |
|
| 5944 |
mandeep.dh |
746 |
else:
|
|
|
747 |
print 'Unrecognized method %s' % cmd
|
|
|
748 |
sys.exit(1)
|
|
|
749 |
|
|
|
750 |
transport.close()
|