public function setOptions(array $options)
    {
        foreach ($options as $option => $config) {
            if (! (bool) preg_match("/^[0-9A-Za-z_]+$/", $option))
                // invalid option format
                throw new InvalidArgumentException("Invalid option name provided to evias\\NEMBlockchain\\API@setOptions: " . var_export($option, true));

            $upper  = str_replace(" ", "", ucwords(str_replace("_", " ", $option)));
            $setter = "set" . $upper;

            if (method_exists($this, $setter))
                $this->$setter($config);
            elseif (method_exists($this->getRequestHandler(), $setter))
                $this->getRequestHandler()->$setter($config);
        }

        return $this;
    }