Esempio n. 1
0
        public static NotifyFulfillmentInput CreateFromDictionary(Dictionary <string, object> jsonMap)
        {
            try
            {
                if (jsonMap == null)
                {
                    return(null);
                }

                var request = new NotifyFulfillmentInput();


                if (jsonMap.ContainsKey("receiptId"))
                {
                    request.ReceiptId = (string)jsonMap["receiptId"];
                }

                if (jsonMap.ContainsKey("fulfillmentResult"))
                {
                    request.FulfillmentResult = (string)jsonMap["fulfillmentResult"];
                }

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

                var request = new NotifyFulfillmentInput();

                if(jsonMap.ContainsKey("receiptId"))
                {
                    request.ReceiptId = (string) jsonMap["receiptId"];
                }

                if(jsonMap.ContainsKey("fulfillmentResult"))
                {
                    request.FulfillmentResult = (string) jsonMap["fulfillmentResult"];
                }

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

            foreach (var entry in jsonMap)
            {
                NotifyFulfillmentInput value = CreateFromDictionary(entry.Value as Dictionary <string, object>);
                result.Add(entry.Key, value);
            }
            return(result);
        }
Esempio n. 4
0
 public abstract void NotifyFulfillment(NotifyFulfillmentInput notifyFulfillmentInput);
Esempio n. 5
0
 public override void NotifyFulfillment(NotifyFulfillmentInput notifyFulfillmentInput)
 {
     Start();
     Jsonable.CheckForErrors(Json.Deserialize(NotifyFulfillmentJson(notifyFulfillmentInput.ToJson())) as Dictionary <string, object>);
 }
Esempio n. 6
0
 public abstract void NotifyFulfillment(NotifyFulfillmentInput notifyFulfillmentInput);