<?php

namespace StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for TaxTypeNexusesTax StructType
 * @subpackage Structs
 */
class TaxTypeNexusesTax extends AbstractStructBase
{
    /**
     * The nexus
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var \StructType\RecordRef
     */
    public $nexus;
    /**
     * The description
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var string
     */
    public $description;
    /**
     * The saleTaxAcct
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var \StructType\RecordRef
     */
    public $saleTaxAcct;
    /**
     * The purchTaxAcct
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var \StructType\RecordRef
     */
    public $purchTaxAcct;
    /**
     * Constructor method for TaxTypeNexusesTax
     * @uses TaxTypeNexusesTax::setNexus()
     * @uses TaxTypeNexusesTax::setDescription()
     * @uses TaxTypeNexusesTax::setSaleTaxAcct()
     * @uses TaxTypeNexusesTax::setPurchTaxAcct()
     * @param \StructType\RecordRef $nexus
     * @param string $description
     * @param \StructType\RecordRef $saleTaxAcct
     * @param \StructType\RecordRef $purchTaxAcct
     */
    public function __construct(\StructType\RecordRef $nexus = null, $description = null, \StructType\RecordRef $saleTaxAcct = null, \StructType\RecordRef $purchTaxAcct = null)
    {
        $this
            ->setNexus($nexus)
            ->setDescription($description)
            ->setSaleTaxAcct($saleTaxAcct)
            ->setPurchTaxAcct($purchTaxAcct);
    }
    /**
     * Get nexus value
     * @return \StructType\RecordRef|null
     */
    public function getNexus()
    {
        return $this->nexus;
    }
    /**
     * Set nexus value
     * @param \StructType\RecordRef $nexus
     * @return \StructType\TaxTypeNexusesTax
     */
    public function setNexus(\StructType\RecordRef $nexus = null)
    {
        $this->nexus = $nexus;
        return $this;
    }
    /**
     * Get description value
     * @return string|null
     */
    public function getDescription()
    {
        return $this->description;
    }
    /**
     * Set description value
     * @param string $description
     * @return \StructType\TaxTypeNexusesTax
     */
    public function setDescription($description = null)
    {
        // validation for constraint: string
        if (!is_null($description) && !is_string($description)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($description, true), gettype($description)), __LINE__);
        }
        $this->description = $description;
        return $this;
    }
    /**
     * Get saleTaxAcct value
     * @return \StructType\RecordRef|null
     */
    public function getSaleTaxAcct()
    {
        return $this->saleTaxAcct;
    }
    /**
     * Set saleTaxAcct value
     * @param \StructType\RecordRef $saleTaxAcct
     * @return \StructType\TaxTypeNexusesTax
     */
    public function setSaleTaxAcct(\StructType\RecordRef $saleTaxAcct = null)
    {
        $this->saleTaxAcct = $saleTaxAcct;
        return $this;
    }
    /**
     * Get purchTaxAcct value
     * @return \StructType\RecordRef|null
     */
    public function getPurchTaxAcct()
    {
        return $this->purchTaxAcct;
    }
    /**
     * Set purchTaxAcct value
     * @param \StructType\RecordRef $purchTaxAcct
     * @return \StructType\TaxTypeNexusesTax
     */
    public function setPurchTaxAcct(\StructType\RecordRef $purchTaxAcct = null)
    {
        $this->purchTaxAcct = $purchTaxAcct;
        return $this;
    }
}
