<?php

namespace Sabre\TravelItineraryRead\Structs;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for Promotion Structs
 * @subpackage Structs
 */
class Promotion extends AccountingTransactionAmountWithRule
{
    /**
     * The Type
     * Meta informations extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var string
     */
    public $Type;
    /**
     * The Percentage
     * Meta informations extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var float
     */
    public $Percentage;
    /**
     * The OfferName
     * Meta informations extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var string
     */
    public $OfferName;
    /**
     * Constructor method for Promotion
     * @uses Promotion::setType()
     * @uses Promotion::setPercentage()
     * @uses Promotion::setOfferName()
     * @param string $type
     * @param float $percentage
     * @param string $offerName
     */
    public function __construct($type = null, $percentage = null, $offerName = null)
    {
        $this
            ->setType($type)
            ->setPercentage($percentage)
            ->setOfferName($offerName);
    }
    /**
     * Get Type value
     * @return string|null
     */
    public function getType()
    {
        return $this->Type;
    }
    /**
     * Set Type value
     * @param string $type
     * @return \Sabre\TravelItineraryRead\Structs\Promotion
     */
    public function setType($type = null)
    {
        $this->Type = $type;
        return $this;
    }
    /**
     * Get Percentage value
     * @return float|null
     */
    public function getPercentage()
    {
        return $this->Percentage;
    }
    /**
     * Set Percentage value
     * @param float $percentage
     * @return \Sabre\TravelItineraryRead\Structs\Promotion
     */
    public function setPercentage($percentage = null)
    {
        $this->Percentage = $percentage;
        return $this;
    }
    /**
     * Get OfferName value
     * @return string|null
     */
    public function getOfferName()
    {
        return $this->OfferName;
    }
    /**
     * Set OfferName value
     * @param string $offerName
     * @return \Sabre\TravelItineraryRead\Structs\Promotion
     */
    public function setOfferName($offerName = null)
    {
        $this->OfferName = $offerName;
        return $this;
    }
    /**
     * Method called when an object has been exported with var_export() functions
     * It allows to return an object instantiated with the values
     * @see AbstractStructBase::__set_state()
     * @uses AbstractStructBase::__set_state()
     * @param array $array the exported values
     * @return \Sabre\TravelItineraryRead\Structs\Promotion
     */
    public static function __set_state(array $array)
    {
        return parent::__set_state($array);
    }
    /**
     * Method returning the class name
     * @return string __CLASS__
     */
    public function __toString()
    {
        return __CLASS__;
    }
}
