<?php

namespace App\Classes\Modules\Orders\Services;

use App\Classes\General\Eloquent\AbstractUpdateRecord;
use App\Models\Address;

class UpdatesOrdersAddress extends AbstractUpdateRecord
{
    /**
     * @param Address $address
     * @param int $type
     * @return \Illuminate\Database\Eloquent\Model
     * @throws \App\Classes\Exceptions\MalformedRequestException
     */
    public function execute(Address $address, int $type)
    {
        $address->status = $type;
        return $this->handler($address);
    }
}
