<?php

declare (strict_types=1);
/*
 * PaypalServerSdkLib
 *
 * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ).
 */
namespace FormGent\PaypalServerSdkLib\Models\Builders;

use FormGent\Core\Utils\CoreHelper;
use FormGent\PaypalServerSdkLib\Models\Money;
use FormGent\PaypalServerSdkLib\Models\PayeeBase;
use FormGent\PaypalServerSdkLib\Models\PlatformFee;
/**
 * Builder for model PlatformFee
 *
 * @see PlatformFee
 */
class PlatformFeeBuilder
{
    /**
     * @var PlatformFee
     */
    private $instance;
    private function __construct(PlatformFee $instance)
    {
        $this->instance = $instance;
    }
    /**
     * Initializes a new Platform Fee Builder object.
     *
     * @param Money $amount
     */
    public static function init(Money $amount) : self
    {
        return new self(new PlatformFee($amount));
    }
    /**
     * Sets payee field.
     *
     * @param PayeeBase|null $value
     */
    public function payee(?PayeeBase $value) : self
    {
        $this->instance->setPayee($value);
        return $this;
    }
    /**
     * Initializes a new Platform Fee object.
     */
    public function build() : PlatformFee
    {
        return CoreHelper::clone($this->instance);
    }
}
