commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
lib
commercetools-api
src
Models
Customer
CustomerRemoveStoreActionModel.php
1
<?php
2
3
declare(strict_types=1);
9
namespace
Commercetools\Api\Models\Customer
;
10
11
use
Commercetools\Api\Models\Store\StoreResourceIdentifier
;
12
use
Commercetools\Api\Models\Store\StoreResourceIdentifierModel
;
13
use
Commercetools\Base\DateTimeImmutableCollection
;
14
use
Commercetools\Base\JsonObject
;
15
use
Commercetools\Base\JsonObjectModel
;
16
use
Commercetools\Base\MapperFactory
;
17
use stdClass;
18
22
final
class
CustomerRemoveStoreActionModel
extends
JsonObjectModel
implements
CustomerRemoveStoreAction
23
{
24
public
const
DISCRIMINATOR_VALUE
=
'removeStore'
;
29
protected
$action
;
30
35
protected
$store
;
36
37
41
public
function
__construct
(
42
?
StoreResourceIdentifier
$store
=
null
,
43
?
string
$action
=
null
44
) {
45
$this->store =
$store
;
46
$this->action =
$action
??
self::DISCRIMINATOR_VALUE
;
47
}
48
53
public
function
getAction
()
54
{
55
if
(is_null($this->action)) {
57
$data = $this->
raw
(self::FIELD_ACTION);
58
if
(is_null($data)) {
59
return
null
;
60
}
61
$this->action = (string) $data;
62
}
63
64
return
$this->action
;
65
}
66
73
public
function
getStore
()
74
{
75
if
(is_null($this->store)) {
77
$data = $this->
raw
(self::FIELD_STORE);
78
if
(is_null($data)) {
79
return
null
;
80
}
81
82
$this->store =
StoreResourceIdentifierModel::of
($data);
83
}
84
85
return
$this->store
;
86
}
87
88
92
public
function
setStore
(?
StoreResourceIdentifier
$store
): void
93
{
94
$this->store =
$store
;
95
}
96
}
Commercetools\Api\Models\Customer\CustomerRemoveStoreActionModel
Definition:
CustomerRemoveStoreActionModel.php:23
Commercetools\Api\Models\Customer\CustomerRemoveStoreActionModel\__construct
__construct(?StoreResourceIdentifier $store=null, ?string $action=null)
Definition:
CustomerRemoveStoreActionModel.php:41
Commercetools\Api\Models\Customer\CustomerRemoveStoreActionModel\getAction
getAction()
Definition:
CustomerRemoveStoreActionModel.php:53
Commercetools\Api\Models\Customer\CustomerRemoveStoreActionModel\getStore
getStore()
Definition:
CustomerRemoveStoreActionModel.php:73
Commercetools\Api\Models\Customer\CustomerRemoveStoreActionModel\$action
$action
Definition:
CustomerRemoveStoreActionModel.php:29
Commercetools\Api\Models\Customer\CustomerRemoveStoreActionModel\DISCRIMINATOR_VALUE
const DISCRIMINATOR_VALUE
Definition:
CustomerRemoveStoreActionModel.php:24
Commercetools\Api\Models\Customer\CustomerRemoveStoreActionModel\setStore
setStore(?StoreResourceIdentifier $store)
Definition:
CustomerRemoveStoreActionModel.php:92
Commercetools\Api\Models\Customer\CustomerRemoveStoreActionModel\$store
$store
Definition:
CustomerRemoveStoreActionModel.php:35
Commercetools\Api\Models\Store\StoreResourceIdentifierModel
Definition:
StoreResourceIdentifierModel.php:23
Commercetools\Base\BaseJsonObject\raw
raw(string $field)
Definition:
BaseJsonObject.php:57
Commercetools\Base\BaseJsonObject\of
static of($data=null)
Definition:
BaseJsonObject.php:26
Commercetools\Base\DateTimeImmutableCollection
Definition:
DateTimeImmutableCollection.php:21
Commercetools\Base\JsonObjectModel
Definition:
JsonObjectModel.php:15
Commercetools\Base\MapperFactory
Definition:
MapperFactory.php:16
Commercetools\Api\Models\Customer\CustomerRemoveStoreAction
Definition:
CustomerRemoveStoreAction.php:16
Commercetools\Api\Models\Store\StoreResourceIdentifier
Definition:
StoreResourceIdentifier.php:16
Commercetools\Base\JsonObject
Definition:
JsonObject.php:15
Commercetools\Api\Models\Customer
Definition:
Customer.php:9
Generated by
1.9.1