commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
lib
commercetools-api
src
Models
Common
PriceTierDraftBuilder.php
1
<?php
2
3
declare(strict_types=1);
9
namespace
Commercetools\Api\Models\Common
;
10
11
use
Commercetools\Base\Builder
;
12
use
Commercetools\Base\DateTimeImmutableCollection
;
13
use
Commercetools\Base\JsonObject
;
14
use
Commercetools\Base\JsonObjectModel
;
15
use
Commercetools\Base\MapperFactory
;
16
use stdClass;
17
21
final
class
PriceTierDraftBuilder
implements
Builder
22
{
27
private
$minimumQuantity;
28
33
private
$value;
34
44
public
function
getMinimumQuantity
()
45
{
46
return
$this->minimumQuantity;
47
}
48
56
public
function
getValue
()
57
{
58
return
$this->value instanceof
MoneyBuilder
? $this->value->
build
() : $this->value;
59
}
60
65
public
function
withMinimumQuantity
(?
int
$minimumQuantity)
66
{
67
$this->minimumQuantity = $minimumQuantity;
68
69
return
$this;
70
}
71
76
public
function
withValue
(?
Money
$value)
77
{
78
$this->value = $value;
79
80
return
$this;
81
}
82
87
public
function
withValueBuilder
(?
MoneyBuilder
$value)
88
{
89
$this->value = $value;
90
91
return
$this;
92
}
93
94
public
function
build
():
PriceTierDraft
95
{
96
return
new
PriceTierDraftModel
(
97
$this->minimumQuantity,
98
$this->value instanceof
MoneyBuilder
? $this->value->
build
() : $this->value
99
);
100
}
101
102
public
static
function
of
():
PriceTierDraftBuilder
103
{
104
return
new
self
();
105
}
106
}
Commercetools\Api\Models\Common\MoneyBuilder
Definition:
MoneyBuilder.php:22
Commercetools\Api\Models\Common\MoneyBuilder\build
build()
Definition:
MoneyBuilder.php:84
Commercetools\Api\Models\Common\PriceTierDraftBuilder
Definition:
PriceTierDraftBuilder.php:22
Commercetools\Api\Models\Common\PriceTierDraftBuilder\getMinimumQuantity
getMinimumQuantity()
Definition:
PriceTierDraftBuilder.php:44
Commercetools\Api\Models\Common\PriceTierDraftBuilder\withValue
withValue(?Money $value)
Definition:
PriceTierDraftBuilder.php:76
Commercetools\Api\Models\Common\PriceTierDraftBuilder\build
build()
Definition:
PriceTierDraftBuilder.php:94
Commercetools\Api\Models\Common\PriceTierDraftBuilder\of
static of()
Definition:
PriceTierDraftBuilder.php:102
Commercetools\Api\Models\Common\PriceTierDraftBuilder\withValueBuilder
withValueBuilder(?MoneyBuilder $value)
Definition:
PriceTierDraftBuilder.php:87
Commercetools\Api\Models\Common\PriceTierDraftBuilder\withMinimumQuantity
withMinimumQuantity(?int $minimumQuantity)
Definition:
PriceTierDraftBuilder.php:65
Commercetools\Api\Models\Common\PriceTierDraftBuilder\getValue
getValue()
Definition:
PriceTierDraftBuilder.php:56
Commercetools\Api\Models\Common\PriceTierDraftModel
Definition:
PriceTierDraftModel.php:21
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\Builder
Definition:
Builder.php:16
Commercetools\Base\JsonObject
Definition:
JsonObject.php:15
Commercetools\Api\Models\Common
Definition:
Address.php:9
Generated by
1.9.1