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

/**
 * Builder for model BLIKOneClickPaymentObject
 *
 * @see BLIKOneClickPaymentObject
 */
class BLIKOneClickPaymentObjectBuilder
{
    /**
     * @var BLIKOneClickPaymentObject
     */
    private $instance;

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

    /**
     * Initializes a new blikone click payment object Builder object.
     */
    public static function init(): self
    {
        return new self(new BLIKOneClickPaymentObject());
    }

    /**
     * Sets consumer reference field.
     */
    public function consumerReference(?string $value): self
    {
        $this->instance->setConsumerReference($value);
        return $this;
    }

    /**
     * Initializes a new blikone click payment object object.
     */
    public function build(): BLIKOneClickPaymentObject
    {
        return CoreHelper::clone($this->instance);
    }
}
