Files
old-wiaas-legacy/api-wiaas/server/components/v2/financing/FinancingController.php

36 lines
902 B
PHP
Raw Normal View History

2018-06-11 11:09:35 +02:00
<?php
class FinancingController{
private $model;
function __construct(){
$this->model = new FinancingModel();
}
/**
* get interest rate
* @return json value for intereset rate
*/
public function getInterestRate(){
echo json_encode($this->model->getInterestRate(), JSON_NUMERIC_CHECK);
}
/**
* get interest rate for customers
* @return json values for interest rate for each customer
*/
public function getInterestRateForCustomers(){
echo json_encode($this->model->getInterestRateForCustomers(), JSON_NUMERIC_CHECK);
}
/**
* save interest rate
* @return json update message
*/
public function saveInterestRate(){
$interestRate = isset($_REQUEST['interestRate']) ? $_REQUEST['interestRate'] : 0;
echo json_encode($this->model->saveInterestRate($interestRate));
}
}