<?php

namespace dgsoft\StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for ChargesRules StructType
 * @package Dg
 * @subpackage Structs
 */
class DgChargesRules extends AbstractStructBase
{
    /**
     * The VoluntaryChanges
     * Meta informations extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var \dgsoft\StructType\DgVoluntaryChangesType
     */
    public $VoluntaryChanges;
    /**
     * The VoluntaryRefunds
     * Meta informations extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var \dgsoft\StructType\DgVoluntaryChangesType
     */
    public $VoluntaryRefunds;
    /**
     * Constructor method for ChargesRules
     * @uses DgChargesRules::setVoluntaryChanges()
     * @uses DgChargesRules::setVoluntaryRefunds()
     * @param \dgsoft\StructType\DgVoluntaryChangesType $voluntaryChanges
     * @param \dgsoft\StructType\DgVoluntaryChangesType $voluntaryRefunds
     */
    public function __construct(\dgsoft\StructType\DgVoluntaryChangesType $voluntaryChanges = null, \dgsoft\StructType\DgVoluntaryChangesType $voluntaryRefunds = null)
    {
        $this
            ->setVoluntaryChanges($voluntaryChanges)
            ->setVoluntaryRefunds($voluntaryRefunds);
    }
    /**
     * Get VoluntaryChanges value
     * @return \dgsoft\StructType\DgVoluntaryChangesType|null
     */
    public function getVoluntaryChanges()
    {
        return $this->VoluntaryChanges;
    }
    /**
     * Set VoluntaryChanges value
     * @param \dgsoft\StructType\DgVoluntaryChangesType $voluntaryChanges
     * @return \dgsoft\StructType\DgChargesRules
     */
    public function setVoluntaryChanges(\dgsoft\StructType\DgVoluntaryChangesType $voluntaryChanges = null)
    {
        $this->VoluntaryChanges = $voluntaryChanges;
        return $this;
    }
    /**
     * Get VoluntaryRefunds value
     * @return \dgsoft\StructType\DgVoluntaryChangesType|null
     */
    public function getVoluntaryRefunds()
    {
        return $this->VoluntaryRefunds;
    }
    /**
     * Set VoluntaryRefunds value
     * @param \dgsoft\StructType\DgVoluntaryChangesType $voluntaryRefunds
     * @return \dgsoft\StructType\DgChargesRules
     */
    public function setVoluntaryRefunds(\dgsoft\StructType\DgVoluntaryChangesType $voluntaryRefunds = null)
    {
        $this->VoluntaryRefunds = $voluntaryRefunds;
        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 \dgsoft\StructType\DgChargesRules
     */
    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__;
    }
}
