<?php

namespace patest\StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for Payment.AddCashPaymentToBasketRequest StructType
 * @subpackage Structs
 */
class Payment_AddCashPaymentToBasketRequest extends Payment_AddPaymentToBasketRequestBase
{
    /**
     * The Change
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var \patest\StructType\Money
     */
    public $Change;
    /**
     * The ChangeInLocalCurrencty
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var \patest\StructType\Money
     */
    public $ChangeInLocalCurrencty;
    /**
     * The Received
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var \patest\StructType\Money
     */
    public $Received;
    /**
     * Constructor method for Payment.AddCashPaymentToBasketRequest
     * @uses Payment_AddCashPaymentToBasketRequest::setChange()
     * @uses Payment_AddCashPaymentToBasketRequest::setChangeInLocalCurrencty()
     * @uses Payment_AddCashPaymentToBasketRequest::setReceived()
     * @param \patest\StructType\Money $change
     * @param \patest\StructType\Money $changeInLocalCurrencty
     * @param \patest\StructType\Money $received
     */
    public function __construct(\patest\StructType\Money $change = null, \patest\StructType\Money $changeInLocalCurrencty = null, \patest\StructType\Money $received = null)
    {
        $this
            ->setChange($change)
            ->setChangeInLocalCurrencty($changeInLocalCurrencty)
            ->setReceived($received);
    }
    /**
     * Get Change value
     * An additional test has been added (isset) before returning the property value as
     * this property may have been unset before, due to the fact that this property is
     * removable from the request (nillable=true+minOccurs=0)
     * @return \patest\StructType\Money|null
     */
    public function getChange()
    {
        return isset($this->Change) ? $this->Change : null;
    }
    /**
     * Set Change value
     * This property is removable from request (nillable=true+minOccurs=0), therefore
     * if the value assigned to this property is null, it is removed from this object
     * @param \patest\StructType\Money $change
     * @return \patest\StructType\Payment_AddCashPaymentToBasketRequest
     */
    public function setChange(\patest\StructType\Money $change = null)
    {
        if (is_null($change) || (is_array($change) && empty($change))) {
            unset($this->Change);
        } else {
            $this->Change = $change;
        }
        return $this;
    }
    /**
     * Get ChangeInLocalCurrencty value
     * An additional test has been added (isset) before returning the property value as
     * this property may have been unset before, due to the fact that this property is
     * removable from the request (nillable=true+minOccurs=0)
     * @return \patest\StructType\Money|null
     */
    public function getChangeInLocalCurrencty()
    {
        return isset($this->ChangeInLocalCurrencty) ? $this->ChangeInLocalCurrencty : null;
    }
    /**
     * Set ChangeInLocalCurrencty value
     * This property is removable from request (nillable=true+minOccurs=0), therefore
     * if the value assigned to this property is null, it is removed from this object
     * @param \patest\StructType\Money $changeInLocalCurrencty
     * @return \patest\StructType\Payment_AddCashPaymentToBasketRequest
     */
    public function setChangeInLocalCurrencty(\patest\StructType\Money $changeInLocalCurrencty = null)
    {
        if (is_null($changeInLocalCurrencty) || (is_array($changeInLocalCurrencty) && empty($changeInLocalCurrencty))) {
            unset($this->ChangeInLocalCurrencty);
        } else {
            $this->ChangeInLocalCurrencty = $changeInLocalCurrencty;
        }
        return $this;
    }
    /**
     * Get Received value
     * An additional test has been added (isset) before returning the property value as
     * this property may have been unset before, due to the fact that this property is
     * removable from the request (nillable=true+minOccurs=0)
     * @return \patest\StructType\Money|null
     */
    public function getReceived()
    {
        return isset($this->Received) ? $this->Received : null;
    }
    /**
     * Set Received value
     * This property is removable from request (nillable=true+minOccurs=0), therefore
     * if the value assigned to this property is null, it is removed from this object
     * @param \patest\StructType\Money $received
     * @return \patest\StructType\Payment_AddCashPaymentToBasketRequest
     */
    public function setReceived(\patest\StructType\Money $received = null)
    {
        if (is_null($received) || (is_array($received) && empty($received))) {
            unset($this->Received);
        } else {
            $this->Received = $received;
        }
        return $this;
    }
}
