Conditions | 1 |
Paths | 1 |
Total Lines | 11 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
27 | public function getMetafields () { |
||
28 | assert($this->hasId()); |
||
29 | // the endpoints are all over the place. |
||
30 | // querying the main directory works for all entities. |
||
31 | $remote = $this->api->get('metafields', [ |
||
32 | 'metafield[owner_id]' => $this->getId(), |
||
33 | 'metafield[owner_resource]' => $this->_metafieldType() |
||
34 | ]); |
||
35 | /** @var AbstractEntity $that */ |
||
36 | $that = $this; |
||
37 | return $this->api->factoryAll($that, Metafield::class, $remote['metafields']); |
||
38 | } |
||
54 | } |