static internal void ValidatesIntervalPeriodWithChargeDay(Interval.PeriodWithChargeDay interval) { if( interval.Interval < 1 ) { throw new ArgumentException("Interval must be greater than zero"); } if( interval.Unit == null ) { throw new ArgumentException("Interval unit cannot be null"); } }
public Creator WithPeriodOfValidity(Interval.Period period) { PeriodOfValidity = period; return this; }
internal Creator(Payment payment, int amount, String currency, Interval.PeriodWithChargeDay interval) { Payment = payment; Amount = amount; Currency = currency; this.Interval = interval; }
public Creator WithInterval(Interval.PeriodWithChargeDay interval) { Interval = interval; return this; }
public static Creator Create(String paymentId, int amount, String currency, Interval.PeriodWithChargeDay interval) { return new Creator(new Payment(paymentId), amount, currency, interval); }