commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
lib
commercetools-api
src
Models
State
StateResourceIdentifierBuilder.php
1
<?php
2
3
declare(strict_types=1);
9
namespace
Commercetools\Api\Models\State
;
10
11
use
Commercetools\Api\Models\Common\ResourceIdentifier
;
12
use
Commercetools\Api\Models\Common\ResourceIdentifierBuilder
;
13
use
Commercetools\Base\Builder
;
14
use
Commercetools\Base\DateTimeImmutableCollection
;
15
use
Commercetools\Base\JsonObject
;
16
use
Commercetools\Base\JsonObjectModel
;
17
use
Commercetools\Base\MapperFactory
;
18
use stdClass;
19
23
final
class
StateResourceIdentifierBuilder
implements
Builder
24
{
29
private
$id;
30
35
private
$key;
36
43
public
function
getId
()
44
{
45
return
$this->id;
46
}
47
54
public
function
getKey
()
55
{
56
return
$this->key;
57
}
58
63
public
function
withId
(?
string
$id)
64
{
65
$this->
id
= $id;
66
67
return
$this;
68
}
69
74
public
function
withKey
(?
string
$key)
75
{
76
$this->key = $key;
77
78
return
$this;
79
}
80
81
82
public
function
build
():
StateResourceIdentifier
83
{
84
return
new
StateResourceIdentifierModel
(
85
$this->
id
,
86
$this->key
87
);
88
}
89
90
public
static
function
of
():
StateResourceIdentifierBuilder
91
{
92
return
new
self
();
93
}
94
}
Commercetools\Api\Models\Common\ResourceIdentifierBuilder
Definition:
ResourceIdentifierBuilder.php:82
Commercetools\Api\Models\State\StateResourceIdentifierBuilder
Definition:
StateResourceIdentifierBuilder.php:24
Commercetools\Api\Models\State\StateResourceIdentifierBuilder\build
build()
Definition:
StateResourceIdentifierBuilder.php:82
Commercetools\Api\Models\State\StateResourceIdentifierBuilder\of
static of()
Definition:
StateResourceIdentifierBuilder.php:90
Commercetools\Api\Models\State\StateResourceIdentifierBuilder\getKey
getKey()
Definition:
StateResourceIdentifierBuilder.php:54
Commercetools\Api\Models\State\StateResourceIdentifierBuilder\withId
withId(?string $id)
Definition:
StateResourceIdentifierBuilder.php:63
Commercetools\Api\Models\State\StateResourceIdentifierBuilder\withKey
withKey(?string $key)
Definition:
StateResourceIdentifierBuilder.php:74
Commercetools\Api\Models\State\StateResourceIdentifierBuilder\getId
getId()
Definition:
StateResourceIdentifierBuilder.php:43
Commercetools\Api\Models\State\StateResourceIdentifierModel
Definition:
StateResourceIdentifierModel.php:23
Commercetools\Base\DateTimeImmutableCollection
Definition:
DateTimeImmutableCollection.php:21
Commercetools\Base\JsonObjectModel
Definition:
JsonObjectModel.php:15
Commercetools\Base\MapperFactory
Definition:
MapperFactory.php:16
Commercetools\Api\Models\Common\ResourceIdentifier
Definition:
ResourceIdentifier.php:45
Commercetools\Api\Models\State\StateResourceIdentifier
Definition:
StateResourceIdentifier.php:16
Commercetools\Base\Builder
Definition:
Builder.php:16
Commercetools\Base\JsonObject
Definition:
JsonObject.php:15
Commercetools\Api\Models\State
Definition:
State.php:9
Generated by
1.9.1