<?php

namespace Sibs\Stargate\Dto;

class ReturnStatusDto extends AbstractDto
{
    /** @var string */
    public $statusMsg;

    /** @var string */
    public $statusCode;

    /**
     * Constructor.
     */
    public function __construct(string $statusMsg, string $statusCode)
    {
        $this->statusMsg = $statusMsg;
        $this->statusCode = $statusCode;
    }

    /**
     * From Array.
     */
    public static function fromArray(array $data): self
    {
        return new self(
            $data['statusMsg'] ?? '',
            $data['statusCode'] ?? ''
        );
    }
}
