commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
Loading...
Searching...
No Matches
MyQuoteRequestDraftModel.php
1<?php
2
3declare(strict_types=1);
10
15use stdClass;
16
21{
26 protected $cartId;
27
32 protected $cartVersion;
33
38 protected $comment;
39
40
44 public function __construct(
45 ?string $cartId = null,
46 ?int $cartVersion = null,
47 ?string $comment = null
48 ) {
49 $this->cartId = $cartId;
50 $this->cartVersion = $cartVersion;
51 $this->comment = $comment;
52 }
53
61 public function getCartId()
62 {
63 if (is_null($this->cartId)) {
65 $data = $this->raw(self::FIELD_CART_ID);
66 if (is_null($data)) {
67 return null;
68 }
69 $this->cartId = (string) $data;
70 }
71
72 return $this->cartId;
73 }
74
81 public function getCartVersion()
82 {
83 if (is_null($this->cartVersion)) {
85 $data = $this->raw(self::FIELD_CART_VERSION);
86 if (is_null($data)) {
87 return null;
88 }
89 $this->cartVersion = (int) $data;
90 }
91
92 return $this->cartVersion;
93 }
94
101 public function getComment()
102 {
103 if (is_null($this->comment)) {
105 $data = $this->raw(self::FIELD_COMMENT);
106 if (is_null($data)) {
107 return null;
108 }
109 $this->comment = (string) $data;
110 }
111
112 return $this->comment;
113 }
114
115
119 public function setCartId(?string $cartId): void
120 {
121 $this->cartId = $cartId;
122 }
123
127 public function setCartVersion(?int $cartVersion): void
128 {
129 $this->cartVersion = $cartVersion;
130 }
131
135 public function setComment(?string $comment): void
136 {
137 $this->comment = $comment;
138 }
139}
__construct(?string $cartId=null, ?int $cartVersion=null, ?string $comment=null)