<?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\PayPalWalletAttributes;
use PaypalServerSDKLib\Models\PayPalWalletCustomerRequest;
use PaypalServerSDKLib\Models\PayPalWalletVaultInstruction;

/**
 * Builder for model PayPalWalletAttributes
 *
 * @see PayPalWalletAttributes
 */
class PayPalWalletAttributesBuilder
{
    /**
     * @var PayPalWalletAttributes
     */
    private $instance;

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

    /**
     * Initializes a new pay pal wallet attributes Builder object.
     */
    public static function init(): self
    {
        return new self(new PayPalWalletAttributes());
    }

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

    /**
     * Sets vault field.
     */
    public function vault(?PayPalWalletVaultInstruction $value): self
    {
        $this->instance->setVault($value);
        return $this;
    }

    /**
     * Initializes a new pay pal wallet attributes object.
     */
    public function build(): PayPalWalletAttributes
    {
        return CoreHelper::clone($this->instance);
    }
}
