Skip to content

Commit

Permalink
Support ParcelStatus findAll's
Browse files Browse the repository at this point in the history
  • Loading branch information
casperbakker committed Sep 20, 2023
1 parent 7f1e83e commit 8a280e4
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/Picqer/Carriers/SendCloud/Query/FindAll.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,16 @@ public function collectionFromResult($result)
{
$collection = [];

foreach ($result[$this->namespaces['plural']] as $r) {
$collection[] = new self($this->connection(), $r);
$resultsContainer = $result;
if (isset($result[$this->namespaces['plural']])) {
$resultsContainer = $result[$this->namespaces['plural']];
}

foreach ($resultsContainer as $item) {
$collection[] = new self($this->connection(), $item);
}

return $collection;
}

}
}

0 comments on commit 8a280e4

Please sign in to comment.