public override void AddTransferToBatch(Transfer transfer)
        {
            AddTransferToBatchCalled = true;
            TransferAddedToBatch = transfer;
			_transfers.Add(transfer);
        }
 public override void UpdateTransferInBatch(Transfer updated)
 {
     UpdateTransferInBatchCalled = true;
     TransferUpdatedInBatch = updated;
 }
        public override void RemoveTransferFromBatch(Transfer transfer)
        {
            RemoveTransferFromBatchCalled = true;
            TransferRemovedFromBatch = transfer;
			_transfers.Remove(transfer);
        }
        public virtual void UpdateTransferInBatch(Transfer updated)
        {
            List<Transfer> tempTransfers = Transfers;
            Transfer found = tempTransfers.Find(delegate(Transfer match) { return match.Id == updated.Id; });
            if (found != null)
            {
                found.Amount = updated.Amount;
                found.Description = updated.Description;
                found.DestinationAccount = updated.DestinationAccount;
                found.SourceAccount = updated.SourceAccount;

                Account acct = Accounts.Find(delegate(Account match) { return match.Number == updated.SourceAccount; });
                if (acct != null)
                {
                    found.SourceAccountName = acct.Name;
                }

                acct = Accounts.Find(delegate(Account match) { return match.Number == updated.DestinationAccount; });

                if (acct != null)
                {
                    found.DestinationAccountName = acct.Name;
                }

                Transfers = tempTransfers;
            }
        }
 public virtual void RemoveTransferFromBatch(Transfer transfer)
 {
     List<Transfer> tempTransfers = Transfers;
     Transfer found = tempTransfers.Find(delegate(Transfer match) { return match.Id == transfer.Id; });
     if (found != null)
     {
         tempTransfers.Remove(found);
         Transfers = tempTransfers;
     }
 }
        public virtual void AddTransferToBatch(Transfer transfer)
        {
            Guard.ArgumentNotNull(transfer, "transfer");

            List<Transfer> transfers = Transfers;

            Account acct = Accounts.Find(delegate(Account match) { return match.Number == transfer.SourceAccount; });
            if (acct != null)
            {
                transfer.SourceAccountName = acct.Name;
            }

            acct = Accounts.Find(delegate(Account match) { return match.Number == transfer.DestinationAccount; });
            if (acct != null)
            {
                transfer.DestinationAccountName = acct.Name;
            }

            transfers.Add(transfer);
            Transfers = transfers;
        }
 public Transfer[] ProcessTransfers(Transfer[] transfers)
 {
     ProcessTransfersRequestType request = _translator.Translate<ProcessTransfersRequestType>(transfers);
     return _translator.Translate<Transfer[]>(_proxy.ProcessTransfers(request));
 }
 public Transfer[] ProcessTransfers(Transfer[] transfers)
 {
     ProcessTransfersCalled = true;
     return new Transfer[] { new Transfer() };
 }