speedfin / financial-calculators
Wrapper for speedfin financial calculators API
2.0.8
2025-01-20 09:48 UTC
Requires
- php: >=8.2
- symfony/config: ^7.2
- symfony/dependency-injection: ^7.2
- symfony/http-client: ^7.2
Requires (Dev)
- rector/rector: ^0.15.2
- dev-master
- 2.0.8
- 2.0.7
- 2.0.6
- 2.0.5
- 2.0.4
- 2.0.3
- 2.0.2
- 2.0.1
- 2.0
- 1.60
- 1.59
- 1.58
- 1.57
- 1.56
- 1.55
- 1.54
- 1.53
- 1.52
- 1.51
- 1.50
- 1.49
- 1.48
- 1.47
- 1.46
- 1.45
- 1.44
- 1.43
- 1.42
- 1.41
- 1.40
- 1.39
- 1.38
- 1.37
- 1.36
- 1.35
- 1.34
- 1.33
- 1.32
- 1.31
- 1.30
- 1.29
- 1.28
- 1.27
- 1.26
- 1.25
- 1.24
- 1.23
- 1.22
- 1.21
- 1.20
- 1.19
- 1.18
- 1.17
- 1.16
- 1.15
- 1.14
- 1.13
- 1.12
- 1.11
- 1.10
- 1.09
- 1.08
- 1.07
- 1.06
- 1.05
- 1.04
- 1.03
- 1.02
- 1.01
- 1.0
- dev-FIN-272
- dev-develop
This package is auto-updated.
Last update: 2025-04-25 10:04:30 UTC
README
Wrapper for speedfin financial calculators API.
Installation
The bundle can be installed using Composer
composer require speedfin/financial-calculators
Enable bundle in config/bundles.php
Speedfin\Calculators\FinancialCalculatorsBundle::class => ['all' => true],
Create config file speedfin_financial_calculators.yaml in config/packages/
speedfin_financial_calculators:
jwt_token: aaa.bbb.ccc
api_domain: 'http://calculator.localhost:8083'
Parameters:
jwt_token
Required
JWT generate from https://api.speedfin.pl/api/login_check
Usage
You can set values to a filter object either by passing an array to the constructor or by using setters:
use Speedfin\Calculators\Mortgage\Service\Mortgage;
use Speedfin\Calculators\Mortgage\Dao\MortgageFilter;
$mortgageFilter = new MortgageFilter([
'secureValue' => 300000,
'banks' => [1,3,4],
'ability' => [
'households' => [
[
'cars' => 1,
'status' => 'das',
'region' => 'das',
'applicants' => [
[
'name' => 'Imię',
'incomes' => [
[
'id' => 3,
'value' => 3,
]
],
'outcomes' => [
[
'id' => '4'
]
]
]
]
],
[
'cars' => 2,
'status' => 'das',
'region' => 'das',
'applicants' => [
[
'name' => 'Imię',
'incomes' => [
[
'id' => 3,
'value' => 3,
]
],
'outcomes' => [
[
'id' => '4'
]
]
]
]
]
]
]
]);
$mortgageFilter
->setCreditPurpose(2)
->setCreditValue(250000);
$mortgageFilter->addSlice()->setLength(23)->setOffset(5);
$ability = $mortgageFilter->addAbility();
$household = $ability
->addHousehold();
$applicant = $household
->addApplicant()
->setName('Rodzina x');
$applicant
->addOutcome()
->setId(12)
->setValue(323);
$applicant
->addIncome()
->setId(2)
->setPeriodForward(32)
->setValue(321)
->setPeriodForward(2);
$mortgageService = new Mortgage();
$mortgageService->calculate($mortgageFilter);