protected function getApiInstance($method) { $class = "\\Cartalyst\\Stripe\\Api\\" . ucwords($method); if (class_exists($class)) { return new $class($this->config); } throw new \BadMethodCallException("Undefined method [{$method}] called."); }