commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
Loading...
Searching...
No Matches
StorefrontBuilder.php
1<?php
2
3declare(strict_types=1);
10
16use stdClass;
17
21final class StorefrontBuilder implements Builder
22{
27 private $checkoutUrlTemplate;
28
33 private $orderUrlTemplate;
34
39 private $termsOfServiceUrl;
40
45 private $privacyPolicyUrl;
46
51 private $refundPolicyUrl;
52
57 private $shippingPolicyUrl;
58
63 private $cookiePolicyUrl;
64
69 private $imprintUrl;
70
75 private $faqUrl;
76
81 private $contactUrl;
82
90 public function getCheckoutUrlTemplate()
91 {
92 return $this->checkoutUrlTemplate;
93 }
94
102 public function getOrderUrlTemplate()
103 {
104 return $this->orderUrlTemplate;
105 }
106
113 public function getTermsOfServiceUrl()
114 {
115 return $this->termsOfServiceUrl;
116 }
117
124 public function getPrivacyPolicyUrl()
125 {
126 return $this->privacyPolicyUrl;
127 }
128
135 public function getRefundPolicyUrl()
136 {
137 return $this->refundPolicyUrl;
138 }
139
146 public function getShippingPolicyUrl()
147 {
148 return $this->shippingPolicyUrl;
149 }
150
157 public function getCookiePolicyUrl()
158 {
159 return $this->cookiePolicyUrl;
160 }
161
168 public function getImprintUrl()
169 {
170 return $this->imprintUrl;
171 }
172
179 public function getFaqUrl()
180 {
181 return $this->faqUrl;
182 }
183
190 public function getContactUrl()
191 {
192 return $this->contactUrl;
193 }
194
199 public function withCheckoutUrlTemplate(?string $checkoutUrlTemplate)
200 {
201 $this->checkoutUrlTemplate = $checkoutUrlTemplate;
202
203 return $this;
204 }
205
210 public function withOrderUrlTemplate(?string $orderUrlTemplate)
211 {
212 $this->orderUrlTemplate = $orderUrlTemplate;
213
214 return $this;
215 }
216
221 public function withTermsOfServiceUrl(?string $termsOfServiceUrl)
222 {
223 $this->termsOfServiceUrl = $termsOfServiceUrl;
224
225 return $this;
226 }
227
232 public function withPrivacyPolicyUrl(?string $privacyPolicyUrl)
233 {
234 $this->privacyPolicyUrl = $privacyPolicyUrl;
235
236 return $this;
237 }
238
243 public function withRefundPolicyUrl(?string $refundPolicyUrl)
244 {
245 $this->refundPolicyUrl = $refundPolicyUrl;
246
247 return $this;
248 }
249
254 public function withShippingPolicyUrl(?string $shippingPolicyUrl)
255 {
256 $this->shippingPolicyUrl = $shippingPolicyUrl;
257
258 return $this;
259 }
260
265 public function withCookiePolicyUrl(?string $cookiePolicyUrl)
266 {
267 $this->cookiePolicyUrl = $cookiePolicyUrl;
268
269 return $this;
270 }
271
276 public function withImprintUrl(?string $imprintUrl)
277 {
278 $this->imprintUrl = $imprintUrl;
279
280 return $this;
281 }
282
287 public function withFaqUrl(?string $faqUrl)
288 {
289 $this->faqUrl = $faqUrl;
290
291 return $this;
292 }
293
298 public function withContactUrl(?string $contactUrl)
299 {
300 $this->contactUrl = $contactUrl;
301
302 return $this;
303 }
304
305
306 public function build(): Storefront
307 {
308 return new StorefrontModel(
309 $this->checkoutUrlTemplate,
310 $this->orderUrlTemplate,
311 $this->termsOfServiceUrl,
312 $this->privacyPolicyUrl,
313 $this->refundPolicyUrl,
314 $this->shippingPolicyUrl,
315 $this->cookiePolicyUrl,
316 $this->imprintUrl,
317 $this->faqUrl,
318 $this->contactUrl
319 );
320 }
321
322 public static function of(): StorefrontBuilder
323 {
324 return new self();
325 }
326}