<?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\ParticipantMetadata;
use PaypalServerSdkLib\Models\RiskSupplementaryData;

/**
 * Builder for model RiskSupplementaryData
 *
 * @see RiskSupplementaryData
 */
class RiskSupplementaryDataBuilder
{
    /**
     * @var RiskSupplementaryData
     */
    private $instance;

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

    /**
     * Initializes a new Risk Supplementary Data Builder object.
     */
    public static function init(): self
    {
        return new self(new RiskSupplementaryData());
    }

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

    /**
     * Initializes a new Risk Supplementary Data object.
     */
    public function build(): RiskSupplementaryData
    {
        return CoreHelper::clone($this->instance);
    }
}
