<?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\SubscriptionPricingScheme;
use PaypalServerSdkLib\Models\UpdatePricingScheme;

/**
 * Builder for model UpdatePricingScheme
 *
 * @see UpdatePricingScheme
 */
class UpdatePricingSchemeBuilder
{
    /**
     * @var UpdatePricingScheme
     */
    private $instance;

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

    /**
     * Initializes a new Update Pricing Scheme Builder object.
     *
     * @param int $billingCycleSequence
     * @param SubscriptionPricingScheme $pricingScheme
     */
    public static function init(int $billingCycleSequence, SubscriptionPricingScheme $pricingScheme): self
    {
        return new self(new UpdatePricingScheme($billingCycleSequence, $pricingScheme));
    }

    /**
     * Initializes a new Update Pricing Scheme object.
     */
    public function build(): UpdatePricingScheme
    {
        return CoreHelper::clone($this->instance);
    }
}
