Beispiel #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);
            }
        }
        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);
            }
        }
Beispiel #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);
        }
Beispiel #4
0
 public abstract void NotifyFulfillment(NotifyFulfillmentInput notifyFulfillmentInput);
Beispiel #5
0
 public override void NotifyFulfillment(NotifyFulfillmentInput notifyFulfillmentInput)
 {
     Start();
     Jsonable.CheckForErrors(Json.Deserialize(NotifyFulfillmentJson(notifyFulfillmentInput.ToJson())) as Dictionary <string, object>);
 }
Beispiel #6
0
 public abstract void NotifyFulfillment(NotifyFulfillmentInput notifyFulfillmentInput);