<?php

namespace patest\StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for UpdatePaymentItems-Request StructType
 * Meta information extracted from the WSDL
 * - nillable: true
 * - type: tns:UpdatePaymentItems-Request
 * @subpackage Structs
 */
class UpdatePaymentItems_Request extends AbstractStructBase
{
    /**
     * The PaymentItemsToUpdate
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var \patest\ArrayType\ArrayOfUpdatePaymentStatusItem
     */
    public $PaymentItemsToUpdate;
    /**
     * Constructor method for UpdatePaymentItems-Request
     * @uses UpdatePaymentItems_Request::setPaymentItemsToUpdate()
     * @param \patest\ArrayType\ArrayOfUpdatePaymentStatusItem $paymentItemsToUpdate
     */
    public function __construct(\patest\ArrayType\ArrayOfUpdatePaymentStatusItem $paymentItemsToUpdate = null)
    {
        $this
            ->setPaymentItemsToUpdate($paymentItemsToUpdate);
    }
    /**
     * Get PaymentItemsToUpdate 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\ArrayType\ArrayOfUpdatePaymentStatusItem|null
     */
    public function getPaymentItemsToUpdate()
    {
        return isset($this->PaymentItemsToUpdate) ? $this->PaymentItemsToUpdate : null;
    }
    /**
     * Set PaymentItemsToUpdate 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\ArrayType\ArrayOfUpdatePaymentStatusItem $paymentItemsToUpdate
     * @return \patest\StructType\UpdatePaymentItems_Request
     */
    public function setPaymentItemsToUpdate(\patest\ArrayType\ArrayOfUpdatePaymentStatusItem $paymentItemsToUpdate = null)
    {
        if (is_null($paymentItemsToUpdate) || (is_array($paymentItemsToUpdate) && empty($paymentItemsToUpdate))) {
            unset($this->PaymentItemsToUpdate);
        } else {
            $this->PaymentItemsToUpdate = $paymentItemsToUpdate;
        }
        return $this;
    }
}
