All Downloads are FREE. Search and download functionalities are using the official Maven repository.

de.adorsys.multibanking.xs2a_adapter.api.AccountInformationServiceAisApi Maven / Gradle / Ivy

/*
 * NextGenPSD2 XS2A Framework
 * # Summary The **NextGenPSD2** *Framework Version 1.3.4* offers a modern, open, harmonised and interoperable set of  Application Programming Interfaces (APIs) as the safest and most efficient way to provide data securely.  The NextGenPSD2 Framework reduces XS2A complexity and costs, addresses the problem of multiple competing standards  in Europe and, aligned with the goals of the Euro Retail Payments Board, enables European banking customers to benefit from innovative products and services ('Banking as a Service')  by granting TPPs safe and secure (authenticated and authorised) access to their bank accounts and financial data.  The possible Approaches are:   * Redirect SCA Approach   * OAuth SCA Approach   * Decoupled SCA Approach   * Embedded SCA Approach without SCA method   * Embedded SCA Approach with only one SCA method available   * Embedded SCA Approach with Selection of a SCA method    Not every message defined in this API definition is necessary for all approaches.    Furthermore this API definition does not differ between methods which are mandatory, conditional, or optional   Therefore for a particular implementation of a Berlin Group PSD2 compliant API it is only necessary to support    a certain subset of the methods defined in this API definition.    **Please have a look at the implementation guidelines if you are not sure    which message has to be used for the approach you are going to use.**  ## Some General Remarks Related to this version of the OpenAPI Specification: * **This API definition is based on the Implementation Guidelines of the Berlin Group PSD2 API.**    It is not an replacement in any sense.   The main specification is (at the moment) always the Implementation Guidelines of the Berlin Group PSD2 API. * **This API definition contains the REST-API for requests from the PISP to the ASPSP.** * **This API definition contains the messages for all different approaches defined in the Implementation Guidelines.** * According to the OpenAPI-Specification [https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.1.md]        \"If in is \"header\" and the name field is \"Accept\", \"Content-Type\" or \"Authorization\", the parameter definition SHALL be ignored.\"      The element \"Accept\" will not be defined in this file at any place.      The elements \"Content-Type\" and \"Authorization\" are implicitly defined by the OpenApi tags \"content\" and \"security\".    * There are several predefined types which might occur in payment initiation messages,    but are not used in the standard JSON messages in the Implementation Guidelines.   Therefore they are not used in the corresponding messages in this file either.   We added them for the convenience of the user.   If there is a payment product, which need these field, one can easily use the predefined types.   But the ASPSP need not to accept them in general.    * **We omit the definition of all standard HTTP header elements (mandatory/optional/conditional)    except they are mention in the Implementation Guidelines.**   Therefore the implementer might add the in his own realisation of a PSD2 comlient API in addition to the elements define in this file.     ## General Remarks on Data Types  The Berlin Group definition of UTF-8 strings in context of the PSD2 API have to support at least the following characters  a b c d e f g h i j k l m n o p q r s t u v w x y z  A B C D E F G H I J K L M N O P Q R S T U V W X Y Z  0 1 2 3 4 5 6 7 8 9  / - ? : ( ) . , ' +  Space 
 *
 * OpenAPI spec version: 1.3.4_2019-07-17v1
 * Contact: [email protected]
 *
 * NOTE: This class is auto generated by the swagger code generator program.
 * https://github.com/swagger-api/swagger-codegen.git
 * Do not edit the class manually.
 */

package de.adorsys.multibanking.xs2a_adapter.api;

import de.adorsys.multibanking.xs2a_adapter.ApiCallback;
import de.adorsys.multibanking.xs2a_adapter.ApiClient;
import de.adorsys.multibanking.xs2a_adapter.ApiException;
import de.adorsys.multibanking.xs2a_adapter.ApiResponse;
import de.adorsys.multibanking.xs2a_adapter.Configuration;
import de.adorsys.multibanking.xs2a_adapter.Pair;
import de.adorsys.multibanking.xs2a_adapter.ProgressRequestBody;
import de.adorsys.multibanking.xs2a_adapter.ProgressResponseBody;

import com.google.gson.reflect.TypeToken;

import java.io.IOException;


import de.adorsys.multibanking.xs2a_adapter.model.AccountList;
import de.adorsys.multibanking.xs2a_adapter.model.ConsentInformationResponse200Json;
import de.adorsys.multibanking.xs2a_adapter.model.ConsentStatusResponse200;
import de.adorsys.multibanking.xs2a_adapter.model.Consents;
import de.adorsys.multibanking.xs2a_adapter.model.ConsentsResponse201;
import de.adorsys.multibanking.xs2a_adapter.model.Error400NGAIS;
import de.adorsys.multibanking.xs2a_adapter.model.Error401NGAIS;
import de.adorsys.multibanking.xs2a_adapter.model.Error403NGAIS;
import de.adorsys.multibanking.xs2a_adapter.model.Error404NGAIS;
import de.adorsys.multibanking.xs2a_adapter.model.Error405NGAIS;
import de.adorsys.multibanking.xs2a_adapter.model.Error406NGAIS;
import de.adorsys.multibanking.xs2a_adapter.model.Error409NGAIS;
import de.adorsys.multibanking.xs2a_adapter.model.Error429NGAIS;
import de.adorsys.multibanking.xs2a_adapter.model.InlineResponse200;
import java.time.LocalDate;
import de.adorsys.multibanking.xs2a_adapter.model.ReadAccountBalanceResponse200;
import de.adorsys.multibanking.xs2a_adapter.model.ScaStatusResponse;
import de.adorsys.multibanking.xs2a_adapter.model.StartScaprocessResponse;
import de.adorsys.multibanking.xs2a_adapter.model.TransactionsResponse200Json;
import java.util.UUID;

