<?php

declare(strict_types=1);

/*
 * PaypalServerSdkLib
 *
 * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ).
 */

namespace PaypalServerSdkLib\Models\Builders;

use Core\Utils\CoreHelper;
use PaypalServerSdkLib\Models\TaxesOverride;

/**
 * Builder for model TaxesOverride
 *
 * @see TaxesOverride
 */
class TaxesOverrideBuilder
{
    /**
     * @var TaxesOverride
     */
    private $instance;

    private function __construct(TaxesOverride $instance)
    {
        $this->instance = $instance;
    }

    /**
     * Initializes a new Taxes Override Builder object.
     */
    public static function init(): self
    {
        return new self(new TaxesOverride());
    }

    /**
     * Sets percentage field.
     *
     * @param string|null $value
     */
    public function percentage(?string $value): self
    {
        $this->instance->setPercentage($value);
        return $this;
    }

    /**
     * Sets inclusive field.
     *
     * @param bool|null $value
     */
    public function inclusive(?bool $value): self
    {
        $this->instance->setInclusive($value);
        return $this;
    }

    /**
     * Initializes a new Taxes Override object.
     */
    public function build(): TaxesOverride
    {
        return CoreHelper::clone($this->instance);
    }
}
