commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
CartDiscountChangeValueActionBuilder.php
1 <?php
2 
3 declare(strict_types=1);
10 
16 use stdClass;
17 
22 {
27  private $value;
28 
36  public function getValue()
37  {
38  return $this->value instanceof CartDiscountValueDraftBuilder ? $this->value->build() : $this->value;
39  }
40 
45  public function withValue(?CartDiscountValueDraft $value)
46  {
47  $this->value = $value;
48 
49  return $this;
50  }
51 
57  {
58  $this->value = $value;
59 
60  return $this;
61  }
62 
64  {
66  $this->value instanceof CartDiscountValueDraftBuilder ? $this->value->build() : $this->value
67  );
68  }
69 
70  public static function of(): CartDiscountChangeValueActionBuilder
71  {
72  return new self();
73  }
74 }