| 1 | <?php |
||
| 10 | class CustomerContact implements CreatableFromArray |
||
| 11 | { |
||
| 12 | /** |
||
| 13 | * @var string |
||
| 14 | */ |
||
| 15 | private $name; |
||
| 16 | |||
| 17 | /** |
||
| 18 | * @var string |
||
| 19 | */ |
||
| 20 | private $email; |
||
| 21 | |||
| 22 | /** |
||
| 23 | * @var string |
||
| 24 | */ |
||
| 25 | private $phone; |
||
| 26 | |||
| 27 | /** |
||
| 28 | * @return string |
||
| 29 | */ |
||
| 30 | public function getName(): string |
||
| 34 | |||
| 35 | /** |
||
| 36 | * @param string $name |
||
| 37 | * |
||
| 38 | * @return CustomerContact |
||
| 39 | */ |
||
| 40 | public function withName(string $name) |
||
| 47 | |||
| 48 | /** |
||
| 49 | * @return string |
||
| 50 | */ |
||
| 51 | public function getEmail(): string |
||
| 55 | |||
| 56 | /** |
||
| 57 | * @param string $email |
||
| 58 | * |
||
| 59 | * @return CustomerContact |
||
| 60 | */ |
||
| 61 | public function setEmail(string $email) |
||
| 68 | |||
| 69 | /** |
||
| 70 | * @return string |
||
| 71 | */ |
||
| 72 | public function getPhone(): string |
||
| 76 | |||
| 77 | /** |
||
| 78 | * @param string $phone |
||
| 79 | * |
||
| 80 | * @return CustomerContact |
||
| 81 | */ |
||
| 82 | public function setPhone(string $phone) |
||
| 89 | |||
| 90 | 2 | public function toArray() |
|
| 105 | |||
| 106 | /** |
||
| 107 | * Create an API response object from the HTTP response from the API server. |
||
| 108 | * |
||
| 109 | * @param array $data |
||
| 110 | * |
||
| 111 | * @return self |
||
| 112 | */ |
||
| 113 | 4 | public static function createFromArray(array $data) |
|
| 122 | } |
||
| 123 |