<?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\PlatformFee;
use FormGent\PaypalServerSdkLib\Models\SellerReceivableBreakdown;
/**
 * Builder for model SellerReceivableBreakdown
 *
 * @see SellerReceivableBreakdown
 */
class SellerReceivableBreakdownBuilder
{
    /**
     * @var SellerReceivableBreakdown
     */
    private $instance;
    private function __construct(SellerReceivableBreakdown $instance)
    {
        $this->instance = $instance;
    }
    /**
     * Initializes a new Seller Receivable Breakdown Builder object.
     *
     * @param Money $grossAmount
     */
    public static function init(Money $grossAmount) : self
    {
        return new self(new SellerReceivableBreakdown($grossAmount));
    }
    /**
     * Sets paypal fee field.
     *
     * @param Money|null $value
     */
    public function paypalFee(?Money $value) : self
    {
        $this->instance->setPaypalFee($value);
        return $this;
    }
    /**
     * Sets paypal fee in receivable currency field.
     *
     * @param Money|null $value
     */
    public function paypalFeeInReceivableCurrency(?Money $value) : self
    {
        $this->instance->setPaypalFeeInReceivableCurrency($value);
        return $this;
    }
    /**
     * Sets net amount field.
     *
     * @param Money|null $value
     */
    public function netAmount(?Money $value) : self
    {
        $this->instance->setNetAmount($value);
        return $this;
    }
    /**
     * Sets receivable amount field.
     *
     * @param Money|null $value
     */
    public function receivableAmount(?Money $value) : self
    {
        $this->instance->setReceivableAmount($value);
        return $this;
    }
    /**
     * Sets exchange rate field.
     *
     * @param ExchangeRate|null $value
     */
    public function exchangeRate(?ExchangeRate $value) : self
    {
        $this->instance->setExchangeRate($value);
        return $this;
    }
    /**
     * Sets platform fees field.
     *
     * @param PlatformFee[]|null $value
     */
    public function platformFees(?array $value) : self
    {
        $this->instance->setPlatformFees($value);
        return $this;
    }
    /**
     * Initializes a new Seller Receivable Breakdown object.
     */
    public function build() : SellerReceivableBreakdown
    {
        return CoreHelper::clone($this->instance);
    }
}
