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