commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
Loading...
Searching...
No Matches
ShippingMethodPagedQueryResponseModel.php
1<?php
2
3declare(strict_types=1);
10
15use stdClass;
16
21{
26 protected $limit;
27
32 protected $count;
33
38 protected $total;
39
44 protected $offset;
45
50 protected $results;
51
52
56 public function __construct(
57 ?int $limit = null,
58 ?int $count = null,
59 ?int $total = null,
60 ?int $offset = null,
62 ) {
63 $this->limit = $limit;
64 $this->count = $count;
65 $this->total = $total;
66 $this->offset = $offset;
67 $this->results = $results;
68 }
69
76 public function getLimit()
77 {
78 if (is_null($this->limit)) {
80 $data = $this->raw(self::FIELD_LIMIT);
81 if (is_null($data)) {
82 return null;
83 }
84 $this->limit = (int) $data;
85 }
86
87 return $this->limit;
88 }
89
96 public function getCount()
97 {
98 if (is_null($this->count)) {
100 $data = $this->raw(self::FIELD_COUNT);
101 if (is_null($data)) {
102 return null;
103 }
104 $this->count = (int) $data;
105 }
106
107 return $this->count;
108 }
109
120 public function getTotal()
121 {
122 if (is_null($this->total)) {
124 $data = $this->raw(self::FIELD_TOTAL);
125 if (is_null($data)) {
126 return null;
127 }
128 $this->total = (int) $data;
129 }
130
131 return $this->total;
132 }
133
140 public function getOffset()
141 {
142 if (is_null($this->offset)) {
144 $data = $this->raw(self::FIELD_OFFSET);
145 if (is_null($data)) {
146 return null;
147 }
148 $this->offset = (int) $data;
149 }
150
151 return $this->offset;
152 }
153
160 public function getResults()
161 {
162 if (is_null($this->results)) {
164 $data = $this->raw(self::FIELD_RESULTS);
165 if (is_null($data)) {
166 return null;
167 }
168 $this->results = ShippingMethodCollection::fromArray($data);
169 }
170
171 return $this->results;
172 }
173
174
178 public function setLimit(?int $limit): void
179 {
180 $this->limit = $limit;
181 }
182
186 public function setCount(?int $count): void
187 {
188 $this->count = $count;
189 }
190
194 public function setTotal(?int $total): void
195 {
196 $this->total = $total;
197 }
198
202 public function setOffset(?int $offset): void
203 {
204 $this->offset = $offset;
205 }
206
211 {
212 $this->results = $results;
213 }
214}
__construct(?int $limit=null, ?int $count=null, ?int $total=null, ?int $offset=null, ?ShippingMethodCollection $results=null)
static fromArray(array $data)