1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
namespace ShopifyClient\Resource; |
4
|
|
|
|
5
|
|
|
use ShopifyClient\Action\Action; |
6
|
|
|
use ShopifyClient\Request; |
7
|
|
|
|
8
|
|
|
/** |
9
|
|
|
* @method create(float $parentId, array $parameters = []) |
10
|
|
|
* @method get(float $parentId, float $childId, float $childChildId, array $parameters = []) |
11
|
|
|
* @method all(float $parentId, float $childId, array $parameters = []) |
12
|
|
|
* @method count(float $parentId, float $childId) |
13
|
|
|
* @method update(float $parentId, float $childId, float $childChildId, array $parameters = []) |
14
|
|
|
* @method delete(float $parentId, float $childId, float $childChildId) |
15
|
|
|
*/ |
16
|
|
|
class ArticleMetaField extends MetaField implements Resource |
17
|
|
|
{ |
18
|
|
|
/** |
19
|
|
|
* ArticleMetaField constructor. |
20
|
|
|
* @param Request $request |
21
|
|
|
*/ |
22
|
5 |
|
public function __construct(Request $request) |
23
|
|
|
{ |
24
|
5 |
|
parent::__construct($request); |
25
|
|
|
|
26
|
5 |
|
$this->actions->add( |
27
|
5 |
|
'create', |
28
|
5 |
|
new Action( |
29
|
5 |
|
Request::METHOD_POST, |
30
|
5 |
|
'blogs/%s/articles/%s/metafields.json', |
31
|
5 |
|
'metafield', |
32
|
5 |
|
'metafield' |
33
|
|
|
) |
34
|
|
|
); |
35
|
5 |
|
$this->actions->add( |
36
|
5 |
|
'get', |
37
|
5 |
|
new Action( |
38
|
5 |
|
Request::METHOD_GET, |
39
|
5 |
|
'blogs/%s/articles/%s/metafields/%s.json', |
40
|
5 |
|
'metafield', |
41
|
5 |
|
'metafield' |
42
|
|
|
) |
43
|
|
|
); |
44
|
5 |
|
$this->actions->add( |
45
|
5 |
|
'all', |
46
|
5 |
|
new Action( |
47
|
5 |
|
Request::METHOD_GET, |
48
|
5 |
|
'blogs/%s/articles/%s/metafields.json', |
49
|
5 |
|
'metafields', |
50
|
5 |
|
'metafields' |
51
|
|
|
) |
52
|
|
|
); |
53
|
5 |
|
$this->actions->add( |
54
|
5 |
|
'count', |
55
|
5 |
|
new Action( |
56
|
5 |
|
Request::METHOD_GET, |
57
|
5 |
|
'blogs/%s/articles/%s/metafields/count.json', |
58
|
5 |
|
'count', |
59
|
5 |
|
'count' |
60
|
|
|
) |
61
|
|
|
); |
62
|
5 |
|
$this->actions->add( |
63
|
5 |
|
'update', |
64
|
5 |
|
new Action( |
65
|
5 |
|
Request::METHOD_PUT, |
66
|
5 |
|
'blogs/%s/articles/%s/metafields/%s.json', |
67
|
5 |
|
'metafield', |
68
|
5 |
|
'metafield' |
69
|
|
|
) |
70
|
|
|
); |
71
|
5 |
|
$this->actions->add( |
72
|
5 |
|
'delete', |
73
|
5 |
|
new Action( |
74
|
5 |
|
Request::METHOD_DELETE, |
75
|
5 |
|
'blogs/%s/articles/%s/metafields/%s.json' |
76
|
|
|
) |
77
|
|
|
); |
78
|
5 |
|
} |
79
|
|
|
} |
80
|
|
|
|