<?php

namespace patest\StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for Sales.TransactionTotals StructType
 * @subpackage Structs
 */
class Sales_TransactionTotals extends AnyEntity
{
    /**
     * The TotalCommission
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var \patest\StructType\Money
     */
    public $TotalCommission;
    /**
     * The TotalCommissionOnPayment
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var \patest\StructType\Money
     */
    public $TotalCommissionOnPayment;
    /**
     * The TotalDiscount
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var \patest\StructType\Money
     */
    public $TotalDiscount;
    /**
     * The TotalExtraCharge
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var \patest\StructType\Money
     */
    public $TotalExtraCharge;
    /**
     * The TotalInsurance
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var \patest\StructType\Money
     */
    public $TotalInsurance;
    /**
     * The TotalPrice
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var \patest\StructType\Money
     */
    public $TotalPrice;
    /**
     * The TotalSubsidy
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var \patest\StructType\Money
     */
    public $TotalSubsidy;
    /**
     * The TotalTax
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var \patest\StructType\Money
     */
    public $TotalTax;
    /**
     * The TotalVat
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var \patest\StructType\Money
     */
    public $TotalVat;
    /**
     * Constructor method for Sales.TransactionTotals
     * @uses Sales_TransactionTotals::setTotalCommission()
     * @uses Sales_TransactionTotals::setTotalCommissionOnPayment()
     * @uses Sales_TransactionTotals::setTotalDiscount()
     * @uses Sales_TransactionTotals::setTotalExtraCharge()
     * @uses Sales_TransactionTotals::setTotalInsurance()
     * @uses Sales_TransactionTotals::setTotalPrice()
     * @uses Sales_TransactionTotals::setTotalSubsidy()
     * @uses Sales_TransactionTotals::setTotalTax()
     * @uses Sales_TransactionTotals::setTotalVat()
     * @param \patest\StructType\Money $totalCommission
     * @param \patest\StructType\Money $totalCommissionOnPayment
     * @param \patest\StructType\Money $totalDiscount
     * @param \patest\StructType\Money $totalExtraCharge
     * @param \patest\StructType\Money $totalInsurance
     * @param \patest\StructType\Money $totalPrice
     * @param \patest\StructType\Money $totalSubsidy
     * @param \patest\StructType\Money $totalTax
     * @param \patest\StructType\Money $totalVat
     */
    public function __construct(\patest\StructType\Money $totalCommission = null, \patest\StructType\Money $totalCommissionOnPayment = null, \patest\StructType\Money $totalDiscount = null, \patest\StructType\Money $totalExtraCharge = null, \patest\StructType\Money $totalInsurance = null, \patest\StructType\Money $totalPrice = null, \patest\StructType\Money $totalSubsidy = null, \patest\StructType\Money $totalTax = null, \patest\StructType\Money $totalVat = null)
    {
        $this
            ->setTotalCommission($totalCommission)
            ->setTotalCommissionOnPayment($totalCommissionOnPayment)
            ->setTotalDiscount($totalDiscount)
            ->setTotalExtraCharge($totalExtraCharge)
            ->setTotalInsurance($totalInsurance)
            ->setTotalPrice($totalPrice)
            ->setTotalSubsidy($totalSubsidy)
            ->setTotalTax($totalTax)
            ->setTotalVat($totalVat);
    }
    /**
     * Get TotalCommission 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 getTotalCommission()
    {
        return isset($this->TotalCommission) ? $this->TotalCommission : null;
    }
    /**
     * Set TotalCommission 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 $totalCommission
     * @return \patest\StructType\Sales_TransactionTotals
     */
    public function setTotalCommission(\patest\StructType\Money $totalCommission = null)
    {
        if (is_null($totalCommission) || (is_array($totalCommission) && empty($totalCommission))) {
            unset($this->TotalCommission);
        } else {
            $this->TotalCommission = $totalCommission;
        }
        return $this;
    }
    /**
     * Get TotalCommissionOnPayment 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 getTotalCommissionOnPayment()
    {
        return isset($this->TotalCommissionOnPayment) ? $this->TotalCommissionOnPayment : null;
    }
    /**
     * Set TotalCommissionOnPayment 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 $totalCommissionOnPayment
     * @return \patest\StructType\Sales_TransactionTotals
     */
    public function setTotalCommissionOnPayment(\patest\StructType\Money $totalCommissionOnPayment = null)
    {
        if (is_null($totalCommissionOnPayment) || (is_array($totalCommissionOnPayment) && empty($totalCommissionOnPayment))) {
            unset($this->TotalCommissionOnPayment);
        } else {
            $this->TotalCommissionOnPayment = $totalCommissionOnPayment;
        }
        return $this;
    }
    /**
     * Get TotalDiscount 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 getTotalDiscount()
    {
        return isset($this->TotalDiscount) ? $this->TotalDiscount : null;
    }
    /**
     * Set TotalDiscount 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 $totalDiscount
     * @return \patest\StructType\Sales_TransactionTotals
     */
    public function setTotalDiscount(\patest\StructType\Money $totalDiscount = null)
    {
        if (is_null($totalDiscount) || (is_array($totalDiscount) && empty($totalDiscount))) {
            unset($this->TotalDiscount);
        } else {
            $this->TotalDiscount = $totalDiscount;
        }
        return $this;
    }
    /**
     * Get TotalExtraCharge 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 getTotalExtraCharge()
    {
        return isset($this->TotalExtraCharge) ? $this->TotalExtraCharge : null;
    }
    /**
     * Set TotalExtraCharge 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 $totalExtraCharge
     * @return \patest\StructType\Sales_TransactionTotals
     */
    public function setTotalExtraCharge(\patest\StructType\Money $totalExtraCharge = null)
    {
        if (is_null($totalExtraCharge) || (is_array($totalExtraCharge) && empty($totalExtraCharge))) {
            unset($this->TotalExtraCharge);
        } else {
            $this->TotalExtraCharge = $totalExtraCharge;
        }
        return $this;
    }
    /**
     * Get TotalInsurance 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 getTotalInsurance()
    {
        return isset($this->TotalInsurance) ? $this->TotalInsurance : null;
    }
    /**
     * Set TotalInsurance 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 $totalInsurance
     * @return \patest\StructType\Sales_TransactionTotals
     */
    public function setTotalInsurance(\patest\StructType\Money $totalInsurance = null)
    {
        if (is_null($totalInsurance) || (is_array($totalInsurance) && empty($totalInsurance))) {
            unset($this->TotalInsurance);
        } else {
            $this->TotalInsurance = $totalInsurance;
        }
        return $this;
    }
    /**
     * Get TotalPrice 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 getTotalPrice()
    {
        return isset($this->TotalPrice) ? $this->TotalPrice : null;
    }
    /**
     * Set TotalPrice 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 $totalPrice
     * @return \patest\StructType\Sales_TransactionTotals
     */
    public function setTotalPrice(\patest\StructType\Money $totalPrice = null)
    {
        if (is_null($totalPrice) || (is_array($totalPrice) && empty($totalPrice))) {
            unset($this->TotalPrice);
        } else {
            $this->TotalPrice = $totalPrice;
        }
        return $this;
    }
    /**
     * Get TotalSubsidy 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 getTotalSubsidy()
    {
        return isset($this->TotalSubsidy) ? $this->TotalSubsidy : null;
    }
    /**
     * Set TotalSubsidy 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 $totalSubsidy
     * @return \patest\StructType\Sales_TransactionTotals
     */
    public function setTotalSubsidy(\patest\StructType\Money $totalSubsidy = null)
    {
        if (is_null($totalSubsidy) || (is_array($totalSubsidy) && empty($totalSubsidy))) {
            unset($this->TotalSubsidy);
        } else {
            $this->TotalSubsidy = $totalSubsidy;
        }
        return $this;
    }
    /**
     * Get TotalTax 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 getTotalTax()
    {
        return isset($this->TotalTax) ? $this->TotalTax : null;
    }
    /**
     * Set TotalTax 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 $totalTax
     * @return \patest\StructType\Sales_TransactionTotals
     */
    public function setTotalTax(\patest\StructType\Money $totalTax = null)
    {
        if (is_null($totalTax) || (is_array($totalTax) && empty($totalTax))) {
            unset($this->TotalTax);
        } else {
            $this->TotalTax = $totalTax;
        }
        return $this;
    }
    /**
     * Get TotalVat 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 getTotalVat()
    {
        return isset($this->TotalVat) ? $this->TotalVat : null;
    }
    /**
     * Set TotalVat 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 $totalVat
     * @return \patest\StructType\Sales_TransactionTotals
     */
    public function setTotalVat(\patest\StructType\Money $totalVat = null)
    {
        if (is_null($totalVat) || (is_array($totalVat) && empty($totalVat))) {
            unset($this->TotalVat);
        } else {
            $this->TotalVat = $totalVat;
        }
        return $this;
    }
}
