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

OrderEditDeleteByKeyRequest::ofKeyAndVersion()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
eloc 1
dl 0
loc 3
c 0
b 0
f 0
ccs 2
cts 2
cp 1
rs 10
cc 1
nc 1
nop 3
crap 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