code: public function ipGetVersion($id, $ip)
      {
          if (!$id)
              throw new BadMethodCallException('Missing parameter $id.');
          if (!$ip)
              throw new BadMethodCallException('Missing parameter $ip.');
          return json_decode($this->getIpProperties($id, $ip))->version;
      }
docs: Return IP version (ipv4 | ipv6)
  
  @param $id
  @param $ip
  @return mixed
  @throws \Ovh\Common\Exception\BadMethodCallException