public function withResourceOwnerVersion($resourceOwnerVersion)
    {
        $resourceOwnerVersion = (int) $resourceOwnerVersion;

        if (in_array($resourceOwnerVersion, [1, 2])) {
            $this->resourceOwnerVersion = $resourceOwnerVersion;
        }

        return $this;
    }