Пример #1
0
 private CustomerStatus(CustomerStatusType type, ExpirationDate expirationDate)
     : this()
 {
     Type            = type;
     _expirationDate = expirationDate ?? throw new ArgumentNullException(nameof(expirationDate));
 }
Пример #2
0
 private CustomerStatus(CustomerStatusType type, ExpirationDate expirationDate)
     : this()
 {
     Type           = type;
     ExpirationDate = expirationDate;
 }
Пример #3
0
 private CustomerStatus(CustomerStatusType type)
     : this()
 {
     Type = type;
 }
Пример #4
0
 public CustomerStatus Promote()
 {
     this.Type            = CustomerStatusType.Advanced;
     this._expirationDate = DateTime.UtcNow.AddYears(1);
     return(this);
 }
Пример #5
0
 private CustomerStatus(CustomerStatusType type, ExpirationDate expirationDate)
     : this()
 {
     this.Type            = type;
     this._expirationDate = expirationDate ?? throw new ArgumentEmptyException(nameof(expirationDate));
 }
Пример #6
0
        // TODO Criar validador

        public Customer(string accountNumber, string name, string lastName, int documentId, CustomerStatusType status, Custody custody)
        {
            AccountNumber = accountNumber;
            Name          = name;
            LastName      = lastName;
            DocumentId    = documentId;
            Status        = status;
            Custody       = custody;

            Validate(this, new CustomerValidator());
        }