<?php

declare (strict_types=1);
/*
 * PaypalServerSdkLib
 *
 * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ).
 */
namespace FormGent\PaypalServerSdkLib\Models\Builders;

use FormGent\Core\Utils\CoreHelper;
use FormGent\PaypalServerSdkLib\Models\SupplementaryPurchaseData;
/**
 * Builder for model SupplementaryPurchaseData
 *
 * @see SupplementaryPurchaseData
 */
class SupplementaryPurchaseDataBuilder
{
    /**
     * @var SupplementaryPurchaseData
     */
    private $instance;
    private function __construct(SupplementaryPurchaseData $instance)
    {
        $this->instance = $instance;
    }
    /**
     * Initializes a new Supplementary Purchase Data Builder object.
     */
    public static function init() : self
    {
        return new self(new SupplementaryPurchaseData());
    }
    /**
     * Sets invoice id field.
     *
     * @param string|null $value
     */
    public function invoiceId(?string $value) : self
    {
        $this->instance->setInvoiceId($value);
        return $this;
    }
    /**
     * Sets note to payer field.
     *
     * @param string|null $value
     */
    public function noteToPayer(?string $value) : self
    {
        $this->instance->setNoteToPayer($value);
        return $this;
    }
    /**
     * Initializes a new Supplementary Purchase Data object.
     */
    public function build() : SupplementaryPurchaseData
    {
        return CoreHelper::clone($this->instance);
    }
}
