commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
Loading...
Searching...
No Matches
lib
commercetools-api
src
Models
Common
PriceTierDraftModel.php
1
<?php
2
3
declare(strict_types=1);
9
namespace
Commercetools\Api\Models\Common
;
10
11
use
Commercetools\Base\DateTimeImmutableCollection
;
12
use
Commercetools\Base\JsonObject
;
13
use
Commercetools\Base\JsonObjectModel
;
14
use
Commercetools\Base\MapperFactory
;
15
use stdClass;
16
20
final
class
PriceTierDraftModel
extends
JsonObjectModel
implements
PriceTierDraft
21
{
26
protected
$minimumQuantity
;
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
66
return
$this->minimumQuantity
;
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
}
Commercetools\Api\Models\Common\PriceTierDraftModel
Definition
PriceTierDraftModel.php:21
Commercetools\Api\Models\Common\PriceTierDraftModel\setMinimumQuantity
setMinimumQuantity(?int $minimumQuantity)
Definition
PriceTierDraftModel.php:96
Commercetools\Api\Models\Common\PriceTierDraftModel\setValue
setValue(?Money $value)
Definition
PriceTierDraftModel.php:104
Commercetools\Api\Models\Common\PriceTierDraftModel\getValue
getValue()
Definition
PriceTierDraftModel.php:77
Commercetools\Api\Models\Common\PriceTierDraftModel\getMinimumQuantity
getMinimumQuantity()
Definition
PriceTierDraftModel.php:55
Commercetools\Api\Models\Common\PriceTierDraftModel\$value
$value
Definition
PriceTierDraftModel.php:32
Commercetools\Api\Models\Common\PriceTierDraftModel\__construct
__construct(?int $minimumQuantity=null, ?Money $value=null)
Definition
PriceTierDraftModel.php:38
Commercetools\Api\Models\Common\PriceTierDraftModel\$minimumQuantity
$minimumQuantity
Definition
PriceTierDraftModel.php:26
Commercetools\Base\BaseJsonObject\raw
raw(string $field)
Definition
BaseJsonObject.php:57
Commercetools\Base\BaseJsonObject\of
static of($data=null)
Definition
BaseJsonObject.php:26
Commercetools\Base\DateTimeImmutableCollection
Definition
DateTimeImmutableCollection.php:21
Commercetools\Base\JsonObjectModel
Definition
JsonObjectModel.php:15
Commercetools\Base\MapperFactory
Definition
MapperFactory.php:16
Commercetools\Api\Models\Common\Money
Definition
Money.php:15
Commercetools\Api\Models\Common\PriceTierDraft
Definition
PriceTierDraft.php:15
Commercetools\Base\JsonObject
Definition
JsonObject.php:15
Commercetools\Api\Models\Common
Definition
Address.php:9
Generated by
1.9.8