EkomiRequestPutClient

Class PutClient.

Defined (1)

The class is defined in the following location(s).

/includes/libraries/Ekomi/Request/PutClient.php  
  1. class PutClient extends AbstractRequest{ 
  2.  
  3. private $clientId; 
  4. private $email; 
  5. private $locale; 
  6. private $screenname; 
  7. private $firstname; 
  8. private $lastname; 
  9. private $country; 
  10. private $city; 
  11. private $zip; 
  12. private $gender; 
  13. private $birthday; 
  14. private $metaData; 
  15. /** 
  16. * @var string 
  17. */ 
  18. private $update = 'true'; 
  19.  
  20. /** 
  21. * Exclude parameters from SOAP Call 
  22. * SOAP API Does not support update parameter 
  23. * @var array 
  24. */ 
  25. protected $soapExcludeItems = array('type', 'update'); 
  26.  
  27. public function getName() { 
  28. return 'putClient'; 
  29.  
  30. public function getQuery($type='CURL') { 
  31. $query = array( 
  32. 'auth' => '',  
  33. 'version' => $this->getVersion(),  
  34. 'type' => $this->getType(),  
  35. 'client_id' => $this->getclientId(),  
  36. 'email' => $this->getEmail(),  
  37. 'locale' => $this->getLocale(),  
  38. 'screenname' => $this->getScreenname(),  
  39. 'firstname' => $this->getFirstname(),  
  40. 'lastname' => $this->getLastname(),  
  41. 'country' => $this->getCountry(),  
  42. 'city' => $this->getCity(),  
  43. 'zip' => $this->getZip(),  
  44. 'gender' => $this->getGender(),  
  45. 'birthday' => $this->getBirthday(),  
  46. 'metadata' => json_encode($this->getMetaData()),  
  47. 'update' => $this->getUpdate(),  
  48. 'charset' => $this->getCharset() 
  49. ); 
  50.  
  51. if($type==='SOAP') { 
  52. return $this->unsetItemsInArray($query); 
  53.  
  54. return $query; 
  55.  
  56. /** 
  57. * Add Meta Data 
  58. * @param $key 
  59. * @param $value 
  60. * @return PutClient 
  61. */ 
  62. public function addMetaData($key, $value) { 
  63. $this->metaData[$key] = $value; 
  64. return $this; 
  65.  
  66. /** 
  67. * @return mixed 
  68. */ 
  69. public function getClientId() 
  70. return $this->clientId; 
  71.  
  72. /** 
  73. * @param mixed $clientId 
  74. * @return PutClient 
  75. */ 
  76. public function setClientId($clientId) 
  77. $this->clientId = $clientId; 
  78. return $this; 
  79.  
  80. /** 
  81. * @return mixed 
  82. */ 
  83. public function getEmail() 
  84. return $this->email; 
  85.  
  86. /** 
  87. * @param mixed $email 
  88. * @return PutClient 
  89. */ 
  90. public function setEmail($email) 
  91. $this->email = $email; 
  92. return $this; 
  93.  
  94. /** 
  95. * @return mixed 
  96. */ 
  97. public function getLocale() 
  98. return $this->locale; 
  99.  
  100. /** 
  101. * @param mixed $locale 
  102. * @return PutClient 
  103. */ 
  104. public function setLocale($locale) 
  105. $this->locale = $locale; 
  106. return $this; 
  107.  
  108. /** 
  109. * @return mixed 
  110. */ 
  111. public function getScreenname() 
  112. return $this->screenname; 
  113.  
  114. /** 
  115. * @param mixed $screenname 
  116. * @return PutClient 
  117. */ 
  118. public function setScreenname($screenname) 
  119. $this->screenname = $screenname; 
  120. return $this; 
  121.  
  122. /** 
  123. * @return mixed 
  124. */ 
  125. public function getFirstname() 
  126. return $this->firstname; 
  127.  
  128. /** 
  129. * @param mixed $firstname 
  130. * @return PutClient 
  131. */ 
  132. public function setFirstname($firstname) 
  133. $this->firstname = $firstname; 
  134. return $this; 
  135.  
  136. /** 
  137. * @return mixed 
  138. */ 
  139. public function getLastname() 
  140. return $this->lastname; 
  141.  
  142. /** 
  143. * @param mixed $lastname 
  144. * @return PutClient 
  145. */ 
  146. public function setLastname($lastname) 
  147. $this->lastname = $lastname; 
  148. return $this; 
  149.  
  150. /** 
  151. * @return mixed 
  152. */ 
  153. public function getCountry() 
  154. return $this->country; 
  155.  
  156. /** 
  157. * @param mixed $country 
  158. * @return PutClient 
  159. */ 
  160. public function setCountry($country) 
  161. $this->country = $country; 
  162. return $this; 
  163.  
  164. /** 
  165. * @return mixed 
  166. */ 
  167. public function getCity() 
  168. return $this->city; 
  169.  
  170. /** 
  171. * @param mixed $city 
  172. * @return PutClient 
  173. */ 
  174. public function setCity($city) 
  175. $this->city = $city; 
  176. return $this; 
  177.  
  178. /** 
  179. * @return mixed 
  180. */ 
  181. public function getZip() 
  182. return $this->zip; 
  183.  
  184. /** 
  185. * @param mixed $zip 
  186. * @return PutClient 
  187. */ 
  188. public function setZip($zip) 
  189. $this->zip = $zip; 
  190. return $this; 
  191.  
  192. /** 
  193. * @return mixed 
  194. */ 
  195. public function getGender() 
  196. return $this->gender; 
  197.  
  198. /** 
  199. * @param mixed $gender 
  200. * @return PutClient 
  201. */ 
  202. public function setGender($gender) 
  203. $this->gender = $gender; 
  204. return $this; 
  205.  
  206. /** 
  207. * @return mixed 
  208. */ 
  209. public function getBirthday() 
  210. return $this->birthday; 
  211.  
  212. /** 
  213. * @param mixed $birthday 
  214. * @return PutClient 
  215. */ 
  216. public function setBirthday($birthday) 
  217. $this->birthday = $birthday; 
  218. return $this; 
  219.  
  220. /** 
  221. * @return mixed 
  222. */ 
  223. public function getMetaData() 
  224. return $this->metaData; 
  225.  
  226. /** 
  227. * @param mixed $metaData 
  228. * @return PutClient 
  229. */ 
  230. public function setMetaData($metaData) 
  231. $this->metaData = $metaData; 
  232. return $this; 
  233.  
  234. /** 
  235. * @return string 
  236. */ 
  237. public function getUpdate() 
  238. return $this->update; 
  239.  
  240. /** 
  241. * @param string $update 
  242. * @return PutClient 
  243. */ 
  244. public function setUpdate($update) 
  245. $this->update = $update; 
  246. return $this; 
  247.