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
CustomerSearch
CustomerPagedSearchResponseModel.php
1
<?php
2
3
declare(strict_types=1);
9
namespace
Commercetools\Api\Models\CustomerSearch
;
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
CustomerPagedSearchResponseModel
extends
JsonObjectModel
implements
CustomerPagedSearchResponse
21
{
26
protected
$total
;
27
32
protected
$limit
;
33
38
protected
$offset
;
39
44
protected
$results
;
45
46
50
public
function
__construct
(
51
?
int
$total
=
null
,
52
?
int
$limit
=
null
,
53
?
int
$offset
=
null
,
54
?
CustomerSearchResultCollection
$results
=
null
55
) {
56
$this->total =
$total
;
57
$this->limit =
$limit
;
58
$this->offset =
$offset
;
59
$this->results =
$results
;
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
getLimit
()
89
{
90
if
(is_null($this->limit)) {
92
$data = $this->
raw
(self::FIELD_LIMIT);
93
if
(is_null($data)) {
94
return
null
;
95
}
96
$this->limit = (int) $data;
97
}
98
99
return
$this->limit
;
100
}
101
108
public
function
getOffset
()
109
{
110
if
(is_null($this->offset)) {
112
$data = $this->
raw
(self::FIELD_OFFSET);
113
if
(is_null($data)) {
114
return
null
;
115
}
116
$this->offset = (int) $data;
117
}
118
119
return
$this->offset
;
120
}
121
128
public
function
getResults
()
129
{
130
if
(is_null($this->results)) {
132
$data = $this->
raw
(self::FIELD_RESULTS);
133
if
(is_null($data)) {
134
return
null
;
135
}
136
$this->results =
CustomerSearchResultCollection::fromArray
($data);
137
}
138
139
return
$this->results
;
140
}
141
142
146
public
function
setTotal
(?
int
$total
): void
147
{
148
$this->total =
$total
;
149
}
150
154
public
function
setLimit
(?
int
$limit
): void
155
{
156
$this->limit =
$limit
;
157
}
158
162
public
function
setOffset
(?
int
$offset
): void
163
{
164
$this->offset =
$offset
;
165
}
166
170
public
function
setResults
(?
CustomerSearchResultCollection
$results
): void
171
{
172
$this->results =
$results
;
173
}
174
}
Commercetools\Api\Models\CustomerSearch\CustomerPagedSearchResponseModel
Definition
CustomerPagedSearchResponseModel.php:21
Commercetools\Api\Models\CustomerSearch\CustomerPagedSearchResponseModel\getTotal
getTotal()
Definition
CustomerPagedSearchResponseModel.php:68
Commercetools\Api\Models\CustomerSearch\CustomerPagedSearchResponseModel\getResults
getResults()
Definition
CustomerPagedSearchResponseModel.php:128
Commercetools\Api\Models\CustomerSearch\CustomerPagedSearchResponseModel\setTotal
setTotal(?int $total)
Definition
CustomerPagedSearchResponseModel.php:146
Commercetools\Api\Models\CustomerSearch\CustomerPagedSearchResponseModel\setLimit
setLimit(?int $limit)
Definition
CustomerPagedSearchResponseModel.php:154
Commercetools\Api\Models\CustomerSearch\CustomerPagedSearchResponseModel\getLimit
getLimit()
Definition
CustomerPagedSearchResponseModel.php:88
Commercetools\Api\Models\CustomerSearch\CustomerPagedSearchResponseModel\$total
$total
Definition
CustomerPagedSearchResponseModel.php:26
Commercetools\Api\Models\CustomerSearch\CustomerPagedSearchResponseModel\setOffset
setOffset(?int $offset)
Definition
CustomerPagedSearchResponseModel.php:162
Commercetools\Api\Models\CustomerSearch\CustomerPagedSearchResponseModel\$offset
$offset
Definition
CustomerPagedSearchResponseModel.php:38
Commercetools\Api\Models\CustomerSearch\CustomerPagedSearchResponseModel\__construct
__construct(?int $total=null, ?int $limit=null, ?int $offset=null, ?CustomerSearchResultCollection $results=null)
Definition
CustomerPagedSearchResponseModel.php:50
Commercetools\Api\Models\CustomerSearch\CustomerPagedSearchResponseModel\setResults
setResults(?CustomerSearchResultCollection $results)
Definition
CustomerPagedSearchResponseModel.php:170
Commercetools\Api\Models\CustomerSearch\CustomerPagedSearchResponseModel\$limit
$limit
Definition
CustomerPagedSearchResponseModel.php:32
Commercetools\Api\Models\CustomerSearch\CustomerPagedSearchResponseModel\getOffset
getOffset()
Definition
CustomerPagedSearchResponseModel.php:108
Commercetools\Api\Models\CustomerSearch\CustomerPagedSearchResponseModel\$results
$results
Definition
CustomerPagedSearchResponseModel.php:44
Commercetools\Api\Models\CustomerSearch\CustomerSearchResultCollection
Definition
CustomerSearchResultCollection.php:22
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\CustomerSearch\CustomerPagedSearchResponse
Definition
CustomerPagedSearchResponse.php:15
Commercetools\Base\CSequence\fromArray
static fromArray(array $data)
Commercetools\Base\JsonObject
Definition
JsonObject.php:15
Commercetools\Api\Models\CustomerSearch
Definition
CustomerIndexingProgress.php:9
Generated by
1.9.8