Test Failed
Push — develop ( 1bc728...a00b17 )
by Edwin
03:32
created

AbandonedCheckouts::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 23
Code Lines 16

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 17
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 23
ccs 17
cts 17
cp 1
rs 9.0856
c 0
b 0
f 0
cc 1
eloc 16
nc 1
nop 1
crap 1
1
<?php
2
3
namespace ShopifyClient\Resource;
4
5
use ShopifyClient\Action\Action;
6
use ShopifyClient\Request;
7
8
/**
9
 * https://help.shopify.com/api/reference/abandoned_checkouts
10
 *
11
 * @method all(float $parentId)
12
 * @method count(float $parentId)
13
 */
14
class AbandonedCheckouts extends AbstractResource implements Resource
15
{
16
    /**
17
     * AbandonedCheckouts constructor.
18
     * @param Request $request
19
     */
20 5
    public function __construct(Request $request)
21
    {
22 5
        parent::__construct($request);
23
24 5
        $this->actions->add(
25 5
            'all',
26 5
            new Action(
27 5
                Request::METHOD_GET,
28 5
                'checkouts.json',
29 5
                'checkouts',
30 5
                'checkouts'
31
            )
32
        );
33 5
        $this->actions->add(
34 5
            'count',
35 5
            new Action(
36 5
                Request::METHOD_GET,
37 5
                'checkouts/count.json',
38 5
                'count',
39 5
                'count'
40
            )
41
        );
42 5
    }
43
}
44