<?php

/*
 * This file was automatically generated.
 */
namespace Syde\Vendor\Cawl\OnlinePayments\Sdk\Domain;

use UnexpectedValueException;
/**
 * @package OnlinePayments\Sdk\Domain
 */
class MandateRedirectData extends DataObject
{
    /**
     * @var string|null
     */
    public ?string $RETURNMAC = null;
    /**
     * @var string|null
     */
    public ?string $redirectURL = null;
    /**
     * @return string|null
     */
    public function getRETURNMAC() : ?string
    {
        return $this->RETURNMAC;
    }
    /**
     * @param string|null $value
     */
    public function setRETURNMAC(?string $value) : void
    {
        $this->RETURNMAC = $value;
    }
    /**
     * @return string|null
     */
    public function getRedirectURL() : ?string
    {
        return $this->redirectURL;
    }
    /**
     * @param string|null $value
     */
    public function setRedirectURL(?string $value) : void
    {
        $this->redirectURL = $value;
    }
    /**
     * @return object
     */
    public function toObject() : object
    {
        $object = parent::toObject();
        if (!\is_null($this->RETURNMAC)) {
            $object->RETURNMAC = $this->RETURNMAC;
        }
        if (!\is_null($this->redirectURL)) {
            $object->redirectURL = $this->redirectURL;
        }
        return $object;
    }
    /**
     * @param object $object
     * @return $this
     * @throws UnexpectedValueException
     */
    public function fromObject(object $object) : MandateRedirectData
    {
        parent::fromObject($object);
        if (\property_exists($object, 'RETURNMAC')) {
            $this->RETURNMAC = $object->RETURNMAC;
        }
        if (\property_exists($object, 'redirectURL')) {
            $this->redirectURL = $object->redirectURL;
        }
        return $this;
    }
}
