Ejemplo 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");
     }
 }
Ejemplo 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));
 }
Ejemplo 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);
        }
Ejemplo n.º 4
0
 public Cohort CreateCohort(long providerId, AccountLegalEntity accountLegalEntity, UserInfo userInfo)
 {
     throw new NotImplementedException();
 }
Ejemplo 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));
 }
Ejemplo n.º 6
0
 public virtual Cohort CreateCohort(long providerId, AccountLegalEntity accountLegalEntity, UserInfo userInfo)
 {
     return(new Cohort(providerId, accountLegalEntity.AccountId, accountLegalEntity.Id, Party.Provider, userInfo));
 }
Ejemplo n.º 7
0
        public void RemoveAccountLegalEntity(AccountLegalEntity accountLegalEntity, DateTime removed)
        {
            EnsureAccountLegalEntityHasBeenAdded(accountLegalEntity);

            accountLegalEntity.Delete(removed);
        }