de.adorsys.xs2a.adapter.sparkasse.SparkasseAccountInformationService Maven / Gradle / Ivy
package de.adorsys.xs2a.adapter.sparkasse;
import de.adorsys.xs2a.adapter.api.RequestHeaders;
import de.adorsys.xs2a.adapter.api.RequestParams;
import de.adorsys.xs2a.adapter.api.Response;
import de.adorsys.xs2a.adapter.api.http.HttpClientFactory;
import de.adorsys.xs2a.adapter.api.link.LinksRewriter;
import de.adorsys.xs2a.adapter.api.model.Aspsp;
import de.adorsys.xs2a.adapter.api.model.OK200TransactionDetails;
import de.adorsys.xs2a.adapter.api.model.TransactionsResponse200Json;
import de.adorsys.xs2a.adapter.impl.BaseAccountInformationService;
import de.adorsys.xs2a.adapter.sparkasse.model.SparkasseOK200TransactionDetails;
import de.adorsys.xs2a.adapter.sparkasse.model.SparkasseTransactionResponse200Json;
import org.mapstruct.factory.Mappers;
public class SparkasseAccountInformationService extends BaseAccountInformationService {
private final SparkasseMapper sparkasseMapper = Mappers.getMapper(SparkasseMapper.class);
public SparkasseAccountInformationService(Aspsp aspsp,
HttpClientFactory httpClientFactory,
LinksRewriter linksRewriter) {
super(aspsp,
httpClientFactory.getHttpClient(aspsp.getAdapterId()),
linksRewriter,
httpClientFactory.getHttpClientConfig().getLogSanitizer());
}
@Override
public Response getTransactionList(String accountId,
RequestHeaders requestHeaders,
RequestParams requestParams) {
return super.getTransactionList(accountId,
requestHeaders,
requestParams,
SparkasseTransactionResponse200Json.class,
sparkasseMapper::toTransactionsResponse200Json);
}
@Override
public Response getTransactionDetails(String accountId,
String transactionId,
RequestHeaders requestHeaders,
RequestParams requestParams) {
return super.getTransactionDetails(accountId,
transactionId,
requestHeaders,
requestParams,
SparkasseOK200TransactionDetails.class,
sparkasseMapper::toOK200TransactionDetails);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy