51 lines
1.2 KiB
PHP
51 lines
1.2 KiB
PHP
<?php
|
|
class SdMetier_Graydon_Service extends Zend_Soap_Client
|
|
{
|
|
protected $PartnerClientId = '32790';
|
|
protected $PartnerUserId = 'SESS38R7';
|
|
protected $ParterPassword = 'E88MSU4p';
|
|
|
|
public function __construct()
|
|
{
|
|
//Set the WSDL
|
|
$this->_wsdl = __DIR__ . DIRECTORY_SEPARATOR . 'GraydonCompanyData.wsdl';
|
|
|
|
//Set options
|
|
$options = array(
|
|
'features' => SOAP_USE_XSI_ARRAY_TYPE + SOAP_SINGLE_ELEMENT_ARRAYS,
|
|
'compression' => SOAP_COMPRESSION_ACCEPT | SOAP_COMPRESSION_GZIP | SOAP_COMPRESSION_DEFLATE,
|
|
);
|
|
}
|
|
|
|
/**
|
|
*
|
|
* @return stdClass
|
|
*/
|
|
protected function _AuthenticationParameters()
|
|
{
|
|
$params = new stdClass();
|
|
$params->PartnerUserId = $this->PartnerUserId;
|
|
$params->PartnerPassword = $this->ParterPassword;
|
|
$params->PartnerClientId = '';
|
|
$params->SessionID = '';
|
|
return $params;
|
|
}
|
|
|
|
/**
|
|
*
|
|
* @param string $country
|
|
*/
|
|
public function getCountryAvailability( $country = null )
|
|
{
|
|
$client = $this->getSoapClient();
|
|
|
|
$params = new stdClass();
|
|
$params->Authentication_Parameters = $this->_AuthenticationParameters();
|
|
|
|
if ( $country !== null ) {
|
|
$params->Country = $country;
|
|
}
|
|
|
|
return $client->getCountryAvailability($params);
|
|
}
|
|
} |