<?php

namespace StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for Put_Cash_Advance_Repayment_ResponseType StructType
 * Meta information extracted from the WSDL
 * - documentation: Wrapper Element that includes Cash Advance Repayment Instance
 * @subpackage Structs
 */
class Put_Cash_Advance_Repayment_ResponseType extends AbstractStructBase
{
    /**
     * The Cash_Advance_Repayment_Reference
     * Meta information extracted from the WSDL
     * - documentation: Reference to a specific Cash Advance Repayment
     * - minOccurs: 0
     * @var \StructType\Cash_Advance_RepaymentObjectType
     */
    public $Cash_Advance_Repayment_Reference;
    /**
     * The version
     * Meta information extracted from the WSDL
     * - ref: wd:version
     * @var string
     */
    public $version;
    /**
     * Constructor method for Put_Cash_Advance_Repayment_ResponseType
     * @uses Put_Cash_Advance_Repayment_ResponseType::setCash_Advance_Repayment_Reference()
     * @uses Put_Cash_Advance_Repayment_ResponseType::setVersion()
     * @param \StructType\Cash_Advance_RepaymentObjectType $cash_Advance_Repayment_Reference
     * @param string $version
     */
    public function __construct(\StructType\Cash_Advance_RepaymentObjectType $cash_Advance_Repayment_Reference = null, $version = null)
    {
        $this
            ->setCash_Advance_Repayment_Reference($cash_Advance_Repayment_Reference)
            ->setVersion($version);
    }
    /**
     * Get Cash_Advance_Repayment_Reference value
     * @return \StructType\Cash_Advance_RepaymentObjectType|null
     */
    public function getCash_Advance_Repayment_Reference()
    {
        return $this->Cash_Advance_Repayment_Reference;
    }
    /**
     * Set Cash_Advance_Repayment_Reference value
     * @param \StructType\Cash_Advance_RepaymentObjectType $cash_Advance_Repayment_Reference
     * @return \StructType\Put_Cash_Advance_Repayment_ResponseType
     */
    public function setCash_Advance_Repayment_Reference(\StructType\Cash_Advance_RepaymentObjectType $cash_Advance_Repayment_Reference = null)
    {
        $this->Cash_Advance_Repayment_Reference = $cash_Advance_Repayment_Reference;
        return $this;
    }
    /**
     * Get version value
     * @return string|null
     */
    public function getVersion()
    {
        return $this->version;
    }
    /**
     * Set version value
     * @param string $version
     * @return \StructType\Put_Cash_Advance_Repayment_ResponseType
     */
    public function setVersion($version = null)
    {
        // validation for constraint: string
        if (!is_null($version) && !is_string($version)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($version, true), gettype($version)), __LINE__);
        }
        $this->version = $version;
        return $this;
    }
}
