<?php

namespace App\Classes\Modules\Orders\DataTransferObjects;


use Carbon\Carbon;

class StepObject
{

    /** @var string  */
    protected $referenceId;


    /** @var null|string  */
    protected $complete_date;

    /**
     * StepObject constructor.
     * @param string $referenceId
     * @param null|string $complete_date
     */
    public function __construct(string $referenceId, ?string $complete_date = null)
    {
        $this->referenceId = $referenceId;
        $this->complete_date = $complete_date;
    }

    /**
     * @return string
     */
    public function getReferenceId(): string
    {
        return $this->referenceId;
    }

    /**
     * @return Carbon
     */
    public function getCompleteDate(): Carbon
    {
            return $this->complete_date ? Carbon::parse($this->complete_date) : Carbon::now();
    }


}