Exemple #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);
        }
Exemple #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);
            }
        }
Exemple #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);
            }
        }
Exemple #4
0
 public abstract RequestOutput GetProductData(SkusInput skusInput);
Exemple #5
0
 public override RequestOutput GetProductData(SkusInput skusInput)
 {
     Start();
     return(RequestOutput.CreateFromJson(GetProductDataJson(skusInput.ToJson())));
 }
Exemple #6
0
 public abstract RequestOutput GetProductData(SkusInput skusInput);