<?php

namespace patest\StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

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