1
|
|
|
<?php |
2
|
|
|
/** |
3
|
|
|
*/ |
4
|
|
|
|
5
|
|
|
namespace Commercetools\Core\Model\ApiClient; |
6
|
|
|
|
7
|
|
|
use Commercetools\Core\Model\Common\DateDecorator; |
8
|
|
|
use Commercetools\Core\Model\Common\DateTimeDecorator; |
9
|
|
|
use Commercetools\Core\Model\Common\JsonObject; |
10
|
|
|
use DateTime; |
11
|
|
|
|
12
|
|
|
/** |
13
|
|
|
* @package Commercetools\Core\Model\ApiClient |
14
|
|
|
* |
15
|
|
|
* @method string getId() |
16
|
|
|
* @method ApiClient setId(string $id = null) |
17
|
|
|
* @method string getName() |
18
|
|
|
* @method ApiClient setName(string $name = null) |
19
|
|
|
* @method string getScope() |
20
|
|
|
* @method ApiClient setScope(string $scope = null) |
21
|
|
|
* @method DateTimeDecorator getCreatedAt() |
22
|
|
|
* @method ApiClient setCreatedAt(DateTime $createdAt = null) |
23
|
|
|
* @method DateDecorator getLastUsedAt() |
24
|
|
|
* @method ApiClient setLastUsedAt(DateTime $lastUsedAt = null) |
25
|
|
|
* @method string getSecret() |
26
|
|
|
* @method ApiClient setSecret(string $secret = null) |
27
|
|
|
*/ |
28
|
|
|
class ApiClient extends JsonObject |
29
|
|
|
{ |
30
|
3 |
|
public function fieldDefinitions() |
31
|
|
|
{ |
32
|
|
|
return [ |
33
|
3 |
|
'id' => [static::TYPE => 'string'], |
34
|
3 |
|
'name' => [static::TYPE => 'string'], |
35
|
3 |
|
'scope' => [static::TYPE => 'string'], |
36
|
|
|
'createdAt' => [ |
37
|
3 |
|
static::TYPE => DateTime::class, |
38
|
3 |
|
static::DECORATOR => DateTimeDecorator::class |
39
|
|
|
], |
40
|
|
|
'lastUsedAt' => [ |
41
|
3 |
|
static::TYPE => DateTime::class, |
42
|
3 |
|
static::DECORATOR => DateDecorator::class |
43
|
|
|
], |
44
|
3 |
|
'secret' => [static::TYPE => 'string'] |
45
|
|
|
]; |
46
|
|
|
} |
47
|
|
|
} |
48
|
|
|
|