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

/**
 * Builder for model SellerProtection
 *
 * @see SellerProtection
 */
class SellerProtectionBuilder
{
    /**
     * @var SellerProtection
     */
    private $instance;

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

    /**
     * Initializes a new Seller Protection Builder object.
     */
    public static function init(): self
    {
        return new self(new SellerProtection());
    }

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

    /**
     * Sets dispute categories field.
     *
     * @param string[]|null $value
     */
    public function disputeCategories(?array $value): self
    {
        $this->instance->setDisputeCategories($value);
        return $this;
    }

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