public function fetchMessages()
    {
        $messages = $this->client->get("inboxes/{$this->config['inbox_id']}/messages")->getBody();

        if ($messages instanceof Stream) {
            $messages = $messages->getContents();
        }

        $messages = json_decode($messages, true);

        foreach ($messages as $key => $message) {
            $messages[$key] = new MailtrapMessage($message, $this->client);
        }

        return $messages;
    }