commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
Loading...
Searching...
No Matches
StateSetNameActionBuilder.php
1<?php
2
3declare(strict_types=1);
10
18use stdClass;
19
23final class StateSetNameActionBuilder implements Builder
24{
29 private $name;
30
39 public function getName()
40 {
41 return $this->name instanceof LocalizedStringBuilder ? $this->name->build() : $this->name;
42 }
43
48 public function withName(?LocalizedString $name)
49 {
50 $this->name = $name;
51
52 return $this;
53 }
54
60 {
61 $this->name = $name;
62
63 return $this;
64 }
65
66 public function build(): StateSetNameAction
67 {
68 return new StateSetNameActionModel(
69 $this->name instanceof LocalizedStringBuilder ? $this->name->build() : $this->name
70 );
71 }
72
73 public static function of(): StateSetNameActionBuilder
74 {
75 return new self();
76 }
77}