|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
namespace Picqer\Financials\Exact; |
|
4
|
|
|
|
|
5
|
|
|
/** |
|
6
|
|
|
* Class Me. |
|
7
|
|
|
* |
|
8
|
|
|
* @see https://start.exactonline.nl/docs/HlpRestAPIResourcesDetails.aspx?name=SystemSystemMe |
|
9
|
|
|
* |
|
10
|
|
|
* @property string $UserID Primary key |
|
11
|
|
|
* @property int $CurrentDivision Division number that is currently used in the API. You should use a division number in the url |
|
12
|
|
|
* @property string $DivisionCustomer Owner account of the division |
|
13
|
|
|
* @property string $DivisionCustomerCode Owner account code of the division |
|
14
|
|
|
* @property string $DivisionCustomerName Owner account name of the division |
|
15
|
|
|
* @property string $DivisionCustomerSiretNumber Owner account SIRET Number of the division for French legislation |
|
16
|
|
|
* @property string $DivisionCustomerVatNumber Owner account VAT Number of the division |
|
17
|
|
|
* @property string $Email Email address of the user |
|
18
|
|
|
* @property string $EmployeeID Employee ID |
|
19
|
|
|
* @property string $FirstName First name |
|
20
|
|
|
* @property string $FullName Full name of the user |
|
21
|
|
|
* @property string $Gender Gender: M=Male, V=Female, O=Unknown |
|
22
|
|
|
* @property string $Initials Initials |
|
23
|
|
|
* @property string $Language Language spoken by this user |
|
24
|
|
|
* @property string $LanguageCode Language (culture) that is used in Exact Online |
|
25
|
|
|
* @property string $LastName Last name |
|
26
|
|
|
* @property int64 $Legislation Legislation |
|
27
|
|
|
* @property string $MiddleName Middle name |
|
28
|
|
|
* @property string $Mobile Mobile phone |
|
29
|
|
|
* @property string $Nationality Nationality |
|
30
|
|
|
* @property string $Phone Phone number |
|
31
|
|
|
* @property string $PhoneExtension Phone number extension |
|
32
|
|
|
* @property string $PictureUrl Url that can be used to retrieve the picture of the user |
|
33
|
|
|
* @property string $ServerTime The current date and time in Exact Online |
|
34
|
|
|
* @property float $ServerUtcOffset The time difference with UTC in seconds |
|
35
|
|
|
* @property binary $ThumbnailPicture Binary thumbnail picture of this user |
|
36
|
|
|
* @property string $ThumbnailPictureFormat File type of the picture |
|
37
|
|
|
* @property string $Title Title |
|
38
|
|
|
* @property string $UserName Login name of the user |
|
39
|
|
|
*/ |
|
40
|
|
|
class Me extends Model |
|
41
|
|
|
{ |
|
42
|
|
|
use Query\Findable; |
|
43
|
|
|
use Persistance\Storable; |
|
44
|
|
|
|
|
45
|
|
|
/** |
|
46
|
|
|
* @var string Name of the primary key for this model |
|
47
|
|
|
*/ |
|
48
|
|
|
protected $primaryKey = 'UserID'; |
|
49
|
|
|
|
|
50
|
|
|
protected $fillable = [ |
|
51
|
|
|
'UserID', |
|
52
|
|
|
'CurrentDivision', |
|
53
|
|
|
'DivisionCustomer', |
|
54
|
|
|
'DivisionCustomerCode', |
|
55
|
|
|
'DivisionCustomerName', |
|
56
|
|
|
'DivisionCustomerSiretNumber', |
|
57
|
|
|
'DivisionCustomerVatNumber', |
|
58
|
|
|
'Email', |
|
59
|
|
|
'EmployeeID', |
|
60
|
|
|
'FirstName', |
|
61
|
|
|
'FullName', |
|
62
|
|
|
'Gender', |
|
63
|
|
|
'Initials', |
|
64
|
|
|
'Language', |
|
65
|
|
|
'LanguageCode', |
|
66
|
|
|
'LastName', |
|
67
|
|
|
'Legislation', |
|
68
|
|
|
'MiddleName', |
|
69
|
|
|
'Mobile', |
|
70
|
|
|
'Nationality', |
|
71
|
|
|
'Phone', |
|
72
|
|
|
'PhoneExtension', |
|
73
|
|
|
'PictureUrl', |
|
74
|
|
|
'ServerTime', |
|
75
|
|
|
'ServerUtcOffset', |
|
76
|
|
|
'ThumbnailPicture', |
|
77
|
|
|
'ThumbnailPictureFormat', |
|
78
|
|
|
'Title', |
|
79
|
|
|
'UserName', |
|
80
|
|
|
]; |
|
81
|
|
|
|
|
82
|
|
|
protected $url = 'current/Me'; |
|
83
|
|
|
|
|
84
|
|
|
public function find() |
|
85
|
|
|
{ |
|
86
|
|
|
$result = $this->connection()->get($this->url); |
|
87
|
|
|
|
|
88
|
|
|
return new self($this->connection(), $result); |
|
89
|
|
|
} |
|
90
|
|
|
|
|
91
|
|
|
public function findWithSelect($select = '') |
|
92
|
|
|
{ |
|
93
|
|
|
$result = $this->connection()->get($this->url, [ |
|
94
|
|
|
'$select' => $select, |
|
95
|
|
|
]); |
|
96
|
|
|
|
|
97
|
|
|
return new self($this->connection(), $result); |
|
98
|
|
|
} |
|
99
|
|
|
} |
|
100
|
|
|
|