public async Task Edit(EditPaymentMethodVMRequest entity)
        {
            var response = await _httpService.Put <EditPaymentMethodVMRequest>(url, entity);

            if (!response.Success)
            {
                throw new ApplicationException(await response.GetBody());
            }
        }
        public async Task <ActionResult> Put(EditPaymentMethodVMRequest entity)
        {
            #region Start the watch
            var watch = new Stopwatch();
            watch.Start();
            #endregion

            var result = await _entityServices.Put(entity);

            #region End the watch
            watch.Stop();
            result.Meta.TotalProcessingTime = watch.ElapsedMilliseconds;
            #endregion

            return(Ok(result));
        }
        public async Task <ApiResponse> Put(EditPaymentMethodVMRequest entity)
        {
            try
            {
                var entityDB = await _entityRepository.GetByIdAsync(entity.Id);

                entityDB.Name = entity.Name;
                await _entityRepository.SaveChangesAsync();

                return(ApiResponse.Create(HttpStatusCode.OK, null));
            }
            catch (Exception)
            {
                return(ApiResponse.Create(HttpStatusCode.InternalServerError, null, "InternalServerError_Error"));
            }
        }