Esempio n. 1
0
        public static Dictionary <string, SkusInput> MapFromJson(Dictionary <string, object> jsonMap)
        {
            Dictionary <string, SkusInput> result = new Dictionary <string, SkusInput>();

            foreach (var entry in jsonMap)
            {
                SkusInput value = CreateFromDictionary(entry.Value as Dictionary <string, object>);
                result.Add(entry.Key, value);
            }
            return(result);
        }
Esempio n. 2
0
        public static SkusInput CreateFromDictionary(Dictionary<string, object> jsonMap)
        {
            try
            {
                if (jsonMap == null)
                {
                    return null;
                }

                var request = new SkusInput();

                if(jsonMap.ContainsKey("skus"))
                {
                    request.Skus = ((List<object>) jsonMap["skus"]).Select(element => (string) element).ToList();
                }

                return request;
            }
            catch (System.ApplicationException ex)
            {
                throw new AmazonException("Error encountered while creating Object from dicionary", ex);
            }
        }
Esempio n. 3
0
        public static SkusInput CreateFromDictionary(Dictionary <string, object> jsonMap)
        {
            try
            {
                if (jsonMap == null)
                {
                    return(null);
                }

                var request = new SkusInput();


                if (jsonMap.ContainsKey("skus"))
                {
                    request.Skus = ((List <object>)jsonMap["skus"]).Select(element => (string)element).ToList();
                }

                return(request);
            }
            catch (System.ApplicationException ex)
            {
                throw new AmazonException("Error encountered while creating Object from dicionary", ex);
            }
        }
Esempio n. 4
0
 public abstract RequestOutput GetProductData(SkusInput skusInput);
Esempio n. 5
0
 public override RequestOutput GetProductData(SkusInput skusInput)
 {
     Start();
     return(RequestOutput.CreateFromJson(GetProductDataJson(skusInput.ToJson())));
 }
Esempio n. 6
0
 public abstract RequestOutput GetProductData(SkusInput skusInput);