<?php

namespace KupShop\GTMBundle\Ecommerce;

class AddDeliveryInfo extends AbstractEcommerce
{
    /**
     * Specific PageData.
     *
     * @throws \Exception
     */
    public function getData(&$dataContainer)
    {
        /** @var \Delivery $delivery */
        $delivery = $this->pageData['delivery'];

        $dataContainer->event = 'addDeliveryInfo';
        $dataContainer->addDeliveryInfo = new \stdClass();
        $dataContainer->addDeliveryInfo->deliveryType = $delivery->getClassName() ?? '';
    }
}
