commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
Loading...
Searching...
No Matches
ApprovalFlowRejectionBuilder.php
1<?php
2
3declare(strict_types=1);
10
18use DateTimeImmutable;
19use stdClass;
20
25{
30 private $rejecter;
31
36 private $rejectedAt;
37
42 private $reason;
43
50 public function getRejecter()
51 {
52 return $this->rejecter instanceof AssociateBuilder ? $this->rejecter->build() : $this->rejecter;
53 }
54
61 public function getRejectedAt()
62 {
63 return $this->rejectedAt;
64 }
65
72 public function getReason()
73 {
74 return $this->reason;
75 }
76
81 public function withRejecter(?Associate $rejecter)
82 {
83 $this->rejecter = $rejecter;
84
85 return $this;
86 }
87
92 public function withRejectedAt(?DateTimeImmutable $rejectedAt)
93 {
94 $this->rejectedAt = $rejectedAt;
95
96 return $this;
97 }
98
103 public function withReason(?string $reason)
104 {
105 $this->reason = $reason;
106
107 return $this;
108 }
109
114 public function withRejecterBuilder(?AssociateBuilder $rejecter)
115 {
116 $this->rejecter = $rejecter;
117
118 return $this;
119 }
120
121 public function build(): ApprovalFlowRejection
122 {
124 $this->rejecter instanceof AssociateBuilder ? $this->rejecter->build() : $this->rejecter,
125 $this->rejectedAt,
126 $this->reason
127 );
128 }
129
130 public static function of(): ApprovalFlowRejectionBuilder
131 {
132 return new self();
133 }
134}