<?php


namespace Fifa\ConnectId\Sdk\Model\Transfer;


class ConditionalTransferFee
{
    /**
     * @var string
     */
    public $Condition;
    /**
     * @var TransferFeeDetails
     */
    public $FeeDetails;

    /**
     * ConditionalTransferFee constructor.
     * @param TransferFeeDetails $feeDetails
     */
    public function __construct(TransferFeeDetails $feeDetails)
    {
        $this->FeeDetails = $feeDetails;
    }

    /**
     * @return string
     */
    public function __toString()
    {
        $transferFee = $this->FeeDetails->__toString();
        $optional = sprintf('Condition: %s', $this->Condition);

        return sprintf('Conditional transfer fee. Details: %s, condition: %s', $transferFee, $optional);
    }
}