Create a Restful webservice to request products in category 600001506 that have a price reduction.
Use this API to obtain a list of products:
[login to view URL]
The following should be returned as Json (field names are in bold) :
An array of products. Each element should contain:
An array of colorSwatches. Each element should contain:
rgbColor<String> which is an RGB representation of the basicColor in a six digit hexadecimal format, e.g. “F0A1C2”.
nowPrice<String> which is the [login to view URL] represented as a string, including the currency, e.g. “£1.75”. For values that are integer, if they are less £10 return a decimal price, otherwise show an integer price, e.g. “£2.00” or “£10”.
priceLabel<String>. An optional query parm called labelType can be set to any of:
1. ShowWasNow - in which case return a string saying “Was £[login to view URL], now £[login to view URL]”.
2. ShowWasThenNow - in which case return a string saying “Was £[login to view URL], then £[login to view URL], now £[login to view URL]”. If the original [login to view URL] is not empty use that for the “then” price otherwise use the then1 price. If the then1 price is also empty then don’t show the “then” price.
3. ShowPercDscount - in which case return “x% off - now £[login to view URL]”.
If the query parm is not set default to use ShowWasNow format.
In all cases use the price formatting as described for nowPrice.
The array of products should only contain products with a price reduction and should be sorted to show the highest price reduction first. Price reduction is calculated using [login to view URL] - price.now.
Looking up RGB values
Create a hash table or similar device to translate basicColor to RGB.
Trapping errors with the data provided by the API:
If there is invalid data on the input file then write out an empty string or assume a value of zero rather than throwing exceptions or creating complex error logging.
Technologies : java, spring, maven for build
Hi There , Happy to work on this assignment. I'm an expert in Java/JavaEE technologies having more than 14 years of experience. Ping me to share more details. Many thanks, Abdul