commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
lib
commercetools-api
src
Models
ShippingMethod
CartValueTierBuilder.php
1
<?php
2
3
declare(strict_types=1);
9
namespace
Commercetools\Api\Models\ShippingMethod
;
10
11
use
Commercetools\Api\Models\Common\Money
;
12
use
Commercetools\Api\Models\Common\MoneyBuilder
;
13
use
Commercetools\Base\Builder
;
14
use
Commercetools\Base\DateTimeImmutableCollection
;
15
use
Commercetools\Base\JsonObject
;
16
use
Commercetools\Base\JsonObjectModel
;
17
use
Commercetools\Base\MapperFactory
;
18
use stdClass;
19
23
final
class
CartValueTierBuilder
implements
Builder
24
{
29
private
$minimumCentAmount;
30
35
private
$price;
36
41
private
$isMatching;
42
49
public
function
getMinimumCentAmount
()
50
{
51
return
$this->minimumCentAmount;
52
}
53
60
public
function
getPrice
()
61
{
62
return
$this->price instanceof
MoneyBuilder
? $this->price->
build
() : $this->price;
63
}
64
71
public
function
getIsMatching
()
72
{
73
return
$this->isMatching;
74
}
75
80
public
function
withMinimumCentAmount
(?
int
$minimumCentAmount)
81
{
82
$this->minimumCentAmount = $minimumCentAmount;
83
84
return
$this;
85
}
86
91
public
function
withPrice
(?
Money
$price)
92
{
93
$this->price = $price;
94
95
return
$this;
96
}
97
102
public
function
withIsMatching
(?
bool
$isMatching)
103
{
104
$this->isMatching = $isMatching;
105
106
return
$this;
107
}
108
113
public
function
withPriceBuilder
(?
MoneyBuilder
$price)
114
{
115
$this->price = $price;
116
117
return
$this;
118
}
119
120
public
function
build
():
CartValueTier
121
{
122
return
new
CartValueTierModel
(
123
$this->minimumCentAmount,
124
$this->price instanceof
MoneyBuilder
? $this->price->
build
() : $this->price,
125
$this->isMatching
126
);
127
}
128
129
public
static
function
of
():
CartValueTierBuilder
130
{
131
return
new
self
();
132
}
133
}
Commercetools\Api\Models\Common\MoneyBuilder
Definition:
MoneyBuilder.php:22
Commercetools\Api\Models\Common\MoneyBuilder\build
build()
Definition:
MoneyBuilder.php:84
Commercetools\Api\Models\ShippingMethod\CartValueTierBuilder
Definition:
CartValueTierBuilder.php:24
Commercetools\Api\Models\ShippingMethod\CartValueTierBuilder\getIsMatching
getIsMatching()
Definition:
CartValueTierBuilder.php:71
Commercetools\Api\Models\ShippingMethod\CartValueTierBuilder\withPrice
withPrice(?Money $price)
Definition:
CartValueTierBuilder.php:91
Commercetools\Api\Models\ShippingMethod\CartValueTierBuilder\withPriceBuilder
withPriceBuilder(?MoneyBuilder $price)
Definition:
CartValueTierBuilder.php:113
Commercetools\Api\Models\ShippingMethod\CartValueTierBuilder\build
build()
Definition:
CartValueTierBuilder.php:120
Commercetools\Api\Models\ShippingMethod\CartValueTierBuilder\getMinimumCentAmount
getMinimumCentAmount()
Definition:
CartValueTierBuilder.php:49
Commercetools\Api\Models\ShippingMethod\CartValueTierBuilder\withIsMatching
withIsMatching(?bool $isMatching)
Definition:
CartValueTierBuilder.php:102
Commercetools\Api\Models\ShippingMethod\CartValueTierBuilder\withMinimumCentAmount
withMinimumCentAmount(?int $minimumCentAmount)
Definition:
CartValueTierBuilder.php:80
Commercetools\Api\Models\ShippingMethod\CartValueTierBuilder\of
static of()
Definition:
CartValueTierBuilder.php:129
Commercetools\Api\Models\ShippingMethod\CartValueTierBuilder\getPrice
getPrice()
Definition:
CartValueTierBuilder.php:60
Commercetools\Api\Models\ShippingMethod\CartValueTierModel
Definition:
CartValueTierModel.php:23
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\ShippingMethod\CartValueTier
Definition:
CartValueTier.php:16
Commercetools\Base\Builder
Definition:
Builder.php:16
Commercetools\Base\JsonObject
Definition:
JsonObject.php:15
Commercetools\Api\Models\ShippingMethod
Definition:
CartClassificationTier.php:9
Generated by
1.9.1