public function setType($type)
    {
        if (! Type::isValidWebhookType($type)) {
            throw new \Exception(sprintf('The action "%s" isn\'t supported!', $type));
        }

        $this->type = $type;

        return $this;
    }
public function setType($type)
    {
        if (! Type::isValidWebhookType($type)) {
            throw new \Exception(sprintf('The action "%s" isn\'t supported!', $type));
        }

        $this->type = $type;

        return $this;
    }
@param string $type

@return Payload
@throws \Exception