Exemplo n.º 1
0
        public virtual ApiLinkClientRequestModel MapClientResponseToRequest(
            ApiLinkClientResponseModel response)
        {
            var request = new ApiLinkClientRequestModel();

            request.SetProperties(
                response.AssignedMachineId,
                response.ChainId,
                response.DateCompleted,
                response.DateStarted,
                response.DynamicParameters,
                response.ExternalId,
                response.LinkStatusId,
                response.Name,
                response.Order,
                response.Response,
                response.StaticParameters,
                response.TimeoutInSeconds);
            return(request);
        }
Exemplo n.º 2
0
        public virtual async Task <UpdateResponse <ApiLinkClientResponseModel> > LinkUpdateAsync(int id, ApiLinkClientRequestModel item, CancellationToken cancellationToken = default(CancellationToken))
        {
            HttpResponseMessage httpResponse = await this.Client.PutAsJsonAsync($"api/Links/{id}", item, cancellationToken).ConfigureAwait(false);

            this.HandleResponseCode(httpResponse);
            return(JsonConvert.DeserializeObject <UpdateResponse <ApiLinkClientResponseModel> >(httpResponse.Content.ContentToString()));
        }