Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
100.00% |
12 / 12 |
|
100.00% |
12 / 12 |
CRAP | |
100.00% |
1 / 1 |
Invoice | |
100.00% |
12 / 12 |
|
100.00% |
12 / 12 |
12 | |
100.00% |
1 / 1 |
getId | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
setId | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
getDate | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
setDate | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
getDescription | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
setDescription | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
getAmount | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
setAmount | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
getBalance | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
setBalance | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
getResponseName | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
getModelExceptionClass | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 |
1 | <?php |
2 | |
3 | declare(strict_types=1); |
4 | |
5 | namespace Vultr\VultrPhp\Services\Billing; |
6 | |
7 | use Vultr\VultrPhp\Util\Model; |
8 | |
9 | /** |
10 | * Holds invoice information. |
11 | */ |
12 | class Invoice extends Model |
13 | { |
14 | protected int $id; |
15 | protected string $date; |
16 | protected string $description; |
17 | protected float $amount; |
18 | protected float $balance; |
19 | |
20 | public function getId() : int |
21 | { |
22 | return $this->id; |
23 | } |
24 | |
25 | public function setId(int $id) : void |
26 | { |
27 | $this->id = $id; |
28 | } |
29 | |
30 | public function getDate() : string |
31 | { |
32 | return $this->date; |
33 | } |
34 | |
35 | public function setDate(string $date) : void |
36 | { |
37 | $this->date = $date; |
38 | } |
39 | |
40 | public function getDescription() : string |
41 | { |
42 | return $this->description; |
43 | } |
44 | |
45 | public function setDescription(string $description) : void |
46 | { |
47 | $this->description = $description; |
48 | } |
49 | |
50 | public function getAmount() : float |
51 | { |
52 | return $this->amount; |
53 | } |
54 | |
55 | public function setAmount(float $amount) : void |
56 | { |
57 | $this->amount = $amount; |
58 | } |
59 | |
60 | public function getBalance() : float |
61 | { |
62 | return $this->balance; |
63 | } |
64 | |
65 | public function setBalance(float $balance) : void |
66 | { |
67 | $this->balance = $balance; |
68 | } |
69 | |
70 | public function getResponseName() : string |
71 | { |
72 | return 'billing_invoice'; |
73 | } |
74 | |
75 | public function getModelExceptionClass() : string |
76 | { |
77 | return str_replace('Invoice', 'Billing', parent::getModelExceptionClass()); |
78 | } |
79 | } |