use of net.petafuel.styx.api.v1.sad.entity.SupportedServices in project styx by petafuel.
the class ASPSPProcessor method process.
/**
* @param bic - BIC provided by the client
* @return ASPSPResponse | null
*/
public static ASPSPResponse process(String bic) {
try {
Aspsp aspsp = getAspspByBic(bic);
if (Objects.nonNull(aspsp)) {
ASPSPResponse aspspResponse = new ASPSPResponse();
Map<String, ImplementerOption> implementerOptions = aspsp.getConfig().getImplementerOptions();
SupportedServicesPIS supportedServicesPIS = processSupportedServicesPis(implementerOptions);
SupportedServicesAIS supportedServicesAIS = processSupportedServicesAis(implementerOptions);
SupportedServicesCOF supportedServicesCOF = processSupportedServicesCof();
SupportedServices supportedServices = new SupportedServices(supportedServicesPIS, supportedServicesAIS, supportedServicesCOF);
aspspResponse.setName(aspsp.getName());
aspspResponse.setActive(aspsp.isActive());
aspspResponse.setScaApproaches(processScaApproaches(implementerOptions));
aspspResponse.setSupportedServices(supportedServices);
aspspResponse.setPrestepRequired(processPrestepRequired(implementerOptions));
aspspResponse.setMulticurrencyAccountsSupported(proccessMulticurrencyAccountsSupported(implementerOptions));
return aspspResponse;
} else {
return null;
}
} catch (BankNotFoundException | BankLookupFailedException bankNotFoundException) {
LOG.error("Bank not found for bic={} in SAD", bic);
return null;
}
}
Aggregations