use of net.petafuel.styx.core.xs2a.standards.berlingroup.v1_3.http.GetAuthorisationResponse in project styx by petafuel.
the class BasicAuthorisationService method getAuthorisations.
protected List<String> getAuthorisations(GetAuthorisationsRequest xs2ARequest) throws BankRequestFailedException {
this.setUrl(this.url + xs2ARequest.getServicePath());
this.createBody(RequestType.GET);
this.createHeaders(xs2ARequest);
try (Response response = this.execute();
Jsonb jsonb = JsonbBuilder.create()) {
String responseBody = extractResponseBody(response, 200);
GetAuthorisationResponse getAuthorisationResponse = jsonb.fromJson(responseBody, GetAuthorisationResponse.class);
return getAuthorisationResponse.getAuthorisationIds();
} catch (Exception e) {
throw new BankRequestFailedException(e.getMessage(), e);
}
}
Aggregations