Exemplo n.º 1
0
        protected async override Task <object> OnPerform()
        {
            var addContract = JsonConvert.SerializeObject(_addPrepayContract);
            var content     = new StringContent(addContract, Encoding.UTF8, ApplicationJSON);
            var response    = await _fuelPumpRestClient.DeletePrepay(content);

            var data = await response.Content.ReadAsStringAsync();

            switch (response.StatusCode)
            {
            case HttpStatusCode.OK:
                var contract = new  DeSerializer().MapCheckoutSummary(data);
                return(new Mapper().MapCheckoutSummary(contract));

            default:
                return(await HandleExceptions(response));
            }
        }