1<?php 2/** 3 * OrangeHRM is a comprehensive Human Resource Management (HRM) System that captures 4 * all the essential functionalities required for any enterprise. 5 * Copyright (C) 2006 OrangeHRM Inc., http://www.orangehrm.com 6 * 7 * OrangeHRM is free software; you can redistribute it and/or modify it under the terms of 8 * the GNU General Public License as published by the Free Software Foundation; either 9 * version 2 of the License, or (at your option) any later version. 10 * 11 * OrangeHRM is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; 12 * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 13 * See the GNU General Public License for more details. 14 * 15 * You should have received a copy of the GNU General Public License along with this program; 16 * if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 17 * Boston, MA 02110-1301, USA 18 */ 19 20namespace Orangehrm\Rest\Api\Time\Entity; 21 22use Orangehrm\Rest\Api\Entity\Serializable; 23 24class Customer implements Serializable 25{ 26 /** 27 * @var 28 */ 29 private $customerId; 30 private $name; 31 private $description; 32 private $isDeleted; 33 34 /** 35 * @return mixed 36 */ 37 public function getCustomerId() 38 { 39 return $this->customerId; 40 } 41 42 /** 43 * @param mixed $customerId 44 */ 45 public function setCustomerId($customerId) 46 { 47 $this->customerId = $customerId; 48 } 49 50 /** 51 * @return mixed 52 */ 53 public function getName() 54 { 55 return $this->name; 56 } 57 58 /** 59 * @param mixed $name 60 */ 61 public function setName($name) 62 { 63 $this->name = $name; 64 } 65 66 /** 67 * @return mixed 68 */ 69 public function getDescription() 70 { 71 return $this->description; 72 } 73 74 /** 75 * @param mixed $description 76 */ 77 public function setDescription($description) 78 { 79 $this->description = $description; 80 } 81 82 /** 83 * @return mixed 84 */ 85 public function getIsDeleted() 86 { 87 return $this->isDeleted; 88 } 89 90 /** 91 * @param mixed $isDeleted 92 */ 93 public function setIsDeleted($isDeleted) 94 { 95 $this->isDeleted = $isDeleted; 96 } 97 98 99 100 /** 101 * To array 102 * 103 * @return array 104 */ 105 public function toArray() 106 { 107 return array( 108 'customerId' => $this->getCustomerId(), 109 'name' => $this->getName(), 110 'description' => $this->getDescription(), 111 'isDeleted' => $this->getIsDeleted(), 112 ); 113 } 114 115 /** 116 * Build Customer 117 * 118 * @param \Customer $customer 119 */ 120 public function build(\Customer $customer) 121 { 122 $this->setCustomerId($customer->getCustomerId()); 123 $this->setName($customer->getName()); 124 $this->setIsDeleted($customer->getIsDeleted()); 125 $this->setDescription($customer->getDescription()); 126 } 127}