Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
100.00% |
15 / 15 |
|
100.00% |
15 / 15 |
CRAP | |
100.00% |
1 / 1 |
Bill | |
100.00% |
15 / 15 |
|
100.00% |
15 / 15 |
15 | |
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 | |||
getType | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
setType | |
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 | |||
getResponseListName | |
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 billing history information. |
11 | */ |
12 | class Bill extends Model |
13 | { |
14 | protected int $id; |
15 | protected string $date; |
16 | protected string $type; |
17 | protected string $description; |
18 | protected float $amount; |
19 | protected float $balance; |
20 | |
21 | public function getId() : int |
22 | { |
23 | return $this->id; |
24 | } |
25 | |
26 | public function setId(int $id) : void |
27 | { |
28 | $this->id = $id; |
29 | } |
30 | |
31 | public function getDate() : string |
32 | { |
33 | return $this->date; |
34 | } |
35 | |
36 | public function setDate(string $date) : void |
37 | { |
38 | $this->date = $date; |
39 | } |
40 | |
41 | public function getType() : string |
42 | { |
43 | return $this->type; |
44 | } |
45 | |
46 | public function setType(string $type) : void |
47 | { |
48 | $this->type = $type; |
49 | } |
50 | |
51 | public function getDescription() : string |
52 | { |
53 | return $this->description; |
54 | } |
55 | |
56 | public function setDescription(string $description) : void |
57 | { |
58 | $this->description = $description; |
59 | } |
60 | |
61 | public function getAmount() : float |
62 | { |
63 | return $this->amount; |
64 | } |
65 | |
66 | public function setAmount(float $amount) : void |
67 | { |
68 | $this->amount = $amount; |
69 | } |
70 | |
71 | public function getBalance() : float |
72 | { |
73 | return $this->balance; |
74 | } |
75 | |
76 | public function setBalance(float $balance) : void |
77 | { |
78 | $this->balance = $balance; |
79 | } |
80 | |
81 | public function getResponseName() : string |
82 | { |
83 | return 'billing_history'; |
84 | } |
85 | |
86 | public function getResponseListName() : string |
87 | { |
88 | return $this->getResponseName(); |
89 | } |
90 | |
91 | public function getModelExceptionClass() : string |
92 | { |
93 | return str_replace('BillException', 'BillingException', parent::getModelExceptionClass()); |
94 | } |
95 | } |