Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add query parameter to delete consent request #1282

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ public ResponseEntity<TransactionsResponse> getTransactionsWithoutAccountId(

@Override
public ResponseEntity<Void> deleteConsent(UUID serviceSessionID, String serviceSessionPassword, UUID xRequestID,
String xTimestampUTC, String xRequestSignature, String fintechID) {
String xTimestampUTC, String xRequestSignature, String fintechID, Boolean deleteAll) {
return null;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,8 @@ paths:
- $ref: "./tpp_banking_api_commons.yml#/components/parameters/Fintech-ID"
- $ref: "./tpp_banking_api_commons.yml#/components/parameters/ServiceSessionPassword"
- $ref: "./tpp_banking_api_commons.yml#/components/parameters/X-Request-ID"
#query
- $ref: "#/components/parameters/deleteAll"

responses:
"200":
Expand Down Expand Up @@ -318,6 +320,17 @@ components:
schema:
type: string

deleteAll:
name: deleteAll
in: query
required: false
description: |
Delete FinAPI user when deleting consent.
example: "false"
schema:
type: boolean
default: "false"

responses:
200_AccountsTransactions:
description: OK
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ public CompletableFuture getTransactionsWithoutAccountId(
@Override
@SuppressWarnings("unchecked")
public CompletableFuture<ResponseEntity<Void>> deleteConsent(UUID serviceSessionId, String serviceSessionPassword, UUID xRequestID,
String xTimestampUTC, String xRequestSignature, String fintechId) {
String xTimestampUTC, String xRequestSignature, String fintechId, Boolean deleteAll) {
return deleteConsent.execute(
DeleteConsentRequest.builder()
.facadeServiceable(FacadeServiceableRequest.builder()
Expand All @@ -213,6 +213,7 @@ public CompletableFuture<ResponseEntity<Void>> deleteConsent(UUID serviceSession
.requestId(xRequestID)
.build()
)
.deleteAll(deleteAll)
.build()
).thenApply(it -> (ResponseEntity<Void>) mapper.translate(it, body -> null));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,9 @@ public class DeleteConsentRequest implements FacadeServiceableGetter {
* The request representation that is being serviced by facade.
*/
private FacadeServiceableRequest facadeServiceable;

/**
* If true FinAPI user will be deleted when deleting consent.
*/
private boolean deleteAll;
}