Esempio n. 1
0
        public virtual ApiOrganizationClientRequestModel MapClientResponseToRequest(
            ApiOrganizationClientResponseModel response)
        {
            var request = new ApiOrganizationClientRequestModel();

            request.SetProperties(
                response.Name);
            return(request);
        }
Esempio n. 2
0
        public virtual ApiOrganizationClientResponseModel MapClientRequestToResponse(
            int id,
            ApiOrganizationClientRequestModel request)
        {
            var response = new ApiOrganizationClientResponseModel();

            response.SetProperties(id,
                                   request.Name);
            return(response);
        }
Esempio n. 3
0
        public virtual async Task <UpdateResponse <ApiOrganizationClientResponseModel> > OrganizationUpdateAsync(int id, ApiOrganizationClientRequestModel item, CancellationToken cancellationToken = default(CancellationToken))
        {
            HttpResponseMessage httpResponse = await this.Client.PutAsJsonAsync($"api/Organizations/{id}", item, cancellationToken).ConfigureAwait(false);

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