Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updates of project missing parts #6

Open
wants to merge 16 commits into
base: master
Choose a base branch
from
26 changes: 26 additions & 0 deletions src/Api/Employee.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?php

namespace zaporylie\Tripletex\Api;

//use zaporylie\Tripletex\Model\Employee\RequestEmployeeDetails;
use zaporylie\Tripletex\Model\Employee\RequestEmployeeList;
//use zaporylie\Tripletex\Resource\Employee\EmployeeDetails;
use zaporylie\Tripletex\Resource\Employee\EmployeeList;
use zaporylie\Tripletex\Tripletex;

class Employee extends ApiBase
{
/**
* @param array $options
*
* @return \zaporylie\Tripletex\Model\Employee\ResponseEmployeeList
*/
public function getList($options = [])
{
$request = new RequestEmployeeList();
// @todo: Pass options.
$resource = new EmployeeList($this->app);
return $resource->call($request);
}
}
?>
169 changes: 169 additions & 0 deletions src/Model/Employee/RequestEmployeeList.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,169 @@
<?php

namespace zaporylie\Tripletex\Model\Employee;

use JMS\Serializer\Annotation as Serializer;
use zaporylie\Tripletex\Model\IdTrait;
use zaporylie\Tripletex\Model\ModelInterface;
use zaporylie\Tripletex\Model\RequestListBase;

class RequestEmployeeList extends RequestListBase implements ModelInterface
{
use IdTrait;

/**
* @var string
*
* @Serializer\Type("string")
*/
protected $firstName;

/**
* @var string
*
* @Serializer\Type("string")
*/
protected $lastName;

/**
* @var string
*
* @Serializer\Type("string")
*/
protected $employeeNumber;

/**
* @var bool
*
* @Serializer\Type("boolean")
*/
protected $allowInformationRegistration;

/**
* @var string
*
* @Serializer\Type("string")
*/
protected $departmentId;

/**
* @var bool
*
* @Serializer\Type("boolean")
*/
protected $onlyProjectManagers;

/**
* Gets firstName value.
*
* @return string
*/
public function getFirstName()
{
return $this->firstName;
}

/**
* Gets lastName value.
*
* @return string
*/
public function getLastName()
{
return $this->lastName;
}

/**
* Gets employeeNumber value.
*
* @return string
*/
public function getEmployeeNumber()
{
return $this->employeeNumber;
}

/**
* Sets employeeNumber variable.
*
* @param string $employeeNumber
*
* @return $this
*/
public function setEmployeeNumber($employeeNumber)
{
$this->employeeNumber = $employeeNumber;
return $this;
}

/**
* Gets allowInformationRegistration value.
*
* @return bool
*/
public function getAllowInformationRegistration()
{
return $this->allowInformationRegistration;
}

/**
* Sets allowInformationRegistration variable.
*
* @param bool $allowInformationRegistration
*
* @return $this
*/
public function setAllowInformationRegistration($allowInformationRegistration)
{
$this->allowInformationRegistration = $allowInformationRegistration;
return $this;
}

/**
* Gets departmentId value.
*
* @return string
*/
public function getDepartmentId()
{
return $this->departmentId;
}

/**
* Sets departmentId variable.
*
* @param string $departmentId
*
* @return $this
*/
public function setDepartmentId($departmentId)
{
$this->departmentId = $departmentId;
return $this;
}

/**
* Gets onlyProjectManagers value.
*
* @return bool
*/
public function getOnlyProjectManagers()
{
return $this->onlyProjectManagers;
}

/**
* Sets onlyProjectManagers variable.
*
* @param bool $onlyProjectManagers
*
* @return $this
*/
public function setOnlyProjectManagers($onlyProjectManagers)
{
$this->onlyProjectManagers = $onlyProjectManagers;
return $this;
}

}
?>
42 changes: 42 additions & 0 deletions src/Model/Employee/ResponseEmployeeList.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
<?php

namespace zaporylie\Tripletex\Model\Employee;

use JMS\Serializer\Annotation as Serializer;
use zaporylie\Tripletex\Model\ListBase;
use zaporylie\Tripletex\Model\ModelInterface;

class ResponseEmployeeList extends ListBase implements ModelInterface
{

/**
* @var \zaporylie\Tripletex\Model\Employee\Employee[]
*
* @Serializer\Type("array<zaporylie\Tripletex\Model\Employee\Employee>")
*/
protected $values;

/**
* Gets values value.
*
* @return \zaporylie\Tripletex\Model\Employee\Employee[]
*/
public function getValues()
{
return $this->values;
}

/**
* Sets values variable.
*
* @param \zaporylie\Tripletex\Model\Employee\Employee[] $values
*
* @return $this
*/
public function setValues(array $values)
{
$this->values = $values;
return $this;
}
}
?>
41 changes: 41 additions & 0 deletions src/Model/Employee/ResponseEmployeeWrapper.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
<?php

namespace zaporylie\Tripletex\Model\Employee;

use JMS\Serializer\Annotation as Serializer;
use zaporylie\Tripletex\Model\ModelInterface;

class ResponseEmployeeWrapper implements ModelInterface
{

/**
* @var \zaporylie\Tripletex\Model\Employee\Employee
*
* @Serializer\Type("zaporylie\Tripletex\Model\Employee\Employee")
*/
protected $value;

/**
* Gets value value.
*
* @return \zaporylie\Tripletex\Model\Employee\Employee
*/
public function getValue()
{
return $this->value;
}

/**
* Sets value variable.
*
* @param \zaporylie\Tripletex\Model\Employee\Employee $value
*
* @return $this
*/
public function setValue(Employee $value)
{
$this->value = $value;
return $this;
}
}
?>
100 changes: 99 additions & 1 deletion src/Model/Project/Project.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,103 @@ class Project implements ModelInterface
*
* @Serializer\Type("zaporylie\Tripletex\Model\Project\ProjectCategory")
*/
protected $projectCategory; // (ProjectCategory, optional)
protected $projectCategory; // (ProjectCategory, optional),

/**
* @var string
*
* @Serializer\Type("string")
*/
protected $description; // (string, optional),

/**
* @var \zaporylie\Tripletex\Model\Customer\Customer
*
* @Serializer\Type("zaporylie\Tripletex\Model\Customer\Customer")
*/
protected $customer; // (Customer, optional)

/**
* @var bool
*
* @Serializer\Type("boolean")
*/
protected $isClosed; // (boolean, optional),

/**
* @var bool
*
* @Serializer\Type("boolean")
*/

protected $isInternal; // (boolean) Must be set to true. ,

/**
* @var bool
*
* @Serializer\Type("boolean")
*/
protected $isOffer; // (boolean, optional, read only),


/**
* Gets projectManager value.
*
* @return \zaporylie\Tripletex\Model\Employee\Employee
*/
public function getProjectManager()
{
return $this->projectManager;
}

/**
* Gets description value.
*
* @return string
*/
public function getDescription()
{
return $this->description;
}

/**
* Gets customer value.
*
* @return \zaporylie\Tripletex\Model\Customer\Customer
*/
public function getCustomer()
{
return $this->customer;
}

/**
* Gets isClosed value.
*
* @return bool
*/
public function getIsClosed()
{
return $this->isClosed;
}

/**
* Gets isInternal value.
*
* @return bool
*/
public function getIsInternal()
{
return $this->isInternal;
}

/**
* Gets isOffer value.
*
* @return bool
*/
public function getIsOffer()
{
return $this->isOffer;
}
}
?>
Loading