public static BalanceOutDto EntityToOutDto(BalanceEntity balanceEntity)
 {
     return(new BalanceOutDto()
     {
         BalanceAmount = AmountOutDto.EntityToOutDto(balanceEntity.BalanceAmount),
         BalanceType = balanceEntity.BalanceType,
         CreditLimitIncluded = balanceEntity.CreditLimitIncluded,
         LastChangeDateTime = balanceEntity.LastChangeDateTime,
         LastCommittedTransaction = balanceEntity.LastCommittedTransaction
     });
 }
Exemple #2
0
        public static AccountDetailsOutDto EntityToOutDto(AccountDetailEntity accountDetailEntity)
        {
            var accountDetailsFromReference =
                AccountReferenceOutDto.EntityToOutDto <AccountDetailsOutDto>(accountDetailEntity);

            accountDetailsFromReference.ResourceId       = accountDetailEntity.ResourceId;
            accountDetailsFromReference.Name             = accountDetailEntity.Name;
            accountDetailsFromReference.Product          = accountDetailEntity.Product;
            accountDetailsFromReference.CashAccountType  = accountDetailEntity.CashAccountType;
            accountDetailsFromReference.Status           = accountDetailEntity.Status;
            accountDetailsFromReference.Usage            = accountDetailEntity.Usage;
            accountDetailsFromReference.Balances         = accountDetailEntity.Balances.Select(BalanceOutDto.EntityToOutDto);
            accountDetailsFromReference.Lock             = LockOutDto.EntityToOutDto(accountDetailEntity.Lock);
            accountDetailsFromReference.LastModifiedDate = accountDetailEntity.LastModifiedDate;
            accountDetailsFromReference.CreatedDate      = accountDetailEntity.CreatedDate;
            accountDetailsFromReference.AuthorizedLimit  = accountDetailEntity.AuthorizedLimit != null
                ? AmountOutDto.EntityToOutDto(accountDetailEntity.AuthorizedLimit)
                : null;

            return(accountDetailsFromReference);
        }