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
OrderSearchRequestModel.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
OrderSearchRequestModel
extends
JsonObjectModel
implements
OrderSearchRequest
21
{
26
protected
$query
;
27
32
protected
$sort
;
33
38
protected
$limit
;
39
44
protected
$offset
;
45
46
50
public
function
__construct
(
51
?
OrderSearchQuery
$query
=
null
,
52
?
OrderSearchSortingCollection
$sort
=
null
,
53
?
int
$limit
=
null
,
54
?
int
$offset
=
null
55
) {
56
$this->query =
$query
;
57
$this->sort =
$sort
;
58
$this->limit =
$limit
;
59
$this->offset =
$offset
;
60
}
61
68
public
function
getQuery
()
69
{
70
if
(is_null($this->query)) {
72
$data = $this->
raw
(self::FIELD_QUERY);
73
if
(is_null($data)) {
74
return
null
;
75
}
76
77
$this->query =
OrderSearchQueryModel::of
($data);
78
}
79
80
return
$this->query
;
81
}
82
89
public
function
getSort
()
90
{
91
if
(is_null($this->sort)) {
93
$data = $this->
raw
(self::FIELD_SORT);
94
if
(is_null($data)) {
95
return
null
;
96
}
97
$this->sort =
OrderSearchSortingCollection::fromArray
($data);
98
}
99
100
return
$this->sort
;
101
}
102
109
public
function
getLimit
()
110
{
111
if
(is_null($this->limit)) {
113
$data = $this->
raw
(self::FIELD_LIMIT);
114
if
(is_null($data)) {
115
return
null
;
116
}
117
$this->limit = (int) $data;
118
}
119
120
return
$this->limit
;
121
}
122
129
public
function
getOffset
()
130
{
131
if
(is_null($this->offset)) {
133
$data = $this->
raw
(self::FIELD_OFFSET);
134
if
(is_null($data)) {
135
return
null
;
136
}
137
$this->offset = (int) $data;
138
}
139
140
return
$this->offset
;
141
}
142
143
147
public
function
setQuery
(?
OrderSearchQuery
$query
): void
148
{
149
$this->query =
$query
;
150
}
151
155
public
function
setSort
(?
OrderSearchSortingCollection
$sort
): void
156
{
157
$this->sort =
$sort
;
158
}
159
163
public
function
setLimit
(?
int
$limit
): void
164
{
165
$this->limit =
$limit
;
166
}
167
171
public
function
setOffset
(?
int
$offset
): void
172
{
173
$this->offset =
$offset
;
174
}
175
}
Commercetools\Api\Models\Order\OrderSearchRequestModel
Definition
OrderSearchRequestModel.php:21
Commercetools\Api\Models\Order\OrderSearchRequestModel\$offset
$offset
Definition
OrderSearchRequestModel.php:44
Commercetools\Api\Models\Order\OrderSearchRequestModel\$sort
$sort
Definition
OrderSearchRequestModel.php:32
Commercetools\Api\Models\Order\OrderSearchRequestModel\$query
$query
Definition
OrderSearchRequestModel.php:26
Commercetools\Api\Models\Order\OrderSearchRequestModel\getLimit
getLimit()
Definition
OrderSearchRequestModel.php:109
Commercetools\Api\Models\Order\OrderSearchRequestModel\setOffset
setOffset(?int $offset)
Definition
OrderSearchRequestModel.php:171
Commercetools\Api\Models\Order\OrderSearchRequestModel\$limit
$limit
Definition
OrderSearchRequestModel.php:38
Commercetools\Api\Models\Order\OrderSearchRequestModel\getQuery
getQuery()
Definition
OrderSearchRequestModel.php:68
Commercetools\Api\Models\Order\OrderSearchRequestModel\setQuery
setQuery(?OrderSearchQuery $query)
Definition
OrderSearchRequestModel.php:147
Commercetools\Api\Models\Order\OrderSearchRequestModel\setLimit
setLimit(?int $limit)
Definition
OrderSearchRequestModel.php:163
Commercetools\Api\Models\Order\OrderSearchRequestModel\setSort
setSort(?OrderSearchSortingCollection $sort)
Definition
OrderSearchRequestModel.php:155
Commercetools\Api\Models\Order\OrderSearchRequestModel\__construct
__construct(?OrderSearchQuery $query=null, ?OrderSearchSortingCollection $sort=null, ?int $limit=null, ?int $offset=null)
Definition
OrderSearchRequestModel.php:50
Commercetools\Api\Models\Order\OrderSearchRequestModel\getOffset
getOffset()
Definition
OrderSearchRequestModel.php:129
Commercetools\Api\Models\Order\OrderSearchRequestModel\getSort
getSort()
Definition
OrderSearchRequestModel.php:89
Commercetools\Api\Models\Order\OrderSearchSortingCollection
Definition
OrderSearchSortingCollection.php:22
Commercetools\Base\BaseJsonObject\raw
raw(string $field)
Definition
BaseJsonObject.php:57
Commercetools\Base\BaseJsonObject\of
static of($data=null)
Definition
BaseJsonObject.php:26
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\OrderSearchQuery
Definition
OrderSearchQuery.php:15
Commercetools\Api\Models\Order\OrderSearchRequest
Definition
OrderSearchRequest.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