Completed
Push — develop ( fbac2a...fa8907 )
by Edwin
04:58
created

Province::get()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 10
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 10
c 0
b 0
f 0
ccs 4
cts 4
cp 1
rs 9.4285
cc 1
eloc 5
nc 1
nop 3
crap 1
1
<?php
2
3
namespace ShopifyClient\Resource;
4
5
/**
6
 * https://help.shopify.com/api/reference/province
7
 *
8
 * @method get(float $parentId, float $childId)
9
 * @method all(float $parentId)
10
 * @method count(float $parentId)
11
 * @method update(float $parentId, float $childId, array $parameters = [])
12
 */
13
class Province extends AbstractResource implements Resource
14
{
15
    /**
16
     * @var array
17
     */
18
    protected $actions = [
19
        'get'    => [
20
            'method'      => 'GET',
21
            'endpoint'    => 'countries/%s/provinces/%s.json',
22
            'resourceKey' => 'province',
23
            'responseKey' => 'province',
24
        ],
25
        'all'    => [
26
            'method'      => 'GET',
27
            'endpoint'    => 'countries/%s/provinces.json',
28
            'resourceKey' => 'provinces',
29
            'responseKey' => 'provinces',
30
        ],
31
        'count'  => [
32
            'method'      => 'GET',
33
            'endpoint'    => 'countries/%s/provinces/count.json',
34
            'resourceKey' => 'count',
35
            'responseKey' => 'count',
36
        ],
37
        'update' => [
38
            'method'      => 'PUT',
39
            'endpoint'    => 'countries/%s/provinces/%s.json',
40
            'resourceKey' => 'province',
41
            'responseKey' => 'province',
42
        ],
43
    ];
44
}
45