<?php

namespace Opencart\Extension\Alsendo\DTO\Entity\Ecolet;

require_once(DIR_EXTENSION . 'alsendo/src/DTO/Entity/AbstractOrderDetailsShippingAddressEntity.php');

use Opencart\Extension\Alsendo\DTO\Entity\AbstractOrderDetailsShippingAddressEntity;

class EcoletOrderDetailsShippingAddressEntity extends AbstractOrderDetailsShippingAddressEntity
{
    public ?string $block;
    public ?string $entrance;
    public ?string $floor;

    public static function fromArray(array $data): static
    {
        $self = parent::fromArray($data);
        $self->block = $data['block'] ?? null;
        $self->entrance = $data['entrance'] ?? null;
        $self->floor = $data['floor'] ?? null;

        return $self;
    }
}
