commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
AttributeValueBuilder.php
1 <?php
2 
3 declare(strict_types=1);
10 
16 use stdClass;
17 
21 final class AttributeValueBuilder implements Builder
22 {
27  private $name;
28 
33  private $value;
34 
41  public function getName()
42  {
43  return $this->name;
44  }
45 
61  public function getValue()
62  {
63  return $this->value;
64  }
65 
70  public function withName(?string $name)
71  {
72  $this->name = $name;
73 
74  return $this;
75  }
76 
81  public function withValue( $value)
82  {
83  $this->value = $value;
84 
85  return $this;
86  }
87 
88 
89  public function build(): AttributeValue
90  {
91  return new AttributeValueModel(
92  $this->name,
93  $this->value
94  );
95  }
96 
97  public static function of(): AttributeValueBuilder
98  {
99  return new self();
100  }
101 }