<?php

namespace patest\StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for Sales.BasketTotals StructType
 * @subpackage Structs
 */
class Sales_BasketTotals extends Sales_TransactionTotals
{
    /**
     * The TotalActualPayment
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var \patest\StructType\Money
     */
    public $TotalActualPayment;
    /**
     * The TotalPayment
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var \patest\StructType\Money
     */
    public $TotalPayment;
    /**
     * Constructor method for Sales.BasketTotals
     * @uses Sales_BasketTotals::setTotalActualPayment()
     * @uses Sales_BasketTotals::setTotalPayment()
     * @param \patest\StructType\Money $totalActualPayment
     * @param \patest\StructType\Money $totalPayment
     */
    public function __construct(\patest\StructType\Money $totalActualPayment = null, \patest\StructType\Money $totalPayment = null)
    {
        $this
            ->setTotalActualPayment($totalActualPayment)
            ->setTotalPayment($totalPayment);
    }
    /**
     * Get TotalActualPayment 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 getTotalActualPayment()
    {
        return isset($this->TotalActualPayment) ? $this->TotalActualPayment : null;
    }
    /**
     * Set TotalActualPayment 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 $totalActualPayment
     * @return \patest\StructType\Sales_BasketTotals
     */
    public function setTotalActualPayment(\patest\StructType\Money $totalActualPayment = null)
    {
        if (is_null($totalActualPayment) || (is_array($totalActualPayment) && empty($totalActualPayment))) {
            unset($this->TotalActualPayment);
        } else {
            $this->TotalActualPayment = $totalActualPayment;
        }
        return $this;
    }
    /**
     * Get TotalPayment 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 getTotalPayment()
    {
        return isset($this->TotalPayment) ? $this->TotalPayment : null;
    }
    /**
     * Set TotalPayment 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 $totalPayment
     * @return \patest\StructType\Sales_BasketTotals
     */
    public function setTotalPayment(\patest\StructType\Money $totalPayment = null)
    {
        if (is_null($totalPayment) || (is_array($totalPayment) && empty($totalPayment))) {
            unset($this->TotalPayment);
        } else {
            $this->TotalPayment = $totalPayment;
        }
        return $this;
    }
}
