<?php
require dirname(__FILE__) . '/../../autoload.php';

// Init du service
$service = new \SparkWebService(array('cache_wsdl' => WSDL_CACHE_NONE));

$token = 'test';

// Méthode UpdateClient 
// Init des paramètres

$date = new DateTime();
$dateFormat = $date->format('Ymd');
$publicKey = md5(uniqid('SparkWeb'));

$key = $token . $publicKey .  $dateFormat;
$hashkey = md5($key);



$ClientId = "C20000120";
$WebClientId = "WEB-CLIENT-0122";
$Email = "new-email@email.fr"; 

// Appel de la requête
$request = new \UpdateEmail($hashkey,$publicKey,$ClientId, $WebClientId, $Email);

// Récupération de la réponse
$response = $service->UpdateEmail($request);
var_dump($response);