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
Order
TaxedItemPriceDraftBuilder.php
1
<?php
2
3
declare(strict_types=1);
9
namespace
Commercetools\Api\Models\Order
;
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
TaxedItemPriceDraftBuilder
implements
Builder
24
{
29
private
$totalNet;
30
35
private
$totalGross;
36
43
public
function
getTotalNet
()
44
{
45
return
$this->totalNet instanceof
MoneyBuilder
? $this->totalNet->
build
() : $this->totalNet;
46
}
47
54
public
function
getTotalGross
()
55
{
56
return
$this->totalGross instanceof
MoneyBuilder
? $this->totalGross->
build
() : $this->totalGross;
57
}
58
63
public
function
withTotalNet
(?
Money
$totalNet)
64
{
65
$this->totalNet = $totalNet;
66
67
return
$this;
68
}
69
74
public
function
withTotalGross
(?
Money
$totalGross)
75
{
76
$this->totalGross = $totalGross;
77
78
return
$this;
79
}
80
85
public
function
withTotalNetBuilder
(?
MoneyBuilder
$totalNet)
86
{
87
$this->totalNet = $totalNet;
88
89
return
$this;
90
}
91
96
public
function
withTotalGrossBuilder
(?
MoneyBuilder
$totalGross)
97
{
98
$this->totalGross = $totalGross;
99
100
return
$this;
101
}
102
103
public
function
build
():
TaxedItemPriceDraft
104
{
105
return
new
TaxedItemPriceDraftModel
(
106
$this->totalNet instanceof
MoneyBuilder
? $this->totalNet->
build
() : $this->totalNet,
107
$this->totalGross instanceof
MoneyBuilder
? $this->totalGross->
build
() : $this->totalGross
108
);
109
}
110
111
public
static
function
of
():
TaxedItemPriceDraftBuilder
112
{
113
return
new
self
();
114
}
115
}
Commercetools\Api\Models\Common\MoneyBuilder
Definition
MoneyBuilder.php:22
Commercetools\Api\Models\Common\MoneyBuilder\build
build()
Definition
MoneyBuilder.php:84
Commercetools\Api\Models\Order\TaxedItemPriceDraftBuilder
Definition
TaxedItemPriceDraftBuilder.php:24
Commercetools\Api\Models\Order\TaxedItemPriceDraftBuilder\withTotalGross
withTotalGross(?Money $totalGross)
Definition
TaxedItemPriceDraftBuilder.php:74
Commercetools\Api\Models\Order\TaxedItemPriceDraftBuilder\build
build()
Definition
TaxedItemPriceDraftBuilder.php:103
Commercetools\Api\Models\Order\TaxedItemPriceDraftBuilder\withTotalGrossBuilder
withTotalGrossBuilder(?MoneyBuilder $totalGross)
Definition
TaxedItemPriceDraftBuilder.php:96
Commercetools\Api\Models\Order\TaxedItemPriceDraftBuilder\withTotalNetBuilder
withTotalNetBuilder(?MoneyBuilder $totalNet)
Definition
TaxedItemPriceDraftBuilder.php:85
Commercetools\Api\Models\Order\TaxedItemPriceDraftBuilder\getTotalNet
getTotalNet()
Definition
TaxedItemPriceDraftBuilder.php:43
Commercetools\Api\Models\Order\TaxedItemPriceDraftBuilder\withTotalNet
withTotalNet(?Money $totalNet)
Definition
TaxedItemPriceDraftBuilder.php:63
Commercetools\Api\Models\Order\TaxedItemPriceDraftBuilder\getTotalGross
getTotalGross()
Definition
TaxedItemPriceDraftBuilder.php:54
Commercetools\Api\Models\Order\TaxedItemPriceDraftBuilder\of
static of()
Definition
TaxedItemPriceDraftBuilder.php:111
Commercetools\Api\Models\Order\TaxedItemPriceDraftModel
Definition
TaxedItemPriceDraftModel.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\Order\TaxedItemPriceDraft
Definition
TaxedItemPriceDraft.php:16
Commercetools\Base\Builder
Definition
Builder.php:16
Commercetools\Base\JsonObject
Definition
JsonObject.php:15
Commercetools\Api\Models\Order
Definition
CustomLineItemImportDraft.php:9
Generated by
1.9.8