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

/**
 * Builder for model CancelSubscriptionRequest
 *
 * @see CancelSubscriptionRequest
 */
class CancelSubscriptionRequestBuilder
{
    /**
     * @var CancelSubscriptionRequest
     */
    private $instance;

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

    /**
     * Initializes a new Cancel Subscription Request Builder object.
     *
     * @param string $reason
     */
    public static function init(string $reason): self
    {
        return new self(new CancelSubscriptionRequest($reason));
    }

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