Skip to content
This repository has been archived by the owner on Dec 18, 2022. It is now read-only.
/ cetelem Public archive

Knihovna pro zjednodušení práce s Webkalkulačkou firmy Cetelem.

Notifications You must be signed in to change notification settings

sunfoxcz/cetelem

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cetelem library

Build Status Scrutinizer Code Quality Code Coverage

Knihovna pro zjednodušení práce s Webkalkulačkou firmy Cetelem. Prozatím koncipována pro framework Nette.

Instalace

composer require sunfoxcz/cetelem:~0.4

Použití

use Sunfox\Cetelem\Cetelem;

$storage = new Nette\Caching\Storages\FileStorage(__DIR__ . '/tmp');
$client = new GuzzleHttp\Client;
$cetelem = new Cetelem(2044576, $client, $storage);
$cetelem->setDebug(TRUE);

// Pokud nepoužíváte v Nette, je dobré dát cache i AnnotationsParseru
\Nette\Reflection\AnnotationsParser::setCacheStorage($storage);

$uver = new Cetelem\CetelemUver;
$uver->kodBaremu = '102';
$uver->kodPojisteni = 'A3';
$uver->cenaZbozi = 12000;
$uver->pocetSplatek = 12;
$uver->primaPlatba = 2000;
$uver->odklad = 2;

$cetelem->calculate($uver);
print_r($uver);