PluginProbe
Billingo Official for WooCommerce / trunk
Billingo Official for WooCommerce vtrunk
4.3.3 4.3.2 trunk 0.0.2 1.0.0 2.0 2.0.0 2.0.1 2.0.2 2.0.3 2.0.4 2.0.5 2.0.6 2.0.7 2.0.8 2.0.9 2.1.0 2.1.1 2.1.2 2.1.3 2.1.4 2.1.5 2.1.6 2.1.7 2.1.8 All 82 releases
billingo / src / Error / BillingoError.php

BillingoError.php in Billingo Official for WooCommerce trunk, at src/Error/BillingoError.php

43 lines 794 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace App\Billingo\Error;
4
5 use App\Billingo\Enums\BillingoErrorEnum;
6 use JsonSerializable;
7
8 class BillingoError implements JsonSerializable
9 {
10
11 public function __construct(private BillingoErrorEnum $type, private ?array $values)
12 {
13 }
14
15 public function jsonSerialize(): array
16 {
17 return [
18 'type' => $this->type->value,
19 'values' => $this->values,
20 ];
21 }
22
23 public function getType(): BillingoErrorEnum
24 {
25 return $this->type;
26 }
27
28 public function setType(BillingoErrorEnum $type): void
29 {
30 $this->type = $type;
31 }
32
33 public function getValues(): ?array
34 {
35 return $this->values;
36 }
37
38 public function setValues(?array $values): void
39 {
40 $this->values = $values;
41 }
42 }
43