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

/**
 * Builder for model ActivateSubscriptionRequest
 *
 * @see ActivateSubscriptionRequest
 */
class ActivateSubscriptionRequestBuilder
{
    /**
     * @var ActivateSubscriptionRequest
     */
    private $instance;

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

    /**
     * Initializes a new Activate Subscription Request Builder object.
     */
    public static function init(): self
    {
        return new self(new ActivateSubscriptionRequest());
    }

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

    /**
     * Initializes a new Activate Subscription Request object.
     */
    public function build(): ActivateSubscriptionRequest
    {
        return CoreHelper::clone($this->instance);
    }
}
