Test Failed
Push — develop ( b3c44f...3a55d2 )
by Jens
10:53
created

MeDeleteRequest::ofVersion()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
eloc 1
dl 0
loc 3
ccs 0
cts 2
cp 0
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 2
crap 2
1
<?php
2
/**
3
 * @author @jenschude <[email protected]>
4
 */
5
6
namespace Commercetools\Core\Request\Me;
7
8
use Commercetools\Core\Model\Common\Context;
9
use Commercetools\Core\Request\AbstractDeleteRequest;
10
use Commercetools\Core\Model\Customer\Customer;
11
use Commercetools\Core\Response\ApiResponseInterface;
12
use Commercetools\Core\Model\MapperInterface;
13
14
/**
15
 * @package Commercetools\Core\Request\Me
16
 * @link https://docs.commercetools.com/http-api-projects-me-profile.html#delete-customer
17
 * @method Customer mapResponse(ApiResponseInterface $response)
18
 * @method Customer mapFromResponse(ApiResponseInterface $response, MapperInterface $mapper = null)
19
 */
20
class MeDeleteRequest extends AbstractDeleteRequest
21
{
22
    protected $resultClass = Customer::class;
23
24
    /**
25
     * @param int $version
26
     * @param Context $context
27
     */
28
    public function __construct($version, Context $context = null)
29
    {
30
        parent::__construct(MeEndpoint::endpoint(), null, $version, $context);
31
    }
32
33
    /**
34
     * @param int $version
35
     * @param Context $context
36
     * @return static
37
     */
38
    public static function ofVersion($version, Context $context = null)
39
    {
40
        return new static($version, $context);
41
    }
42
43
    /**
44
     * @return string
45
     * @internal
46
     */
47
    protected function getPath()
48
    {
49
        return (string)$this->getEndpoint() . $this->getParamString();
50
    }
51
}
52