commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
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
76
public
function
getValue
()
77
{
78
if
(is_null($this->value)) {
80
$data = $this->
raw
(self::FIELD_VALUE);
81
if
(is_null($data)) {
82
return
null
;
83
}
84
85
$this->value =
MoneyModel::of
($data);
86
}
87
88
return
$this->value
;
89
}
90
91
95
public
function
setMinimumQuantity
(?
int
$minimumQuantity
): void
96
{
97
$this->minimumQuantity =
$minimumQuantity
;
98
}
99
103
public
function
setValue
(?
Money
$value
): void
104
{
105
$this->value =
$value
;
106
}
107
}
Commercetools\Api\Models\Common\PriceTierDraftModel
Definition:
PriceTierDraftModel.php:21
Commercetools\Api\Models\Common\PriceTierDraftModel\setMinimumQuantity
setMinimumQuantity(?int $minimumQuantity)
Definition:
PriceTierDraftModel.php:95
Commercetools\Api\Models\Common\PriceTierDraftModel\setValue
setValue(?Money $value)
Definition:
PriceTierDraftModel.php:103
Commercetools\Api\Models\Common\PriceTierDraftModel\getValue
getValue()
Definition:
PriceTierDraftModel.php:76
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.1