commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
Loading...
Searching...
No Matches
DateSetAttributeBuilder.php
1<?php
2
3declare(strict_types=1);
10
16use stdClass;
17
21final class DateSetAttributeBuilder implements Builder
22{
27 private $name;
28
33 private $value;
34
43 public function getName()
44 {
45 return $this->name;
46 }
47
54 public function getValue()
55 {
56 return $this->value;
57 }
58
63 public function withName(?string $name)
64 {
65 $this->name = $name;
66
67 return $this;
68 }
69
74 public function withValue(?DateTimeImmutableCollection $value)
75 {
76 $this->value = $value;
77
78 return $this;
79 }
80
81
82 public function build(): DateSetAttribute
83 {
84 return new DateSetAttributeModel(
85 $this->name,
86 $this->value
87 );
88 }
89
90 public static function of(): DateSetAttributeBuilder
91 {
92 return new self();
93 }
94}