<?php
/**
 * Shift4 3DS notification route.
 *
 * @package flo-checkout
 */

namespace Flo_Checkout\Gateways\Credorax\REST_Routes;

use Northmill_Online_Shared_Checkout\Northmill_Online_Shared\Abstracts\REST\Abstract_API;
use Northmill_Online_Shared_Checkout\Northmill_Online_Shared\Abstracts\REST\Abstract_Route;
use WP_Error;
use WP_REST_Request;
use WP_REST_Response;

/**
 * Shift4 3DS notification route class.
 */
class Shift4_3DS_Notification extends Abstract_Route {

	/**
	 * Class constructor.
	 *
	 * @param Abstract_API $api The API instance.
	 */
	public function __construct( Abstract_API $api ) {
		parent::__construct( $api, 'shift4/3ds-notification', array( 'POST' ) );
	}

	/**
	 * {@inheritDoc}
	 */
	public function post( WP_REST_Request $request ): WP_Error|WP_REST_Response {
		return $this->process_response( true );
	}

	/**
	 * {@inheritDoc}
	 */
	public function post_permission_check(): bool {
		return true;
	}

	/**
	 * {@inheritDoc}
	 */
	protected function default_args(): array {
		return array();
	}

	/**
	 * {@inheritDoc}
	 */
	protected static function get_schema_properties(): array {
		return array();
	}
}
