commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
Loading...
Searching...
No Matches
ApprovalFlowRejectedMessagePayloadBuilder.php
1<?php
2
3declare(strict_types=1);
10
20use stdClass;
21
26{
31 private $associate;
32
37 private $rejectionReason;
38
43 private $order;
44
51 public function getAssociate()
52 {
53 return $this->associate instanceof CustomerReferenceBuilder ? $this->associate->build() : $this->associate;
54 }
55
62 public function getRejectionReason()
63 {
64 return $this->rejectionReason;
65 }
66
73 public function getOrder()
74 {
75 return $this->order instanceof OrderReferenceBuilder ? $this->order->build() : $this->order;
76 }
77
82 public function withAssociate(?CustomerReference $associate)
83 {
84 $this->associate = $associate;
85
86 return $this;
87 }
88
93 public function withRejectionReason(?string $rejectionReason)
94 {
95 $this->rejectionReason = $rejectionReason;
96
97 return $this;
98 }
99
104 public function withOrder(?OrderReference $order)
105 {
106 $this->order = $order;
107
108 return $this;
109 }
110
116 {
117 $this->associate = $associate;
118
119 return $this;
120 }
121
127 {
128 $this->order = $order;
129
130 return $this;
131 }
132
134 {
136 $this->associate instanceof CustomerReferenceBuilder ? $this->associate->build() : $this->associate,
137 $this->rejectionReason,
138 $this->order instanceof OrderReferenceBuilder ? $this->order->build() : $this->order
139 );
140 }
141
143 {
144 return new self();
145 }
146}