<?php

namespace SugarCalendarBookings\Payments\Gateways;

use SugarCalendarBookings\Plugin;

/**
 * Class AbstractPaymentGateway.
 *
 * @since 1.0.0
 */
abstract class AbstractPaymentGateway {

	/**
	 * Gateway ID.
	 *
	 * @since 1.0.0
	 *
	 * @var string
	 */
	const ID = '';

	/**
	 * Get gateway ID.
	 *
	 * @since 1.0.0
	 *
	 * @return string
	 */
	public static function get_id() {

		return static::ID;
	}

	/**
	 * Get gateway name.
	 *
	 * @since 1.0.0
	 *
	 * @return string
	 */
	public static function get_name() {

		return '';
	}

	/**
	 * Whether gateway is recommended in dashboard.
	 *
	 * @since 1.0.0
	 *
	 * @return bool
	 */
	public static function is_recommended() {

		return false;
	}

	/**
	 * Whether gateway is configured.
	 *
	 * @since 1.0.0
	 *
	 * @return bool
	 */
	public function is_configured() {

		return true;
	}

	/**
	 * Get credentials.
	 *
	 * @since 1.0.0
	 *
	 * @return array
	 */
	public function get_credentials() {

		return [];
	}

	/**
	 * Get gateway settings instance.
	 *
	 * @since 1.0.0
	 *
	 * @return BasePaymentGatewaySettings
	 */
	public function get_settings() {

		return Plugin::get( BasePaymentGatewaySettings::class );
	}

	/**
	 * Get payment processor instance.
	 *
	 * @since 1.0.0
	 *
	 * @return AbstractPaymentProcessor
	 */
	abstract public function get_processor();
}
