for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Xsolla\SDK\Webhook;
use Xsolla\SDK\API\XsollaClient;
class User
{
protected $id;
protected $publicId;
protected $name;
protected $email;
protected $phone;
public function getId()
return $this->id;
}
public function setId($id)
$this->id = $id;
return $this;
public function getPublicId()
return $this->publicId;
public function setPublicId($publicId)
$this->publicId = $publicId;
public function getName()
return $this->name;
public function setName($name)
$this->name = $name;
public function getEmail()
return $this->email;
public function setEmail($email)
$this->email = $email;
public function getPhone()
return $this->phone;
public function setPhone($phone)
$this->phone = $phone;
public function toJson()
$response = array();
if ($this->id) {
$response['id'] = $this->id;
if ($this->name) {
$response['name'] = $this->name;
if ($this->publicId) {
$response['public_id'] = $this->publicId;
if ($this->email) {
$response['email'] = $this->email;
if ($this->phone) {
$response['phone'] = $this->phone;
return XsollaClient::jsonEncode(array('user' => $response));