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
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
57
public
function
getValue
()
58
{
59
return
$this->value instanceof
MoneyBuilder
? $this->value->
build
() : $this->value;
60
}
61
66
public
function
withMinimumQuantity
(?
int
$minimumQuantity)
67
{
68
$this->minimumQuantity = $minimumQuantity;
69
70
return
$this;
71
}
72
77
public
function
withValue
(?
Money
$value)
78
{
79
$this->value = $value;
80
81
return
$this;
82
}
83
88
public
function
withValueBuilder
(?
MoneyBuilder
$value)
89
{
90
$this->value = $value;
91
92
return
$this;
93
}
94
95
public
function
build
():
PriceTierDraft
96
{
97
return
new
PriceTierDraftModel
(
98
$this->minimumQuantity,
99
$this->value instanceof
MoneyBuilder
? $this->value->
build
() : $this->value
100
);
101
}
102
103
public
static
function
of
():
PriceTierDraftBuilder
104
{
105
return
new
self
();
106
}
107
}
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:77
Commercetools\Api\Models\Common\PriceTierDraftBuilder\build
build()
Definition
PriceTierDraftBuilder.php:95
Commercetools\Api\Models\Common\PriceTierDraftBuilder\of
static of()
Definition
PriceTierDraftBuilder.php:103
Commercetools\Api\Models\Common\PriceTierDraftBuilder\withValueBuilder
withValueBuilder(?MoneyBuilder $value)
Definition
PriceTierDraftBuilder.php:88
Commercetools\Api\Models\Common\PriceTierDraftBuilder\withMinimumQuantity
withMinimumQuantity(?int $minimumQuantity)
Definition
PriceTierDraftBuilder.php:66
Commercetools\Api\Models\Common\PriceTierDraftBuilder\getValue
getValue()
Definition
PriceTierDraftBuilder.php:57
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.8