Beispiel #1
0
        public async Task <APIResponse> UpdateGuesteventlists(int guesteventlistId, UpdateGuesteventlistRequest request)
        {
            try
            {
                var client = httpClientFactory.CreateClient(ECommerceServiceOperation.serviceName);

                var         param       = JsonConvert.SerializeObject(request);
                HttpContent contentPost = new StringContent(param, Encoding.UTF8, "application/json");

                var response = await client.PutAsync(servicesConfig.EventAssistant + EventAssistantServiceOperation.UpdateGuesteventlists(guesteventlistId), contentPost);

                return(new APIResponse(response.StatusCode));
            }
            catch (Exception ex)
            {
                logger.Error(ex, "Exception in method 'UpdateBranch()'");
                var exMessage = ex.InnerException != null ? ex.InnerException.Message : ex.Message;
                return(new APIResponse(exMessage, HttpStatusCode.InternalServerError));
            }
        }
Beispiel #2
0
        public async Task <IActionResult> UpdateGuesteventlists(int guesteventlistId, [FromBody] UpdateGuesteventlistRequest request)
        {
            var result = await guesteventlistService.UpdateGuesteventlists(guesteventlistId, request);

            return(StatusCode((int)result.Code, result.Value));
        }