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

MeDeleteRequest   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 30
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 1
Metric Value
wmc 3
eloc 5
c 1
b 0
f 1
dl 0
loc 30
ccs 0
cts 7
cp 0
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getPath() 0 3 1
A __construct() 0 3 1
A ofVersion() 0 3 1
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