use of net.petafuel.styx.api.v1.sad.entity.SupportedServicesAIS in project styx by petafuel.
the class ASPSPProcessor method processSupportedServicesAis.
/**
* @param implementerOptionMap - ImplementerOption map for the ASPSP
* @return SupportedServicesAIS
*/
private static SupportedServicesAIS processSupportedServicesAis(Map<String, ImplementerOption> implementerOptionMap) {
SupportedServicesAIS supportedServicesAIS = new SupportedServicesAIS();
supportedServicesAIS.setAccountDetails(true);
supportedServicesAIS.setAccountList(true);
supportedServicesAIS.setAccountsWithBalance(getIoValueByKey(implementerOptionMap, "IO32", "accounts_with_balance"));
supportedServicesAIS.setAccountsAccountIdWithBalance(getIoValueByKey(implementerOptionMap, "IO32", "accounts_account-id_with_balance"));
supportedServicesAIS.setAccountsAccountIdTransactionsWithBalance(getIoValueByKey(implementerOptionMap, "IO32", "accounts_account-id_transactions_with_balance"));
supportedServicesAIS.setAccountsAccountIdTransactionsResourceId(getIoValueByKey(implementerOptionMap, "IO32", "accounts_account-id_transactions_resourceId"));
return supportedServicesAIS;
}
use of net.petafuel.styx.api.v1.sad.entity.SupportedServicesAIS 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