Total Complexity | 9 |
Total Lines | 47 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
7 | class ProductResource extends ApiResource |
||
8 | { |
||
9 | public function update(array $data): self |
||
12 | } |
||
13 | |||
14 | public function delete(): void |
||
15 | { |
||
16 | $this->shopify->deleteProduct($this->id); |
||
17 | } |
||
18 | |||
19 | public function publish(): self |
||
20 | { |
||
21 | return $this->update(['published' => true]); |
||
22 | } |
||
23 | |||
24 | public function unpublish(): self |
||
25 | { |
||
26 | return $this->update(['published' => false]); |
||
27 | } |
||
28 | |||
29 | public function getImages(array $params = []): Collection |
||
30 | { |
||
31 | return $this->shopify->getProductImages($this->id, $params); |
||
32 | } |
||
33 | |||
34 | public function getMetafields(array $params = []): Collection |
||
37 | } |
||
38 | |||
39 | public function getVariants(array $params = []): Collection |
||
40 | { |
||
41 | return $this->shopify->getVariants($this->id, $params); |
||
42 | } |
||
43 | |||
44 | public function images(): Collection |
||
48 | } |
||
49 | |||
50 | public function variants(): Collection |
||
54 | } |
||
55 | } |
||
56 |