<?php

namespace GreenwayDirectService;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for specialCharges StructType
 * Meta informations extracted from the WSDL
 * - type: tns:specialCharges
 * @subpackage Structs
 */
class SpecialCharges extends AbstractStructBase
{
    /**
     * The specialCharges
     * @var string
     */
    public $specialCharges;
    /**
     * The specialChargesUnits
     * @var string
     */
    public $specialChargesUnits;
    /**
     * Constructor method for specialCharges
     * @uses SpecialCharges::setSpecialCharges()
     * @uses SpecialCharges::setSpecialChargesUnits()
     * @param string $specialCharges
     * @param string $specialChargesUnits
     */
    public function __construct($specialCharges = null, $specialChargesUnits = null)
    {
        $this
            ->setSpecialCharges($specialCharges)
            ->setSpecialChargesUnits($specialChargesUnits);
    }
    /**
     * Get specialCharges value
     * @return string|null
     */
    public function getSpecialCharges()
    {
        return $this->specialCharges;
    }
    /**
     * Set specialCharges value
     * @param string $specialCharges
     * @return \GreenwayDirectService\SpecialCharges
     */
    public function setSpecialCharges($specialCharges = null)
    {
        // validation for constraint: string
        if (!is_null($specialCharges) && !is_string($specialCharges)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($specialCharges)), __LINE__);
        }
        $this->specialCharges = $specialCharges;
        return $this;
    }
    /**
     * Get specialChargesUnits value
     * @return string|null
     */
    public function getSpecialChargesUnits()
    {
        return $this->specialChargesUnits;
    }
    /**
     * Set specialChargesUnits value
     * @param string $specialChargesUnits
     * @return \GreenwayDirectService\SpecialCharges
     */
    public function setSpecialChargesUnits($specialChargesUnits = null)
    {
        // validation for constraint: string
        if (!is_null($specialChargesUnits) && !is_string($specialChargesUnits)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($specialChargesUnits)), __LINE__);
        }
        $this->specialChargesUnits = $specialChargesUnits;
        return $this;
    }
    /**
     * Method called when an object has been exported with var_export() functions
     * It allows to return an object instantiated with the values
     * @see AbstractStructBase::__set_state()
     * @uses AbstractStructBase::__set_state()
     * @param array $array the exported values
     * @return \GreenwayDirectService\SpecialCharges
     */
    public static function __set_state(array $array)
    {
        return parent::__set_state($array);
    }
    /**
     * Method returning the class name
     * @return string __CLASS__
     */
    public function __toString()
    {
        return __CLASS__;
    }
}
