code: public function api($name)
      {
          switch ($name) {
              case 'cards':
                  $api = new Api\Cards($this);
                  break;
              default;
                  throw new \InvalidArgumentException(sprintf('Undefined api instance called: "%s"', $name));
          }
  
          return $api;
      }
docs: @param $name
  
  @return Api\Cards