commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
Loading...
Searching...
No Matches
FieldDefinitionOrderValueModel.php
1<?php
2
3declare(strict_types=1);
10
15use stdClass;
18
23{
24
25
30 protected $name;
31
36 protected $label;
37
38
42 public function __construct(
43 ?string $name = null,
45 ) {
46 $this->name = $name;
47 $this->label = $label;
48
49 }
50
57 public function getName()
58 {
59 if (is_null($this->name)) {
61 $data = $this->raw(self::FIELD_NAME);
62 if (is_null($data)) {
63 return null;
64 }
65 $this->name = (string) $data;
66 }
67
68 return $this->name;
69 }
70
77 public function getLabel()
78 {
79 if (is_null($this->label)) {
81 $data = $this->raw(self::FIELD_LABEL);
82 if (is_null($data)) {
83 return null;
84 }
85
86 $this->label = LocalizedStringModel::of($data);
87 }
88
89 return $this->label;
90 }
91
92
96 public function setName(?string $name): void
97 {
98 $this->name = $name;
99 }
100
104 public function setLabel(?LocalizedString $label): void
105 {
106 $this->label = $label;
107 }
108
109
110
111}