1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55
<?php
/**
* @author @jenschude <jens.schulze@commercetools.de>
*/
namespace Commercetools\Core\Model\Zone;
use Commercetools\Core\Model\Common\Resource;
use Commercetools\Core\Model\Common\DateTimeDecorator;
use DateTime;
/**
* @package Commercetools\Core\Model\Zone
* @link https://docs.commercetools.com/http-api-projects-zones.html#zone
* @method string getId()
* @method Zone setId(string $id = null)
* @method int getVersion()
* @method Zone setVersion(int $version = null)
* @method DateTimeDecorator getCreatedAt()
* @method Zone setCreatedAt(DateTime $createdAt = null)
* @method DateTimeDecorator getLastModifiedAt()
* @method Zone setLastModifiedAt(DateTime $lastModifiedAt = null)
* @method string getName()
* @method Zone setName(string $name = null)
* @method string getDescription()
* @method Zone setDescription(string $description = null)
* @method LocationCollection getLocations()
* @method Zone setLocations(LocationCollection $locations = null)
* @method string getKey()
* @method Zone setKey(string $key = null)
* @method ZoneReference getReference()
*/
class Zone extends Resource
{
public function fieldDefinitions()
{
return [
'id' => [static::TYPE => 'string'],
'version' => [static::TYPE => 'int'],
'key' => [static::TYPE => 'string', static::OPTIONAL => true],
'createdAt' => [
static::TYPE => DateTime::class,
static::DECORATOR => DateTimeDecorator::class
],
'lastModifiedAt' => [
static::TYPE => DateTime::class,
static::DECORATOR => DateTimeDecorator::class
],
'name' => [static::TYPE => 'string'],
'description' => [static::TYPE => 'string', static::OPTIONAL => true],
'locations' => [static::TYPE => LocationCollection::class],
];
}
}