<?php

namespace Twnt4All\Rest;

if ( ! defined( 'ABSPATH' ) ) { exit; }

/**
 * No-op stub. The wallet/REST integration that used to talk to an external
 * pay4all.ch API endpoint has been removed for the WordPress.org release
 * (guidelines 4 and 6). Every legacy caller that was tied to twnt-mode
 * (AdminAjax setup-wizard steps, alias status, capture/cancel proxies)
 * now hits this stub, which reports "not available" without contacting any
 * external service.
 *
 * Direct-SOAP callers do not use this class ; they hit the TWINT merchant
 * endpoints via `\Twnt4All\Engine\Soap\TwintSoapClient` instead.
 */
class RestRouter
{
    public function __construct( $api_token = null ) {}

    private function unavailable() : array
    {
        return [
            'status'  => false,
            'message' => 'The wallet/REST integration is not available in the WordPress.org release.',
        ];
    }

    public function get_stores()            { return $this->unavailable(); }
    public function connect()               { return $this->unavailable(); }
    public function is_service_active()     { return $this->unavailable(); }
    public function payment_init( $data )   { return $this->unavailable(); }
    public function alias_payment( $data )  { return $this->unavailable(); }
    public function is_alias_active( $data ){ return $this->unavailable(); }
    public function cancel_registration( $data ) { return $this->unavailable(); }
    public function capture_transaction( $transaction_id ) { return $this->unavailable(); }
    public function refund_transaction( $transaction_id, $amount = null, $currency = null ) { return $this->unavailable(); }
    public function cancel_transaction( $transaction_id ) { return $this->unavailable(); }
    public function get_transaction_status( $transaction_id ) { return $this->unavailable(); }
    public function get_transaction( $transaction_id ) { return null; }
}
