Skip to content

Commit

Permalink
Add query parameter to delete consent request (#1282)
Browse files Browse the repository at this point in the history
  • Loading branch information
tsehelnyk committed Jul 26, 2021
1 parent 3d1376e commit cd411c5
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 2 deletions.
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;
}

0 comments on commit cd411c5

Please sign in to comment.