-
Notifications
You must be signed in to change notification settings - Fork 20
/
addPremiumListing.php
38 lines (30 loc) · 1.3 KB
/
addPremiumListing.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<?php
/**
* Add Premium Listing Example.
*
* @package Frozensheep\RightmoveADF
* @author Jacob Wyke <jacob@frozensheep.com>
* @license MIT
*
*/
require_once(__DIR__.'/../vendor/autoload.php');
use Frozensheep\RightmoveADF\RightmoveADF;
//include the config file
require_once('config.php');
//create the RightmoveADF object
$objRightmoveADF = new RightmoveADF(CERT_FILE, CERT_PASS, RightmoveADF::TEST);
//create a request
$objRequest = $objRightmoveADF->createRequest(RightmoveADF::AddPremiumListing);
//set the details for the request
$objRequest->network->network_id = NETWORK_ID;
$objRequest->branch->branch_id = BRANCH_ID;
$objRequest->branch->channel = Frozensheep\RightmoveADF\Values\Channels::Lettings;
$objRequest->property->agent_ref = PROPERTY_REF;
$objRequest->property->premium_listing->display_type = Frozensheep\RightmoveADF\Values\DisplayTypes::OneLargeTwoSmall;
//$objRequest->property->premium_listing->resale_stamp_text = Frozensheep\RightmoveADF\Values\StampTexts::NoChain;
$objRequest->property->premium_listing->lettings_stamp_text = Frozensheep\RightmoveADF\Values\StampTexts::PeriodProperty;
$objRequest->property->premium_listing->web_flag = true;
$objRequest->property->premium_listing->mobile_flag = true;
//send the request
$objResponse = $objRightmoveADF->send($objRequest);
print_r($objResponse);