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