Class SpiPaymentFactoryImpl

  • All Implemented Interfaces:
    de.adorsys.psd2.xs2a.service.mapper.payment.SpiPaymentFactory

    @Component
    public class SpiPaymentFactoryImpl
    extends Object
    implements de.adorsys.psd2.xs2a.service.mapper.payment.SpiPaymentFactory
    Factory class to be used to get SpiPayment from PisPayment, PaymentProduct and PaymentType or concrete SpiPayment (SINGLE/PERIODIC/BULK) from PisPayment and PaymentProduct
    • Constructor Detail

      • SpiPaymentFactoryImpl

        public SpiPaymentFactoryImpl()
    • Method Detail

      • getSpiPayment

        public Optional<? extends de.adorsys.psd2.xs2a.spi.service.SpiPayment> getSpiPayment​(de.adorsys.psd2.consent.api.pis.CommonPaymentData commonPaymentData)
        Creates Optional of SpiPayment from PisPayment, PaymentProduct and PaymentType. Should be used, when general SpiPayment type is needed.
        Specified by:
        getSpiPayment in interface de.adorsys.psd2.xs2a.service.mapper.payment.SpiPaymentFactory
        Parameters:
        commonPaymentData - CommonPaymentData object
        Returns:
        Optional of SpiPayment subclass of requested payment type or throws IllegalArgumentException for unknown payment type