Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
100.00% |
18 / 18 |
|
100.00% |
18 / 18 |
CRAP | |
100.00% |
1 / 1 |
| InvoiceItem | |
100.00% |
18 / 18 |
|
100.00% |
18 / 18 |
18 | |
100.00% |
1 / 1 |
| getDescription | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| setDescription | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| getProduct | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| setProduct | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| getStartDate | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| setStartDate | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| getEndDate | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| setEndDate | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| getUnits | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| setUnits | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| getUnitType | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| setUnitType | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| getUnitPrice | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| setUnitPrice | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| getTotal | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
| setTotal | |
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 item information on a specific invoice. |
| 11 | */ |
| 12 | class InvoiceItem extends Model |
| 13 | { |
| 14 | protected string $description; |
| 15 | protected string $product; |
| 16 | protected string $startDate; |
| 17 | protected string $endDate; |
| 18 | protected int $units; |
| 19 | protected string $unitType; |
| 20 | protected float $unitPrice; |
| 21 | protected float $total; |
| 22 | |
| 23 | public function getDescription() : string |
| 24 | { |
| 25 | return $this->description; |
| 26 | } |
| 27 | |
| 28 | public function setDescription(string $description) : void |
| 29 | { |
| 30 | $this->description = $description; |
| 31 | } |
| 32 | |
| 33 | public function getProduct() : string |
| 34 | { |
| 35 | return $this->product; |
| 36 | } |
| 37 | |
| 38 | public function setProduct(string $product) : void |
| 39 | { |
| 40 | $this->product = $product; |
| 41 | } |
| 42 | |
| 43 | public function getStartDate() : string |
| 44 | { |
| 45 | return $this->startDate; |
| 46 | } |
| 47 | |
| 48 | public function setStartDate(string $start_date) : void |
| 49 | { |
| 50 | $this->startDate = $start_date; |
| 51 | } |
| 52 | |
| 53 | public function getEndDate() : string |
| 54 | { |
| 55 | return $this->endDate; |
| 56 | } |
| 57 | |
| 58 | public function setEndDate(string $end_date) : void |
| 59 | { |
| 60 | $this->endDate = $end_date; |
| 61 | } |
| 62 | |
| 63 | public function getUnits() : int |
| 64 | { |
| 65 | return $this->units; |
| 66 | } |
| 67 | |
| 68 | public function setUnits(int $units) : void |
| 69 | { |
| 70 | $this->units = $units; |
| 71 | } |
| 72 | |
| 73 | public function getUnitType() : string |
| 74 | { |
| 75 | return $this->unitType; |
| 76 | } |
| 77 | |
| 78 | public function setUnitType(string $unit_type) : void |
| 79 | { |
| 80 | $this->unitType = $unit_type; |
| 81 | } |
| 82 | |
| 83 | public function getUnitPrice() : float |
| 84 | { |
| 85 | return $this->unitPrice; |
| 86 | } |
| 87 | |
| 88 | public function setUnitPrice(float $unit_price) : void |
| 89 | { |
| 90 | $this->unitPrice = $unit_price; |
| 91 | } |
| 92 | |
| 93 | public function getTotal() : float |
| 94 | { |
| 95 | return $this->total; |
| 96 | } |
| 97 | |
| 98 | public function setTotal(float $total) : void |
| 99 | { |
| 100 | $this->total = $total; |
| 101 | } |
| 102 | |
| 103 | public function getResponseName() : string |
| 104 | { |
| 105 | return 'invoice_item'; |
| 106 | } |
| 107 | |
| 108 | public function getModelExceptionClass() : string |
| 109 | { |
| 110 | return str_replace('InvoiceItem', 'Billing', parent::getModelExceptionClass()); |
| 111 | } |
| 112 | } |