class PaymentConfigurationFacadeImpl implements ConfigurationsFacade {
	
	
	@Autowired
	private PaymentService paymentService;

	@Override
	public List<ReadableConfiguration> configurations(MerchantStore store) {
		
		try {
			
			List<PaymentMethod> methods = paymentService.getAcceptedPaymentMethods(store);
			List<ReadableConfiguration> configurations = 
					methods.stream()
					.map(m -> configuration(m.getInformations(), store)).collect(Collectors.toList());
			return configurations;
			
		} catch (ServiceException e) {
			throw new ServiceRuntimeException("Error while getting payment configurations",e);
		}

	}

	@Override
	public ReadableConfiguration configuration(String module, MerchantStore store) {<FILL_FUNCTION_BODY>}

	@Override
	public void saveConfiguration(PersistableConfiguration configuration, MerchantStore store) {
		// TODO Auto-generated method stub

	}

	@Override
	public void deleteConfiguration(String module, MerchantStore store) {
		// TODO Auto-generated method stub

	}

	
	private ReadableConfiguration configuration(IntegrationConfiguration source, MerchantStore store) {
		
		ReadableConfiguration config = new ReadableConfiguration();
		config.setActive(source.isActive());
		config.setCode(source.getModuleCode());
		config.setKeys(source.getIntegrationKeys());
		config.setIntegrationOptions(source.getIntegrationOptions());
		
		return config;
	}


}

		
		try {
			
			ReadableConfiguration config = null;
			List<PaymentMethod> methods = paymentService.getAcceptedPaymentMethods(store);
			Optional<ReadableConfiguration> configuration = 
					methods.stream()
					.filter(m -> module.equals(m.getModule().getCode()))
					.map(m -> this.configuration(m.getInformations(), store))
					.findFirst();
			
			if(configuration.isPresent()) {
				config = configuration.get();
			}
			
			return config;
		
		} catch (ServiceException e) {
			throw new ServiceRuntimeException("Error while getting payment configuration [" + module + "]",e);
		}

	
<no_super_class>