<?php

namespace App\Classes\Modules\Addresses\Services;


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

class UpdatesAddressMetadata extends AbstractUpdateRecord
{
    /**
     * @param Address $model
     * @param bool $billing
     * @param bool $eInvoice
     * @return \Illuminate\Database\Eloquent\Model
     * @throws \App\Classes\Exceptions\MalformedRequestException
     */
    public function execute(Address $model, bool $billing, bool $eInvoice) {

        $model->billing = $billing;
        $model->e_invoice = $eInvoice;

        return $this->handler($model);
    }
}
