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

/**
 * Builder for model NetworkTransactionReference
 *
 * @see NetworkTransactionReference
 */
class NetworkTransactionReferenceBuilder
{
    /**
     * @var NetworkTransactionReference
     */
    private $instance;

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

    /**
     * Initializes a new network transaction reference Builder object.
     */
    public static function init(string $id): self
    {
        return new self(new NetworkTransactionReference($id));
    }

    /**
     * Sets date field.
     */
    public function date(?string $value): self
    {
        $this->instance->setDate($value);
        return $this;
    }

    /**
     * Sets network field.
     */
    public function network(?string $value): self
    {
        $this->instance->setNetwork($value);
        return $this;
    }

    /**
     * Sets acquirer reference number field.
     */
    public function acquirerReferenceNumber(?string $value): self
    {
        $this->instance->setAcquirerReferenceNumber($value);
        return $this;
    }

    /**
     * Initializes a new network transaction reference object.
     */
    public function build(): NetworkTransactionReference
    {
        return CoreHelper::clone($this->instance);
    }
}
