<?php

namespace patest\StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for CustomPaymentItem StructType
 * Meta information extracted from the WSDL
 * - nillable: true
 * - type: tns:CustomPaymentItem
 * @subpackage Structs
 */
class CustomPaymentItem extends AbstractPaymentItem
{
    /**
     * The LocalId
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var int
     */
    public $LocalId;
    /**
     * The LocalRefNumber
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var int
     */
    public $LocalRefNumber;
    /**
     * The ResultCardExpirationMM
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var string
     */
    public $ResultCardExpirationMM;
    /**
     * The ResultCardExpirationYY
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var string
     */
    public $ResultCardExpirationYY;
    /**
     * The ResultCardHolderName
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var string
     */
    public $ResultCardHolderName;
    /**
     * The ResultCardPrefix
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var string
     */
    public $ResultCardPrefix;
    /**
     * The ResultCardSuffix
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var string
     */
    public $ResultCardSuffix;
    /**
     * The ResultCardType
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var string
     */
    public $ResultCardType;
    /**
     * The ResultConfirmationNumber
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var string
     */
    public $ResultConfirmationNumber;
    /**
     * The ResultExtraData
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var \patest\StructType\ResultExtraData
     */
    public $ResultExtraData;
    /**
     * The ResultRefNumber
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var string
     */
    public $ResultRefNumber;
    /**
     * Constructor method for CustomPaymentItem
     * @uses CustomPaymentItem::setLocalId()
     * @uses CustomPaymentItem::setLocalRefNumber()
     * @uses CustomPaymentItem::setResultCardExpirationMM()
     * @uses CustomPaymentItem::setResultCardExpirationYY()
     * @uses CustomPaymentItem::setResultCardHolderName()
     * @uses CustomPaymentItem::setResultCardPrefix()
     * @uses CustomPaymentItem::setResultCardSuffix()
     * @uses CustomPaymentItem::setResultCardType()
     * @uses CustomPaymentItem::setResultConfirmationNumber()
     * @uses CustomPaymentItem::setResultExtraData()
     * @uses CustomPaymentItem::setResultRefNumber()
     * @param int $localId
     * @param int $localRefNumber
     * @param string $resultCardExpirationMM
     * @param string $resultCardExpirationYY
     * @param string $resultCardHolderName
     * @param string $resultCardPrefix
     * @param string $resultCardSuffix
     * @param string $resultCardType
     * @param string $resultConfirmationNumber
     * @param \patest\StructType\ResultExtraData $resultExtraData
     * @param string $resultRefNumber
     */
    public function __construct($localId = null, $localRefNumber = null, $resultCardExpirationMM = null, $resultCardExpirationYY = null, $resultCardHolderName = null, $resultCardPrefix = null, $resultCardSuffix = null, $resultCardType = null, $resultConfirmationNumber = null, \patest\StructType\ResultExtraData $resultExtraData = null, $resultRefNumber = null)
    {
        $this
            ->setLocalId($localId)
            ->setLocalRefNumber($localRefNumber)
            ->setResultCardExpirationMM($resultCardExpirationMM)
            ->setResultCardExpirationYY($resultCardExpirationYY)
            ->setResultCardHolderName($resultCardHolderName)
            ->setResultCardPrefix($resultCardPrefix)
            ->setResultCardSuffix($resultCardSuffix)
            ->setResultCardType($resultCardType)
            ->setResultConfirmationNumber($resultConfirmationNumber)
            ->setResultExtraData($resultExtraData)
            ->setResultRefNumber($resultRefNumber);
    }
    /**
     * Get LocalId 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 int|null
     */
    public function getLocalId()
    {
        return isset($this->LocalId) ? $this->LocalId : null;
    }
    /**
     * Set LocalId 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 int $localId
     * @return \patest\StructType\CustomPaymentItem
     */
    public function setLocalId($localId = null)
    {
        // validation for constraint: int
        if (!is_null($localId) && !(is_int($localId) || ctype_digit($localId))) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide an integer value, %s given', var_export($localId, true), gettype($localId)), __LINE__);
        }
        if (is_null($localId) || (is_array($localId) && empty($localId))) {
            unset($this->LocalId);
        } else {
            $this->LocalId = $localId;
        }
        return $this;
    }
    /**
     * Get LocalRefNumber 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 int|null
     */
    public function getLocalRefNumber()
    {
        return isset($this->LocalRefNumber) ? $this->LocalRefNumber : null;
    }
    /**
     * Set LocalRefNumber 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 int $localRefNumber
     * @return \patest\StructType\CustomPaymentItem
     */
    public function setLocalRefNumber($localRefNumber = null)
    {
        // validation for constraint: int
        if (!is_null($localRefNumber) && !(is_int($localRefNumber) || ctype_digit($localRefNumber))) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide an integer value, %s given', var_export($localRefNumber, true), gettype($localRefNumber)), __LINE__);
        }
        if (is_null($localRefNumber) || (is_array($localRefNumber) && empty($localRefNumber))) {
            unset($this->LocalRefNumber);
        } else {
            $this->LocalRefNumber = $localRefNumber;
        }
        return $this;
    }
    /**
     * Get ResultCardExpirationMM 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 string|null
     */
    public function getResultCardExpirationMM()
    {
        return isset($this->ResultCardExpirationMM) ? $this->ResultCardExpirationMM : null;
    }
    /**
     * Set ResultCardExpirationMM 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 string $resultCardExpirationMM
     * @return \patest\StructType\CustomPaymentItem
     */
    public function setResultCardExpirationMM($resultCardExpirationMM = null)
    {
        // validation for constraint: string
        if (!is_null($resultCardExpirationMM) && !is_string($resultCardExpirationMM)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($resultCardExpirationMM, true), gettype($resultCardExpirationMM)), __LINE__);
        }
        if (is_null($resultCardExpirationMM) || (is_array($resultCardExpirationMM) && empty($resultCardExpirationMM))) {
            unset($this->ResultCardExpirationMM);
        } else {
            $this->ResultCardExpirationMM = $resultCardExpirationMM;
        }
        return $this;
    }
    /**
     * Get ResultCardExpirationYY 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 string|null
     */
    public function getResultCardExpirationYY()
    {
        return isset($this->ResultCardExpirationYY) ? $this->ResultCardExpirationYY : null;
    }
    /**
     * Set ResultCardExpirationYY 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 string $resultCardExpirationYY
     * @return \patest\StructType\CustomPaymentItem
     */
    public function setResultCardExpirationYY($resultCardExpirationYY = null)
    {
        // validation for constraint: string
        if (!is_null($resultCardExpirationYY) && !is_string($resultCardExpirationYY)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($resultCardExpirationYY, true), gettype($resultCardExpirationYY)), __LINE__);
        }
        if (is_null($resultCardExpirationYY) || (is_array($resultCardExpirationYY) && empty($resultCardExpirationYY))) {
            unset($this->ResultCardExpirationYY);
        } else {
            $this->ResultCardExpirationYY = $resultCardExpirationYY;
        }
        return $this;
    }
    /**
     * Get ResultCardHolderName 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 string|null
     */
    public function getResultCardHolderName()
    {
        return isset($this->ResultCardHolderName) ? $this->ResultCardHolderName : null;
    }
    /**
     * Set ResultCardHolderName 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 string $resultCardHolderName
     * @return \patest\StructType\CustomPaymentItem
     */
    public function setResultCardHolderName($resultCardHolderName = null)
    {
        // validation for constraint: string
        if (!is_null($resultCardHolderName) && !is_string($resultCardHolderName)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($resultCardHolderName, true), gettype($resultCardHolderName)), __LINE__);
        }
        if (is_null($resultCardHolderName) || (is_array($resultCardHolderName) && empty($resultCardHolderName))) {
            unset($this->ResultCardHolderName);
        } else {
            $this->ResultCardHolderName = $resultCardHolderName;
        }
        return $this;
    }
    /**
     * Get ResultCardPrefix 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 string|null
     */
    public function getResultCardPrefix()
    {
        return isset($this->ResultCardPrefix) ? $this->ResultCardPrefix : null;
    }
    /**
     * Set ResultCardPrefix 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 string $resultCardPrefix
     * @return \patest\StructType\CustomPaymentItem
     */
    public function setResultCardPrefix($resultCardPrefix = null)
    {
        // validation for constraint: string
        if (!is_null($resultCardPrefix) && !is_string($resultCardPrefix)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($resultCardPrefix, true), gettype($resultCardPrefix)), __LINE__);
        }
        if (is_null($resultCardPrefix) || (is_array($resultCardPrefix) && empty($resultCardPrefix))) {
            unset($this->ResultCardPrefix);
        } else {
            $this->ResultCardPrefix = $resultCardPrefix;
        }
        return $this;
    }
    /**
     * Get ResultCardSuffix 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 string|null
     */
    public function getResultCardSuffix()
    {
        return isset($this->ResultCardSuffix) ? $this->ResultCardSuffix : null;
    }
    /**
     * Set ResultCardSuffix 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 string $resultCardSuffix
     * @return \patest\StructType\CustomPaymentItem
     */
    public function setResultCardSuffix($resultCardSuffix = null)
    {
        // validation for constraint: string
        if (!is_null($resultCardSuffix) && !is_string($resultCardSuffix)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($resultCardSuffix, true), gettype($resultCardSuffix)), __LINE__);
        }
        if (is_null($resultCardSuffix) || (is_array($resultCardSuffix) && empty($resultCardSuffix))) {
            unset($this->ResultCardSuffix);
        } else {
            $this->ResultCardSuffix = $resultCardSuffix;
        }
        return $this;
    }
    /**
     * Get ResultCardType 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 string|null
     */
    public function getResultCardType()
    {
        return isset($this->ResultCardType) ? $this->ResultCardType : null;
    }
    /**
     * Set ResultCardType 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 string $resultCardType
     * @return \patest\StructType\CustomPaymentItem
     */
    public function setResultCardType($resultCardType = null)
    {
        // validation for constraint: string
        if (!is_null($resultCardType) && !is_string($resultCardType)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($resultCardType, true), gettype($resultCardType)), __LINE__);
        }
        if (is_null($resultCardType) || (is_array($resultCardType) && empty($resultCardType))) {
            unset($this->ResultCardType);
        } else {
            $this->ResultCardType = $resultCardType;
        }
        return $this;
    }
    /**
     * Get ResultConfirmationNumber 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 string|null
     */
    public function getResultConfirmationNumber()
    {
        return isset($this->ResultConfirmationNumber) ? $this->ResultConfirmationNumber : null;
    }
    /**
     * Set ResultConfirmationNumber 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 string $resultConfirmationNumber
     * @return \patest\StructType\CustomPaymentItem
     */
    public function setResultConfirmationNumber($resultConfirmationNumber = null)
    {
        // validation for constraint: string
        if (!is_null($resultConfirmationNumber) && !is_string($resultConfirmationNumber)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($resultConfirmationNumber, true), gettype($resultConfirmationNumber)), __LINE__);
        }
        if (is_null($resultConfirmationNumber) || (is_array($resultConfirmationNumber) && empty($resultConfirmationNumber))) {
            unset($this->ResultConfirmationNumber);
        } else {
            $this->ResultConfirmationNumber = $resultConfirmationNumber;
        }
        return $this;
    }
    /**
     * Get ResultExtraData 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\ResultExtraData|null
     */
    public function getResultExtraData()
    {
        return isset($this->ResultExtraData) ? $this->ResultExtraData : null;
    }
    /**
     * Set ResultExtraData 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\ResultExtraData $resultExtraData
     * @return \patest\StructType\CustomPaymentItem
     */
    public function setResultExtraData(\patest\StructType\ResultExtraData $resultExtraData = null)
    {
        if (is_null($resultExtraData) || (is_array($resultExtraData) && empty($resultExtraData))) {
            unset($this->ResultExtraData);
        } else {
            $this->ResultExtraData = $resultExtraData;
        }
        return $this;
    }
    /**
     * Get ResultRefNumber 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 string|null
     */
    public function getResultRefNumber()
    {
        return isset($this->ResultRefNumber) ? $this->ResultRefNumber : null;
    }
    /**
     * Set ResultRefNumber 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 string $resultRefNumber
     * @return \patest\StructType\CustomPaymentItem
     */
    public function setResultRefNumber($resultRefNumber = null)
    {
        // validation for constraint: string
        if (!is_null($resultRefNumber) && !is_string($resultRefNumber)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($resultRefNumber, true), gettype($resultRefNumber)), __LINE__);
        }
        if (is_null($resultRefNumber) || (is_array($resultRefNumber) && empty($resultRefNumber))) {
            unset($this->ResultRefNumber);
        } else {
            $this->ResultRefNumber = $resultRefNumber;
        }
        return $this;
    }
}
