Esempio n. 1
0
        public JsonPatchDocument <ApiPaymentTypeRequestModel> CreatePatch(ApiPaymentTypeRequestModel model)
        {
            var patch = new JsonPatchDocument <ApiPaymentTypeRequestModel>();

            patch.Replace(x => x.Name, model.Name);
            return(patch);
        }
Esempio n. 2
0
        public virtual ApiPaymentTypeRequestModel MapResponseToRequest(
            ApiPaymentTypeResponseModel response)
        {
            var request = new ApiPaymentTypeRequestModel();

            request.SetProperties(
                response.Name);
            return(request);
        }
Esempio n. 3
0
        public virtual ApiPaymentTypeResponseModel MapRequestToResponse(
            int id,
            ApiPaymentTypeRequestModel request)
        {
            var response = new ApiPaymentTypeResponseModel();

            response.SetProperties(id,
                                   request.Name);
            return(response);
        }