using Fuel.Payment.Core;
using Fuel.Payment.Core.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Fuel.Payment.Service.Factory
{
    public abstract class AbstractPaymentProcessorFactory<TProcessResult> : IEnumerable<IPaymentProcessor<ElectronicOrderModel, TProcessResult>>
    {
        public abstract void Regist(Func<ElectronicOrderModel, bool> predict, IPaymentProcessor<ElectronicOrderModel, TProcessResult> processor);

        public abstract IEnumerator<IPaymentProcessor<ElectronicOrderModel, TProcessResult>> GetEnumerator();

        System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator()
        {
            throw new NotImplementedException();
        }

        public abstract IPaymentProcessor<ElectronicOrderModel, TProcessResult> Get(
            ElectronicOrderModel order);
    }
}
