<?php
/**
 * Abstract response class.
 *
 * @package flo-checkout
 */

namespace Flo_Checkout\Gateways\Shift4_APM\Responses;

use Exception;
use Flo_Checkout\Gateways\Shift4_APM\Abstract_APM_Gateway;
use Flo_Checkout\Gateways\Shift4_APM\Requests\Models\Gateway_Request_Response_Model;
use Flo_Checkout\Gateways\Shift4_APM\Traits\Gateway_Request_And_Response_Logger_Trait;
use WC_Order;

defined( 'ABSPATH' ) || exit;

/**
 * Abstract response class.
 */
abstract class Abstract_Response_Gateway extends Abstract_Response {
	use Gateway_Request_And_Response_Logger_Trait;

	/**
	 * Constructor.
	 *
	 * @param Abstract_APM_Gateway           $gateway                        The gateway instance.
	 * @param Gateway_Request_Response_Model $gateway_request_response_model The response from the request.
	 * @param WC_Order|null                  $order                          Order object.
	 */
	public function __construct(
		protected Abstract_APM_Gateway $gateway,
		protected Gateway_Request_Response_Model $gateway_request_response_model,
		protected ?WC_Order $order
	) {
		parent::__construct(
			$gateway_request_response_model,
		);
	}
}
