public virtual ApiBucketClientRequestModel MapClientResponseToRequest(
            ApiBucketClientResponseModel response)
        {
            var request = new ApiBucketClientRequestModel();

            request.SetProperties(
                response.ExternalId,
                response.Name);
            return(request);
        }
        public virtual ApiBucketClientResponseModel MapClientRequestToResponse(
            int id,
            ApiBucketClientRequestModel request)
        {
            var response = new ApiBucketClientResponseModel();

            response.SetProperties(id,
                                   request.ExternalId,
                                   request.Name);
            return(response);
        }
예제 #3
0
        public virtual async Task <UpdateResponse <ApiBucketClientResponseModel> > BucketUpdateAsync(int id, ApiBucketClientRequestModel item, CancellationToken cancellationToken = default(CancellationToken))
        {
            HttpResponseMessage httpResponse = await this.Client.PutAsJsonAsync($"api/Buckets/{id}", item, cancellationToken).ConfigureAwait(false);

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