Completed
Push — develop ( f0300a...e5510f )
by
unknown
08:42
created

ShippingMethodDeleteRequest   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 1
Metric Value
wmc 2
lcom 0
cbo 2
dl 0
loc 25
ccs 0
cts 8
cp 0
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
 * @apidoc http://dev.sphere.io/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
    public function __construct($id, $version, Context $context = null)
28
    {
29
        parent::__construct(ShippingMethodsEndpoint::endpoint(), $id, $version, $context);
30
    }
31
32
    /**
33
     * @param string $id
34
     * @param int $version
35
     * @param Context $context
36
     * @return static
37
     */
38
    public static function ofIdAndVersion($id, $version, Context $context = null)
39
    {
40
        return new static($id, $version, $context);
41
    }
42
}
43