Exemple #1
0
 private Payment(DateTime date, long valueInKopeks, PaymentDocumentType documentType, long documentNumber)
 {
     Date           = date;
     ValueInKopeks  = valueInKopeks;
     documentType   = DocumentType;
     DocumentNumber = documentNumber;
 }
Exemple #2
0
 public static Payment CreateNew(
     DateTime date,
     long valueInKopeks,
     PaymentDocumentType documentType,
     long documentNumber
     )
 {
     CheckConditionsForCreateNew(valueInKopeks);
     return(new Payment(date, valueInKopeks, documentType, documentNumber));
 }
Exemple #3
0
 public static Payment CreateNew(
     DateTime date,
     long valueInKopeks,
     PaymentDocumentType documentType,
     long documentNumber
     )
 {
     if (valueInKopeks <= 0)
     {
         throw new ArgumentException(
                   "Payment should has positive value"
                   );
     }
     return(new Payment(date, valueInKopeks, documentType, documentNumber));
 }