<?php

namespace patest\StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for Printing.PrintableItem.RefundOriginal StructType
 * @subpackage Structs
 */
class Printing_PrintableItem_RefundOriginal extends Printing_PrintableItem_PaymentItemBase
{
    /**
     * The RefundVoucher
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var \patest\StructType\Payment_RefundVoucher
     */
    public $RefundVoucher;
    /**
     * Constructor method for Printing.PrintableItem.RefundOriginal
     * @uses Printing_PrintableItem_RefundOriginal::setRefundVoucher()
     * @param \patest\StructType\Payment_RefundVoucher $refundVoucher
     */
    public function __construct(\patest\StructType\Payment_RefundVoucher $refundVoucher = null)
    {
        $this
            ->setRefundVoucher($refundVoucher);
    }
    /**
     * Get RefundVoucher 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\Payment_RefundVoucher|null
     */
    public function getRefundVoucher()
    {
        return isset($this->RefundVoucher) ? $this->RefundVoucher : null;
    }
    /**
     * Set RefundVoucher 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\Payment_RefundVoucher $refundVoucher
     * @return \patest\StructType\Printing_PrintableItem_RefundOriginal
     */
    public function setRefundVoucher(\patest\StructType\Payment_RefundVoucher $refundVoucher = null)
    {
        if (is_null($refundVoucher) || (is_array($refundVoucher) && empty($refundVoucher))) {
            unset($this->RefundVoucher);
        } else {
            $this->RefundVoucher = $refundVoucher;
        }
        return $this;
    }
}
