<?php

namespace StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for GiftCertRedemption StructType
 * @subpackage Structs
 */
class GiftCertRedemption extends AbstractStructBase
{
    /**
     * The authCode
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var \StructType\RecordRef
     */
    public $authCode;
    /**
     * The authCodeApplied
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var float
     */
    public $authCodeApplied;
    /**
     * The authCodeAmtRemaining
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var float
     */
    public $authCodeAmtRemaining;
    /**
     * The giftCertAvailable
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var float
     */
    public $giftCertAvailable;
    /**
     * Constructor method for GiftCertRedemption
     * @uses GiftCertRedemption::setAuthCode()
     * @uses GiftCertRedemption::setAuthCodeApplied()
     * @uses GiftCertRedemption::setAuthCodeAmtRemaining()
     * @uses GiftCertRedemption::setGiftCertAvailable()
     * @param \StructType\RecordRef $authCode
     * @param float $authCodeApplied
     * @param float $authCodeAmtRemaining
     * @param float $giftCertAvailable
     */
    public function __construct(\StructType\RecordRef $authCode = null, $authCodeApplied = null, $authCodeAmtRemaining = null, $giftCertAvailable = null)
    {
        $this
            ->setAuthCode($authCode)
            ->setAuthCodeApplied($authCodeApplied)
            ->setAuthCodeAmtRemaining($authCodeAmtRemaining)
            ->setGiftCertAvailable($giftCertAvailable);
    }
    /**
     * Get authCode value
     * @return \StructType\RecordRef|null
     */
    public function getAuthCode()
    {
        return $this->authCode;
    }
    /**
     * Set authCode value
     * @param \StructType\RecordRef $authCode
     * @return \StructType\GiftCertRedemption
     */
    public function setAuthCode(\StructType\RecordRef $authCode = null)
    {
        $this->authCode = $authCode;
        return $this;
    }
    /**
     * Get authCodeApplied value
     * @return float|null
     */
    public function getAuthCodeApplied()
    {
        return $this->authCodeApplied;
    }
    /**
     * Set authCodeApplied value
     * @param float $authCodeApplied
     * @return \StructType\GiftCertRedemption
     */
    public function setAuthCodeApplied($authCodeApplied = null)
    {
        // validation for constraint: float
        if (!is_null($authCodeApplied) && !(is_float($authCodeApplied) || is_numeric($authCodeApplied))) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a float value, %s given', var_export($authCodeApplied, true), gettype($authCodeApplied)), __LINE__);
        }
        $this->authCodeApplied = $authCodeApplied;
        return $this;
    }
    /**
     * Get authCodeAmtRemaining value
     * @return float|null
     */
    public function getAuthCodeAmtRemaining()
    {
        return $this->authCodeAmtRemaining;
    }
    /**
     * Set authCodeAmtRemaining value
     * @param float $authCodeAmtRemaining
     * @return \StructType\GiftCertRedemption
     */
    public function setAuthCodeAmtRemaining($authCodeAmtRemaining = null)
    {
        // validation for constraint: float
        if (!is_null($authCodeAmtRemaining) && !(is_float($authCodeAmtRemaining) || is_numeric($authCodeAmtRemaining))) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a float value, %s given', var_export($authCodeAmtRemaining, true), gettype($authCodeAmtRemaining)), __LINE__);
        }
        $this->authCodeAmtRemaining = $authCodeAmtRemaining;
        return $this;
    }
    /**
     * Get giftCertAvailable value
     * @return float|null
     */
    public function getGiftCertAvailable()
    {
        return $this->giftCertAvailable;
    }
    /**
     * Set giftCertAvailable value
     * @param float $giftCertAvailable
     * @return \StructType\GiftCertRedemption
     */
    public function setGiftCertAvailable($giftCertAvailable = null)
    {
        // validation for constraint: float
        if (!is_null($giftCertAvailable) && !(is_float($giftCertAvailable) || is_numeric($giftCertAvailable))) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a float value, %s given', var_export($giftCertAvailable, true), gettype($giftCertAvailable)), __LINE__);
        }
        $this->giftCertAvailable = $giftCertAvailable;
        return $this;
    }
}
