private CustomerStatus(CustomerStatusType type, ExpirationDate expirationDate)
     : this()
 {
     Type            = type;
     _expirationDate = expirationDate ?? throw new ArgumentNullException(nameof(expirationDate));
 }
Example #2
0
 private CustomerStatus(CustomerStatusType type, ExpirationDate expirationDate)
     : this()
 {
     Type           = type;
     ExpirationDate = expirationDate;
 }
Example #3
0
 private CustomerStatus(CustomerStatusType type)
     : this()
 {
     Type = type;
 }
Example #4
0
 public CustomerStatus Promote()
 {
     this.Type            = CustomerStatusType.Advanced;
     this._expirationDate = DateTime.UtcNow.AddYears(1);
     return(this);
 }
Example #5
0
 private CustomerStatus(CustomerStatusType type, ExpirationDate expirationDate)
     : this()
 {
     this.Type            = type;
     this._expirationDate = expirationDate ?? throw new ArgumentEmptyException(nameof(expirationDate));
 }
Example #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());
        }