commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
lib
commercetools-api
src
Models
Product
FacetTermBuilder.php
1
<?php
2
3
declare(strict_types=1);
9
namespace
Commercetools\Api\Models\Product
;
10
11
use
Commercetools\Base\Builder
;
12
use
Commercetools\Base\DateTimeImmutableCollection
;
13
use
Commercetools\Base\JsonObject
;
14
use
Commercetools\Base\JsonObjectModel
;
15
use
Commercetools\Base\MapperFactory
;
16
use stdClass;
17
21
final
class
FacetTermBuilder
implements
Builder
22
{
27
private
$term;
28
33
private
$count;
34
39
private
$productCount;
40
45
public
function
getTerm
()
46
{
47
return
$this->term;
48
}
49
54
public
function
getCount
()
55
{
56
return
$this->count;
57
}
58
63
public
function
getProductCount
()
64
{
65
return
$this->productCount;
66
}
67
72
public
function
withTerm
($term)
73
{
74
$this->term = $term;
75
76
return
$this;
77
}
78
83
public
function
withCount
(?
int
$count)
84
{
85
$this->count = $count;
86
87
return
$this;
88
}
89
94
public
function
withProductCount
(?
int
$productCount)
95
{
96
$this->productCount = $productCount;
97
98
return
$this;
99
}
100
101
102
public
function
build
():
FacetTerm
103
{
104
return
new
FacetTermModel
(
105
$this->term,
106
$this->count,
107
$this->productCount
108
);
109
}
110
111
public
static
function
of
():
FacetTermBuilder
112
{
113
return
new
self
();
114
}
115
}
Commercetools\Api\Models\Product\FacetTermBuilder
Definition:
FacetTermBuilder.php:22
Commercetools\Api\Models\Product\FacetTermBuilder\getProductCount
getProductCount()
Definition:
FacetTermBuilder.php:63
Commercetools\Api\Models\Product\FacetTermBuilder\getTerm
getTerm()
Definition:
FacetTermBuilder.php:45
Commercetools\Api\Models\Product\FacetTermBuilder\getCount
getCount()
Definition:
FacetTermBuilder.php:54
Commercetools\Api\Models\Product\FacetTermBuilder\build
build()
Definition:
FacetTermBuilder.php:102
Commercetools\Api\Models\Product\FacetTermBuilder\withTerm
withTerm($term)
Definition:
FacetTermBuilder.php:72
Commercetools\Api\Models\Product\FacetTermBuilder\of
static of()
Definition:
FacetTermBuilder.php:111
Commercetools\Api\Models\Product\FacetTermBuilder\withProductCount
withProductCount(?int $productCount)
Definition:
FacetTermBuilder.php:94
Commercetools\Api\Models\Product\FacetTermBuilder\withCount
withCount(?int $count)
Definition:
FacetTermBuilder.php:83
Commercetools\Api\Models\Product\FacetTermModel
Definition:
FacetTermModel.php:21
Commercetools\Base\DateTimeImmutableCollection
Definition:
DateTimeImmutableCollection.php:21
Commercetools\Base\JsonObjectModel
Definition:
JsonObjectModel.php:15
Commercetools\Base\MapperFactory
Definition:
MapperFactory.php:16
Commercetools\Api\Models\Product\FacetTerm
Definition:
FacetTerm.php:15
Commercetools\Base\Builder
Definition:
Builder.php:16
Commercetools\Base\JsonObject
Definition:
JsonObject.php:15
Commercetools\Api\Models\Product
Definition:
AttributeAccessor.php:4
Generated by
1.9.1