protected function makePayload($data)
    {
        if ($this->isNotSetOrEmpty($data)) {
            return $this;
        }

        switch ($this->payload['type']) {
            case ButtonType::WEB_URL:
                $this->url($data);
                break;
            case ButtonType::PHONE_NUMBER:
                $this->phone($data);
                break;
            case ButtonType::POSTBACK:
                $this->postback($data);
                break;
        }

        if (isset($this->payload['payload']) && mb_strlen($this->payload['payload']) > 1000) {
            throw CouldNotCreateButton::payloadLimitExceeded($this->payload['payload']);
        }

        return $this;
    }