import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class AccountInformationServiceAisApi {
    private ApiClient apiClient;

    public AccountInformationServiceAisApi() {
        this(Configuration.getDefaultApiClient());
    }

    public AccountInformationServiceAisApi(ApiClient apiClient) {
        this.apiClient = apiClient;
    }

    public ApiClient getApiClient() {
        return apiClient;
    }

    public void setApiClient(ApiClient apiClient) {
        this.apiClient = apiClient;
    }

    /**
     * Build call for createConsent
     * @param xRequestID ID of the request, unique to the call, as determined by the initiating party. (required)
     * @param body Requestbody for a consents request
 (optional)
     * @param X_GTW_ASPSP_ID ASPSP ID in the registry for the request routing (optional)
     * @param xGTWBankCode Bank code of bank to which the request addressed (optional)
     * @param X_GTW_BIC Business Identifier Code for the request routing (optional)
     * @param digest Is contained if and only if the \"Signature\" element is contained in the header of the request. (optional)
     * @param signature A signature of the request by the TPP on application level. This might be mandated by ASPSP.  (optional)
     * @param tpPSignatureCertificate The certificate used for signing the request, in base64 encoding.  Must be contained if a signature is contained.  (optional)
     * @param PSU_ID Client ID of the PSU in the ASPSP client interface.   Might be mandated in the ASPSP's documentation.  It might be contained even if an OAuth2 based authentication was performed in a pre-step or an OAuth2 based SCA was performed in an preceding AIS service in the same session. In this case the ASPSP might check whether PSU-ID and token match,  according to ASPSP documentation.  (optional)
     * @param psUIDType Type of the PSU-ID, needed in scenarios where PSUs have several PSU-IDs as access possibility.  In this case, the mean and use are then defined in the ASPSP’s documentation.  (optional)
     * @param psUCorporateID Might be mandated in the ASPSP's documentation. Only used in a corporate context.  (optional)
     * @param psUCorporateIDType Might be mandated in the ASPSP's documentation. Only used in a corporate context.  (optional)
     * @param tpPRedirectPreferred If it equals \"true\", the TPP prefers a redirect over an embedded SCA approach. If it equals \"false\", the TPP prefers not to be redirected for SCA. The ASPSP will then choose between the Embedded or the Decoupled SCA approach, depending on the choice of the SCA procedure by the TPP/PSU. If the parameter is not used, the ASPSP will choose the SCA approach to be applied depending on the SCA method chosen by the TPP/PSU.  (optional)
     * @param tpPRedirectURI URI of the TPP, where the transaction flow shall be redirected to after a Redirect.  Mandated for the Redirect SCA Approach, specifically  when TPP-Redirect-Preferred equals \"true\". It is recommended to always use this header field.  **Remark for Future:**  This field might be changed to mandatory in the next version of the specification.  (optional)
     * @param tpPNokRedirectURI If this URI is contained, the TPP is asking to redirect the transaction flow to this address instead of the TPP-Redirect-URI in case of a negative result of the redirect SCA method. This might be ignored by the ASPSP.  (optional)
     * @param tpPExplicitAuthorisationPreferred If it equals \"true\", the TPP prefers to start the authorisation process separately,  e.g. because of the usage of a signing basket.  This preference might be ignored by the ASPSP, if a signing basket is not supported as functionality.  If it equals \"false\" or if the parameter is not used, there is no preference of the TPP.  This especially indicates that the TPP assumes a direct authorisation of the transaction in the next step,  without using a signing basket.  (optional)
     * @param tpPNotificationURI URI for the Endpoint of the TPP-API to which the status of the payment initiation should be sent. This header field may by ignored by the ASPSP.  For security reasons, it shall be ensured that the TPP-Notification-URI as introduced above is secured by the TPP eIDAS QWAC used for identification of the TPP. The following applies:  URIs which are provided by TPPs in TPP-Notification-URI shall comply with the domain secured by the eIDAS QWAC certificate of the TPP in the field CN or SubjectAltName of the certificate. Please note that in case of example-TPP.com as certificate entry TPP- Notification-URI like www.example-TPP.com/xs2a-client/v1/ASPSPidentifcation/mytransaction- id/notifications or notifications.example-TPP.com/xs2a-client/v1/ASPSPidentifcation/mytransaction- id/notifications would be compliant.  Wildcard definitions shall be taken into account for compliance checks by the ASPSP.  ASPSPs may respond with ASPSP-Notification-Support set to false, if the provided URIs do not comply.  (optional)
     * @param tpPNotificationContentPreferred The string has the form   status=X1, ..., Xn  where Xi is one of the constants SCA, PROCESS, LAST and where constants are not repeated. The usage of the constants supports the of following semantics:    SCA: A notification on every change of the scaStatus attribute for all related authorisation processes is preferred by the TPP.    PROCESS: A notification on all changes of consentStatus or transactionStatus attributes is preferred by the TPP.   LAST: Only a notification on the last consentStatus or transactionStatus as available in the XS2A interface is preferred by the TPP.  This header field may be ignored, if the ASPSP does not support resource notification services for the related TPP.  (optional)
     * @param psUIPAddress The forwarded IP Address header field consists of the corresponding HTTP request  IP Address field between PSU and TPP.  It shall be contained if and only if this request was actively initiated by the PSU.  (optional)
     * @param psUIPPort The forwarded IP Port header field consists of the corresponding HTTP request IP Port field between PSU and TPP, if available.  (optional)
     * @param psUAccept The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available.  (optional)
     * @param psUAcceptCharset The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available.  (optional)
     * @param psUAcceptEncoding The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available.  (optional)
     * @param psUAcceptLanguage The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available.  (optional)
     * @param psUUserAgent The forwarded Agent header field of the HTTP request between PSU and TPP, if available.  (optional)
     * @param psUHttpMethod HTTP method used at the PSU ? TPP interface, if available. Valid values are: * GET * POST * PUT * PATCH * DELETE  (optional)
     * @param psUDeviceID UUID (Universally Unique Identifier) for a device, which is used by the PSU, if available. UUID identifies either a device or a device dependant application installation. In case of an installation identification this ID need to be unaltered until removal from device.  (optional)
     * @param psUGeoLocation The forwarded Geo Location of the corresponding http request between PSU and TPP if available.  (optional)
     * @param progressListener Progress listener
     * @param progressRequestListener Progress request listener
     * @return Call to execute
     * @throws ApiException If fail to serialize the request body object
     */
    public com.squareup.okhttp.Call createConsentCall(UUID xRequestID, Consents body, String X_GTW_ASPSP_ID, String xGTWBankCode, String X_GTW_BIC, String digest, String signature, byte[] tpPSignatureCertificate, String PSU_ID, String psUIDType, String psUCorporateID, String psUCorporateIDType, String tpPRedirectPreferred, String tpPRedirectURI, String tpPNokRedirectURI, String tpPExplicitAuthorisationPreferred, String tpPNotificationURI, String tpPNotificationContentPreferred, String psUIPAddress, String psUIPPort, String psUAccept, String psUAcceptCharset, String psUAcceptEncoding, String psUAcceptLanguage, String psUUserAgent, String psUHttpMethod, UUID psUDeviceID, String psUGeoLocation, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
        Object localVarPostBody = body;
        
        // create path and map variables
        String localVarPath = "/v1/consents";

        List localVarQueryParams = new ArrayList();
        List localVarCollectionQueryParams = new ArrayList();

        Map localVarHeaderParams = new HashMap();
        if (X_GTW_ASPSP_ID != null)
        localVarHeaderParams.put("X-GTW-ASPSP-ID", apiClient.parameterToString(X_GTW_ASPSP_ID));
        if (xGTWBankCode != null)
        localVarHeaderParams.put("X-GTW-Bank-Code", apiClient.parameterToString(xGTWBankCode));
        if (X_GTW_BIC != null)
        localVarHeaderParams.put("X-GTW-BIC", apiClient.parameterToString(X_GTW_BIC));
        if (xRequestID != null)
        localVarHeaderParams.put("X-Request-ID", apiClient.parameterToString(xRequestID));
        if (digest != null)
        localVarHeaderParams.put("Digest", apiClient.parameterToString(digest));
        if (signature != null)
        localVarHeaderParams.put("Signature", apiClient.parameterToString(signature));
        if (tpPSignatureCertificate != null)
        localVarHeaderParams.put("TPP-Signature-Certificate", apiClient.parameterToString(tpPSignatureCertificate));
        if (PSU_ID != null)
        localVarHeaderParams.put("PSU-ID", apiClient.parameterToString(PSU_ID));
        if (psUIDType != null)
        localVarHeaderParams.put("PSU-ID-Type", apiClient.parameterToString(psUIDType));
        if (psUCorporateID != null)
        localVarHeaderParams.put("PSU-Corporate-ID", apiClient.parameterToString(psUCorporateID));
        if (psUCorporateIDType != null)
        localVarHeaderParams.put("PSU-Corporate-ID-Type", apiClient.parameterToString(psUCorporateIDType));
        if (tpPRedirectPreferred != null)
        localVarHeaderParams.put("TPP-Redirect-Preferred", apiClient.parameterToString(tpPRedirectPreferred));
        if (tpPRedirectURI != null)
        localVarHeaderParams.put("TPP-Redirect-URI", apiClient.parameterToString(tpPRedirectURI));
        if (tpPNokRedirectURI != null)
        localVarHeaderParams.put("TPP-Nok-Redirect-URI", apiClient.parameterToString(tpPNokRedirectURI));
        if (tpPExplicitAuthorisationPreferred != null)
        localVarHeaderParams.put("TPP-Explicit-Authorisation-Preferred", apiClient.parameterToString(tpPExplicitAuthorisationPreferred));
        if (tpPNotificationURI != null)
        localVarHeaderParams.put("TPP-Notification-URI", apiClient.parameterToString(tpPNotificationURI));
        if (tpPNotificationContentPreferred != null)
        localVarHeaderParams.put("TPP-Notification-Content-Preferred", apiClient.parameterToString(tpPNotificationContentPreferred));
        if (psUIPAddress != null)
        localVarHeaderParams.put("PSU-IP-Address", apiClient.parameterToString(psUIPAddress));
        if (psUIPPort != null)
        localVarHeaderParams.put("PSU-IP-Port", apiClient.parameterToString(psUIPPort));
        if (psUAccept != null)
        localVarHeaderParams.put("PSU-Accept", apiClient.parameterToString(psUAccept));
        if (psUAcceptCharset != null)
        localVarHeaderParams.put("PSU-Accept-Charset", apiClient.parameterToString(psUAcceptCharset));
        if (psUAcceptEncoding != null)
        localVarHeaderParams.put("PSU-Accept-Encoding", apiClient.parameterToString(psUAcceptEncoding));
        if (psUAcceptLanguage != null)
        localVarHeaderParams.put("PSU-Accept-Language", apiClient.parameterToString(psUAcceptLanguage));
        if (psUUserAgent != null)
        localVarHeaderParams.put("PSU-User-Agent", apiClient.parameterToString(psUUserAgent));
        if (psUHttpMethod != null)
        localVarHeaderParams.put("PSU-Http-Method", apiClient.parameterToString(psUHttpMethod));
        if (psUDeviceID != null)
        localVarHeaderParams.put("PSU-Device-ID", apiClient.parameterToString(psUDeviceID));
        if (psUGeoLocation != null)
        localVarHeaderParams.put("PSU-Geo-Location", apiClient.parameterToString(psUGeoLocation));

        Map localVarFormParams = new HashMap();

        final String[] localVarAccepts = {
            "application/json", "application/problem+json"
        };
        final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
        if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);

        final String[] localVarContentTypes = {
            "application/json"
        };
        final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
        localVarHeaderParams.put("Content-Type", localVarContentType);

        if(progressListener != null) {
            apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
                @Override
                public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
                    com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
                    return originalResponse.newBuilder()
                    .body(new ProgressResponseBody(originalResponse.body(), progressListener))
                    .build();
                }
            });
        }

        String[] localVarAuthNames = new String[] { "BearerAuthOAuth" };
        return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
    }
    
    @SuppressWarnings("rawtypes")
    private com.squareup.okhttp.Call createConsentValidateBeforeCall(UUID xRequestID, Consents body, String X_GTW_ASPSP_ID, String xGTWBankCode, String X_GTW_BIC, String digest, String signature, byte[] tpPSignatureCertificate, String PSU_ID, String psUIDType, String psUCorporateID, String psUCorporateIDType, String tpPRedirectPreferred, String tpPRedirectURI, String tpPNokRedirectURI, String tpPExplicitAuthorisationPreferred, String tpPNotificationURI, String tpPNotificationContentPreferred, String psUIPAddress, String psUIPPort, String psUAccept, String psUAcceptCharset, String psUAcceptEncoding, String psUAcceptLanguage, String psUUserAgent, String psUHttpMethod, UUID psUDeviceID, String psUGeoLocation, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
        // verify the required parameter 'xRequestID' is set
        if (xRequestID == null) {
            throw new ApiException("Missing the required parameter 'xRequestID' when calling createConsent(Async)");
        }
        
        com.squareup.okhttp.Call call = createConsentCall(xRequestID, body, X_GTW_ASPSP_ID, xGTWBankCode, X_GTW_BIC, digest, signature, tpPSignatureCertificate, PSU_ID, psUIDType, psUCorporateID, psUCorporateIDType, tpPRedirectPreferred, tpPRedirectURI, tpPNokRedirectURI, tpPExplicitAuthorisationPreferred, tpPNotificationURI, tpPNotificationContentPreferred, psUIPAddress, psUIPPort, psUAccept, psUAcceptCharset, psUAcceptEncoding, psUAcceptLanguage, psUUserAgent, psUHttpMethod, psUDeviceID, psUGeoLocation, progressListener, progressRequestListener);
        return call;

        
        
        
        
    }

    /**
     * Create consent
     * This method create a consent resource, defining access rights to dedicated accounts of  a given PSU-ID. These accounts are addressed explicitly in the method as  parameters as a core function.  **Side Effects** When this Consent Request is a request where the \"recurringIndicator\" equals \"true\",  and if it exists already a former consent for recurring access on account information  for the addressed PSU, then the former consent automatically expires as soon as the new  consent request is authorised by the PSU.  Optional Extension: As an option, an ASPSP might optionally accept a specific access right on the access on all psd2 related services for all available accounts.   As another option an ASPSP might optionally also accept a command, where only access rights are inserted without mentioning the addressed account.  The relation to accounts is then handled afterwards between PSU and ASPSP.  This option is not supported for the Embedded SCA Approach.  As a last option, an ASPSP might in addition accept a command with access rights   * to see the list of available payment accounts or   * to see the list of available payment accounts with balances. 
     * @param xRequestID ID of the request, unique to the call, as determined by the initiating party. (required)
     * @param body Requestbody for a consents request
 (optional)
     * @param X_GTW_ASPSP_ID ASPSP ID in the registry for the request routing (optional)
     * @param xGTWBankCode Bank code of bank to which the request addressed (optional)
     * @param X_GTW_BIC Business Identifier Code for the request routing (optional)
     * @param digest Is contained if and only if the \"Signature\" element is contained in the header of the request. (optional)
     * @param signature A signature of the request by the TPP on application level. This might be mandated by ASPSP.  (optional)
     * @param tpPSignatureCertificate The certificate used for signing the request, in base64 encoding.  Must be contained if a signature is contained.  (optional)
     * @param PSU_ID Client ID of the PSU in the ASPSP client interface.   Might be mandated in the ASPSP's documentation.  It might be contained even if an OAuth2 based authentication was performed in a pre-step or an OAuth2 based SCA was performed in an preceding AIS service in the same session. In this case the ASPSP might check whether PSU-ID and token match,  according to ASPSP documentation.  (optional)
     * @param psUIDType Type of the PSU-ID, needed in scenarios where PSUs have several PSU-IDs as access possibility.  In this case, the mean and use are then defined in the ASPSP’s documentation.  (optional)
     * @param psUCorporateID Might be mandated in the ASPSP's documentation. Only used in a corporate context.  (optional)
     * @param psUCorporateIDType Might be mandated in the ASPSP's documentation. Only used in a corporate context.  (optional)
     * @param tpPRedirectPreferred If it equals \"true\", the TPP prefers a redirect over an embedded SCA approach. If it equals \"false\", the TPP prefers not to be redirected for SCA. The ASPSP will then choose between the Embedded or the Decoupled SCA approach, depending on the choice of the SCA procedure by the TPP/PSU. If the parameter is not used, the ASPSP will choose the SCA approach to be applied depending on the SCA method chosen by the TPP/PSU.  (optional)
     * @param tpPRedirectURI URI of the TPP, where the transaction flow shall be redirected to after a Redirect.  Mandated for the Redirect SCA Approach, specifically  when TPP-Redirect-Preferred equals \"true\". It is recommended to always use this header field.  **Remark for Future:**  This field might be changed to mandatory in the next version of the specification.  (optional)
     * @param tpPNokRedirectURI If this URI is contained, the TPP is asking to redirect the transaction flow to this address instead of the TPP-Redirect-URI in case of a negative result of the redirect SCA method. This might be ignored by the ASPSP.  (optional)
     * @param tpPExplicitAuthorisationPreferred If it equals \"true\", the TPP prefers to start the authorisation process separately,  e.g. because of the usage of a signing basket.  This preference might be ignored by the ASPSP, if a signing basket is not supported as functionality.  If it equals \"false\" or if the parameter is not used, there is no preference of the TPP.  This especially indicates that the TPP assumes a direct authorisation of the transaction in the next step,  without using a signing basket.  (optional)
     * @param tpPNotificationURI URI for the Endpoint of the TPP-API to which the status of the payment initiation should be sent. This header field may by ignored by the ASPSP.  For security reasons, it shall be ensured that the TPP-Notification-URI as introduced above is secured by the TPP eIDAS QWAC used for identification of the TPP. The following applies:  URIs which are provided by TPPs in TPP-Notification-URI shall comply with the domain secured by the eIDAS QWAC certificate of the TPP in the field CN or SubjectAltName of the certificate. Please note that in case of example-TPP.com as certificate entry TPP- Notification-URI like www.example-TPP.com/xs2a-client/v1/ASPSPidentifcation/mytransaction- id/notifications or notifications.example-TPP.com/xs2a-client/v1/ASPSPidentifcation/mytransaction- id/notifications would be compliant.  Wildcard definitions shall be taken into account for compliance checks by the ASPSP.  ASPSPs may respond with ASPSP-Notification-Support set to false, if the provided URIs do not comply.  (optional)
     * @param tpPNotificationContentPreferred The string has the form   status=X1, ..., Xn  where Xi is one of the constants SCA, PROCESS, LAST and where constants are not repeated. The usage of the constants supports the of following semantics:    SCA: A notification on every change of the scaStatus attribute for all related authorisation processes is preferred by the TPP.    PROCESS: A notification on all changes of consentStatus or transactionStatus attributes is preferred by the TPP.   LAST: Only a notification on the last consentStatus or transactionStatus as available in the XS2A interface is preferred by the TPP.  This header field may be ignored, if the ASPSP does not support resource notification services for the related TPP.  (optional)
     * @param psUIPAddress The forwarded IP Address header field consists of the corresponding HTTP request  IP Address field between PSU and TPP.  It shall be contained if and only if this request was actively initiated by the PSU.  (optional)
     * @param psUIPPort The forwarded IP Port header field consists of the corresponding HTTP request IP Port field between PSU and TPP, if available.  (optional)
     * @param psUAccept The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available.  (optional)
     * @param psUAcceptCharset The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available.  (optional)
     * @param psUAcceptEncoding The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available.  (optional)
     * @param psUAcceptLanguage The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available.  (optional)
     * @param psUUserAgent The forwarded Agent header field of the HTTP request between PSU and TPP, if available.  (optional)
     * @param psUHttpMethod HTTP method used at the PSU ? TPP interface, if available. Valid values are: * GET * POST * PUT * PATCH * DELETE  (optional)
     * @param psUDeviceID UUID (Universally Unique Identifier) for a device, which is used by the PSU, if available. UUID identifies either a device or a device dependant application installation. In case of an installation identification this ID need to be unaltered until removal from device.  (optional)
     * @param psUGeoLocation The forwarded Geo Location of the corresponding http request between PSU and TPP if available.  (optional)
     * @return ConsentsResponse201
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public ConsentsResponse201 createConsent(UUID xRequestID, Consents body, String X_GTW_ASPSP_ID, String xGTWBankCode, String X_GTW_BIC, String digest, String signature, byte[] tpPSignatureCertificate, String PSU_ID, String psUIDType, String psUCorporateID, String psUCorporateIDType, String tpPRedirectPreferred, String tpPRedirectURI, String tpPNokRedirectURI, String tpPExplicitAuthorisationPreferred, String tpPNotificationURI, String tpPNotificationContentPreferred, String psUIPAddress, String psUIPPort, String psUAccept, String psUAcceptCharset, String psUAcceptEncoding, String psUAcceptLanguage, String psUUserAgent, String psUHttpMethod, UUID psUDeviceID, String psUGeoLocation) throws ApiException {
        ApiResponse resp = createConsentWithHttpInfo(xRequestID, body, X_GTW_ASPSP_ID, xGTWBankCode, X_GTW_BIC, digest, signature, tpPSignatureCertificate, PSU_ID, psUIDType, psUCorporateID, psUCorporateIDType, tpPRedirectPreferred, tpPRedirectURI, tpPNokRedirectURI, tpPExplicitAuthorisationPreferred, tpPNotificationURI, tpPNotificationContentPreferred, psUIPAddress, psUIPPort, psUAccept, psUAcceptCharset, psUAcceptEncoding, psUAcceptLanguage, psUUserAgent, psUHttpMethod, psUDeviceID, psUGeoLocation);
        return resp.getData();
    }

    /**
     * Create consent
     * This method create a consent resource, defining access rights to dedicated accounts of  a given PSU-ID. These accounts are addressed explicitly in the method as  parameters as a core function.  **Side Effects** When this Consent Request is a request where the \"recurringIndicator\" equals \"true\",  and if it exists already a former consent for recurring access on account information  for the addressed PSU, then the former consent automatically expires as soon as the new  consent request is authorised by the PSU.  Optional Extension: As an option, an ASPSP might optionally accept a specific access right on the access on all psd2 related services for all available accounts.   As another option an ASPSP might optionally also accept a command, where only access rights are inserted without mentioning the addressed account.  The relation to accounts is then handled afterwards between PSU and ASPSP.  This option is not supported for the Embedded SCA Approach.  As a last option, an ASPSP might in addition accept a command with access rights   * to see the list of available payment accounts or   * to see the list of available payment accounts with balances. 
     * @param xRequestID ID of the request, unique to the call, as determined by the initiating party. (required)
     * @param body Requestbody for a consents request
 (optional)
     * @param X_GTW_ASPSP_ID ASPSP ID in the registry for the request routing (optional)
     * @param xGTWBankCode Bank code of bank to which the request addressed (optional)
     * @param X_GTW_BIC Business Identifier Code for the request routing (optional)
     * @param digest Is contained if and only if the \"Signature\" element is contained in the header of the request. (optional)
     * @param signature A signature of the request by the TPP on application level. This might be mandated by ASPSP.  (optional)
     * @param tpPSignatureCertificate The certificate used for signing the request, in base64 encoding.  Must be contained if a signature is contained.  (optional)
     * @param PSU_ID Client ID of the PSU in the ASPSP client interface.   Might be mandated in the ASPSP's documentation.  It might be contained even if an OAuth2 based authentication was performed in a pre-step or an OAuth2 based SCA was performed in an preceding AIS service in the same session. In this case the ASPSP might check whether PSU-ID and token match,  according to ASPSP documentation.  (optional)
     * @param psUIDType Type of the PSU-ID, needed in scenarios where PSUs have several PSU-IDs as access possibility.  In this case, the mean and use are then defined in the ASPSP’s documentation.  (optional)
     * @param psUCorporateID Might be mandated in the ASPSP's documentation. Only used in a corporate context.  (optional)
     * @param psUCorporateIDType Might be mandated in the ASPSP's documentation. Only used in a corporate context.  (optional)
     * @param tpPRedirectPreferred If it equals \"true\", the TPP prefers a redirect over an embedded SCA approach. If it equals \"false\", the TPP prefers not to be redirected for SCA. The ASPSP will then choose between the Embedded or the Decoupled SCA approach, depending on the choice of the SCA procedure by the TPP/PSU. If the parameter is not used, the ASPSP will choose the SCA approach to be applied depending on the SCA method chosen by the TPP/PSU.  (optional)
     * @param tpPRedirectURI URI of the TPP, where the transaction flow shall be redirected to after a Redirect.  Mandated for the Redirect SCA Approach, specifically  when TPP-Redirect-Preferred equals \"true\". It is recommended to always use this header field.  **Remark for Future:**  This field might be changed to mandatory in the next version of the specification.  (optional)
     * @param tpPNokRedirectURI If this URI is contained, the TPP is asking to redirect the transaction flow to this address instead of the TPP-Redirect-URI in case of a negative result of the redirect SCA method. This might be ignored by the ASPSP.  (optional)
     * @param tpPExplicitAuthorisationPreferred If it equals \"true\", the TPP prefers to start the authorisation process separately,  e.g. because of the usage of a signing basket.  This preference might be ignored by the ASPSP, if a signing basket is not supported as functionality.  If it equals \"false\" or if the parameter is not used, there is no preference of the TPP.  This especially indicates that the TPP assumes a direct authorisation of the transaction in the next step,  without using a signing basket.  (optional)
     * @param tpPNotificationURI URI for the Endpoint of the TPP-API to which the status of the payment initiation should be sent. This header field may by ignored by the ASPSP.  For security reasons, it shall be ensured that the TPP-Notification-URI as introduced above is secured by the TPP eIDAS QWAC used for identification of the TPP. The following applies:  URIs which are provided by TPPs in TPP-Notification-URI shall comply with the domain secured by the eIDAS QWAC certificate of the TPP in the field CN or SubjectAltName of the certificate. Please note that in case of example-TPP.com as certificate entry TPP- Notification-URI like www.example-TPP.com/xs2a-client/v1/ASPSPidentifcation/mytransaction- id/notifications or notifications.example-TPP.com/xs2a-client/v1/ASPSPidentifcation/mytransaction- id/notifications would be compliant.  Wildcard definitions shall be taken into account for compliance checks by the ASPSP.  ASPSPs may respond with ASPSP-Notification-Support set to false, if the provided URIs do not comply.  (optional)
     * @param tpPNotificationContentPreferred The string has the form   status=X1, ..., Xn  where Xi is one of the constants SCA, PROCESS, LAST and where constants are not repeated. The usage of the constants supports the of following semantics:    SCA: A notification on every change of the scaStatus attribute for all related authorisation processes is preferred by the TPP.    PROCESS: A notification on all changes of consentStatus or transactionStatus attributes is preferred by the TPP.   LAST: Only a notification on the last consentStatus or transactionStatus as available in the XS2A interface is preferred by the TPP.  This header field may be ignored, if the ASPSP does not support resource notification services for the related TPP.  (optional)
     * @param psUIPAddress The forwarded IP Address header field consists of the corresponding HTTP request  IP Address field between PSU and TPP.  It shall be contained if and only if this request was actively initiated by the PSU.  (optional)
     * @param psUIPPort The forwarded IP Port header field consists of the corresponding HTTP request IP Port field between PSU and TPP, if available.  (optional)
     * @param psUAccept The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available.  (optional)
     * @param psUAcceptCharset The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available.  (optional)
     * @param psUAcceptEncoding The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available.  (optional)
     * @param psUAcceptLanguage The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available.  (optional)
     * @param psUUserAgent The forwarded Agent header field of the HTTP request between PSU and TPP, if available.  (optional)
     * @param psUHttpMethod HTTP method used at the PSU ? TPP interface, if available. Valid values are: * GET * POST * PUT * PATCH * DELETE  (optional)
     * @param psUDeviceID UUID (Universally Unique Identifier) for a device, which is used by the PSU, if available. UUID identifies either a device or a device dependant application installation. In case of an installation identification this ID need to be unaltered until removal from device.  (optional)
     * @param psUGeoLocation The forwarded Geo Location of the corresponding http request between PSU and TPP if available.  (optional)
     * @return ApiResponse<ConsentsResponse201>
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public ApiResponse createConsentWithHttpInfo(UUID xRequestID, Consents body, String X_GTW_ASPSP_ID, String xGTWBankCode, String X_GTW_BIC, String digest, String signature, byte[] tpPSignatureCertificate, String PSU_ID, String psUIDType, String psUCorporateID, String psUCorporateIDType, String tpPRedirectPreferred, String tpPRedirectURI, String tpPNokRedirectURI, String tpPExplicitAuthorisationPreferred, String tpPNotificationURI, String tpPNotificationContentPreferred, String psUIPAddress, String psUIPPort, String psUAccept, String psUAcceptCharset, String psUAcceptEncoding, String psUAcceptLanguage, String psUUserAgent, String psUHttpMethod, UUID psUDeviceID, String psUGeoLocation) throws ApiException {
        com.squareup.okhttp.Call call = createConsentValidateBeforeCall(xRequestID, body, X_GTW_ASPSP_ID, xGTWBankCode, X_GTW_BIC, digest, signature, tpPSignatureCertificate, PSU_ID, psUIDType, psUCorporateID, psUCorporateIDType, tpPRedirectPreferred, tpPRedirectURI, tpPNokRedirectURI, tpPExplicitAuthorisationPreferred, tpPNotificationURI, tpPNotificationContentPreferred, psUIPAddress, psUIPPort, psUAccept, psUAcceptCharset, psUAcceptEncoding, psUAcceptLanguage, psUUserAgent, psUHttpMethod, psUDeviceID, psUGeoLocation, null, null);
        Type localVarReturnType = new TypeToken(){}.getType();
        return apiClient.execute(call, localVarReturnType);
    }

    /**
     * Create consent (asynchronously)
     * This method create a consent resource, defining access rights to dedicated accounts of  a given PSU-ID. These accounts are addressed explicitly in the method as  parameters as a core function.  **Side Effects** When this Consent Request is a request where the \"recurringIndicator\" equals \"true\",  and if it exists already a former consent for recurring access on account information  for the addressed PSU, then the former consent automatically expires as soon as the new  consent request is authorised by the PSU.  Optional Extension: As an option, an ASPSP might optionally accept a specific access right on the access on all psd2 related services for all available accounts.   As another option an ASPSP might optionally also accept a command, where only access rights are inserted without mentioning the addressed account.  The relation to accounts is then handled afterwards between PSU and ASPSP.  This option is not supported for the Embedded SCA Approach.  As a last option, an ASPSP might in addition accept a command with access rights   * to see the list of available payment accounts or   * to see the list of available payment accounts with balances. 
     * @param xRequestID ID of the request, unique to the call, as determined by the initiating party. (required)
     * @param body Requestbody for a consents request
 (optional)
     * @param X_GTW_ASPSP_ID ASPSP ID in the registry for the request routing (optional)
     * @param xGTWBankCode Bank code of bank to which the request addressed (optional)
     * @param X_GTW_BIC Business Identifier Code for the request routing (optional)
     * @param digest Is contained if and only if the \"Signature\" element is contained in the header of the request. (optional)
     * @param signature A signature of the request by the TPP on application level. This might be mandated by ASPSP.  (optional)
     * @param tpPSignatureCertificate The certificate used for signing the request, in base64 encoding.  Must be contained if a signature is contained.  (optional)
     * @param PSU_ID Client ID of the PSU in the ASPSP client interface.   Might be mandated in the ASPSP's documentation.  It might be contained even if an OAuth2 based authentication was performed in a pre-step or an OAuth2 based SCA was performed in an preceding AIS service in the same session. In this case the ASPSP might check whether PSU-ID and token match,  according to ASPSP documentation.  (optional)
     * @param psUIDType Type of the PSU-ID, needed in scenarios where PSUs have several PSU-IDs as access possibility.  In this case, the mean and use are then defined in the ASPSP’s documentation.  (optional)
     * @param psUCorporateID Might be mandated in the ASPSP's documentation. Only used in a corporate context.  (optional)
     * @param psUCorporateIDType Might be mandated in the ASPSP's documentation. Only used in a corporate context.  (optional)
     * @param tpPRedirectPreferred If it equals \"true\", the TPP prefers a redirect over an embedded SCA approach. If it equals \"false\", the TPP prefers not to be redirected for SCA. The ASPSP will then choose between the Embedded or the Decoupled SCA approach, depending on the choice of the SCA procedure by the TPP/PSU. If the parameter is not used, the ASPSP will choose the SCA approach to be applied depending on the SCA method chosen by the TPP/PSU.  (optional)
     * @param tpPRedirectURI URI of the TPP, where the transaction flow shall be redirected to after a Redirect.  Mandated for the Redirect SCA Approach, specifically  when TPP-Redirect-Preferred equals \"true\". It is recommended to always use this header field.  **Remark for Future:**  This field might be changed to mandatory in the next version of the specification.  (optional)
     * @param tpPNokRedirectURI If this URI is contained, the TPP is asking to redirect the transaction flow to this address instead of the TPP-Redirect-URI in case of a negative result of the redirect SCA method. This might be ignored by the ASPSP.  (optional)
     * @param tpPExplicitAuthorisationPreferred If it equals \"true\", the TPP prefers to start the authorisation process separately,  e.g. because of the usage of a signing basket.  This preference might be ignored by the ASPSP, if a signing basket is not supported as functionality.  If it equals \"false\" or if the parameter is not used, there is no preference of the TPP.  This especially indicates that the TPP assumes a direct authorisation of the transaction in the next step,  without using a signing basket.  (optional)
     * @param tpPNotificationURI URI for the Endpoint of the TPP-API to which the status of the payment initiation should be sent. This header field may by ignored by the ASPSP.  For security reasons, it shall be ensured that the TPP-Notification-URI as introduced above is secured by the TPP eIDAS QWAC used for identification of the TPP. The following applies:  URIs which are provided by TPPs in TPP-Notification-URI shall comply with the domain secured by the eIDAS QWAC certificate of the TPP in the field CN or SubjectAltName of the certificate. Please note that in case of example-TPP.com as certificate entry TPP- Notification-URI like www.example-TPP.com/xs2a-client/v1/ASPSPidentifcation/mytransaction- id/notifications or notifications.example-TPP.com/xs2a-client/v1/ASPSPidentifcation/mytransaction- id/notifications would be compliant.  Wildcard definitions shall be taken into account for compliance checks by the ASPSP.  ASPSPs may respond with ASPSP-Notification-Support set to false, if the provided URIs do not comply.  (optional)
     * @param tpPNotificationContentPreferred The string has the form   status=X1, ..., Xn  where Xi is one of the constants SCA, PROCESS, LAST and where constants are not repeated. The usage of the constants supports the of following semantics:    SCA: A notification on every change of the scaStatus attribute for all related authorisation processes is preferred by the TPP.    PROCESS: A notification on all changes of consentStatus or transactionStatus attributes is preferred by the TPP.   LAST: Only a notification on the last consentStatus or transactionStatus as available in the XS2A interface is preferred by the TPP.  This header field may be ignored, if the ASPSP does not support resource notification services for the related TPP.  (optional)
     * @param psUIPAddress The forwarded IP Address header field consists of the corresponding HTTP request  IP Address field between PSU and TPP.  It shall be contained if and only if this request was actively initiated by the PSU.  (optional)
     * @param psUIPPort The forwarded IP Port header field consists of the corresponding HTTP request IP Port field between PSU and TPP, if available.  (optional)
     * @param psUAccept The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available.  (optional)
     * @param psUAcceptCharset The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available.  (optional)
     * @param psUAcceptEncoding The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available.  (optional)
     * @param psUAcceptLanguage The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available.  (optional)
     * @param psUUserAgent The forwarded Agent header field of the HTTP request between PSU and TPP, if available.  (optional)
     * @param psUHttpMethod HTTP method used at the PSU ? TPP interface, if available. Valid values are: * GET * POST * PUT * PATCH * DELETE  (optional)
     * @param psUDeviceID UUID (Universally Unique Identifier) for a device, which is used by the PSU, if available. UUID identifies either a device or a device dependant application installation. In case of an installation identification this ID need to be unaltered until removal from device.  (optional)
     * @param psUGeoLocation The forwarded Geo Location of the corresponding http request between PSU and TPP if available.  (optional)
     * @param callback The callback to be executed when the API call finishes
     * @return The request call
     * @throws ApiException If fail to process the API call, e.g. serializing the request body object
     */
    public com.squareup.okhttp.Call createConsentAsync(UUID xRequestID, Consents body, String X_GTW_ASPSP_ID, String xGTWBankCode, String X_GTW_BIC, String digest, String signature, byte[] tpPSignatureCertificate, String PSU_ID, String psUIDType, String psUCorporateID, String psUCorporateIDType, String tpPRedirectPreferred, String tpPRedirectURI, String tpPNokRedirectURI, String tpPExplicitAuthorisationPreferred, String tpPNotificationURI, String tpPNotificationContentPreferred, String psUIPAddress, String psUIPPort, String psUAccept, String psUAcceptCharset, String psUAcceptEncoding, String psUAcceptLanguage, String psUUserAgent, String psUHttpMethod, UUID psUDeviceID, String psUGeoLocation, final ApiCallback callback) throws ApiException {

        ProgressResponseBody.ProgressListener progressListener = null;
        ProgressRequestBody.ProgressRequestListener progressRequestListener = null;

        if (callback != null) {
            progressListener = new ProgressResponseBody.ProgressListener() {
                @Override
                public void update(long bytesRead, long contentLength, boolean done) {
                    callback.onDownloadProgress(bytesRead, contentLength, done);
                }
            };

            progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
                @Override
                public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
                    callback.onUploadProgress(bytesWritten, contentLength, done);
                }
            };
        }

        com.squareup.okhttp.Call call = createConsentValidateBeforeCall(xRequestID, body, X_GTW_ASPSP_ID, xGTWBankCode, X_GTW_BIC, digest, signature, tpPSignatureCertificate, PSU_ID, psUIDType, psUCorporateID, psUCorporateIDType, tpPRedirectPreferred, tpPRedirectURI, tpPNokRedirectURI, tpPExplicitAuthorisationPreferred, tpPNotificationURI, tpPNotificationContentPreferred, psUIPAddress, psUIPPort, psUAccept, psUAcceptCharset, psUAcceptEncoding, psUAcceptLanguage, psUUserAgent, psUHttpMethod, psUDeviceID, psUGeoLocation, progressListener, progressRequestListener);
        Type localVarReturnType = new TypeToken(){}.getType();
        apiClient.executeAsync(call, localVarReturnType, callback);
        return call;
    }
    /**
     * Build call for deleteConsent
     * @param consentId ID of the corresponding consent object as returned by an Account Information Consent Request.  (required)
     * @param xRequestID ID of the request, unique to the call, as determined by the initiating party. (required)
     * @param X_GTW_ASPSP_ID ASPSP ID in the registry for the request routing (optional)
     * @param xGTWBankCode Bank code of bank to which the request addressed (optional)
     * @param X_GTW_BIC Business Identifier Code for the request routing (optional)
     * @param digest Is contained if and only if the \"Signature\" element is contained in the header of the request. (optional)
     * @param signature A signature of the request by the TPP on application level. This might be mandated by ASPSP.  (optional)
     * @param tpPSignatureCertificate The certificate used for signing the request, in base64 encoding.  Must be contained if a signature is contained.  (optional)
     * @param psUIPAddress The forwarded IP Address header field consists of the corresponding HTTP request  IP Address field between PSU and TPP.  It shall be contained if and only if this request was actively initiated by the PSU.  (optional)
     * @param psUIPPort The forwarded IP Port header field consists of the corresponding HTTP request IP Port field between PSU and TPP, if available.  (optional)
     * @param psUAccept The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available.  (optional)
     * @param psUAcceptCharset The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available.  (optional)
     * @param psUAcceptEncoding The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available.  (optional)
     * @param psUAcceptLanguage The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available.  (optional)
     * @param psUUserAgent The forwarded Agent header field of the HTTP request between PSU and TPP, if available.  (optional)
     * @param psUHttpMethod HTTP method used at the PSU ? TPP interface, if available. Valid values are: * GET * POST * PUT * PATCH * DELETE  (optional)
     * @param psUDeviceID UUID (Universally Unique Identifier) for a device, which is used by the PSU, if available. UUID identifies either a device or a device dependant application installation. In case of an installation identification this ID need to be unaltered until removal from device.  (optional)
     * @param psUGeoLocation The forwarded Geo Location of the corresponding http request between PSU and TPP if available.  (optional)
     * @param progressListener Progress listener
     * @param progressRequestListener Progress request listener
     * @return Call to execute
     * @throws ApiException If fail to serialize the request body object
     */
    public com.squareup.okhttp.Call deleteConsentCall(String consentId, UUID xRequestID, String X_GTW_ASPSP_ID, String xGTWBankCode, String X_GTW_BIC, String digest, String signature, byte[] tpPSignatureCertificate, String psUIPAddress, String psUIPPort, String psUAccept, String psUAcceptCharset, String psUAcceptEncoding, String psUAcceptLanguage, String psUUserAgent, String psUHttpMethod, UUID psUDeviceID, String psUGeoLocation, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
        Object localVarPostBody = null;
        
        // create path and map variables
        String localVarPath = "/v1/consents/{consentId}"
            .replaceAll("\\{" + "consentId" + "\\}", apiClient.escapeString(consentId.toString()));

        List localVarQueryParams = new ArrayList();
        List localVarCollectionQueryParams = new ArrayList();

        Map localVarHeaderParams = new HashMap();
        if (X_GTW_ASPSP_ID != null)
        localVarHeaderParams.put("X-GTW-ASPSP-ID", apiClient.parameterToString(X_GTW_ASPSP_ID));
        if (xGTWBankCode != null)
        localVarHeaderParams.put("X-GTW-Bank-Code", apiClient.parameterToString(xGTWBankCode));
        if (X_GTW_BIC != null)
        localVarHeaderParams.put("X-GTW-BIC", apiClient.parameterToString(X_GTW_BIC));
        if (xRequestID != null)
        localVarHeaderParams.put("X-Request-ID", apiClient.parameterToString(xRequestID));
        if (digest != null)
        localVarHeaderParams.put("Digest", apiClient.parameterToString(digest));
        if (signature != null)
        localVarHeaderParams.put("Signature", apiClient.parameterToString(signature));
        if (tpPSignatureCertificate != null)
        localVarHeaderParams.put("TPP-Signature-Certificate", apiClient.parameterToString(tpPSignatureCertificate));
        if (psUIPAddress != null)
        localVarHeaderParams.put("PSU-IP-Address", apiClient.parameterToString(psUIPAddress));
        if (psUIPPort != null)
        localVarHeaderParams.put("PSU-IP-Port", apiClient.parameterToString(psUIPPort));
        if (psUAccept != null)
        localVarHeaderParams.put("PSU-Accept", apiClient.parameterToString(psUAccept));
        if (psUAcceptCharset != null)
        localVarHeaderParams.put("PSU-Accept-Charset", apiClient.parameterToString(psUAcceptCharset));
        if (psUAcceptEncoding != null)
        localVarHeaderParams.put("PSU-Accept-Encoding", apiClient.parameterToString(psUAcceptEncoding));
        if (psUAcceptLanguage != null)
        localVarHeaderParams.put("PSU-Accept-Language", apiClient.parameterToString(psUAcceptLanguage));
        if (psUUserAgent != null)
        localVarHeaderParams.put("PSU-User-Agent", apiClient.parameterToString(psUUserAgent));
        if (psUHttpMethod != null)
        localVarHeaderParams.put("PSU-Http-Method", apiClient.parameterToString(psUHttpMethod));
        if (psUDeviceID != null)
        localVarHeaderParams.put("PSU-Device-ID", apiClient.parameterToString(psUDeviceID));
        if (psUGeoLocation != null)
        localVarHeaderParams.put("PSU-Geo-Location", apiClient.parameterToString(psUGeoLocation));

        Map localVarFormParams = new HashMap();

        final String[] localVarAccepts = {
            "application/json", "application/problem+json"
        };
        final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
        if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);

        final String[] localVarContentTypes = {
            
        };
        final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
        localVarHeaderParams.put("Content-Type", localVarContentType);

        if(progressListener != null) {
            apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
                @Override
                public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
                    com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
                    return originalResponse.newBuilder()
                    .body(new ProgressResponseBody(originalResponse.body(), progressListener))
                    .build();
                }
            });
        }

        String[] localVarAuthNames = new String[] { "BearerAuthOAuth" };
        return apiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
    }
    
    @SuppressWarnings("rawtypes")
    private com.squareup.okhttp.Call deleteConsentValidateBeforeCall(String consentId, UUID xRequestID, String X_GTW_ASPSP_ID, String xGTWBankCode, String X_GTW_BIC, String digest, String signature, byte[] tpPSignatureCertificate, String psUIPAddress, String psUIPPort, String psUAccept, String psUAcceptCharset, String psUAcceptEncoding, String psUAcceptLanguage, String psUUserAgent, String psUHttpMethod, UUID psUDeviceID, String psUGeoLocation, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
        // verify the required parameter 'consentId' is set
        if (consentId == null) {
            throw new ApiException("Missing the required parameter 'consentId' when calling deleteConsent(Async)");
        }
        // verify the required parameter 'xRequestID' is set
        if (xRequestID == null) {
            throw new ApiException("Missing the required parameter 'xRequestID' when calling deleteConsent(Async)");
        }
        
        com.squareup.okhttp.Call call = deleteConsentCall(consentId, xRequestID, X_GTW_ASPSP_ID, xGTWBankCode, X_GTW_BIC, digest, signature, tpPSignatureCertificate, psUIPAddress, psUIPPort, psUAccept, psUAcceptCharset, psUAcceptEncoding, psUAcceptLanguage, psUUserAgent, psUHttpMethod, psUDeviceID, psUGeoLocation, progressListener, progressRequestListener);
        return call;

        
        
        
        
    }

    /**
     * Delete Consent
     * The TPP can delete an account information consent object if needed.
     * @param consentId ID of the corresponding consent object as returned by an Account Information Consent Request.  (required)
     * @param xRequestID ID of the request, unique to the call, as determined by the initiating party. (required)
     * @param X_GTW_ASPSP_ID ASPSP ID in the registry for the request routing (optional)
     * @param xGTWBankCode Bank code of bank to which the request addressed (optional)
     * @param X_GTW_BIC Business Identifier Code for the request routing (optional)
     * @param digest Is contained if and only if the \"Signature\" element is contained in the header of the request. (optional)
     * @param signature A signature of the request by the TPP on application level. This might be mandated by ASPSP.  (optional)
     * @param tpPSignatureCertificate The certificate used for signing the request, in base64 encoding.  Must be contained if a signature is contained.  (optional)
     * @param psUIPAddress The forwarded IP Address header field consists of the corresponding HTTP request  IP Address field between PSU and TPP.  It shall be contained if and only if this request was actively initiated by the PSU.  (optional)
     * @param psUIPPort The forwarded IP Port header field consists of the corresponding HTTP request IP Port field between PSU and TPP, if available.  (optional)
     * @param psUAccept The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available.  (optional)
     * @param psUAcceptCharset The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available.  (optional)
     * @param psUAcceptEncoding The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available.  (optional)
     * @param psUAcceptLanguage The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available.  (optional)
     * @param psUUserAgent The forwarded Agent header field of the HTTP request between PSU and TPP, if available.  (optional)
     * @param psUHttpMethod HTTP method used at the PSU ? TPP interface, if available. Valid values are: * GET * POST * PUT * PATCH * DELETE  (optional)
     * @param psUDeviceID UUID (Universally Unique Identifier) for a device, which is used by the PSU, if available. UUID identifies either a device or a device dependant application installation. In case of an installation identification this ID need to be unaltered until removal from device.  (optional)
     * @param psUGeoLocation The forwarded Geo Location of the corresponding http request between PSU and TPP if available.  (optional)
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public void deleteConsent(String consentId, UUID xRequestID, String X_GTW_ASPSP_ID, String xGTWBankCode, String X_GTW_BIC, String digest, String signature, byte[] tpPSignatureCertificate, String psUIPAddress, String psUIPPort, String psUAccept, String psUAcceptCharset, String psUAcceptEncoding, String psUAcceptLanguage, String psUUserAgent, String psUHttpMethod, UUID psUDeviceID, String psUGeoLocation) throws ApiException {
        deleteConsentWithHttpInfo(consentId, xRequestID, X_GTW_ASPSP_ID, xGTWBankCode, X_GTW_BIC, digest, signature, tpPSignatureCertificate, psUIPAddress, psUIPPort, psUAccept, psUAcceptCharset, psUAcceptEncoding, psUAcceptLanguage, psUUserAgent, psUHttpMethod, psUDeviceID, psUGeoLocation);
    }

    /**
     * Delete Consent
     * The TPP can delete an account information consent object if needed.
     * @param consentId ID of the corresponding consent object as returned by an Account Information Consent Request.  (required)
     * @param xRequestID ID of the request, unique to the call, as determined by the initiating party. (required)
     * @param X_GTW_ASPSP_ID ASPSP ID in the registry for the request routing (optional)
     * @param xGTWBankCode Bank code of bank to which the request addressed (optional)
     * @param X_GTW_BIC Business Identifier Code for the request routing (optional)
     * @param digest Is contained if and only if the \"Signature\" element is contained in the header of the request. (optional)
     * @param signature A signature of the request by the TPP on application level. This might be mandated by ASPSP.  (optional)
     * @param tpPSignatureCertificate The certificate used for signing the request, in base64 encoding.  Must be contained if a signature is contained.  (optional)
     * @param psUIPAddress The forwarded IP Address header field consists of the corresponding HTTP request  IP Address field between PSU and TPP.  It shall be contained if and only if this request was actively initiated by the PSU.  (optional)
     * @param psUIPPort The forwarded IP Port header field consists of the corresponding HTTP request IP Port field between PSU and TPP, if available.  (optional)
     * @param psUAccept The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available.  (optional)
     * @param psUAcceptCharset The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available.  (optional)
     * @param psUAcceptEncoding The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available.  (optional)
     * @param psUAcceptLanguage The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available.  (optional)
     * @param psUUserAgent The forwarded Agent header field of the HTTP request between PSU and TPP, if available.  (optional)
     * @param psUHttpMethod HTTP method used at the PSU ? TPP interface, if available. Valid values are: * GET * POST * PUT * PATCH * DELETE  (optional)
     * @param psUDeviceID UUID (Universally Unique Identifier) for a device, which is used by the PSU, if available. UUID identifies either a device or a device dependant application installation. In case of an installation identification this ID need to be unaltered until removal from device.  (optional)
     * @param psUGeoLocation The forwarded Geo Location of the corresponding http request between PSU and TPP if available.  (optional)
     * @return ApiResponse<Void>
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public ApiResponse deleteConsentWithHttpInfo(String consentId, UUID xRequestID, String X_GTW_ASPSP_ID, String xGTWBankCode, String X_GTW_BIC, String digest, String signature, byte[] tpPSignatureCertificate, String psUIPAddress, String psUIPPort, String psUAccept, String psUAcceptCharset, String psUAcceptEncoding, String psUAcceptLanguage, String psUUserAgent, String psUHttpMethod, UUID psUDeviceID, String psUGeoLocation) throws ApiException {
        com.squareup.okhttp.Call call = deleteConsentValidateBeforeCall(consentId, xRequestID, X_GTW_ASPSP_ID, xGTWBankCode, X_GTW_BIC, digest, signature, tpPSignatureCertificate, psUIPAddress, psUIPPort, psUAccept, psUAcceptCharset, psUAcceptEncoding, psUAcceptLanguage, psUUserAgent, psUHttpMethod, psUDeviceID, psUGeoLocation, null, null);
        return apiClient.execute(call);
    }

    /**
     * Delete Consent (asynchronously)
     * The TPP can delete an account information consent object if needed.
     * @param consentId ID of the corresponding consent object as returned by an Account Information Consent Request.  (required)
     * @param xRequestID ID of the request, unique to the call, as determined by the initiating party. (required)
     * @param X_GTW_ASPSP_ID ASPSP ID in the registry for the request routing (optional)
     * @param xGTWBankCode Bank code of bank to which the request addressed (optional)
     * @param X_GTW_BIC Business Identifier Code for the request routing (optional)
     * @param digest Is contained if and only if the \"Signature\" element is contained in the header of the request. (optional)
     * @param signature A signature of the request by the TPP on application level. This might be mandated by ASPSP.  (optional)
     * @param tpPSignatureCertificate The certificate used for signing the request, in base64 encoding.  Must be contained if a signature is contained.  (optional)
     * @param psUIPAddress The forwarded IP Address header field consists of the corresponding HTTP request  IP Address field between PSU and TPP.  It shall be contained if and only if this request was actively initiated by the PSU.  (optional)
     * @param psUIPPort The forwarded IP Port header field consists of the corresponding HTTP request IP Port field between PSU and TPP, if available.  (optional)
     * @param psUAccept The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available.  (optional)
     * @param psUAcceptCharset The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available.  (optional)
     * @param psUAcceptEncoding The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available.  (optional)
     * @param psUAcceptLanguage The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available.  (optional)
     * @param psUUserAgent The forwarded Agent header field of the HTTP request between PSU and TPP, if available.  (optional)
     * @param psUHttpMethod HTTP method used at the PSU ? TPP interface, if available. Valid values are: * GET * POST * PUT * PATCH * DELETE  (optional)
     * @param psUDeviceID UUID (Universally Unique Identifier) for a device, which is used by the PSU, if available. UUID identifies either a device or a device dependant application installation. In case of an installation identification this ID need to be unaltered until removal from device.  (optional)
     * @param psUGeoLocation The forwarded Geo Location of the corresponding http request between PSU and TPP if available.  (optional)
     * @param callback The callback to be executed when the API call finishes
     * @return The request call
     * @throws ApiException If fail to process the API call, e.g. serializing the request body object
     */
    public com.squareup.okhttp.Call deleteConsentAsync(String consentId, UUID xRequestID, String X_GTW_ASPSP_ID, String xGTWBankCode, String X_GTW_BIC, String digest, String signature, byte[] tpPSignatureCertificate, String psUIPAddress, String psUIPPort, String psUAccept, String psUAcceptCharset, String psUAcceptEncoding, String psUAcceptLanguage, String psUUserAgent, String psUHttpMethod, UUID psUDeviceID, String psUGeoLocation, final ApiCallback callback) throws ApiException {

        ProgressResponseBody.ProgressListener progressListener = null;
        ProgressRequestBody.ProgressRequestListener progressRequestListener = null;

        if (callback != null) {
            progressListener = new ProgressResponseBody.ProgressListener() {
                @Override
                public void update(long bytesRead, long contentLength, boolean done) {
                    callback.onDownloadProgress(bytesRead, contentLength, done);
                }
            };

            progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
                @Override
                public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
                    callback.onUploadProgress(bytesWritten, contentLength, done);
                }
            };
        }

        com.squareup.okhttp.Call call = deleteConsentValidateBeforeCall(consentId, xRequestID, X_GTW_ASPSP_ID, xGTWBankCode, X_GTW_BIC, digest, signature, tpPSignatureCertificate, psUIPAddress, psUIPPort, psUAccept, psUAcceptCharset, psUAcceptEncoding, psUAcceptLanguage, psUUserAgent, psUHttpMethod, psUDeviceID, psUGeoLocation, progressListener, progressRequestListener);
        apiClient.executeAsync(call, callback);
        return call;
    }
    /**
     * Build call for getAccountList
     * @param xRequestID ID of the request, unique to the call, as determined by the initiating party. (required)
     * @param consentID This then contains the consentId of the related AIS consent, which was performed prior to this payment initiation.  (required)
     * @param X_GTW_ASPSP_ID ASPSP ID in the registry for the request routing (optional)
     * @param xGTWBankCode Bank code of bank to which the request addressed (optional)
     * @param X_GTW_BIC Business Identifier Code for the request routing (optional)
     * @param withBalance If contained, this function reads the list of accessible payment accounts including the booking balance,  if granted by the PSU in the related consent and available by the ASPSP.  This parameter might be ignored by the ASPSP.   (optional)
     * @param digest Is contained if and only if the \"Signature\" element is contained in the header of the request. (optional)
     * @param signature A signature of the request by the TPP on application level. This might be mandated by ASPSP.  (optional)
     * @param tpPSignatureCertificate The certificate used for signing the request, in base64 encoding.  Must be contained if a signature is contained.  (optional)
     * @param psUIPAddress The forwarded IP Address header field consists of the corresponding HTTP request  IP Address field between PSU and TPP.  It shall be contained if and only if this request was actively initiated by the PSU.  (optional)
     * @param psUIPPort The forwarded IP Port header field consists of the corresponding HTTP request IP Port field between PSU and TPP, if available.  (optional)
     * @param psUAccept The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available.  (optional)
     * @param psUAcceptCharset The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available.  (optional)
     * @param psUAcceptEncoding The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available.  (optional)
     * @param psUAcceptLanguage The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available.  (optional)
     * @param psUUserAgent The forwarded Agent header field of the HTTP request between PSU and TPP, if available.  (optional)
     * @param psUHttpMethod HTTP method used at the PSU ? TPP interface, if available. Valid values are: * GET * POST * PUT * PATCH * DELETE  (optional)
     * @param psUDeviceID UUID (Universally Unique Identifier) for a device, which is used by the PSU, if available. UUID identifies either a device or a device dependant application installation. In case of an installation identification this ID need to be unaltered until removal from device.  (optional)
     * @param psUGeoLocation The forwarded Geo Location of the corresponding http request between PSU and TPP if available.  (optional)
     * @param progressListener Progress listener
     * @param progressRequestListener Progress request listener
     * @return Call to execute
     * @throws ApiException If fail to serialize the request body object
     */
    public com.squareup.okhttp.Call getAccountListCall(UUID xRequestID, String consentID, String X_GTW_ASPSP_ID, String xGTWBankCode, String X_GTW_BIC, Boolean withBalance, String digest, String signature, byte[] tpPSignatureCertificate, String psUIPAddress, String psUIPPort, String psUAccept, String psUAcceptCharset, String psUAcceptEncoding, String psUAcceptLanguage, String psUUserAgent, String psUHttpMethod, UUID psUDeviceID, String psUGeoLocation, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
        Object localVarPostBody = null;
        
        // create path and map variables
        String localVarPath = "/v1/accounts";

        List localVarQueryParams = new ArrayList();
        List localVarCollectionQueryParams = new ArrayList();
        if (withBalance != null)
        localVarQueryParams.addAll(apiClient.parameterToPair("withBalance", withBalance));

        Map localVarHeaderParams = new HashMap();
        if (X_GTW_ASPSP_ID != null)
        localVarHeaderParams.put("X-GTW-ASPSP-ID", apiClient.parameterToString(X_GTW_ASPSP_ID));
        if (xGTWBankCode != null)
        localVarHeaderParams.put("X-GTW-Bank-Code", apiClient.parameterToString(xGTWBankCode));
        if (X_GTW_BIC != null)
        localVarHeaderParams.put("X-GTW-BIC", apiClient.parameterToString(X_GTW_BIC));
        if (xRequestID != null)
        localVarHeaderParams.put("X-Request-ID", apiClient.parameterToString(xRequestID));
        if (digest != null)
        localVarHeaderParams.put("Digest", apiClient.parameterToString(digest));
        if (signature != null)
        localVarHeaderParams.put("Signature", apiClient.parameterToString(signature));
        if (tpPSignatureCertificate != null)
        localVarHeaderParams.put("TPP-Signature-Certificate", apiClient.parameterToString(tpPSignatureCertificate));
        if (consentID != null)
        localVarHeaderParams.put("Consent-ID", apiClient.parameterToString(consentID));
        if (psUIPAddress != null)
        localVarHeaderParams.put("PSU-IP-Address", apiClient.parameterToString(psUIPAddress));
        if (psUIPPort != null)
        localVarHeaderParams.put("PSU-IP-Port", apiClient.parameterToString(psUIPPort));
        if (psUAccept != null)
        localVarHeaderParams.put("PSU-Accept", apiClient.parameterToString(psUAccept));
        if (psUAcceptCharset != null)
        localVarHeaderParams.put("PSU-Accept-Charset", apiClient.parameterToString(psUAcceptCharset));
        if (psUAcceptEncoding != null)
        localVarHeaderParams.put("PSU-Accept-Encoding", apiClient.parameterToString(psUAcceptEncoding));
        if (psUAcceptLanguage != null)
        localVarHeaderParams.put("PSU-Accept-Language", apiClient.parameterToString(psUAcceptLanguage));
        if (psUUserAgent != null)
        localVarHeaderParams.put("PSU-User-Agent", apiClient.parameterToString(psUUserAgent));
        if (psUHttpMethod != null)
        localVarHeaderParams.put("PSU-Http-Method", apiClient.parameterToString(psUHttpMethod));
        if (psUDeviceID != null)
        localVarHeaderParams.put("PSU-Device-ID", apiClient.parameterToString(psUDeviceID));
        if (psUGeoLocation != null)
        localVarHeaderParams.put("PSU-Geo-Location", apiClient.parameterToString(psUGeoLocation));

        Map localVarFormParams = new HashMap();

        final String[] localVarAccepts = {
            "application/json", "application/problem+json"
        };
        final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
        if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);

        final String[] localVarContentTypes = {
            
        };
        final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
        localVarHeaderParams.put("Content-Type", localVarContentType);

        if(progressListener != null) {
            apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
                @Override
                public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
                    com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
                    return originalResponse.newBuilder()
                    .body(new ProgressResponseBody(originalResponse.body(), progressListener))
                    .build();
                }
            });
        }

        String[] localVarAuthNames = new String[] { "BearerAuthOAuth" };
        return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
    }
    
    @SuppressWarnings("rawtypes")
    private com.squareup.okhttp.Call getAccountListValidateBeforeCall(UUID xRequestID, String consentID, String X_GTW_ASPSP_ID, String xGTWBankCode, String X_GTW_BIC, Boolean withBalance, String digest, String signature, byte[] tpPSignatureCertificate, String psUIPAddress, String psUIPPort, String psUAccept, String psUAcceptCharset, String psUAcceptEncoding, String psUAcceptLanguage, String psUUserAgent, String psUHttpMethod, UUID psUDeviceID, String psUGeoLocation, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
        // verify the required parameter 'xRequestID' is set
        if (xRequestID == null) {
            throw new ApiException("Missing the required parameter 'xRequestID' when calling getAccountList(Async)");
        }
        // verify the required parameter 'consentID' is set
        if (consentID == null) {
            throw new ApiException("Missing the required parameter 'consentID' when calling getAccountList(Async)");
        }
        
        com.squareup.okhttp.Call call = getAccountListCall(xRequestID, consentID, X_GTW_ASPSP_ID, xGTWBankCode, X_GTW_BIC, withBalance, digest, signature, tpPSignatureCertificate, psUIPAddress, psUIPPort, psUAccept, psUAcceptCharset, psUAcceptEncoding, psUAcceptLanguage, psUUserAgent, psUHttpMethod, psUDeviceID, psUGeoLocation, progressListener, progressRequestListener);
        return call;

        
        
        
        
    }

    /**
     * Read Account List
     * Read the identifiers of the available payment account together with  booking balance information, depending on the consent granted.  It is assumed that a consent of the PSU to this access is already given and stored on the ASPSP system.  The addressed list of accounts depends then on the PSU ID and the stored consent addressed by consentId,  respectively the OAuth2 access token.   Returns all identifiers of the accounts, to which an account access has been granted to through  the /consents endpoint by the PSU.  In addition, relevant information about the accounts and hyperlinks to corresponding account  information resources are provided if a related consent has been already granted.  Remark: Note that the /consents endpoint optionally offers to grant an access on all available  payment accounts of a PSU.  In this case, this endpoint will deliver the information about all available payment accounts  of the PSU at this ASPSP. 
     * @param xRequestID ID of the request, unique to the call, as determined by the initiating party. (required)
     * @param consentID This then contains the consentId of the related AIS consent, which was performed prior to this payment initiation.  (required)
     * @param X_GTW_ASPSP_ID ASPSP ID in the registry for the request routing (optional)
     * @param xGTWBankCode Bank code of bank to which the request addressed (optional)
     * @param X_GTW_BIC Business Identifier Code for the request routing (optional)
     * @param withBalance If contained, this function reads the list of accessible payment accounts including the booking balance,  if granted by the PSU in the related consent and available by the ASPSP.  This parameter might be ignored by the ASPSP.   (optional)
     * @param digest Is contained if and only if the \"Signature\" element is contained in the header of the request. (optional)
     * @param signature A signature of the request by the TPP on application level. This might be mandated by ASPSP.  (optional)
     * @param tpPSignatureCertificate The certificate used for signing the request, in base64 encoding.  Must be contained if a signature is contained.  (optional)
     * @param psUIPAddress The forwarded IP Address header field consists of the corresponding HTTP request  IP Address field between PSU and TPP.  It shall be contained if and only if this request was actively initiated by the PSU.  (optional)
     * @param psUIPPort The forwarded IP Port header field consists of the corresponding HTTP request IP Port field between PSU and TPP, if available.  (optional)
     * @param psUAccept The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available.  (optional)
     * @param psUAcceptCharset The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available.  (optional)
     * @param psUAcceptEncoding The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available.  (optional)
     * @param psUAcceptLanguage The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available.  (optional)
     * @param psUUserAgent The forwarded Agent header field of the HTTP request between PSU and TPP, if available.  (optional)
     * @param psUHttpMethod HTTP method used at the PSU ? TPP interface, if available. Valid values are: * GET * POST * PUT * PATCH * DELETE  (optional)
     * @param psUDeviceID UUID (Universally Unique Identifier) for a device, which is used by the PSU, if available. UUID identifies either a device or a device dependant application installation. In case of an installation identification this ID need to be unaltered until removal from device.  (optional)
     * @param psUGeoLocation The forwarded Geo Location of the corresponding http request between PSU and TPP if available.  (optional)
     * @return AccountList
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public AccountList getAccountList(UUID xRequestID, String consentID, String X_GTW_ASPSP_ID, String xGTWBankCode, String X_GTW_BIC, Boolean withBalance, String digest, String signature, byte[] tpPSignatureCertificate, String psUIPAddress, String psUIPPort, String psUAccept, String psUAcceptCharset, String psUAcceptEncoding, String psUAcceptLanguage, String psUUserAgent, String psUHttpMethod, UUID psUDeviceID, String psUGeoLocation) throws ApiException {
        ApiResponse resp = getAccountListWithHttpInfo(xRequestID, consentID, X_GTW_ASPSP_ID, xGTWBankCode, X_GTW_BIC, withBalance, digest, signature, tpPSignatureCertificate, psUIPAddress, psUIPPort, psUAccept, psUAcceptCharset, psUAcceptEncoding, psUAcceptLanguage, psUUserAgent, psUHttpMethod, psUDeviceID, psUGeoLocation);
        return resp.getData();
    }

    /**
     * Read Account List
     * Read the identifiers of the available payment account together with  booking balance information, depending on the consent granted.  It is assumed that a consent of the PSU to this access is already given and stored on the ASPSP system.  The addressed list of accounts depends then on the PSU ID and the stored consent addressed by consentId,  respectively the OAuth2 access token.   Returns all identifiers of the accounts, to which an account access has been granted to through  the /consents endpoint by the PSU.  In addition, relevant information about the accounts and hyperlinks to corresponding account  information resources are provided if a related consent has been already granted.  Remark: Note that the /consents endpoint optionally offers to grant an access on all available  payment accounts of a PSU.  In this case, this endpoint will deliver the information about all available payment accounts  of the PSU at this ASPSP. 
     * @param xRequestID ID of the request, unique to the call, as determined by the initiating party. (required)
     * @param consentID This then contains the consentId of the related AIS consent, which was performed prior to this payment initiation.  (required)
     * @param X_GTW_ASPSP_ID ASPSP ID in the registry for the request routing (optional)
     * @param xGTWBankCode Bank code of bank to which the request addressed (optional)
     * @param X_GTW_BIC Business Identifier Code for the request routing (optional)
     * @param withBalance If contained, this function reads the list of accessible payment accounts including the booking balance,  if granted by the PSU in the related consent and available by the ASPSP.  This parameter might be ignored by the ASPSP.   (optional)
     * @param digest Is contained if and only if the \"Signature\" element is contained in the header of the request. (optional)
     * @param signature A signature of the request by the TPP on application level. This might be mandated by ASPSP.  (optional)
     * @param tpPSignatureCertificate The certificate used for signing the request, in base64 encoding.  Must be contained if a signature is contained.  (optional)
     * @param psUIPAddress The forwarded IP Address header field consists of the corresponding HTTP request  IP Address field between PSU and TPP.  It shall be contained if and only if this request was actively initiated by the PSU.  (optional)
     * @param psUIPPort The forwarded IP Port header field consists of the corresponding HTTP request IP Port field between PSU and TPP, if available.  (optional)
     * @param psUAccept The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available.  (optional)
     * @param psUAcceptCharset The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available.  (optional)
     * @param psUAcceptEncoding The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available.  (optional)
     * @param psUAcceptLanguage The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available.  (optional)
     * @param psUUserAgent The forwarded Agent header field of the HTTP request between PSU and TPP, if available.  (optional)
     * @param psUHttpMethod HTTP method used at the PSU ? TPP interface, if available. Valid values are: * GET * POST * PUT * PATCH * DELETE  (optional)
     * @param psUDeviceID UUID (Universally Unique Identifier) for a device, which is used by the PSU, if available. UUID identifies either a device or a device dependant application installation. In case of an installation identification this ID need to be unaltered until removal from device.  (optional)
     * @param psUGeoLocation The forwarded Geo Location of the corresponding http request between PSU and TPP if available.  (optional)
     * @return ApiResponse<AccountList>
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public ApiResponse getAccountListWithHttpInfo(UUID xRequestID, String consentID, String X_GTW_ASPSP_ID, String xGTWBankCode, String X_GTW_BIC, Boolean withBalance, String digest, String signature, byte[] tpPSignatureCertificate, String psUIPAddress, String psUIPPort, String psUAccept, String psUAcceptCharset, String psUAcceptEncoding, String psUAcceptLanguage, String psUUserAgent, String psUHttpMethod, UUID psUDeviceID, String psUGeoLocation) throws ApiException {
        com.squareup.okhttp.Call call = getAccountListValidateBeforeCall(xRequestID, consentID, X_GTW_ASPSP_ID, xGTWBankCode, X_GTW_BIC, withBalance, digest, signature, tpPSignatureCertificate, psUIPAddress, psUIPPort, psUAccept, psUAcceptCharset, psUAcceptEncoding, psUAcceptLanguage, psUUserAgent, psUHttpMethod, psUDeviceID, psUGeoLocation, null, null);
        Type localVarReturnType = new TypeToken(){}.getType();
        return apiClient.execute(call, localVarReturnType);
    }

    /**
     * Read Account List (asynchronously)
     * Read the identifiers of the available payment account together with  booking balance information, depending on the consent granted.  It is assumed that a consent of the PSU to this access is already given and stored on the ASPSP system.  The addressed list of accounts depends then on the PSU ID and the stored consent addressed by consentId,  respectively the OAuth2 access token.   Returns all identifiers of the accounts, to which an account access has been granted to through  the /consents endpoint by the PSU.  In addition, relevant information about the accounts and hyperlinks to corresponding account  information resources are provided if a related consent has been already granted.  Remark: Note that the /consents endpoint optionally offers to grant an access on all available  payment accounts of a PSU.  In this case, this endpoint will deliver the information about all available payment accounts  of the PSU at this ASPSP. 
     * @param xRequestID ID of the request, unique to the call, as determined by the initiating party. (required)
     * @param consentID This then contains the consentId of the related AIS consent, which was performed prior to this payment initiation.  (required)
     * @param X_GTW_ASPSP_ID ASPSP ID in the registry for the request routing (optional)
     * @param xGTWBankCode Bank code of bank to which the request addressed (optional)
     * @param X_GTW_BIC Business Identifier Code for the request routing (optional)
     * @param withBalance If contained, this function reads the list of accessible payment accounts including the booking balance,  if granted by the PSU in the related consent and available by the ASPSP.  This parameter might be ignored by the ASPSP.   (optional)
     * @param digest Is contained if and only if the \"Signature\" element is contained in the header of the request. (optional)
     * @param signature A signature of the request by the TPP on application level. This might be mandated by ASPSP.  (optional)
     * @param tpPSignatureCertificate The certificate used for signing the request, in base64 encoding.  Must be contained if a signature is contained.  (optional)
     * @param psUIPAddress The forwarded IP Address header field consists of the corresponding HTTP request  IP Address field between PSU and TPP.  It shall be contained if and only if this request was actively initiated by the PSU.  (optional)
     * @param psUIPPort The forwarded IP Port header field consists of the corresponding HTTP request IP Port field between PSU and TPP, if available.  (optional)
     * @param psUAccept The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available.  (optional)
     * @param psUAcceptCharset The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available.  (optional)
     * @param psUAcceptEncoding The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available.  (optional)
     * @param psUAcceptLanguage The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available.  (optional)
     * @param psUUserAgent The forwarded Agent header field of the HTTP request between PSU and TPP, if available.  (optional)
     * @param psUHttpMethod HTTP method used at the PSU ? TPP interface, if available. Valid values are: * GET * POST * PUT * PATCH * DELETE  (optional)
     * @param psUDeviceID UUID (Universally Unique Identifier) for a device, which is used by the PSU, if available. UUID identifies either a device or a device dependant application installation. In case of an installation identification this ID need to be unaltered until removal from device.  (optional)
     * @param psUGeoLocation The forwarded Geo Location of the corresponding http request between PSU and TPP if available.  (optional)
     * @param callback The callback to be executed when the API call finishes
     * @return The request call
     * @throws ApiException If fail to process the API call, e.g. serializing the request body object
     */
    public com.squareup.okhttp.Call getAccountListAsync(UUID xRequestID, String consentID, String X_GTW_ASPSP_ID, String xGTWBankCode, String X_GTW_BIC, Boolean withBalance, String digest, String signature, byte[] tpPSignatureCertificate, String psUIPAddress, String psUIPPort, String psUAccept, String psUAcceptCharset, String psUAcceptEncoding, String psUAcceptLanguage, String psUUserAgent, String psUHttpMethod, UUID psUDeviceID, String psUGeoLocation, final ApiCallback callback) throws ApiException {

        ProgressResponseBody.ProgressListener progressListener = null;
        ProgressRequestBody.ProgressRequestListener progressRequestListener = null;

        if (callback != null) {
            progressListener = new ProgressResponseBody.ProgressListener() {
                @Override
                public void update(long bytesRead, long contentLength, boolean done) {
                    callback.onDownloadProgress(bytesRead, contentLength, done);
                }
            };

            progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
                @Override
                public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
                    callback.onUploadProgress(bytesWritten, contentLength, done);
                }
            };
        }

        com.squareup.okhttp.Call call = getAccountListValidateBeforeCall(xRequestID, consentID, X_GTW_ASPSP_ID, xGTWBankCode, X_GTW_BIC, withBalance, digest, signature, tpPSignatureCertificate, psUIPAddress, psUIPPort, psUAccept, psUAcceptCharset, psUAcceptEncoding, psUAcceptLanguage, psUUserAgent, psUHttpMethod, psUDeviceID, psUGeoLocation, progressListener, progressRequestListener);
        Type localVarReturnType = new TypeToken(){}.getType();
        apiClient.executeAsync(call, localVarReturnType, callback);
        return call;
    }
    /**
     * Build call for getBalances
     * @param accountId This identification is denoting the addressed account.  The account-id is retrieved by using a \"Read Account List\" call.  The account-id is the \"id\" attribute of the account structure.  Its value is constant at least throughout the lifecycle of a given consent.  (required)
     * @param xRequestID ID of the request, unique to the call, as determined by the initiating party. (required)
     * @param consentID This then contains the consentId of the related AIS consent, which was performed prior to this payment initiation.  (required)
     * @param X_GTW_ASPSP_ID ASPSP ID in the registry for the request routing (optional)
     * @param xGTWBankCode Bank code of bank to which the request addressed (optional)
     * @param X_GTW_BIC Business Identifier Code for the request routing (optional)
     * @param digest Is contained if and only if the \"Signature\" element is contained in the header of the request. (optional)
     * @param signature A signature of the request by the TPP on application level. This might be mandated by ASPSP.  (optional)
     * @param tpPSignatureCertificate The certificate used for signing the request, in base64 encoding.  Must be contained if a signature is contained.  (optional)
     * @param psUIPAddress The forwarded IP Address header field consists of the corresponding HTTP request  IP Address field between PSU and TPP.  It shall be contained if and only if this request was actively initiated by the PSU.  (optional)
     * @param psUIPPort The forwarded IP Port header field consists of the corresponding HTTP request IP Port field between PSU and TPP, if available.  (optional)
     * @param psUAccept The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available.  (optional)
     * @param psUAcceptCharset The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available.  (optional)
     * @param psUAcceptEncoding The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available.  (optional)
     * @param psUAcceptLanguage The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available.  (optional)
     * @param psUUserAgent The forwarded Agent header field of the HTTP request between PSU and TPP, if available.  (optional)
     * @param psUHttpMethod HTTP method used at the PSU ? TPP interface, if available. Valid values are: * GET * POST * PUT * PATCH * DELETE  (optional)
     * @param psUDeviceID UUID (Universally Unique Identifier) for a device, which is used by the PSU, if available. UUID identifies either a device or a device dependant application installation. In case of an installation identification this ID need to be unaltered until removal from device.  (optional)
     * @param psUGeoLocation The forwarded Geo Location of the corresponding http request between PSU and TPP if available.  (optional)
     * @param progressListener Progress listener
     * @param progressRequestListener Progress request listener
     * @return Call to execute
     * @throws ApiException If fail to serialize the request body object
     */
    public com.squareup.okhttp.Call getBalancesCall(String accountId, UUID xRequestID, String consentID, String X_GTW_ASPSP_ID, String xGTWBankCode, String X_GTW_BIC, String digest, String signature, byte[] tpPSignatureCertificate, String psUIPAddress, String psUIPPort, String psUAccept, String psUAcceptCharset, String psUAcceptEncoding, String psUAcceptLanguage, String psUUserAgent, String psUHttpMethod, UUID psUDeviceID, String psUGeoLocation, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
        Object localVarPostBody = null;
        
        // create path and map variables
        String localVarPath = "/v1/accounts/{account-id}/balances"
            .replaceAll("\\{" + "account-id" + "\\}", apiClient.escapeString(accountId.toString()));

        List localVarQueryParams = new ArrayList();
        List localVarCollectionQueryParams = new ArrayList();

        Map localVarHeaderParams = new HashMap();
        if (X_GTW_ASPSP_ID != null)
        localVarHeaderParams.put("X-GTW-ASPSP-ID", apiClient.parameterToString(X_GTW_ASPSP_ID));
        if (xGTWBankCode != null)
        localVarHeaderParams.put("X-GTW-Bank-Code", apiClient.parameterToString(xGTWBankCode));
        if (X_GTW_BIC != null)
        localVarHeaderParams.put("X-GTW-BIC", apiClient.parameterToString(X_GTW_BIC));
        if (xRequestID != null)
        localVarHeaderParams.put("X-Request-ID", apiClient.parameterToString(xRequestID));
        if (digest != null)
        localVarHeaderParams.put("Digest", apiClient.parameterToString(digest));
        if (signature != null)
        localVarHeaderParams.put("Signature", apiClient.parameterToString(signature));
        if (tpPSignatureCertificate != null)
        localVarHeaderParams.put("TPP-Signature-Certificate", apiClient.parameterToString(tpPSignatureCertificate));
        if (consentID != null)
        localVarHeaderParams.put("Consent-ID", apiClient.parameterToString(consentID));
        if (psUIPAddress != null)
        localVarHeaderParams.put("PSU-IP-Address", apiClient.parameterToString(psUIPAddress));
        if (psUIPPort != null)
        localVarHeaderParams.put("PSU-IP-Port", apiClient.parameterToString(psUIPPort));
        if (psUAccept != null)
        localVarHeaderParams.put("PSU-Accept", apiClient.parameterToString(psUAccept));
        if (psUAcceptCharset != null)
        localVarHeaderParams.put("PSU-Accept-Charset", apiClient.parameterToString(psUAcceptCharset));
        if (psUAcceptEncoding != null)
        localVarHeaderParams.put("PSU-Accept-Encoding", apiClient.parameterToString(psUAcceptEncoding));
        if (psUAcceptLanguage != null)
        localVarHeaderParams.put("PSU-Accept-Language", apiClient.parameterToString(psUAcceptLanguage));
        if (psUUserAgent != null)
        localVarHeaderParams.put("PSU-User-Agent", apiClient.parameterToString(psUUserAgent));
        if (psUHttpMethod != null)
        localVarHeaderParams.put("PSU-Http-Method", apiClient.parameterToString(psUHttpMethod));
        if (psUDeviceID != null)
        localVarHeaderParams.put("PSU-Device-ID", apiClient.parameterToString(psUDeviceID));
        if (psUGeoLocation != null)
        localVarHeaderParams.put("PSU-Geo-Location", apiClient.parameterToString(psUGeoLocation));

        Map localVarFormParams = new HashMap();

        final String[] localVarAccepts = {
            "application/json", "application/problem+json"
        };
        final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
        if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);

        final String[] localVarContentTypes = {
            
        };
        final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
        localVarHeaderParams.put("Content-Type", localVarContentType);

        if(progressListener != null) {
            apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
                @Override
                public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
                    com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
                    return originalResponse.newBuilder()
                    .body(new ProgressResponseBody(originalResponse.body(), progressListener))
                    .build();
                }
            });
        }

        String[] localVarAuthNames = new String[] { "BearerAuthOAuth" };
        return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
    }
    
    @SuppressWarnings("rawtypes")
    private com.squareup.okhttp.Call getBalancesValidateBeforeCall(String accountId, UUID xRequestID, String consentID, String X_GTW_ASPSP_ID, String xGTWBankCode, String X_GTW_BIC, String digest, String signature, byte[] tpPSignatureCertificate, String psUIPAddress, String psUIPPort, String psUAccept, String psUAcceptCharset, String psUAcceptEncoding, String psUAcceptLanguage, String psUUserAgent, String psUHttpMethod, UUID psUDeviceID, String psUGeoLocation, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
        // verify the required parameter 'accountId' is set
        if (accountId == null) {
            throw new ApiException("Missing the required parameter 'accountId' when calling getBalances(Async)");
        }
        // verify the required parameter 'xRequestID' is set
        if (xRequestID == null) {
            throw new ApiException("Missing the required parameter 'xRequestID' when calling getBalances(Async)");
        }
        // verify the required parameter 'consentID' is set
        if (consentID == null) {
            throw new ApiException("Missing the required parameter 'consentID' when calling getBalances(Async)");
        }
        
        com.squareup.okhttp.Call call = getBalancesCall(accountId, xRequestID, consentID, X_GTW_ASPSP_ID, xGTWBankCode, X_GTW_BIC, digest, signature, tpPSignatureCertificate, psUIPAddress, psUIPPort, psUAccept, psUAcceptCharset, psUAcceptEncoding, psUAcceptLanguage, psUUserAgent, psUHttpMethod, psUDeviceID, psUGeoLocation, progressListener, progressRequestListener);
        return call;

        
        
        
        
    }

    /**
     * Read Balance
     * Reads account data from a given account addressed by \"account-id\".   **Remark:** This account-id can be a tokenised identification due to data protection reason since the path  information might be logged on intermediary servers within the ASPSP sphere.  This account-id then can be retrieved by the \"GET Account List\" call.  The account-id is constant at least throughout the lifecycle of a given consent. 
     * @param accountId This identification is denoting the addressed account.  The account-id is retrieved by using a \"Read Account List\" call.  The account-id is the \"id\" attribute of the account structure.  Its value is constant at least throughout the lifecycle of a given consent.  (required)
     * @param xRequestID ID of the request, unique to the call, as determined by the initiating party. (required)
     * @param consentID This then contains the consentId of the related AIS consent, which was performed prior to this payment initiation.  (required)
     * @param X_GTW_ASPSP_ID ASPSP ID in the registry for the request routing (optional)
     * @param xGTWBankCode Bank code of bank to which the request addressed (optional)
     * @param X_GTW_BIC Business Identifier Code for the request routing (optional)
     * @param digest Is contained if and only if the \"Signature\" element is contained in the header of the request. (optional)
     * @param signature A signature of the request by the TPP on application level. This might be mandated by ASPSP.  (optional)
     * @param tpPSignatureCertificate The certificate used for signing the request, in base64 encoding.  Must be contained if a signature is contained.  (optional)
     * @param psUIPAddress The forwarded IP Address header field consists of the corresponding HTTP request  IP Address field between PSU and TPP.  It shall be contained if and only if this request was actively initiated by the PSU.  (optional)
     * @param psUIPPort The forwarded IP Port header field consists of the corresponding HTTP request IP Port field between PSU and TPP, if available.  (optional)
     * @param psUAccept The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available.  (optional)
     * @param psUAcceptCharset The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available.  (optional)
     * @param psUAcceptEncoding The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available.  (optional)
     * @param psUAcceptLanguage The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available.  (optional)
     * @param psUUserAgent The forwarded Agent header field of the HTTP request between PSU and TPP, if available.  (optional)
     * @param psUHttpMethod HTTP method used at the PSU ? TPP interface, if available. Valid values are: * GET * POST * PUT * PATCH * DELETE  (optional)
     * @param psUDeviceID UUID (Universally Unique Identifier) for a device, which is used by the PSU, if available. UUID identifies either a device or a device dependant application installation. In case of an installation identification this ID need to be unaltered until removal from device.  (optional)
     * @param psUGeoLocation The forwarded Geo Location of the corresponding http request between PSU and TPP if available.  (optional)
     * @return ReadAccountBalanceResponse200
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public ReadAccountBalanceResponse200 getBalances(String accountId, UUID xRequestID, String consentID, String X_GTW_ASPSP_ID, String xGTWBankCode, String X_GTW_BIC, String digest, String signature, byte[] tpPSignatureCertificate, String psUIPAddress, String psUIPPort, String psUAccept, String psUAcceptCharset, String psUAcceptEncoding, String psUAcceptLanguage, String psUUserAgent, String psUHttpMethod, UUID psUDeviceID, String psUGeoLocation) throws ApiException {
        ApiResponse resp = getBalancesWithHttpInfo(accountId, xRequestID, consentID, X_GTW_ASPSP_ID, xGTWBankCode, X_GTW_BIC, digest, signature, tpPSignatureCertificate, psUIPAddress, psUIPPort, psUAccept, psUAcceptCharset, psUAcceptEncoding, psUAcceptLanguage, psUUserAgent, psUHttpMethod, psUDeviceID, psUGeoLocation);
        return resp.getData();
    }

    /**
     * Read Balance
     * Reads account data from a given account addressed by \"account-id\".   **Remark:** This account-id can be a tokenised identification due to data protection reason since the path  information might be logged on intermediary servers within the ASPSP sphere.  This account-id then can be retrieved by the \"GET Account List\" call.  The account-id is constant at least throughout the lifecycle of a given consent. 
     * @param accountId This identification is denoting the addressed account.  The account-id is retrieved by using a \"Read Account List\" call.  The account-id is the \"id\" attribute of the account structure.  Its value is constant at least throughout the lifecycle of a given consent.  (required)
     * @param xRequestID ID of the request, unique to the call, as determined by the initiating party. (required)
     * @param consentID This then contains the consentId of the related AIS consent, which was performed prior to this payment initiation.  (required)
     * @param X_GTW_ASPSP_ID ASPSP ID in the registry for the request routing (optional)
     * @param xGTWBankCode Bank code of bank to which the request addressed (optional)
     * @param X_GTW_BIC Business Identifier Code for the request routing (optional)
     * @param digest Is contained if and only if the \"Signature\" element is contained in the header of the request. (optional)
     * @param signature A signature of the request by the TPP on application level. This might be mandated by ASPSP.  (optional)
     * @param tpPSignatureCertificate The certificate used for signing the request, in base64 encoding.  Must be contained if a signature is contained.  (optional)
     * @param psUIPAddress The forwarded IP Address header field consists of the corresponding HTTP request  IP Address field between PSU and TPP.  It shall be contained if and only if this request was actively initiated by the PSU.  (optional)
     * @param psUIPPort The forwarded IP Port header field consists of the corresponding HTTP request IP Port field between PSU and TPP, if available.  (optional)
     * @param psUAccept The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available.  (optional)
     * @param psUAcceptCharset The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available.  (optional)
     * @param psUAcceptEncoding The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available.  (optional)
     * @param psUAcceptLanguage The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available.  (optional)
     * @param psUUserAgent The forwarded Agent header field of the HTTP request between PSU and TPP, if available.  (optional)
     * @param psUHttpMethod HTTP method used at the PSU ? TPP interface, if available. Valid values are: * GET * POST * PUT * PATCH * DELETE  (optional)
     * @param psUDeviceID UUID (Universally Unique Identifier) for a device, which is used by the PSU, if available. UUID identifies either a device or a device dependant application installation. In case of an installation identification this ID need to be unaltered until removal from device.  (optional)
     * @param psUGeoLocation The forwarded Geo Location of the corresponding http request between PSU and TPP if available.  (optional)
     * @return ApiResponse<ReadAccountBalanceResponse200>
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public ApiResponse getBalancesWithHttpInfo(String accountId, UUID xRequestID, String consentID, String X_GTW_ASPSP_ID, String xGTWBankCode, String X_GTW_BIC, String digest, String signature, byte[] tpPSignatureCertificate, String psUIPAddress, String psUIPPort, String psUAccept, String psUAcceptCharset, String psUAcceptEncoding, String psUAcceptLanguage, String psUUserAgent, String psUHttpMethod, UUID psUDeviceID, String psUGeoLocation) throws ApiException {
        com.squareup.okhttp.Call call = getBalancesValidateBeforeCall(accountId, xRequestID, consentID, X_GTW_ASPSP_ID, xGTWBankCode, X_GTW_BIC, digest, signature, tpPSignatureCertificate, psUIPAddress, psUIPPort, psUAccept, psUAcceptCharset, psUAcceptEncoding, psUAcceptLanguage, psUUserAgent, psUHttpMethod, psUDeviceID, psUGeoLocation, null, null);
        Type localVarReturnType = new TypeToken(){}.getType();
        return apiClient.execute(call, localVarReturnType);
    }

    /**
     * Read Balance (asynchronously)
     * Reads account data from a given account addressed by \"account-id\".   **Remark:** This account-id can be a tokenised identification due to data protection reason since the path  information might be logged on intermediary servers within the ASPSP sphere.  This account-id then can be retrieved by the \"GET Account List\" call.  The account-id is constant at least throughout the lifecycle of a given consent. 
     * @param accountId This identification is denoting the addressed account.  The account-id is retrieved by using a \"Read Account List\" call.  The account-id is the \"id\" attribute of the account structure.  Its value is constant at least throughout the lifecycle of a given consent.  (required)
     * @param xRequestID ID of the request, unique to the call, as determined by the initiating party. (required)
     * @param consentID This then contains the consentId of the related AIS consent, which was performed prior to this payment initiation.  (required)
     * @param X_GTW_ASPSP_ID ASPSP ID in the registry for the request routing (optional)
     * @param xGTWBankCode Bank code of bank to which the request addressed (optional)
     * @param X_GTW_BIC Business Identifier Code for the request routing (optional)
     * @param digest Is contained if and only if the \"Signature\" element is contained in the header of the request. (optional)
     * @param signature A signature of the request by the TPP on application level. This might be mandated by ASPSP.  (optional)
     * @param tpPSignatureCertificate The certificate used for signing the request, in base64 encoding.  Must be contained if a signature is contained.  (optional)
     * @param psUIPAddress The forwarded IP Address header field consists of the corresponding HTTP request  IP Address field between PSU and TPP.  It shall be contained if and only if this request was actively initiated by the PSU.  (optional)
     * @param psUIPPort The forwarded IP Port header field consists of the corresponding HTTP request IP Port field between PSU and TPP, if available.  (optional)
     * @param psUAccept The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available.  (optional)
     * @param psUAcceptCharset The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available.  (optional)
     * @param psUAcceptEncoding The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available.  (optional)
     * @param psUAcceptLanguage The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available.  (optional)
     * @param psUUserAgent The forwarded Agent header field of the HTTP request between PSU and TPP, if available.  (optional)
     * @param psUHttpMethod HTTP method used at the PSU ? TPP interface, if available. Valid values are: * GET * POST * PUT * PATCH * DELETE  (optional)
     * @param psUDeviceID UUID (Universally Unique Identifier) for a device, which is used by the PSU, if available. UUID identifies either a device or a device dependant application installation. In case of an installation identification this ID need to be unaltered until removal from device.  (optional)
     * @param psUGeoLocation The forwarded Geo Location of the corresponding http request between PSU and TPP if available.  (optional)
     * @param callback The callback to be executed when the API call finishes
     * @return The request call
     * @throws ApiException If fail to process the API call, e.g. serializing the request body object
     */
    public com.squareup.okhttp.Call getBalancesAsync(String accountId, UUID xRequestID, String consentID, String X_GTW_ASPSP_ID, String xGTWBankCode, String X_GTW_BIC, String digest, String signature, byte[] tpPSignatureCertificate, String psUIPAddress, String psUIPPort, String psUAccept, String psUAcceptCharset, String psUAcceptEncoding, String psUAcceptLanguage, String psUUserAgent, String psUHttpMethod, UUID psUDeviceID, String psUGeoLocation, final ApiCallback callback) throws ApiException {

        ProgressResponseBody.ProgressListener progressListener = null;
        ProgressRequestBody.ProgressRequestListener progressRequestListener = null;

        if (callback != null) {
            progressListener = new ProgressResponseBody.ProgressListener() {
                @Override
                public void update(long bytesRead, long contentLength, boolean done) {
                    callback.onDownloadProgress(bytesRead, contentLength, done);
                }
            };

            progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
                @Override
                public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
                    callback.onUploadProgress(bytesWritten, contentLength, done);
                }
            };
        }

        com.squareup.okhttp.Call call = getBalancesValidateBeforeCall(accountId, xRequestID, consentID, X_GTW_ASPSP_ID, xGTWBankCode, X_GTW_BIC, digest, signature, tpPSignatureCertificate, psUIPAddress, psUIPPort, psUAccept, psUAcceptCharset, psUAcceptEncoding, psUAcceptLanguage, psUUserAgent, psUHttpMethod, psUDeviceID, psUGeoLocation, progressListener, progressRequestListener);
        Type localVarReturnType = new TypeToken(){}.getType();
        apiClient.executeAsync(call, localVarReturnType, callback);
        return call;
    }
    /**
     * Build call for getConsentInformation
     * @param consentId ID of the corresponding consent object as returned by an Account Information Consent Request.  (required)
     * @param xRequestID ID of the request, unique to the call, as determined by the initiating party. (required)
     * @param X_GTW_ASPSP_ID ASPSP ID in the registry for the request routing (optional)
     * @param xGTWBankCode Bank code of bank to which the request addressed (optional)
     * @param X_GTW_BIC Business Identifier Code for the request routing (optional)
     * @param digest Is contained if and only if the \"Signature\" element is contained in the header of the request. (optional)
     * @param signature A signature of the request by the TPP on application level. This might be mandated by ASPSP.  (optional)
     * @param tpPSignatureCertificate The certificate used for signing the request, in base64 encoding.  Must be contained if a signature is contained.  (optional)
     * @param psUIPAddress The forwarded IP Address header field consists of the corresponding HTTP request  IP Address field between PSU and TPP.  It shall be contained if and only if this request was actively initiated by the PSU.  (optional)
     * @param psUIPPort The forwarded IP Port header field consists of the corresponding HTTP request IP Port field between PSU and TPP, if available.  (optional)
     * @param psUAccept The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available.  (optional)
     * @param psUAcceptCharset The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available.  (optional)
     * @param psUAcceptEncoding The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available.  (optional)
     * @param psUAcceptLanguage The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available.  (optional)
     * @param psUUserAgent The forwarded Agent header field of the HTTP request between PSU and TPP, if available.  (optional)
     * @param psUHttpMethod HTTP method used at the PSU ? TPP interface, if available. Valid values are: * GET * POST * PUT * PATCH * DELETE  (optional)
     * @param psUDeviceID UUID (Universally Unique Identifier) for a device, which is used by the PSU, if available. UUID identifies either a device or a device dependant application installation. In case of an installation identification this ID need to be unaltered until removal from device.  (optional)
     * @param psUGeoLocation The forwarded Geo Location of the corresponding http request between PSU and TPP if available.  (optional)
     * @param progressListener Progress listener
     * @param progressRequestListener Progress request listener
     * @return Call to execute
     * @throws ApiException If fail to serialize the request body object
     */
    public com.squareup.okhttp.Call getConsentInformationCall(String consentId, UUID xRequestID, String X_GTW_ASPSP_ID, String xGTWBankCode, String X_GTW_BIC, String digest, String signature, byte[] tpPSignatureCertificate, String psUIPAddress, String psUIPPort, String psUAccept, String psUAcceptCharset, String psUAcceptEncoding, String psUAcceptLanguage, String psUUserAgent, String psUHttpMethod, UUID psUDeviceID, String psUGeoLocation, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
        Object localVarPostBody = null;
        
        // create path and map variables
        String localVarPath = "/v1/consents/{consentId}"
            .replaceAll("\\{" + "consentId" + "\\}", apiClient.escapeString(consentId.toString()));

        List localVarQueryParams = new ArrayList();
        List localVarCollectionQueryParams = new ArrayList();

        Map localVarHeaderParams = new HashMap();
        if (X_GTW_ASPSP_ID != null)
        localVarHeaderParams.put("X-GTW-ASPSP-ID", apiClient.parameterToString(X_GTW_ASPSP_ID));
        if (xGTWBankCode != null)
        localVarHeaderParams.put("X-GTW-Bank-Code", apiClient.parameterToString(xGTWBankCode));
        if (X_GTW_BIC != null)
        localVarHeaderParams.put("X-GTW-BIC", apiClient.parameterToString(X_GTW_BIC));
        if (xRequestID != null)
        localVarHeaderParams.put("X-Request-ID", apiClient.parameterToString(xRequestID));
        if (digest != null)
        localVarHeaderParams.put("Digest", apiClient.parameterToString(digest));
        if (signature != null)
        localVarHeaderParams.put("Signature", apiClient.parameterToString(signature));
        if (tpPSignatureCertificate != null)
        localVarHeaderParams.put("TPP-Signature-Certificate", apiClient.parameterToString(tpPSignatureCertificate));
        if (psUIPAddress != null)
        localVarHeaderParams.put("PSU-IP-Address", apiClient.parameterToString(psUIPAddress));
        if (psUIPPort != null)
        localVarHeaderParams.put("PSU-IP-Port", apiClient.parameterToString(psUIPPort));
        if (psUAccept != null)
        localVarHeaderParams.put("PSU-Accept", apiClient.parameterToString(psUAccept));
        if (psUAcceptCharset != null)
        localVarHeaderParams.put("PSU-Accept-Charset", apiClient.parameterToString(psUAcceptCharset));
        if (psUAcceptEncoding != null)
        localVarHeaderParams.put("PSU-Accept-Encoding", apiClient.parameterToString(psUAcceptEncoding));
        if (psUAcceptLanguage != null)
        localVarHeaderParams.put("PSU-Accept-Language", apiClient.parameterToString(psUAcceptLanguage));
        if (psUUserAgent != null)
        localVarHeaderParams.put("PSU-User-Agent", apiClient.parameterToString(psUUserAgent));
        if (psUHttpMethod != null)
        localVarHeaderParams.put("PSU-Http-Method", apiClient.parameterToString(psUHttpMethod));
        if (psUDeviceID != null)
        localVarHeaderParams.put("PSU-Device-ID", apiClient.parameterToString(psUDeviceID));
        if (psUGeoLocation != null)
        localVarHeaderParams.put("PSU-Geo-Location", apiClient.parameterToString(psUGeoLocation));

        Map localVarFormParams = new HashMap();

        final String[] localVarAccepts = {
            "application/json", "application/problem+json"
        };
        final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
        if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);

        final String[] localVarContentTypes = {
            
        };
        final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
        localVarHeaderParams.put("Content-Type", localVarContentType);

        if(progressListener != null) {
            apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
                @Override
                public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
                    com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
                    return originalResponse.newBuilder()
                    .body(new ProgressResponseBody(originalResponse.body(), progressListener))
                    .build();
                }
            });
        }

        String[] localVarAuthNames = new String[] { "BearerAuthOAuth" };
        return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
    }
    
    @SuppressWarnings("rawtypes")
    private com.squareup.okhttp.Call getConsentInformationValidateBeforeCall(String consentId, UUID xRequestID, String X_GTW_ASPSP_ID, String xGTWBankCode, String X_GTW_BIC, String digest, String signature, byte[] tpPSignatureCertificate, String psUIPAddress, String psUIPPort, String psUAccept, String psUAcceptCharset, String psUAcceptEncoding, String psUAcceptLanguage, String psUUserAgent, String psUHttpMethod, UUID psUDeviceID, String psUGeoLocation, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
        // verify the required parameter 'consentId' is set
        if (consentId == null) {
            throw new ApiException("Missing the required parameter 'consentId' when calling getConsentInformation(Async)");
        }
        // verify the required parameter 'xRequestID' is set
        if (xRequestID == null) {
            throw new ApiException("Missing the required parameter 'xRequestID' when calling getConsentInformation(Async)");
        }
        
        com.squareup.okhttp.Call call = getConsentInformationCall(consentId, xRequestID, X_GTW_ASPSP_ID, xGTWBankCode, X_GTW_BIC, digest, signature, tpPSignatureCertificate, psUIPAddress, psUIPPort, psUAccept, psUAcceptCharset, psUAcceptEncoding, psUAcceptLanguage, psUUserAgent, psUHttpMethod, psUDeviceID, psUGeoLocation, progressListener, progressRequestListener);
        return call;

        
        
        
        
    }

    /**
     * Get Consent Request
     * Returns the content of an account information consent object.  This is returning the data for the TPP especially in cases,  where the consent was directly managed between ASPSP and PSU e.g. in a re-direct SCA Approach. 
     * @param consentId ID of the corresponding consent object as returned by an Account Information Consent Request.  (required)
     * @param xRequestID ID of the request, unique to the call, as determined by the initiating party. (required)
     * @param X_GTW_ASPSP_ID ASPSP ID in the registry for the request routing (optional)
     * @param xGTWBankCode Bank code of bank to which the request addressed (optional)
     * @param X_GTW_BIC Business Identifier Code for the request routing (optional)
     * @param digest Is contained if and only if the \"Signature\" element is contained in the header of the request. (optional)
     * @param signature A signature of the request by the TPP on application level. This might be mandated by ASPSP.  (optional)
     * @param tpPSignatureCertificate The certificate used for signing the request, in base64 encoding.  Must be contained if a signature is contained.  (optional)
     * @param psUIPAddress The forwarded IP Address header field consists of the corresponding HTTP request  IP Address field between PSU and TPP.  It shall be contained if and only if this request was actively initiated by the PSU.  (optional)
     * @param psUIPPort The forwarded IP Port header field consists of the corresponding HTTP request IP Port field between PSU and TPP, if available.  (optional)
     * @param psUAccept The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available.  (optional)
     * @param psUAcceptCharset The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available.  (optional)
     * @param psUAcceptEncoding The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available.  (optional)
     * @param psUAcceptLanguage The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available.  (optional)
     * @param psUUserAgent The forwarded Agent header field of the HTTP request between PSU and TPP, if available.  (optional)
     * @param psUHttpMethod HTTP method used at the PSU ? TPP interface, if available. Valid values are: * GET * POST * PUT * PATCH * DELETE  (optional)
     * @param psUDeviceID UUID (Universally Unique Identifier) for a device, which is used by the PSU, if available. UUID identifies either a device or a device dependant application installation. In case of an installation identification this ID need to be unaltered until removal from device.  (optional)
     * @param psUGeoLocation The forwarded Geo Location of the corresponding http request between PSU and TPP if available.  (optional)
     * @return ConsentInformationResponse200Json
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public ConsentInformationResponse200Json getConsentInformation(String consentId, UUID xRequestID, String X_GTW_ASPSP_ID, String xGTWBankCode, String X_GTW_BIC, String digest, String signature, byte[] tpPSignatureCertificate, String psUIPAddress, String psUIPPort, String psUAccept, String psUAcceptCharset, String psUAcceptEncoding, String psUAcceptLanguage, String psUUserAgent, String psUHttpMethod, UUID psUDeviceID, String psUGeoLocation) throws ApiException {
        ApiResponse resp = getConsentInformationWithHttpInfo(consentId, xRequestID, X_GTW_ASPSP_ID, xGTWBankCode, X_GTW_BIC, digest, signature, tpPSignatureCertificate, psUIPAddress, psUIPPort, psUAccept, psUAcceptCharset, psUAcceptEncoding, psUAcceptLanguage, psUUserAgent, psUHttpMethod, psUDeviceID, psUGeoLocation);
        return resp.getData();
    }

    /**
     * Get Consent Request
     * Returns the content of an account information consent object.  This is returning the data for the TPP especially in cases,  where the consent was directly managed between ASPSP and PSU e.g. in a re-direct SCA Approach. 
     * @param consentId ID of the corresponding consent object as returned by an Account Information Consent Request.  (required)
     * @param xRequestID ID of the request, unique to the call, as determined by the initiating party. (required)
     * @param X_GTW_ASPSP_ID ASPSP ID in the registry for the request routing (optional)
     * @param xGTWBankCode Bank code of bank to which the request addressed (optional)
     * @param X_GTW_BIC Business Identifier Code for the request routing (optional)
     * @param digest Is contained if and only if the \"Signature\" element is contained in the header of the request. (optional)
     * @param signature A signature of the request by the TPP on application level. This might be mandated by ASPSP.  (optional)
     * @param tpPSignatureCertificate The certificate used for signing the request, in base64 encoding.  Must be contained if a signature is contained.  (optional)
     * @param psUIPAddress The forwarded IP Address header field consists of the corresponding HTTP request  IP Address field between PSU and TPP.  It shall be contained if and only if this request was actively initiated by the PSU.  (optional)
     * @param psUIPPort The forwarded IP Port header field consists of the corresponding HTTP request IP Port field between PSU and TPP, if available.  (optional)
     * @param psUAccept The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available.  (optional)
     * @param psUAcceptCharset The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available.  (optional)
     * @param psUAcceptEncoding The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available.  (optional)
     * @param psUAcceptLanguage The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available.  (optional)
     * @param psUUserAgent The forwarded Agent header field of the HTTP request between PSU and TPP, if available.  (optional)
     * @param psUHttpMethod HTTP method used at the PSU ? TPP interface, if available. Valid values are: * GET * POST * PUT * PATCH * DELETE  (optional)
     * @param psUDeviceID UUID (Universally Unique Identifier) for a device, which is used by the PSU, if available. UUID identifies either a device or a device dependant application installation. In case of an installation identification this ID need to be unaltered until removal from device.  (optional)
     * @param psUGeoLocation The forwarded Geo Location of the corresponding http request between PSU and TPP if available.  (optional)
     * @return ApiResponse<ConsentInformationResponse200Json>
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public ApiResponse getConsentInformationWithHttpInfo(String consentId, UUID xRequestID, String X_GTW_ASPSP_ID, String xGTWBankCode, String X_GTW_BIC, String digest, String signature, byte[] tpPSignatureCertificate, String psUIPAddress, String psUIPPort, String psUAccept, String psUAcceptCharset, String psUAcceptEncoding, String psUAcceptLanguage, String psUUserAgent, String psUHttpMethod, UUID psUDeviceID, String psUGeoLocation) throws ApiException {
        com.squareup.okhttp.Call call = getConsentInformationValidateBeforeCall(consentId, xRequestID, X_GTW_ASPSP_ID, xGTWBankCode, X_GTW_BIC, digest, signature, tpPSignatureCertificate, psUIPAddress, psUIPPort, psUAccept, psUAcceptCharset, psUAcceptEncoding, psUAcceptLanguage, psUUserAgent, psUHttpMethod, psUDeviceID, psUGeoLocation, null, null);
        Type localVarReturnType = new TypeToken(){}.getType();
        return apiClient.execute(call, localVarReturnType);
    }

    /**
     * Get Consent Request (asynchronously)
     * Returns the content of an account information consent object.  This is returning the data for the TPP especially in cases,  where the consent was directly managed between ASPSP and PSU e.g. in a re-direct SCA Approach. 
     * @param consentId ID of the corresponding consent object as returned by an Account Information Consent Request.  (required)
     * @param xRequestID ID of the request, unique to the call, as determined by the initiating party. (required)
     * @param X_GTW_ASPSP_ID ASPSP ID in the registry for the request routing (optional)
     * @param xGTWBankCode Bank code of bank to which the request addressed (optional)
     * @param X_GTW_BIC Business Identifier Code for the request routing (optional)
     * @param digest Is contained if and only if the \"Signature\" element is contained in the header of the request. (optional)
     * @param signature A signature of the request by the TPP on application level. This might be mandated by ASPSP.  (optional)
     * @param tpPSignatureCertificate The certificate used for signing the request, in base64 encoding.  Must be contained if a signature is contained.  (optional)
     * @param psUIPAddress The forwarded IP Address header field consists of the corresponding HTTP request  IP Address field between PSU and TPP.  It shall be contained if and only if this request was actively initiated by the PSU.  (optional)
     * @param psUIPPort The forwarded IP Port header field consists of the corresponding HTTP request IP Port field between PSU and TPP, if available.  (optional)
     * @param psUAccept The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available.  (optional)
     * @param psUAcceptCharset The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available.  (optional)
     * @param psUAcceptEncoding The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available.  (optional)
     * @param psUAcceptLanguage The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available.  (optional)
     * @param psUUserAgent The forwarded Agent header field of the HTTP request between PSU and TPP, if available.  (optional)
     * @param psUHttpMethod HTTP method used at the PSU ? TPP interface, if available. Valid values are: * GET * POST * PUT * PATCH * DELETE  (optional)
     * @param psUDeviceID UUID (Universally Unique Identifier) for a device, which is used by the PSU, if available. UUID identifies either a device or a device dependant application installation. In case of an installation identification this ID need to be unaltered until removal from device.  (optional)
     * @param psUGeoLocation The forwarded Geo Location of the corresponding http request between PSU and TPP if available.  (optional)
     * @param callback The callback to be executed when the API call finishes
     * @return The request call
     * @throws ApiException If fail to process the API call, e.g. serializing the request body object
     */
    public com.squareup.okhttp.Call getConsentInformationAsync(String consentId, UUID xRequestID, String X_GTW_ASPSP_ID, String xGTWBankCode, String X_GTW_BIC, String digest, String signature, byte[] tpPSignatureCertificate, String psUIPAddress, String psUIPPort, String psUAccept, String psUAcceptCharset, String psUAcceptEncoding, String psUAcceptLanguage, String psUUserAgent, String psUHttpMethod, UUID psUDeviceID, String psUGeoLocation, final ApiCallback callback) throws ApiException {

        ProgressResponseBody.ProgressListener progressListener = null;
        ProgressRequestBody.ProgressRequestListener progressRequestListener = null;

        if (callback != null) {
            progressListener = new ProgressResponseBody.ProgressListener() {
                @Override
                public void update(long bytesRead, long contentLength, boolean done) {
                    callback.onDownloadProgress(bytesRead, contentLength, done);
                }
            };

            progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
                @Override
                public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
                    callback.onUploadProgress(bytesWritten, contentLength, done);
                }
            };
        }

        com.squareup.okhttp.Call call = getConsentInformationValidateBeforeCall(consentId, xRequestID, X_GTW_ASPSP_ID, xGTWBankCode, X_GTW_BIC, digest, signature, tpPSignatureCertificate, psUIPAddress, psUIPPort, psUAccept, psUAcceptCharset, psUAcceptEncoding, psUAcceptLanguage, psUUserAgent, psUHttpMethod, psUDeviceID, psUGeoLocation, progressListener, progressRequestListener);
        Type localVarReturnType = new TypeToken(){}.getType();
        apiClient.executeAsync(call, localVarReturnType, callback);
        return call;
    }
    /**
     * Build call for getConsentScaStatus
     * @param consentId ID of the corresponding consent object as returned by an Account Information Consent Request.  (required)
     * @param authorisationId Resource identification of the related SCA. (required)
     * @param xRequestID ID of the request, unique to the call, as determined by the initiating party. (required)
     * @param X_GTW_ASPSP_ID ASPSP ID in the registry for the request routing (optional)
     * @param xGTWBankCode Bank code of bank to which the request addressed (optional)
     * @param X_GTW_BIC Business Identifier Code for the request routing (optional)
     * @param digest Is contained if and only if the \"Signature\" element is contained in the header of the request. (optional)
     * @param signature A signature of the request by the TPP on application level. This might be mandated by ASPSP.  (optional)
     * @param tpPSignatureCertificate The certificate used for signing the request, in base64 encoding.  Must be contained if a signature is contained.  (optional)
     * @param psUIPAddress The forwarded IP Address header field consists of the corresponding HTTP request  IP Address field between PSU and TPP.  It shall be contained if and only if this request was actively initiated by the PSU.  (optional)
     * @param psUIPPort The forwarded IP Port header field consists of the corresponding HTTP request IP Port field between PSU and TPP, if available.  (optional)
     * @param psUAccept The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available.  (optional)
     * @param psUAcceptCharset The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available.  (optional)
     * @param psUAcceptEncoding The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available.  (optional)
     * @param psUAcceptLanguage The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available.  (optional)
     * @param psUUserAgent The forwarded Agent header field of the HTTP request between PSU and TPP, if available.  (optional)
     * @param psUHttpMethod HTTP method used at the PSU ? TPP interface, if available. Valid values are: * GET * POST * PUT * PATCH * DELETE  (optional)
     * @param psUDeviceID UUID (Universally Unique Identifier) for a device, which is used by the PSU, if available. UUID identifies either a device or a device dependant application installation. In case of an installation identification this ID need to be unaltered until removal from device.  (optional)
     * @param psUGeoLocation The forwarded Geo Location of the corresponding http request between PSU and TPP if available.  (optional)
     * @param progressListener Progress listener
     * @param progressRequestListener Progress request listener
     * @return Call to execute
     * @throws ApiException If fail to serialize the request body object
     */
    public com.squareup.okhttp.Call getConsentScaStatusCall(String consentId, String authorisationId, UUID xRequestID, String X_GTW_ASPSP_ID, String xGTWBankCode, String X_GTW_BIC, String digest, String signature, byte[] tpPSignatureCertificate, String psUIPAddress, String psUIPPort, String psUAccept, String psUAcceptCharset, String psUAcceptEncoding, String psUAcceptLanguage, String psUUserAgent, String psUHttpMethod, UUID psUDeviceID, String psUGeoLocation, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
        Object localVarPostBody = null;
        
        // create path and map variables
        String localVarPath = "/v1/consents/{consentId}/authorisations/{authorisationId}"
            .replaceAll("\\{" + "consentId" + "\\}", apiClient.escapeString(consentId.toString()))
            .replaceAll("\\{" + "authorisationId" + "\\}", apiClient.escapeString(authorisationId.toString()));

        List localVarQueryParams = new ArrayList();
        List localVarCollectionQueryParams = new ArrayList();

        Map localVarHeaderParams = new HashMap();
        if (X_GTW_ASPSP_ID != null)
        localVarHeaderParams.put("X-GTW-ASPSP-ID", apiClient.parameterToString(X_GTW_ASPSP_ID));
        if (xGTWBankCode != null)
        localVarHeaderParams.put("X-GTW-Bank-Code", apiClient.parameterToString(xGTWBankCode));
        if (X_GTW_BIC != null)
        localVarHeaderParams.put("X-GTW-BIC", apiClient.parameterToString(X_GTW_BIC));
        if (xRequestID != null)
        localVarHeaderParams.put("X-Request-ID", apiClient.parameterToString(xRequestID));
        if (digest != null)
        localVarHeaderParams.put("Digest", apiClient.parameterToString(digest));
        if (signature != null)
        localVarHeaderParams.put("Signature", apiClient.parameterToString(signature));
        if (tpPSignatureCertificate != null)
        localVarHeaderParams.put("TPP-Signature-Certificate", apiClient.parameterToString(tpPSignatureCertificate));
        if (psUIPAddress != null)
        localVarHeaderParams.put("PSU-IP-Address", apiClient.parameterToString(psUIPAddress));
        if (psUIPPort != null)
        localVarHeaderParams.put("PSU-IP-Port", apiClient.parameterToString(psUIPPort));
        if (psUAccept != null)
        localVarHeaderParams.put("PSU-Accept", apiClient.parameterToString(psUAccept));
        if (psUAcceptCharset != null)
        localVarHeaderParams.put("PSU-Accept-Charset", apiClient.parameterToString(psUAcceptCharset));
        if (psUAcceptEncoding != null)
        localVarHeaderParams.put("PSU-Accept-Encoding", apiClient.parameterToString(psUAcceptEncoding));
        if (psUAcceptLanguage != null)
        localVarHeaderParams.put("PSU-Accept-Language", apiClient.parameterToString(psUAcceptLanguage));
        if (psUUserAgent != null)
        localVarHeaderParams.put("PSU-User-Agent", apiClient.parameterToString(psUUserAgent));
        if (psUHttpMethod != null)
        localVarHeaderParams.put("PSU-Http-Method", apiClient.parameterToString(psUHttpMethod));
        if (psUDeviceID != null)
        localVarHeaderParams.put("PSU-Device-ID", apiClient.parameterToString(psUDeviceID));
        if (psUGeoLocation != null)
        localVarHeaderParams.put("PSU-Geo-Location", apiClient.parameterToString(psUGeoLocation));

        Map localVarFormParams = new HashMap();

        final String[] localVarAccepts = {
            "application/json", "application/problem+json"
        };
        final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
        if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);

        final String[] localVarContentTypes = {
            
        };
        final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
        localVarHeaderParams.put("Content-Type", localVarContentType);

        if(progressListener != null) {
            apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
                @Override
                public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
                    com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
                    return originalResponse.newBuilder()
                    .body(new ProgressResponseBody(originalResponse.body(), progressListener))
                    .build();
                }
            });
        }

        String[] localVarAuthNames = new String[] { "BearerAuthOAuth" };
        return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
    }
    
    @SuppressWarnings("rawtypes")
    private com.squareup.okhttp.Call getConsentScaStatusValidateBeforeCall(String consentId, String authorisationId, UUID xRequestID, String X_GTW_ASPSP_ID, String xGTWBankCode, String X_GTW_BIC, String digest, String signature, byte[] tpPSignatureCertificate, String psUIPAddress, String psUIPPort, String psUAccept, String psUAcceptCharset, String psUAcceptEncoding, String psUAcceptLanguage, String psUUserAgent, String psUHttpMethod, UUID psUDeviceID, String psUGeoLocation, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
        // verify the required parameter 'consentId' is set
        if (consentId == null) {
            throw new ApiException("Missing the required parameter 'consentId' when calling getConsentScaStatus(Async)");
        }
        // verify the required parameter 'authorisationId' is set
        if (authorisationId == null) {
            throw new ApiException("Missing the required parameter 'authorisationId' when calling getConsentScaStatus(Async)");
        }
        // verify the required parameter 'xRequestID' is set
        if (xRequestID == null) {
            throw new ApiException("Missing the required parameter 'xRequestID' when calling getConsentScaStatus(Async)");
        }
        
        com.squareup.okhttp.Call call = getConsentScaStatusCall(consentId, authorisationId, xRequestID, X_GTW_ASPSP_ID, xGTWBankCode, X_GTW_BIC, digest, signature, tpPSignatureCertificate, psUIPAddress, psUIPPort, psUAccept, psUAcceptCharset, psUAcceptEncoding, psUAcceptLanguage, psUUserAgent, psUHttpMethod, psUDeviceID, psUGeoLocation, progressListener, progressRequestListener);
        return call;

        
        
        
        
    }

    /**
     * Read the SCA status of the consent authorisation.
     * This method returns the SCA status of a consent initiation's authorisation sub-resource. 
     * @param consentId ID of the corresponding consent object as returned by an Account Information Consent Request.  (required)
     * @param authorisationId Resource identification of the related SCA. (required)
     * @param xRequestID ID of the request, unique to the call, as determined by the initiating party. (required)
     * @param X_GTW_ASPSP_ID ASPSP ID in the registry for the request routing (optional)
     * @param xGTWBankCode Bank code of bank to which the request addressed (optional)
     * @param X_GTW_BIC Business Identifier Code for the request routing (optional)
     * @param digest Is contained if and only if the \"Signature\" element is contained in the header of the request. (optional)
     * @param signature A signature of the request by the TPP on application level. This might be mandated by ASPSP.  (optional)
     * @param tpPSignatureCertificate The certificate used for signing the request, in base64 encoding.  Must be contained if a signature is contained.  (optional)
     * @param psUIPAddress The forwarded IP Address header field consists of the corresponding HTTP request  IP Address field between PSU and TPP.  It shall be contained if and only if this request was actively initiated by the PSU.  (optional)
     * @param psUIPPort The forwarded IP Port header field consists of the corresponding HTTP request IP Port field between PSU and TPP, if available.  (optional)
     * @param psUAccept The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available.  (optional)
     * @param psUAcceptCharset The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available.  (optional)
     * @param psUAcceptEncoding The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available.  (optional)
     * @param psUAcceptLanguage The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available.  (optional)
     * @param psUUserAgent The forwarded Agent header field of the HTTP request between PSU and TPP, if available.  (optional)
     * @param psUHttpMethod HTTP method used at the PSU ? TPP interface, if available. Valid values are: * GET * POST * PUT * PATCH * DELETE  (optional)
     * @param psUDeviceID UUID (Universally Unique Identifier) for a device, which is used by the PSU, if available. UUID identifies either a device or a device dependant application installation. In case of an installation identification this ID need to be unaltered until removal from device.  (optional)
     * @param psUGeoLocation The forwarded Geo Location of the corresponding http request between PSU and TPP if available.  (optional)
     * @return ScaStatusResponse
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public ScaStatusResponse getConsentScaStatus(String consentId, String authorisationId, UUID xRequestID, String X_GTW_ASPSP_ID, String xGTWBankCode, String X_GTW_BIC, String digest, String signature, byte[] tpPSignatureCertificate, String psUIPAddress, String psUIPPort, String psUAccept, String psUAcceptCharset, String psUAcceptEncoding, String psUAcceptLanguage, String psUUserAgent, String psUHttpMethod, UUID psUDeviceID, String psUGeoLocation) throws ApiException {
        ApiResponse resp = getConsentScaStatusWithHttpInfo(consentId, authorisationId, xRequestID, X_GTW_ASPSP_ID, xGTWBankCode, X_GTW_BIC, digest, signature, tpPSignatureCertificate, psUIPAddress, psUIPPort, psUAccept, psUAcceptCharset, psUAcceptEncoding, psUAcceptLanguage, psUUserAgent, psUHttpMethod, psUDeviceID, psUGeoLocation);
        return resp.getData();
    }

    /**
     * Read the SCA status of the consent authorisation.
     * This method returns the SCA status of a consent initiation's authorisation sub-resource. 
     * @param consentId ID of the corresponding consent object as returned by an Account Information Consent Request.  (required)
     * @param authorisationId Resource identification of the related SCA. (required)
     * @param xRequestID ID of the request, unique to the call, as determined by the initiating party. (required)
     * @param X_GTW_ASPSP_ID ASPSP ID in the registry for the request routing (optional)
     * @param xGTWBankCode Bank code of bank to which the request addressed (optional)
     * @param X_GTW_BIC Business Identifier Code for the request routing (optional)
     * @param digest Is contained if and only if the \"Signature\" element is contained in the header of the request. (optional)
     * @param signature A signature of the request by the TPP on application level. This might be mandated by ASPSP.  (optional)
     * @param tpPSignatureCertificate The certificate used for signing the request, in base64 encoding.  Must be contained if a signature is contained.  (optional)
     * @param psUIPAddress The forwarded IP Address header field consists of the corresponding HTTP request  IP Address field between PSU and TPP.  It shall be contained if and only if this request was actively initiated by the PSU.  (optional)
     * @param psUIPPort The forwarded IP Port header field consists of the corresponding HTTP request IP Port field between PSU and TPP, if available.  (optional)
     * @param psUAccept The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available.  (optional)
     * @param psUAcceptCharset The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available.  (optional)
     * @param psUAcceptEncoding The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available.  (optional)
     * @param psUAcceptLanguage The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available.  (optional)
     * @param psUUserAgent The forwarded Agent header field of the HTTP request between PSU and TPP, if available.  (optional)
     * @param psUHttpMethod HTTP method used at the PSU ? TPP interface, if available. Valid values are: * GET * POST * PUT * PATCH * DELETE  (optional)
     * @param psUDeviceID UUID (Universally Unique Identifier) for a device, which is used by the PSU, if available. UUID identifies either a device or a device dependant application installation. In case of an installation identification this ID need to be unaltered until removal from device.  (optional)
     * @param psUGeoLocation The forwarded Geo Location of the corresponding http request between PSU and TPP if available.  (optional)
     * @return ApiResponse<ScaStatusResponse>
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public ApiResponse getConsentScaStatusWithHttpInfo(String consentId, String authorisationId, UUID xRequestID, String X_GTW_ASPSP_ID, String xGTWBankCode, String X_GTW_BIC, String digest, String signature, byte[] tpPSignatureCertificate, String psUIPAddress, String psUIPPort, String psUAccept, String psUAcceptCharset, String psUAcceptEncoding, String psUAcceptLanguage, String psUUserAgent, String psUHttpMethod, UUID psUDeviceID, String psUGeoLocation) throws ApiException {
        com.squareup.okhttp.Call call = getConsentScaStatusValidateBeforeCall(consentId, authorisationId, xRequestID, X_GTW_ASPSP_ID, xGTWBankCode, X_GTW_BIC, digest, signature, tpPSignatureCertificate, psUIPAddress, psUIPPort, psUAccept, psUAcceptCharset, psUAcceptEncoding, psUAcceptLanguage, psUUserAgent, psUHttpMethod, psUDeviceID, psUGeoLocation, null, null);
        Type localVarReturnType = new TypeToken(){}.getType();
        return apiClient.execute(call, localVarReturnType);
    }

    /**
     * Read the SCA status of the consent authorisation. (asynchronously)
     * This method returns the SCA status of a consent initiation's authorisation sub-resource. 
     * @param consentId ID of the corresponding consent object as returned by an Account Information Consent Request.  (required)
     * @param authorisationId Resource identification of the related SCA. (required)
     * @param xRequestID ID of the request, unique to the call, as determined by the initiating party. (required)
     * @param X_GTW_ASPSP_ID ASPSP ID in the registry for the request routing (optional)
     * @param xGTWBankCode Bank code of bank to which the request addressed (optional)
     * @param X_GTW_BIC Business Identifier Code for the request routing (optional)
     * @param digest Is contained if and only if the \"Signature\" element is contained in the header of the request. (optional)
     * @param signature A signature of the request by the TPP on application level. This might be mandated by ASPSP.  (optional)
     * @param tpPSignatureCertificate The certificate used for signing the request, in base64 encoding.  Must be contained if a signature is contained.  (optional)
     * @param psUIPAddress The forwarded IP Address header field consists of the corresponding HTTP request  IP Address field between PSU and TPP.  It shall be contained if and only if this request was actively initiated by the PSU.  (optional)
     * @param psUIPPort The forwarded IP Port header field consists of the corresponding HTTP request IP Port field between PSU and TPP, if available.  (optional)
     * @param psUAccept The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available.  (optional)
     * @param psUAcceptCharset The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available.  (optional)
     * @param psUAcceptEncoding The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available.  (optional)
     * @param psUAcceptLanguage The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available.  (optional)
     * @param psUUserAgent The forwarded Agent header field of the HTTP request between PSU and TPP, if available.  (optional)
     * @param psUHttpMethod HTTP method used at the PSU ? TPP interface, if available. Valid values are: * GET * POST * PUT * PATCH * DELETE  (optional)
     * @param psUDeviceID UUID (Universally Unique Identifier) for a device, which is used by the PSU, if available. UUID identifies either a device or a device dependant application installation. In case of an installation identification this ID need to be unaltered until removal from device.  (optional)
     * @param psUGeoLocation The forwarded Geo Location of the corresponding http request between PSU and TPP if available.  (optional)
     * @param callback The callback to be executed when the API call finishes
     * @return The request call
     * @throws ApiException If fail to process the API call, e.g. serializing the request body object
     */
    public com.squareup.okhttp.Call getConsentScaStatusAsync(String consentId, String authorisationId, UUID xRequestID, String X_GTW_ASPSP_ID, String xGTWBankCode, String X_GTW_BIC, String digest, String signature, byte[] tpPSignatureCertificate, String psUIPAddress, String psUIPPort, String psUAccept, String psUAcceptCharset, String psUAcceptEncoding, String psUAcceptLanguage, String psUUserAgent, String psUHttpMethod, UUID psUDeviceID, String psUGeoLocation, final ApiCallback callback) throws ApiException {

        ProgressResponseBody.ProgressListener progressListener = null;
        ProgressRequestBody.ProgressRequestListener progressRequestListener = null;

        if (callback != null) {
            progressListener = new ProgressResponseBody.ProgressListener() {
                @Override
                public void update(long bytesRead, long contentLength, boolean done) {
                    callback.onDownloadProgress(bytesRead, contentLength, done);
                }
            };

            progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
                @Override
                public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
                    callback.onUploadProgress(bytesWritten, contentLength, done);
                }
            };
        }

        com.squareup.okhttp.Call call = getConsentScaStatusValidateBeforeCall(consentId, authorisationId, xRequestID, X_GTW_ASPSP_ID, xGTWBankCode, X_GTW_BIC, digest, signature, tpPSignatureCertificate, psUIPAddress, psUIPPort, psUAccept, psUAcceptCharset, psUAcceptEncoding, psUAcceptLanguage, psUUserAgent, psUHttpMethod, psUDeviceID, psUGeoLocation, progressListener, progressRequestListener);
        Type localVarReturnType = new TypeToken(){}.getType();
        apiClient.executeAsync(call, localVarReturnType, callback);
        return call;
    }
    /**
     * Build call for getConsentStatus
     * @param consentId ID of the corresponding consent object as returned by an Account Information Consent Request.  (required)
     * @param xRequestID ID of the request, unique to the call, as determined by the initiating party. (required)
     * @param X_GTW_ASPSP_ID ASPSP ID in the registry for the request routing (optional)
     * @param xGTWBankCode Bank code of bank to which the request addressed (optional)
     * @param X_GTW_BIC Business Identifier Code for the request routing (optional)
     * @param digest Is contained if and only if the \"Signature\" element is contained in the header of the request. (optional)
     * @param signature A signature of the request by the TPP on application level. This might be mandated by ASPSP.  (optional)
     * @param tpPSignatureCertificate The certificate used for signing the request, in base64 encoding.  Must be contained if a signature is contained.  (optional)
     * @param psUIPAddress The forwarded IP Address header field consists of the corresponding HTTP request  IP Address field between PSU and TPP.  It shall be contained if and only if this request was actively initiated by the PSU.  (optional)
     * @param psUIPPort The forwarded IP Port header field consists of the corresponding HTTP request IP Port field between PSU and TPP, if available.  (optional)
     * @param psUAccept The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available.  (optional)
     * @param psUAcceptCharset The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available.  (optional)
     * @param psUAcceptEncoding The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available.  (optional)
     * @param psUAcceptLanguage The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available.  (optional)
     * @param psUUserAgent The forwarded Agent header field of the HTTP request between PSU and TPP, if available.  (optional)
     * @param psUHttpMethod HTTP method used at the PSU ? TPP interface, if available. Valid values are: * GET * POST * PUT * PATCH * DELETE  (optional)
     * @param psUDeviceID UUID (Universally Unique Identifier) for a device, which is used by the PSU, if available. UUID identifies either a device or a device dependant application installation. In case of an installation identification this ID need to be unaltered until removal from device.  (optional)
     * @param psUGeoLocation The forwarded Geo Location of the corresponding http request between PSU and TPP if available.  (optional)
     * @param progressListener Progress listener
     * @param progressRequestListener Progress request listener
     * @return Call to execute
     * @throws ApiException If fail to serialize the request body object
     */
    public com.squareup.okhttp.Call getConsentStatusCall(String consentId, UUID xRequestID, String X_GTW_ASPSP_ID, String xGTWBankCode, String X_GTW_BIC, String digest, String signature, byte[] tpPSignatureCertificate, String psUIPAddress, String psUIPPort, String psUAccept, String psUAcceptCharset, String psUAcceptEncoding, String psUAcceptLanguage, String psUUserAgent, String psUHttpMethod, UUID psUDeviceID, String psUGeoLocation, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
        Object localVarPostBody = null;
        
        // create path and map variables
        String localVarPath = "/v1/consents/{consentId}/status"
            .replaceAll("\\{" + "consentId" + "\\}", apiClient.escapeString(consentId.toString()));

        List localVarQueryParams = new ArrayList();
        List localVarCollectionQueryParams = new ArrayList();

        Map localVarHeaderParams = new HashMap();
        if (X_GTW_ASPSP_ID != null)
        localVarHeaderParams.put("X-GTW-ASPSP-ID", apiClient.parameterToString(X_GTW_ASPSP_ID));
        if (xGTWBankCode != null)
        localVarHeaderParams.put("X-GTW-Bank-Code", apiClient.parameterToString(xGTWBankCode));
        if (X_GTW_BIC != null)
        localVarHeaderParams.put("X-GTW-BIC", apiClient.parameterToString(X_GTW_BIC));
        if (xRequestID != null)
        localVarHeaderParams.put("X-Request-ID", apiClient.parameterToString(xRequestID));
        if (digest != null)
        localVarHeaderParams.put("Digest", apiClient.parameterToString(digest));
        if (signature != null)
        localVarHeaderParams.put("Signature", apiClient.parameterToString(signature));
        if (tpPSignatureCertificate != null)
        localVarHeaderParams.put("TPP-Signature-Certificate", apiClient.parameterToString(tpPSignatureCertificate));
        if (psUIPAddress != null)
        localVarHeaderParams.put("PSU-IP-Address", apiClient.parameterToString(psUIPAddress));
        if (psUIPPort != null)
        localVarHeaderParams.put("PSU-IP-Port", apiClient.parameterToString(psUIPPort));
        if (psUAccept != null)
        localVarHeaderParams.put("PSU-Accept", apiClient.parameterToString(psUAccept));
        if (psUAcceptCharset != null)
        localVarHeaderParams.put("PSU-Accept-Charset", apiClient.parameterToString(psUAcceptCharset));
        if (psUAcceptEncoding != null)
        localVarHeaderParams.put("PSU-Accept-Encoding", apiClient.parameterToString(psUAcceptEncoding));
        if (psUAcceptLanguage != null)
        localVarHeaderParams.put("PSU-Accept-Language", apiClient.parameterToString(psUAcceptLanguage));
        if (psUUserAgent != null)
        localVarHeaderParams.put("PSU-User-Agent", apiClient.parameterToString(psUUserAgent));
        if (psUHttpMethod != null)
        localVarHeaderParams.put("PSU-Http-Method", apiClient.parameterToString(psUHttpMethod));
        if (psUDeviceID != null)
        localVarHeaderParams.put("PSU-Device-ID", apiClient.parameterToString(psUDeviceID));
        if (psUGeoLocation != null)
        localVarHeaderParams.put("PSU-Geo-Location", apiClient.parameterToString(psUGeoLocation));

        Map localVarFormParams = new HashMap();

        final String[] localVarAccepts = {
            "application/json", "application/problem+json"
        };
        final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
        if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);

        final String[] localVarContentTypes = {
            
        };
        final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
        localVarHeaderParams.put("Content-Type", localVarContentType);

        if(progressListener != null) {
            apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
                @Override
                public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
                    com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
                    return originalResponse.newBuilder()
                    .body(new ProgressResponseBody(originalResponse.body(), progressListener))
                    .build();
                }
            });
        }

        String[] localVarAuthNames = new String[] { "BearerAuthOAuth" };
        return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
    }
    
    @SuppressWarnings("rawtypes")
    private com.squareup.okhttp.Call getConsentStatusValidateBeforeCall(String consentId, UUID xRequestID, String X_GTW_ASPSP_ID, String xGTWBankCode, String X_GTW_BIC, String digest, String signature, byte[] tpPSignatureCertificate, String psUIPAddress, String psUIPPort, String psUAccept, String psUAcceptCharset, String psUAcceptEncoding, String psUAcceptLanguage, String psUUserAgent, String psUHttpMethod, UUID psUDeviceID, String psUGeoLocation, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
        // verify the required parameter 'consentId' is set
        if (consentId == null) {
            throw new ApiException("Missing the required parameter 'consentId' when calling getConsentStatus(Async)");
        }
        // verify the required parameter 'xRequestID' is set
        if (xRequestID == null) {
            throw new ApiException("Missing the required parameter 'xRequestID' when calling getConsentStatus(Async)");
        }
        
        com.squareup.okhttp.Call call = getConsentStatusCall(consentId, xRequestID, X_GTW_ASPSP_ID, xGTWBankCode, X_GTW_BIC, digest, signature, tpPSignatureCertificate, psUIPAddress, psUIPPort, psUAccept, psUAcceptCharset, psUAcceptEncoding, psUAcceptLanguage, psUUserAgent, psUHttpMethod, psUDeviceID, psUGeoLocation, progressListener, progressRequestListener);
        return call;

        
        
        
        
    }

    /**
     * Consent status request
     * Read the status of an account information consent resource.
     * @param consentId ID of the corresponding consent object as returned by an Account Information Consent Request.  (required)
     * @param xRequestID ID of the request, unique to the call, as determined by the initiating party. (required)
     * @param X_GTW_ASPSP_ID ASPSP ID in the registry for the request routing (optional)
     * @param xGTWBankCode Bank code of bank to which the request addressed (optional)
     * @param X_GTW_BIC Business Identifier Code for the request routing (optional)
     * @param digest Is contained if and only if the \"Signature\" element is contained in the header of the request. (optional)
     * @param signature A signature of the request by the TPP on application level. This might be mandated by ASPSP.  (optional)
     * @param tpPSignatureCertificate The certificate used for signing the request, in base64 encoding.  Must be contained if a signature is contained.  (optional)
     * @param psUIPAddress The forwarded IP Address header field consists of the corresponding HTTP request  IP Address field between PSU and TPP.  It shall be contained if and only if this request was actively initiated by the PSU.  (optional)
     * @param psUIPPort The forwarded IP Port header field consists of the corresponding HTTP request IP Port field between PSU and TPP, if available.  (optional)
     * @param psUAccept The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available.  (optional)
     * @param psUAcceptCharset The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available.  (optional)
     * @param psUAcceptEncoding The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available.  (optional)
     * @param psUAcceptLanguage The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available.  (optional)
     * @param psUUserAgent The forwarded Agent header field of the HTTP request between PSU and TPP, if available.  (optional)
     * @param psUHttpMethod HTTP method used at the PSU ? TPP interface, if available. Valid values are: * GET * POST * PUT * PATCH * DELETE  (optional)
     * @param psUDeviceID UUID (Universally Unique Identifier) for a device, which is used by the PSU, if available. UUID identifies either a device or a device dependant application installation. In case of an installation identification this ID need to be unaltered until removal from device.  (optional)
     * @param psUGeoLocation The forwarded Geo Location of the corresponding http request between PSU and TPP if available.  (optional)
     * @return ConsentStatusResponse200
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public ConsentStatusResponse200 getConsentStatus(String consentId, UUID xRequestID, String X_GTW_ASPSP_ID, String xGTWBankCode, String X_GTW_BIC, String digest, String signature, byte[] tpPSignatureCertificate, String psUIPAddress, String psUIPPort, String psUAccept, String psUAcceptCharset, String psUAcceptEncoding, String psUAcceptLanguage, String psUUserAgent, String psUHttpMethod, UUID psUDeviceID, String psUGeoLocation) throws ApiException {
        ApiResponse resp = getConsentStatusWithHttpInfo(consentId, xRequestID, X_GTW_ASPSP_ID, xGTWBankCode, X_GTW_BIC, digest, signature, tpPSignatureCertificate, psUIPAddress, psUIPPort, psUAccept, psUAcceptCharset, psUAcceptEncoding, psUAcceptLanguage, psUUserAgent, psUHttpMethod, psUDeviceID, psUGeoLocation);
        return resp.getData();
    }

    /**
     * Consent status request
     * Read the status of an account information consent resource.
     * @param consentId ID of the corresponding consent object as returned by an Account Information Consent Request.  (required)
     * @param xRequestID ID of the request, unique to the call, as determined by the initiating party. (required)
     * @param X_GTW_ASPSP_ID ASPSP ID in the registry for the request routing (optional)
     * @param xGTWBankCode Bank code of bank to which the request addressed (optional)
     * @param X_GTW_BIC Business Identifier Code for the request routing (optional)
     * @param digest Is contained if and only if the \"Signature\" element is contained in the header of the request. (optional)
     * @param signature A signature of the request by the TPP on application level. This might be mandated by ASPSP.  (optional)
     * @param tpPSignatureCertificate The certificate used for signing the request, in base64 encoding.  Must be contained if a signature is contained.  (optional)
     * @param psUIPAddress The forwarded IP Address header field consists of the corresponding HTTP request  IP Address field between PSU and TPP.  It shall be contained if and only if this request was actively initiated by the PSU.  (optional)
     * @param psUIPPort The forwarded IP Port header field consists of the corresponding HTTP request IP Port field between PSU and TPP, if available.  (optional)
     * @param psUAccept The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available.  (optional)
     * @param psUAcceptCharset The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available.  (optional)
     * @param psUAcceptEncoding The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available.  (optional)
     * @param psUAcceptLanguage The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available.  (optional)
     * @param psUUserAgent The forwarded Agent header field of the HTTP request between PSU and TPP, if available.  (optional)
     * @param psUHttpMethod HTTP method used at the PSU ? TPP interface, if available. Valid values are: * GET * POST * PUT * PATCH * DELETE  (optional)
     * @param psUDeviceID UUID (Universally Unique Identifier) for a device, which is used by the PSU, if available. UUID identifies either a device or a device dependant application installation. In case of an installation identification this ID need to be unaltered until removal from device.  (optional)
     * @param psUGeoLocation The forwarded Geo Location of the corresponding http request between PSU and TPP if available.  (optional)
     * @return ApiResponse<ConsentStatusResponse200>
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public ApiResponse getConsentStatusWithHttpInfo(String consentId, UUID xRequestID, String X_GTW_ASPSP_ID, String xGTWBankCode, String X_GTW_BIC, String digest, String signature, byte[] tpPSignatureCertificate, String psUIPAddress, String psUIPPort, String psUAccept, String psUAcceptCharset, String psUAcceptEncoding, String psUAcceptLanguage, String psUUserAgent, String psUHttpMethod, UUID psUDeviceID, String psUGeoLocation) throws ApiException {
        com.squareup.okhttp.Call call = getConsentStatusValidateBeforeCall(consentId, xRequestID, X_GTW_ASPSP_ID, xGTWBankCode, X_GTW_BIC, digest, signature, tpPSignatureCertificate, psUIPAddress, psUIPPort, psUAccept, psUAcceptCharset, psUAcceptEncoding, psUAcceptLanguage, psUUserAgent, psUHttpMethod, psUDeviceID, psUGeoLocation, null, null);
        Type localVarReturnType = new TypeToken(){}.getType();
        return apiClient.execute(call, localVarReturnType);
    }

    /**
     * Consent status request (asynchronously)
     * Read the status of an account information consent resource.
     * @param consentId ID of the corresponding consent object as returned by an Account Information Consent Request.  (required)
     * @param xRequestID ID of the request, unique to the call, as determined by the initiating party. (required)
     * @param X_GTW_ASPSP_ID ASPSP ID in the registry for the request routing (optional)
     * @param xGTWBankCode Bank code of bank to which the request addressed (optional)
     * @param X_GTW_BIC Business Identifier Code for the request routing (optional)
     * @param digest Is contained if and only if the \"Signature\" element is contained in the header of the request. (optional)
     * @param signature A signature of the request by the TPP on application level. This might be mandated by ASPSP.  (optional)
     * @param tpPSignatureCertificate The certificate used for signing the request, in base64 encoding.  Must be contained if a signature is contained.  (optional)
     * @param psUIPAddress The forwarded IP Address header field consists of the corresponding HTTP request  IP Address field between PSU and TPP.  It shall be contained if and only if this request was actively initiated by the PSU.  (optional)
     * @param psUIPPort The forwarded IP Port header field consists of the corresponding HTTP request IP Port field between PSU and TPP, if available.  (optional)
     * @param psUAccept The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available.  (optional)
     * @param psUAcceptCharset The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available.  (optional)
     * @param psUAcceptEncoding The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available.  (optional)
     * @param psUAcceptLanguage The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available.  (optional)
     * @param psUUserAgent The forwarded Agent header field of the HTTP request between PSU and TPP, if available.  (optional)
     * @param psUHttpMethod HTTP method used at the PSU ? TPP interface, if available. Valid values are: * GET * POST * PUT * PATCH * DELETE  (optional)
     * @param psUDeviceID UUID (Universally Unique Identifier) for a device, which is used by the PSU, if available. UUID identifies either a device or a device dependant application installation. In case of an installation identification this ID need to be unaltered until removal from device.  (optional)
     * @param psUGeoLocation The forwarded Geo Location of the corresponding http request between PSU and TPP if available.  (optional)
     * @param callback The callback to be executed when the API call finishes
     * @return The request call
     * @throws ApiException If fail to process the API call, e.g. serializing the request body object
     */
    public com.squareup.okhttp.Call getConsentStatusAsync(String consentId, UUID xRequestID, String X_GTW_ASPSP_ID, String xGTWBankCode, String X_GTW_BIC, String digest, String signature, byte[] tpPSignatureCertificate, String psUIPAddress, String psUIPPort, String psUAccept, String psUAcceptCharset, String psUAcceptEncoding, String psUAcceptLanguage, String psUUserAgent, String psUHttpMethod, UUID psUDeviceID, String psUGeoLocation, final ApiCallback callback) throws ApiException {

        ProgressResponseBody.ProgressListener progressListener = null;
        ProgressRequestBody.ProgressRequestListener progressRequestListener = null;

        if (callback != null) {
            progressListener = new ProgressResponseBody.ProgressListener() {
                @Override
                public void update(long bytesRead, long contentLength, boolean done) {
                    callback.onDownloadProgress(bytesRead, contentLength, done);
                }
            };

            progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
                @Override
                public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
                    callback.onUploadProgress(bytesWritten, contentLength, done);
                }
            };
        }

        com.squareup.okhttp.Call call = getConsentStatusValidateBeforeCall(consentId, xRequestID, X_GTW_ASPSP_ID, xGTWBankCode, X_GTW_BIC, digest, signature, tpPSignatureCertificate, psUIPAddress, psUIPPort, psUAccept, psUAcceptCharset, psUAcceptEncoding, psUAcceptLanguage, psUUserAgent, psUHttpMethod, psUDeviceID, psUGeoLocation, progressListener, progressRequestListener);
        Type localVarReturnType = new TypeToken(){}.getType();
        apiClient.executeAsync(call, localVarReturnType, callback);
        return call;
    }
    /**
     * Build call for getTransactionDetails
     * @param accountId This identification is denoting the addressed account.  The account-id is retrieved by using a \"Read Account List\" call.  The account-id is the \"id\" attribute of the account structure.  Its value is constant at least throughout the lifecycle of a given consent.  (required)
     * @param transactionId This identification is given by the attribute transactionId of the corresponding entry of a transaction list.  (required)
     * @param xRequestID ID of the request, unique to the call, as determined by the initiating party. (required)
     * @param consentID This then contains the consentId of the related AIS consent, which was performed prior to this payment initiation.  (required)
     * @param X_GTW_ASPSP_ID ASPSP ID in the registry for the request routing (optional)
     * @param xGTWBankCode Bank code of bank to which the request addressed (optional)
     * @param X_GTW_BIC Business Identifier Code for the request routing (optional)
     * @param digest Is contained if and only if the \"Signature\" element is contained in the header of the request. (optional)
     * @param signature A signature of the request by the TPP on application level. This might be mandated by ASPSP.  (optional)
     * @param tpPSignatureCertificate The certificate used for signing the request, in base64 encoding.  Must be contained if a signature is contained.  (optional)
     * @param psUIPAddress The forwarded IP Address header field consists of the corresponding HTTP request  IP Address field between PSU and TPP.  It shall be contained if and only if this request was actively initiated by the PSU.  (optional)
     * @param psUIPPort The forwarded IP Port header field consists of the corresponding HTTP request IP Port field between PSU and TPP, if available.  (optional)
     * @param psUAccept The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available.  (optional)
     * @param psUAcceptCharset The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available.  (optional)
     * @param psUAcceptEncoding The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available.  (optional)
     * @param psUAcceptLanguage The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available.  (optional)
     * @param psUUserAgent The forwarded Agent header field of the HTTP request between PSU and TPP, if available.  (optional)
     * @param psUHttpMethod HTTP method used at the PSU ? TPP interface, if available. Valid values are: * GET * POST * PUT * PATCH * DELETE  (optional)
     * @param psUDeviceID UUID (Universally Unique Identifier) for a device, which is used by the PSU, if available. UUID identifies either a device or a device dependant application installation. In case of an installation identification this ID need to be unaltered until removal from device.  (optional)
     * @param psUGeoLocation The forwarded Geo Location of the corresponding http request between PSU and TPP if available.  (optional)
     * @param progressListener Progress listener
     * @param progressRequestListener Progress request listener
     * @return Call to execute
     * @throws ApiException If fail to serialize the request body object
     */
    public com.squareup.okhttp.Call getTransactionDetailsCall(String accountId, String transactionId, UUID xRequestID, String consentID, String X_GTW_ASPSP_ID, String xGTWBankCode, String X_GTW_BIC, String digest, String signature, byte[] tpPSignatureCertificate, String psUIPAddress, String psUIPPort, String psUAccept, String psUAcceptCharset, String psUAcceptEncoding, String psUAcceptLanguage, String psUUserAgent, String psUHttpMethod, UUID psUDeviceID, String psUGeoLocation, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
        Object localVarPostBody = null;
        
        // create path and map variables
        String localVarPath = "/v1/accounts/{account-id}/transactions/{transactionId}"
            .replaceAll("\\{" + "account-id" + "\\}", apiClient.escapeString(accountId.toString()))
            .replaceAll("\\{" + "transactionId" + "\\}", apiClient.escapeString(transactionId.toString()));

        List localVarQueryParams = new ArrayList();
        List localVarCollectionQueryParams = new ArrayList();

        Map localVarHeaderParams = new HashMap();
        if (X_GTW_ASPSP_ID != null)
        localVarHeaderParams.put("X-GTW-ASPSP-ID", apiClient.parameterToString(X_GTW_ASPSP_ID));
        if (xGTWBankCode != null)
        localVarHeaderParams.put("X-GTW-Bank-Code", apiClient.parameterToString(xGTWBankCode));
        if (X_GTW_BIC != null)
        localVarHeaderParams.put("X-GTW-BIC", apiClient.parameterToString(X_GTW_BIC));
        if (xRequestID != null)
        localVarHeaderParams.put("X-Request-ID", apiClient.parameterToString(xRequestID));
        if (digest != null)
        localVarHeaderParams.put("Digest", apiClient.parameterToString(digest));
        if (signature != null)
        localVarHeaderParams.put("Signature", apiClient.parameterToString(signature));
        if (tpPSignatureCertificate != null)
        localVarHeaderParams.put("TPP-Signature-Certificate", apiClient.parameterToString(tpPSignatureCertificate));
        if (consentID != null)
        localVarHeaderParams.put("Consent-ID", apiClient.parameterToString(consentID));
        if (psUIPAddress != null)
        localVarHeaderParams.put("PSU-IP-Address", apiClient.parameterToString(psUIPAddress));
        if (psUIPPort != null)
        localVarHeaderParams.put("PSU-IP-Port", apiClient.parameterToString(psUIPPort));
        if (psUAccept != null)
        localVarHeaderParams.put("PSU-Accept", apiClient.parameterToString(psUAccept));
        if (psUAcceptCharset != null)
        localVarHeaderParams.put("PSU-Accept-Charset", apiClient.parameterToString(psUAcceptCharset));
        if (psUAcceptEncoding != null)
        localVarHeaderParams.put("PSU-Accept-Encoding", apiClient.parameterToString(psUAcceptEncoding));
        if (psUAcceptLanguage != null)
        localVarHeaderParams.put("PSU-Accept-Language", apiClient.parameterToString(psUAcceptLanguage));
        if (psUUserAgent != null)
        localVarHeaderParams.put("PSU-User-Agent", apiClient.parameterToString(psUUserAgent));
        if (psUHttpMethod != null)
        localVarHeaderParams.put("PSU-Http-Method", apiClient.parameterToString(psUHttpMethod));
        if (psUDeviceID != null)
        localVarHeaderParams.put("PSU-Device-ID", apiClient.parameterToString(psUDeviceID));
        if (psUGeoLocation != null)
        localVarHeaderParams.put("PSU-Geo-Location", apiClient.parameterToString(psUGeoLocation));

        Map localVarFormParams = new HashMap();

        final String[] localVarAccepts = {
            "application/json", "application/problem+json"
        };
        final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
        if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);

        final String[] localVarContentTypes = {
            
        };
        final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
        localVarHeaderParams.put("Content-Type", localVarContentType);

        if(progressListener != null) {
            apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
                @Override
                public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
                    com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
                    return originalResponse.newBuilder()
                    .body(new ProgressResponseBody(originalResponse.body(), progressListener))
                    .build();
                }
            });
        }

        String[] localVarAuthNames = new String[] { "BearerAuthOAuth" };
        return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
    }
    
    @SuppressWarnings("rawtypes")
    private com.squareup.okhttp.Call getTransactionDetailsValidateBeforeCall(String accountId, String transactionId, UUID xRequestID, String consentID, String X_GTW_ASPSP_ID, String xGTWBankCode, String X_GTW_BIC, String digest, String signature, byte[] tpPSignatureCertificate, String psUIPAddress, String psUIPPort, String psUAccept, String psUAcceptCharset, String psUAcceptEncoding, String psUAcceptLanguage, String psUUserAgent, String psUHttpMethod, UUID psUDeviceID, String psUGeoLocation, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
        // verify the required parameter 'accountId' is set
        if (accountId == null) {
            throw new ApiException("Missing the required parameter 'accountId' when calling getTransactionDetails(Async)");
        }
        // verify the required parameter 'transactionId' is set
        if (transactionId == null) {
            throw new ApiException("Missing the required parameter 'transactionId' when calling getTransactionDetails(Async)");
        }
        // verify the required parameter 'xRequestID' is set
        if (xRequestID == null) {
            throw new ApiException("Missing the required parameter 'xRequestID' when calling getTransactionDetails(Async)");
        }
        // verify the required parameter 'consentID' is set
        if (consentID == null) {
            throw new ApiException("Missing the required parameter 'consentID' when calling getTransactionDetails(Async)");
        }
        
        com.squareup.okhttp.Call call = getTransactionDetailsCall(accountId, transactionId, xRequestID, consentID, X_GTW_ASPSP_ID, xGTWBankCode, X_GTW_BIC, digest, signature, tpPSignatureCertificate, psUIPAddress, psUIPPort, psUAccept, psUAcceptCharset, psUAcceptEncoding, psUAcceptLanguage, psUUserAgent, psUHttpMethod, psUDeviceID, psUGeoLocation, progressListener, progressRequestListener);
        return call;

        
        
        
        
    }

    /**
     * Read Transaction Details
     * Reads transaction details from a given transaction addressed by \"transactionId\" on a given account addressed by \"account-id\".  This call is only available on transactions as reported in a JSON format.  **Remark:** Please note that the PATH might be already given in detail by the corresponding entry of the response of the  \"Read Transaction List\" call within the _links subfield. 
     * @param accountId This identification is denoting the addressed account.  The account-id is retrieved by using a \"Read Account List\" call.  The account-id is the \"id\" attribute of the account structure.  Its value is constant at least throughout the lifecycle of a given consent.  (required)
     * @param transactionId This identification is given by the attribute transactionId of the corresponding entry of a transaction list.  (required)
     * @param xRequestID ID of the request, unique to the call, as determined by the initiating party. (required)
     * @param consentID This then contains the consentId of the related AIS consent, which was performed prior to this payment initiation.  (required)
     * @param X_GTW_ASPSP_ID ASPSP ID in the registry for the request routing (optional)
     * @param xGTWBankCode Bank code of bank to which the request addressed (optional)
     * @param X_GTW_BIC Business Identifier Code for the request routing (optional)
     * @param digest Is contained if and only if the \"Signature\" element is contained in the header of the request. (optional)
     * @param signature A signature of the request by the TPP on application level. This might be mandated by ASPSP.  (optional)
     * @param tpPSignatureCertificate The certificate used for signing the request, in base64 encoding.  Must be contained if a signature is contained.  (optional)
     * @param psUIPAddress The forwarded IP Address header field consists of the corresponding HTTP request  IP Address field between PSU and TPP.  It shall be contained if and only if this request was actively initiated by the PSU.  (optional)
     * @param psUIPPort The forwarded IP Port header field consists of the corresponding HTTP request IP Port field between PSU and TPP, if available.  (optional)
     * @param psUAccept The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available.  (optional)
     * @param psUAcceptCharset The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available.  (optional)
     * @param psUAcceptEncoding The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available.  (optional)
     * @param psUAcceptLanguage The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available.  (optional)
     * @param psUUserAgent The forwarded Agent header field of the HTTP request between PSU and TPP, if available.  (optional)
     * @param psUHttpMethod HTTP method used at the PSU ? TPP interface, if available. Valid values are: * GET * POST * PUT * PATCH * DELETE  (optional)
     * @param psUDeviceID UUID (Universally Unique Identifier) for a device, which is used by the PSU, if available. UUID identifies either a device or a device dependant application installation. In case of an installation identification this ID need to be unaltered until removal from device.  (optional)
     * @param psUGeoLocation The forwarded Geo Location of the corresponding http request between PSU and TPP if available.  (optional)
     * @return InlineResponse200
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public InlineResponse200 getTransactionDetails(String accountId, String transactionId, UUID xRequestID, String consentID, String X_GTW_ASPSP_ID, String xGTWBankCode, String X_GTW_BIC, String digest, String signature, byte[] tpPSignatureCertificate, String psUIPAddress, String psUIPPort, String psUAccept, String psUAcceptCharset, String psUAcceptEncoding, String psUAcceptLanguage, String psUUserAgent, String psUHttpMethod, UUID psUDeviceID, String psUGeoLocation) throws ApiException {
        ApiResponse resp = getTransactionDetailsWithHttpInfo(accountId, transactionId, xRequestID, consentID, X_GTW_ASPSP_ID, xGTWBankCode, X_GTW_BIC, digest, signature, tpPSignatureCertificate, psUIPAddress, psUIPPort, psUAccept, psUAcceptCharset, psUAcceptEncoding, psUAcceptLanguage, psUUserAgent, psUHttpMethod, psUDeviceID, psUGeoLocation);
        return resp.getData();
    }

    /**
     * Read Transaction Details
     * Reads transaction details from a given transaction addressed by \"transactionId\" on a given account addressed by \"account-id\".  This call is only available on transactions as reported in a JSON format.  **Remark:** Please note that the PATH might be already given in detail by the corresponding entry of the response of the  \"Read Transaction List\" call within the _links subfield. 
     * @param accountId This identification is denoting the addressed account.  The account-id is retrieved by using a \"Read Account List\" call.  The account-id is the \"id\" attribute of the account structure.  Its value is constant at least throughout the lifecycle of a given consent.  (required)
     * @param transactionId This identification is given by the attribute transactionId of the corresponding entry of a transaction list.  (required)
     * @param xRequestID ID of the request, unique to the call, as determined by the initiating party. (required)
     * @param consentID This then contains the consentId of the related AIS consent, which was performed prior to this payment initiation.  (required)
     * @param X_GTW_ASPSP_ID ASPSP ID in the registry for the request routing (optional)
     * @param xGTWBankCode Bank code of bank to which the request addressed (optional)
     * @param X_GTW_BIC Business Identifier Code for the request routing (optional)
     * @param digest Is contained if and only if the \"Signature\" element is contained in the header of the request. (optional)
     * @param signature A signature of the request by the TPP on application level. This might be mandated by ASPSP.  (optional)
     * @param tpPSignatureCertificate The certificate used for signing the request, in base64 encoding.  Must be contained if a signature is contained.  (optional)
     * @param psUIPAddress The forwarded IP Address header field consists of the corresponding HTTP request  IP Address field between PSU and TPP.  It shall be contained if and only if this request was actively initiated by the PSU.  (optional)
     * @param psUIPPort The forwarded IP Port header field consists of the corresponding HTTP request IP Port field between PSU and TPP, if available.  (optional)
     * @param psUAccept The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available.  (optional)
     * @param psUAcceptCharset The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available.  (optional)
     * @param psUAcceptEncoding The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available.  (optional)
     * @param psUAcceptLanguage The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available.  (optional)
     * @param psUUserAgent The forwarded Agent header field of the HTTP request between PSU and TPP, if available.  (optional)
     * @param psUHttpMethod HTTP method used at the PSU ? TPP interface, if available. Valid values are: * GET * POST * PUT * PATCH * DELETE  (optional)
     * @param psUDeviceID UUID (Universally Unique Identifier) for a device, which is used by the PSU, if available. UUID identifies either a device or a device dependant application installation. In case of an installation identification this ID need to be unaltered until removal from device.  (optional)
     * @param psUGeoLocation The forwarded Geo Location of the corresponding http request between PSU and TPP if available.  (optional)
     * @return ApiResponse<InlineResponse200>
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public ApiResponse getTransactionDetailsWithHttpInfo(String accountId, String transactionId, UUID xRequestID, String consentID, String X_GTW_ASPSP_ID, String xGTWBankCode, String X_GTW_BIC, String digest, String signature, byte[] tpPSignatureCertificate, String psUIPAddress, String psUIPPort, String psUAccept, String psUAcceptCharset, String psUAcceptEncoding, String psUAcceptLanguage, String psUUserAgent, String psUHttpMethod, UUID psUDeviceID, String psUGeoLocation) throws ApiException {
        com.squareup.okhttp.Call call = getTransactionDetailsValidateBeforeCall(accountId, transactionId, xRequestID, consentID, X_GTW_ASPSP_ID, xGTWBankCode, X_GTW_BIC, digest, signature, tpPSignatureCertificate, psUIPAddress, psUIPPort, psUAccept, psUAcceptCharset, psUAcceptEncoding, psUAcceptLanguage, psUUserAgent, psUHttpMethod, psUDeviceID, psUGeoLocation, null, null);
        Type localVarReturnType = new TypeToken(){}.getType();
        return apiClient.execute(call, localVarReturnType);
    }

    /**
     * Read Transaction Details (asynchronously)
     * Reads transaction details from a given transaction addressed by \"transactionId\" on a given account addressed by \"account-id\".  This call is only available on transactions as reported in a JSON format.  **Remark:** Please note that the PATH might be already given in detail by the corresponding entry of the response of the  \"Read Transaction List\" call within the _links subfield. 
     * @param accountId This identification is denoting the addressed account.  The account-id is retrieved by using a \"Read Account List\" call.  The account-id is the \"id\" attribute of the account structure.  Its value is constant at least throughout the lifecycle of a given consent.  (required)
     * @param transactionId This identification is given by the attribute transactionId of the corresponding entry of a transaction list.  (required)
     * @param xRequestID ID of the request, unique to the call, as determined by the initiating party. (required)
     * @param consentID This then contains the consentId of the related AIS consent, which was performed prior to this payment initiation.  (required)
     * @param X_GTW_ASPSP_ID ASPSP ID in the registry for the request routing (optional)
     * @param xGTWBankCode Bank code of bank to which the request addressed (optional)
     * @param X_GTW_BIC Business Identifier Code for the request routing (optional)
     * @param digest Is contained if and only if the \"Signature\" element is contained in the header of the request. (optional)
     * @param signature A signature of the request by the TPP on application level. This might be mandated by ASPSP.  (optional)
     * @param tpPSignatureCertificate The certificate used for signing the request, in base64 encoding.  Must be contained if a signature is contained.  (optional)
     * @param psUIPAddress The forwarded IP Address header field consists of the corresponding HTTP request  IP Address field between PSU and TPP.  It shall be contained if and only if this request was actively initiated by the PSU.  (optional)
     * @param psUIPPort The forwarded IP Port header field consists of the corresponding HTTP request IP Port field between PSU and TPP, if available.  (optional)
     * @param psUAccept The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available.  (optional)
     * @param psUAcceptCharset The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available.  (optional)
     * @param psUAcceptEncoding The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available.  (optional)
     * @param psUAcceptLanguage The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available.  (optional)
     * @param psUUserAgent The forwarded Agent header field of the HTTP request between PSU and TPP, if available.  (optional)
     * @param psUHttpMethod HTTP method used at the PSU ? TPP interface, if available. Valid values are: * GET * POST * PUT * PATCH * DELETE  (optional)
     * @param psUDeviceID UUID (Universally Unique Identifier) for a device, which is used by the PSU, if available. UUID identifies either a device or a device dependant application installation. In case of an installation identification this ID need to be unaltered until removal from device.  (optional)
     * @param psUGeoLocation The forwarded Geo Location of the corresponding http request between PSU and TPP if available.  (optional)
     * @param callback The callback to be executed when the API call finishes
     * @return The request call
     * @throws ApiException If fail to process the API call, e.g. serializing the request body object
     */
    public com.squareup.okhttp.Call getTransactionDetailsAsync(String accountId, String transactionId, UUID xRequestID, String consentID, String X_GTW_ASPSP_ID, String xGTWBankCode, String X_GTW_BIC, String digest, String signature, byte[] tpPSignatureCertificate, String psUIPAddress, String psUIPPort, String psUAccept, String psUAcceptCharset, String psUAcceptEncoding, String psUAcceptLanguage, String psUUserAgent, String psUHttpMethod, UUID psUDeviceID, String psUGeoLocation, final ApiCallback callback) throws ApiException {

        ProgressResponseBody.ProgressListener progressListener = null;
        ProgressRequestBody.ProgressRequestListener progressRequestListener = null;

        if (callback != null) {
            progressListener = new ProgressResponseBody.ProgressListener() {
                @Override
                public void update(long bytesRead, long contentLength, boolean done) {
                    callback.onDownloadProgress(bytesRead, contentLength, done);
                }
            };

            progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
                @Override
                public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
                    callback.onUploadProgress(bytesWritten, contentLength, done);
                }
            };
        }

        com.squareup.okhttp.Call call = getTransactionDetailsValidateBeforeCall(accountId, transactionId, xRequestID, consentID, X_GTW_ASPSP_ID, xGTWBankCode, X_GTW_BIC, digest, signature, tpPSignatureCertificate, psUIPAddress, psUIPPort, psUAccept, psUAcceptCharset, psUAcceptEncoding, psUAcceptLanguage, psUUserAgent, psUHttpMethod, psUDeviceID, psUGeoLocation, progressListener, progressRequestListener);
        Type localVarReturnType = new TypeToken(){}.getType();
        apiClient.executeAsync(call, localVarReturnType, callback);
        return call;
    }
    /**
     * Build call for getTransactionList
     * @param accountId This identification is denoting the addressed account.  The account-id is retrieved by using a \"Read Account List\" call.  The account-id is the \"id\" attribute of the account structure.  Its value is constant at least throughout the lifecycle of a given consent.  (required)
     * @param bookingStatus Permitted codes are    * \"booked\",   * \"pending\" and    * \"both\" \"booked\" shall be supported by the ASPSP. To support the \"pending\" and \"both\" feature is optional for the ASPSP,  Error code if not supported in the online banking frontend  (required)
     * @param xRequestID ID of the request, unique to the call, as determined by the initiating party. (required)
     * @param consentID This then contains the consentId of the related AIS consent, which was performed prior to this payment initiation.  (required)
     * @param X_GTW_ASPSP_ID ASPSP ID in the registry for the request routing (optional)
     * @param xGTWBankCode Bank code of bank to which the request addressed (optional)
     * @param X_GTW_BIC Business Identifier Code for the request routing (optional)
     * @param dateFrom Conditional: Starting date (inclusive the date dateFrom) of the transaction list, mandated if no delta access is required.  For booked transactions, the relevant date is the booking date.   For pending transactions, the relevant date is the entry date, which may not be transparent  neither in this API nor other channels of the ASPSP.  (optional)
     * @param dateTo End date (inclusive the data dateTo) of the transaction list, default is \"now\" if not given.   Might be ignored if a delta function is used.  For booked transactions, the relevant date is the booking date.   For pending transactions, the relevant date is the entry date, which may not be transparent  neither in this API nor other channels of the ASPSP.  (optional)
     * @param entryReferenceFrom This data attribute is indicating that the AISP is in favour to get all transactions after  the transaction with identification entryReferenceFrom alternatively to the above defined period.  This is a implementation of a delta access.  If this data element is contained, the entries \"dateFrom\" and \"dateTo\" might be ignored by the ASPSP  if a delta report is supported.  Optional if supported by API provider.  (optional)
     * @param deltaList This data attribute is indicating that the AISP is in favour to get all transactions after the last report access for this PSU on the addressed account. This is another implementation of a delta access-report. This delta indicator might be rejected by the ASPSP if this function is not supported. Optional if supported by API provider (optional)
     * @param withBalance If contained, this function reads the list of accessible payment accounts including the booking balance,  if granted by the PSU in the related consent and available by the ASPSP.  This parameter might be ignored by the ASPSP.   (optional)
     * @param digest Is contained if and only if the \"Signature\" element is contained in the header of the request. (optional)
     * @param signature A signature of the request by the TPP on application level. This might be mandated by ASPSP.  (optional)
     * @param tpPSignatureCertificate The certificate used for signing the request, in base64 encoding.  Must be contained if a signature is contained.  (optional)
     * @param psUIPAddress The forwarded IP Address header field consists of the corresponding HTTP request  IP Address field between PSU and TPP.  It shall be contained if and only if this request was actively initiated by the PSU.  (optional)
     * @param psUIPPort The forwarded IP Port header field consists of the corresponding HTTP request IP Port field between PSU and TPP, if available.  (optional)
     * @param psUAccept The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available.  (optional)
     * @param psUAcceptCharset The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available.  (optional)
     * @param psUAcceptEncoding The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available.  (optional)
     * @param psUAcceptLanguage The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available.  (optional)
     * @param psUUserAgent The forwarded Agent header field of the HTTP request between PSU and TPP, if available.  (optional)
     * @param psUHttpMethod HTTP method used at the PSU ? TPP interface, if available. Valid values are: * GET * POST * PUT * PATCH * DELETE  (optional)
     * @param psUDeviceID UUID (Universally Unique Identifier) for a device, which is used by the PSU, if available. UUID identifies either a device or a device dependant application installation. In case of an installation identification this ID need to be unaltered until removal from device.  (optional)
     * @param psUGeoLocation The forwarded Geo Location of the corresponding http request between PSU and TPP if available.  (optional)
     * @param progressListener Progress listener
     * @param progressRequestListener Progress request listener
     * @return Call to execute
     * @throws ApiException If fail to serialize the request body object
     */
    public com.squareup.okhttp.Call getTransactionListCall(String accountId, String bookingStatus, UUID xRequestID, String consentID, String X_GTW_ASPSP_ID, String xGTWBankCode, String X_GTW_BIC, LocalDate dateFrom, LocalDate dateTo, String entryReferenceFrom, Boolean deltaList, Boolean withBalance, String digest, String signature, byte[] tpPSignatureCertificate, String psUIPAddress, String psUIPPort, String psUAccept, String psUAcceptCharset, String psUAcceptEncoding, String psUAcceptLanguage, String psUUserAgent, String psUHttpMethod, UUID psUDeviceID, String psUGeoLocation, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
        Object localVarPostBody = null;
        
        // create path and map variables
        String localVarPath = "/v1/accounts/{account-id}/transactions"
            .replaceAll("\\{" + "account-id" + "\\}", apiClient.escapeString(accountId.toString()));

        List localVarQueryParams = new ArrayList();
        List localVarCollectionQueryParams = new ArrayList();
        if (dateFrom != null)
        localVarQueryParams.addAll(apiClient.parameterToPair("dateFrom", dateFrom));
        if (dateTo != null)
        localVarQueryParams.addAll(apiClient.parameterToPair("dateTo", dateTo));
        if (entryReferenceFrom != null)
        localVarQueryParams.addAll(apiClient.parameterToPair("entryReferenceFrom", entryReferenceFrom));
        if (bookingStatus != null)
        localVarQueryParams.addAll(apiClient.parameterToPair("bookingStatus", bookingStatus));
        if (deltaList != null)
        localVarQueryParams.addAll(apiClient.parameterToPair("deltaList", deltaList));
        if (withBalance != null)
        localVarQueryParams.addAll(apiClient.parameterToPair("withBalance", withBalance));

        Map localVarHeaderParams = new HashMap();
        if (X_GTW_ASPSP_ID != null)
        localVarHeaderParams.put("X-GTW-ASPSP-ID", apiClient.parameterToString(X_GTW_ASPSP_ID));
        if (xGTWBankCode != null)
        localVarHeaderParams.put("X-GTW-Bank-Code", apiClient.parameterToString(xGTWBankCode));
        if (X_GTW_BIC != null)
        localVarHeaderParams.put("X-GTW-BIC", apiClient.parameterToString(X_GTW_BIC));
        if (xRequestID != null)
        localVarHeaderParams.put("X-Request-ID", apiClient.parameterToString(xRequestID));
        if (digest != null)
        localVarHeaderParams.put("Digest", apiClient.parameterToString(digest));
        if (signature != null)
        localVarHeaderParams.put("Signature", apiClient.parameterToString(signature));
        if (tpPSignatureCertificate != null)
        localVarHeaderParams.put("TPP-Signature-Certificate", apiClient.parameterToString(tpPSignatureCertificate));
        if (consentID != null)
        localVarHeaderParams.put("Consent-ID", apiClient.parameterToString(consentID));
        if (psUIPAddress != null)
        localVarHeaderParams.put("PSU-IP-Address", apiClient.parameterToString(psUIPAddress));
        if (psUIPPort != null)
        localVarHeaderParams.put("PSU-IP-Port", apiClient.parameterToString(psUIPPort));
        if (psUAccept != null)
        localVarHeaderParams.put("PSU-Accept", apiClient.parameterToString(psUAccept));
        if (psUAcceptCharset != null)
        localVarHeaderParams.put("PSU-Accept-Charset", apiClient.parameterToString(psUAcceptCharset));
        if (psUAcceptEncoding != null)
        localVarHeaderParams.put("PSU-Accept-Encoding", apiClient.parameterToString(psUAcceptEncoding));
        if (psUAcceptLanguage != null)
        localVarHeaderParams.put("PSU-Accept-Language", apiClient.parameterToString(psUAcceptLanguage));
        if (psUUserAgent != null)
        localVarHeaderParams.put("PSU-User-Agent", apiClient.parameterToString(psUUserAgent));
        if (psUHttpMethod != null)
        localVarHeaderParams.put("PSU-Http-Method", apiClient.parameterToString(psUHttpMethod));
        if (psUDeviceID != null)
        localVarHeaderParams.put("PSU-Device-ID", apiClient.parameterToString(psUDeviceID));
        if (psUGeoLocation != null)
        localVarHeaderParams.put("PSU-Geo-Location", apiClient.parameterToString(psUGeoLocation));

        Map localVarFormParams = new HashMap();

        final String[] localVarAccepts = {
            "application/json", "application/xml", "application/text", "application/problem+json"
        };
        final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
        if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);

        final String[] localVarContentTypes = {
            
        };
        final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
        localVarHeaderParams.put("Content-Type", localVarContentType);

        if(progressListener != null) {
            apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
                @Override
                public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
                    com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
                    return originalResponse.newBuilder()
                    .body(new ProgressResponseBody(originalResponse.body(), progressListener))
                    .build();
                }
            });
        }

        String[] localVarAuthNames = new String[] { "BearerAuthOAuth" };
        return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
    }
    
    @SuppressWarnings("rawtypes")
    private com.squareup.okhttp.Call getTransactionListValidateBeforeCall(String accountId, String bookingStatus, UUID xRequestID, String consentID, String X_GTW_ASPSP_ID, String xGTWBankCode, String X_GTW_BIC, LocalDate dateFrom, LocalDate dateTo, String entryReferenceFrom, Boolean deltaList, Boolean withBalance, String digest, String signature, byte[] tpPSignatureCertificate, String psUIPAddress, String psUIPPort, String psUAccept, String psUAcceptCharset, String psUAcceptEncoding, String psUAcceptLanguage, String psUUserAgent, String psUHttpMethod, UUID psUDeviceID, String psUGeoLocation, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
        // verify the required parameter 'accountId' is set
        if (accountId == null) {
            throw new ApiException("Missing the required parameter 'accountId' when calling getTransactionList(Async)");
        }
        // verify the required parameter 'bookingStatus' is set
        if (bookingStatus == null) {
            throw new ApiException("Missing the required parameter 'bookingStatus' when calling getTransactionList(Async)");
        }
        // verify the required parameter 'xRequestID' is set
        if (xRequestID == null) {
            throw new ApiException("Missing the required parameter 'xRequestID' when calling getTransactionList(Async)");
        }
        // verify the required parameter 'consentID' is set
        if (consentID == null) {
            throw new ApiException("Missing the required parameter 'consentID' when calling getTransactionList(Async)");
        }
        
        com.squareup.okhttp.Call call = getTransactionListCall(accountId, bookingStatus, xRequestID, consentID, X_GTW_ASPSP_ID, xGTWBankCode, X_GTW_BIC, dateFrom, dateTo, entryReferenceFrom, deltaList, withBalance, digest, signature, tpPSignatureCertificate, psUIPAddress, psUIPPort, psUAccept, psUAcceptCharset, psUAcceptEncoding, psUAcceptLanguage, psUUserAgent, psUHttpMethod, psUDeviceID, psUGeoLocation, progressListener, progressRequestListener);
        return call;

        
        
        
        
    }

    /**
     * Read transaction list of an account
     * Read transaction reports or transaction lists of a given account ddressed by \"account-id\", depending on the steering parameter  \"bookingStatus\" together with balances.  For a given account, additional parameters are e.g. the attributes \"dateFrom\" and \"dateTo\".  The ASPSP might add balance information, if transaction lists without balances are not supported. 
     * @param accountId This identification is denoting the addressed account.  The account-id is retrieved by using a \"Read Account List\" call.  The account-id is the \"id\" attribute of the account structure.  Its value is constant at least throughout the lifecycle of a given consent.  (required)
     * @param bookingStatus Permitted codes are    * \"booked\",   * \"pending\" and    * \"both\" \"booked\" shall be supported by the ASPSP. To support the \"pending\" and \"both\" feature is optional for the ASPSP,  Error code if not supported in the online banking frontend  (required)
     * @param xRequestID ID of the request, unique to the call, as determined by the initiating party. (required)
     * @param consentID This then contains the consentId of the related AIS consent, which was performed prior to this payment initiation.  (required)
     * @param X_GTW_ASPSP_ID ASPSP ID in the registry for the request routing (optional)
     * @param xGTWBankCode Bank code of bank to which the request addressed (optional)
     * @param X_GTW_BIC Business Identifier Code for the request routing (optional)
     * @param dateFrom Conditional: Starting date (inclusive the date dateFrom) of the transaction list, mandated if no delta access is required.  For booked transactions, the relevant date is the booking date.   For pending transactions, the relevant date is the entry date, which may not be transparent  neither in this API nor other channels of the ASPSP.  (optional)
     * @param dateTo End date (inclusive the data dateTo) of the transaction list, default is \"now\" if not given.   Might be ignored if a delta function is used.  For booked transactions, the relevant date is the booking date.   For pending transactions, the relevant date is the entry date, which may not be transparent  neither in this API nor other channels of the ASPSP.  (optional)
     * @param entryReferenceFrom This data attribute is indicating that the AISP is in favour to get all transactions after  the transaction with identification entryReferenceFrom alternatively to the above defined period.  This is a implementation of a delta access.  If this data element is contained, the entries \"dateFrom\" and \"dateTo\" might be ignored by the ASPSP  if a delta report is supported.  Optional if supported by API provider.  (optional)
     * @param deltaList This data attribute is indicating that the AISP is in favour to get all transactions after the last report access for this PSU on the addressed account. This is another implementation of a delta access-report. This delta indicator might be rejected by the ASPSP if this function is not supported. Optional if supported by API provider (optional)
     * @param withBalance If contained, this function reads the list of accessible payment accounts including the booking balance,  if granted by the PSU in the related consent and available by the ASPSP.  This parameter might be ignored by the ASPSP.   (optional)
     * @param digest Is contained if and only if the \"Signature\" element is contained in the header of the request. (optional)
     * @param signature A signature of the request by the TPP on application level. This might be mandated by ASPSP.  (optional)
     * @param tpPSignatureCertificate The certificate used for signing the request, in base64 encoding.  Must be contained if a signature is contained.  (optional)
     * @param psUIPAddress The forwarded IP Address header field consists of the corresponding HTTP request  IP Address field between PSU and TPP.  It shall be contained if and only if this request was actively initiated by the PSU.  (optional)
     * @param psUIPPort The forwarded IP Port header field consists of the corresponding HTTP request IP Port field between PSU and TPP, if available.  (optional)
     * @param psUAccept The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available.  (optional)
     * @param psUAcceptCharset The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available.  (optional)
     * @param psUAcceptEncoding The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available.  (optional)
     * @param psUAcceptLanguage The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available.  (optional)
     * @param psUUserAgent The forwarded Agent header field of the HTTP request between PSU and TPP, if available.  (optional)
     * @param psUHttpMethod HTTP method used at the PSU ? TPP interface, if available. Valid values are: * GET * POST * PUT * PATCH * DELETE  (optional)
     * @param psUDeviceID UUID (Universally Unique Identifier) for a device, which is used by the PSU, if available. UUID identifies either a device or a device dependant application installation. In case of an installation identification this ID need to be unaltered until removal from device.  (optional)
     * @param psUGeoLocation The forwarded Geo Location of the corresponding http request between PSU and TPP if available.  (optional)
     * @return TransactionsResponse200Json
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public TransactionsResponse200Json getTransactionList(String accountId, String bookingStatus, UUID xRequestID, String consentID, String X_GTW_ASPSP_ID, String xGTWBankCode, String X_GTW_BIC, LocalDate dateFrom, LocalDate dateTo, String entryReferenceFrom, Boolean deltaList, Boolean withBalance, String digest, String signature, byte[] tpPSignatureCertificate, String psUIPAddress, String psUIPPort, String psUAccept, String psUAcceptCharset, String psUAcceptEncoding, String psUAcceptLanguage, String psUUserAgent, String psUHttpMethod, UUID psUDeviceID, String psUGeoLocation) throws ApiException {
        ApiResponse resp = getTransactionListWithHttpInfo(accountId, bookingStatus, xRequestID, consentID, X_GTW_ASPSP_ID, xGTWBankCode, X_GTW_BIC, dateFrom, dateTo, entryReferenceFrom, deltaList, withBalance, digest, signature, tpPSignatureCertificate, psUIPAddress, psUIPPort, psUAccept, psUAcceptCharset, psUAcceptEncoding, psUAcceptLanguage, psUUserAgent, psUHttpMethod, psUDeviceID, psUGeoLocation);
        return resp.getData();
    }

    /**
     * Read transaction list of an account
     * Read transaction reports or transaction lists of a given account ddressed by \"account-id\", depending on the steering parameter  \"bookingStatus\" together with balances.  For a given account, additional parameters are e.g. the attributes \"dateFrom\" and \"dateTo\".  The ASPSP might add balance information, if transaction lists without balances are not supported. 
     * @param accountId This identification is denoting the addressed account.  The account-id is retrieved by using a \"Read Account List\" call.  The account-id is the \"id\" attribute of the account structure.  Its value is constant at least throughout the lifecycle of a given consent.  (required)
     * @param bookingStatus Permitted codes are    * \"booked\",   * \"pending\" and    * \"both\" \"booked\" shall be supported by the ASPSP. To support the \"pending\" and \"both\" feature is optional for the ASPSP,  Error code if not supported in the online banking frontend  (required)
     * @param xRequestID ID of the request, unique to the call, as determined by the initiating party. (required)
     * @param consentID This then contains the consentId of the related AIS consent, which was performed prior to this payment initiation.  (required)
     * @param X_GTW_ASPSP_ID ASPSP ID in the registry for the request routing (optional)
     * @param xGTWBankCode Bank code of bank to which the request addressed (optional)
     * @param X_GTW_BIC Business Identifier Code for the request routing (optional)
     * @param dateFrom Conditional: Starting date (inclusive the date dateFrom) of the transaction list, mandated if no delta access is required.  For booked transactions, the relevant date is the booking date.   For pending transactions, the relevant date is the entry date, which may not be transparent  neither in this API nor other channels of the ASPSP.  (optional)
     * @param dateTo End date (inclusive the data dateTo) of the transaction list, default is \"now\" if not given.   Might be ignored if a delta function is used.  For booked transactions, the relevant date is the booking date.   For pending transactions, the relevant date is the entry date, which may not be transparent  neither in this API nor other channels of the ASPSP.  (optional)
     * @param entryReferenceFrom This data attribute is indicating that the AISP is in favour to get all transactions after  the transaction with identification entryReferenceFrom alternatively to the above defined period.  This is a implementation of a delta access.  If this data element is contained, the entries \"dateFrom\" and \"dateTo\" might be ignored by the ASPSP  if a delta report is supported.  Optional if supported by API provider.  (optional)
     * @param deltaList This data attribute is indicating that the AISP is in favour to get all transactions after the last report access for this PSU on the addressed account. This is another implementation of a delta access-report. This delta indicator might be rejected by the ASPSP if this function is not supported. Optional if supported by API provider (optional)
     * @param withBalance If contained, this function reads the list of accessible payment accounts including the booking balance,  if granted by the PSU in the related consent and available by the ASPSP.  This parameter might be ignored by the ASPSP.   (optional)
     * @param digest Is contained if and only if the \"Signature\" element is contained in the header of the request. (optional)
     * @param signature A signature of the request by the TPP on application level. This might be mandated by ASPSP.  (optional)
     * @param tpPSignatureCertificate The certificate used for signing the request, in base64 encoding.  Must be contained if a signature is contained.  (optional)
     * @param psUIPAddress The forwarded IP Address header field consists of the corresponding HTTP request  IP Address field between PSU and TPP.  It shall be contained if and only if this request was actively initiated by the PSU.  (optional)
     * @param psUIPPort The forwarded IP Port header field consists of the corresponding HTTP request IP Port field between PSU and TPP, if available.  (optional)
     * @param psUAccept The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available.  (optional)
     * @param psUAcceptCharset The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available.  (optional)
     * @param psUAcceptEncoding The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available.  (optional)
     * @param psUAcceptLanguage The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available.  (optional)
     * @param psUUserAgent The forwarded Agent header field of the HTTP request between PSU and TPP, if available.  (optional)
     * @param psUHttpMethod HTTP method used at the PSU ? TPP interface, if available. Valid values are: * GET * POST * PUT * PATCH * DELETE  (optional)
     * @param psUDeviceID UUID (Universally Unique Identifier) for a device, which is used by the PSU, if available. UUID identifies either a device or a device dependant application installation. In case of an installation identification this ID need to be unaltered until removal from device.  (optional)
     * @param psUGeoLocation The forwarded Geo Location of the corresponding http request between PSU and TPP if available.  (optional)
     * @return ApiResponse<TransactionsResponse200Json>
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public ApiResponse getTransactionListWithHttpInfo(String accountId, String bookingStatus, UUID xRequestID, String consentID, String X_GTW_ASPSP_ID, String xGTWBankCode, String X_GTW_BIC, LocalDate dateFrom, LocalDate dateTo, String entryReferenceFrom, Boolean deltaList, Boolean withBalance, String digest, String signature, byte[] tpPSignatureCertificate, String psUIPAddress, String psUIPPort, String psUAccept, String psUAcceptCharset, String psUAcceptEncoding, String psUAcceptLanguage, String psUUserAgent, String psUHttpMethod, UUID psUDeviceID, String psUGeoLocation) throws ApiException {
        com.squareup.okhttp.Call call = getTransactionListValidateBeforeCall(accountId, bookingStatus, xRequestID, consentID, X_GTW_ASPSP_ID, xGTWBankCode, X_GTW_BIC, dateFrom, dateTo, entryReferenceFrom, deltaList, withBalance, digest, signature, tpPSignatureCertificate, psUIPAddress, psUIPPort, psUAccept, psUAcceptCharset, psUAcceptEncoding, psUAcceptLanguage, psUUserAgent, psUHttpMethod, psUDeviceID, psUGeoLocation, null, null);
        Type localVarReturnType = new TypeToken(){}.getType();
        return apiClient.execute(call, localVarReturnType);
    }

    /**
     * Read transaction list of an account (asynchronously)
     * Read transaction reports or transaction lists of a given account ddressed by \"account-id\", depending on the steering parameter  \"bookingStatus\" together with balances.  For a given account, additional parameters are e.g. the attributes \"dateFrom\" and \"dateTo\".  The ASPSP might add balance information, if transaction lists without balances are not supported. 
     * @param accountId This identification is denoting the addressed account.  The account-id is retrieved by using a \"Read Account List\" call.  The account-id is the \"id\" attribute of the account structure.  Its value is constant at least throughout the lifecycle of a given consent.  (required)
     * @param bookingStatus Permitted codes are    * \"booked\",   * \"pending\" and    * \"both\" \"booked\" shall be supported by the ASPSP. To support the \"pending\" and \"both\" feature is optional for the ASPSP,  Error code if not supported in the online banking frontend  (required)
     * @param xRequestID ID of the request, unique to the call, as determined by the initiating party. (required)
     * @param consentID This then contains the consentId of the related AIS consent, which was performed prior to this payment initiation.  (required)
     * @param X_GTW_ASPSP_ID ASPSP ID in the registry for the request routing (optional)
     * @param xGTWBankCode Bank code of bank to which the request addressed (optional)
     * @param X_GTW_BIC Business Identifier Code for the request routing (optional)
     * @param dateFrom Conditional: Starting date (inclusive the date dateFrom) of the transaction list, mandated if no delta access is required.  For booked transactions, the relevant date is the booking date.   For pending transactions, the relevant date is the entry date, which may not be transparent  neither in this API nor other channels of the ASPSP.  (optional)
     * @param dateTo End date (inclusive the data dateTo) of the transaction list, default is \"now\" if not given.   Might be ignored if a delta function is used.  For booked transactions, the relevant date is the booking date.   For pending transactions, the relevant date is the entry date, which may not be transparent  neither in this API nor other channels of the ASPSP.  (optional)
     * @param entryReferenceFrom This data attribute is indicating that the AISP is in favour to get all transactions after  the transaction with identification entryReferenceFrom alternatively to the above defined period.  This is a implementation of a delta access.  If this data element is contained, the entries \"dateFrom\" and \"dateTo\" might be ignored by the ASPSP  if a delta report is supported.  Optional if supported by API provider.  (optional)
     * @param deltaList This data attribute is indicating that the AISP is in favour to get all transactions after the last report access for this PSU on the addressed account. This is another implementation of a delta access-report. This delta indicator might be rejected by the ASPSP if this function is not supported. Optional if supported by API provider (optional)
     * @param withBalance If contained, this function reads the list of accessible payment accounts including the booking balance,  if granted by the PSU in the related consent and available by the ASPSP.  This parameter might be ignored by the ASPSP.   (optional)
     * @param digest Is contained if and only if the \"Signature\" element is contained in the header of the request. (optional)
     * @param signature A signature of the request by the TPP on application level. This might be mandated by ASPSP.  (optional)
     * @param tpPSignatureCertificate The certificate used for signing the request, in base64 encoding.  Must be contained if a signature is contained.  (optional)
     * @param psUIPAddress The forwarded IP Address header field consists of the corresponding HTTP request  IP Address field between PSU and TPP.  It shall be contained if and only if this request was actively initiated by the PSU.  (optional)
     * @param psUIPPort The forwarded IP Port header field consists of the corresponding HTTP request IP Port field between PSU and TPP, if available.  (optional)
     * @param psUAccept The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available.  (optional)
     * @param psUAcceptCharset The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available.  (optional)
     * @param psUAcceptEncoding The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available.  (optional)
     * @param psUAcceptLanguage The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available.  (optional)
     * @param psUUserAgent The forwarded Agent header field of the HTTP request between PSU and TPP, if available.  (optional)
     * @param psUHttpMethod HTTP method used at the PSU ? TPP interface, if available. Valid values are: * GET * POST * PUT * PATCH * DELETE  (optional)
     * @param psUDeviceID UUID (Universally Unique Identifier) for a device, which is used by the PSU, if available. UUID identifies either a device or a device dependant application installation. In case of an installation identification this ID need to be unaltered until removal from device.  (optional)
     * @param psUGeoLocation The forwarded Geo Location of the corresponding http request between PSU and TPP if available.  (optional)
     * @param callback The callback to be executed when the API call finishes
     * @return The request call
     * @throws ApiException If fail to process the API call, e.g. serializing the request body object
     */
    public com.squareup.okhttp.Call getTransactionListAsync(String accountId, String bookingStatus, UUID xRequestID, String consentID, String X_GTW_ASPSP_ID, String xGTWBankCode, String X_GTW_BIC, LocalDate dateFrom, LocalDate dateTo, String entryReferenceFrom, Boolean deltaList, Boolean withBalance, String digest, String signature, byte[] tpPSignatureCertificate, String psUIPAddress, String psUIPPort, String psUAccept, String psUAcceptCharset, String psUAcceptEncoding, String psUAcceptLanguage, String psUUserAgent, String psUHttpMethod, UUID psUDeviceID, String psUGeoLocation, final ApiCallback callback) throws ApiException {

        ProgressResponseBody.ProgressListener progressListener = null;
        ProgressRequestBody.ProgressRequestListener progressRequestListener = null;

        if (callback != null) {
            progressListener = new ProgressResponseBody.ProgressListener() {
                @Override
                public void update(long bytesRead, long contentLength, boolean done) {
                    callback.onDownloadProgress(bytesRead, contentLength, done);
                }
            };

            progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
                @Override
                public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
                    callback.onUploadProgress(bytesWritten, contentLength, done);
                }
            };
        }

        com.squareup.okhttp.Call call = getTransactionListValidateBeforeCall(accountId, bookingStatus, xRequestID, consentID, X_GTW_ASPSP_ID, xGTWBankCode, X_GTW_BIC, dateFrom, dateTo, entryReferenceFrom, deltaList, withBalance, digest, signature, tpPSignatureCertificate, psUIPAddress, psUIPPort, psUAccept, psUAcceptCharset, psUAcceptEncoding, psUAcceptLanguage, psUUserAgent, psUHttpMethod, psUDeviceID, psUGeoLocation, progressListener, progressRequestListener);
        Type localVarReturnType = new TypeToken(){}.getType();
        apiClient.executeAsync(call, localVarReturnType, callback);
        return call;
    }
    /**
     * Build call for startConsentAuthorisation
     * @param xRequestID ID of the request, unique to the call, as determined by the initiating party. (required)
     * @param consentId ID of the corresponding consent object as returned by an Account Information Consent Request.  (required)
     * @param body  (optional)
     * @param X_GTW_ASPSP_ID ASPSP ID in the registry for the request routing (optional)
     * @param xGTWBankCode Bank code of bank to which the request addressed (optional)
     * @param X_GTW_BIC Business Identifier Code for the request routing (optional)
     * @param digest Is contained if and only if the \"Signature\" element is contained in the header of the request. (optional)
     * @param signature A signature of the request by the TPP on application level. This might be mandated by ASPSP.  (optional)
     * @param tpPSignatureCertificate The certificate used for signing the request, in base64 encoding.  Must be contained if a signature is contained.  (optional)
     * @param PSU_ID Client ID of the PSU in the ASPSP client interface.   Might be mandated in the ASPSP's documentation.  It might be contained even if an OAuth2 based authentication was performed in a pre-step or an OAuth2 based SCA was performed in an preceding AIS service in the same session. In this case the ASPSP might check whether PSU-ID and token match,  according to ASPSP documentation.  (optional)
     * @param psUIDType Type of the PSU-ID, needed in scenarios where PSUs have several PSU-IDs as access possibility.  In this case, the mean and use are then defined in the ASPSP’s documentation.  (optional)
     * @param psUCorporateID Might be mandated in the ASPSP's documentation. Only used in a corporate context.  (optional)
     * @param psUCorporateIDType Might be mandated in the ASPSP's documentation. Only used in a corporate context.  (optional)
     * @param tpPRedirectPreferred If it equals \"true\", the TPP prefers a redirect over an embedded SCA approach. If it equals \"false\", the TPP prefers not to be redirected for SCA. The ASPSP will then choose between the Embedded or the Decoupled SCA approach, depending on the choice of the SCA procedure by the TPP/PSU. If the parameter is not used, the ASPSP will choose the SCA approach to be applied depending on the SCA method chosen by the TPP/PSU.  (optional)
     * @param tpPRedirectURI URI of the TPP, where the transaction flow shall be redirected to after a Redirect.  Mandated for the Redirect SCA Approach, specifically  when TPP-Redirect-Preferred equals \"true\". It is recommended to always use this header field.  **Remark for Future:**  This field might be changed to mandatory in the next version of the specification.  (optional)
     * @param tpPNokRedirectURI If this URI is contained, the TPP is asking to redirect the transaction flow to this address instead of the TPP-Redirect-URI in case of a negative result of the redirect SCA method. This might be ignored by the ASPSP.  (optional)
     * @param tpPNotificationURI URI for the Endpoint of the TPP-API to which the status of the payment initiation should be sent. This header field may by ignored by the ASPSP.  For security reasons, it shall be ensured that the TPP-Notification-URI as introduced above is secured by the TPP eIDAS QWAC used for identification of the TPP. The following applies:  URIs which are provided by TPPs in TPP-Notification-URI shall comply with the domain secured by the eIDAS QWAC certificate of the TPP in the field CN or SubjectAltName of the certificate. Please note that in case of example-TPP.com as certificate entry TPP- Notification-URI like www.example-TPP.com/xs2a-client/v1/ASPSPidentifcation/mytransaction- id/notifications or notifications.example-TPP.com/xs2a-client/v1/ASPSPidentifcation/mytransaction- id/notifications would be compliant.  Wildcard definitions shall be taken into account for compliance checks by the ASPSP.  ASPSPs may respond with ASPSP-Notification-Support set to false, if the provided URIs do not comply.  (optional)
     * @param tpPNotificationContentPreferred The string has the form   status=X1, ..., Xn  where Xi is one of the constants SCA, PROCESS, LAST and where constants are not repeated. The usage of the constants supports the of following semantics:    SCA: A notification on every change of the scaStatus attribute for all related authorisation processes is preferred by the TPP.    PROCESS: A notification on all changes of consentStatus or transactionStatus attributes is preferred by the TPP.   LAST: Only a notification on the last consentStatus or transactionStatus as available in the XS2A interface is preferred by the TPP.  This header field may be ignored, if the ASPSP does not support resource notification services for the related TPP.  (optional)
     * @param psUIPAddress The forwarded IP Address header field consists of the corresponding HTTP request  IP Address field between PSU and TPP.  It shall be contained if and only if this request was actively initiated by the PSU.  (optional)
     * @param psUIPPort The forwarded IP Port header field consists of the corresponding HTTP request IP Port field between PSU and TPP, if available.  (optional)
     * @param psUAccept The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available.  (optional)
     * @param psUAcceptCharset The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available.  (optional)
     * @param psUAcceptEncoding The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available.  (optional)
     * @param psUAcceptLanguage The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available.  (optional)
     * @param psUUserAgent The forwarded Agent header field of the HTTP request between PSU and TPP, if available.  (optional)
     * @param psUHttpMethod HTTP method used at the PSU ? TPP interface, if available. Valid values are: * GET * POST * PUT * PATCH * DELETE  (optional)
     * @param psUDeviceID UUID (Universally Unique Identifier) for a device, which is used by the PSU, if available. UUID identifies either a device or a device dependant application installation. In case of an installation identification this ID need to be unaltered until removal from device.  (optional)
     * @param psUGeoLocation The forwarded Geo Location of the corresponding http request between PSU and TPP if available.  (optional)
     * @param progressListener Progress listener
     * @param progressRequestListener Progress request listener
     * @return Call to execute
     * @throws ApiException If fail to serialize the request body object
     */
    public com.squareup.okhttp.Call startConsentAuthorisationCall(UUID xRequestID, String consentId, Object body, String X_GTW_ASPSP_ID, String xGTWBankCode, String X_GTW_BIC, String digest, String signature, byte[] tpPSignatureCertificate, String PSU_ID, String psUIDType, String psUCorporateID, String psUCorporateIDType, String tpPRedirectPreferred, String tpPRedirectURI, String tpPNokRedirectURI, String tpPNotificationURI, String tpPNotificationContentPreferred, String psUIPAddress, String psUIPPort, String psUAccept, String psUAcceptCharset, String psUAcceptEncoding, String psUAcceptLanguage, String psUUserAgent, String psUHttpMethod, UUID psUDeviceID, String psUGeoLocation, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
        Object localVarPostBody = body;
        
        // create path and map variables
        String localVarPath = "/v1/consents/{consentId}/authorisations"
            .replaceAll("\\{" + "consentId" + "\\}", apiClient.escapeString(consentId.toString()));

        List localVarQueryParams = new ArrayList();
        List localVarCollectionQueryParams = new ArrayList();

        Map localVarHeaderParams = new HashMap();
        if (X_GTW_ASPSP_ID != null)
        localVarHeaderParams.put("X-GTW-ASPSP-ID", apiClient.parameterToString(X_GTW_ASPSP_ID));
        if (xGTWBankCode != null)
        localVarHeaderParams.put("X-GTW-Bank-Code", apiClient.parameterToString(xGTWBankCode));
        if (X_GTW_BIC != null)
        localVarHeaderParams.put("X-GTW-BIC", apiClient.parameterToString(X_GTW_BIC));
        if (xRequestID != null)
        localVarHeaderParams.put("X-Request-ID", apiClient.parameterToString(xRequestID));
        if (digest != null)
        localVarHeaderParams.put("Digest", apiClient.parameterToString(digest));
        if (signature != null)
        localVarHeaderParams.put("Signature", apiClient.parameterToString(signature));
        if (tpPSignatureCertificate != null)
        localVarHeaderParams.put("TPP-Signature-Certificate", apiClient.parameterToString(tpPSignatureCertificate));
        if (PSU_ID != null)
        localVarHeaderParams.put("PSU-ID", apiClient.parameterToString(PSU_ID));
        if (psUIDType != null)
        localVarHeaderParams.put("PSU-ID-Type", apiClient.parameterToString(psUIDType));
        if (psUCorporateID != null)
        localVarHeaderParams.put("PSU-Corporate-ID", apiClient.parameterToString(psUCorporateID));
        if (psUCorporateIDType != null)
        localVarHeaderParams.put("PSU-Corporate-ID-Type", apiClient.parameterToString(psUCorporateIDType));
        if (tpPRedirectPreferred != null)
        localVarHeaderParams.put("TPP-Redirect-Preferred", apiClient.parameterToString(tpPRedirectPreferred));
        if (tpPRedirectURI != null)
        localVarHeaderParams.put("TPP-Redirect-URI", apiClient.parameterToString(tpPRedirectURI));
        if (tpPNokRedirectURI != null)
        localVarHeaderParams.put("TPP-Nok-Redirect-URI", apiClient.parameterToString(tpPNokRedirectURI));
        if (tpPNotificationURI != null)
        localVarHeaderParams.put("TPP-Notification-URI", apiClient.parameterToString(tpPNotificationURI));
        if (tpPNotificationContentPreferred != null)
        localVarHeaderParams.put("TPP-Notification-Content-Preferred", apiClient.parameterToString(tpPNotificationContentPreferred));
        if (psUIPAddress != null)
        localVarHeaderParams.put("PSU-IP-Address", apiClient.parameterToString(psUIPAddress));
        if (psUIPPort != null)
        localVarHeaderParams.put("PSU-IP-Port", apiClient.parameterToString(psUIPPort));
        if (psUAccept != null)
        localVarHeaderParams.put("PSU-Accept", apiClient.parameterToString(psUAccept));
        if (psUAcceptCharset != null)
        localVarHeaderParams.put("PSU-Accept-Charset", apiClient.parameterToString(psUAcceptCharset));
        if (psUAcceptEncoding != null)
        localVarHeaderParams.put("PSU-Accept-Encoding", apiClient.parameterToString(psUAcceptEncoding));
        if (psUAcceptLanguage != null)
        localVarHeaderParams.put("PSU-Accept-Language", apiClient.parameterToString(psUAcceptLanguage));
        if (psUUserAgent != null)
        localVarHeaderParams.put("PSU-User-Agent", apiClient.parameterToString(psUUserAgent));
        if (psUHttpMethod != null)
        localVarHeaderParams.put("PSU-Http-Method", apiClient.parameterToString(psUHttpMethod));
        if (psUDeviceID != null)
        localVarHeaderParams.put("PSU-Device-ID", apiClient.parameterToString(psUDeviceID));
        if (psUGeoLocation != null)
        localVarHeaderParams.put("PSU-Geo-Location", apiClient.parameterToString(psUGeoLocation));

        Map localVarFormParams = new HashMap();

        final String[] localVarAccepts = {
            "application/json", "application/problem+json"
        };
        final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
        if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);

        final String[] localVarContentTypes = {
            "application/json"
        };
        final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
        localVarHeaderParams.put("Content-Type", localVarContentType);

        if(progressListener != null) {
            apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
                @Override
                public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
                    com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
                    return originalResponse.newBuilder()
                    .body(new ProgressResponseBody(originalResponse.body(), progressListener))
                    .build();
                }
            });
        }

        String[] localVarAuthNames = new String[] { "BearerAuthOAuth" };
        return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
    }
    
    @SuppressWarnings("rawtypes")
    private com.squareup.okhttp.Call startConsentAuthorisationValidateBeforeCall(UUID xRequestID, String consentId, Object body, String X_GTW_ASPSP_ID, String xGTWBankCode, String X_GTW_BIC, String digest, String signature, byte[] tpPSignatureCertificate, String PSU_ID, String psUIDType, String psUCorporateID, String psUCorporateIDType, String tpPRedirectPreferred, String tpPRedirectURI, String tpPNokRedirectURI, String tpPNotificationURI, String tpPNotificationContentPreferred, String psUIPAddress, String psUIPPort, String psUAccept, String psUAcceptCharset, String psUAcceptEncoding, String psUAcceptLanguage, String psUUserAgent, String psUHttpMethod, UUID psUDeviceID, String psUGeoLocation, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
        // verify the required parameter 'xRequestID' is set
        if (xRequestID == null) {
            throw new ApiException("Missing the required parameter 'xRequestID' when calling startConsentAuthorisation(Async)");
        }
        // verify the required parameter 'consentId' is set
        if (consentId == null) {
            throw new ApiException("Missing the required parameter 'consentId' when calling startConsentAuthorisation(Async)");
        }
        
        com.squareup.okhttp.Call call = startConsentAuthorisationCall(xRequestID, consentId, body, X_GTW_ASPSP_ID, xGTWBankCode, X_GTW_BIC, digest, signature, tpPSignatureCertificate, PSU_ID, psUIDType, psUCorporateID, psUCorporateIDType, tpPRedirectPreferred, tpPRedirectURI, tpPNokRedirectURI, tpPNotificationURI, tpPNotificationContentPreferred, psUIPAddress, psUIPPort, psUAccept, psUAcceptCharset, psUAcceptEncoding, psUAcceptLanguage, psUUserAgent, psUHttpMethod, psUDeviceID, psUGeoLocation, progressListener, progressRequestListener);
        return call;

        
        
        
        
    }

    /**
     * Start the authorisation process for a consent
     * Create an authorisation sub-resource and start the authorisation process of a consent.  The message might in addition transmit authentication and authorisation related data.  his method is iterated n times for a n times SCA authorisation in a  corporate context, each creating an own authorisation sub-endpoint for  the corresponding PSU authorising the consent.  The ASPSP might make the usage of this access method unnecessary,  since the related authorisation resource will be automatically created by  the ASPSP after the submission of the consent data with the first POST consents call.  The start authorisation process is a process which is needed for creating a new authorisation  or cancellation sub-resource.   This applies in the following scenarios:    * The ASPSP has indicated with an 'startAuthorisation' hyperlink in the preceding Payment      Initiation Response that an explicit start of the authorisation process is needed by the TPP.      The 'startAuthorisation' hyperlink can transport more information about data which needs to be      uploaded by using the extended forms.     * 'startAuthorisationWithPsuIdentfication',      * 'startAuthorisationWithPsuAuthentication'      * 'startAuthorisationWithEncryptedPsuAuthentication'     * 'startAuthorisationWithAuthentciationMethodSelection'    * The related payment initiation cannot yet be executed since a multilevel SCA is mandated.   * The ASPSP has indicated with an 'startAuthorisation' hyperlink in the preceding      Payment Cancellation Response that an explicit start of the authorisation process is needed by the TPP.      The 'startAuthorisation' hyperlink can transport more information about data which needs to be uploaded      by using the extended forms as indicated above.   * The related payment cancellation request cannot be applied yet since a multilevel SCA is mandate for      executing the cancellation.   * The signing basket needs to be authorised yet. 
     * @param xRequestID ID of the request, unique to the call, as determined by the initiating party. (required)
     * @param consentId ID of the corresponding consent object as returned by an Account Information Consent Request.  (required)
     * @param body  (optional)
     * @param X_GTW_ASPSP_ID ASPSP ID in the registry for the request routing (optional)
     * @param xGTWBankCode Bank code of bank to which the request addressed (optional)
     * @param X_GTW_BIC Business Identifier Code for the request routing (optional)
     * @param digest Is contained if and only if the \"Signature\" element is contained in the header of the request. (optional)
     * @param signature A signature of the request by the TPP on application level. This might be mandated by ASPSP.  (optional)
     * @param tpPSignatureCertificate The certificate used for signing the request, in base64 encoding.  Must be contained if a signature is contained.  (optional)
     * @param PSU_ID Client ID of the PSU in the ASPSP client interface.   Might be mandated in the ASPSP's documentation.  It might be contained even if an OAuth2 based authentication was performed in a pre-step or an OAuth2 based SCA was performed in an preceding AIS service in the same session. In this case the ASPSP might check whether PSU-ID and token match,  according to ASPSP documentation.  (optional)
     * @param psUIDType Type of the PSU-ID, needed in scenarios where PSUs have several PSU-IDs as access possibility.  In this case, the mean and use are then defined in the ASPSP’s documentation.  (optional)
     * @param psUCorporateID Might be mandated in the ASPSP's documentation. Only used in a corporate context.  (optional)
     * @param psUCorporateIDType Might be mandated in the ASPSP's documentation. Only used in a corporate context.  (optional)
     * @param tpPRedirectPreferred If it equals \"true\", the TPP prefers a redirect over an embedded SCA approach. If it equals \"false\", the TPP prefers not to be redirected for SCA. The ASPSP will then choose between the Embedded or the Decoupled SCA approach, depending on the choice of the SCA procedure by the TPP/PSU. If the parameter is not used, the ASPSP will choose the SCA approach to be applied depending on the SCA method chosen by the TPP/PSU.  (optional)
     * @param tpPRedirectURI URI of the TPP, where the transaction flow shall be redirected to after a Redirect.  Mandated for the Redirect SCA Approach, specifically  when TPP-Redirect-Preferred equals \"true\". It is recommended to always use this header field.  **Remark for Future:**  This field might be changed to mandatory in the next version of the specification.  (optional)
     * @param tpPNokRedirectURI If this URI is contained, the TPP is asking to redirect the transaction flow to this address instead of the TPP-Redirect-URI in case of a negative result of the redirect SCA method. This might be ignored by the ASPSP.  (optional)
     * @param tpPNotificationURI URI for the Endpoint of the TPP-API to which the status of the payment initiation should be sent. This header field may by ignored by the ASPSP.  For security reasons, it shall be ensured that the TPP-Notification-URI as introduced above is secured by the TPP eIDAS QWAC used for identification of the TPP. The following applies:  URIs which are provided by TPPs in TPP-Notification-URI shall comply with the domain secured by the eIDAS QWAC certificate of the TPP in the field CN or SubjectAltName of the certificate. Please note that in case of example-TPP.com as certificate entry TPP- Notification-URI like www.example-TPP.com/xs2a-client/v1/ASPSPidentifcation/mytransaction- id/notifications or notifications.example-TPP.com/xs2a-client/v1/ASPSPidentifcation/mytransaction- id/notifications would be compliant.  Wildcard definitions shall be taken into account for compliance checks by the ASPSP.  ASPSPs may respond with ASPSP-Notification-Support set to false, if the provided URIs do not comply.  (optional)
     * @param tpPNotificationContentPreferred The string has the form   status=X1, ..., Xn  where Xi is one of the constants SCA, PROCESS, LAST and where constants are not repeated. The usage of the constants supports the of following semantics:    SCA: A notification on every change of the scaStatus attribute for all related authorisation processes is preferred by the TPP.    PROCESS: A notification on all changes of consentStatus or transactionStatus attributes is preferred by the TPP.   LAST: Only a notification on the last consentStatus or transactionStatus as available in the XS2A interface is preferred by the TPP.  This header field may be ignored, if the ASPSP does not support resource notification services for the related TPP.  (optional)
     * @param psUIPAddress The forwarded IP Address header field consists of the corresponding HTTP request  IP Address field between PSU and TPP.  It shall be contained if and only if this request was actively initiated by the PSU.  (optional)
     * @param psUIPPort The forwarded IP Port header field consists of the corresponding HTTP request IP Port field between PSU and TPP, if available.  (optional)
     * @param psUAccept The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available.  (optional)
     * @param psUAcceptCharset The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available.  (optional)
     * @param psUAcceptEncoding The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available.  (optional)
     * @param psUAcceptLanguage The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available.  (optional)
     * @param psUUserAgent The forwarded Agent header field of the HTTP request between PSU and TPP, if available.  (optional)
     * @param psUHttpMethod HTTP method used at the PSU ? TPP interface, if available. Valid values are: * GET * POST * PUT * PATCH * DELETE  (optional)
     * @param psUDeviceID UUID (Universally Unique Identifier) for a device, which is used by the PSU, if available. UUID identifies either a device or a device dependant application installation. In case of an installation identification this ID need to be unaltered until removal from device.  (optional)
     * @param psUGeoLocation The forwarded Geo Location of the corresponding http request between PSU and TPP if available.  (optional)
     * @return StartScaprocessResponse
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public StartScaprocessResponse startConsentAuthorisation(UUID xRequestID, String consentId, Object body, String X_GTW_ASPSP_ID, String xGTWBankCode, String X_GTW_BIC, String digest, String signature, byte[] tpPSignatureCertificate, String PSU_ID, String psUIDType, String psUCorporateID, String psUCorporateIDType, String tpPRedirectPreferred, String tpPRedirectURI, String tpPNokRedirectURI, String tpPNotificationURI, String tpPNotificationContentPreferred, String psUIPAddress, String psUIPPort, String psUAccept, String psUAcceptCharset, String psUAcceptEncoding, String psUAcceptLanguage, String psUUserAgent, String psUHttpMethod, UUID psUDeviceID, String psUGeoLocation) throws ApiException {
        ApiResponse resp = startConsentAuthorisationWithHttpInfo(xRequestID, consentId, body, X_GTW_ASPSP_ID, xGTWBankCode, X_GTW_BIC, digest, signature, tpPSignatureCertificate, PSU_ID, psUIDType, psUCorporateID, psUCorporateIDType, tpPRedirectPreferred, tpPRedirectURI, tpPNokRedirectURI, tpPNotificationURI, tpPNotificationContentPreferred, psUIPAddress, psUIPPort, psUAccept, psUAcceptCharset, psUAcceptEncoding, psUAcceptLanguage, psUUserAgent, psUHttpMethod, psUDeviceID, psUGeoLocation);
        return resp.getData();
    }

    /**
     * Start the authorisation process for a consent
     * Create an authorisation sub-resource and start the authorisation process of a consent.  The message might in addition transmit authentication and authorisation related data.  his method is iterated n times for a n times SCA authorisation in a  corporate context, each creating an own authorisation sub-endpoint for  the corresponding PSU authorising the consent.  The ASPSP might make the usage of this access method unnecessary,  since the related authorisation resource will be automatically created by  the ASPSP after the submission of the consent data with the first POST consents call.  The start authorisation process is a process which is needed for creating a new authorisation  or cancellation sub-resource.   This applies in the following scenarios:    * The ASPSP has indicated with an 'startAuthorisation' hyperlink in the preceding Payment      Initiation Response that an explicit start of the authorisation process is needed by the TPP.      The 'startAuthorisation' hyperlink can transport more information about data which needs to be      uploaded by using the extended forms.     * 'startAuthorisationWithPsuIdentfication',      * 'startAuthorisationWithPsuAuthentication'      * 'startAuthorisationWithEncryptedPsuAuthentication'     * 'startAuthorisationWithAuthentciationMethodSelection'    * The related payment initiation cannot yet be executed since a multilevel SCA is mandated.   * The ASPSP has indicated with an 'startAuthorisation' hyperlink in the preceding      Payment Cancellation Response that an explicit start of the authorisation process is needed by the TPP.      The 'startAuthorisation' hyperlink can transport more information about data which needs to be uploaded      by using the extended forms as indicated above.   * The related payment cancellation request cannot be applied yet since a multilevel SCA is mandate for      executing the cancellation.   * The signing basket needs to be authorised yet. 
     * @param xRequestID ID of the request, unique to the call, as determined by the initiating party. (required)
     * @param consentId ID of the corresponding consent object as returned by an Account Information Consent Request.  (required)
     * @param body  (optional)
     * @param X_GTW_ASPSP_ID ASPSP ID in the registry for the request routing (optional)
     * @param xGTWBankCode Bank code of bank to which the request addressed (optional)
     * @param X_GTW_BIC Business Identifier Code for the request routing (optional)
     * @param digest Is contained if and only if the \"Signature\" element is contained in the header of the request. (optional)
     * @param signature A signature of the request by the TPP on application level. This might be mandated by ASPSP.  (optional)
     * @param tpPSignatureCertificate The certificate used for signing the request, in base64 encoding.  Must be contained if a signature is contained.  (optional)
     * @param PSU_ID Client ID of the PSU in the ASPSP client interface.   Might be mandated in the ASPSP's documentation.  It might be contained even if an OAuth2 based authentication was performed in a pre-step or an OAuth2 based SCA was performed in an preceding AIS service in the same session. In this case the ASPSP might check whether PSU-ID and token match,  according to ASPSP documentation.  (optional)
     * @param psUIDType Type of the PSU-ID, needed in scenarios where PSUs have several PSU-IDs as access possibility.  In this case, the mean and use are then defined in the ASPSP’s documentation.  (optional)
     * @param psUCorporateID Might be mandated in the ASPSP's documentation. Only used in a corporate context.  (optional)
     * @param psUCorporateIDType Might be mandated in the ASPSP's documentation. Only used in a corporate context.  (optional)
     * @param tpPRedirectPreferred If it equals \"true\", the TPP prefers a redirect over an embedded SCA approach. If it equals \"false\", the TPP prefers not to be redirected for SCA. The ASPSP will then choose between the Embedded or the Decoupled SCA approach, depending on the choice of the SCA procedure by the TPP/PSU. If the parameter is not used, the ASPSP will choose the SCA approach to be applied depending on the SCA method chosen by the TPP/PSU.  (optional)
     * @param tpPRedirectURI URI of the TPP, where the transaction flow shall be redirected to after a Redirect.  Mandated for the Redirect SCA Approach, specifically  when TPP-Redirect-Preferred equals \"true\". It is recommended to always use this header field.  **Remark for Future:**  This field might be changed to mandatory in the next version of the specification.  (optional)
     * @param tpPNokRedirectURI If this URI is contained, the TPP is asking to redirect the transaction flow to this address instead of the TPP-Redirect-URI in case of a negative result of the redirect SCA method. This might be ignored by the ASPSP.  (optional)
     * @param tpPNotificationURI URI for the Endpoint of the TPP-API to which the status of the payment initiation should be sent. This header field may by ignored by the ASPSP.  For security reasons, it shall be ensured that the TPP-Notification-URI as introduced above is secured by the TPP eIDAS QWAC used for identification of the TPP. The following applies:  URIs which are provided by TPPs in TPP-Notification-URI shall comply with the domain secured by the eIDAS QWAC certificate of the TPP in the field CN or SubjectAltName of the certificate. Please note that in case of example-TPP.com as certificate entry TPP- Notification-URI like www.example-TPP.com/xs2a-client/v1/ASPSPidentifcation/mytransaction- id/notifications or notifications.example-TPP.com/xs2a-client/v1/ASPSPidentifcation/mytransaction- id/notifications would be compliant.  Wildcard definitions shall be taken into account for compliance checks by the ASPSP.  ASPSPs may respond with ASPSP-Notification-Support set to false, if the provided URIs do not comply.  (optional)
     * @param tpPNotificationContentPreferred The string has the form   status=X1, ..., Xn  where Xi is one of the constants SCA, PROCESS, LAST and where constants are not repeated. The usage of the constants supports the of following semantics:    SCA: A notification on every change of the scaStatus attribute for all related authorisation processes is preferred by the TPP.    PROCESS: A notification on all changes of consentStatus or transactionStatus attributes is preferred by the TPP.   LAST: Only a notification on the last consentStatus or transactionStatus as available in the XS2A interface is preferred by the TPP.  This header field may be ignored, if the ASPSP does not support resource notification services for the related TPP.  (optional)
     * @param psUIPAddress The forwarded IP Address header field consists of the corresponding HTTP request  IP Address field between PSU and TPP.  It shall be contained if and only if this request was actively initiated by the PSU.  (optional)
     * @param psUIPPort The forwarded IP Port header field consists of the corresponding HTTP request IP Port field between PSU and TPP, if available.  (optional)
     * @param psUAccept The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available.  (optional)
     * @param psUAcceptCharset The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available.  (optional)
     * @param psUAcceptEncoding The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available.  (optional)
     * @param psUAcceptLanguage The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available.  (optional)
     * @param psUUserAgent The forwarded Agent header field of the HTTP request between PSU and TPP, if available.  (optional)
     * @param psUHttpMethod HTTP method used at the PSU ? TPP interface, if available. Valid values are: * GET * POST * PUT * PATCH * DELETE  (optional)
     * @param psUDeviceID UUID (Universally Unique Identifier) for a device, which is used by the PSU, if available. UUID identifies either a device or a device dependant application installation. In case of an installation identification this ID need to be unaltered until removal from device.  (optional)
     * @param psUGeoLocation The forwarded Geo Location of the corresponding http request between PSU and TPP if available.  (optional)
     * @return ApiResponse<StartScaprocessResponse>
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public ApiResponse startConsentAuthorisationWithHttpInfo(UUID xRequestID, String consentId, Object body, String X_GTW_ASPSP_ID, String xGTWBankCode, String X_GTW_BIC, String digest, String signature, byte[] tpPSignatureCertificate, String PSU_ID, String psUIDType, String psUCorporateID, String psUCorporateIDType, String tpPRedirectPreferred, String tpPRedirectURI, String tpPNokRedirectURI, String tpPNotificationURI, String tpPNotificationContentPreferred, String psUIPAddress, String psUIPPort, String psUAccept, String psUAcceptCharset, String psUAcceptEncoding, String psUAcceptLanguage, String psUUserAgent, String psUHttpMethod, UUID psUDeviceID, String psUGeoLocation) throws ApiException {
        com.squareup.okhttp.Call call = startConsentAuthorisationValidateBeforeCall(xRequestID, consentId, body, X_GTW_ASPSP_ID, xGTWBankCode, X_GTW_BIC, digest, signature, tpPSignatureCertificate, PSU_ID, psUIDType, psUCorporateID, psUCorporateIDType, tpPRedirectPreferred, tpPRedirectURI, tpPNokRedirectURI, tpPNotificationURI, tpPNotificationContentPreferred, psUIPAddress, psUIPPort, psUAccept, psUAcceptCharset, psUAcceptEncoding, psUAcceptLanguage, psUUserAgent, psUHttpMethod, psUDeviceID, psUGeoLocation, null, null);
        Type localVarReturnType = new TypeToken(){}.getType();
        return apiClient.execute(call, localVarReturnType);
    }

    /**
     * Start the authorisation process for a consent (asynchronously)
     * Create an authorisation sub-resource and start the authorisation process of a consent.  The message might in addition transmit authentication and authorisation related data.  his method is iterated n times for a n times SCA authorisation in a  corporate context, each creating an own authorisation sub-endpoint for  the corresponding PSU authorising the consent.  The ASPSP might make the usage of this access method unnecessary,  since the related authorisation resource will be automatically created by  the ASPSP after the submission of the consent data with the first POST consents call.  The start authorisation process is a process which is needed for creating a new authorisation  or cancellation sub-resource.   This applies in the following scenarios:    * The ASPSP has indicated with an 'startAuthorisation' hyperlink in the preceding Payment      Initiation Response that an explicit start of the authorisation process is needed by the TPP.      The 'startAuthorisation' hyperlink can transport more information about data which needs to be      uploaded by using the extended forms.     * 'startAuthorisationWithPsuIdentfication',      * 'startAuthorisationWithPsuAuthentication'      * 'startAuthorisationWithEncryptedPsuAuthentication'     * 'startAuthorisationWithAuthentciationMethodSelection'    * The related payment initiation cannot yet be executed since a multilevel SCA is mandated.   * The ASPSP has indicated with an 'startAuthorisation' hyperlink in the preceding      Payment Cancellation Response that an explicit start of the authorisation process is needed by the TPP.      The 'startAuthorisation' hyperlink can transport more information about data which needs to be uploaded      by using the extended forms as indicated above.   * The related payment cancellation request cannot be applied yet since a multilevel SCA is mandate for      executing the cancellation.   * The signing basket needs to be authorised yet. 
     * @param xRequestID ID of the request, unique to the call, as determined by the initiating party. (required)
     * @param consentId ID of the corresponding consent object as returned by an Account Information Consent Request.  (required)
     * @param body  (optional)
     * @param X_GTW_ASPSP_ID ASPSP ID in the registry for the request routing (optional)
     * @param xGTWBankCode Bank code of bank to which the request addressed (optional)
     * @param X_GTW_BIC Business Identifier Code for the request routing (optional)
     * @param digest Is contained if and only if the \"Signature\" element is contained in the header of the request. (optional)
     * @param signature A signature of the request by the TPP on application level. This might be mandated by ASPSP.  (optional)
     * @param tpPSignatureCertificate The certificate used for signing the request, in base64 encoding.  Must be contained if a signature is contained.  (optional)
     * @param PSU_ID Client ID of the PSU in the ASPSP client interface.   Might be mandated in the ASPSP's documentation.  It might be contained even if an OAuth2 based authentication was performed in a pre-step or an OAuth2 based SCA was performed in an preceding AIS service in the same session. In this case the ASPSP might check whether PSU-ID and token match,  according to ASPSP documentation.  (optional)
     * @param psUIDType Type of the PSU-ID, needed in scenarios where PSUs have several PSU-IDs as access possibility.  In this case, the mean and use are then defined in the ASPSP’s documentation.  (optional)
     * @param psUCorporateID Might be mandated in the ASPSP's documentation. Only used in a corporate context.  (optional)
     * @param psUCorporateIDType Might be mandated in the ASPSP's documentation. Only used in a corporate context.  (optional)
     * @param tpPRedirectPreferred If it equals \"true\", the TPP prefers a redirect over an embedded SCA approach. If it equals \"false\", the TPP prefers not to be redirected for SCA. The ASPSP will then choose between the Embedded or the Decoupled SCA approach, depending on the choice of the SCA procedure by the TPP/PSU. If the parameter is not used, the ASPSP will choose the SCA approach to be applied depending on the SCA method chosen by the TPP/PSU.  (optional)
     * @param tpPRedirectURI URI of the TPP, where the transaction flow shall be redirected to after a Redirect.  Mandated for the Redirect SCA Approach, specifically  when TPP-Redirect-Preferred equals \"true\". It is recommended to always use this header field.  **Remark for Future:**  This field might be changed to mandatory in the next version of the specification.  (optional)
     * @param tpPNokRedirectURI If this URI is contained, the TPP is asking to redirect the transaction flow to this address instead of the TPP-Redirect-URI in case of a negative result of the redirect SCA method. This might be ignored by the ASPSP.  (optional)
     * @param tpPNotificationURI URI for the Endpoint of the TPP-API to which the status of the payment initiation should be sent. This header field may by ignored by the ASPSP.  For security reasons, it shall be ensured that the TPP-Notification-URI as introduced above is secured by the TPP eIDAS QWAC used for identification of the TPP. The following applies:  URIs which are provided by TPPs in TPP-Notification-URI shall comply with the domain secured by the eIDAS QWAC certificate of the TPP in the field CN or SubjectAltName of the certificate. Please note that in case of example-TPP.com as certificate entry TPP- Notification-URI like www.example-TPP.com/xs2a-client/v1/ASPSPidentifcation/mytransaction- id/notifications or notifications.example-TPP.com/xs2a-client/v1/ASPSPidentifcation/mytransaction- id/notifications would be compliant.  Wildcard definitions shall be taken into account for compliance checks by the ASPSP.  ASPSPs may respond with ASPSP-Notification-Support set to false, if the provided URIs do not comply.  (optional)
     * @param tpPNotificationContentPreferred The string has the form   status=X1, ..., Xn  where Xi is one of the constants SCA, PROCESS, LAST and where constants are not repeated. The usage of the constants supports the of following semantics:    SCA: A notification on every change of the scaStatus attribute for all related authorisation processes is preferred by the TPP.    PROCESS: A notification on all changes of consentStatus or transactionStatus attributes is preferred by the TPP.   LAST: Only a notification on the last consentStatus or transactionStatus as available in the XS2A interface is preferred by the TPP.  This header field may be ignored, if the ASPSP does not support resource notification services for the related TPP.  (optional)
     * @param psUIPAddress The forwarded IP Address header field consists of the corresponding HTTP request  IP Address field between PSU and TPP.  It shall be contained if and only if this request was actively initiated by the PSU.  (optional)
     * @param psUIPPort The forwarded IP Port header field consists of the corresponding HTTP request IP Port field between PSU and TPP, if available.  (optional)
     * @param psUAccept The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available.  (optional)
     * @param psUAcceptCharset The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available.  (optional)
     * @param psUAcceptEncoding The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available.  (optional)
     * @param psUAcceptLanguage The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available.  (optional)
     * @param psUUserAgent The forwarded Agent header field of the HTTP request between PSU and TPP, if available.  (optional)
     * @param psUHttpMethod HTTP method used at the PSU ? TPP interface, if available. Valid values are: * GET * POST * PUT * PATCH * DELETE  (optional)
     * @param psUDeviceID UUID (Universally Unique Identifier) for a device, which is used by the PSU, if available. UUID identifies either a device or a device dependant application installation. In case of an installation identification this ID need to be unaltered until removal from device.  (optional)
     * @param psUGeoLocation The forwarded Geo Location of the corresponding http request between PSU and TPP if available.  (optional)
     * @param callback The callback to be executed when the API call finishes
     * @return The request call
     * @throws ApiException If fail to process the API call, e.g. serializing the request body object
     */
    public com.squareup.okhttp.Call startConsentAuthorisationAsync(UUID xRequestID, String consentId, Object body, String X_GTW_ASPSP_ID, String xGTWBankCode, String X_GTW_BIC, String digest, String signature, byte[] tpPSignatureCertificate, String PSU_ID, String psUIDType, String psUCorporateID, String psUCorporateIDType, String tpPRedirectPreferred, String tpPRedirectURI, String tpPNokRedirectURI, String tpPNotificationURI, String tpPNotificationContentPreferred, String psUIPAddress, String psUIPPort, String psUAccept, String psUAcceptCharset, String psUAcceptEncoding, String psUAcceptLanguage, String psUUserAgent, String psUHttpMethod, UUID psUDeviceID, String psUGeoLocation, final ApiCallback callback) throws ApiException {

        ProgressResponseBody.ProgressListener progressListener = null;
        ProgressRequestBody.ProgressRequestListener progressRequestListener = null;

        if (callback != null) {
            progressListener = new ProgressResponseBody.ProgressListener() {
                @Override
                public void update(long bytesRead, long contentLength, boolean done) {
                    callback.onDownloadProgress(bytesRead, contentLength, done);
                }
            };

            progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
                @Override
                public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
                    callback.onUploadProgress(bytesWritten, contentLength, done);
                }
            };
        }

        com.squareup.okhttp.Call call = startConsentAuthorisationValidateBeforeCall(xRequestID, consentId, body, X_GTW_ASPSP_ID, xGTWBankCode, X_GTW_BIC, digest, signature, tpPSignatureCertificate, PSU_ID, psUIDType, psUCorporateID, psUCorporateIDType, tpPRedirectPreferred, tpPRedirectURI, tpPNokRedirectURI, tpPNotificationURI, tpPNotificationContentPreferred, psUIPAddress, psUIPPort, psUAccept, psUAcceptCharset, psUAcceptEncoding, psUAcceptLanguage, psUUserAgent, psUHttpMethod, psUDeviceID, psUGeoLocation, progressListener, progressRequestListener);
        Type localVarReturnType = new TypeToken(){}.getType();
        apiClient.executeAsync(call, localVarReturnType, callback);
        return call;
    }
    /**
     * Build call for updateConsentsPsuData
     * @param xRequestID ID of the request, unique to the call, as determined by the initiating party. (required)
     * @param consentId ID of the corresponding consent object as returned by an Account Information Consent Request.  (required)
     * @param authorisationId Resource identification of the related SCA. (required)
     * @param body  (optional)
     * @param X_GTW_ASPSP_ID ASPSP ID in the registry for the request routing (optional)
     * @param xGTWBankCode Bank code of bank to which the request addressed (optional)
     * @param X_GTW_BIC Business Identifier Code for the request routing (optional)
     * @param digest Is contained if and only if the \"Signature\" element is contained in the header of the request. (optional)
     * @param signature A signature of the request by the TPP on application level. This might be mandated by ASPSP.  (optional)
     * @param tpPSignatureCertificate The certificate used for signing the request, in base64 encoding.  Must be contained if a signature is contained.  (optional)
     * @param PSU_ID Client ID of the PSU in the ASPSP client interface.   Might be mandated in the ASPSP's documentation.  It might be contained even if an OAuth2 based authentication was performed in a pre-step or an OAuth2 based SCA was performed in an preceding AIS service in the same session. In this case the ASPSP might check whether PSU-ID and token match,  according to ASPSP documentation.  (optional)
     * @param psUIDType Type of the PSU-ID, needed in scenarios where PSUs have several PSU-IDs as access possibility.  In this case, the mean and use are then defined in the ASPSP’s documentation.  (optional)
     * @param psUCorporateID Might be mandated in the ASPSP's documentation. Only used in a corporate context.  (optional)
     * @param psUCorporateIDType Might be mandated in the ASPSP's documentation. Only used in a corporate context.  (optional)
     * @param psUIPAddress The forwarded IP Address header field consists of the corresponding HTTP request  IP Address field between PSU and TPP.  It shall be contained if and only if this request was actively initiated by the PSU.  (optional)
     * @param psUIPPort The forwarded IP Port header field consists of the corresponding HTTP request IP Port field between PSU and TPP, if available.  (optional)
     * @param psUAccept The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available.  (optional)
     * @param psUAcceptCharset The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available.  (optional)
     * @param psUAcceptEncoding The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available.  (optional)
     * @param psUAcceptLanguage The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available.  (optional)
     * @param psUUserAgent The forwarded Agent header field of the HTTP request between PSU and TPP, if available.  (optional)
     * @param psUHttpMethod HTTP method used at the PSU ? TPP interface, if available. Valid values are: * GET * POST * PUT * PATCH * DELETE  (optional)
     * @param psUDeviceID UUID (Universally Unique Identifier) for a device, which is used by the PSU, if available. UUID identifies either a device or a device dependant application installation. In case of an installation identification this ID need to be unaltered until removal from device.  (optional)
     * @param psUGeoLocation The forwarded Geo Location of the corresponding http request between PSU and TPP if available.  (optional)
     * @param progressListener Progress listener
     * @param progressRequestListener Progress request listener
     * @return Call to execute
     * @throws ApiException If fail to serialize the request body object
     */
    public com.squareup.okhttp.Call updateConsentsPsuDataCall(UUID xRequestID, String consentId, String authorisationId, Object body, String X_GTW_ASPSP_ID, String xGTWBankCode, String X_GTW_BIC, String digest, String signature, byte[] tpPSignatureCertificate, String PSU_ID, String psUIDType, String psUCorporateID, String psUCorporateIDType, String psUIPAddress, String psUIPPort, String psUAccept, String psUAcceptCharset, String psUAcceptEncoding, String psUAcceptLanguage, String psUUserAgent, String psUHttpMethod, UUID psUDeviceID, String psUGeoLocation, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
        Object localVarPostBody = body;
        
        // create path and map variables
        String localVarPath = "/v1/consents/{consentId}/authorisations/{authorisationId}"
            .replaceAll("\\{" + "consentId" + "\\}", apiClient.escapeString(consentId.toString()))
            .replaceAll("\\{" + "authorisationId" + "\\}", apiClient.escapeString(authorisationId.toString()));

        List localVarQueryParams = new ArrayList();
        List localVarCollectionQueryParams = new ArrayList();

        Map localVarHeaderParams = new HashMap();
        if (X_GTW_ASPSP_ID != null)
        localVarHeaderParams.put("X-GTW-ASPSP-ID", apiClient.parameterToString(X_GTW_ASPSP_ID));
        if (xGTWBankCode != null)
        localVarHeaderParams.put("X-GTW-Bank-Code", apiClient.parameterToString(xGTWBankCode));
        if (X_GTW_BIC != null)
        localVarHeaderParams.put("X-GTW-BIC", apiClient.parameterToString(X_GTW_BIC));
        if (xRequestID != null)
        localVarHeaderParams.put("X-Request-ID", apiClient.parameterToString(xRequestID));
        if (digest != null)
        localVarHeaderParams.put("Digest", apiClient.parameterToString(digest));
        if (signature != null)
        localVarHeaderParams.put("Signature", apiClient.parameterToString(signature));
        if (tpPSignatureCertificate != null)
        localVarHeaderParams.put("TPP-Signature-Certificate", apiClient.parameterToString(tpPSignatureCertificate));
        if (PSU_ID != null)
        localVarHeaderParams.put("PSU-ID", apiClient.parameterToString(PSU_ID));
        if (psUIDType != null)
        localVarHeaderParams.put("PSU-ID-Type", apiClient.parameterToString(psUIDType));
        if (psUCorporateID != null)
        localVarHeaderParams.put("PSU-Corporate-ID", apiClient.parameterToString(psUCorporateID));
        if (psUCorporateIDType != null)
        localVarHeaderParams.put("PSU-Corporate-ID-Type", apiClient.parameterToString(psUCorporateIDType));
        if (psUIPAddress != null)
        localVarHeaderParams.put("PSU-IP-Address", apiClient.parameterToString(psUIPAddress));
        if (psUIPPort != null)
        localVarHeaderParams.put("PSU-IP-Port", apiClient.parameterToString(psUIPPort));
        if (psUAccept != null)
        localVarHeaderParams.put("PSU-Accept", apiClient.parameterToString(psUAccept));
        if (psUAcceptCharset != null)
        localVarHeaderParams.put("PSU-Accept-Charset", apiClient.parameterToString(psUAcceptCharset));
        if (psUAcceptEncoding != null)
        localVarHeaderParams.put("PSU-Accept-Encoding", apiClient.parameterToString(psUAcceptEncoding));
        if (psUAcceptLanguage != null)
        localVarHeaderParams.put("PSU-Accept-Language", apiClient.parameterToString(psUAcceptLanguage));
        if (psUUserAgent != null)
        localVarHeaderParams.put("PSU-User-Agent", apiClient.parameterToString(psUUserAgent));
        if (psUHttpMethod != null)
        localVarHeaderParams.put("PSU-Http-Method", apiClient.parameterToString(psUHttpMethod));
        if (psUDeviceID != null)
        localVarHeaderParams.put("PSU-Device-ID", apiClient.parameterToString(psUDeviceID));
        if (psUGeoLocation != null)
        localVarHeaderParams.put("PSU-Geo-Location", apiClient.parameterToString(psUGeoLocation));

        Map localVarFormParams = new HashMap();

        final String[] localVarAccepts = {
            "application/json", "application/problem+json"
        };
        final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
        if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);

        final String[] localVarContentTypes = {
            "application/json"
        };
        final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
        localVarHeaderParams.put("Content-Type", localVarContentType);

        if(progressListener != null) {
            apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
                @Override
                public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
                    com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
                    return originalResponse.newBuilder()
                    .body(new ProgressResponseBody(originalResponse.body(), progressListener))
                    .build();
                }
            });
        }

        String[] localVarAuthNames = new String[] { "BearerAuthOAuth" };
        return apiClient.buildCall(localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
    }
    
    @SuppressWarnings("rawtypes")
    private com.squareup.okhttp.Call updateConsentsPsuDataValidateBeforeCall(UUID xRequestID, String consentId, String authorisationId, Object body, String X_GTW_ASPSP_ID, String xGTWBankCode, String X_GTW_BIC, String digest, String signature, byte[] tpPSignatureCertificate, String PSU_ID, String psUIDType, String psUCorporateID, String psUCorporateIDType, String psUIPAddress, String psUIPPort, String psUAccept, String psUAcceptCharset, String psUAcceptEncoding, String psUAcceptLanguage, String psUUserAgent, String psUHttpMethod, UUID psUDeviceID, String psUGeoLocation, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
        // verify the required parameter 'xRequestID' is set
        if (xRequestID == null) {
            throw new ApiException("Missing the required parameter 'xRequestID' when calling updateConsentsPsuData(Async)");
        }
        // verify the required parameter 'consentId' is set
        if (consentId == null) {
            throw new ApiException("Missing the required parameter 'consentId' when calling updateConsentsPsuData(Async)");
        }
        // verify the required parameter 'authorisationId' is set
        if (authorisationId == null) {
            throw new ApiException("Missing the required parameter 'authorisationId' when calling updateConsentsPsuData(Async)");
        }
        
        com.squareup.okhttp.Call call = updateConsentsPsuDataCall(xRequestID, consentId, authorisationId, body, X_GTW_ASPSP_ID, xGTWBankCode, X_GTW_BIC, digest, signature, tpPSignatureCertificate, PSU_ID, psUIDType, psUCorporateID, psUCorporateIDType, psUIPAddress, psUIPPort, psUAccept, psUAcceptCharset, psUAcceptEncoding, psUAcceptLanguage, psUUserAgent, psUHttpMethod, psUDeviceID, psUGeoLocation, progressListener, progressRequestListener);
        return call;

        
        
        
        
    }

    /**
     * Update PSU Data for consents
     * This method update PSU data on the consents  resource if needed.  It may authorise a consent within the Embedded SCA Approach where needed.  Independently from the SCA Approach it supports e.g. the selection of  the authentication method and a non-SCA PSU authentication.  This methods updates PSU data on the cancellation authorisation resource if needed.   There are several possible Update PSU Data requests in the context of a consent request if needed,  which depends on the SCA approach:  * Redirect SCA Approach:   A specific Update PSU Data Request is applicable for      * the selection of authentication methods, before choosing the actual SCA approach. * Decoupled SCA Approach:   A specific Update PSU Data Request is only applicable for   * adding the PSU Identification, if not provided yet in the Payment Initiation Request or the Account Information Consent Request, or if no OAuth2 access token is used, or   * the selection of authentication methods. * Embedded SCA Approach:    The Update PSU Data Request might be used    * to add credentials as a first factor authentication data of the PSU and   * to select the authentication method and   * transaction authorisation.  The SCA Approach might depend on the chosen SCA method.  For that reason, the following possible Update PSU Data request can apply to all SCA approaches:  * Select an SCA method in case of several SCA methods are available for the customer.  There are the following request types on this access path:   * Update PSU Identification   * Update PSU Authentication   * Select PSU Autorization Method      WARNING: This method need a reduced header,      therefore many optional elements are not present.      Maybe in a later version the access path will change.   * Transaction Authorisation     WARNING: This method need a reduced header,      therefore many optional elements are not present.      Maybe in a later version the access path will change. 
     * @param xRequestID ID of the request, unique to the call, as determined by the initiating party. (required)
     * @param consentId ID of the corresponding consent object as returned by an Account Information Consent Request.  (required)
     * @param authorisationId Resource identification of the related SCA. (required)
     * @param body  (optional)
     * @param X_GTW_ASPSP_ID ASPSP ID in the registry for the request routing (optional)
     * @param xGTWBankCode Bank code of bank to which the request addressed (optional)
     * @param X_GTW_BIC Business Identifier Code for the request routing (optional)
     * @param digest Is contained if and only if the \"Signature\" element is contained in the header of the request. (optional)
     * @param signature A signature of the request by the TPP on application level. This might be mandated by ASPSP.  (optional)
     * @param tpPSignatureCertificate The certificate used for signing the request, in base64 encoding.  Must be contained if a signature is contained.  (optional)
     * @param PSU_ID Client ID of the PSU in the ASPSP client interface.   Might be mandated in the ASPSP's documentation.  It might be contained even if an OAuth2 based authentication was performed in a pre-step or an OAuth2 based SCA was performed in an preceding AIS service in the same session. In this case the ASPSP might check whether PSU-ID and token match,  according to ASPSP documentation.  (optional)
     * @param psUIDType Type of the PSU-ID, needed in scenarios where PSUs have several PSU-IDs as access possibility.  In this case, the mean and use are then defined in the ASPSP’s documentation.  (optional)
     * @param psUCorporateID Might be mandated in the ASPSP's documentation. Only used in a corporate context.  (optional)
     * @param psUCorporateIDType Might be mandated in the ASPSP's documentation. Only used in a corporate context.  (optional)
     * @param psUIPAddress The forwarded IP Address header field consists of the corresponding HTTP request  IP Address field between PSU and TPP.  It shall be contained if and only if this request was actively initiated by the PSU.  (optional)
     * @param psUIPPort The forwarded IP Port header field consists of the corresponding HTTP request IP Port field between PSU and TPP, if available.  (optional)
     * @param psUAccept The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available.  (optional)
     * @param psUAcceptCharset The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available.  (optional)
     * @param psUAcceptEncoding The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available.  (optional)
     * @param psUAcceptLanguage The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available.  (optional)
     * @param psUUserAgent The forwarded Agent header field of the HTTP request between PSU and TPP, if available.  (optional)
     * @param psUHttpMethod HTTP method used at the PSU ? TPP interface, if available. Valid values are: * GET * POST * PUT * PATCH * DELETE  (optional)
     * @param psUDeviceID UUID (Universally Unique Identifier) for a device, which is used by the PSU, if available. UUID identifies either a device or a device dependant application installation. In case of an installation identification this ID need to be unaltered until removal from device.  (optional)
     * @param psUGeoLocation The forwarded Geo Location of the corresponding http request between PSU and TPP if available.  (optional)
     * @return Object
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public Object updateConsentsPsuData(UUID xRequestID, String consentId, String authorisationId, Object body, String X_GTW_ASPSP_ID, String xGTWBankCode, String X_GTW_BIC, String digest, String signature, byte[] tpPSignatureCertificate, String PSU_ID, String psUIDType, String psUCorporateID, String psUCorporateIDType, String psUIPAddress, String psUIPPort, String psUAccept, String psUAcceptCharset, String psUAcceptEncoding, String psUAcceptLanguage, String psUUserAgent, String psUHttpMethod, UUID psUDeviceID, String psUGeoLocation) throws ApiException {
        ApiResponse resp = updateConsentsPsuDataWithHttpInfo(xRequestID, consentId, authorisationId, body, X_GTW_ASPSP_ID, xGTWBankCode, X_GTW_BIC, digest, signature, tpPSignatureCertificate, PSU_ID, psUIDType, psUCorporateID, psUCorporateIDType, psUIPAddress, psUIPPort, psUAccept, psUAcceptCharset, psUAcceptEncoding, psUAcceptLanguage, psUUserAgent, psUHttpMethod, psUDeviceID, psUGeoLocation);
        return resp.getData();
    }

    /**
     * Update PSU Data for consents
     * This method update PSU data on the consents  resource if needed.  It may authorise a consent within the Embedded SCA Approach where needed.  Independently from the SCA Approach it supports e.g. the selection of  the authentication method and a non-SCA PSU authentication.  This methods updates PSU data on the cancellation authorisation resource if needed.   There are several possible Update PSU Data requests in the context of a consent request if needed,  which depends on the SCA approach:  * Redirect SCA Approach:   A specific Update PSU Data Request is applicable for      * the selection of authentication methods, before choosing the actual SCA approach. * Decoupled SCA Approach:   A specific Update PSU Data Request is only applicable for   * adding the PSU Identification, if not provided yet in the Payment Initiation Request or the Account Information Consent Request, or if no OAuth2 access token is used, or   * the selection of authentication methods. * Embedded SCA Approach:    The Update PSU Data Request might be used    * to add credentials as a first factor authentication data of the PSU and   * to select the authentication method and   * transaction authorisation.  The SCA Approach might depend on the chosen SCA method.  For that reason, the following possible Update PSU Data request can apply to all SCA approaches:  * Select an SCA method in case of several SCA methods are available for the customer.  There are the following request types on this access path:   * Update PSU Identification   * Update PSU Authentication   * Select PSU Autorization Method      WARNING: This method need a reduced header,      therefore many optional elements are not present.      Maybe in a later version the access path will change.   * Transaction Authorisation     WARNING: This method need a reduced header,      therefore many optional elements are not present.      Maybe in a later version the access path will change. 
     * @param xRequestID ID of the request, unique to the call, as determined by the initiating party. (required)
     * @param consentId ID of the corresponding consent object as returned by an Account Information Consent Request.  (required)
     * @param authorisationId Resource identification of the related SCA. (required)
     * @param body  (optional)
     * @param X_GTW_ASPSP_ID ASPSP ID in the registry for the request routing (optional)
     * @param xGTWBankCode Bank code of bank to which the request addressed (optional)
     * @param X_GTW_BIC Business Identifier Code for the request routing (optional)
     * @param digest Is contained if and only if the \"Signature\" element is contained in the header of the request. (optional)
     * @param signature A signature of the request by the TPP on application level. This might be mandated by ASPSP.  (optional)
     * @param tpPSignatureCertificate The certificate used for signing the request, in base64 encoding.  Must be contained if a signature is contained.  (optional)
     * @param PSU_ID Client ID of the PSU in the ASPSP client interface.   Might be mandated in the ASPSP's documentation.  It might be contained even if an OAuth2 based authentication was performed in a pre-step or an OAuth2 based SCA was performed in an preceding AIS service in the same session. In this case the ASPSP might check whether PSU-ID and token match,  according to ASPSP documentation.  (optional)
     * @param psUIDType Type of the PSU-ID, needed in scenarios where PSUs have several PSU-IDs as access possibility.  In this case, the mean and use are then defined in the ASPSP’s documentation.  (optional)
     * @param psUCorporateID Might be mandated in the ASPSP's documentation. Only used in a corporate context.  (optional)
     * @param psUCorporateIDType Might be mandated in the ASPSP's documentation. Only used in a corporate context.  (optional)
     * @param psUIPAddress The forwarded IP Address header field consists of the corresponding HTTP request  IP Address field between PSU and TPP.  It shall be contained if and only if this request was actively initiated by the PSU.  (optional)
     * @param psUIPPort The forwarded IP Port header field consists of the corresponding HTTP request IP Port field between PSU and TPP, if available.  (optional)
     * @param psUAccept The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available.  (optional)
     * @param psUAcceptCharset The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available.  (optional)
     * @param psUAcceptEncoding The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available.  (optional)
     * @param psUAcceptLanguage The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available.  (optional)
     * @param psUUserAgent The forwarded Agent header field of the HTTP request between PSU and TPP, if available.  (optional)
     * @param psUHttpMethod HTTP method used at the PSU ? TPP interface, if available. Valid values are: * GET * POST * PUT * PATCH * DELETE  (optional)
     * @param psUDeviceID UUID (Universally Unique Identifier) for a device, which is used by the PSU, if available. UUID identifies either a device or a device dependant application installation. In case of an installation identification this ID need to be unaltered until removal from device.  (optional)
     * @param psUGeoLocation The forwarded Geo Location of the corresponding http request between PSU and TPP if available.  (optional)
     * @return ApiResponse<Object>
     * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
     */
    public ApiResponse updateConsentsPsuDataWithHttpInfo(UUID xRequestID, String consentId, String authorisationId, Object body, String X_GTW_ASPSP_ID, String xGTWBankCode, String X_GTW_BIC, String digest, String signature, byte[] tpPSignatureCertificate, String PSU_ID, String psUIDType, String psUCorporateID, String psUCorporateIDType, String psUIPAddress, String psUIPPort, String psUAccept, String psUAcceptCharset, String psUAcceptEncoding, String psUAcceptLanguage, String psUUserAgent, String psUHttpMethod, UUID psUDeviceID, String psUGeoLocation) throws ApiException {
        com.squareup.okhttp.Call call = updateConsentsPsuDataValidateBeforeCall(xRequestID, consentId, authorisationId, body, X_GTW_ASPSP_ID, xGTWBankCode, X_GTW_BIC, digest, signature, tpPSignatureCertificate, PSU_ID, psUIDType, psUCorporateID, psUCorporateIDType, psUIPAddress, psUIPPort, psUAccept, psUAcceptCharset, psUAcceptEncoding, psUAcceptLanguage, psUUserAgent, psUHttpMethod, psUDeviceID, psUGeoLocation, null, null);
        Type localVarReturnType = new TypeToken(){}.getType();
        return apiClient.execute(call, localVarReturnType);
    }

    /**
     * Update PSU Data for consents (asynchronously)
     * This method update PSU data on the consents  resource if needed.  It may authorise a consent within the Embedded SCA Approach where needed.  Independently from the SCA Approach it supports e.g. the selection of  the authentication method and a non-SCA PSU authentication.  This methods updates PSU data on the cancellation authorisation resource if needed.   There are several possible Update PSU Data requests in the context of a consent request if needed,  which depends on the SCA approach:  * Redirect SCA Approach:   A specific Update PSU Data Request is applicable for      * the selection of authentication methods, before choosing the actual SCA approach. * Decoupled SCA Approach:   A specific Update PSU Data Request is only applicable for   * adding the PSU Identification, if not provided yet in the Payment Initiation Request or the Account Information Consent Request, or if no OAuth2 access token is used, or   * the selection of authentication methods. * Embedded SCA Approach:    The Update PSU Data Request might be used    * to add credentials as a first factor authentication data of the PSU and   * to select the authentication method and   * transaction authorisation.  The SCA Approach might depend on the chosen SCA method.  For that reason, the following possible Update PSU Data request can apply to all SCA approaches:  * Select an SCA method in case of several SCA methods are available for the customer.  There are the following request types on this access path:   * Update PSU Identification   * Update PSU Authentication   * Select PSU Autorization Method      WARNING: This method need a reduced header,      therefore many optional elements are not present.      Maybe in a later version the access path will change.   * Transaction Authorisation     WARNING: This method need a reduced header,      therefore many optional elements are not present.      Maybe in a later version the access path will change. 
     * @param xRequestID ID of the request, unique to the call, as determined by the initiating party. (required)
     * @param consentId ID of the corresponding consent object as returned by an Account Information Consent Request.  (required)
     * @param authorisationId Resource identification of the related SCA. (required)
     * @param body  (optional)
     * @param X_GTW_ASPSP_ID ASPSP ID in the registry for the request routing (optional)
     * @param xGTWBankCode Bank code of bank to which the request addressed (optional)
     * @param X_GTW_BIC Business Identifier Code for the request routing (optional)
     * @param digest Is contained if and only if the \"Signature\" element is contained in the header of the request. (optional)
     * @param signature A signature of the request by the TPP on application level. This might be mandated by ASPSP.  (optional)
     * @param tpPSignatureCertificate The certificate used for signing the request, in base64 encoding.  Must be contained if a signature is contained.  (optional)
     * @param PSU_ID Client ID of the PSU in the ASPSP client interface.   Might be mandated in the ASPSP's documentation.  It might be contained even if an OAuth2 based authentication was performed in a pre-step or an OAuth2 based SCA was performed in an preceding AIS service in the same session. In this case the ASPSP might check whether PSU-ID and token match,  according to ASPSP documentation.  (optional)
     * @param psUIDType Type of the PSU-ID, needed in scenarios where PSUs have several PSU-IDs as access possibility.  In this case, the mean and use are then defined in the ASPSP’s documentation.  (optional)
     * @param psUCorporateID Might be mandated in the ASPSP's documentation. Only used in a corporate context.  (optional)
     * @param psUCorporateIDType Might be mandated in the ASPSP's documentation. Only used in a corporate context.  (optional)
     * @param psUIPAddress The forwarded IP Address header field consists of the corresponding HTTP request  IP Address field between PSU and TPP.  It shall be contained if and only if this request was actively initiated by the PSU.  (optional)
     * @param psUIPPort The forwarded IP Port header field consists of the corresponding HTTP request IP Port field between PSU and TPP, if available.  (optional)
     * @param psUAccept The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available.  (optional)
     * @param psUAcceptCharset The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available.  (optional)
     * @param psUAcceptEncoding The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available.  (optional)
     * @param psUAcceptLanguage The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available.  (optional)
     * @param psUUserAgent The forwarded Agent header field of the HTTP request between PSU and TPP, if available.  (optional)
     * @param psUHttpMethod HTTP method used at the PSU ? TPP interface, if available. Valid values are: * GET * POST * PUT * PATCH * DELETE  (optional)
     * @param psUDeviceID UUID (Universally Unique Identifier) for a device, which is used by the PSU, if available. UUID identifies either a device or a device dependant application installation. In case of an installation identification this ID need to be unaltered until removal from device.  (optional)
     * @param psUGeoLocation The forwarded Geo Location of the corresponding http request between PSU and TPP if available.  (optional)
     * @param callback The callback to be executed when the API call finishes
     * @return The request call
     * @throws ApiException If fail to process the API call, e.g. serializing the request body object
     */
    public com.squareup.okhttp.Call updateConsentsPsuDataAsync(UUID xRequestID, String consentId, String authorisationId, Object body, String X_GTW_ASPSP_ID, String xGTWBankCode, String X_GTW_BIC, String digest, String signature, byte[] tpPSignatureCertificate, String PSU_ID, String psUIDType, String psUCorporateID, String psUCorporateIDType, String psUIPAddress, String psUIPPort, String psUAccept, String psUAcceptCharset, String psUAcceptEncoding, String psUAcceptLanguage, String psUUserAgent, String psUHttpMethod, UUID psUDeviceID, String psUGeoLocation, final ApiCallback callback) throws ApiException {

        ProgressResponseBody.ProgressListener progressListener = null;
        ProgressRequestBody.ProgressRequestListener progressRequestListener = null;

        if (callback != null) {
            progressListener = new ProgressResponseBody.ProgressListener() {
                @Override
                public void update(long bytesRead, long contentLength, boolean done) {
                    callback.onDownloadProgress(bytesRead, contentLength, done);
                }
            };

            progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
                @Override
                public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
                    callback.onUploadProgress(bytesWritten, contentLength, done);
                }
            };
        }

        com.squareup.okhttp.Call call = updateConsentsPsuDataValidateBeforeCall(xRequestID, consentId, authorisationId, body, X_GTW_ASPSP_ID, xGTWBankCode, X_GTW_BIC, digest, signature, tpPSignatureCertificate, PSU_ID, psUIDType, psUCorporateID, psUCorporateIDType, psUIPAddress, psUIPPort, psUAccept, psUAcceptCharset, psUAcceptEncoding, psUAcceptLanguage, psUUserAgent, psUHttpMethod, psUDeviceID, psUGeoLocation, progressListener, progressRequestListener);
        Type localVarReturnType = new TypeToken(){}.getType();
        apiClient.executeAsync(call, localVarReturnType, callback);
        return call;
    }
}