/**
  * Get a guarantor ReferencingApplication from IRIS, attach it to a RentRecoveryPlusReference and return it.
  *
  * @param RentRecoveryPlusReference $tenant
  * @return RentRecoveryPlusReference
  */
 private function createGuarantor(RentRecoveryPlusReference $tenant)
 {
     $guarantorCollection = $this->clientRegistry->getAgentContext()->getReferencingApplicationClient()->getReferencingApplicationGuarantors(array('referencingApplicationUuId' => $tenant->getParent()->getReferencingApplicationUuid()));
     // todo: Grab the first one for now - business will likely want to consider all Guarantors however.
     $guarantor = current($guarantorCollection->getAll());
     $this->rrpGuarantor = new RentRecoveryPlusReference();
     $this->rrpGuarantor->setParent($guarantor)->setDecisionDetails($this->decisionDetailsRetriever->getDecisionDetails($guarantor));
     return $this->rrpGuarantor;
 }
 /**
  * Get a ReferencingApplication object from IRIS.
  *
  * @param ReferencingApplicationFindResult $result
  * @return ReferencingApplication
  */
 private function getReferencingApplication(ReferencingApplicationFindResult $result)
 {
     return $this->clientRegistry->getAgentContext()->getReferencingApplicationClient()->getReferencingApplication(array('referencingApplicationUuId' => $result->getReferencingApplicationUuId()));
 }
 /**
  * Get DecisionDetails object from IRIS.
  *
  * @param ReferencingApplication $reference
  * @return \Barbondev\IRISSDK\IndividualApplication\ReferencingApplication\Model\ReferencingDecisionDetails
  */
 public function getDecisionDetails(ReferencingApplication $reference)
 {
     return $this->clientRegistry->getAgentContext()->getReferencingApplicationClient()->getReferencingDecisionDetails(array('referencingApplicationUuId' => $reference->getReferencingApplicationUuId()));
 }