<?php

require_once dirname(__FILE__) . '/../init.php';
try {
    // Define a url utilizada
    \Gateway\ApiClient::setBaseUrl("");
    // Define a chave da loja
    \Gateway\ApiClient::setMerchantKey("merchant key");
    //Cria um objeto ApiClient
    $client = new Gateway\ApiClient();
    // Faz a chamada para criação
    $file_to_parse = $client->SearchTransactionReportFile('20150928');
    $response = $client->ParseTransactionReportFile($file_to_parse);
    // Imprime responsta
    print "<pre>";
    var_dump($response);
    print "</pre>";
} catch (\Gateway\One\DataContract\Report\ApiError $error) {
    // Imprime json
    print "<pre>";
    print $error;
    print "</pre>";
} catch (Exception $ex) {
    // Imprime json
    print "<pre>";
    print $ex;
    print "</pre>";
}