<?php

namespace StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for Put_Receivable_Repayment_ResponseType StructType
 * Meta information extracted from the WSDL
 * - documentation: Receivable Repayment Response having the reference for the Receivable created.
 * @subpackage Structs
 */
class Put_Receivable_Repayment_ResponseType extends AbstractStructBase
{
    /**
     * The Receivable_Repayment_Reference
     * Meta information extracted from the WSDL
     * - documentation: Receivable Repayment Reference.
     * - minOccurs: 0
     * @var \StructType\Receivable_RepaymentObjectType
     */
    public $Receivable_Repayment_Reference;
    /**
     * The version
     * Meta information extracted from the WSDL
     * - ref: wd:version
     * @var string
     */
    public $version;
    /**
     * Constructor method for Put_Receivable_Repayment_ResponseType
     * @uses Put_Receivable_Repayment_ResponseType::setReceivable_Repayment_Reference()
     * @uses Put_Receivable_Repayment_ResponseType::setVersion()
     * @param \StructType\Receivable_RepaymentObjectType $receivable_Repayment_Reference
     * @param string $version
     */
    public function __construct(\StructType\Receivable_RepaymentObjectType $receivable_Repayment_Reference = null, $version = null)
    {
        $this
            ->setReceivable_Repayment_Reference($receivable_Repayment_Reference)
            ->setVersion($version);
    }
    /**
     * Get Receivable_Repayment_Reference value
     * @return \StructType\Receivable_RepaymentObjectType|null
     */
    public function getReceivable_Repayment_Reference()
    {
        return $this->Receivable_Repayment_Reference;
    }
    /**
     * Set Receivable_Repayment_Reference value
     * @param \StructType\Receivable_RepaymentObjectType $receivable_Repayment_Reference
     * @return \StructType\Put_Receivable_Repayment_ResponseType
     */
    public function setReceivable_Repayment_Reference(\StructType\Receivable_RepaymentObjectType $receivable_Repayment_Reference = null)
    {
        $this->Receivable_Repayment_Reference = $receivable_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_Receivable_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;
    }
}
