commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
lib
commercetools-api
src
Models
CustomerSearch
CustomerSearchRequestBuilder.php
1
<?php
2
3
declare(strict_types=1);
9
namespace
Commercetools\Api\Models\CustomerSearch
;
10
11
use
Commercetools\Api\Models\Search\SearchQuery
;
12
use
Commercetools\Api\Models\Search\SearchQueryBuilder
;
13
use
Commercetools\Api\Models\Search\SearchSortingCollection
;
14
use
Commercetools\Base\Builder
;
15
use
Commercetools\Base\DateTimeImmutableCollection
;
16
use
Commercetools\Base\JsonObject
;
17
use
Commercetools\Base\JsonObjectModel
;
18
use
Commercetools\Base\MapperFactory
;
19
use stdClass;
20
24
final
class
CustomerSearchRequestBuilder
implements
Builder
25
{
30
private
$query;
31
36
private
$sort;
37
42
private
$limit;
43
48
private
$offset;
49
56
public
function
getQuery
()
57
{
58
return
$this->query instanceof
SearchQueryBuilder
? $this->query->
build
() : $this->query;
59
}
60
67
public
function
getSort
()
68
{
69
return
$this->sort;
70
}
71
78
public
function
getLimit
()
79
{
80
return
$this->limit;
81
}
82
89
public
function
getOffset
()
90
{
91
return
$this->offset;
92
}
93
98
public
function
withQuery
(?
SearchQuery
$query)
99
{
100
$this->query = $query;
101
102
return
$this;
103
}
104
109
public
function
withSort
(?
SearchSortingCollection
$sort)
110
{
111
$this->sort = $sort;
112
113
return
$this;
114
}
115
120
public
function
withLimit
(?
int
$limit)
121
{
122
$this->limit = $limit;
123
124
return
$this;
125
}
126
131
public
function
withOffset
(?
int
$offset)
132
{
133
$this->offset = $offset;
134
135
return
$this;
136
}
137
142
public
function
withQueryBuilder
(?
SearchQueryBuilder
$query)
143
{
144
$this->query = $query;
145
146
return
$this;
147
}
148
149
public
function
build
():
CustomerSearchRequest
150
{
151
return
new
CustomerSearchRequestModel
(
152
$this->query instanceof
SearchQueryBuilder
? $this->query->
build
() : $this->query,
153
$this->sort,
154
$this->limit,
155
$this->offset
156
);
157
}
158
159
public
static
function
of
():
CustomerSearchRequestBuilder
160
{
161
return
new
self
();
162
}
163
}
Commercetools\Api\Models\CustomerSearch\CustomerSearchRequestBuilder
Definition:
CustomerSearchRequestBuilder.php:25
Commercetools\Api\Models\CustomerSearch\CustomerSearchRequestBuilder\withLimit
withLimit(?int $limit)
Definition:
CustomerSearchRequestBuilder.php:120
Commercetools\Api\Models\CustomerSearch\CustomerSearchRequestBuilder\getSort
getSort()
Definition:
CustomerSearchRequestBuilder.php:67
Commercetools\Api\Models\CustomerSearch\CustomerSearchRequestBuilder\withQueryBuilder
withQueryBuilder(?SearchQueryBuilder $query)
Definition:
CustomerSearchRequestBuilder.php:142
Commercetools\Api\Models\CustomerSearch\CustomerSearchRequestBuilder\build
build()
Definition:
CustomerSearchRequestBuilder.php:149
Commercetools\Api\Models\CustomerSearch\CustomerSearchRequestBuilder\withOffset
withOffset(?int $offset)
Definition:
CustomerSearchRequestBuilder.php:131
Commercetools\Api\Models\CustomerSearch\CustomerSearchRequestBuilder\of
static of()
Definition:
CustomerSearchRequestBuilder.php:159
Commercetools\Api\Models\CustomerSearch\CustomerSearchRequestBuilder\getOffset
getOffset()
Definition:
CustomerSearchRequestBuilder.php:89
Commercetools\Api\Models\CustomerSearch\CustomerSearchRequestBuilder\withSort
withSort(?SearchSortingCollection $sort)
Definition:
CustomerSearchRequestBuilder.php:109
Commercetools\Api\Models\CustomerSearch\CustomerSearchRequestBuilder\getQuery
getQuery()
Definition:
CustomerSearchRequestBuilder.php:56
Commercetools\Api\Models\CustomerSearch\CustomerSearchRequestBuilder\getLimit
getLimit()
Definition:
CustomerSearchRequestBuilder.php:78
Commercetools\Api\Models\CustomerSearch\CustomerSearchRequestBuilder\withQuery
withQuery(?SearchQuery $query)
Definition:
CustomerSearchRequestBuilder.php:98
Commercetools\Api\Models\CustomerSearch\CustomerSearchRequestModel
Definition:
CustomerSearchRequestModel.php:24
Commercetools\Api\Models\Search\SearchQueryBuilder
Definition:
SearchQueryBuilder.php:22
Commercetools\Api\Models\Search\SearchQueryBuilder\build
build()
Definition:
SearchQueryBuilder.php:23
Commercetools\Api\Models\Search\SearchSortingCollection
Definition:
SearchSortingCollection.php:22
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\CustomerSearchRequest
Definition:
CustomerSearchRequest.php:17
Commercetools\Api\Models\Search\SearchQuery
Definition:
SearchQuery.php:15
Commercetools\Base\Builder
Definition:
Builder.php:16
Commercetools\Base\JsonObject
Definition:
JsonObject.php:15
Commercetools\Api\Models\CustomerSearch
Definition:
CustomerIndexingProgress.php:9
Generated by
1.9.1