public function prepare(string $method, array $parameters)
    {
        // Delete any empty key
        $parameters = $this->deleteEmptyKeys($parameters);

        // Add the API Key
        $parameters['apiKey'] = $this->flow->getCredentials()->apiKey;

        // Sort the parameters
        ksort($parameters);

        // Return the final data
        switch ($method) {
            case 'get':
                return $this->prepareGet($parameters);
            case 'post':
                return $this->preparePost($parameters);
            default:
                return null;
        }
    }
public function prepare(string $method, array $parameters)
    {
        // Delete any empty key
        $parameters = $this->deleteEmptyKeys($parameters);

        // Add the API Key
        $parameters['apiKey'] = $this->flow->getCredentials()->apiKey;

        // Sort the parameters
        ksort($parameters);

        // Return the final data
        switch ($method) {
            case 'get':
                return $this->prepareGet($parameters);
            case 'post':
                return $this->preparePost($parameters);
            default:
                return null;
        }
    }
public function prepare ( string $ method , array $ parameters ) { // Delete any empty key $ parameters = $ this -> deleteEmptyKeys ( $ parameters ) ; // Add the API Key $ parameters [ 'apiKey' ] = $ this -> flow -> getCredentials ( ) -> apiKey ; // Sort the parameters ksort ( $ parameters ) ; // Return the final data switch ( $ method ) { case 'get' : return $ this -> prepareGet ( $ parameters ) ; case 'post' : return $ this -> preparePost ( $ parameters ) ; default : return null ; } }
Prepare the data

@param string $method
@param array $parameters
@return array|string
Prepare the data