private Payment(DateTime date, long valueInKopeks, PaymentDocumentType documentType, long documentNumber) { Date = date; ValueInKopeks = valueInKopeks; documentType = DocumentType; DocumentNumber = documentNumber; }
public static Payment CreateNew( DateTime date, long valueInKopeks, PaymentDocumentType documentType, long documentNumber ) { CheckConditionsForCreateNew(valueInKopeks); return(new Payment(date, valueInKopeks, documentType, documentNumber)); }
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)); }