internal virtual UpdateBranchResponse UpdateBranch(UpdateBranchRequest request) { var marshaller = UpdateBranchRequestMarshaller.Instance; var unmarshaller = UpdateBranchResponseUnmarshaller.Instance; return(Invoke <UpdateBranchRequest, UpdateBranchResponse>(request, marshaller, unmarshaller)); }
public async Task <IActionResult> UpdateBranch(int branchId, [FromBody] UpdateBranchRequest request) { var updatebranchCommand = new UpdateBranchCommand(branchId, request); var result = await mediator.Send(updatebranchCommand); return(StatusCode((int)result.Code, result.Value)); }
/// <summary> /// Initiates the asynchronous execution of the UpdateBranch operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the UpdateBranch operation.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// <returns>The task object representing the asynchronous operation.</returns> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/amplify-2017-07-25/UpdateBranch">REST API Reference for UpdateBranch Operation</seealso> public virtual Task <UpdateBranchResponse> UpdateBranchAsync(UpdateBranchRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var marshaller = UpdateBranchRequestMarshaller.Instance; var unmarshaller = UpdateBranchResponseUnmarshaller.Instance; return(InvokeAsync <UpdateBranchRequest, UpdateBranchResponse>(request, marshaller, unmarshaller, cancellationToken)); }
/// <summary> /// Initiates the asynchronous execution of the UpdateBranch operation. /// </summary> /// /// <param name="request">Container for the necessary parameters to execute the UpdateBranch operation.</param> /// <param name="cancellationToken"> /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. /// </param> /// <returns>The task object representing the asynchronous operation.</returns> /// <seealso href="http://docs.aws.amazon.com/goto/WebAPI/amplify-2017-07-25/UpdateBranch">REST API Reference for UpdateBranch Operation</seealso> public virtual Task <UpdateBranchResponse> UpdateBranchAsync(UpdateBranchRequest request, System.Threading.CancellationToken cancellationToken = default(CancellationToken)) { var options = new InvokeOptions(); options.RequestMarshaller = UpdateBranchRequestMarshaller.Instance; options.ResponseUnmarshaller = UpdateBranchResponseUnmarshaller.Instance; return(InvokeAsync <UpdateBranchResponse>(request, options, cancellationToken)); }
internal virtual UpdateBranchResponse UpdateBranch(UpdateBranchRequest request) { var options = new InvokeOptions(); options.RequestMarshaller = UpdateBranchRequestMarshaller.Instance; options.ResponseUnmarshaller = UpdateBranchResponseUnmarshaller.Instance; return(Invoke <UpdateBranchResponse>(request, options)); }
public async Task <APIResponse> UpdateBranch(int branchId, UpdateBranchRequest request) { try { var client = httpClientFactory.CreateClient(VendorServiceOperation.serviceName); var param = JsonConvert.SerializeObject(request); HttpContent contentPost = new StringContent(param, Encoding.UTF8, "application/json"); var response = await client.PutAsync(servicesConfig.Vendor + VendorServiceOperation.UpdateBranch(branchId), 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)); } }
public async Task <ActionResult <UpdateBranchResponse> > Update(UpdateBranchRequest request) { var response = _mediator.Send(request); return(Ok()); }
public async Task <IActionResult> UpdateBranch(int branchId, [FromBody] UpdateBranchRequest request) { var result = await branchService.UpdateBranch(branchId, request); return(StatusCode((int)result.Code, result.Value)); }
/// <summary> /// Initializes a new instance of the <see cref="UpdateBranchCommand"/> class. /// </summary> /// <param name="branchRequest">The servicequestionrequest.</param> public UpdateBranchCommand(int branchId, UpdateBranchRequest branchRequest) { Id = branchId; BranchRequest = branchRequest; }