Exemple #1
0
        public JsonPatchDocument <ApiCurrencyRequestModel> CreatePatch(ApiCurrencyRequestModel model)
        {
            var patch = new JsonPatchDocument <ApiCurrencyRequestModel>();

            patch.Replace(x => x.ModifiedDate, model.ModifiedDate);
            patch.Replace(x => x.Name, model.Name);
            return(patch);
        }
Exemple #2
0
        public virtual ApiCurrencyRequestModel MapResponseToRequest(
            ApiCurrencyResponseModel response)
        {
            var request = new ApiCurrencyRequestModel();

            request.SetProperties(
                response.ModifiedDate,
                response.Name);
            return(request);
        }
Exemple #3
0
        public virtual ApiCurrencyResponseModel MapRequestToResponse(
            string currencyCode,
            ApiCurrencyRequestModel request)
        {
            var response = new ApiCurrencyResponseModel();

            response.SetProperties(currencyCode,
                                   request.ModifiedDate,
                                   request.Name);
            return(response);
        }