protected async override Task <object> OnPerform() { var addBasketContract = JsonConvert.SerializeObject(_addBasketContract); var content = new StringContent(addBasketContract, Encoding.UTF8, ApplicationJSON); var response = await _fuelPumpRestClient.AddBasket(content); var data = await response.Content.ReadAsStringAsync(); switch (response.StatusCode) { case HttpStatusCode.OK: var contract = new DeSerializer().MapSale(data); return(new Mapper().MapSale(contract)); default: return(await HandleExceptions(response)); } }