/getNearestZone
Remote API Guide link
Method /getNearestZone
Signature
GetNearestZoneResponse getNearestZone(GetNearestZoneRequest $getNearestZoneRequest)
<?php
use Gomoob\Pushwoosh\Model\Request\GetNearestZoneRequest;
// Creates the request instance
$request = GetNearestZoneRequest::create()
->setHwid('HWID')
->setLat(10.12345)
->setLng(28.12345);
// Call the '/getNearestZone' Web Service
$response = $pushwoosh->getNearestZone($request);
if($response->isOk()) {
print 'Zone name : ' . $response->getResponse()->getName();
print 'Latitude : ' . $response->getResponse()->getLat();
print 'Longitude : ' . $response->getResponse()->getLng();
print 'Range : ' . $response->getResponse()->getRange();
print 'Distance : ' . $response->getResponse()->getDistance();
} else {
print 'Oups, the operation failed :-(';
print 'Status code : ' . $response->getStatusCode();
print 'Status message : ' . $response->getStatusMessage();
}
?>