public async Task <PaymentPlan> CreatePaymentPlanAsync(PaymentPlan paymentPlan) { validationService.Validate(paymentPlan); var endpoint = string.Format("{0}{1}", settings.BaseUrl, Endpoints.PaymentPlan); var result = await webServiceRequest.PostDeserializedAsync <PaymentPlan, Result <PaymentPlan> >(new Uri(endpoint), paymentPlan); return(result.Response); }
public virtual new IEnumerable <ValidationError> Validate() { var errors = new List <ValidationError>(); errors.AddRange(Customer.Validate()); errors.AddRange(Account.Validate()); errors.AddRange(PaymentPlan.Validate()); // Since Customer or Account Ids have not been created yet we need to remove // those errors from the validation errors.RemoveAll(e => e.PropertyName == "CustomerId" || e.PropertyName == "AccountId"); return(errors); }
public NewAccountPaymentPlan() { this.Account = new T(); this.PaymentPlan = new PaymentPlan(); }