PHP code example of apihub-cdc / rcc-light-simulacion
1. Go to this page and download the library: Download apihub-cdc/rcc-light-simulacion library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
apihub-cdc / rcc-light-simulacion example snippets
public function setUp()
{
$config = new \RccLightSimulacion\Client\Configuration();
$config->setHost('the_url');
$client = new \GuzzleHttp\Client();
$this->apiInstance = new \RccLightSimulacion\Client\Api\ReporteDeCreditoConsolidadoLightFICOScorePLDApi($client, $config);
$this->x_api_key = "your_api_key";
}
/**
* Este es el método que se será ejecutado en la prueba ubicado en path/to/repository/test/Api/ReporteDeCreditoConsolidadoLightFICOScorePLDApiTest.php
*/
public function testGetFullReporte()
{
$x_full_report = true;
$request = new \RccLightSimulacion\Client\Model\PersonaPeticion();
$request->setPrimerNombre("xxxxx");
$request->setSegundoNombre(null);
$request->setApellidoPaterno("xxxxx");
$request->setApellidoMaterno("xxxxx");
$request->setApellidoAdicional(null);
$request->setFechaNacimiento("yyyy-MM-dd");
try {
$result = $this->apiInstance->getReporte($this->x_api_key, $request, $x_full_report);
$this->assertNotNull($result);
echo "testGetFullReporte finished\n";
} catch (Exception $e) {
echo 'Exception when calling ReporteDeCreditoConsolidadoLightFICOScorePLDApi->getReporte: ', $e->getMessage(), PHP_EOL;
}
}
sh
#ejemplo con php en versión 7.3 para otra versión colocar php{version}-curl
apt-get install php7.3-curl
apt-get install php7.3-mbstring
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.