<?php


namespace Fabs\Rest\Models;


use Fabs\Serialize\SerializableObject;

class ErrorModel extends SerializableObject
{

    /** @var string */
    public $status = null;
    /** @var string */
    public $error_message = null;
    /** @var null|SerializableObject */
    public $error_details = null;


    public function __construct()
    {
        parent::__construct();

        $this->addRenderIfNotNullCondition('error_details');
    }
}
<?php


namespace Fabs\Rest\Models;


use Fabs\Serialize\SerializableObject;

class ErrorResponseModel extends ResponseModel
{

    /** @deprecated
     *  @var string
     */
    public $error = null;
    /** @deprecated
     *  @var array|null
     */
    public $error_list = null;

    /** @var string */
    public $error_message = null;
    /** @var null|SerializableObject */
    public $error_details = null;


    public function __construct()
    {
        parent::__construct();

        $this->addRenderIfNotNullCondition('error');
        $this->addRenderIfNotNullCondition('error_list');
        $this->addRenderIfNotNullCondition('error_message');
        $this->addRenderIfNotNullCondition('error_details');
    }
}
ADD deprecated fields error and error_list to provide backwards compatibility
ADD deprecated fields error and error_list to provide backwards compatibility
