Completed
Branch master (9c37c7)
by Jens
07:29
created

CustomerGroup::fieldDefinitions()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 16
Code Lines 11

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 8
CRAP Score 1
Metric Value
dl 0
loc 16
ccs 8
cts 8
cp 1
rs 9.4285
cc 1
eloc 11
nc 1
nop 0
crap 1
1
<?php
2
/**
3
 * @author @jayS-de <[email protected]>
4
 */
5
6
namespace Commercetools\Core\Model\CustomerGroup;
7
8
use Commercetools\Core\Model\Common\Resource;
9
use Commercetools\Core\Model\Common\DateTimeDecorator;
10
11
/**
12
 * @package Commercetools\Core\Model\CustomerGroup
13
 * @link https://dev.commercetools.com/http-api-projects-customerGroups.html#customer-group
14
 * @method string getId()
15
 * @method CustomerGroup setId(string $id = null)
16
 * @method int getVersion()
17
 * @method CustomerGroup setVersion(int $version = null)
18
 * @method DateTimeDecorator getCreatedAt()
19
 * @method CustomerGroup setCreatedAt(\DateTime $createdAt = null)
20
 * @method DateTimeDecorator getLastModifiedAt()
21
 * @method CustomerGroup setLastModifiedAt(\DateTime $lastModifiedAt = null)
22
 * @method string getName()
23
 * @method CustomerGroup setName(string $name = null)
24
 * @method CustomerGroupReference getReference()
25
 */
26
class CustomerGroup extends Resource
27
{
28 7
    public function fieldDefinitions()
29
    {
30
        return [
31 7
            'id' => [static::TYPE => 'string'],
32 7
            'version' => [static::TYPE => 'int'],
33
            'createdAt' => [
34 7
                static::TYPE => '\DateTime',
35 7
                static::DECORATOR => '\Commercetools\Core\Model\Common\DateTimeDecorator'
36
            ],
37
            'lastModifiedAt' => [
38 7
                static::TYPE => '\DateTime',
39 7
                static::DECORATOR => '\Commercetools\Core\Model\Common\DateTimeDecorator'
40
            ],
41 7
            'name' => [static::TYPE => 'string']
42
        ];
43
    }
44
}
45