/*
 * Copyright 2018-2024 adorsys GmbH & Co KG
 *
 * This program is free software: you can redistribute it and/or modify it
 * under the terms of the GNU Affero General Public License as published
 * by the Free Software Foundation, either version 3 of the License, or (at
 * your option) any later version. This program is distributed in the hope that
 * it will be useful, but WITHOUT ANY WARRANTY; without even the implied
 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 * See the GNU Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with this program. If not, see https://www.gnu.org/licenses/.
 *
 * This project is also available under a separate commercial license. You can
 * contact us at sales@adorsys.com.
 */

/**
 * NOTE: This class is auto generated by the swagger code generator program (3.0.0-SNAPSHOT).
 * https://github.com/swagger-api/swagger-codegen
 * Do not edit the class manually.
 */
package de.adorsys.psd2.api;

import com.fasterxml.jackson.databind.ObjectMapper;
import de.adorsys.psd2.model.*;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.enums.ParameterIn;
import io.swagger.v3.oas.annotations.media.Content;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.responses.ApiResponse;
import io.swagger.v3.oas.annotations.responses.ApiResponses;
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.validation.Valid;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;

import java.util.Optional;
import java.util.UUID;

@jakarta.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2022-05-06T13:00:42.214155+03:00[Europe/Kiev]")
@Validated
public interface PaymentApi {

    Logger log = LoggerFactory.getLogger(PaymentApi.class);

    default Optional<ObjectMapper> getObjectMapper() {
        return Optional.empty();
    }

    default Optional<HttpServletRequest> getRequest() {
        return Optional.empty();
    }

    default Optional<String> getAcceptHeader() {
        return getRequest().map(r -> r.getHeader("Accept"));
    }

    @Operation(summary = "Payment cancellation request", description = "This method initiates the cancellation of a payment.  Depending on the payment-service, the payment-product and the ASPSP's implementation,  this TPP call might be sufficient to cancel a payment.  If an authorisation of the payment cancellation is mandated by the ASPSP,  a corresponding hyperlink will be contained in the response message.  Cancels the addressed payment with resource identification paymentId if applicable to the payment-service, payment-product and received in product related timelines (e.g. before end of business day for scheduled payments of the last business day before the scheduled execution day).   The response to this DELETE command will tell the TPP whether the   * access method was rejected,   * access method was successful, or   * access method is generally applicable, but further authorisation processes are needed. ", security = {
        @SecurityRequirement(name = "BearerAuthOAuth")}, tags = {"Payment Initiation Service (PIS)"})
    @ApiResponses(value = {
        @ApiResponse(responseCode = "204", description = "No Content"),

        @ApiResponse(responseCode = "202", description = "Received", content = @Content(mediaType = "application/json", schema = @Schema(implementation = PaymentInitiationCancelResponse202.class))),

        @ApiResponse(responseCode = "400", description = "Bad Request", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Error400NGPIS.class))),

