commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
Loading...
Searching...
No Matches
ShippingMethodChangeValueModel.php
1<?php
2
3declare(strict_types=1);
10
15use stdClass;
16
21{
22
23
28 protected $id;
29
34 protected $name;
35
36
40 public function __construct(
41 ?string $id = null,
42 ?string $name = null
43 ) {
44 $this->id = $id;
45 $this->name = $name;
46
47 }
48
55 public function getId()
56 {
57 if (is_null($this->id)) {
59 $data = $this->raw(self::FIELD_ID);
60 if (is_null($data)) {
61 return null;
62 }
63 $this->id = (string) $data;
64 }
65
66 return $this->id;
67 }
68
75 public function getName()
76 {
77 if (is_null($this->name)) {
79 $data = $this->raw(self::FIELD_NAME);
80 if (is_null($data)) {
81 return null;
82 }
83 $this->name = (string) $data;
84 }
85
86 return $this->name;
87 }
88
89
93 public function setId(?string $id): void
94 {
95 $this->id = $id;
96 }
97
101 public function setName(?string $name): void
102 {
103 $this->name = $name;
104 }
105
106
107
108}