| 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 | public function __construct() |
||
| 30 | |||
| 31 | /** |
||
| 32 | * @return string |
||
| 33 | */ |
||
| 34 | public function getName(): string |
||
| 38 | |||
| 39 | /** |
||
| 40 | * @param string $name |
||
| 41 | * |
||
| 42 | * @return CustomerContact |
||
| 43 | */ |
||
| 44 | public function withName(string $name) |
||
| 51 | |||
| 52 | /** |
||
| 53 | * @return string |
||
| 54 | */ |
||
| 55 | public function getEmail(): string |
||
| 59 | |||
| 60 | /** |
||
| 61 | * @param string $email |
||
| 62 | * |
||
| 63 | * @return CustomerContact |
||
| 64 | */ |
||
| 65 | public function setEmail(string $email) |
||
| 72 | |||
| 73 | /** |
||
| 74 | * @return string |
||
| 75 | */ |
||
| 76 | public function getPhone(): string |
||
| 80 | |||
| 81 | /** |
||
| 82 | * @param string $phone |
||
| 83 | * |
||
| 84 | * @return CustomerContact |
||
| 85 | */ |
||
| 86 | public function setPhone(string $phone) |
||
| 93 | |||
| 94 | public function toArray() |
||
| 109 | |||
| 110 | /** |
||
| 111 | * Create an API response object from the HTTP response from the API server. |
||
| 112 | * |
||
| 113 | * @param array $data |
||
| 114 | * |
||
| 115 | * @return self |
||
| 116 | */ |
||
| 117 | public static function createFromArray(array $data) |
||
| 126 | } |
||
| 127 |