Пример #1
0
 public WithdrawRequest(WithdrawalType type, long accountLegalEntityId, long uln, ServiceRequest serviceRequest, long accountId, string emailAddress)
 {
     WithdrawalType       = type;
     AccountLegalEntityId = accountLegalEntityId;
     ULN            = uln;
     ServiceRequest = serviceRequest;
     AccountId      = accountId;
     EmailAddress   = emailAddress;
 }
Пример #2
0
        private static void SetupWithdrawalScheme(WithdrawalType type)
        {
            //TODO : this is poor man's injection. For now, since its a basic application we can live without have a container and DI logic
            //to inject the scheme. Open to extension though.

            switch (type)
            {
            case WithdrawalType.PreferredDenominationRules:
                DenominationPreferenceRules rules = new DenominationPreferenceRules(new List <DenominationType> {
                    DenominationType.TwentyPound
                });
                withdrawalScheme = new WithdrawalByPreferedDenomination(moneyStore, rules);
                break;

            case WithdrawalType.LeastNumberOfItems:
                withdrawalScheme = new WithdrawalByLeastNumberOfItems(moneyStore);
                break;

            default: throw new Exception("This schema is not supported yet");
            }
        }