Beispiel #1
0
        public virtual ApiProductListPriceHistoryRequestModel MapResponseToRequest(
            ApiProductListPriceHistoryResponseModel response)
        {
            var request = new ApiProductListPriceHistoryRequestModel();

            request.SetProperties(
                response.EndDate,
                response.ListPrice,
                response.ModifiedDate,
                response.StartDate);
            return(request);
        }
Beispiel #2
0
        public virtual ApiProductListPriceHistoryResponseModel MapRequestToResponse(
            int productID,
            ApiProductListPriceHistoryRequestModel request)
        {
            var response = new ApiProductListPriceHistoryResponseModel();

            response.SetProperties(productID,
                                   request.EndDate,
                                   request.ListPrice,
                                   request.ModifiedDate,
                                   request.StartDate);
            return(response);
        }
Beispiel #3
0
        public JsonPatchDocument <ApiProductListPriceHistoryRequestModel> CreatePatch(ApiProductListPriceHistoryRequestModel model)
        {
            var patch = new JsonPatchDocument <ApiProductListPriceHistoryRequestModel>();

            patch.Replace(x => x.EndDate, model.EndDate);
            patch.Replace(x => x.ListPrice, model.ListPrice);
            patch.Replace(x => x.ModifiedDate, model.ModifiedDate);
            patch.Replace(x => x.StartDate, model.StartDate);
            return(patch);
        }