<?php

namespace patest\StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for ProductMaxTransactionCommission StructType
 * Meta information extracted from the WSDL
 * - nillable: true
 * - type: tns:ProductMaxTransactionCommission
 * @subpackage Structs
 */
class ProductMaxTransactionCommission extends AbstractStructBase
{
    /**
     * The MaxTransactionLevelNominalCommission
     * @var float
     */
    public $MaxTransactionLevelNominalCommission;
    /**
     * Constructor method for ProductMaxTransactionCommission
     * @uses ProductMaxTransactionCommission::setMaxTransactionLevelNominalCommission()
     * @param float $maxTransactionLevelNominalCommission
     */
    public function __construct($maxTransactionLevelNominalCommission = null)
    {
        $this
            ->setMaxTransactionLevelNominalCommission($maxTransactionLevelNominalCommission);
    }
    /**
     * Get MaxTransactionLevelNominalCommission value
     * @return float|null
     */
    public function getMaxTransactionLevelNominalCommission()
    {
        return $this->MaxTransactionLevelNominalCommission;
    }
    /**
     * Set MaxTransactionLevelNominalCommission value
     * @param float $maxTransactionLevelNominalCommission
     * @return \patest\StructType\ProductMaxTransactionCommission
     */
    public function setMaxTransactionLevelNominalCommission($maxTransactionLevelNominalCommission = null)
    {
        // validation for constraint: float
        if (!is_null($maxTransactionLevelNominalCommission) && !(is_float($maxTransactionLevelNominalCommission) || is_numeric($maxTransactionLevelNominalCommission))) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a float value, %s given', var_export($maxTransactionLevelNominalCommission, true), gettype($maxTransactionLevelNominalCommission)), __LINE__);
        }
        $this->MaxTransactionLevelNominalCommission = $maxTransactionLevelNominalCommission;
        return $this;
    }
}
