Passed
Push — develop ( 92e1e8...d25e3e )
by Jens
12:17
created

OrderEditDeleteByKeyRequest   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 2
eloc 4
dl 0
loc 25
c 0
b 0
f 0
ccs 5
cts 5
cp 1
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A ofKeyAndVersion() 0 3 1
A __construct() 0 3 1
1
<?php
2
/**
3
 *
4
 */
5
6
namespace Commercetools\Core\Request\OrderEdits;
7
8
use Commercetools\Core\Model\Common\Context;
9
use Commercetools\Core\Model\OrderEdit\OrderEdit;
10
use Commercetools\Core\Request\AbstractDeleteByKeyRequest;
11
use Commercetools\Core\Response\ApiResponseInterface;
12
use Commercetools\Core\Model\MapperInterface;
13
14
/**
15
 * @package Commercetools\Core\Request\OrderEdits
16
 *
17
 * @method OrderEdit mapResponse(ApiResponseInterface $response)
18
 * @method OrderEdit mapFromResponse(ApiResponseInterface $response, MapperInterface $mapper = null)
19
 */
20
class OrderEditDeleteByKeyRequest extends AbstractDeleteByKeyRequest
21
{
22
//    use DataErasureTrait;
23
24
    protected $resultClass = OrderEdit::class;
25
26
    /**
27
     * @param string $id
28
     * @param int $version
29
     * @param Context $context
30
     */
31 3
    public function __construct($id, $version, Context $context = null)
32
    {
33 3
        parent::__construct(OrderEditsEndpoint::endpoint(), $id, $version, $context);
34 3
    }
35
36
    /**
37
     * @param string $key
38
     * @param int $version
39
     * @param Context $context
40
     * @return static
41
     */
42 3
    public static function ofKeyAndVersion($key, $version, Context $context = null)
43
    {
44 3
        return new static($key, $version, $context);
45
    }
46
}
47