commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
Loading...
Searching...
No Matches
lib
commercetools-api
src
Models
Order
OrderRemoveDeliveryActionModel.php
1
<?php
2
3
declare(strict_types=1);
9
namespace
Commercetools\Api\Models\Order
;
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
OrderRemoveDeliveryActionModel
extends
JsonObjectModel
implements
OrderRemoveDeliveryAction
21
{
22
public
const
DISCRIMINATOR_VALUE
=
'removeDelivery'
;
27
protected
$action
;
28
33
protected
$deliveryId
;
34
39
protected
$deliveryKey
;
40
41
45
public
function
__construct
(
46
?
string
$deliveryId
=
null
,
47
?
string
$deliveryKey
=
null
,
48
?
string
$action
=
null
49
) {
50
$this->deliveryId =
$deliveryId
;
51
$this->deliveryKey =
$deliveryKey
;
52
$this->action =
$action
??
self::DISCRIMINATOR_VALUE
;
53
}
54
59
public
function
getAction
()
60
{
61
if
(is_null($this->action)) {
63
$data = $this->
raw
(self::FIELD_ACTION);
64
if
(is_null($data)) {
65
return
null
;
66
}
67
$this->action = (string) $data;
68
}
69
70
return
$this->action
;
71
}
72
80
public
function
getDeliveryId
()
81
{
82
if
(is_null($this->deliveryId)) {
84
$data = $this->
raw
(self::FIELD_DELIVERY_ID);
85
if
(is_null($data)) {
86
return
null
;
87
}
88
$this->deliveryId = (string) $data;
89
}
90
91
return
$this->deliveryId
;
92
}
93
101
public
function
getDeliveryKey
()
102
{
103
if
(is_null($this->deliveryKey)) {
105
$data = $this->
raw
(self::FIELD_DELIVERY_KEY);
106
if
(is_null($data)) {
107
return
null
;
108
}
109
$this->deliveryKey = (string) $data;
110
}
111
112
return
$this->deliveryKey
;
113
}
114
115
119
public
function
setDeliveryId
(?
string
$deliveryId
): void
120
{
121
$this->deliveryId =
$deliveryId
;
122
}
123
127
public
function
setDeliveryKey
(?
string
$deliveryKey
): void
128
{
129
$this->deliveryKey =
$deliveryKey
;
130
}
131
}
Commercetools\Api\Models\Order\OrderRemoveDeliveryActionModel
Definition
OrderRemoveDeliveryActionModel.php:21
Commercetools\Api\Models\Order\OrderRemoveDeliveryActionModel\getAction
getAction()
Definition
OrderRemoveDeliveryActionModel.php:59
Commercetools\Api\Models\Order\OrderRemoveDeliveryActionModel\__construct
__construct(?string $deliveryId=null, ?string $deliveryKey=null, ?string $action=null)
Definition
OrderRemoveDeliveryActionModel.php:45
Commercetools\Api\Models\Order\OrderRemoveDeliveryActionModel\getDeliveryId
getDeliveryId()
Definition
OrderRemoveDeliveryActionModel.php:80
Commercetools\Api\Models\Order\OrderRemoveDeliveryActionModel\DISCRIMINATOR_VALUE
const DISCRIMINATOR_VALUE
Definition
OrderRemoveDeliveryActionModel.php:22
Commercetools\Api\Models\Order\OrderRemoveDeliveryActionModel\setDeliveryKey
setDeliveryKey(?string $deliveryKey)
Definition
OrderRemoveDeliveryActionModel.php:127
Commercetools\Api\Models\Order\OrderRemoveDeliveryActionModel\getDeliveryKey
getDeliveryKey()
Definition
OrderRemoveDeliveryActionModel.php:101
Commercetools\Api\Models\Order\OrderRemoveDeliveryActionModel\$deliveryId
$deliveryId
Definition
OrderRemoveDeliveryActionModel.php:33
Commercetools\Api\Models\Order\OrderRemoveDeliveryActionModel\$action
$action
Definition
OrderRemoveDeliveryActionModel.php:27
Commercetools\Api\Models\Order\OrderRemoveDeliveryActionModel\setDeliveryId
setDeliveryId(?string $deliveryId)
Definition
OrderRemoveDeliveryActionModel.php:119
Commercetools\Api\Models\Order\OrderRemoveDeliveryActionModel\$deliveryKey
$deliveryKey
Definition
OrderRemoveDeliveryActionModel.php:39
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\Order\OrderRemoveDeliveryAction
Definition
OrderRemoveDeliveryAction.php:15
Commercetools\Base\JsonObject
Definition
JsonObject.php:15
Commercetools\Api\Models\Order
Definition
CustomLineItemImportDraft.php:9
Generated by
1.9.8