Completed
Push — develop ( 046464...9a0cd6 )
by Jens
13:20
created

ShippingMethodDeleteRequest   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 1
Metric Value
wmc 2
lcom 0
cbo 2
dl 0
loc 25
ccs 5
cts 5
cp 1
rs 10
c 1
b 0
f 1

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A ofIdAndVersion() 0 4 1
1
<?php
2
/**
3
 * @author @jayS-de <[email protected]>
4
 */
5
6
namespace Commercetools\Core\Request\ShippingMethods;
7
8
use Commercetools\Core\Model\Common\Context;
9
use Commercetools\Core\Model\ShippingMethod\ShippingMethod;
10
use Commercetools\Core\Request\AbstractDeleteRequest;
11
use Commercetools\Core\Response\ApiResponseInterface;
12
13
/**
14
 * @package Commercetools\Core\Request\ShippingMethods
15
 * @link https://dev.commercetools.com/http-api-projects-shippingMethods.html#delete-shipping-method
16
 * @method ShippingMethod mapResponse(ApiResponseInterface $response)
17
 */
18
class ShippingMethodDeleteRequest extends AbstractDeleteRequest
19
{
20
    protected $resultClass = '\Commercetools\Core\Model\ShippingMethod\ShippingMethod';
21
22
    /**
23
     * @param string $id
24
     * @param int $version
25
     * @param Context $context
26
     */
27 5
    public function __construct($id, $version, Context $context = null)
28
    {
29 5
        parent::__construct(ShippingMethodsEndpoint::endpoint(), $id, $version, $context);
30 5
    }
31
32
    /**
33
     * @param string $id
34
     * @param int $version
35
     * @param Context $context
36
     * @return static
37
     */
38 5
    public static function ofIdAndVersion($id, $version, Context $context = null)
39
    {
40 5
        return new static($id, $version, $context);
41
    }
42
}
43