<?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\TaxInfo;

/**
 * Builder for model TaxInfo
 *
 * @see TaxInfo
 */
class TaxInfoBuilder
{
    /**
     * @var TaxInfo
     */
    private $instance;

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

    /**
     * Initializes a new tax info Builder object.
     */
    public static function init(string $taxId, string $taxIdType): self
    {
        return new self(new TaxInfo($taxId, $taxIdType));
    }

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