commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
lib
commercetools-api
src
Models
Order
HitBuilder.php
1
<?php
2
3
declare(strict_types=1);
9
namespace
Commercetools\Api\Models\Order
;
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
HitBuilder
implements
Builder
22
{
27
private
$id;
28
33
private
$version;
34
39
private
$relevance;
40
47
public
function
getId
()
48
{
49
return
$this->id;
50
}
51
58
public
function
getVersion
()
59
{
60
return
$this->version;
61
}
62
69
public
function
getRelevance
()
70
{
71
return
$this->relevance;
72
}
73
78
public
function
withId
(?
string
$id)
79
{
80
$this->
id
= $id;
81
82
return
$this;
83
}
84
89
public
function
withVersion
(?
int
$version)
90
{
91
$this->version = $version;
92
93
return
$this;
94
}
95
100
public
function
withRelevance
(?
float
$relevance)
101
{
102
$this->relevance = $relevance;
103
104
return
$this;
105
}
106
107
108
public
function
build
():
Hit
109
{
110
return
new
HitModel
(
111
$this->
id
,
112
$this->version,
113
$this->relevance
114
);
115
}
116
117
public
static
function
of
():
HitBuilder
118
{
119
return
new
self
();
120
}
121
}
Commercetools\Api\Models\Order\HitBuilder
Definition:
HitBuilder.php:22
Commercetools\Api\Models\Order\HitBuilder\withRelevance
withRelevance(?float $relevance)
Definition:
HitBuilder.php:100
Commercetools\Api\Models\Order\HitBuilder\build
build()
Definition:
HitBuilder.php:108
Commercetools\Api\Models\Order\HitBuilder\getRelevance
getRelevance()
Definition:
HitBuilder.php:69
Commercetools\Api\Models\Order\HitBuilder\of
static of()
Definition:
HitBuilder.php:117
Commercetools\Api\Models\Order\HitBuilder\withVersion
withVersion(?int $version)
Definition:
HitBuilder.php:89
Commercetools\Api\Models\Order\HitBuilder\getVersion
getVersion()
Definition:
HitBuilder.php:58
Commercetools\Api\Models\Order\HitBuilder\getId
getId()
Definition:
HitBuilder.php:47
Commercetools\Api\Models\Order\HitBuilder\withId
withId(?string $id)
Definition:
HitBuilder.php:78
Commercetools\Api\Models\Order\HitModel
Definition:
HitModel.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\Order\Hit
Definition:
Hit.php:15
Commercetools\Base\Builder
Definition:
Builder.php:16
Commercetools\Base\JsonObject
Definition:
JsonObject.php:15
Commercetools\Api\Models\Order
Definition:
CustomLineItemImportDraft.php:9
Generated by
1.9.1