1: <?php
2:
3: namespace ShippoClient\Http\Response;
4:
5: use ShippoClient\Entity\Refund;
6: use ShippoClient\Entity\RefundCollection;
7:
8: class RefundList extends ListResponse
9: {
10: /**
11: * @return RefundCollection
12: */
13: public function getResults()
14: {
15: $entities = [];
16: foreach ($this->attributes->mayHave('results')->asArray() as $attributes) {
17: $entities[] = new Refund($attributes);
18: }
19:
20: return new RefundCollection($entities);
21: }
22: }
23: