<?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\IncentiveDetails;
use PaypalServerSdkLib\Models\IncentiveInformation;

/**
 * Builder for model IncentiveInformation
 *
 * @see IncentiveInformation
 */
class IncentiveInformationBuilder
{
    /**
     * @var IncentiveInformation
     */
    private $instance;

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

    /**
     * Initializes a new Incentive Information Builder object.
     */
    public static function init(): self
    {
        return new self(new IncentiveInformation());
    }

    /**
     * Sets incentive details field.
     *
     * @param IncentiveDetails[]|null $value
     */
    public function incentiveDetails(?array $value): self
    {
        $this->instance->setIncentiveDetails($value);
        return $this;
    }

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