speedfin/financial-calculators
最新稳定版本:3.1.5
Composer 安装命令:
composer require speedfin/financial-calculators
包简介
Wrapper for speedfin financial calculators API
README 文档
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);
统计信息
- 总下载量: 2.81k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2021-05-31