Skip to content

Commit

Permalink
Update content of the OAS file and documentation - 2023-11-16.1
Browse files Browse the repository at this point in the history
  • Loading branch information
bitbucket-automation committed Nov 16, 2023
1 parent 37cc4cb commit 547728d
Show file tree
Hide file tree
Showing 6 changed files with 37 additions and 15 deletions.
9 changes: 8 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,18 @@ All notable changes to the API definition will be recorded here.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html)

## [2.26.0] - 2023-11-14
## [2.26.0] - 2023-11-15
### Added
- Refactor ValidationError enum

## [2.26.0] - 2023-11-14
### Added
- Added endpoints to manage applications and sub-applications (Application Management)

## [2.25.1] - 2023-11-10
### Added
- Updated `Consent` schema with two new fields `softDeleted` and `deletedByInstitution`

## [2.25.0] - 2023-09-27
### Added
- Add `dependentRequired` field to the Schema component for Payment Constraint GET endpoint.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
import org.openapitools.client.model.PaymentAuthorisationRequest;
import org.openapitools.client.model.PaymentRequest;

import java.util.UUID;

public class AuthorisationService {

private final AuthorisationsApi api;
Expand All @@ -16,11 +18,11 @@ public AuthorisationService(final AuthorisationsApi apiClient) {
this.api = apiClient;
}

public ApiResponseOfAccountAuthorisationResponse createAccountAuthRequest(final String applicationUserUuid, final String institutionId, String psuId, String psuCorpId,
public ApiResponseOfAccountAuthorisationResponse createAccountAuthRequest(final UUID userUuid, final String institutionId, String psuId, String psuCorpId,
String psuIpAdd,
Boolean raw) throws ApiException {
AccountAuthorisationRequest accountRequest = new AccountAuthorisationRequest();
accountRequest.setApplicationUserId(applicationUserUuid);
accountRequest.setUserUuid(userUuid);
accountRequest.setInstitutionId(institutionId);
return api.initiateAccountRequest(accountRequest, psuId, psuCorpId, psuIpAdd, raw);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public ApplicationUser createUser(NewApplicationUser applicationUser) throws Api
return api.addUser(applicationUser);
}

public ApiResponseOfUserDeleteResponse deleteUser(UUID applicationUserId) throws ApiException {
return api.deleteUser(applicationUserId);
public ApiResponseOfUserDeleteResponse deleteUser(UUID userUuid) throws ApiException {
return api.deleteUser(userUuid);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ void setUp() {
void createAccountAuthRequest() throws ApiException {
ApiResponseOfAccountAuthorisationResponse accResponse = mock(ApiResponseOfAccountAuthorisationResponse.class);
when(apiClient.initiateAccountRequest(any(AccountAuthorisationRequest.class), anyString(), anyString(), anyString(), anyBoolean())).thenReturn(accResponse);
assertNotNull(service.createAccountAuthRequest(UUID.randomUUID().toString(), "institution", "", "", "", false));
assertNotNull(service.createAccountAuthRequest(UUID.randomUUID(), "institution", "", "", "", false));
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,11 @@ void testAccountFlow() {
try {
// user setup
NewApplicationUser newUser = new NewApplicationUser();
newUser.setReferenceId("java user");
newUser.setApplicationUserId(UUID.randomUUID().toString());
// create the user
ApplicationUser confirmedUser = userService.createUser(newUser);
Assertions.assertNotNull(confirmedUser);
// account request
ApiResponseOfAccountAuthorisationResponse accountReqResp = authService.createAccountAuthRequest(confirmedUser.getApplicationUserId(), INSTITUTION, psuId, psuCorpId, psuIpAdd, false);
ApiResponseOfAccountAuthorisationResponse accountReqResp = authService.createAccountAuthRequest(confirmedUser.getUuid(), INSTITUTION, psuId, psuCorpId, psuIpAdd, false);

AccountAuthorisationResponse accountReqRespData = accountReqResp.getData();
Assertions.assertNotNull(accountReqRespData);
Expand All @@ -80,6 +78,7 @@ void testAccountFlow() {
Assertions.assertFalse(transactions.isEmpty());
}
// user removal
// DeleteUser fails with timeout connection error
ApiResponseOfUserDeleteResponse deletedUser = userService.deleteUser(confirmedUser.getUuid());
Assertions.assertNotNull(deletedUser);
} catch (ApiException | IOException e) {
Expand Down Expand Up @@ -115,6 +114,7 @@ void testPaymentsFlow() {
PaymentResponses payments = paymentsService.fetchPayment(paymentsRespData.getId(), consentToken, psuId, psuCorpId, psuIpAdd, false);
Assertions.assertNotNull(payments);
// user removal
// DeleteUser fails with timeout connection error
ApiResponseOfUserDeleteResponse deletedUser = userService.deleteUser(confirmedUser.getUuid());
Assertions.assertNotNull(deletedUser);
} catch (ApiException | IOException e) {
Expand Down
25 changes: 19 additions & 6 deletions openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"info": {
"description": "The Yapily API enables connections between your application and users' banks. For more information check out our [documentation](https://docs.yapily.com/).<br><br>In particular, make sure to view our [Getting Started](https://docs.yapily.com/pages/home/getting-started/) steps if this is your first time here.<br><br>While testing the API, our list of [sandbox credentials](https://docs.yapily.com/pages/key-concepts/sandbox-credentials/) maybe useful.",
"title": "Yapily API",
"version": "2.25.0",
"version": "2.26.0",
"contact": {
"name": "Yapily Support",
"url": "https://docs.yapily.com/pages/resources/support/",
Expand Down Expand Up @@ -11628,6 +11628,16 @@
"institutionConsentId": {
"type": "string",
"description": "Identification of the consent at the Institution."
},
"softDeleted": {
"type": "boolean",
"description": "__Conditional__. Used to denote that the consent has been soft deleted",
"example": false
},
"deletedByInstitution": {
"type": "boolean",
"description": "__Conditional__. Denotes whether the consent has been deleted on the institution side or not, however only if that functionality is provided by the institution otherwise it remains as null",
"example": false
}
}
},
Expand Down Expand Up @@ -19339,14 +19349,17 @@
"description": "name of the field with error"
},
"error": {
"type": "string",
"enum": [
"MANDATORY",
"INVALID_FORMAT"
]
"$ref": "#/components/schemas/EnumError"
}
}
},
"EnumError": {
"type": "string",
"enum": [
"MANDATORY",
"INVALID_FORMAT"
]
},
"ValidationErrorResponse": {
"type": "object",
"properties": {
Expand Down

0 comments on commit 547728d

Please sign in to comment.