Skip to content

Commit

Permalink
Merge pull request #168 from justimmo/story/JI-2776-php-sdk-v1-accept…
Browse files Browse the repository at this point in the history
…ing-funding-inquiry

[Funding inquiry] Adds funding Inquiry ("funding_inquiry") to RealtyInquiryRequest
  • Loading branch information
maxgrundnig authored Dec 18, 2023
2 parents a7ee3f1 + 5ec0f4f commit bf8963f
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 0 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## 1.2.13
* Add funding Inquiry ("funding_inquiry") to RealtyInquiryRequest

## 1.2.12
* Add company ("firma") to RealtyInquiryRequest

Expand Down
1 change: 1 addition & 0 deletions src/Justimmo/Model/Mapper/V1/RealtyInquiryMapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ protected function getFilterMapping()
'salutationId' => 'anrede_id',
'category' => 'kategorie',
'company' => 'firma',
'fundingInquiry' => 'funding_inquiry',
);
}

Expand Down
24 changes: 24 additions & 0 deletions src/Justimmo/Request/RealtyInquiryRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,11 @@ class RealtyInquiryRequest implements RequestInterface
*/
protected $company = null;

/**
* @var bool
*/
protected $fundingInquiry = false;

public function __construct(JustimmoApiInterface $api, MapperInterface $mapper)
{
$this->api = $api;
Expand Down Expand Up @@ -379,6 +384,24 @@ public function getRealtyOwnerConsultationRequest()
return $this->realtyOwnerConsultationRequest;
}

/**
* @return bool
*/
public function isFundingInquiry()
{
return $this->fundingInquiry;
}

/**
* @param bool $fundingInquiry
*/
public function setFundingInquiry($fundingInquiry)
{
$this->fundingInquiry = $fundingInquiry;

return $this;
}

/**
* @param int[] $newsletter An array of newsletter category ids of justimmo
* @param bool $doubleoptinCompleted Wether a double optin has a already been completed.
Expand Down Expand Up @@ -410,6 +433,7 @@ public function send()
'doubleoptin_completed' => $this->doubleoptinCompleted ? '1' : '0',
'is_realty_owner' => $this->isRealtyOwner ? '1' : '0',
'realty_owner_consultation_request' => $this->realtyOwnerConsultationRequest ? '1' : '0',
$this->mapper->getFilterPropertyName('fundingInquiry') => $this->isFundingInquiry() ? '1' : '0',
));
}
}

0 comments on commit bf8963f

Please sign in to comment.