public function setVersion(string $version)
    {
        if (!preg_match(self::VERSION_PATTERN, $version)) {
            // Invalid version string
            throw new Exception('Version string must be of YYYY-MM or unstable');
        }

        $this->version = $version;

        return $this;
    }
public function setVersion(string $version)
    {
        if (!preg_match(self::VERSION_PATTERN, $version)) {
            // Invalid version string
            throw new Exception('Version string must be of YYYY-MM or unstable');
        }

        $this->version = $version;

        return $this;
    }
public function setVersion ( string $ version ) { if ( ! preg_match ( self :: VERSION_PATTERN , $ version ) ) { // Invalid version string throw new Exception ( 'Version string must be of YYYY-MM or unstable' ) ; } $ this -> version = $ version ; return $ this ; }
Sets the version of Shopify API to use.

@param string $version

@return self
Sets the version of Shopify API to use .