commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
Loading...
Searching...
No Matches
CartDiscountChangeTargetActionBuilder.php
1<?php
2
3declare(strict_types=1);
10
16use stdClass;
17
22{
27 private $target;
28
38 public function getTarget()
39 {
40 return $this->target instanceof CartDiscountTargetBuilder ? $this->target->build() : $this->target;
41 }
42
47 public function withTarget(?CartDiscountTarget $target)
48 {
49 $this->target = $target;
50
51 return $this;
52 }
53
59 {
60 $this->target = $target;
61
62 return $this;
63 }
64
66 {
68 $this->target instanceof CartDiscountTargetBuilder ? $this->target->build() : $this->target
69 );
70 }
71
72 public static function of(): CartDiscountChangeTargetActionBuilder
73 {
74 return new self();
75 }
76}