        @ApiResponse(responseCode = "401", description = "Unauthorized", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Error401NGPIS.class))),

        @ApiResponse(responseCode = "403", description = "Forbidden", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Error403NGPIS.class))),

        @ApiResponse(responseCode = "404", description = "Not found", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Error404NGPIS.class))),

        @ApiResponse(responseCode = "405", description = "Method Not Allowed", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Error405NGPISCANC.class))),

        @ApiResponse(responseCode = "406", description = "Not Acceptable"),

        @ApiResponse(responseCode = "408", description = "Request Timeout"),

        @ApiResponse(responseCode = "409", description = "Conflict", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Error409NGPIS.class))),

        @ApiResponse(responseCode = "415", description = "Unsupported Media Type"),

        @ApiResponse(responseCode = "429", description = "Too Many Requests"),

        @ApiResponse(responseCode = "500", description = "Internal Server Error"),

        @ApiResponse(responseCode = "503", description = "Service Unavailable")})
    @RequestMapping(value = "/v1/{payment-service}/{payment-product}/{paymentId}",
        produces = {"application/json", "application/problem+json"},
        method = RequestMethod.DELETE)
    default ResponseEntity<PaymentInitiationCancelResponse202> _cancelPayment(@Parameter(in = ParameterIn.PATH, description = "Payment service:  Possible values are: * payments * bulk-payments * periodic-payments ", required = true, schema = @Schema(allowableValues = {"payments", "bulk-payments", "periodic-payments"}
    )) @PathVariable("payment-service") String paymentService, @Parameter(in = ParameterIn.PATH, description = "The addressed payment product endpoint, e.g. for SEPA Credit Transfers (SCT). The ASPSP will publish which of the payment products/endpoints will be supported.  The following payment products are supported:   - sepa-credit-transfers   - instant-sepa-credit-transfers   - target-2-payments   - cross-border-credit-transfers   - pain.001-sepa-credit-transfers   - pain.001-instant-sepa-credit-transfers   - pain.001-target-2-payments   - pain.001-cross-border-credit-transfers  **Remark:** For all SEPA Credit Transfer based endpoints which accept XML encoding,  the XML pain.001 schemes provided by EPC are supported by the ASPSP as a minimum for the body content.  Further XML schemes might be supported by some communities.  **Remark:** For cross-border and TARGET-2 payments only community wide pain.001 schemes do exist.  There are plenty of country specific scheme variants. ", required = true, schema = @Schema(allowableValues = {"sepa-credit-transfers", "instant-sepa-credit-transfers", "target-2-payments", "cross-border-credit-transfers", "pain.001-sepa-credit-transfers", "pain.001-instant-sepa-credit-transfers", "pain.001-target-2-payments", "pain.001-cross-border-credit-transfers"}
    )) @PathVariable("payment-product") String paymentProduct, @Parameter(in = ParameterIn.PATH, description = "Resource identification of the generated payment initiation resource.", required = true, schema = @Schema()) @PathVariable("paymentId") String paymentId, @Parameter(in = ParameterIn.HEADER, description = "ID of the request, unique to the call, as determined by the initiating party.", required = true, schema = @Schema()) @RequestHeader(value = "X-Request-ID", required = true) UUID xRequestID, @Parameter(in = ParameterIn.HEADER, description = "Is contained if and only if the \"Signature\" element is contained in the header of the request.", schema = @Schema()) @RequestHeader(value = "Digest", required = false) String digest, @Parameter(in = ParameterIn.HEADER, description = "A signature of the request by the TPP on application level. This might be mandated by ASPSP. ", schema = @Schema()) @RequestHeader(value = "Signature", required = false) String signature, @Parameter(in = ParameterIn.HEADER, description = "The certificate used for signing the request, in base64 encoding.  Must be contained if a signature is contained. ", schema = @Schema()) @RequestHeader(value = "TPP-Signature-Certificate", required = false) byte[] tpPSignatureCertificate, @Parameter(in = ParameterIn.HEADER, description = "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 parameter TPP-Decoupled-Preferred and 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. ", schema = @Schema()) @RequestHeader(value = "TPP-Redirect-Preferred", required = false) Boolean tpPRedirectPreferred, @Parameter(in = ParameterIn.HEADER, description = "If it equals \"true\", the TPP prefers a decoupled SCA approach.  If it equals \"false\", the TPP prefers not to use the decoupled approach for SCA. The ASPSP will then choose between the embedded or the redirect 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 parameter TPP-Redirect-Preferred and the SCA method chosen by the TPP/PSU.  The parameter might be ignored by the ASPSP. If both parameters TPP-Redirect-Preferred and TPP-Decoupled-Preferred are present and true, the request is still not rejected, but it is up to the ASPSP, which approach will actually be used.  **Remark for Future:**  TPP-Redirect-Preferred and TPP-Decoupled-Preferred will be revised in future versions, maybe merged. Currently kept separate for downward compatibility. ", schema = @Schema()) @RequestHeader(value = "TPP-Decoupled-Preferred", required = false) Boolean tpPDecoupledPreferred, @Parameter(in = ParameterIn.HEADER, description = "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. ", schema = @Schema()) @RequestHeader(value = "TPP-Nok-Redirect-URI", required = false) String tpPNokRedirectURI, @Parameter(in = ParameterIn.HEADER, description = "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. ", schema = @Schema()) @RequestHeader(value = "TPP-Redirect-URI", required = false) String tpPRedirectURI, @Parameter(in = ParameterIn.HEADER, description = "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. ", schema = @Schema()) @RequestHeader(value = "TPP-Explicit-Authorisation-Preferred", required = false) Boolean tpPExplicitAuthorisationPreferred, @Parameter(in = ParameterIn.HEADER, description = "The forwarded IP Address header field consists of the corresponding http request IP Address field between PSU and TPP. ", schema = @Schema()) @RequestHeader(value = "PSU-IP-Address", required = false) String psUIPAddress, @Parameter(in = ParameterIn.HEADER, description = "The forwarded IP Port header field consists of the corresponding HTTP request IP Port field between PSU and TPP, if available. ", schema = @Schema()) @RequestHeader(value = "PSU-IP-Port", required = false) String psUIPPort, @Parameter(in = ParameterIn.HEADER, description = "The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available. ", schema = @Schema()) @RequestHeader(value = "PSU-Accept", required = false) String psUAccept, @Parameter(in = ParameterIn.HEADER, description = "The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available. ", schema = @Schema()) @RequestHeader(value = "PSU-Accept-Charset", required = false) String psUAcceptCharset, @Parameter(in = ParameterIn.HEADER, description = "The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available. ", schema = @Schema()) @RequestHeader(value = "PSU-Accept-Encoding", required = false) String psUAcceptEncoding, @Parameter(in = ParameterIn.HEADER, description = "The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available. ", schema = @Schema()) @RequestHeader(value = "PSU-Accept-Language", required = false) String psUAcceptLanguage, @Parameter(in = ParameterIn.HEADER, description = "The forwarded Agent header field of the HTTP request between PSU and TPP, if available. ", schema = @Schema()) @RequestHeader(value = "PSU-User-Agent", required = false) String psUUserAgent, @Parameter(in = ParameterIn.HEADER, description = "HTTP method used at the PSU ? TPP interface, if available. Valid values are: * GET * POST * PUT * PATCH * DELETE ", schema = @Schema(allowableValues = {"GET", "POST", "PUT", "PATCH", "DELETE"}
    )) @RequestHeader(value = "PSU-Http-Method", required = false) String psUHttpMethod, @Parameter(in = ParameterIn.HEADER, description = "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 needs to be unaltered until removal from device. ", schema = @Schema()) @RequestHeader(value = "PSU-Device-ID", required = false) UUID psUDeviceID, @Parameter(in = ParameterIn.HEADER, description = "The forwarded Geo Location of the corresponding http request between PSU and TPP if available. ", schema = @Schema()) @RequestHeader(value = "PSU-Geo-Location", required = false) String psUGeoLocation) {
        return cancelPayment(paymentService, paymentProduct, paymentId, xRequestID, digest, signature, tpPSignatureCertificate, tpPRedirectPreferred, tpPDecoupledPreferred, tpPNokRedirectURI, tpPRedirectURI, tpPExplicitAuthorisationPreferred, psUIPAddress, psUIPPort, psUAccept, psUAcceptCharset, psUAcceptEncoding, psUAcceptLanguage, psUUserAgent, psUHttpMethod, psUDeviceID, psUGeoLocation);
    }

    // Override this method
    default ResponseEntity<PaymentInitiationCancelResponse202> cancelPayment(String paymentService, String paymentProduct, String paymentId, UUID xRequestID, String digest, String signature, byte[] tpPSignatureCertificate, Boolean tpPRedirectPreferred, Boolean tpPDecoupledPreferred, String tpPNokRedirectURI, String tpPRedirectURI, Boolean tpPExplicitAuthorisationPreferred, String psUIPAddress, String psUIPPort, String psUAccept, String psUAcceptCharset, String psUAcceptEncoding, String psUAcceptLanguage, String psUUserAgent, String psUHttpMethod, UUID psUDeviceID, String psUGeoLocation) {
        if (getObjectMapper().isPresent() && getAcceptHeader().isPresent()) {
        } else {
            log.warn("ObjectMapper or HttpServletRequest not configured in default PaymentInitiationServicePisApi interface so no example is generated");
        }
        return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
    }


    @Operation(summary = "Read the SCA status of the payment cancellation's authorisation", description = "This method returns the SCA status of a payment initiation's authorisation sub-resource. ", security = {
        @SecurityRequirement(name = "BearerAuthOAuth")}, tags = {"Payment Initiation Service (PIS)", "Common Services"})
    @ApiResponses(value = {
        @ApiResponse(responseCode = "200", description = "OK", content = @Content(mediaType = "application/json", schema = @Schema(implementation = ScaStatusResponse.class))),

        @ApiResponse(responseCode = "400", description = "Bad Request", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Error400NGPIS.class))),

        @ApiResponse(responseCode = "401", description = "Unauthorized", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Error401NGPIS.class))),

        @ApiResponse(responseCode = "403", description = "Forbidden", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Error403NGPIS.class))),

        @ApiResponse(responseCode = "404", description = "Not found", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Error404NGPIS.class))),

        @ApiResponse(responseCode = "405", description = "Method Not Allowed", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Error405NGPIS.class))),

        @ApiResponse(responseCode = "406", description = "Not Acceptable"),

        @ApiResponse(responseCode = "408", description = "Request Timeout"),

        @ApiResponse(responseCode = "409", description = "Conflict", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Error409NGPIS.class))),

        @ApiResponse(responseCode = "415", description = "Unsupported Media Type"),

        @ApiResponse(responseCode = "429", description = "Too Many Requests"),

        @ApiResponse(responseCode = "500", description = "Internal Server Error"),

        @ApiResponse(responseCode = "503", description = "Service Unavailable")})
    @RequestMapping(value = "/v1/{payment-service}/{payment-product}/{paymentId}/cancellation-authorisations/{authorisationId}",
        produces = {"application/json", "application/problem+json"},
        method = RequestMethod.GET)
    default ResponseEntity<ScaStatusResponse> _getPaymentCancellationScaStatus(@Parameter(in = ParameterIn.PATH, description = "Payment service:  Possible values are: * payments * bulk-payments * periodic-payments ", required = true, schema = @Schema(allowableValues = {"payments", "bulk-payments", "periodic-payments"}
    )) @PathVariable("payment-service") String paymentService, @Parameter(in = ParameterIn.PATH, description = "The addressed payment product endpoint, e.g. for SEPA Credit Transfers (SCT). The ASPSP will publish which of the payment products/endpoints will be supported.  The following payment products are supported:   - sepa-credit-transfers   - instant-sepa-credit-transfers   - target-2-payments   - cross-border-credit-transfers   - pain.001-sepa-credit-transfers   - pain.001-instant-sepa-credit-transfers   - pain.001-target-2-payments   - pain.001-cross-border-credit-transfers  **Remark:** For all SEPA Credit Transfer based endpoints which accept XML encoding,  the XML pain.001 schemes provided by EPC are supported by the ASPSP as a minimum for the body content.  Further XML schemes might be supported by some communities.  **Remark:** For cross-border and TARGET-2 payments only community wide pain.001 schemes do exist.  There are plenty of country specific scheme variants. ", required = true, schema = @Schema(allowableValues = {"sepa-credit-transfers", "instant-sepa-credit-transfers", "target-2-payments", "cross-border-credit-transfers", "pain.001-sepa-credit-transfers", "pain.001-instant-sepa-credit-transfers", "pain.001-target-2-payments", "pain.001-cross-border-credit-transfers"}
    )) @PathVariable("payment-product") String paymentProduct, @Parameter(in = ParameterIn.PATH, description = "Resource identification of the generated payment initiation resource.", required = true, schema = @Schema()) @PathVariable("paymentId") String paymentId, @Parameter(in = ParameterIn.PATH, description = "Resource identification of the related SCA.", required = true, schema = @Schema()) @PathVariable("authorisationId") String authorisationId, @Parameter(in = ParameterIn.HEADER, description = "ID of the request, unique to the call, as determined by the initiating party.", required = true, schema = @Schema()) @RequestHeader(value = "X-Request-ID", required = true) UUID xRequestID, @Parameter(in = ParameterIn.HEADER, description = "Is contained if and only if the \"Signature\" element is contained in the header of the request.", schema = @Schema()) @RequestHeader(value = "Digest", required = false) String digest, @Parameter(in = ParameterIn.HEADER, description = "A signature of the request by the TPP on application level. This might be mandated by ASPSP. ", schema = @Schema()) @RequestHeader(value = "Signature", required = false) String signature, @Parameter(in = ParameterIn.HEADER, description = "The certificate used for signing the request, in base64 encoding.  Must be contained if a signature is contained. ", schema = @Schema()) @RequestHeader(value = "TPP-Signature-Certificate", required = false) byte[] tpPSignatureCertificate, @Parameter(in = ParameterIn.HEADER, description = "The forwarded IP Address header field consists of the corresponding http request IP Address field between PSU and TPP. ", schema = @Schema()) @RequestHeader(value = "PSU-IP-Address", required = false) String psUIPAddress, @Parameter(in = ParameterIn.HEADER, description = "The forwarded IP Port header field consists of the corresponding HTTP request IP Port field between PSU and TPP, if available. ", schema = @Schema()) @RequestHeader(value = "PSU-IP-Port", required = false) String psUIPPort, @Parameter(in = ParameterIn.HEADER, description = "The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available. ", schema = @Schema()) @RequestHeader(value = "PSU-Accept", required = false) String psUAccept, @Parameter(in = ParameterIn.HEADER, description = "The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available. ", schema = @Schema()) @RequestHeader(value = "PSU-Accept-Charset", required = false) String psUAcceptCharset, @Parameter(in = ParameterIn.HEADER, description = "The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available. ", schema = @Schema()) @RequestHeader(value = "PSU-Accept-Encoding", required = false) String psUAcceptEncoding, @Parameter(in = ParameterIn.HEADER, description = "The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available. ", schema = @Schema()) @RequestHeader(value = "PSU-Accept-Language", required = false) String psUAcceptLanguage, @Parameter(in = ParameterIn.HEADER, description = "The forwarded Agent header field of the HTTP request between PSU and TPP, if available. ", schema = @Schema()) @RequestHeader(value = "PSU-User-Agent", required = false) String psUUserAgent, @Parameter(in = ParameterIn.HEADER, description = "HTTP method used at the PSU ? TPP interface, if available. Valid values are: * GET * POST * PUT * PATCH * DELETE ", schema = @Schema(allowableValues = {"GET", "POST", "PUT", "PATCH", "DELETE"}
    )) @RequestHeader(value = "PSU-Http-Method", required = false) String psUHttpMethod, @Parameter(in = ParameterIn.HEADER, description = "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 needs to be unaltered until removal from device. ", schema = @Schema()) @RequestHeader(value = "PSU-Device-ID", required = false) UUID psUDeviceID, @Parameter(in = ParameterIn.HEADER, description = "The forwarded Geo Location of the corresponding http request between PSU and TPP if available. ", schema = @Schema()) @RequestHeader(value = "PSU-Geo-Location", required = false) String psUGeoLocation) {
        return getPaymentCancellationScaStatus(paymentService, paymentProduct, paymentId, authorisationId, xRequestID, digest, signature, tpPSignatureCertificate, psUIPAddress, psUIPPort, psUAccept, psUAcceptCharset, psUAcceptEncoding, psUAcceptLanguage, psUUserAgent, psUHttpMethod, psUDeviceID, psUGeoLocation);
    }

    // Override this method
    default ResponseEntity<ScaStatusResponse> getPaymentCancellationScaStatus(String paymentService, String paymentProduct, String paymentId, String authorisationId, UUID xRequestID, 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) {
        if (getObjectMapper().isPresent() && getAcceptHeader().isPresent()) {
        } else {
            log.warn("ObjectMapper or HttpServletRequest not configured in default PaymentInitiationServicePisApi interface so no example is generated");
        }
        return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
    }


    @Operation(summary = "Get payment information", description = "Returns the content of a payment object", security = {
        @SecurityRequirement(name = "BearerAuthOAuth")}, tags = {"Payment Initiation Service (PIS)"})
    @ApiResponses(value = {
        @ApiResponse(responseCode = "200", description = "OK", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Object.class))),

        @ApiResponse(responseCode = "400", description = "Bad Request", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Error400NGPIS.class))),

        @ApiResponse(responseCode = "401", description = "Unauthorized", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Error401NGPIS.class))),

        @ApiResponse(responseCode = "403", description = "Forbidden", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Error403NGPIS.class))),

        @ApiResponse(responseCode = "404", description = "Not found", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Error404NGPIS.class))),

        @ApiResponse(responseCode = "405", description = "Method Not Allowed", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Error405NGPIS.class))),

        @ApiResponse(responseCode = "406", description = "Not Acceptable"),

        @ApiResponse(responseCode = "408", description = "Request Timeout"),

        @ApiResponse(responseCode = "409", description = "Conflict", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Error409NGPIS.class))),

        @ApiResponse(responseCode = "415", description = "Unsupported Media Type"),

        @ApiResponse(responseCode = "429", description = "Too Many Requests"),

        @ApiResponse(responseCode = "500", description = "Internal Server Error"),

        @ApiResponse(responseCode = "503", description = "Service Unavailable")})
    @RequestMapping(value = "/v1/{payment-service}/{payment-product}/{paymentId}",
        produces = {"application/json", "application/xml", "multipart/form-data", "application/problem+json"},
        method = RequestMethod.GET)
    default ResponseEntity<Object> _getPaymentInformation(@Parameter(in = ParameterIn.PATH, description = "Payment service:  Possible values are: * payments * bulk-payments * periodic-payments ", required = true, schema = @Schema(allowableValues = {"payments", "bulk-payments", "periodic-payments"}
    )) @PathVariable("payment-service") String paymentService, @Parameter(in = ParameterIn.PATH, description = "The addressed payment product endpoint, e.g. for SEPA Credit Transfers (SCT). The ASPSP will publish which of the payment products/endpoints will be supported.  The following payment products are supported:   - sepa-credit-transfers   - instant-sepa-credit-transfers   - target-2-payments   - cross-border-credit-transfers   - pain.001-sepa-credit-transfers   - pain.001-instant-sepa-credit-transfers   - pain.001-target-2-payments   - pain.001-cross-border-credit-transfers  **Remark:** For all SEPA Credit Transfer based endpoints which accept XML encoding,  the XML pain.001 schemes provided by EPC are supported by the ASPSP as a minimum for the body content.  Further XML schemes might be supported by some communities.  **Remark:** For cross-border and TARGET-2 payments only community wide pain.001 schemes do exist.  There are plenty of country specific scheme variants. ", required = true, schema = @Schema(allowableValues = {"sepa-credit-transfers", "instant-sepa-credit-transfers", "target-2-payments", "cross-border-credit-transfers", "pain.001-sepa-credit-transfers", "pain.001-instant-sepa-credit-transfers", "pain.001-target-2-payments", "pain.001-cross-border-credit-transfers"}
    )) @PathVariable("payment-product") String paymentProduct, @Parameter(in = ParameterIn.PATH, description = "Resource identification of the generated payment initiation resource.", required = true, schema = @Schema()) @PathVariable("paymentId") String paymentId, @Parameter(in = ParameterIn.HEADER, description = "ID of the request, unique to the call, as determined by the initiating party.", required = true, schema = @Schema()) @RequestHeader(value = "X-Request-ID", required = true) UUID xRequestID, @Parameter(in = ParameterIn.HEADER, description = "Is contained if and only if the \"Signature\" element is contained in the header of the request.", schema = @Schema()) @RequestHeader(value = "Digest", required = false) String digest, @Parameter(in = ParameterIn.HEADER, description = "A signature of the request by the TPP on application level. This might be mandated by ASPSP. ", schema = @Schema()) @RequestHeader(value = "Signature", required = false) String signature, @Parameter(in = ParameterIn.HEADER, description = "The certificate used for signing the request, in base64 encoding.  Must be contained if a signature is contained. ", schema = @Schema()) @RequestHeader(value = "TPP-Signature-Certificate", required = false) byte[] tpPSignatureCertificate, @Parameter(in = ParameterIn.HEADER, description = "The forwarded IP Address header field consists of the corresponding http request IP Address field between PSU and TPP. ", schema = @Schema()) @RequestHeader(value = "PSU-IP-Address", required = false) String psUIPAddress, @Parameter(in = ParameterIn.HEADER, description = "The forwarded IP Port header field consists of the corresponding HTTP request IP Port field between PSU and TPP, if available. ", schema = @Schema()) @RequestHeader(value = "PSU-IP-Port", required = false) String psUIPPort, @Parameter(in = ParameterIn.HEADER, description = "The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available. ", schema = @Schema()) @RequestHeader(value = "PSU-Accept", required = false) String psUAccept, @Parameter(in = ParameterIn.HEADER, description = "The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available. ", schema = @Schema()) @RequestHeader(value = "PSU-Accept-Charset", required = false) String psUAcceptCharset, @Parameter(in = ParameterIn.HEADER, description = "The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available. ", schema = @Schema()) @RequestHeader(value = "PSU-Accept-Encoding", required = false) String psUAcceptEncoding, @Parameter(in = ParameterIn.HEADER, description = "The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available. ", schema = @Schema()) @RequestHeader(value = "PSU-Accept-Language", required = false) String psUAcceptLanguage, @Parameter(in = ParameterIn.HEADER, description = "The forwarded Agent header field of the HTTP request between PSU and TPP, if available. ", schema = @Schema()) @RequestHeader(value = "PSU-User-Agent", required = false) String psUUserAgent, @Parameter(in = ParameterIn.HEADER, description = "HTTP method used at the PSU ? TPP interface, if available. Valid values are: * GET * POST * PUT * PATCH * DELETE ", schema = @Schema(allowableValues = {"GET", "POST", "PUT", "PATCH", "DELETE"}
    )) @RequestHeader(value = "PSU-Http-Method", required = false) String psUHttpMethod, @Parameter(in = ParameterIn.HEADER, description = "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 needs to be unaltered until removal from device. ", schema = @Schema()) @RequestHeader(value = "PSU-Device-ID", required = false) UUID psUDeviceID, @Parameter(in = ParameterIn.HEADER, description = "The forwarded Geo Location of the corresponding http request between PSU and TPP if available. ", schema = @Schema()) @RequestHeader(value = "PSU-Geo-Location", required = false) String psUGeoLocation) {
        return getPaymentInformation(paymentService, paymentProduct, paymentId, xRequestID, digest, signature, tpPSignatureCertificate, psUIPAddress, psUIPPort, psUAccept, psUAcceptCharset, psUAcceptEncoding, psUAcceptLanguage, psUUserAgent, psUHttpMethod, psUDeviceID, psUGeoLocation);
    }

    // Override this method
    default ResponseEntity<Object> getPaymentInformation(String paymentService, String paymentProduct, String paymentId, UUID xRequestID, 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) {
        if (getObjectMapper().isPresent() && getAcceptHeader().isPresent()) {
        } else {
            log.warn("ObjectMapper or HttpServletRequest not configured in default PaymentInitiationServicePisApi interface so no example is generated");
        }
        return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
    }


    @Operation(summary = "Get payment initiation authorisation sub-resources request", description = "Read a list of all authorisation subresources IDs which have been created.  This function returns an array of hyperlinks to all generated authorisation sub-resources. ", security = {
        @SecurityRequirement(name = "BearerAuthOAuth")}, tags = {"Payment Initiation Service (PIS)", "Common Services"})
    @ApiResponses(value = {
        @ApiResponse(responseCode = "200", description = "OK", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Authorisations.class))),

        @ApiResponse(responseCode = "400", description = "Bad Request", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Error400NGPIS.class))),

        @ApiResponse(responseCode = "401", description = "Unauthorized", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Error401NGPIS.class))),

        @ApiResponse(responseCode = "403", description = "Forbidden", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Error403NGPIS.class))),

        @ApiResponse(responseCode = "404", description = "Not found", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Error404NGPIS.class))),

        @ApiResponse(responseCode = "405", description = "Method Not Allowed", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Error405NGPIS.class))),

        @ApiResponse(responseCode = "406", description = "Not Acceptable"),

        @ApiResponse(responseCode = "408", description = "Request Timeout"),

        @ApiResponse(responseCode = "409", description = "Conflict", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Error409NGPIS.class))),

        @ApiResponse(responseCode = "415", description = "Unsupported Media Type"),

        @ApiResponse(responseCode = "429", description = "Too Many Requests"),

        @ApiResponse(responseCode = "500", description = "Internal Server Error"),

        @ApiResponse(responseCode = "503", description = "Service Unavailable")})
    @RequestMapping(value = "/v1/{payment-service}/{payment-product}/{paymentId}/authorisations",
        produces = {"application/json", "application/problem+json"},
        method = RequestMethod.GET)
    default ResponseEntity<Authorisations> _getPaymentInitiationAuthorisation(@Parameter(in = ParameterIn.PATH, description = "Payment service:  Possible values are: * payments * bulk-payments * periodic-payments ", required = true, schema = @Schema(allowableValues = {"payments", "bulk-payments", "periodic-payments"}
    )) @PathVariable("payment-service") String paymentService, @Parameter(in = ParameterIn.PATH, description = "The addressed payment product endpoint, e.g. for SEPA Credit Transfers (SCT). The ASPSP will publish which of the payment products/endpoints will be supported.  The following payment products are supported:   - sepa-credit-transfers   - instant-sepa-credit-transfers   - target-2-payments   - cross-border-credit-transfers   - pain.001-sepa-credit-transfers   - pain.001-instant-sepa-credit-transfers   - pain.001-target-2-payments   - pain.001-cross-border-credit-transfers  **Remark:** For all SEPA Credit Transfer based endpoints which accept XML encoding,  the XML pain.001 schemes provided by EPC are supported by the ASPSP as a minimum for the body content.  Further XML schemes might be supported by some communities.  **Remark:** For cross-border and TARGET-2 payments only community wide pain.001 schemes do exist.  There are plenty of country specific scheme variants. ", required = true, schema = @Schema(allowableValues = {"sepa-credit-transfers", "instant-sepa-credit-transfers", "target-2-payments", "cross-border-credit-transfers", "pain.001-sepa-credit-transfers", "pain.001-instant-sepa-credit-transfers", "pain.001-target-2-payments", "pain.001-cross-border-credit-transfers"}
    )) @PathVariable("payment-product") String paymentProduct, @Parameter(in = ParameterIn.PATH, description = "Resource identification of the generated payment initiation resource.", required = true, schema = @Schema()) @PathVariable("paymentId") String paymentId, @Parameter(in = ParameterIn.HEADER, description = "ID of the request, unique to the call, as determined by the initiating party.", required = true, schema = @Schema()) @RequestHeader(value = "X-Request-ID", required = true) UUID xRequestID, @Parameter(in = ParameterIn.HEADER, description = "Is contained if and only if the \"Signature\" element is contained in the header of the request.", schema = @Schema()) @RequestHeader(value = "Digest", required = false) String digest, @Parameter(in = ParameterIn.HEADER, description = "A signature of the request by the TPP on application level. This might be mandated by ASPSP. ", schema = @Schema()) @RequestHeader(value = "Signature", required = false) String signature, @Parameter(in = ParameterIn.HEADER, description = "The certificate used for signing the request, in base64 encoding.  Must be contained if a signature is contained. ", schema = @Schema()) @RequestHeader(value = "TPP-Signature-Certificate", required = false) byte[] tpPSignatureCertificate, @Parameter(in = ParameterIn.HEADER, description = "The forwarded IP Address header field consists of the corresponding http request IP Address field between PSU and TPP. ", schema = @Schema()) @RequestHeader(value = "PSU-IP-Address", required = false) String psUIPAddress, @Parameter(in = ParameterIn.HEADER, description = "The forwarded IP Port header field consists of the corresponding HTTP request IP Port field between PSU and TPP, if available. ", schema = @Schema()) @RequestHeader(value = "PSU-IP-Port", required = false) String psUIPPort, @Parameter(in = ParameterIn.HEADER, description = "The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available. ", schema = @Schema()) @RequestHeader(value = "PSU-Accept", required = false) String psUAccept, @Parameter(in = ParameterIn.HEADER, description = "The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available. ", schema = @Schema()) @RequestHeader(value = "PSU-Accept-Charset", required = false) String psUAcceptCharset, @Parameter(in = ParameterIn.HEADER, description = "The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available. ", schema = @Schema()) @RequestHeader(value = "PSU-Accept-Encoding", required = false) String psUAcceptEncoding, @Parameter(in = ParameterIn.HEADER, description = "The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available. ", schema = @Schema()) @RequestHeader(value = "PSU-Accept-Language", required = false) String psUAcceptLanguage, @Parameter(in = ParameterIn.HEADER, description = "The forwarded Agent header field of the HTTP request between PSU and TPP, if available. ", schema = @Schema()) @RequestHeader(value = "PSU-User-Agent", required = false) String psUUserAgent, @Parameter(in = ParameterIn.HEADER, description = "HTTP method used at the PSU ? TPP interface, if available. Valid values are: * GET * POST * PUT * PATCH * DELETE ", schema = @Schema(allowableValues = {"GET", "POST", "PUT", "PATCH", "DELETE"}
    )) @RequestHeader(value = "PSU-Http-Method", required = false) String psUHttpMethod, @Parameter(in = ParameterIn.HEADER, description = "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 needs to be unaltered until removal from device. ", schema = @Schema()) @RequestHeader(value = "PSU-Device-ID", required = false) UUID psUDeviceID, @Parameter(in = ParameterIn.HEADER, description = "The forwarded Geo Location of the corresponding http request between PSU and TPP if available. ", schema = @Schema()) @RequestHeader(value = "PSU-Geo-Location", required = false) String psUGeoLocation) {
        return getPaymentInitiationAuthorisation(paymentService, paymentProduct, paymentId, xRequestID, digest, signature, tpPSignatureCertificate, psUIPAddress, psUIPPort, psUAccept, psUAcceptCharset, psUAcceptEncoding, psUAcceptLanguage, psUUserAgent, psUHttpMethod, psUDeviceID, psUGeoLocation);
    }

    // Override this method
    default ResponseEntity<Authorisations> getPaymentInitiationAuthorisation(String paymentService, String paymentProduct, String paymentId, UUID xRequestID, 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) {
        if (getObjectMapper().isPresent() && getAcceptHeader().isPresent()) {
        } else {
            log.warn("ObjectMapper or HttpServletRequest not configured in default PaymentInitiationServicePisApi interface so no example is generated");
        }
        return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
    }


    @Operation(summary = "Will deliver an array of resource identifications to all generated cancellation authorisation sub-resources", description = "Retrieve a list of all created cancellation authorisation sub-resources. ", security = {
        @SecurityRequirement(name = "BearerAuthOAuth")}, tags = {"Payment Initiation Service (PIS)"})
    @ApiResponses(value = {
        @ApiResponse(responseCode = "200", description = "OK", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Authorisations.class))),

        @ApiResponse(responseCode = "400", description = "Bad Request", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Error400NGPIS.class))),

        @ApiResponse(responseCode = "401", description = "Unauthorized", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Error401NGPIS.class))),

        @ApiResponse(responseCode = "403", description = "Forbidden", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Error403NGPIS.class))),

        @ApiResponse(responseCode = "404", description = "Not found", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Error404NGPIS.class))),

        @ApiResponse(responseCode = "405", description = "Method Not Allowed", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Error405NGPIS.class))),

        @ApiResponse(responseCode = "406", description = "Not Acceptable"),

        @ApiResponse(responseCode = "408", description = "Request Timeout"),

        @ApiResponse(responseCode = "409", description = "Conflict", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Error409NGPIS.class))),

        @ApiResponse(responseCode = "415", description = "Unsupported Media Type"),

        @ApiResponse(responseCode = "429", description = "Too Many Requests"),

        @ApiResponse(responseCode = "500", description = "Internal Server Error"),

        @ApiResponse(responseCode = "503", description = "Service Unavailable")})
    @RequestMapping(value = "/v1/{payment-service}/{payment-product}/{paymentId}/cancellation-authorisations",
        produces = {"application/json", "application/problem+json"},
        method = RequestMethod.GET)
    default ResponseEntity<Authorisations> _getPaymentInitiationCancellationAuthorisationInformation(@Parameter(in = ParameterIn.PATH, description = "Payment service:  Possible values are: * payments * bulk-payments * periodic-payments ", required = true, schema = @Schema(allowableValues = {"payments", "bulk-payments", "periodic-payments"}
    )) @PathVariable("payment-service") String paymentService, @Parameter(in = ParameterIn.PATH, description = "The addressed payment product endpoint, e.g. for SEPA Credit Transfers (SCT). The ASPSP will publish which of the payment products/endpoints will be supported.  The following payment products are supported:   - sepa-credit-transfers   - instant-sepa-credit-transfers   - target-2-payments   - cross-border-credit-transfers   - pain.001-sepa-credit-transfers   - pain.001-instant-sepa-credit-transfers   - pain.001-target-2-payments   - pain.001-cross-border-credit-transfers  **Remark:** For all SEPA Credit Transfer based endpoints which accept XML encoding,  the XML pain.001 schemes provided by EPC are supported by the ASPSP as a minimum for the body content.  Further XML schemes might be supported by some communities.  **Remark:** For cross-border and TARGET-2 payments only community wide pain.001 schemes do exist.  There are plenty of country specific scheme variants. ", required = true, schema = @Schema(allowableValues = {"sepa-credit-transfers", "instant-sepa-credit-transfers", "target-2-payments", "cross-border-credit-transfers", "pain.001-sepa-credit-transfers", "pain.001-instant-sepa-credit-transfers", "pain.001-target-2-payments", "pain.001-cross-border-credit-transfers"}
    )) @PathVariable("payment-product") String paymentProduct, @Parameter(in = ParameterIn.PATH, description = "Resource identification of the generated payment initiation resource.", required = true, schema = @Schema()) @PathVariable("paymentId") String paymentId, @Parameter(in = ParameterIn.HEADER, description = "ID of the request, unique to the call, as determined by the initiating party.", required = true, schema = @Schema()) @RequestHeader(value = "X-Request-ID", required = true) UUID xRequestID, @Parameter(in = ParameterIn.HEADER, description = "Is contained if and only if the \"Signature\" element is contained in the header of the request.", schema = @Schema()) @RequestHeader(value = "Digest", required = false) String digest, @Parameter(in = ParameterIn.HEADER, description = "A signature of the request by the TPP on application level. This might be mandated by ASPSP. ", schema = @Schema()) @RequestHeader(value = "Signature", required = false) String signature, @Parameter(in = ParameterIn.HEADER, description = "The certificate used for signing the request, in base64 encoding.  Must be contained if a signature is contained. ", schema = @Schema()) @RequestHeader(value = "TPP-Signature-Certificate", required = false) byte[] tpPSignatureCertificate, @Parameter(in = ParameterIn.HEADER, description = "The forwarded IP Address header field consists of the corresponding http request IP Address field between PSU and TPP. ", schema = @Schema()) @RequestHeader(value = "PSU-IP-Address", required = false) String psUIPAddress, @Parameter(in = ParameterIn.HEADER, description = "The forwarded IP Port header field consists of the corresponding HTTP request IP Port field between PSU and TPP, if available. ", schema = @Schema()) @RequestHeader(value = "PSU-IP-Port", required = false) String psUIPPort, @Parameter(in = ParameterIn.HEADER, description = "The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available. ", schema = @Schema()) @RequestHeader(value = "PSU-Accept", required = false) String psUAccept, @Parameter(in = ParameterIn.HEADER, description = "The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available. ", schema = @Schema()) @RequestHeader(value = "PSU-Accept-Charset", required = false) String psUAcceptCharset, @Parameter(in = ParameterIn.HEADER, description = "The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available. ", schema = @Schema()) @RequestHeader(value = "PSU-Accept-Encoding", required = false) String psUAcceptEncoding, @Parameter(in = ParameterIn.HEADER, description = "The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available. ", schema = @Schema()) @RequestHeader(value = "PSU-Accept-Language", required = false) String psUAcceptLanguage, @Parameter(in = ParameterIn.HEADER, description = "The forwarded Agent header field of the HTTP request between PSU and TPP, if available. ", schema = @Schema()) @RequestHeader(value = "PSU-User-Agent", required = false) String psUUserAgent, @Parameter(in = ParameterIn.HEADER, description = "HTTP method used at the PSU ? TPP interface, if available. Valid values are: * GET * POST * PUT * PATCH * DELETE ", schema = @Schema(allowableValues = {"GET", "POST", "PUT", "PATCH", "DELETE"}
    )) @RequestHeader(value = "PSU-Http-Method", required = false) String psUHttpMethod, @Parameter(in = ParameterIn.HEADER, description = "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 needs to be unaltered until removal from device. ", schema = @Schema()) @RequestHeader(value = "PSU-Device-ID", required = false) UUID psUDeviceID, @Parameter(in = ParameterIn.HEADER, description = "The forwarded Geo Location of the corresponding http request between PSU and TPP if available. ", schema = @Schema()) @RequestHeader(value = "PSU-Geo-Location", required = false) String psUGeoLocation) {
        return getPaymentInitiationCancellationAuthorisationInformation(paymentService, paymentProduct, paymentId, xRequestID, digest, signature, tpPSignatureCertificate, psUIPAddress, psUIPPort, psUAccept, psUAcceptCharset, psUAcceptEncoding, psUAcceptLanguage, psUUserAgent, psUHttpMethod, psUDeviceID, psUGeoLocation);
    }

    // Override this method
    default ResponseEntity<Authorisations> getPaymentInitiationCancellationAuthorisationInformation(String paymentService, String paymentProduct, String paymentId, UUID xRequestID, 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) {
        if (getObjectMapper().isPresent() && getAcceptHeader().isPresent()) {
        } else {
            log.warn("ObjectMapper or HttpServletRequest not configured in default PaymentInitiationServicePisApi interface so no example is generated");
        }
        return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
    }


    @Operation(summary = "Read the SCA status of the payment authorisation", description = "This method returns the SCA status of a payment initiation's authorisation sub-resource. ", security = {
        @SecurityRequirement(name = "BearerAuthOAuth")}, tags = {"Payment Initiation Service (PIS)", "Common Services"})
    @ApiResponses(value = {
        @ApiResponse(responseCode = "200", description = "OK", content = @Content(mediaType = "application/json", schema = @Schema(implementation = ScaStatusResponse.class))),

        @ApiResponse(responseCode = "400", description = "Bad Request", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Error400NGPIS.class))),

        @ApiResponse(responseCode = "401", description = "Unauthorized", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Error401NGPIS.class))),

        @ApiResponse(responseCode = "403", description = "Forbidden", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Error403NGPIS.class))),

        @ApiResponse(responseCode = "404", description = "Not found", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Error404NGPIS.class))),

        @ApiResponse(responseCode = "405", description = "Method Not Allowed", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Error405NGPIS.class))),

        @ApiResponse(responseCode = "406", description = "Not Acceptable"),

        @ApiResponse(responseCode = "408", description = "Request Timeout"),

        @ApiResponse(responseCode = "409", description = "Conflict", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Error409NGPIS.class))),

        @ApiResponse(responseCode = "415", description = "Unsupported Media Type"),

        @ApiResponse(responseCode = "429", description = "Too Many Requests"),

        @ApiResponse(responseCode = "500", description = "Internal Server Error"),

        @ApiResponse(responseCode = "503", description = "Service Unavailable")})
    @RequestMapping(value = "/v1/{payment-service}/{payment-product}/{paymentId}/authorisations/{authorisationId}",
        produces = {"application/json", "application/problem+json"},
        method = RequestMethod.GET)
    default ResponseEntity<ScaStatusResponse> _getPaymentInitiationScaStatus(@Parameter(in = ParameterIn.PATH, description = "Payment service:  Possible values are: * payments * bulk-payments * periodic-payments ", required = true, schema = @Schema(allowableValues = {"payments", "bulk-payments", "periodic-payments"}
    )) @PathVariable("payment-service") String paymentService, @Parameter(in = ParameterIn.PATH, description = "The addressed payment product endpoint, e.g. for SEPA Credit Transfers (SCT). The ASPSP will publish which of the payment products/endpoints will be supported.  The following payment products are supported:   - sepa-credit-transfers   - instant-sepa-credit-transfers   - target-2-payments   - cross-border-credit-transfers   - pain.001-sepa-credit-transfers   - pain.001-instant-sepa-credit-transfers   - pain.001-target-2-payments   - pain.001-cross-border-credit-transfers  **Remark:** For all SEPA Credit Transfer based endpoints which accept XML encoding,  the XML pain.001 schemes provided by EPC are supported by the ASPSP as a minimum for the body content.  Further XML schemes might be supported by some communities.  **Remark:** For cross-border and TARGET-2 payments only community wide pain.001 schemes do exist.  There are plenty of country specific scheme variants. ", required = true, schema = @Schema(allowableValues = {"sepa-credit-transfers", "instant-sepa-credit-transfers", "target-2-payments", "cross-border-credit-transfers", "pain.001-sepa-credit-transfers", "pain.001-instant-sepa-credit-transfers", "pain.001-target-2-payments", "pain.001-cross-border-credit-transfers"}
    )) @PathVariable("payment-product") String paymentProduct, @Parameter(in = ParameterIn.PATH, description = "Resource identification of the generated payment initiation resource.", required = true, schema = @Schema()) @PathVariable("paymentId") String paymentId, @Parameter(in = ParameterIn.PATH, description = "Resource identification of the related SCA.", required = true, schema = @Schema()) @PathVariable("authorisationId") String authorisationId, @Parameter(in = ParameterIn.HEADER, description = "ID of the request, unique to the call, as determined by the initiating party.", required = true, schema = @Schema()) @RequestHeader(value = "X-Request-ID", required = true) UUID xRequestID, @Parameter(in = ParameterIn.HEADER, description = "Is contained if and only if the \"Signature\" element is contained in the header of the request.", schema = @Schema()) @RequestHeader(value = "Digest", required = false) String digest, @Parameter(in = ParameterIn.HEADER, description = "A signature of the request by the TPP on application level. This might be mandated by ASPSP. ", schema = @Schema()) @RequestHeader(value = "Signature", required = false) String signature, @Parameter(in = ParameterIn.HEADER, description = "The certificate used for signing the request, in base64 encoding.  Must be contained if a signature is contained. ", schema = @Schema()) @RequestHeader(value = "TPP-Signature-Certificate", required = false) byte[] tpPSignatureCertificate, @Parameter(in = ParameterIn.HEADER, description = "The forwarded IP Address header field consists of the corresponding http request IP Address field between PSU and TPP. ", schema = @Schema()) @RequestHeader(value = "PSU-IP-Address", required = false) String psUIPAddress, @Parameter(in = ParameterIn.HEADER, description = "The forwarded IP Port header field consists of the corresponding HTTP request IP Port field between PSU and TPP, if available. ", schema = @Schema()) @RequestHeader(value = "PSU-IP-Port", required = false) String psUIPPort, @Parameter(in = ParameterIn.HEADER, description = "The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available. ", schema = @Schema()) @RequestHeader(value = "PSU-Accept", required = false) String psUAccept, @Parameter(in = ParameterIn.HEADER, description = "The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available. ", schema = @Schema()) @RequestHeader(value = "PSU-Accept-Charset", required = false) String psUAcceptCharset, @Parameter(in = ParameterIn.HEADER, description = "The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available. ", schema = @Schema()) @RequestHeader(value = "PSU-Accept-Encoding", required = false) String psUAcceptEncoding, @Parameter(in = ParameterIn.HEADER, description = "The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available. ", schema = @Schema()) @RequestHeader(value = "PSU-Accept-Language", required = false) String psUAcceptLanguage, @Parameter(in = ParameterIn.HEADER, description = "The forwarded Agent header field of the HTTP request between PSU and TPP, if available. ", schema = @Schema()) @RequestHeader(value = "PSU-User-Agent", required = false) String psUUserAgent, @Parameter(in = ParameterIn.HEADER, description = "HTTP method used at the PSU ? TPP interface, if available. Valid values are: * GET * POST * PUT * PATCH * DELETE ", schema = @Schema(allowableValues = {"GET", "POST", "PUT", "PATCH", "DELETE"}
    )) @RequestHeader(value = "PSU-Http-Method", required = false) String psUHttpMethod, @Parameter(in = ParameterIn.HEADER, description = "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 needs to be unaltered until removal from device. ", schema = @Schema()) @RequestHeader(value = "PSU-Device-ID", required = false) UUID psUDeviceID, @Parameter(in = ParameterIn.HEADER, description = "The forwarded Geo Location of the corresponding http request between PSU and TPP if available. ", schema = @Schema()) @RequestHeader(value = "PSU-Geo-Location", required = false) String psUGeoLocation) {
        return getPaymentInitiationScaStatus(paymentService, paymentProduct, paymentId, authorisationId, xRequestID, digest, signature, tpPSignatureCertificate, psUIPAddress, psUIPPort, psUAccept, psUAcceptCharset, psUAcceptEncoding, psUAcceptLanguage, psUUserAgent, psUHttpMethod, psUDeviceID, psUGeoLocation);
    }

    // Override this method
    default ResponseEntity<ScaStatusResponse> getPaymentInitiationScaStatus(String paymentService, String paymentProduct, String paymentId, String authorisationId, UUID xRequestID, 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) {
        if (getObjectMapper().isPresent() && getAcceptHeader().isPresent()) {
        } else {
            log.warn("ObjectMapper or HttpServletRequest not configured in default PaymentInitiationServicePisApi interface so no example is generated");
        }
        return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
    }


    @Operation(summary = "Payment initiation status request", description = "Check the transaction status of a payment initiation.", security = {
        @SecurityRequirement(name = "BearerAuthOAuth")}, tags = {"Payment Initiation Service (PIS)"})
    @ApiResponses(value = {
        @ApiResponse(responseCode = "200", description = "OK", content = @Content(mediaType = "application/json", schema = @Schema(implementation = PaymentInitiationStatusResponse200Json.class))),

        @ApiResponse(responseCode = "400", description = "Bad Request", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Error400NGPIS.class))),

        @ApiResponse(responseCode = "401", description = "Unauthorized", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Error401NGPIS.class))),

        @ApiResponse(responseCode = "403", description = "Forbidden", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Error403NGPIS.class))),

        @ApiResponse(responseCode = "404", description = "Not found", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Error404NGPIS.class))),

        @ApiResponse(responseCode = "405", description = "Method Not Allowed", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Error405NGPIS.class))),

        @ApiResponse(responseCode = "406", description = "Not Acceptable"),

        @ApiResponse(responseCode = "408", description = "Request Timeout"),

        @ApiResponse(responseCode = "409", description = "Conflict", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Error409NGPIS.class))),

        @ApiResponse(responseCode = "415", description = "Unsupported Media Type"),

        @ApiResponse(responseCode = "429", description = "Too Many Requests"),

        @ApiResponse(responseCode = "500", description = "Internal Server Error"),

        @ApiResponse(responseCode = "503", description = "Service Unavailable")})
    @RequestMapping(value = "/v1/{payment-service}/{payment-product}/{paymentId}/status",
        produces = {"application/json", "application/xml", "application/problem+json"},
        method = RequestMethod.GET)
    default ResponseEntity<PaymentInitiationStatusResponse200Json> _getPaymentInitiationStatus(@Parameter(in = ParameterIn.PATH, description = "Payment service:  Possible values are: * payments * bulk-payments * periodic-payments ", required = true, schema = @Schema(allowableValues = {"payments", "bulk-payments", "periodic-payments"}
    )) @PathVariable("payment-service") String paymentService, @Parameter(in = ParameterIn.PATH, description = "The addressed payment product endpoint, e.g. for SEPA Credit Transfers (SCT). The ASPSP will publish which of the payment products/endpoints will be supported.  The following payment products are supported:   - sepa-credit-transfers   - instant-sepa-credit-transfers   - target-2-payments   - cross-border-credit-transfers   - pain.001-sepa-credit-transfers   - pain.001-instant-sepa-credit-transfers   - pain.001-target-2-payments   - pain.001-cross-border-credit-transfers  **Remark:** For all SEPA Credit Transfer based endpoints which accept XML encoding,  the XML pain.001 schemes provided by EPC are supported by the ASPSP as a minimum for the body content.  Further XML schemes might be supported by some communities.  **Remark:** For cross-border and TARGET-2 payments only community wide pain.001 schemes do exist.  There are plenty of country specific scheme variants. ", required = true, schema = @Schema(allowableValues = {"sepa-credit-transfers", "instant-sepa-credit-transfers", "target-2-payments", "cross-border-credit-transfers", "pain.001-sepa-credit-transfers", "pain.001-instant-sepa-credit-transfers", "pain.001-target-2-payments", "pain.001-cross-border-credit-transfers"}
    )) @PathVariable("payment-product") String paymentProduct, @Parameter(in = ParameterIn.PATH, description = "Resource identification of the generated payment initiation resource.", required = true, schema = @Schema()) @PathVariable("paymentId") String paymentId, @Parameter(in = ParameterIn.HEADER, description = "ID of the request, unique to the call, as determined by the initiating party.", required = true, schema = @Schema()) @RequestHeader(value = "X-Request-ID", required = true) UUID xRequestID, @Parameter(in = ParameterIn.HEADER, description = "Is contained if and only if the \"Signature\" element is contained in the header of the request.", schema = @Schema()) @RequestHeader(value = "Digest", required = false) String digest, @Parameter(in = ParameterIn.HEADER, description = "A signature of the request by the TPP on application level. This might be mandated by ASPSP. ", schema = @Schema()) @RequestHeader(value = "Signature", required = false) String signature, @Parameter(in = ParameterIn.HEADER, description = "The certificate used for signing the request, in base64 encoding.  Must be contained if a signature is contained. ", schema = @Schema()) @RequestHeader(value = "TPP-Signature-Certificate", required = false) byte[] tpPSignatureCertificate, @Parameter(in = ParameterIn.HEADER, description = "The forwarded IP Address header field consists of the corresponding http request IP Address field between PSU and TPP. ", schema = @Schema()) @RequestHeader(value = "PSU-IP-Address", required = false) String psUIPAddress, @Parameter(in = ParameterIn.HEADER, description = "The forwarded IP Port header field consists of the corresponding HTTP request IP Port field between PSU and TPP, if available. ", schema = @Schema()) @RequestHeader(value = "PSU-IP-Port", required = false) String psUIPPort, @Parameter(in = ParameterIn.HEADER, description = "The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available. ", schema = @Schema()) @RequestHeader(value = "PSU-Accept", required = false) String psUAccept, @Parameter(in = ParameterIn.HEADER, description = "The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available. ", schema = @Schema()) @RequestHeader(value = "PSU-Accept-Charset", required = false) String psUAcceptCharset, @Parameter(in = ParameterIn.HEADER, description = "The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available. ", schema = @Schema()) @RequestHeader(value = "PSU-Accept-Encoding", required = false) String psUAcceptEncoding, @Parameter(in = ParameterIn.HEADER, description = "The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available. ", schema = @Schema()) @RequestHeader(value = "PSU-Accept-Language", required = false) String psUAcceptLanguage, @Parameter(in = ParameterIn.HEADER, description = "The forwarded Agent header field of the HTTP request between PSU and TPP, if available. ", schema = @Schema()) @RequestHeader(value = "PSU-User-Agent", required = false) String psUUserAgent, @Parameter(in = ParameterIn.HEADER, description = "HTTP method used at the PSU ? TPP interface, if available. Valid values are: * GET * POST * PUT * PATCH * DELETE ", schema = @Schema(allowableValues = {"GET", "POST", "PUT", "PATCH", "DELETE"}
    )) @RequestHeader(value = "PSU-Http-Method", required = false) String psUHttpMethod, @Parameter(in = ParameterIn.HEADER, description = "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 needs to be unaltered until removal from device. ", schema = @Schema()) @RequestHeader(value = "PSU-Device-ID", required = false) UUID psUDeviceID, @Parameter(in = ParameterIn.HEADER, description = "The forwarded Geo Location of the corresponding http request between PSU and TPP if available. ", schema = @Schema()) @RequestHeader(value = "PSU-Geo-Location", required = false) String psUGeoLocation) {
        return getPaymentInitiationStatus(paymentService, paymentProduct, paymentId, xRequestID, digest, signature, tpPSignatureCertificate, psUIPAddress, psUIPPort, psUAccept, psUAcceptCharset, psUAcceptEncoding, psUAcceptLanguage, psUUserAgent, psUHttpMethod, psUDeviceID, psUGeoLocation);
    }

    // Override this method
    default ResponseEntity<PaymentInitiationStatusResponse200Json> getPaymentInitiationStatus(String paymentService, String paymentProduct, String paymentId, UUID xRequestID, 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) {
        if (getObjectMapper().isPresent() && getAcceptHeader().isPresent()) {
        } else {
            log.warn("ObjectMapper or HttpServletRequest not configured in default PaymentInitiationServicePisApi interface so no example is generated");
        }
        return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
    }

    @Operation(summary = "Payment initiation request", description = "This method is used to initiate a payment at the ASPSP.  ## Variants of payment initiation requests  This method to initiate a payment initiation at the ASPSP can be sent with either a JSON body or an pain.001 body depending on the payment product in the path.  There are the following **payment products**:    - Payment products with payment information in *JSON* format:     - ***sepa-credit-transfers***     - ***instant-sepa-credit-transfers***     - ***target-2-payments***     - ***cross-border-credit-transfers***   - Payment products with payment information in *pain.001* XML format:     - ***pain.001-sepa-credit-transfers***     - ***pain.001-instant-sepa-credit-transfers***     - ***pain.001-target-2-payments***     - ***pain.001-cross-border-credit-transfers***  Furthermore the request body depends on the **payment-service**:   * ***payments***: A single payment initiation request.   * ***bulk-payments***: A collection of several payment initiation requests.        In case of a *pain.001* message there are more than one payments contained in the *pain.001 message.          In case of a *JSON* there are several JSON payment blocks contained in a joining list.   * ***periodic-payments***:      Create a standing order initiation resource for recurrent i.e. periodic payments addressable under {paymentId}       with all data relevant for the corresponding payment product and the execution of the standing order contained in a JSON body.   This is the first step in the API to initiate the related recurring/periodic payment.    ## Single and multilevel SCA Processes  The payment initiation requests are independent from the need of one or multilevel  SCA processing, i.e. independent from the number of authorisations needed for the execution of payments.   But the response messages are specific to either one SCA processing or multilevel SCA processing.   For payment initiation with multilevel SCA, this specification requires an explicit start of the authorisation,  i.e. links directly associated with SCA processing like 'scaRedirect' or 'scaOAuth' cannot be contained in the  response message of a Payment Initiation Request for a payment, where multiple authorisations are needed.  Also if any data is needed for the next action, like selecting an SCA method is not supported in the response,  since all starts of the multiple authorisations are fully equal.  In these cases, first an authorisation sub-resource has to be generated following the 'startAuthorisation' link. ", security = {
        @SecurityRequirement(name = "BearerAuthOAuth")}, tags = {"Payment Initiation Service (PIS)"})
    @ApiResponses(value = {
        @ApiResponse(responseCode = "201", description = "CREATED", content = @Content(mediaType = "application/json", schema = @Schema(implementation = PaymentInitiationRequestResponse201.class))),

        @ApiResponse(responseCode = "400", description = "Bad Request", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Error400NGPIS.class))),

        @ApiResponse(responseCode = "401", description = "Unauthorized", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Error401NGPIS.class))),

        @ApiResponse(responseCode = "403", description = "Forbidden", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Error403NGPIS.class))),

        @ApiResponse(responseCode = "404", description = "Not found", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Error404NGPIS.class))),

        @ApiResponse(responseCode = "405", description = "Method Not Allowed", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Error405NGPIS.class))),

        @ApiResponse(responseCode = "406", description = "Not Acceptable"),

        @ApiResponse(responseCode = "408", description = "Request Timeout"),

        @ApiResponse(responseCode = "409", description = "Conflict", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Error409NGPIS.class))),

        @ApiResponse(responseCode = "415", description = "Unsupported Media Type"),

        @ApiResponse(responseCode = "429", description = "Too Many Requests"),

        @ApiResponse(responseCode = "500", description = "Internal Server Error"),

        @ApiResponse(responseCode = "503", description = "Service Unavailable")})
    @RequestMapping(value = "/v1/{payment-service}/{payment-product}",
        produces = {"application/json", "application/problem+json"},
        consumes = {"application/json"},
        method = RequestMethod.POST)
    default ResponseEntity<PaymentInitiationRequestResponse201> _initiatePayment(@Parameter(in = ParameterIn.HEADER, description = "ID of the request, unique to the call, as determined by the initiating party.", required = true, schema = @Schema()) @RequestHeader(value = "X-Request-ID", required = true) UUID xRequestID, @Parameter(in = ParameterIn.HEADER, description = "The forwarded IP Address header field consists of the corresponding http request IP Address field between PSU and TPP. If not available, the TPP shall use the IP Address used by the TPP when submitting this request. ", required = true, schema = @Schema()) @RequestHeader(value = "PSU-IP-Address", required = true) String psUIPAddress, @Parameter(in = ParameterIn.PATH, description = "Payment service:  Possible values are: * payments * bulk-payments * periodic-payments ", required = true, schema = @Schema(allowableValues = {"payments", "bulk-payments", "periodic-payments"}
    )) @PathVariable("payment-service") String paymentService, @Parameter(in = ParameterIn.PATH, description = "The addressed payment product endpoint, e.g. for SEPA Credit Transfers (SCT). The ASPSP will publish which of the payment products/endpoints will be supported.  The following payment products are supported:   - sepa-credit-transfers   - instant-sepa-credit-transfers   - target-2-payments   - cross-border-credit-transfers   - pain.001-sepa-credit-transfers   - pain.001-instant-sepa-credit-transfers   - pain.001-target-2-payments   - pain.001-cross-border-credit-transfers  **Remark:** For all SEPA Credit Transfer based endpoints which accept XML encoding,  the XML pain.001 schemes provided by EPC are supported by the ASPSP as a minimum for the body content.  Further XML schemes might be supported by some communities.  **Remark:** For cross-border and TARGET-2 payments only community wide pain.001 schemes do exist.  There are plenty of country specific scheme variants. ", required = true, schema = @Schema(allowableValues = {"sepa-credit-transfers", "instant-sepa-credit-transfers", "target-2-payments", "cross-border-credit-transfers", "pain.001-sepa-credit-transfers", "pain.001-instant-sepa-credit-transfers", "pain.001-target-2-payments", "pain.001-cross-border-credit-transfers"}
    )) @PathVariable("payment-product") String paymentProduct, @Parameter(in = ParameterIn.DEFAULT, description = "JSON request body for a payment inition request message.  There are the following payment-products supported:   * \"sepa-credit-transfers\" with JSON-Body   * \"instant-sepa-credit-transfers\" with JSON-Body   * \"target-2-payments\" with JSON-Body   * \"cross-border-credit-transfers\" with JSON-Body   * \"pain.001-sepa-credit-transfers\" with XML pain.001.001.03 body for SCT scheme   * \"pain.001-instant-sepa-credit-transfers\" with XML pain.001.001.03 body for SCT INST scheme   * \"pain.001-target-2-payments\" with pain.001 body.      Only country specific schemes are currently available   * \"pain.001-cross-border-credit-transfers\" with pain.001 body.      Only country specific schemes are currently available    There are the following payment-services supported:   * \"payments\"   * \"periodic-payments\"   * \"bulk-payments\"  All optional, conditional and predefined but not yet used fields are defined. ", required = true, schema = @Schema()) @Valid @RequestBody Object body, @Parameter(in = ParameterIn.HEADER, description = "Is contained if and only if the \"Signature\" element is contained in the header of the request.", schema = @Schema()) @RequestHeader(value = "Digest", required = false) String digest, @Parameter(in = ParameterIn.HEADER, description = "A signature of the request by the TPP on application level. This might be mandated by ASPSP. ", schema = @Schema()) @RequestHeader(value = "Signature", required = false) String signature, @Parameter(in = ParameterIn.HEADER, description = "The certificate used for signing the request, in base64 encoding.  Must be contained if a signature is contained. ", schema = @Schema()) @RequestHeader(value = "TPP-Signature-Certificate", required = false) byte[] tpPSignatureCertificate, @Parameter(in = ParameterIn.HEADER, description = "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. ", schema = @Schema()) @RequestHeader(value = "PSU-ID", required = false) String PSU_ID, @Parameter(in = ParameterIn.HEADER, description = "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. ", schema = @Schema()) @RequestHeader(value = "PSU-ID-Type", required = false) String psUIDType, @Parameter(in = ParameterIn.HEADER, description = "Might be mandated in the ASPSP's documentation. Only used in a corporate context. ", schema = @Schema()) @RequestHeader(value = "PSU-Corporate-ID", required = false) String psUCorporateID, @Parameter(in = ParameterIn.HEADER, description = "Might be mandated in the ASPSP's documentation. Only used in a corporate context. ", schema = @Schema()) @RequestHeader(value = "PSU-Corporate-ID-Type", required = false) String psUCorporateIDType, @Parameter(in = ParameterIn.HEADER, description = "This data element may be contained, if the payment initiation transaction is part of a session, i.e. combined AIS/PIS service. This then contains the consentId of the related AIS consent, which was performed prior to this payment initiation. ", schema = @Schema()) @RequestHeader(value = "Consent-ID", required = false) String consentID, @Parameter(in = ParameterIn.HEADER, description = "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 parameter TPP-Decoupled-Preferred and 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. ", schema = @Schema()) @RequestHeader(value = "TPP-Redirect-Preferred", required = false) Boolean tpPRedirectPreferred, @Parameter(in = ParameterIn.HEADER, description = "If it equals \"true\", the TPP prefers a decoupled SCA approach.  If it equals \"false\", the TPP prefers not to use the decoupled approach for SCA. The ASPSP will then choose between the embedded or the redirect 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 parameter TPP-Redirect-Preferred and the SCA method chosen by the TPP/PSU.  The parameter might be ignored by the ASPSP. If both parameters TPP-Redirect-Preferred and TPP-Decoupled-Preferred are present and true, the request is still not rejected, but it is up to the ASPSP, which approach will actually be used.  **Remark for Future:**  TPP-Redirect-Preferred and TPP-Decoupled-Preferred will be revised in future versions, maybe merged. Currently kept separate for downward compatibility. ", schema = @Schema()) @RequestHeader(value = "TPP-Decoupled-Preferred", required = false) Boolean tpPDecoupledPreferred, @Parameter(in = ParameterIn.HEADER, description = "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. ", schema = @Schema()) @RequestHeader(value = "TPP-Redirect-URI", required = false) String tpPRedirectURI, @Parameter(in = ParameterIn.HEADER, description = "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. ", schema = @Schema()) @RequestHeader(value = "TPP-Nok-Redirect-URI", required = false) String tpPNokRedirectURI, @Parameter(in = ParameterIn.HEADER, description = "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. ", schema = @Schema()) @RequestHeader(value = "TPP-Explicit-Authorisation-Preferred", required = false) Boolean tpPExplicitAuthorisationPreferred, @Parameter(in = ParameterIn.HEADER, description = "If it equals \"true\" then the TPP prefers a rejection of the payment initiation in case the ASPSP is  providing an integrated confirmation of funds request an the result of this is that not sufficient  funds are available.  If it equals \"false\" then the TPP prefers that the ASPSP is dealing with the payment initiation like  in the ASPSPs online channel, potentially waiting for a certain time period for funds to arrive to initiate the payment.  This parameter might be ignored by the ASPSP. ", schema = @Schema()) @RequestHeader(value = "TPP-Rejection-NoFunds-Preferred", required = false) Boolean tpPRejectionNoFundsPreferred, @Parameter(in = ParameterIn.HEADER, description = "This header might be used by TPPs to inform the ASPSP about the brand used by the TPP towards the PSU.  This information is meant for logging entries to enhance communication between ASPSP and PSU or ASPSP and TPP.  This header might be ignored by the ASPSP. ", schema = @Schema()) @RequestHeader(value = "TPP-Brand-Logging-Information", required = false) String tpPBrandLoggingInformation, @Parameter(in = ParameterIn.HEADER, description = "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. ", schema = @Schema()) @RequestHeader(value = "TPP-Notification-URI", required = false) String tpPNotificationURI, @Parameter(in = ParameterIn.HEADER, description = "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. ", schema = @Schema()) @RequestHeader(value = "TPP-Notification-Content-Preferred", required = false) String tpPNotificationContentPreferred, @Parameter(in = ParameterIn.HEADER, description = "The forwarded IP Port header field consists of the corresponding HTTP request IP Port field between PSU and TPP, if available. ", schema = @Schema()) @RequestHeader(value = "PSU-IP-Port", required = false) String psUIPPort, @Parameter(in = ParameterIn.HEADER, description = "The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available. ", schema = @Schema()) @RequestHeader(value = "PSU-Accept", required = false) String psUAccept, @Parameter(in = ParameterIn.HEADER, description = "The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available. ", schema = @Schema()) @RequestHeader(value = "PSU-Accept-Charset", required = false) String psUAcceptCharset, @Parameter(in = ParameterIn.HEADER, description = "The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available. ", schema = @Schema()) @RequestHeader(value = "PSU-Accept-Encoding", required = false) String psUAcceptEncoding, @Parameter(in = ParameterIn.HEADER, description = "The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available. ", schema = @Schema()) @RequestHeader(value = "PSU-Accept-Language", required = false) String psUAcceptLanguage, @Parameter(in = ParameterIn.HEADER, description = "The forwarded Agent header field of the HTTP request between PSU and TPP, if available. ", schema = @Schema()) @RequestHeader(value = "PSU-User-Agent", required = false) String psUUserAgent, @Parameter(in = ParameterIn.HEADER, description = "HTTP method used at the PSU ? TPP interface, if available. Valid values are: * GET * POST * PUT * PATCH * DELETE ", schema = @Schema(allowableValues = {"GET", "POST", "PUT", "PATCH", "DELETE"}
    )) @RequestHeader(value = "PSU-Http-Method", required = false) String psUHttpMethod, @Parameter(in = ParameterIn.HEADER, description = "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 needs to be unaltered until removal from device. ", schema = @Schema()) @RequestHeader(value = "PSU-Device-ID", required = false) UUID psUDeviceID, @Parameter(in = ParameterIn.HEADER, description = "The forwarded Geo Location of the corresponding http request between PSU and TPP if available. ", schema = @Schema()) @RequestHeader(value = "PSU-Geo-Location", required = false) String psUGeoLocation) {
        return initiatePayment(body, xRequestID, psUIPAddress, paymentService, paymentProduct, digest, signature, tpPSignatureCertificate, PSU_ID, psUIDType, psUCorporateID, psUCorporateIDType, consentID, tpPRedirectPreferred, tpPDecoupledPreferred, tpPRedirectURI, tpPNokRedirectURI, tpPExplicitAuthorisationPreferred, tpPRejectionNoFundsPreferred, tpPBrandLoggingInformation, tpPNotificationURI, tpPNotificationContentPreferred, psUIPPort, psUAccept, psUAcceptCharset, psUAcceptEncoding, psUAcceptLanguage, psUUserAgent, psUHttpMethod, psUDeviceID, psUGeoLocation);
    }

    // Override this method
    default ResponseEntity<PaymentInitiationRequestResponse201> initiatePayment(Object body, UUID xRequestID, String psUIPAddress, String paymentService, String paymentProduct, String digest, String signature, byte[] tpPSignatureCertificate, String PSU_ID, String psUIDType, String psUCorporateID, String psUCorporateIDType, String consentID, Boolean tpPRedirectPreferred, Boolean tpPDecoupledPreferred, String tpPRedirectURI, String tpPNokRedirectURI, Boolean tpPExplicitAuthorisationPreferred, Boolean tpPRejectionNoFundsPreferred, String tpPBrandLoggingInformation, String tpPNotificationURI, String tpPNotificationContentPreferred, String psUIPPort, String psUAccept, String psUAcceptCharset, String psUAcceptEncoding, String psUAcceptLanguage, String psUUserAgent, String psUHttpMethod, UUID psUDeviceID, String psUGeoLocation) {
        if (getObjectMapper().isPresent() && getAcceptHeader().isPresent()) {
        } else {
            log.warn("ObjectMapper or HttpServletRequest not configured in default PaymentInitiationServicePisApi interface so no example is generated");
        }
        return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
    }


    @Operation(summary = "Payment initiation request", description = "This method is used to initiate a payment at the ASPSP.  ## Variants of payment initiation requests  This method to initiate a payment initiation at the ASPSP can be sent with either a JSON body or an pain.001 body depending on the payment product in the path.  There are the following **payment products**:    - Payment products with payment information in *JSON* format:     - ***sepa-credit-transfers***     - ***instant-sepa-credit-transfers***     - ***target-2-payments***     - ***cross-border-credit-transfers***   - Payment products with payment information in *pain.001* XML format:     - ***pain.001-sepa-credit-transfers***     - ***pain.001-instant-sepa-credit-transfers***     - ***pain.001-target-2-payments***     - ***pain.001-cross-border-credit-transfers***  Furthermore the request body depends on the **payment-service**:   * ***payments***: A single payment initiation request.   * ***bulk-payments***: A collection of several payment initiation requests.        In case of a *pain.001* message there are more than one payments contained in the *pain.001 message.          In case of a *JSON* there are several JSON payment blocks contained in a joining list.   * ***periodic-payments***:      Create a standing order initiation resource for recurrent i.e. periodic payments addressable under {paymentId}       with all data relevant for the corresponding payment product and the execution of the standing order contained in a JSON body.   This is the first step in the API to initiate the related recurring/periodic payment.    ## Single and multilevel SCA Processes  The payment initiation requests are independent from the need of one or multilevel  SCA processing, i.e. independent from the number of authorisations needed for the execution of payments.   But the response messages are specific to either one SCA processing or multilevel SCA processing.   For payment initiation with multilevel SCA, this specification requires an explicit start of the authorisation,  i.e. links directly associated with SCA processing like 'scaRedirect' or 'scaOAuth' cannot be contained in the  response message of a Payment Initiation Request for a payment, where multiple authorisations are needed.  Also if any data is needed for the next action, like selecting an SCA method is not supported in the response,  since all starts of the multiple authorisations are fully equal.  In these cases, first an authorisation sub-resource has to be generated following the 'startAuthorisation' link. ", security = {
        @SecurityRequirement(name = "BearerAuthOAuth")    }, tags={ "Payment Initiation Service (PIS)" })
    @ApiResponses(value = {
        @ApiResponse(responseCode = "201", description = "CREATED", content = @Content(mediaType = "application/json", schema = @Schema(implementation = PaymentInitiationRequestResponse201.class))),

        @ApiResponse(responseCode = "400", description = "Bad Request", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Error400NGPIS.class))),

        @ApiResponse(responseCode = "401", description = "Unauthorized", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Error401NGPIS.class))),

        @ApiResponse(responseCode = "403", description = "Forbidden", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Error403NGPIS.class))),

        @ApiResponse(responseCode = "404", description = "Not found", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Error404NGPIS.class))),

        @ApiResponse(responseCode = "405", description = "Method Not Allowed", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Error405NGPIS.class))),

        @ApiResponse(responseCode = "406", description = "Not Acceptable"),

        @ApiResponse(responseCode = "408", description = "Request Timeout"),

        @ApiResponse(responseCode = "409", description = "Conflict", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Error409NGPIS.class))),

        @ApiResponse(responseCode = "415", description = "Unsupported Media Type"),

        @ApiResponse(responseCode = "429", description = "Too Many Requests"),

        @ApiResponse(responseCode = "500", description = "Internal Server Error"),

        @ApiResponse(responseCode = "503", description = "Service Unavailable") })
    @RequestMapping(value = "/v1/{payment-service}/{payment-product}",
        produces = { "application/json", "application/problem+json" },
        consumes = { "application/xml", "multipart/form-data" },
        method = RequestMethod.POST)
    default ResponseEntity<PaymentInitiationRequestResponse201> _initiatePayment(@Parameter(in = ParameterIn.HEADER, description = "ID of the request, unique to the call, as determined by the initiating party." ,required=true,schema=@Schema()) @RequestHeader(value="X-Request-ID", required=true) UUID xRequestID, @Parameter(in = ParameterIn.HEADER, description = "The forwarded IP Address header field consists of the corresponding http request IP Address field between PSU and TPP. If not available, the TPP shall use the IP Address used by the TPP when submitting this request. " ,required=true,schema=@Schema()) @RequestHeader(value="PSU-IP-Address", required=true) String psUIPAddress, @Parameter(in = ParameterIn.PATH, description = "Payment service:  Possible values are: * payments * bulk-payments * periodic-payments ", required=true, schema=@Schema(allowableValues={ "payments", "bulk-payments", "periodic-payments" }
    )) @PathVariable("payment-service") String paymentService, @Parameter(in = ParameterIn.PATH, description = "The addressed payment product endpoint, e.g. for SEPA Credit Transfers (SCT). The ASPSP will publish which of the payment products/endpoints will be supported.  The following payment products are supported:   - sepa-credit-transfers   - instant-sepa-credit-transfers   - target-2-payments   - cross-border-credit-transfers   - pain.001-sepa-credit-transfers   - pain.001-instant-sepa-credit-transfers   - pain.001-target-2-payments   - pain.001-cross-border-credit-transfers  **Remark:** For all SEPA Credit Transfer based endpoints which accept XML encoding,  the XML pain.001 schemes provided by EPC are supported by the ASPSP as a minimum for the body content.  Further XML schemes might be supported by some communities.  **Remark:** For cross-border and TARGET-2 payments only community wide pain.001 schemes do exist.  There are plenty of country specific scheme variants. ", required=true, schema=@Schema(allowableValues={ "sepa-credit-transfers", "instant-sepa-credit-transfers", "target-2-payments", "cross-border-credit-transfers", "pain.001-sepa-credit-transfers", "pain.001-instant-sepa-credit-transfers", "pain.001-target-2-payments", "pain.001-cross-border-credit-transfers" }
    )) @PathVariable("payment-product") String paymentProduct, @Parameter(in = ParameterIn.DEFAULT, description = "", schema=@Schema()) @RequestParam(value="xml_sct", required = false) Object xmlSct, @Parameter(in = ParameterIn.DEFAULT, description = "", schema=@Schema()) @RequestParam(value="json_standingorderType", required = false)  PeriodicPaymentInitiationXmlPart2StandingorderTypeJson jsonStandingorderType, @Parameter(in = ParameterIn.HEADER, description = "Is contained if and only if the \"Signature\" element is contained in the header of the request." ,schema=@Schema()) @RequestHeader(value="Digest", required=false) String digest, @Parameter(in = ParameterIn.HEADER, description = "A signature of the request by the TPP on application level. This might be mandated by ASPSP. " ,schema=@Schema()) @RequestHeader(value="Signature", required=false) String signature, @Parameter(in = ParameterIn.HEADER, description = "The certificate used for signing the request, in base64 encoding.  Must be contained if a signature is contained. " ,schema=@Schema()) @RequestHeader(value="TPP-Signature-Certificate", required=false) byte[] tpPSignatureCertificate, @Parameter(in = ParameterIn.HEADER, description = "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. " ,schema=@Schema()) @RequestHeader(value="PSU-ID", required=false) String PSU_ID, @Parameter(in = ParameterIn.HEADER, description = "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. " ,schema=@Schema()) @RequestHeader(value="PSU-ID-Type", required=false) String psUIDType, @Parameter(in = ParameterIn.HEADER, description = "Might be mandated in the ASPSP's documentation. Only used in a corporate context. " ,schema=@Schema()) @RequestHeader(value="PSU-Corporate-ID", required=false) String psUCorporateID, @Parameter(in = ParameterIn.HEADER, description = "Might be mandated in the ASPSP's documentation. Only used in a corporate context. " ,schema=@Schema()) @RequestHeader(value="PSU-Corporate-ID-Type", required=false) String psUCorporateIDType, @Parameter(in = ParameterIn.HEADER, description = "This data element may be contained, if the payment initiation transaction is part of a session, i.e. combined AIS/PIS service. This then contains the consentId of the related AIS consent, which was performed prior to this payment initiation. " ,schema=@Schema()) @RequestHeader(value="Consent-ID", required=false) String consentID, @Parameter(in = ParameterIn.HEADER, description = "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 parameter TPP-Decoupled-Preferred and 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. " ,schema=@Schema()) @RequestHeader(value="TPP-Redirect-Preferred", required=false) Boolean tpPRedirectPreferred, @Parameter(in = ParameterIn.HEADER, description = "If it equals \"true\", the TPP prefers a decoupled SCA approach.  If it equals \"false\", the TPP prefers not to use the decoupled approach for SCA. The ASPSP will then choose between the embedded or the redirect 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 parameter TPP-Redirect-Preferred and the SCA method chosen by the TPP/PSU.  The parameter might be ignored by the ASPSP. If both parameters TPP-Redirect-Preferred and TPP-Decoupled-Preferred are present and true, the request is still not rejected, but it is up to the ASPSP, which approach will actually be used.  **Remark for Future:**  TPP-Redirect-Preferred and TPP-Decoupled-Preferred will be revised in future versions, maybe merged. Currently kept separate for downward compatibility. " ,schema=@Schema()) @RequestHeader(value="TPP-Decoupled-Preferred", required=false) Boolean tpPDecoupledPreferred, @Parameter(in = ParameterIn.HEADER, description = "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. " ,schema=@Schema()) @RequestHeader(value="TPP-Redirect-URI", required=false) String tpPRedirectURI, @Parameter(in = ParameterIn.HEADER, description = "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. " ,schema=@Schema()) @RequestHeader(value="TPP-Nok-Redirect-URI", required=false) String tpPNokRedirectURI, @Parameter(in = ParameterIn.HEADER, description = "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. " ,schema=@Schema()) @RequestHeader(value="TPP-Explicit-Authorisation-Preferred", required=false) Boolean tpPExplicitAuthorisationPreferred, @Parameter(in = ParameterIn.HEADER, description = "If it equals \"true\" then the TPP prefers a rejection of the payment initiation in case the ASPSP is  providing an integrated confirmation of funds request an the result of this is that not sufficient  funds are available.  If it equals \"false\" then the TPP prefers that the ASPSP is dealing with the payment initiation like  in the ASPSPs online channel, potentially waiting for a certain time period for funds to arrive to initiate the payment.  This parameter might be ignored by the ASPSP. " ,schema=@Schema()) @RequestHeader(value="TPP-Rejection-NoFunds-Preferred", required=false) Boolean tpPRejectionNoFundsPreferred, @Parameter(in = ParameterIn.HEADER, description = "This header might be used by TPPs to inform the ASPSP about the brand used by the TPP towards the PSU.  This information is meant for logging entries to enhance communication between ASPSP and PSU or ASPSP and TPP.  This header might be ignored by the ASPSP. " ,schema=@Schema()) @RequestHeader(value="TPP-Brand-Logging-Information", required=false) String tpPBrandLoggingInformation, @Parameter(in = ParameterIn.HEADER, description = "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. " ,schema=@Schema()) @RequestHeader(value="TPP-Notification-URI", required=false) String tpPNotificationURI, @Parameter(in = ParameterIn.HEADER, description = "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. " ,schema=@Schema()) @RequestHeader(value="TPP-Notification-Content-Preferred", required=false) String tpPNotificationContentPreferred, @Parameter(in = ParameterIn.HEADER, description = "The forwarded IP Port header field consists of the corresponding HTTP request IP Port field between PSU and TPP, if available. " ,schema=@Schema()) @RequestHeader(value="PSU-IP-Port", required=false) String psUIPPort, @Parameter(in = ParameterIn.HEADER, description = "The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available. " ,schema=@Schema()) @RequestHeader(value="PSU-Accept", required=false) String psUAccept, @Parameter(in = ParameterIn.HEADER, description = "The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available. " ,schema=@Schema()) @RequestHeader(value="PSU-Accept-Charset", required=false) String psUAcceptCharset, @Parameter(in = ParameterIn.HEADER, description = "The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available. " ,schema=@Schema()) @RequestHeader(value="PSU-Accept-Encoding", required=false) String psUAcceptEncoding, @Parameter(in = ParameterIn.HEADER, description = "The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available. " ,schema=@Schema()) @RequestHeader(value="PSU-Accept-Language", required=false) String psUAcceptLanguage, @Parameter(in = ParameterIn.HEADER, description = "The forwarded Agent header field of the HTTP request between PSU and TPP, if available. " ,schema=@Schema()) @RequestHeader(value="PSU-User-Agent", required=false) String psUUserAgent, @Parameter(in = ParameterIn.HEADER, description = "HTTP method used at the PSU ? TPP interface, if available. Valid values are: * GET * POST * PUT * PATCH * DELETE " ,schema=@Schema(allowableValues={ "GET", "POST", "PUT", "PATCH", "DELETE" }
    )) @RequestHeader(value="PSU-Http-Method", required=false) String psUHttpMethod, @Parameter(in = ParameterIn.HEADER, description = "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 needs to be unaltered until removal from device. " ,schema=@Schema()) @RequestHeader(value="PSU-Device-ID", required=false) UUID psUDeviceID, @Parameter(in = ParameterIn.HEADER, description = "The forwarded Geo Location of the corresponding http request between PSU and TPP if available. " ,schema=@Schema()) @RequestHeader(value="PSU-Geo-Location", required=false) String psUGeoLocation) {
        return initiatePayment(xRequestID, psUIPAddress, paymentService, paymentProduct, xmlSct, jsonStandingorderType, digest, signature, tpPSignatureCertificate, PSU_ID, psUIDType, psUCorporateID, psUCorporateIDType, consentID, tpPRedirectPreferred, tpPDecoupledPreferred, tpPRedirectURI, tpPNokRedirectURI, tpPExplicitAuthorisationPreferred, tpPRejectionNoFundsPreferred, tpPBrandLoggingInformation, tpPNotificationURI, tpPNotificationContentPreferred, psUIPPort, psUAccept, psUAcceptCharset, psUAcceptEncoding, psUAcceptLanguage, psUUserAgent, psUHttpMethod, psUDeviceID, psUGeoLocation);
    }

    // Override this method
    default ResponseEntity<PaymentInitiationRequestResponse201> initiatePayment(UUID xRequestID, String psUIPAddress, String paymentService, String paymentProduct, Object xmlSct, PeriodicPaymentInitiationXmlPart2StandingorderTypeJson jsonStandingorderType, String digest, String signature, byte[] tpPSignatureCertificate, String PSU_ID, String psUIDType, String psUCorporateID, String psUCorporateIDType, String consentID, Boolean tpPRedirectPreferred, Boolean tpPDecoupledPreferred, String tpPRedirectURI, String tpPNokRedirectURI, Boolean tpPExplicitAuthorisationPreferred, Boolean tpPRejectionNoFundsPreferred, String tpPBrandLoggingInformation, String tpPNotificationURI, String tpPNotificationContentPreferred, String psUIPPort, String psUAccept, String psUAcceptCharset, String psUAcceptEncoding, String psUAcceptLanguage, String psUUserAgent, String psUHttpMethod, UUID psUDeviceID, String psUGeoLocation) {
        if (getObjectMapper().isPresent() && getAcceptHeader().isPresent()) {
        } else {
            log.warn("ObjectMapper or HttpServletRequest not configured in default PaymentInitiationServicePisApi interface so no example is generated");
        }
        return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
    }


    @Operation(summary = "Payment initiation request", description = "This method is used to initiate a payment at the ASPSP.  ## Variants of payment initiation requests  This method to initiate a payment initiation at the ASPSP can be sent with either a JSON body or an pain.001 body depending on the payment product in the path.  There are the following **payment products**:    - Payment products with payment information in *JSON* format:     - ***sepa-credit-transfers***     - ***instant-sepa-credit-transfers***     - ***target-2-payments***     - ***cross-border-credit-transfers***   - Payment products with payment information in *pain.001* XML format:     - ***pain.001-sepa-credit-transfers***     - ***pain.001-instant-sepa-credit-transfers***     - ***pain.001-target-2-payments***     - ***pain.001-cross-border-credit-transfers***  Furthermore the request body depends on the **payment-service**:   * ***payments***: A single payment initiation request.   * ***bulk-payments***: A collection of several payment initiation requests.        In case of a *pain.001* message there are more than one payments contained in the *pain.001 message.          In case of a *JSON* there are several JSON payment blocks contained in a joining list.   * ***periodic-payments***:      Create a standing order initiation resource for recurrent i.e. periodic payments addressable under {paymentId}       with all data relevant for the corresponding payment product and the execution of the standing order contained in a JSON body.   This is the first step in the API to initiate the related recurring/periodic payment.    ## Single and multilevel SCA Processes  The payment initiation requests are independent from the need of one or multilevel  SCA processing, i.e. independent from the number of authorisations needed for the execution of payments.   But the response messages are specific to either one SCA processing or multilevel SCA processing.   For payment initiation with multilevel SCA, this specification requires an explicit start of the authorisation,  i.e. links directly associated with SCA processing like 'scaRedirect' or 'scaOAuth' cannot be contained in the  response message of a Payment Initiation Request for a payment, where multiple authorisations are needed.  Also if any data is needed for the next action, like selecting an SCA method is not supported in the response,  since all starts of the multiple authorisations are fully equal.  In these cases, first an authorisation sub-resource has to be generated following the 'startAuthorisation' link. ", security = {
        @SecurityRequirement(name = "BearerAuthOAuth")}, tags = {"Payment Initiation Service (PIS)"})
    @ApiResponses(value = {
        @ApiResponse(responseCode = "201", description = "CREATED", content = @Content(mediaType = "application/json", schema = @Schema(implementation = PaymentInitiationRequestResponse201.class))),

        @ApiResponse(responseCode = "400", description = "Bad Request", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Error400NGPIS.class))),

        @ApiResponse(responseCode = "401", description = "Unauthorized", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Error401NGPIS.class))),

        @ApiResponse(responseCode = "403", description = "Forbidden", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Error403NGPIS.class))),

        @ApiResponse(responseCode = "404", description = "Not found", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Error404NGPIS.class))),

        @ApiResponse(responseCode = "405", description = "Method Not Allowed", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Error405NGPIS.class))),

        @ApiResponse(responseCode = "406", description = "Not Acceptable"),

        @ApiResponse(responseCode = "408", description = "Request Timeout"),

        @ApiResponse(responseCode = "409", description = "Conflict", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Error409NGPIS.class))),

        @ApiResponse(responseCode = "415", description = "Unsupported Media Type"),

        @ApiResponse(responseCode = "429", description = "Too Many Requests"),

        @ApiResponse(responseCode = "500", description = "Internal Server Error"),

        @ApiResponse(responseCode = "503", description = "Service Unavailable")})
    @RequestMapping(value = "/v1/{payment-service}/{payment-product}",
        produces = {"application/json", "application/problem+json"},
        consumes = {"text/plain"},
        method = RequestMethod.POST)
    default ResponseEntity<PaymentInitiationRequestResponse201> _initiatePayment(@Parameter(in = ParameterIn.HEADER, description = "ID of the request, unique to the call, as determined by the initiating party.", required = true, schema = @Schema()) @RequestHeader(value = "X-Request-ID", required = true) UUID xRequestID, @Parameter(in = ParameterIn.HEADER, description = "The forwarded IP Address header field consists of the corresponding http request IP Address field between PSU and TPP. If not available, the TPP shall use the IP Address used by the TPP when submitting this request. ", required = true, schema = @Schema()) @RequestHeader(value = "PSU-IP-Address", required = true) String psUIPAddress, @Parameter(in = ParameterIn.PATH, description = "Payment service:  Possible values are: * payments * bulk-payments * periodic-payments ", required = true, schema = @Schema(allowableValues = {"payments", "bulk-payments", "periodic-payments"}
    )) @PathVariable("payment-service") String paymentService, @Parameter(in = ParameterIn.PATH, description = "The addressed payment product endpoint, e.g. for SEPA Credit Transfers (SCT). The ASPSP will publish which of the payment products/endpoints will be supported.  The following payment products are supported:   - sepa-credit-transfers   - instant-sepa-credit-transfers   - target-2-payments   - cross-border-credit-transfers   - pain.001-sepa-credit-transfers   - pain.001-instant-sepa-credit-transfers   - pain.001-target-2-payments   - pain.001-cross-border-credit-transfers  **Remark:** For all SEPA Credit Transfer based endpoints which accept XML encoding,  the XML pain.001 schemes provided by EPC are supported by the ASPSP as a minimum for the body content.  Further XML schemes might be supported by some communities.  **Remark:** For cross-border and TARGET-2 payments only community wide pain.001 schemes do exist.  There are plenty of country specific scheme variants. ", required = true, schema = @Schema(allowableValues = {"sepa-credit-transfers", "instant-sepa-credit-transfers", "target-2-payments", "cross-border-credit-transfers", "pain.001-sepa-credit-transfers", "pain.001-instant-sepa-credit-transfers", "pain.001-target-2-payments", "pain.001-cross-border-credit-transfers"}
    )) @PathVariable("payment-product") String paymentProduct, @Parameter(in = ParameterIn.DEFAULT, description = "JSON request body for a payment inition request message.  There are the following payment-products supported:   * \"sepa-credit-transfers\" with JSON-Body   * \"instant-sepa-credit-transfers\" with JSON-Body   * \"target-2-payments\" with JSON-Body   * \"cross-border-credit-transfers\" with JSON-Body   * \"pain.001-sepa-credit-transfers\" with XML pain.001.001.03 body for SCT scheme   * \"pain.001-instant-sepa-credit-transfers\" with XML pain.001.001.03 body for SCT INST scheme   * \"pain.001-target-2-payments\" with pain.001 body.      Only country specific schemes are currently available   * \"pain.001-cross-border-credit-transfers\" with pain.001 body.      Only country specific schemes are currently available    There are the following payment-services supported:   * \"payments\"   * \"periodic-payments\"   * \"bulk-payments\"  All optional, conditional and predefined but not yet used fields are defined. ", required = true, schema = @Schema()) @Valid @RequestBody String body, @Parameter(in = ParameterIn.HEADER, description = "Is contained if and only if the \"Signature\" element is contained in the header of the request.", schema = @Schema()) @RequestHeader(value = "Digest", required = false) String digest, @Parameter(in = ParameterIn.HEADER, description = "A signature of the request by the TPP on application level. This might be mandated by ASPSP. ", schema = @Schema()) @RequestHeader(value = "Signature", required = false) String signature, @Parameter(in = ParameterIn.HEADER, description = "The certificate used for signing the request, in base64 encoding.  Must be contained if a signature is contained. ", schema = @Schema()) @RequestHeader(value = "TPP-Signature-Certificate", required = false) byte[] tpPSignatureCertificate, @Parameter(in = ParameterIn.HEADER, description = "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. ", schema = @Schema()) @RequestHeader(value = "PSU-ID", required = false) String PSU_ID, @Parameter(in = ParameterIn.HEADER, description = "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. ", schema = @Schema()) @RequestHeader(value = "PSU-ID-Type", required = false) String psUIDType, @Parameter(in = ParameterIn.HEADER, description = "Might be mandated in the ASPSP's documentation. Only used in a corporate context. ", schema = @Schema()) @RequestHeader(value = "PSU-Corporate-ID", required = false) String psUCorporateID, @Parameter(in = ParameterIn.HEADER, description = "Might be mandated in the ASPSP's documentation. Only used in a corporate context. ", schema = @Schema()) @RequestHeader(value = "PSU-Corporate-ID-Type", required = false) String psUCorporateIDType, @Parameter(in = ParameterIn.HEADER, description = "This data element may be contained, if the payment initiation transaction is part of a session, i.e. combined AIS/PIS service. This then contains the consentId of the related AIS consent, which was performed prior to this payment initiation. ", schema = @Schema()) @RequestHeader(value = "Consent-ID", required = false) String consentID, @Parameter(in = ParameterIn.HEADER, description = "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 parameter TPP-Decoupled-Preferred and 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. ", schema = @Schema()) @RequestHeader(value = "TPP-Redirect-Preferred", required = false) Boolean tpPRedirectPreferred, @Parameter(in = ParameterIn.HEADER, description = "If it equals \"true\", the TPP prefers a decoupled SCA approach.  If it equals \"false\", the TPP prefers not to use the decoupled approach for SCA. The ASPSP will then choose between the embedded or the redirect 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 parameter TPP-Redirect-Preferred and the SCA method chosen by the TPP/PSU.  The parameter might be ignored by the ASPSP. If both parameters TPP-Redirect-Preferred and TPP-Decoupled-Preferred are present and true, the request is still not rejected, but it is up to the ASPSP, which approach will actually be used.  **Remark for Future:**  TPP-Redirect-Preferred and TPP-Decoupled-Preferred will be revised in future versions, maybe merged. Currently kept separate for downward compatibility. ", schema = @Schema()) @RequestHeader(value = "TPP-Decoupled-Preferred", required = false) Boolean tpPDecoupledPreferred, @Parameter(in = ParameterIn.HEADER, description = "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. ", schema = @Schema()) @RequestHeader(value = "TPP-Redirect-URI", required = false) String tpPRedirectURI, @Parameter(in = ParameterIn.HEADER, description = "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. ", schema = @Schema()) @RequestHeader(value = "TPP-Nok-Redirect-URI", required = false) String tpPNokRedirectURI, @Parameter(in = ParameterIn.HEADER, description = "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. ", schema = @Schema()) @RequestHeader(value = "TPP-Explicit-Authorisation-Preferred", required = false) Boolean tpPExplicitAuthorisationPreferred, @Parameter(in = ParameterIn.HEADER, description = "If it equals \"true\" then the TPP prefers a rejection of the payment initiation in case the ASPSP is  providing an integrated confirmation of funds request an the result of this is that not sufficient  funds are available.  If it equals \"false\" then the TPP prefers that the ASPSP is dealing with the payment initiation like  in the ASPSPs online channel, potentially waiting for a certain time period for funds to arrive to initiate the payment.  This parameter might be ignored by the ASPSP. ", schema = @Schema()) @RequestHeader(value = "TPP-Rejection-NoFunds-Preferred", required = false) Boolean tpPRejectionNoFundsPreferred, @Parameter(in = ParameterIn.HEADER, description = "This header might be used by TPPs to inform the ASPSP about the brand used by the TPP towards the PSU.  This information is meant for logging entries to enhance communication between ASPSP and PSU or ASPSP and TPP.  This header might be ignored by the ASPSP. ", schema = @Schema()) @RequestHeader(value = "TPP-Brand-Logging-Information", required = false) String tpPBrandLoggingInformation, @Parameter(in = ParameterIn.HEADER, description = "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. ", schema = @Schema()) @RequestHeader(value = "TPP-Notification-URI", required = false) String tpPNotificationURI, @Parameter(in = ParameterIn.HEADER, description = "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. ", schema = @Schema()) @RequestHeader(value = "TPP-Notification-Content-Preferred", required = false) String tpPNotificationContentPreferred, @Parameter(in = ParameterIn.HEADER, description = "The forwarded IP Port header field consists of the corresponding HTTP request IP Port field between PSU and TPP, if available. ", schema = @Schema()) @RequestHeader(value = "PSU-IP-Port", required = false) String psUIPPort, @Parameter(in = ParameterIn.HEADER, description = "The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available. ", schema = @Schema()) @RequestHeader(value = "PSU-Accept", required = false) String psUAccept, @Parameter(in = ParameterIn.HEADER, description = "The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available. ", schema = @Schema()) @RequestHeader(value = "PSU-Accept-Charset", required = false) String psUAcceptCharset, @Parameter(in = ParameterIn.HEADER, description = "The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available. ", schema = @Schema()) @RequestHeader(value = "PSU-Accept-Encoding", required = false) String psUAcceptEncoding, @Parameter(in = ParameterIn.HEADER, description = "The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available. ", schema = @Schema()) @RequestHeader(value = "PSU-Accept-Language", required = false) String psUAcceptLanguage, @Parameter(in = ParameterIn.HEADER, description = "The forwarded Agent header field of the HTTP request between PSU and TPP, if available. ", schema = @Schema()) @RequestHeader(value = "PSU-User-Agent", required = false) String psUUserAgent, @Parameter(in = ParameterIn.HEADER, description = "HTTP method used at the PSU ? TPP interface, if available. Valid values are: * GET * POST * PUT * PATCH * DELETE ", schema = @Schema(allowableValues = {"GET", "POST", "PUT", "PATCH", "DELETE"}
    )) @RequestHeader(value = "PSU-Http-Method", required = false) String psUHttpMethod, @Parameter(in = ParameterIn.HEADER, description = "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 needs to be unaltered until removal from device. ", schema = @Schema()) @RequestHeader(value = "PSU-Device-ID", required = false) UUID psUDeviceID, @Parameter(in = ParameterIn.HEADER, description = "The forwarded Geo Location of the corresponding http request between PSU and TPP if available. ", schema = @Schema()) @RequestHeader(value = "PSU-Geo-Location", required = false) String psUGeoLocation) {
        return initiatePayment(body, xRequestID, psUIPAddress, paymentService, paymentProduct, digest, signature, tpPSignatureCertificate, PSU_ID, psUIDType, psUCorporateID, psUCorporateIDType, consentID, tpPRedirectPreferred, tpPDecoupledPreferred, tpPRedirectURI, tpPNokRedirectURI, tpPExplicitAuthorisationPreferred, tpPRejectionNoFundsPreferred, tpPBrandLoggingInformation, tpPNotificationURI, tpPNotificationContentPreferred, psUIPPort, psUAccept, psUAcceptCharset, psUAcceptEncoding, psUAcceptLanguage, psUUserAgent, psUHttpMethod, psUDeviceID, psUGeoLocation);
    }

    // Override this method
    default ResponseEntity<PaymentInitiationRequestResponse201> initiatePayment(String body, UUID xRequestID, String psUIPAddress, String paymentService, String paymentProduct, String digest, String signature, byte[] tpPSignatureCertificate, String PSU_ID, String psUIDType, String psUCorporateID, String psUCorporateIDType, String consentID, Boolean tpPRedirectPreferred, Boolean tpPDecoupledPreferred, String tpPRedirectURI, String tpPNokRedirectURI, Boolean tpPExplicitAuthorisationPreferred, Boolean tpPRejectionNoFundsPreferred, String tpPBrandLoggingInformation, String tpPNotificationURI, String tpPNotificationContentPreferred, String psUIPPort, String psUAccept, String psUAcceptCharset, String psUAcceptEncoding, String psUAcceptLanguage, String psUUserAgent, String psUHttpMethod, UUID psUDeviceID, String psUGeoLocation) {
        if (getObjectMapper().isPresent() && getAcceptHeader().isPresent()) {
        } else {
            log.warn("ObjectMapper or HttpServletRequest not configured in default PaymentInitiationServicePisApi interface so no example is generated");
        }
        return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
    }


    @Operation(summary = "Start the authorisation process for a payment initiation", description = "Create an authorisation sub-resource and start the authorisation process.  The message might in addition transmit authentication and authorisation related data.   This 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 transaction.  The ASPSP might make the usage of this access method unnecessary in case  of only one SCA process needed, since the related authorisation resource  might be automatically created by the ASPSP after the submission of the  payment data with the first POST payments/{payment-product} 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 a '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:     * 'startAuthorisationWithPsuIdentification'     * 'startAuthorisationWithPsuAuthentication'     * 'startAuthorisationWithEncryptedPsuAuthentication'     * 'startAuthorisationWithAuthentciationMethodSelection'   * The related payment initiation cannot yet be executed since a multilevel SCA is mandated.   * The ASPSP has indicated with a '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. ", security = {
        @SecurityRequirement(name = "BearerAuthOAuth")    }, tags={ "Payment Initiation Service (PIS)", "Common Services" })
    @ApiResponses(value = {
        @ApiResponse(responseCode = "201", description = "Created", content = @Content(mediaType = "application/json", schema = @Schema(implementation = StartScaprocessResponse.class))),

        @ApiResponse(responseCode = "400", description = "Bad Request", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Error400NGPIS.class))),

        @ApiResponse(responseCode = "401", description = "Unauthorized", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Error401NGPIS.class))),

        @ApiResponse(responseCode = "403", description = "Forbidden", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Error403NGPIS.class))),

        @ApiResponse(responseCode = "404", description = "Not found", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Error404NGPIS.class))),

        @ApiResponse(responseCode = "405", description = "Method Not Allowed", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Error405NGPIS.class))),

        @ApiResponse(responseCode = "406", description = "Not Acceptable"),

        @ApiResponse(responseCode = "408", description = "Request Timeout"),

        @ApiResponse(responseCode = "409", description = "Conflict", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Error409NGPIS.class))),

        @ApiResponse(responseCode = "415", description = "Unsupported Media Type"),

        @ApiResponse(responseCode = "429", description = "Too Many Requests"),

        @ApiResponse(responseCode = "500", description = "Internal Server Error"),

        @ApiResponse(responseCode = "503", description = "Service Unavailable") })
    @RequestMapping(value = "/v1/{payment-service}/{payment-product}/{paymentId}/authorisations",
        produces = { "application/json", "application/problem+json" },
        consumes = { "application/json" },
        method = RequestMethod.POST)
    default ResponseEntity<StartScaprocessResponse> _startPaymentAuthorisation(@Parameter(in = ParameterIn.HEADER, description = "ID of the request, unique to the call, as determined by the initiating party." ,required=true,schema=@Schema()) @RequestHeader(value="X-Request-ID", required=true) UUID xRequestID, @Parameter(in = ParameterIn.PATH, description = "Payment service:  Possible values are: * payments * bulk-payments * periodic-payments ", required=true, schema=@Schema(allowableValues={ "payments", "bulk-payments", "periodic-payments" }
    )) @PathVariable("payment-service") String paymentService, @Parameter(in = ParameterIn.PATH, description = "The addressed payment product endpoint, e.g. for SEPA Credit Transfers (SCT). The ASPSP will publish which of the payment products/endpoints will be supported.  The following payment products are supported:   - sepa-credit-transfers   - instant-sepa-credit-transfers   - target-2-payments   - cross-border-credit-transfers   - pain.001-sepa-credit-transfers   - pain.001-instant-sepa-credit-transfers   - pain.001-target-2-payments   - pain.001-cross-border-credit-transfers  **Remark:** For all SEPA Credit Transfer based endpoints which accept XML encoding,  the XML pain.001 schemes provided by EPC are supported by the ASPSP as a minimum for the body content.  Further XML schemes might be supported by some communities.  **Remark:** For cross-border and TARGET-2 payments only community wide pain.001 schemes do exist.  There are plenty of country specific scheme variants. ", required=true, schema=@Schema(allowableValues={ "sepa-credit-transfers", "instant-sepa-credit-transfers", "target-2-payments", "cross-border-credit-transfers", "pain.001-sepa-credit-transfers", "pain.001-instant-sepa-credit-transfers", "pain.001-target-2-payments", "pain.001-cross-border-credit-transfers" }
    )) @PathVariable("payment-product") String paymentProduct, @Parameter(in = ParameterIn.PATH, description = "Resource identification of the generated payment initiation resource.", required=true, schema=@Schema()) @PathVariable("paymentId") String paymentId, @Parameter(in = ParameterIn.HEADER, description = "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. " ,schema=@Schema()) @RequestHeader(value="PSU-ID", required=false) String PSU_ID, @Parameter(in = ParameterIn.HEADER, description = "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. " ,schema=@Schema()) @RequestHeader(value="PSU-ID-Type", required=false) String psUIDType, @Parameter(in = ParameterIn.HEADER, description = "Might be mandated in the ASPSP's documentation. Only used in a corporate context. " ,schema=@Schema()) @RequestHeader(value="PSU-Corporate-ID", required=false) String psUCorporateID, @Parameter(in = ParameterIn.HEADER, description = "Might be mandated in the ASPSP's documentation. Only used in a corporate context. " ,schema=@Schema()) @RequestHeader(value="PSU-Corporate-ID-Type", required=false) String psUCorporateIDType, @Parameter(in = ParameterIn.HEADER, description = "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 parameter TPP-Decoupled-Preferred and 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. " ,schema=@Schema()) @RequestHeader(value="TPP-Redirect-Preferred", required=false) Boolean tpPRedirectPreferred, @Parameter(in = ParameterIn.HEADER, description = "If it equals \"true\", the TPP prefers a decoupled SCA approach.  If it equals \"false\", the TPP prefers not to use the decoupled approach for SCA. The ASPSP will then choose between the embedded or the redirect 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 parameter TPP-Redirect-Preferred and the SCA method chosen by the TPP/PSU.  The parameter might be ignored by the ASPSP. If both parameters TPP-Redirect-Preferred and TPP-Decoupled-Preferred are present and true, the request is still not rejected, but it is up to the ASPSP, which approach will actually be used.  **Remark for Future:**  TPP-Redirect-Preferred and TPP-Decoupled-Preferred will be revised in future versions, maybe merged. Currently kept separate for downward compatibility. " ,schema=@Schema()) @RequestHeader(value="TPP-Decoupled-Preferred", required=false) Boolean tpPDecoupledPreferred, @Parameter(in = ParameterIn.HEADER, description = "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. " ,schema=@Schema()) @RequestHeader(value="TPP-Redirect-URI", required=false) String tpPRedirectURI, @Parameter(in = ParameterIn.HEADER, description = "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. " ,schema=@Schema()) @RequestHeader(value="TPP-Nok-Redirect-URI", required=false) String tpPNokRedirectURI, @Parameter(in = ParameterIn.HEADER, description = "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. " ,schema=@Schema()) @RequestHeader(value="TPP-Notification-URI", required=false) String tpPNotificationURI, @Parameter(in = ParameterIn.HEADER, description = "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. " ,schema=@Schema()) @RequestHeader(value="TPP-Notification-Content-Preferred", required=false) String tpPNotificationContentPreferred, @Parameter(in = ParameterIn.HEADER, description = "Is contained if and only if the \"Signature\" element is contained in the header of the request." ,schema=@Schema()) @RequestHeader(value="Digest", required=false) String digest, @Parameter(in = ParameterIn.HEADER, description = "A signature of the request by the TPP on application level. This might be mandated by ASPSP. " ,schema=@Schema()) @RequestHeader(value="Signature", required=false) String signature, @Parameter(in = ParameterIn.HEADER, description = "The certificate used for signing the request, in base64 encoding.  Must be contained if a signature is contained. " ,schema=@Schema()) @RequestHeader(value="TPP-Signature-Certificate", required=false) byte[] tpPSignatureCertificate, @Parameter(in = ParameterIn.HEADER, description = "The forwarded IP Address header field consists of the corresponding http request IP Address field between PSU and TPP. " ,schema=@Schema()) @RequestHeader(value="PSU-IP-Address", required=false) String psUIPAddress, @Parameter(in = ParameterIn.HEADER, description = "The forwarded IP Port header field consists of the corresponding HTTP request IP Port field between PSU and TPP, if available. " ,schema=@Schema()) @RequestHeader(value="PSU-IP-Port", required=false) String psUIPPort, @Parameter(in = ParameterIn.HEADER, description = "The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available. " ,schema=@Schema()) @RequestHeader(value="PSU-Accept", required=false) String psUAccept, @Parameter(in = ParameterIn.HEADER, description = "The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available. " ,schema=@Schema()) @RequestHeader(value="PSU-Accept-Charset", required=false) String psUAcceptCharset, @Parameter(in = ParameterIn.HEADER, description = "The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available. " ,schema=@Schema()) @RequestHeader(value="PSU-Accept-Encoding", required=false) String psUAcceptEncoding, @Parameter(in = ParameterIn.HEADER, description = "The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available. " ,schema=@Schema()) @RequestHeader(value="PSU-Accept-Language", required=false) String psUAcceptLanguage, @Parameter(in = ParameterIn.HEADER, description = "The forwarded Agent header field of the HTTP request between PSU and TPP, if available. " ,schema=@Schema()) @RequestHeader(value="PSU-User-Agent", required=false) String psUUserAgent, @Parameter(in = ParameterIn.HEADER, description = "HTTP method used at the PSU ? TPP interface, if available. Valid values are: * GET * POST * PUT * PATCH * DELETE " ,schema=@Schema(allowableValues={ "GET", "POST", "PUT", "PATCH", "DELETE" }
    )) @RequestHeader(value="PSU-Http-Method", required=false) String psUHttpMethod, @Parameter(in = ParameterIn.HEADER, description = "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 needs to be unaltered until removal from device. " ,schema=@Schema()) @RequestHeader(value="PSU-Device-ID", required=false) UUID psUDeviceID, @Parameter(in = ParameterIn.HEADER, description = "The forwarded Geo Location of the corresponding http request between PSU and TPP if available. " ,schema=@Schema()) @RequestHeader(value="PSU-Geo-Location", required=false) String psUGeoLocation, @Parameter(in = ParameterIn.DEFAULT, description = "", schema=@Schema()) @Valid @RequestBody(required=false) Object body ) {
        return startPaymentAuthorisation(xRequestID, paymentService, paymentProduct, paymentId, body, PSU_ID, psUIDType, psUCorporateID, psUCorporateIDType, tpPRedirectPreferred, tpPDecoupledPreferred, tpPRedirectURI, tpPNokRedirectURI, tpPNotificationURI, tpPNotificationContentPreferred, digest, signature, tpPSignatureCertificate, psUIPAddress, psUIPPort, psUAccept, psUAcceptCharset, psUAcceptEncoding, psUAcceptLanguage, psUUserAgent, psUHttpMethod, psUDeviceID, psUGeoLocation);
    }

    // Override this method
    default ResponseEntity<StartScaprocessResponse> startPaymentAuthorisation(UUID xRequestID, String paymentService, String paymentProduct, String paymentId, Object body, String PSU_ID, String psUIDType, String psUCorporateID, String psUCorporateIDType, Boolean tpPRedirectPreferred, Boolean tpPDecoupledPreferred, String tpPRedirectURI, String tpPNokRedirectURI, String tpPNotificationURI, String tpPNotificationContentPreferred, 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) {
        if (getObjectMapper().isPresent() && getAcceptHeader().isPresent()) {
        } else {
            log.warn("ObjectMapper or HttpServletRequest not configured in default PaymentInitiationServicePisApi interface so no example is generated");
        }
        return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
    }


    @Operation(summary = "Start the authorisation process for the cancellation of the addressed payment", description = "Creates an authorisation sub-resource and start the authorisation process of the cancellation of the addressed payment.  The message might in addition transmit authentication and authorisation related data.  This 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 cancellation-authorisation.  The ASPSP might make the usage of this access method unnecessary in case  of only one SCA process needed, since the related authorisation resource  might be automatically created by the ASPSP after the submission of the  payment data with the first POST payments/{payment-product} 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 a '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:     * 'startAuthorisationWithPsuIdentification'     * 'startAuthorisationWithPsuAuthentication'     * 'startAuthorisationWithAuthentciationMethodSelection'    * The related payment initiation cannot yet be executed since a multilevel SCA is mandated.   * The ASPSP has indicated with a '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. ", security = {
        @SecurityRequirement(name = "BearerAuthOAuth")    }, tags={ "Payment Initiation Service (PIS)", "Common Services" })
    @ApiResponses(value = {
        @ApiResponse(responseCode = "201", description = "Created", content = @Content(mediaType = "application/json", schema = @Schema(implementation = StartScaprocessResponse.class))),

        @ApiResponse(responseCode = "400", description = "Bad Request", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Error400NGPIS.class))),

        @ApiResponse(responseCode = "401", description = "Unauthorized", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Error401NGPIS.class))),

        @ApiResponse(responseCode = "403", description = "Forbidden", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Error403NGPIS.class))),

        @ApiResponse(responseCode = "404", description = "Not found", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Error404NGPIS.class))),

        @ApiResponse(responseCode = "405", description = "Method Not Allowed", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Error405NGPIS.class))),

        @ApiResponse(responseCode = "406", description = "Not Acceptable"),

        @ApiResponse(responseCode = "408", description = "Request Timeout"),

        @ApiResponse(responseCode = "409", description = "Conflict", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Error409NGPIS.class))),

        @ApiResponse(responseCode = "415", description = "Unsupported Media Type"),

        @ApiResponse(responseCode = "429", description = "Too Many Requests"),

        @ApiResponse(responseCode = "500", description = "Internal Server Error"),

        @ApiResponse(responseCode = "503", description = "Service Unavailable") })
    @RequestMapping(value = "/v1/{payment-service}/{payment-product}/{paymentId}/cancellation-authorisations",
        produces = { "application/json", "application/problem+json" },
        consumes = { "application/json" },
        method = RequestMethod.POST)
    default ResponseEntity<StartScaprocessResponse> _startPaymentInitiationCancellationAuthorisation(@Parameter(in = ParameterIn.HEADER, description = "ID of the request, unique to the call, as determined by the initiating party." ,required=true,schema=@Schema()) @RequestHeader(value="X-Request-ID", required=true) UUID xRequestID, @Parameter(in = ParameterIn.PATH, description = "Payment service:  Possible values are: * payments * bulk-payments * periodic-payments ", required=true, schema=@Schema(allowableValues={ "payments", "bulk-payments", "periodic-payments" }
    )) @PathVariable("payment-service") String paymentService, @Parameter(in = ParameterIn.PATH, description = "The addressed payment product endpoint, e.g. for SEPA Credit Transfers (SCT). The ASPSP will publish which of the payment products/endpoints will be supported.  The following payment products are supported:   - sepa-credit-transfers   - instant-sepa-credit-transfers   - target-2-payments   - cross-border-credit-transfers   - pain.001-sepa-credit-transfers   - pain.001-instant-sepa-credit-transfers   - pain.001-target-2-payments   - pain.001-cross-border-credit-transfers  **Remark:** For all SEPA Credit Transfer based endpoints which accept XML encoding,  the XML pain.001 schemes provided by EPC are supported by the ASPSP as a minimum for the body content.  Further XML schemes might be supported by some communities.  **Remark:** For cross-border and TARGET-2 payments only community wide pain.001 schemes do exist.  There are plenty of country specific scheme variants. ", required=true, schema=@Schema(allowableValues={ "sepa-credit-transfers", "instant-sepa-credit-transfers", "target-2-payments", "cross-border-credit-transfers", "pain.001-sepa-credit-transfers", "pain.001-instant-sepa-credit-transfers", "pain.001-target-2-payments", "pain.001-cross-border-credit-transfers" }
    )) @PathVariable("payment-product") String paymentProduct, @Parameter(in = ParameterIn.PATH, description = "Resource identification of the generated payment initiation resource.", required=true, schema=@Schema()) @PathVariable("paymentId") String paymentId, @Parameter(in = ParameterIn.HEADER, description = "Is contained if and only if the \"Signature\" element is contained in the header of the request." ,schema=@Schema()) @RequestHeader(value="Digest", required=false) String digest, @Parameter(in = ParameterIn.HEADER, description = "A signature of the request by the TPP on application level. This might be mandated by ASPSP. " ,schema=@Schema()) @RequestHeader(value="Signature", required=false) String signature, @Parameter(in = ParameterIn.HEADER, description = "The certificate used for signing the request, in base64 encoding.  Must be contained if a signature is contained. " ,schema=@Schema()) @RequestHeader(value="TPP-Signature-Certificate", required=false) byte[] tpPSignatureCertificate, @Parameter(in = ParameterIn.HEADER, description = "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. " ,schema=@Schema()) @RequestHeader(value="PSU-ID", required=false) String PSU_ID, @Parameter(in = ParameterIn.HEADER, description = "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. " ,schema=@Schema()) @RequestHeader(value="PSU-ID-Type", required=false) String psUIDType, @Parameter(in = ParameterIn.HEADER, description = "Might be mandated in the ASPSP's documentation. Only used in a corporate context. " ,schema=@Schema()) @RequestHeader(value="PSU-Corporate-ID", required=false) String psUCorporateID, @Parameter(in = ParameterIn.HEADER, description = "Might be mandated in the ASPSP's documentation. Only used in a corporate context. " ,schema=@Schema()) @RequestHeader(value="PSU-Corporate-ID-Type", required=false) String psUCorporateIDType, @Parameter(in = ParameterIn.HEADER, description = "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 parameter TPP-Decoupled-Preferred and 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. " ,schema=@Schema()) @RequestHeader(value="TPP-Redirect-Preferred", required=false) Boolean tpPRedirectPreferred, @Parameter(in = ParameterIn.HEADER, description = "If it equals \"true\", the TPP prefers a decoupled SCA approach.  If it equals \"false\", the TPP prefers not to use the decoupled approach for SCA. The ASPSP will then choose between the embedded or the redirect 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 parameter TPP-Redirect-Preferred and the SCA method chosen by the TPP/PSU.  The parameter might be ignored by the ASPSP. If both parameters TPP-Redirect-Preferred and TPP-Decoupled-Preferred are present and true, the request is still not rejected, but it is up to the ASPSP, which approach will actually be used.  **Remark for Future:**  TPP-Redirect-Preferred and TPP-Decoupled-Preferred will be revised in future versions, maybe merged. Currently kept separate for downward compatibility. " ,schema=@Schema()) @RequestHeader(value="TPP-Decoupled-Preferred", required=false) Boolean tpPDecoupledPreferred, @Parameter(in = ParameterIn.HEADER, description = "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. " ,schema=@Schema()) @RequestHeader(value="TPP-Redirect-URI", required=false) String tpPRedirectURI, @Parameter(in = ParameterIn.HEADER, description = "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. " ,schema=@Schema()) @RequestHeader(value="TPP-Nok-Redirect-URI", required=false) String tpPNokRedirectURI, @Parameter(in = ParameterIn.HEADER, description = "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. " ,schema=@Schema()) @RequestHeader(value="TPP-Notification-URI", required=false) String tpPNotificationURI, @Parameter(in = ParameterIn.HEADER, description = "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. " ,schema=@Schema()) @RequestHeader(value="TPP-Notification-Content-Preferred", required=false) String tpPNotificationContentPreferred, @Parameter(in = ParameterIn.HEADER, description = "The forwarded IP Address header field consists of the corresponding http request IP Address field between PSU and TPP. " ,schema=@Schema()) @RequestHeader(value="PSU-IP-Address", required=false) String psUIPAddress, @Parameter(in = ParameterIn.HEADER, description = "The forwarded IP Port header field consists of the corresponding HTTP request IP Port field between PSU and TPP, if available. " ,schema=@Schema()) @RequestHeader(value="PSU-IP-Port", required=false) String psUIPPort, @Parameter(in = ParameterIn.HEADER, description = "The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available. " ,schema=@Schema()) @RequestHeader(value="PSU-Accept", required=false) String psUAccept, @Parameter(in = ParameterIn.HEADER, description = "The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available. " ,schema=@Schema()) @RequestHeader(value="PSU-Accept-Charset", required=false) String psUAcceptCharset, @Parameter(in = ParameterIn.HEADER, description = "The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available. " ,schema=@Schema()) @RequestHeader(value="PSU-Accept-Encoding", required=false) String psUAcceptEncoding, @Parameter(in = ParameterIn.HEADER, description = "The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available. " ,schema=@Schema()) @RequestHeader(value="PSU-Accept-Language", required=false) String psUAcceptLanguage, @Parameter(in = ParameterIn.HEADER, description = "The forwarded Agent header field of the HTTP request between PSU and TPP, if available. " ,schema=@Schema()) @RequestHeader(value="PSU-User-Agent", required=false) String psUUserAgent, @Parameter(in = ParameterIn.HEADER, description = "HTTP method used at the PSU ? TPP interface, if available. Valid values are: * GET * POST * PUT * PATCH * DELETE " ,schema=@Schema(allowableValues={ "GET", "POST", "PUT", "PATCH", "DELETE" }
    )) @RequestHeader(value="PSU-Http-Method", required=false) String psUHttpMethod, @Parameter(in = ParameterIn.HEADER, description = "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 needs to be unaltered until removal from device. " ,schema=@Schema()) @RequestHeader(value="PSU-Device-ID", required=false) UUID psUDeviceID, @Parameter(in = ParameterIn.HEADER, description = "The forwarded Geo Location of the corresponding http request between PSU and TPP if available. " ,schema=@Schema()) @RequestHeader(value="PSU-Geo-Location", required=false) String psUGeoLocation, @Parameter(in = ParameterIn.DEFAULT, description = "", schema=@Schema()) @Valid @RequestBody(required=false) Object body ) {
        return startPaymentInitiationCancellationAuthorisation(xRequestID, paymentService, paymentProduct, paymentId, body, digest, signature, tpPSignatureCertificate, PSU_ID, psUIDType, psUCorporateID, psUCorporateIDType, tpPRedirectPreferred, tpPDecoupledPreferred, tpPRedirectURI, tpPNokRedirectURI, tpPNotificationURI, tpPNotificationContentPreferred, psUIPAddress, psUIPPort, psUAccept, psUAcceptCharset, psUAcceptEncoding, psUAcceptLanguage, psUUserAgent, psUHttpMethod, psUDeviceID, psUGeoLocation);
    }

    // Override this method
    default ResponseEntity<StartScaprocessResponse> startPaymentInitiationCancellationAuthorisation(UUID xRequestID, String paymentService, String paymentProduct, String paymentId, Object body, String digest, String signature, byte[] tpPSignatureCertificate, String PSU_ID, String psUIDType, String psUCorporateID, String psUCorporateIDType, Boolean tpPRedirectPreferred, Boolean tpPDecoupledPreferred, 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) {
        if (getObjectMapper().isPresent() && getAcceptHeader().isPresent()) {
        } else {
            log.warn("ObjectMapper or HttpServletRequest not configured in default PaymentInitiationServicePisApi interface so no example is generated");
        }
        return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
    }


    @Operation(summary = "Update PSU data for payment initiation cancellation", description = "This method updates PSU data on the cancellation authorisation resource if needed.  It may authorise a cancellation of the payment 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 cancellation authorisation within the payment initiation services 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 authorization method      WARNING: This method needs 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 needs a reduced header,      therefore many optional elements are not present.      Maybe in a later version the access path will change. ", security = {
        @SecurityRequirement(name = "BearerAuthOAuth")    }, tags={ "Payment Initiation Service (PIS)", "Common Services" })
    @ApiResponses(value = {
        @ApiResponse(responseCode = "200", description = "OK", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Object.class))),

        @ApiResponse(responseCode = "400", description = "Bad Request", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Error400NGPIS.class))),

        @ApiResponse(responseCode = "401", description = "Unauthorized", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Error401NGPIS.class))),

        @ApiResponse(responseCode = "403", description = "Forbidden", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Error403NGPIS.class))),

        @ApiResponse(responseCode = "404", description = "Not found", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Error404NGPIS.class))),

        @ApiResponse(responseCode = "405", description = "Method Not Allowed", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Error405NGPIS.class))),

        @ApiResponse(responseCode = "406", description = "Not Acceptable"),

        @ApiResponse(responseCode = "408", description = "Request Timeout"),

        @ApiResponse(responseCode = "409", description = "Conflict", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Error409NGPIS.class))),

        @ApiResponse(responseCode = "415", description = "Unsupported Media Type"),

        @ApiResponse(responseCode = "429", description = "Too Many Requests"),

        @ApiResponse(responseCode = "500", description = "Internal Server Error"),

        @ApiResponse(responseCode = "503", description = "Service Unavailable") })
    @RequestMapping(value = "/v1/{payment-service}/{payment-product}/{paymentId}/cancellation-authorisations/{authorisationId}",
        produces = { "application/json", "application/problem+json" },
        consumes = { "application/json" },
        method = RequestMethod.PUT)
    default ResponseEntity<Object> _updatePaymentCancellationPsuData(@Parameter(in = ParameterIn.HEADER, description = "ID of the request, unique to the call, as determined by the initiating party." ,required=true,schema=@Schema()) @RequestHeader(value="X-Request-ID", required=true) UUID xRequestID, @Parameter(in = ParameterIn.PATH, description = "Payment service:  Possible values are: * payments * bulk-payments * periodic-payments ", required=true, schema=@Schema(allowableValues={ "payments", "bulk-payments", "periodic-payments" }
    )) @PathVariable("payment-service") String paymentService, @Parameter(in = ParameterIn.PATH, description = "The addressed payment product endpoint, e.g. for SEPA Credit Transfers (SCT). The ASPSP will publish which of the payment products/endpoints will be supported.  The following payment products are supported:   - sepa-credit-transfers   - instant-sepa-credit-transfers   - target-2-payments   - cross-border-credit-transfers   - pain.001-sepa-credit-transfers   - pain.001-instant-sepa-credit-transfers   - pain.001-target-2-payments   - pain.001-cross-border-credit-transfers  **Remark:** For all SEPA Credit Transfer based endpoints which accept XML encoding,  the XML pain.001 schemes provided by EPC are supported by the ASPSP as a minimum for the body content.  Further XML schemes might be supported by some communities.  **Remark:** For cross-border and TARGET-2 payments only community wide pain.001 schemes do exist.  There are plenty of country specific scheme variants. ", required=true, schema=@Schema(allowableValues={ "sepa-credit-transfers", "instant-sepa-credit-transfers", "target-2-payments", "cross-border-credit-transfers", "pain.001-sepa-credit-transfers", "pain.001-instant-sepa-credit-transfers", "pain.001-target-2-payments", "pain.001-cross-border-credit-transfers" }
    )) @PathVariable("payment-product") String paymentProduct, @Parameter(in = ParameterIn.PATH, description = "Resource identification of the generated payment initiation resource.", required=true, schema=@Schema()) @PathVariable("paymentId") String paymentId, @Parameter(in = ParameterIn.PATH, description = "Resource identification of the related SCA.", required=true, schema=@Schema()) @PathVariable("authorisationId") String authorisationId, @Parameter(in = ParameterIn.HEADER, description = "Is contained if and only if the \"Signature\" element is contained in the header of the request." ,schema=@Schema()) @RequestHeader(value="Digest", required=false) String digest, @Parameter(in = ParameterIn.HEADER, description = "A signature of the request by the TPP on application level. This might be mandated by ASPSP. " ,schema=@Schema()) @RequestHeader(value="Signature", required=false) String signature, @Parameter(in = ParameterIn.HEADER, description = "The certificate used for signing the request, in base64 encoding.  Must be contained if a signature is contained. " ,schema=@Schema()) @RequestHeader(value="TPP-Signature-Certificate", required=false) byte[] tpPSignatureCertificate, @Parameter(in = ParameterIn.HEADER, description = "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. " ,schema=@Schema()) @RequestHeader(value="PSU-ID", required=false) String PSU_ID, @Parameter(in = ParameterIn.HEADER, description = "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. " ,schema=@Schema()) @RequestHeader(value="PSU-ID-Type", required=false) String psUIDType, @Parameter(in = ParameterIn.HEADER, description = "Might be mandated in the ASPSP's documentation. Only used in a corporate context. " ,schema=@Schema()) @RequestHeader(value="PSU-Corporate-ID", required=false) String psUCorporateID, @Parameter(in = ParameterIn.HEADER, description = "Might be mandated in the ASPSP's documentation. Only used in a corporate context. " ,schema=@Schema()) @RequestHeader(value="PSU-Corporate-ID-Type", required=false) String psUCorporateIDType, @Parameter(in = ParameterIn.HEADER, description = "The forwarded IP Address header field consists of the corresponding http request IP Address field between PSU and TPP. " ,schema=@Schema()) @RequestHeader(value="PSU-IP-Address", required=false) String psUIPAddress, @Parameter(in = ParameterIn.HEADER, description = "The forwarded IP Port header field consists of the corresponding HTTP request IP Port field between PSU and TPP, if available. " ,schema=@Schema()) @RequestHeader(value="PSU-IP-Port", required=false) String psUIPPort, @Parameter(in = ParameterIn.HEADER, description = "The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available. " ,schema=@Schema()) @RequestHeader(value="PSU-Accept", required=false) String psUAccept, @Parameter(in = ParameterIn.HEADER, description = "The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available. " ,schema=@Schema()) @RequestHeader(value="PSU-Accept-Charset", required=false) String psUAcceptCharset, @Parameter(in = ParameterIn.HEADER, description = "The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available. " ,schema=@Schema()) @RequestHeader(value="PSU-Accept-Encoding", required=false) String psUAcceptEncoding, @Parameter(in = ParameterIn.HEADER, description = "The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available. " ,schema=@Schema()) @RequestHeader(value="PSU-Accept-Language", required=false) String psUAcceptLanguage, @Parameter(in = ParameterIn.HEADER, description = "The forwarded Agent header field of the HTTP request between PSU and TPP, if available. " ,schema=@Schema()) @RequestHeader(value="PSU-User-Agent", required=false) String psUUserAgent, @Parameter(in = ParameterIn.HEADER, description = "HTTP method used at the PSU ? TPP interface, if available. Valid values are: * GET * POST * PUT * PATCH * DELETE " ,schema=@Schema(allowableValues={ "GET", "POST", "PUT", "PATCH", "DELETE" }
    )) @RequestHeader(value="PSU-Http-Method", required=false) String psUHttpMethod, @Parameter(in = ParameterIn.HEADER, description = "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 needs to be unaltered until removal from device. " ,schema=@Schema()) @RequestHeader(value="PSU-Device-ID", required=false) UUID psUDeviceID, @Parameter(in = ParameterIn.HEADER, description = "The forwarded Geo Location of the corresponding http request between PSU and TPP if available. " ,schema=@Schema()) @RequestHeader(value="PSU-Geo-Location", required=false) String psUGeoLocation, @Parameter(in = ParameterIn.DEFAULT, description = "", schema=@Schema()) @Valid @RequestBody(required=false) Object body ) {
        return updatePaymentCancellationPsuData(xRequestID, paymentService, paymentProduct, paymentId, authorisationId, body, digest, signature, tpPSignatureCertificate, PSU_ID, psUIDType, psUCorporateID, psUCorporateIDType, psUIPAddress, psUIPPort, psUAccept, psUAcceptCharset, psUAcceptEncoding, psUAcceptLanguage, psUUserAgent, psUHttpMethod, psUDeviceID, psUGeoLocation);
    }

    // Override this method
    default ResponseEntity<Object> updatePaymentCancellationPsuData(UUID xRequestID, String paymentService, String paymentProduct, String paymentId, String authorisationId, Object body, 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) {
        if (getObjectMapper().isPresent() && getAcceptHeader().isPresent()) {
        } else {
            log.warn("ObjectMapper or HttpServletRequest not configured in default PaymentInitiationServicePisApi interface so no example is generated");
        }
        return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
    }


    @Operation(summary = "Update PSU data for payment initiation", description = "This methods updates PSU data on the authorisation resource if needed.  It may authorise a payment 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.  There are several possible update PSU data requests in the context of payment initiation services 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 authorization method      WARNING: This method needs 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 needs a reduced header,      therefore many optional elements are not present.      Maybe in a later version the access path will change. ", security = {
        @SecurityRequirement(name = "BearerAuthOAuth")    }, tags={ "Payment Initiation Service (PIS)", "Common Services" })
    @ApiResponses(value = {
        @ApiResponse(responseCode = "200", description = "OK", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Object.class))),

        @ApiResponse(responseCode = "400", description = "Bad Request", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Error400NGPIS.class))),

        @ApiResponse(responseCode = "401", description = "Unauthorized", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Error401NGPIS.class))),

        @ApiResponse(responseCode = "403", description = "Forbidden", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Error403NGPIS.class))),

        @ApiResponse(responseCode = "404", description = "Not found", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Error404NGPIS.class))),

        @ApiResponse(responseCode = "405", description = "Method Not Allowed", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Error405NGPIS.class))),

        @ApiResponse(responseCode = "406", description = "Not Acceptable"),

        @ApiResponse(responseCode = "408", description = "Request Timeout"),

        @ApiResponse(responseCode = "409", description = "Conflict", content = @Content(mediaType = "application/json", schema = @Schema(implementation = Error409NGPIS.class))),

        @ApiResponse(responseCode = "415", description = "Unsupported Media Type"),

        @ApiResponse(responseCode = "429", description = "Too Many Requests"),

        @ApiResponse(responseCode = "500", description = "Internal Server Error"),

        @ApiResponse(responseCode = "503", description = "Service Unavailable") })
    @RequestMapping(value = "/v1/{payment-service}/{payment-product}/{paymentId}/authorisations/{authorisationId}",
        produces = { "application/json", "application/problem+json" },
        consumes = { "application/json" },
        method = RequestMethod.PUT)
    default ResponseEntity<Object> _updatePaymentPsuData(@Parameter(in = ParameterIn.HEADER, description = "ID of the request, unique to the call, as determined by the initiating party." ,required=true,schema=@Schema()) @RequestHeader(value="X-Request-ID", required=true) UUID xRequestID, @Parameter(in = ParameterIn.PATH, description = "Payment service:  Possible values are: * payments * bulk-payments * periodic-payments ", required=true, schema=@Schema(allowableValues={ "payments", "bulk-payments", "periodic-payments" }
    )) @PathVariable("payment-service") String paymentService, @Parameter(in = ParameterIn.PATH, description = "The addressed payment product endpoint, e.g. for SEPA Credit Transfers (SCT). The ASPSP will publish which of the payment products/endpoints will be supported.  The following payment products are supported:   - sepa-credit-transfers   - instant-sepa-credit-transfers   - target-2-payments   - cross-border-credit-transfers   - pain.001-sepa-credit-transfers   - pain.001-instant-sepa-credit-transfers   - pain.001-target-2-payments   - pain.001-cross-border-credit-transfers  **Remark:** For all SEPA Credit Transfer based endpoints which accept XML encoding,  the XML pain.001 schemes provided by EPC are supported by the ASPSP as a minimum for the body content.  Further XML schemes might be supported by some communities.  **Remark:** For cross-border and TARGET-2 payments only community wide pain.001 schemes do exist.  There are plenty of country specific scheme variants. ", required=true, schema=@Schema(allowableValues={ "sepa-credit-transfers", "instant-sepa-credit-transfers", "target-2-payments", "cross-border-credit-transfers", "pain.001-sepa-credit-transfers", "pain.001-instant-sepa-credit-transfers", "pain.001-target-2-payments", "pain.001-cross-border-credit-transfers" }
    )) @PathVariable("payment-product") String paymentProduct, @Parameter(in = ParameterIn.PATH, description = "Resource identification of the generated payment initiation resource.", required=true, schema=@Schema()) @PathVariable("paymentId") String paymentId, @Parameter(in = ParameterIn.PATH, description = "Resource identification of the related SCA.", required=true, schema=@Schema()) @PathVariable("authorisationId") String authorisationId, @Parameter(in = ParameterIn.HEADER, description = "Is contained if and only if the \"Signature\" element is contained in the header of the request." ,schema=@Schema()) @RequestHeader(value="Digest", required=false) String digest, @Parameter(in = ParameterIn.HEADER, description = "A signature of the request by the TPP on application level. This might be mandated by ASPSP. " ,schema=@Schema()) @RequestHeader(value="Signature", required=false) String signature, @Parameter(in = ParameterIn.HEADER, description = "The certificate used for signing the request, in base64 encoding.  Must be contained if a signature is contained. " ,schema=@Schema()) @RequestHeader(value="TPP-Signature-Certificate", required=false) byte[] tpPSignatureCertificate, @Parameter(in = ParameterIn.HEADER, description = "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. " ,schema=@Schema()) @RequestHeader(value="PSU-ID", required=false) String PSU_ID, @Parameter(in = ParameterIn.HEADER, description = "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. " ,schema=@Schema()) @RequestHeader(value="PSU-ID-Type", required=false) String psUIDType, @Parameter(in = ParameterIn.HEADER, description = "Might be mandated in the ASPSP's documentation. Only used in a corporate context. " ,schema=@Schema()) @RequestHeader(value="PSU-Corporate-ID", required=false) String psUCorporateID, @Parameter(in = ParameterIn.HEADER, description = "Might be mandated in the ASPSP's documentation. Only used in a corporate context. " ,schema=@Schema()) @RequestHeader(value="PSU-Corporate-ID-Type", required=false) String psUCorporateIDType, @Parameter(in = ParameterIn.HEADER, description = "The forwarded IP Address header field consists of the corresponding http request IP Address field between PSU and TPP. " ,schema=@Schema()) @RequestHeader(value="PSU-IP-Address", required=false) String psUIPAddress, @Parameter(in = ParameterIn.HEADER, description = "The forwarded IP Port header field consists of the corresponding HTTP request IP Port field between PSU and TPP, if available. " ,schema=@Schema()) @RequestHeader(value="PSU-IP-Port", required=false) String psUIPPort, @Parameter(in = ParameterIn.HEADER, description = "The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available. " ,schema=@Schema()) @RequestHeader(value="PSU-Accept", required=false) String psUAccept, @Parameter(in = ParameterIn.HEADER, description = "The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available. " ,schema=@Schema()) @RequestHeader(value="PSU-Accept-Charset", required=false) String psUAcceptCharset, @Parameter(in = ParameterIn.HEADER, description = "The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available. " ,schema=@Schema()) @RequestHeader(value="PSU-Accept-Encoding", required=false) String psUAcceptEncoding, @Parameter(in = ParameterIn.HEADER, description = "The forwarded IP Accept header fields consist of the corresponding HTTP request Accept header fields between PSU and TPP, if available. " ,schema=@Schema()) @RequestHeader(value="PSU-Accept-Language", required=false) String psUAcceptLanguage, @Parameter(in = ParameterIn.HEADER, description = "The forwarded Agent header field of the HTTP request between PSU and TPP, if available. " ,schema=@Schema()) @RequestHeader(value="PSU-User-Agent", required=false) String psUUserAgent, @Parameter(in = ParameterIn.HEADER, description = "HTTP method used at the PSU ? TPP interface, if available. Valid values are: * GET * POST * PUT * PATCH * DELETE " ,schema=@Schema(allowableValues={ "GET", "POST", "PUT", "PATCH", "DELETE" }
    )) @RequestHeader(value="PSU-Http-Method", required=false) String psUHttpMethod, @Parameter(in = ParameterIn.HEADER, description = "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 needs to be unaltered until removal from device. " ,schema=@Schema()) @RequestHeader(value="PSU-Device-ID", required=false) UUID psUDeviceID, @Parameter(in = ParameterIn.HEADER, description = "The forwarded Geo Location of the corresponding http request between PSU and TPP if available. " ,schema=@Schema()) @RequestHeader(value="PSU-Geo-Location", required=false) String psUGeoLocation, @Parameter(in = ParameterIn.DEFAULT, description = "", schema=@Schema()) @Valid @RequestBody(required=false) Object body ) {
        return updatePaymentPsuData(xRequestID, paymentService, paymentProduct, paymentId, authorisationId, body, digest, signature, tpPSignatureCertificate, PSU_ID, psUIDType, psUCorporateID, psUCorporateIDType, psUIPAddress, psUIPPort, psUAccept, psUAcceptCharset, psUAcceptEncoding, psUAcceptLanguage, psUUserAgent, psUHttpMethod, psUDeviceID, psUGeoLocation);
    }

    // Override this method
    default ResponseEntity<Object> updatePaymentPsuData(UUID xRequestID, String paymentService, String paymentProduct, String paymentId, String authorisationId, Object body, 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) {
        if (getObjectMapper().isPresent() && getAcceptHeader().isPresent()) {
        } else {
            log.warn("ObjectMapper or HttpServletRequest not configured in default PaymentInitiationServicePisApi interface so no example is generated");
        }
        return new ResponseEntity<>(HttpStatus.NOT_IMPLEMENTED);
    }
}
