public virtual ApiTimestampCheckClientRequestModel MapClientResponseToRequest(
            ApiTimestampCheckClientResponseModel response)
        {
            var request = new ApiTimestampCheckClientRequestModel();

            request.SetProperties(
                response.Name,
                response.Timestamp);
            return(request);
        }
        public virtual ApiTimestampCheckClientResponseModel MapClientRequestToResponse(
            int id,
            ApiTimestampCheckClientRequestModel request)
        {
            var response = new ApiTimestampCheckClientResponseModel();

            response.SetProperties(id,
                                   request.Name,
                                   request.Timestamp);
            return(response);
        }
Example #3
0
        public virtual async Task <UpdateResponse <ApiTimestampCheckClientResponseModel> > TimestampCheckUpdateAsync(int id, ApiTimestampCheckClientRequestModel item, CancellationToken cancellationToken = default(CancellationToken))
        {
            HttpResponseMessage httpResponse = await this.Client.PutAsJsonAsync($"api/TimestampChecks/{id}", item, cancellationToken).ConfigureAwait(false);

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