1 | <?php |
||
4 | class Referral |
||
5 | { |
||
6 | |||
7 | /** |
||
8 | * @var mixed |
||
9 | */ |
||
10 | protected $ref; |
||
11 | |||
12 | /** |
||
13 | * @var string |
||
14 | */ |
||
15 | protected $source; |
||
16 | |||
17 | /** |
||
18 | * @var string |
||
19 | */ |
||
20 | protected $type; |
||
21 | |||
22 | /** |
||
23 | * Referral constructor. |
||
24 | * |
||
25 | * @param $ref |
||
26 | * @param string $source |
||
27 | * @param string $type |
||
28 | */ |
||
29 | public function __construct($ref, string $source, string $type) |
||
35 | |||
36 | /** |
||
37 | * @return mixed |
||
38 | */ |
||
39 | public function getRef() |
||
43 | |||
44 | /** |
||
45 | * @return string |
||
46 | */ |
||
47 | public function getSource(): string |
||
51 | |||
52 | /** |
||
53 | * @return string |
||
54 | */ |
||
55 | public function getType(): string |
||
59 | |||
60 | /** |
||
61 | * @param array $payload |
||
62 | * @return static |
||
63 | */ |
||
64 | public static function create(array $payload) |
||
68 | } |
||
69 |