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