public virtual ApiSaleClientRequestModel MapClientResponseToRequest( ApiSaleClientResponseModel response) { var request = new ApiSaleClientRequestModel(); request.SetProperties( response.CustomerId, response.Date); return(request); }
public virtual ApiSaleClientResponseModel MapClientRequestToResponse( int id, ApiSaleClientRequestModel request) { var response = new ApiSaleClientResponseModel(); response.SetProperties(id, request.CustomerId, request.Date); return(response); }
public virtual async Task <UpdateResponse <ApiSaleClientResponseModel> > SaleUpdateAsync(int id, ApiSaleClientRequestModel item, CancellationToken cancellationToken = default(CancellationToken)) { HttpResponseMessage httpResponse = await this.Client.PutAsJsonAsync($"api/Sales/{id}", item, cancellationToken).ConfigureAwait(false); this.HandleResponseCode(httpResponse); return(JsonConvert.DeserializeObject <UpdateResponse <ApiSaleClientResponseModel> >(httpResponse.Content.ContentToString())); }