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

/**
 * Builder for model RelatedIdentifiers
 *
 * @see RelatedIdentifiers
 */
class RelatedIdentifiersBuilder
{
    /**
     * @var RelatedIdentifiers
     */
    private $instance;

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

    /**
     * Initializes a new Related Identifiers Builder object.
     */
    public static function init(): self
    {
        return new self(new RelatedIdentifiers());
    }

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

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

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

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