Ejemplo n.º 1
0
        protected async override Task <object> OnPerform()
        {
            var response = await _restClient.ValidateSite(
                _cacheManager.SaleNumber, _cacheManager.TillNumberForSale,
                _cacheManager.RegisterNumber, _treatyNumber, _captureMethod,
                _treatyName, _documentNumber);

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

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

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