commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
Loading...
Searching...
No Matches
PriceTierDraftModel.php
1<?php
2
3declare(strict_types=1);
10
15use stdClass;
16
21{
27
32 protected $value;
33
34
38 public function __construct(
39 ?int $minimumQuantity = null,
40 ?Money $value = null
41 ) {
42 $this->minimumQuantity = $minimumQuantity;
43 $this->value = $value;
44 }
45
55 public function getMinimumQuantity()
56 {
57 if (is_null($this->minimumQuantity)) {
59 $data = $this->raw(self::FIELD_MINIMUM_QUANTITY);
60 if (is_null($data)) {
61 return null;
62 }
63 $this->minimumQuantity = (int) $data;
64 }
65
67 }
68
77 public function getValue()
78 {
79 if (is_null($this->value)) {
81 $data = $this->raw(self::FIELD_VALUE);
82 if (is_null($data)) {
83 return null;
84 }
85
86 $this->value = MoneyModel::of($data);
87 }
88
89 return $this->value;
90 }
91
92
96 public function setMinimumQuantity(?int $minimumQuantity): void
97 {
98 $this->minimumQuantity = $minimumQuantity;
99 }
100
104 public function setValue(?Money $value): void
105 {
106 $this->value = $value;
107 }
108}
__construct(?int $minimumQuantity=null, ?Money $value=null)