Skip to content
This repository has been archived by the owner on Oct 24, 2023. It is now read-only.

Commit

Permalink
feat(Project): add messages field to project
Browse files Browse the repository at this point in the history
Closes #239
  • Loading branch information
Jens Schulze committed Aug 5, 2016
1 parent 66a40a9 commit 4deb11f
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
24 changes: 24 additions & 0 deletions src/Model/Message/MessagesConfiguration.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?php
/**
* @author @jayS-de <jens.schulze@commercetools.de>
*/

namespace Commercetools\Core\Model\Message;

use Commercetools\Core\Model\Common\JsonObject;

/**
* @package Commercetools\Core\Model\Message
*
* @method bool getEnabled()
* @method MessagesConfiguration setEnabled(bool $enabled = null)
*/
class MessagesConfiguration extends JsonObject
{
public function fieldDefinitions()
{
return [
'enabled' => [static::TYPE => 'bool'],
];
}
}
4 changes: 4 additions & 0 deletions src/Model/Project/Project.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
use Commercetools\Core\Model\Common\JsonObject;
use Commercetools\Core\Model\Common\Collection;
use Commercetools\Core\Model\Common\DateTimeDecorator;
use Commercetools\Core\Model\Message\MessagesConfiguration;

/**
* @package Commercetools\Core\Model\Project
Expand All @@ -26,6 +27,8 @@
* @method Project setCreatedAt(\DateTime $createdAt = null)
* @method DateTimeDecorator getTrialUntil()
* @method Project setTrialUntil(\DateTime $trialUntil = null)
* @method MessagesConfiguration getMessages()
* @method Project setMessages(MessagesConfiguration $messages = null)
*/
class Project extends JsonObject
{
Expand All @@ -45,6 +48,7 @@ public function fieldDefinitions()
static::TYPE => '\DateTime',
static::DECORATOR => '\Commercetools\Core\Model\Common\DateTimeDecorator'
],
'messages' => [static::TYPE => '\Commercetools\Core\Model\Message\MessagesConfiguration']
];
}
}

0 comments on commit 4deb11f

Please # to comment.