protected function includeAttachments($raw)
    {
        $attachments = [];

        foreach ($this->attachments as $attachment => $refinery) {
            if (isset($refinery['raw'])) {
                $attachments[$attachment] = $refinery['raw']($raw);
            } else {
                $class = $refinery['class'];
                $callback = $refinery['callback'];

                if ( ! $callback) {
                    $items = $this->getItems($raw, $class, $attachment);
                } else {
                    $items = $this->getItemsUsingCallback($raw, $class, $callback);
                }

                $attachments[$attachment] = ! is_null($items) ? $class->refine($items) : null;
            }
        }

        return $attachments;
    }