<?php

namespace App\Classes\Modules\Addresses\Services;

use App\Classes\General\Eloquent\AbstractUpdateRecord;
use App\Classes\Modules\Addresses\DataTransferObjects\AddressObject;
use App\Models\Address;

class SetsAddressDefault extends AbstractUpdateRecord
{

    /**
     * @param Address $model
     * @return void
     * @throws \App\Classes\Exceptions\MalformedRequestException
     */
    public function execute(Address $model) {
        $model->default = true;
        $model->billing = true;

        $this->handler($model);

    }
}