public function getLocation($output = '')
    {
        $attachments = $this->getAttachments();

        $location = new \stdClass();

        if (!empty($attachments) && isset($attachments[0]['type']) && $attachments[0]['type'] === 'location') {
            $location = $attachments[0]['payload']->coordinates;
        }

        if (!empty($output)) {
            return $location->$output;
        }

        return $location;
    }