<?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\ExchangeRate;
use FormGent\PaypalServerSdkLib\Models\Money;
use FormGent\PaypalServerSdkLib\Models\NetAmountBreakdownItem;
/**
 * Builder for model NetAmountBreakdownItem
 *
 * @see NetAmountBreakdownItem
 */
class NetAmountBreakdownItemBuilder
{
    /**
     * @var NetAmountBreakdownItem
     */
    private $instance;
    private function __construct(NetAmountBreakdownItem $instance)
    {
        $this->instance = $instance;
    }
    /**
     * Initializes a new Net Amount Breakdown Item Builder object.
     */
    public static function init() : self
    {
        return new self(new NetAmountBreakdownItem());
    }
    /**
     * Sets payable amount field.
     *
     * @param Money|null $value
     */
    public function payableAmount(?Money $value) : self
    {
        $this->instance->setPayableAmount($value);
        return $this;
    }
    /**
     * Sets converted amount field.
     *
     * @param Money|null $value
     */
    public function convertedAmount(?Money $value) : self
    {
        $this->instance->setConvertedAmount($value);
        return $this;
    }
    /**
     * Sets exchange rate field.
     *
     * @param ExchangeRate|null $value
     */
    public function exchangeRate(?ExchangeRate $value) : self
    {
        $this->instance->setExchangeRate($value);
        return $this;
    }
    /**
     * Initializes a new Net Amount Breakdown Item object.
     */
    public function build() : NetAmountBreakdownItem
    {
        return CoreHelper::clone($this->instance);
    }
}
