commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
lib
commercetools-api
src
Models
OrderEdit
OrderExcerptBuilder.php
1
<?php
2
3
declare(strict_types=1);
9
namespace
Commercetools\Api\Models\OrderEdit
;
10
11
use
Commercetools\Api\Models\Cart\TaxedPrice
;
12
use
Commercetools\Api\Models\Cart\TaxedPriceBuilder
;
13
use
Commercetools\Api\Models\Common\TypedMoney
;
14
use
Commercetools\Api\Models\Common\TypedMoneyBuilder
;
15
use
Commercetools\Base\Builder
;
16
use
Commercetools\Base\DateTimeImmutableCollection
;
17
use
Commercetools\Base\JsonObject
;
18
use
Commercetools\Base\JsonObjectModel
;
19
use
Commercetools\Base\MapperFactory
;
20
use stdClass;
21
25
final
class
OrderExcerptBuilder
implements
Builder
26
{
31
private
$totalPrice;
32
37
private
$taxedPrice;
38
43
private
$version;
44
51
public
function
getTotalPrice
()
52
{
53
return
$this->totalPrice instanceof
TypedMoneyBuilder
? $this->totalPrice->
build
() : $this->totalPrice;
54
}
55
62
public
function
getTaxedPrice
()
63
{
64
return
$this->taxedPrice instanceof
TaxedPriceBuilder
? $this->taxedPrice->
build
() : $this->taxedPrice;
65
}
66
73
public
function
getVersion
()
74
{
75
return
$this->version;
76
}
77
82
public
function
withTotalPrice
(?
TypedMoney
$totalPrice)
83
{
84
$this->totalPrice = $totalPrice;
85
86
return
$this;
87
}
88
93
public
function
withTaxedPrice
(?
TaxedPrice
$taxedPrice)
94
{
95
$this->taxedPrice = $taxedPrice;
96
97
return
$this;
98
}
99
104
public
function
withVersion
(?
int
$version)
105
{
106
$this->version = $version;
107
108
return
$this;
109
}
110
115
public
function
withTotalPriceBuilder
(?
TypedMoneyBuilder
$totalPrice)
116
{
117
$this->totalPrice = $totalPrice;
118
119
return
$this;
120
}
121
126
public
function
withTaxedPriceBuilder
(?
TaxedPriceBuilder
$taxedPrice)
127
{
128
$this->taxedPrice = $taxedPrice;
129
130
return
$this;
131
}
132
133
public
function
build
():
OrderExcerpt
134
{
135
return
new
OrderExcerptModel
(
136
$this->totalPrice instanceof
TypedMoneyBuilder
? $this->totalPrice->
build
() : $this->totalPrice,
137
$this->taxedPrice instanceof
TaxedPriceBuilder
? $this->taxedPrice->
build
() : $this->taxedPrice,
138
$this->version
139
);
140
}
141
142
public
static
function
of
():
OrderExcerptBuilder
143
{
144
return
new
self
();
145
}
146
}
Commercetools\Api\Models\Cart\TaxedPriceBuilder
Definition:
TaxedPriceBuilder.php:24
Commercetools\Api\Models\Cart\TaxedPriceBuilder\build
build()
Definition:
TaxedPriceBuilder.php:172
Commercetools\Api\Models\Common\TypedMoneyBuilder
Definition:
TypedMoneyBuilder.php:22
Commercetools\Api\Models\Common\TypedMoneyBuilder\build
build()
Definition:
TypedMoneyBuilder.php:116
Commercetools\Api\Models\OrderEdit\OrderExcerptBuilder
Definition:
OrderExcerptBuilder.php:26
Commercetools\Api\Models\OrderEdit\OrderExcerptBuilder\withTaxedPrice
withTaxedPrice(?TaxedPrice $taxedPrice)
Definition:
OrderExcerptBuilder.php:93
Commercetools\Api\Models\OrderEdit\OrderExcerptBuilder\withTotalPrice
withTotalPrice(?TypedMoney $totalPrice)
Definition:
OrderExcerptBuilder.php:82
Commercetools\Api\Models\OrderEdit\OrderExcerptBuilder\withTaxedPriceBuilder
withTaxedPriceBuilder(?TaxedPriceBuilder $taxedPrice)
Definition:
OrderExcerptBuilder.php:126
Commercetools\Api\Models\OrderEdit\OrderExcerptBuilder\getVersion
getVersion()
Definition:
OrderExcerptBuilder.php:73
Commercetools\Api\Models\OrderEdit\OrderExcerptBuilder\withVersion
withVersion(?int $version)
Definition:
OrderExcerptBuilder.php:104
Commercetools\Api\Models\OrderEdit\OrderExcerptBuilder\of
static of()
Definition:
OrderExcerptBuilder.php:142
Commercetools\Api\Models\OrderEdit\OrderExcerptBuilder\getTaxedPrice
getTaxedPrice()
Definition:
OrderExcerptBuilder.php:62
Commercetools\Api\Models\OrderEdit\OrderExcerptBuilder\withTotalPriceBuilder
withTotalPriceBuilder(?TypedMoneyBuilder $totalPrice)
Definition:
OrderExcerptBuilder.php:115
Commercetools\Api\Models\OrderEdit\OrderExcerptBuilder\getTotalPrice
getTotalPrice()
Definition:
OrderExcerptBuilder.php:51
Commercetools\Api\Models\OrderEdit\OrderExcerptBuilder\build
build()
Definition:
OrderExcerptBuilder.php:133
Commercetools\Api\Models\OrderEdit\OrderExcerptModel
Definition:
OrderExcerptModel.php:25
Commercetools\Base\DateTimeImmutableCollection
Definition:
DateTimeImmutableCollection.php:21
Commercetools\Base\JsonObjectModel
Definition:
JsonObjectModel.php:15
Commercetools\Base\MapperFactory
Definition:
MapperFactory.php:16
Commercetools\Api\Models\Cart\TaxedPrice
Definition:
TaxedPrice.php:16
Commercetools\Api\Models\Common\TypedMoney
Definition:
TypedMoney.php:15
Commercetools\Api\Models\OrderEdit\OrderExcerpt
Definition:
OrderExcerpt.php:17
Commercetools\Base\Builder
Definition:
Builder.php:16
Commercetools\Base\JsonObject
Definition:
JsonObject.php:15
Commercetools\Api\Models\OrderEdit
Definition:
OrderEdit.php:9
Generated by
1.9.1