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

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

//Paramètres de base
$token = 'test';

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

$key = $token . $publicKey .  $dateFormat;
$hashkey = md5($key);
$StartDate =  DateTime::createFromFormat('d/m/Y', '04/07/2022');
$EndDate = new DateTime("2025-01-01");
// // Init du service
$service = new \SparkWebService(array('cache_wsdl' => WSDL_CACHE_NONE));

// Méthode GetArticles
// Init des paramètres
$request = new \GetTarifs($hashkey,$publicKey, $TarifCode, $StartDate, $EndDate);


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