forked from frozensheep/rightmoveADF
-
Notifications
You must be signed in to change notification settings - Fork 0
/
addFeaturedProperty.php
34 lines (26 loc) · 1013 Bytes
/
addFeaturedProperty.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
<?php
/**
* Add Featured Property 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::AddFeaturedProperty);
//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->featured_property->featured_property_type = Frozensheep\RightmoveADF\Values\FeaturedPropertyTypes::FeaturedPropertyOfTheWeek;
//send the request
$objResponse = $objRightmoveADF->send($objRequest);
print_r($objResponse);