Viewing File: /usr/local/cpanel/whostmgr/docroot/cgi/ncssl/source/src/Traits/RequestBodyCreatorTrait.php

<?php

namespace App\Traits;

use App\Service\NcGatewayApi\Caller;

trait RequestBodyCreatorTrait
{

    /**
     * Create request for API protocol
     *
     * @param string $method
     * @param array $parameters
     *
     * @return array
     */
    private function createRequest(string $method, array $parameters = []): array
    {
        return [
            'version' => Caller::PROTOCOL_VERSION,
            'method'  => $method,
            'params'  => $parameters,
            'auth'    => $this->getRequestAuthParameter(),
        ];
    }

    /**
     * @return string[]
     */
    private function getRequestAuthParameter(): array
    {
        return [];
    }
}
Back to Directory File Manager