Пример #1
0
        public static Dictionary <string, SkuInput> MapFromJson(Dictionary <string, object> jsonMap)
        {
            Dictionary <string, SkuInput> result = new Dictionary <string, SkuInput>();

            foreach (var entry in jsonMap)
            {
                SkuInput value = CreateFromDictionary(entry.Value as Dictionary <string, object>);
                result.Add(entry.Key, value);
            }
            return(result);
        }
Пример #2
0
        public static SkuInput CreateFromDictionary(Dictionary<string, object> jsonMap)
        {
            try
            {
                if (jsonMap == null)
                {
                    return null;
                }

                var request = new SkuInput();

                if(jsonMap.ContainsKey("sku"))
                {
                    request.Sku = (string) jsonMap["sku"];
                }

                return request;
            }
            catch (System.ApplicationException ex)
            {
                throw new AmazonException("Error encountered while creating Object from dicionary", ex);
            }
        }
Пример #3
0
        public static SkuInput CreateFromDictionary(Dictionary <string, object> jsonMap)
        {
            try
            {
                if (jsonMap == null)
                {
                    return(null);
                }

                var request = new SkuInput();


                if (jsonMap.ContainsKey("sku"))
                {
                    request.Sku = (string)jsonMap["sku"];
                }

                return(request);
            }
            catch (System.ApplicationException ex)
            {
                throw new AmazonException("Error encountered while creating Object from dicionary", ex);
            }
        }
Пример #4
0
 public abstract RequestOutput Purchase(SkuInput skuInput);
Пример #5
0
 public override RequestOutput Purchase(SkuInput skuInput)
 {
     Start();
     return(RequestOutput.CreateFromJson(PurchaseJson(skuInput.ToJson())));
 }
Пример #6
0
 public abstract RequestOutput Purchase(SkuInput skuInput);