<?php

namespace Sibs\Stargate\Constants;

defined('ABSPATH') || exit;

class PaymentStatus implements ConstantsInterface
{
    public const INIT = 'Init';
    public const SUCCESS = 'Success';
    public const PARTIAL = 'Partial';
    public const IN_PROCESSING = 'InProcessing';
    public const PENDING = 'Pending';
    public const DECLINED = 'Declined';
    public const TIMEOUT = 'Timeout';
    public const ERROR = 'Error';

    /**
     * All.
     */
    public static function all(): array
    {
        return [
            self::SUCCESS,
            self::PARTIAL,
            self::IN_PROCESSING,
            self::PENDING,
            self::DECLINED,
            self::TIMEOUT,
            self::ERROR,
        ];
    }

    /**
     * Default.
     */
    public static function default(): string
    {
        return self::INIT;
    }

    /**
     * Success Statuses.
     */
    public static function success(): array
    {
        return [
            self::SUCCESS,
            self::PARTIAL,
        ];
    }

    /**
     * Pending Statuses.
     */
    public static function pending(): array
    {
        return [
            self::IN_PROCESSING,
            self::PENDING,
        ];
    }

    /**
     * Error Statuses.
     */
    public static function error(): array
    {
        return [
            self::DECLINED,
            self::TIMEOUT,
            self::ERROR,
        ];
    }
}
