commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
Loading...
Searching...
No Matches
lib
commercetools-api
src
Models
Order
OrderPagedSearchResponseModel.php
1
<?php
2
3
declare(strict_types=1);
9
namespace
Commercetools\Api\Models\Order
;
10
11
use
Commercetools\Base\DateTimeImmutableCollection
;
12
use
Commercetools\Base\JsonObject
;
13
use
Commercetools\Base\JsonObjectModel
;
14
use
Commercetools\Base\MapperFactory
;
15
use stdClass;
16
20
final
class
OrderPagedSearchResponseModel
extends
JsonObjectModel
implements
OrderPagedSearchResponse
21
{
26
protected
$total
;
27
32
protected
$offset
;
33
38
protected
$limit
;
39
44
protected
$hits
;
45
46
50
public
function
__construct
(
51
?
int
$total
=
null
,
52
?
int
$offset
=
null
,
53
?
int
$limit
=
null
,
54
?
HitCollection
$hits
=
null
55
) {
56
$this->total =
$total
;
57
$this->offset =
$offset
;
58
$this->limit =
$limit
;
59
$this->hits =
$hits
;
60
}
61
68
public
function
getTotal
()
69
{
70
if
(is_null($this->total)) {
72
$data = $this->
raw
(self::FIELD_TOTAL);
73
if
(is_null($data)) {
74
return
null
;
75
}
76
$this->total = (int) $data;
77
}
78
79
return
$this->total
;
80
}
81
88
public
function
getOffset
()
89
{
90
if
(is_null($this->offset)) {
92
$data = $this->
raw
(self::FIELD_OFFSET);
93
if
(is_null($data)) {
94
return
null
;
95
}
96
$this->offset = (int) $data;
97
}
98
99
return
$this->offset
;
100
}
101
108
public
function
getLimit
()
109
{
110
if
(is_null($this->limit)) {
112
$data = $this->
raw
(self::FIELD_LIMIT);
113
if
(is_null($data)) {
114
return
null
;
115
}
116
$this->limit = (int) $data;
117
}
118
119
return
$this->limit
;
120
}
121
128
public
function
getHits
()
129
{
130
if
(is_null($this->hits)) {
132
$data = $this->
raw
(self::FIELD_HITS);
133
if
(is_null($data)) {
134
return
null
;
135
}
136
$this->hits =
HitCollection::fromArray
($data);
137
}
138
139
return
$this->hits
;
140
}
141
142
146
public
function
setTotal
(?
int
$total
): void
147
{
148
$this->total =
$total
;
149
}
150
154
public
function
setOffset
(?
int
$offset
): void
155
{
156
$this->offset =
$offset
;
157
}
158
162
public
function
setLimit
(?
int
$limit
): void
163
{
164
$this->limit =
$limit
;
165
}
166
170
public
function
setHits
(?
HitCollection
$hits
): void
171
{
172
$this->hits =
$hits
;
173
}
174
}
Commercetools\Api\Models\Order\HitCollection
Definition
HitCollection.php:22
Commercetools\Api\Models\Order\OrderPagedSearchResponseModel
Definition
OrderPagedSearchResponseModel.php:21
Commercetools\Api\Models\Order\OrderPagedSearchResponseModel\getHits
getHits()
Definition
OrderPagedSearchResponseModel.php:128
Commercetools\Api\Models\Order\OrderPagedSearchResponseModel\setTotal
setTotal(?int $total)
Definition
OrderPagedSearchResponseModel.php:146
Commercetools\Api\Models\Order\OrderPagedSearchResponseModel\$limit
$limit
Definition
OrderPagedSearchResponseModel.php:38
Commercetools\Api\Models\Order\OrderPagedSearchResponseModel\setOffset
setOffset(?int $offset)
Definition
OrderPagedSearchResponseModel.php:154
Commercetools\Api\Models\Order\OrderPagedSearchResponseModel\$total
$total
Definition
OrderPagedSearchResponseModel.php:26
Commercetools\Api\Models\Order\OrderPagedSearchResponseModel\setHits
setHits(?HitCollection $hits)
Definition
OrderPagedSearchResponseModel.php:170
Commercetools\Api\Models\Order\OrderPagedSearchResponseModel\getLimit
getLimit()
Definition
OrderPagedSearchResponseModel.php:108
Commercetools\Api\Models\Order\OrderPagedSearchResponseModel\getOffset
getOffset()
Definition
OrderPagedSearchResponseModel.php:88
Commercetools\Api\Models\Order\OrderPagedSearchResponseModel\setLimit
setLimit(?int $limit)
Definition
OrderPagedSearchResponseModel.php:162
Commercetools\Api\Models\Order\OrderPagedSearchResponseModel\$offset
$offset
Definition
OrderPagedSearchResponseModel.php:32
Commercetools\Api\Models\Order\OrderPagedSearchResponseModel\$hits
$hits
Definition
OrderPagedSearchResponseModel.php:44
Commercetools\Api\Models\Order\OrderPagedSearchResponseModel\__construct
__construct(?int $total=null, ?int $offset=null, ?int $limit=null, ?HitCollection $hits=null)
Definition
OrderPagedSearchResponseModel.php:50
Commercetools\Api\Models\Order\OrderPagedSearchResponseModel\getTotal
getTotal()
Definition
OrderPagedSearchResponseModel.php:68
Commercetools\Base\BaseJsonObject\raw
raw(string $field)
Definition
BaseJsonObject.php:57
Commercetools\Base\DateTimeImmutableCollection
Definition
DateTimeImmutableCollection.php:21
Commercetools\Base\JsonObjectModel
Definition
JsonObjectModel.php:15
Commercetools\Base\MapperFactory
Definition
MapperFactory.php:16
Commercetools\Api\Models\Order\OrderPagedSearchResponse
Definition
OrderPagedSearchResponse.php:15
Commercetools\Base\CSequence\fromArray
static fromArray(array $data)
Commercetools\Base\JsonObject
Definition
JsonObject.php:15
Commercetools\Api\Models\Order
Definition
CustomLineItemImportDraft.php:9
Generated by
1.9.8