예제 #1
0
 public static ITry <NonNegativeRevenue, IEnumerable <Error> > Create(NonNegativeAmount netValue, NonNegativeAmount vatValue, RevenueInfo info)
 {
     return(Try.Aggregate(
                ObjectValidations.NotNull(netValue),
                ObjectValidations.NotNull(vatValue),
                ObjectValidations.NotNull(info),
                (n, v, i) => new NonNegativeRevenue(n, v, i)
                ));
 }
 public NonNegativeRevenue(
     NonNegativeAmount netValue,
     NonNegativeAmount vatValue,
     TaxType taxType,
     RevenueType revenueType,
     VatExemptionType?vatExemption = null)
     : base(netValue, vatValue, taxType, revenueType, vatExemption)
 {
 }
예제 #3
0
 private NonNegativeRevenue(NonNegativeAmount netValue, NonNegativeAmount vatValue, RevenueInfo info)
 {
     NetValue = netValue;
     VatValue = vatValue;
     Info     = info;
 }
 private NonNegativePayment(NonNegativeAmount amount, PaymentType paymentType)
 {
     Amount      = amount;
     PaymentType = paymentType;
 }
 public static ITry <NonNegativePayment, INonEmptyEnumerable <Error> > Create(NonNegativeAmount amount, PaymentType paymentType)
 {
     return(ObjectValidations.NotNull(amount).Map(a => new NonNegativePayment(a, paymentType)));
 }
 public NonNegativePayment(NonNegativeAmount amount, PaymentType paymentType)
     : base(amount, paymentType)
 {
 }