commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
lib
commercetools-history
src
Models
Common
GeoLocationBuilder.php
1
<?php
2
3
declare(strict_types=1);
9
namespace
Commercetools\History\Models\Common
;
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
GeoLocationBuilder
implements
Builder
22
{
27
private
$type;
28
33
private
$coordinates;
34
39
public
function
getType
()
40
{
41
return
$this->type;
42
}
43
48
public
function
getCoordinates
()
49
{
50
return
$this->coordinates;
51
}
52
57
public
function
withType
(?
string
$type)
58
{
59
$this->type = $type;
60
61
return
$this;
62
}
63
68
public
function
withCoordinates
(?array $coordinates)
69
{
70
$this->coordinates = $coordinates;
71
72
return
$this;
73
}
74
75
76
public
function
build
():
GeoLocation
77
{
78
return
new
GeoLocationModel
(
79
$this->type,
80
$this->coordinates
81
);
82
}
83
84
public
static
function
of
():
GeoLocationBuilder
85
{
86
return
new
self
();
87
}
88
}
Commercetools\Base\DateTimeImmutableCollection
Definition:
DateTimeImmutableCollection.php:21
Commercetools\Base\JsonObjectModel
Definition:
JsonObjectModel.php:15
Commercetools\Base\MapperFactory
Definition:
MapperFactory.php:16
Commercetools\History\Models\Common\GeoLocationBuilder
Definition:
GeoLocationBuilder.php:22
Commercetools\History\Models\Common\GeoLocationBuilder\getType
getType()
Definition:
GeoLocationBuilder.php:39
Commercetools\History\Models\Common\GeoLocationBuilder\getCoordinates
getCoordinates()
Definition:
GeoLocationBuilder.php:48
Commercetools\History\Models\Common\GeoLocationBuilder\withCoordinates
withCoordinates(?array $coordinates)
Definition:
GeoLocationBuilder.php:68
Commercetools\History\Models\Common\GeoLocationBuilder\build
build()
Definition:
GeoLocationBuilder.php:76
Commercetools\History\Models\Common\GeoLocationBuilder\of
static of()
Definition:
GeoLocationBuilder.php:84
Commercetools\History\Models\Common\GeoLocationBuilder\withType
withType(?string $type)
Definition:
GeoLocationBuilder.php:57
Commercetools\History\Models\Common\GeoLocationModel
Definition:
GeoLocationModel.php:21
Commercetools\Base\Builder
Definition:
Builder.php:16
Commercetools\Base\JsonObject
Definition:
JsonObject.php:15
Commercetools\History\Models\Common\GeoLocation
Definition:
GeoLocation.php:15
Commercetools\History\Models\Common
Definition:
Address.php:9
Generated by
1.9.1