ReceiptDetail.php
2 years ago
ReceiptDetailCollection.php
2 years ago
ReceiptSettings.php
2 years ago
ReceiptDetail.php
40 lines
| 1 | <?php |
| 2 | |
| 3 | namespace Give\Framework\Receipts\Properties; |
| 4 | |
| 5 | use Give\Framework\Support\Contracts\Arrayable; |
| 6 | |
| 7 | class ReceiptDetail implements Arrayable |
| 8 | { |
| 9 | /** |
| 10 | * @var string |
| 11 | */ |
| 12 | public $label; |
| 13 | /** |
| 14 | * @var mixed |
| 15 | */ |
| 16 | public $value; |
| 17 | |
| 18 | /** |
| 19 | * @since 3.0.0 |
| 20 | * |
| 21 | * @param string $label |
| 22 | * @param mixed $value |
| 23 | */ |
| 24 | public function __construct(string $label, $value) { |
| 25 | $this->label = $label; |
| 26 | $this->value = $value; |
| 27 | } |
| 28 | |
| 29 | /** |
| 30 | * @since 3.0.0 |
| 31 | */ |
| 32 | public function toArray(): array |
| 33 | { |
| 34 | return [ |
| 35 | 'label' => $this->label, |
| 36 | 'value' => $this->value, |
| 37 | ]; |
| 38 | } |
| 39 | } |
| 40 |