commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
Loading...
Searching...
No Matches
OrderRemoveDeliveryActionModel.php
1<?php
2
3declare(strict_types=1);
10
15use stdClass;
16
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}
__construct(?string $deliveryId=null, ?string $deliveryKey=null, ?string $action=null)