<?php

/**
 * Model for article account codes.
 *
 * @package northmill-shared-online
 */
declare (strict_types=1);
namespace Northmill_Online_Shared_Checkout\Northmill_Online_Shared\Abstracts\Hub_API\Hub_Accounts\Models;

use JsonSerializable;
use Northmill_Online_Shared_Checkout\Northmill_Online_Shared\Abstracts\Data_Model;
defined('ABSPATH') || exit;
/**
 * Class Article_Account_Code_Model
 */
class Article_Account_Code_Model extends Data_Model implements JsonSerializable
{
    /**
     * Flo ID of the account code.
     *
     * @var string
     */
    protected string $id;
    /**
     * Name of the account code.
     *
     * @var string
     */
    protected string $name;
    /**
     * Slug account code, used by WooCommerce.
     *
     * @var string
     */
    protected string $slug;
    /**
     * Description of the account code.
     *
     * @var string
     */
    protected string $description;
    /**
     * VAT rate of the account code.
     *
     * @var float
     */
    protected float $vat_rate;
    /**
     * Account code.
     *
     * @var int
     */
    protected int $account_code;
    /**
     * Cost center.
     *
     * @var string
     */
    protected string $cost_center;
    /**
     * Project.
     *
     * @var string
     */
    protected string $project;
    /**
     * Get the ID of the account code.
     *
     * @return string
     */
    public function get_id(): string
    {
        return $this->id ?? '';
    }
    /**
     * Set the ID of the account code.
     *
     * @param string $id ID of the account code.
     *
     * @return void
     */
    public function set_id(string $id): void
    {
        $this->id = $id;
    }
    /**
     * Get the name of the account code.
     *
     * @return string
     */
    public function get_name(): string
    {
        return $this->name;
    }
    /**
     * Set the name of the account code.
     *
     * @param string $name Name of the account code.
     *
     * @return void
     */
    public function set_name(string $name): void
    {
        $this->name = $name;
    }
    /**
     * Get the slug of the account code.
     *
     * @return string
     */
    public function get_slug(): string
    {
        return $this->slug;
    }
    /**
     * Set the slug of the account code.
     *
     * @param string $slug Slug of the account code.
     *
     * @return void
     */
    public function set_slug(string $slug): void
    {
        $this->slug = $slug;
    }
    /**
     * Get the description of the account code.
     *
     * @return string
     */
    public function get_description(): string
    {
        return $this->description;
    }
    /**
     * Set the description of the account code.
     *
     * @param string $description Description of the account code.
     *
     * @return void
     */
    public function set_description(string $description): void
    {
        $this->description = $description;
    }
    /**
     * Get the account code vat rate.
     *
     * @return ?float
     */
    public function get_vat_rate(): ?float
    {
        return $this->vat_rate ?? null;
    }
    /**
     * Set the account code vat rate.
     *
     * @param ?float $vat_rate Account code vat rate.
     *
     * @return void
     */
    public function set_vat_rate(?float $vat_rate): void
    {
        $this->vat_rate = $vat_rate;
    }
    /**
     * Get the account code.
     *
     * @return ?int
     */
    public function get_account_code(): ?int
    {
        return $this->account_code ?? null;
    }
    /**
     * Set the account code.
     *
     * @param ?int $account_code Account code.
     *
     * @return void
     */
    public function set_account_code(?int $account_code): void
    {
        $this->account_code = $account_code;
    }
    /**
     * Get the cost center.
     *
     * @return string
     */
    public function get_cost_center(): string
    {
        return $this->cost_center ?? '';
    }
    /**
     * Set the cost center.
     *
     * @param string $cost_center Cost center.
     *
     * @return void
     */
    public function set_cost_center(string $cost_center): void
    {
        $this->cost_center = $cost_center;
    }
    /**
     * Get the project.
     *
     * @return string
     */
    public function get_project(): string
    {
        return $this->project ?? '';
    }
    /**
     * Set the project.
     *
     * @param string $project Project.
     *
     * @return void
     */
    public function set_project(string $project): void
    {
        $this->project = $project;
    }
    /**
     * Get data for json serialization.
     */
    public function jsonSerialize(): array
    {
        return array('id' => $this->get_id(), 'name' => $this->get_name(), 'slug' => $this->get_slug(), 'description' => $this->get_description(), 'vat_rate' => $this->get_vat_rate(), 'account_code' => $this->get_account_code(), 'cost_center' => $this->get_cost_center(), 'project' => $this->get_project());
    }
}
