<?php

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

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

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

class ZaslatOrderDetailsSenderEntity extends AbstractOrderDetailsSenderEntity
{
    public ?string $externalId;
    public ?string $bankCode;
    public ?string $additionalBankAccountNumber;

    public static function fromArray(array $data): static
    {
        $self = parent::fromArray($data);
        $self->externalId = $data['external_id'] ?? null;
        $self->bankCode = $data['bank_code'] ?? null;
        $self->additionalBankAccountNumber = $data['additional_bank_account_number'] ?? null;
        return $self;
    }
}
