Class AccountReferenceInConsentUpdater
- java.lang.Object
-
- de.adorsys.psd2.xs2a.service.consent.AccountReferenceInConsentUpdater
-
@Service public class AccountReferenceInConsentUpdater extends Object
This service is designed to update AccountReferences in AisConsent. Also for bank offered consent and global consent AccountReferences needed to be saved in AisConsent in order to be used in next GET calls.
-
-
Constructor Summary
Constructors Constructor Description AccountReferenceInConsentUpdater()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidrewriteAccountAccess(@NotNull String consentId, @NotNull de.adorsys.psd2.core.data.AccountAccess newAccountAccess)Overwrites existing account access with the new one.de.adorsys.psd2.consent.api.CmsResponse<de.adorsys.psd2.core.data.ais.AisConsent>updateAccountReferences(@NotNull String consentId, @NotNull de.adorsys.psd2.core.data.ais.AisConsent aisConsent, @NotNull List<Xs2aAccountDetails> accountDetails)Updates account resourceIDs in existing account access.de.adorsys.psd2.consent.api.CmsResponse<de.adorsys.psd2.core.data.ais.AisConsent>updateCardAccountReferences(String consentId, de.adorsys.psd2.core.data.ais.AisConsent aisConsent, List<Xs2aCardAccountDetails> accountDetails)Updates card account resource IDs in existing account access.
-
-
-
Method Detail
-
rewriteAccountAccess
public void rewriteAccountAccess(@NotNull @NotNull String consentId, @NotNull @NotNull de.adorsys.psd2.core.data.AccountAccess newAccountAccess)Overwrites existing account access with the new one. To be used with caution. Only allowed when you get new AccountAccess from ASPSP side, NOT ALLOWED to update consent by something coming from TPP side!- Parameters:
consentId- an external ID of consent, where account access to be storednewAccountAccess- new object with account accesses
-
updateAccountReferences
public de.adorsys.psd2.consent.api.CmsResponse<de.adorsys.psd2.core.data.ais.AisConsent> updateAccountReferences(@NotNull @NotNull String consentId, @NotNull @NotNull de.adorsys.psd2.core.data.ais.AisConsent aisConsent, @NotNull @NotNull List<Xs2aAccountDetails> accountDetails)Updates account resourceIDs in existing account access. If account is not found in consent's account access, will be ignored.- Parameters:
consentId- an external ID of consent, where account access to be storedaisConsent- consent for which references are being updatedaccountDetails- list of account details with referenceId set- Returns:
- Response containing AIS Consent
-
updateCardAccountReferences
public de.adorsys.psd2.consent.api.CmsResponse<de.adorsys.psd2.core.data.ais.AisConsent> updateCardAccountReferences(String consentId, de.adorsys.psd2.core.data.ais.AisConsent aisConsent, List<Xs2aCardAccountDetails> accountDetails)
Updates card account resource IDs in existing account access. If account is not found in consent's account access, will be ignored. Masked PAN and PAN corresponding is implemented here.- Parameters:
consentId- an external ID of consent, where account access to be storedaisConsent- consent for which references are being updatedaccountDetails- list of account details with referenceId set- Returns:
- Response containing AIS Consent
-
-