* You can find more informations about quotation's request here : http://ecommerce.envoimoinscher.com/api/documentation/cotations/
 */
require_once '../config/autoload.php';
require_once EMC_PARENT_DIR . 'layout/header.php';
/* for multi quotations, all params are set in a single array with a numeric index from 0.
 * If correctly set, the request response index will be the same as the request numeric index.
 */
$multirequest = array();
// 1st request
$multirequest[0] = array('from' => array('country' => 'FR', 'zipcode' => '38400', 'city' => "Saint Martin d'Hères", 'address' => '13 rue Martin Luther King', 'type' => 'company'), 'to' => array('country' => 'FR', 'zipcode' => '33000', 'city' => 'Bordeaux', 'address' => '24, rue des Ayres', 'type' => 'individual'), 'parcels' => array('type' => 'colis', 'dimensions' => array(1 => array('poids' => 1, 'longueur' => 15, 'largeur' => 16, 'hauteur' => 8))), 'additional_params' => array('collection_date' => date("Y-m-d"), 'delay' => 'aucun', 'content_code' => 10120, 'colis.valeur' => "42.655"));
// 2nd request
$multirequest[1] = array('from' => array('country' => 'FR', 'zipcode' => '75002', 'city' => "Paris", 'address' => '15 rue Marsollier', 'type' => 'company'), 'to' => array('country' => 'FR', 'zipcode' => '33000', 'city' => 'Bordeaux', 'address' => '24, rue des Ayres', 'type' => 'individual'), 'parcels' => array('type' => 'colis', 'dimensions' => array(1 => array('poids' => 1, 'longueur' => 15, 'largeur' => 16, 'hauteur' => 8))), 'additional_params' => array('collection_date' => date("Y-m-d"), 'delay' => 'aucun', 'content_code' => 10120, 'colis.valeur' => "42.655"));
$currency = array('EUR' => '€', 'USD' => '$');
// Prepare and execute the request
$lib = new Quotation();
$lib->getQuotationMulti($multirequest);
if (!$lib->curl_error) {
    ?>
<h3>API Quotation :</h3>
    <div class="row">
        <table class="table table-hover table-striped table-bordered">
            <thead>
                <tr>
                    <th>Operator</th>
                    <th>Offers</th>
                    <th>Price</th>
                    <th>Collect</th>
                    <th>Delivery</th>
                    <th>Details</th>
                    <th>Warning</th>
                    <th>Mandatory informations</th>