commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
lib
commercetools-api
src
Models
CustomerSearch
CustomerSearchResultModel.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
CustomerSearchResultModel
extends
JsonObjectModel
implements
CustomerSearchResult
21
{
26
protected
$id
;
27
32
protected
$relevance
;
33
34
38
public
function
__construct
(
39
?
string
$id
=
null
,
40
?
float
$relevance
=
null
41
) {
42
$this->
id
=
$id
;
43
$this->relevance =
$relevance
;
44
}
45
52
public
function
getId
()
53
{
54
if
(is_null($this->
id
)) {
56
$data = $this->
raw
(self::FIELD_ID);
57
if
(is_null($data)) {
58
return
null
;
59
}
60
$this->
id
= (string) $data;
61
}
62
63
return
$this->id
;
64
}
65
72
public
function
getRelevance
()
73
{
74
if
(is_null($this->relevance)) {
76
$data = $this->
raw
(self::FIELD_RELEVANCE);
77
if
(is_null($data)) {
78
return
null
;
79
}
80
$this->relevance = (float) $data;
81
}
82
83
return
$this->relevance
;
84
}
85
86
90
public
function
setId
(?
string
$id
): void
91
{
92
$this->
id
=
$id
;
93
}
94
98
public
function
setRelevance
(?
float
$relevance
): void
99
{
100
$this->relevance =
$relevance
;
101
}
102
}
Commercetools\Api\Models\CustomerSearch\CustomerSearchResultModel
Definition:
CustomerSearchResultModel.php:21
Commercetools\Api\Models\CustomerSearch\CustomerSearchResultModel\setId
setId(?string $id)
Definition:
CustomerSearchResultModel.php:90
Commercetools\Api\Models\CustomerSearch\CustomerSearchResultModel\getRelevance
getRelevance()
Definition:
CustomerSearchResultModel.php:72
Commercetools\Api\Models\CustomerSearch\CustomerSearchResultModel\$id
$id
Definition:
CustomerSearchResultModel.php:26
Commercetools\Api\Models\CustomerSearch\CustomerSearchResultModel\getId
getId()
Definition:
CustomerSearchResultModel.php:52
Commercetools\Api\Models\CustomerSearch\CustomerSearchResultModel\setRelevance
setRelevance(?float $relevance)
Definition:
CustomerSearchResultModel.php:98
Commercetools\Api\Models\CustomerSearch\CustomerSearchResultModel\$relevance
$relevance
Definition:
CustomerSearchResultModel.php:32
Commercetools\Api\Models\CustomerSearch\CustomerSearchResultModel\__construct
__construct(?string $id=null, ?float $relevance=null)
Definition:
CustomerSearchResultModel.php:38
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\CustomerSearchResult
Definition:
CustomerSearchResult.php:15
Commercetools\Base\JsonObject
Definition:
JsonObject.php:15
Commercetools\Api\Models\CustomerSearch
Definition:
CustomerIndexingProgress.php:9
Generated by
1.9.1