public static PinnedDeal Get(string userId, int dealId) { var apiCallTask = ApiHelper.GetPinnedDeal(userId, dealId); var result = apiCallTask.Result; JObject jsonResponse = JsonConvert.DeserializeObject <JObject>(result); PinnedDeal pinnedDeal = JsonConvert.DeserializeObject <PinnedDeal>(jsonResponse.ToString()); return(pinnedDeal); }
public static void Post(PinnedDeal newPinnedDeal) { string jsonPinnedDeal = JsonConvert.SerializeObject(newPinnedDeal); var apiCallTask = ApiHelper.PostPinnedDeal(jsonPinnedDeal); }