src/Response/Card.php
public function toArray()
    {
        $cardAsArray = [];

        //todo: as of now, only *type* is required but this seems likely to change
        $cardAsArray['type'] = $this->type;

        $this->addAttributeToArray('title', $cardAsArray);
        $this->addAttributeToArray('subtitle', $cardAsArray);

        if ($this->isSimpleCard()) {
            $this->addAttributeToArray('content', $cardAsArray);
        }

        if ($this->isStandardCard()) {
            $this->addAttributeToArray('text', $cardAsArray);
            $this->addAttributeToArray('image', $cardAsArray);
        }

        return $cardAsArray;
    }
public function toArray()
    {
        $cardAsArray = [];

        //todo: as of now, only *type* is required but this seems likely to change
        $cardAsArray['type'] = $this->type;

        $this->addAttributeToArray('title', $cardAsArray);
        $this->addAttributeToArray('subtitle', $cardAsArray);

        if ($this->isSimpleCard()) {
            $this->addAttributeToArray('content', $cardAsArray);
        }

        if ($this->isStandardCard()) {
            $this->addAttributeToArray('text', $cardAsArray);
            $this->addAttributeToArray('image', $cardAsArray);
        }

        return $cardAsArray;
    }
Get the instance as an array.

@return array