Initial commit
This commit is contained in:
52
api-wiaas/server/components/v1/financing/FinancingModel.php
Normal file
52
api-wiaas/server/components/v1/financing/FinancingModel.php
Normal file
@@ -0,0 +1,52 @@
|
||||
<?php
|
||||
|
||||
class FinancingModel{
|
||||
/**
|
||||
* get interest rate
|
||||
* @return HashArray interest rate value
|
||||
*/
|
||||
public function getInterestRate(){
|
||||
$interestRate = new InterestRate();
|
||||
return $interestRate->getInterestRate();
|
||||
}
|
||||
|
||||
/**
|
||||
* get interest rate for customers
|
||||
* @return HashArray values for interest rate for each customer
|
||||
*/
|
||||
public function getInterestRateForCustomers(){
|
||||
$interestRate = new InterestRate();
|
||||
return $interestRate->getInterestRateForCustomers();
|
||||
}
|
||||
|
||||
/**
|
||||
* save interest rate
|
||||
* @param Float $interestRateValue interest rate value
|
||||
* @return Array update message
|
||||
*/
|
||||
public function saveInterestRate($interestRateValue){
|
||||
$interestRate = new InterestRate();
|
||||
return $interestRate->saveInterestRate($interestRateValue);
|
||||
}
|
||||
|
||||
/**
|
||||
* get customers discount
|
||||
* @return HashArray customers discount
|
||||
*/
|
||||
public function getCustomersAndDiscount() {
|
||||
$interestRate = new InterestRate();
|
||||
|
||||
return $interestRate->getCustomersAndDiscount();
|
||||
}
|
||||
|
||||
/**
|
||||
* save discount for customer - financing
|
||||
* @param Array $discounts id of the customer and the discount applied for each
|
||||
* @return Array update message
|
||||
*/
|
||||
public function saveCustomersDiscount($discounts) {
|
||||
$interestRate = new InterestRate();
|
||||
|
||||
return $interestRate->saveCustomersDiscount($discounts);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user