Completed
Pull Request — master (#8)
by Laurens
01:46
created

PayoutInfo::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 7
ccs 0
cts 6
cp 0
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 5
nc 1
nop 4
crap 2
1
<?php
2
3
declare(strict_types=1);
4
5
namespace LauLamanApps\IzettleApi\API\Finance;
6
7
use LauLamanApps\IzettleApi\API\Finance\Enum\Periodicity;
8
use Money\Money;
9
10
final class PayoutInfo
11
{
12
    private $totalBalance;
13
    private $nextPayoutAmount;
14
    private $discountRemaining;
15
    private $periodicity;
16
17
    public function __construct(Money $totalBalance, Money $nextPayoutAmount, Money $discountRemaining, Periodicity $periodicity)
18
    {
19
        $this->totalBalance = $totalBalance;
20
        $this->nextPayoutAmount = $nextPayoutAmount;
21
        $this->discountRemaining = $discountRemaining;
22
        $this->periodicity = $periodicity;
23
    }
24
25
    public function getTotalBalance(): Money
26
    {
27
        return $this->totalBalance;
28
    }
29
30
    public function getNextPayoutAmount(): Money
31
    {
32
        return $this->nextPayoutAmount;
33
    }
34
35
    public function getDiscountRemaining(): Money
36
    {
37
        return $this->discountRemaining;
38
    }
39
40
    public function getPeriodicity(): Periodicity
41
    {
42
        return $this->periodicity;
43
    }
44
}
45