Passed
Push — master ( 0d508a...6e2a06 )
by Jens
16:22 queued 10s
created

OrderEditDraft::fieldDefinitions()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 9
Code Lines 7

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 7
CRAP Score 1

Importance

Changes 0
Metric Value
eloc 7
dl 0
loc 9
c 0
b 0
f 0
ccs 7
cts 7
cp 1
rs 10
cc 1
nc 1
nop 0
crap 1
1
<?php
2
/**
3
 *
4
 */
5
6
namespace Commercetools\Core\Model\OrderEdit;
7
8
use Commercetools\Core\Model\Common\JsonObject;
9
use Commercetools\Core\Model\CustomField\CustomFieldObjectDraft;
10
use Commercetools\Core\Model\Order\OrderReference;
11
use Commercetools\Core\Request\OrderEdits\StagedOrder\Command\StagedOrderUpdateActionCollection;
12
13
/**
14
 * @package Commercetools\Core\Model\OrderEdit
15
 *
16
 * @method string getKey()
17
 * @method OrderEditDraft setKey(string $key = null)
18
 * @method OrderReference getResource()
19
 * @method OrderEditDraft setResource(OrderReference $resource = null)
20
 * @method StagedOrderUpdateActionCollection getStagedActions()
21
 * @method OrderEditDraft setStagedActions(StagedOrderUpdateActionCollection $stagedActions = null)
22
 * @method CustomFieldObjectDraft getCustom()
23
 * @method OrderEditDraft setCustom(CustomFieldObjectDraft $custom = null)
24
 * @method string getComment()
25
 * @method OrderEditDraft setComment(string $comment = null)
26
 * @method bool getDryRun()
27
 * @method OrderEditDraft setDryRun(bool $dryRun = null)
28
 */
29
class OrderEditDraft extends JsonObject
30
{
31 57
    public function fieldDefinitions()
32
    {
33
        return [
34 57
            'key' => [static::TYPE => 'string'],
35 57
            'resource' => [static::TYPE => OrderReference::class],
36 57
            'stagedActions' => [static::TYPE => StagedOrderUpdateActionCollection::class],
37 57
            'custom' => [static::TYPE => CustomFieldObjectDraft::class],
38 57
            'comment' => [static::TYPE => 'string'],
39 57
            'dryRun' => [static::TYPE => 'bool'],
40
        ];
41
    }
42
}
43