Exemplo n.º 1
0
 private void EnsureAccountLegalEntityHasBeenAdded(AccountLegalEntity accountLegalEntity)
 {
     if (_accountLegalEntities.All(ale => ale.Id != accountLegalEntity.Id))
     {
         throw new InvalidOperationException("Requires account legal entity has been added");
     }
 }
Exemplo n.º 2
0
 public virtual Cohort CreateCohort(long providerId,
                                    AccountLegalEntity accountLegalEntity,
                                    Account transferSender,
                                    DraftApprenticeshipDetails draftApprenticeshipDetails,
                                    UserInfo userInfo)
 {
     return(new Cohort(providerId, accountLegalEntity.AccountId, accountLegalEntity.Id, transferSender?.Id, draftApprenticeshipDetails, Party.Provider, userInfo));
 }
Exemplo n.º 3
0
        public AccountLegalEntity AddAccountLegalEntity(long accountLegalEntityId, long maLegalEntityId, string legalEntityId,
                                                        string accountLegalEntityPublicHashedId, string name, OrganisationType organisationType, string address,
                                                        DateTime added)
        {
            EnsureAccountLegalEntityHasNotAlreadyBeenAdded(accountLegalEntityId);

            var accountLegalEntity = new AccountLegalEntity(this, accountLegalEntityId, maLegalEntityId, legalEntityId,
                                                            accountLegalEntityPublicHashedId, name, organisationType, address, added);

            _accountLegalEntities.Add(accountLegalEntity);

            return(accountLegalEntity);
        }
Exemplo n.º 4
0
 public Cohort CreateCohort(long providerId, AccountLegalEntity accountLegalEntity, UserInfo userInfo)
 {
     throw new NotImplementedException();
 }
Exemplo n.º 5
0
 public virtual Cohort CreateCohortWithOtherParty(long providerId, AccountLegalEntity accountLegalEntity, Account transferSender, string message, UserInfo userInfo)
 {
     return(new Cohort(providerId, accountLegalEntity.AccountId, accountLegalEntity.Id, transferSender?.Id, Party.Employer, message, userInfo));
 }
Exemplo n.º 6
0
 public virtual Cohort CreateCohort(long providerId, AccountLegalEntity accountLegalEntity, UserInfo userInfo)
 {
     return(new Cohort(providerId, accountLegalEntity.AccountId, accountLegalEntity.Id, Party.Provider, userInfo));
 }
Exemplo n.º 7
0
        public void RemoveAccountLegalEntity(AccountLegalEntity accountLegalEntity, DateTime removed)
        {
            EnsureAccountLegalEntityHasBeenAdded(accountLegalEntity);

            accountLegalEntity.Delete(removed);
        }