commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
lib
commercetools-import
src
Models
Orders
CustomLineItemTaxedPriceBuilder.php
1
<?php
2
3
declare(strict_types=1);
9
namespace
Commercetools\Import\Models\Orders
;
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
Commercetools\Import\Models\Common\TypedMoney
;
17
use
Commercetools\Import\Models\Common\TypedMoneyBuilder
;
18
use stdClass;
19
23
final
class
CustomLineItemTaxedPriceBuilder
implements
Builder
24
{
29
private
$totalNet;
30
35
private
$totalGross;
36
41
public
function
getTotalNet
()
42
{
43
return
$this->totalNet instanceof
TypedMoneyBuilder
? $this->totalNet->
build
() : $this->totalNet;
44
}
45
50
public
function
getTotalGross
()
51
{
52
return
$this->totalGross instanceof
TypedMoneyBuilder
? $this->totalGross->
build
() : $this->totalGross;
53
}
54
59
public
function
withTotalNet
(?
TypedMoney
$totalNet)
60
{
61
$this->totalNet = $totalNet;
62
63
return
$this;
64
}
65
70
public
function
withTotalGross
(?
TypedMoney
$totalGross)
71
{
72
$this->totalGross = $totalGross;
73
74
return
$this;
75
}
76
81
public
function
withTotalNetBuilder
(?
TypedMoneyBuilder
$totalNet)
82
{
83
$this->totalNet = $totalNet;
84
85
return
$this;
86
}
87
92
public
function
withTotalGrossBuilder
(?
TypedMoneyBuilder
$totalGross)
93
{
94
$this->totalGross = $totalGross;
95
96
return
$this;
97
}
98
99
public
function
build
():
CustomLineItemTaxedPrice
100
{
101
return
new
CustomLineItemTaxedPriceModel
(
102
$this->totalNet instanceof
TypedMoneyBuilder
? $this->totalNet->
build
() : $this->totalNet,
103
$this->totalGross instanceof
TypedMoneyBuilder
? $this->totalGross->
build
() : $this->totalGross
104
);
105
}
106
107
public
static
function
of
():
CustomLineItemTaxedPriceBuilder
108
{
109
return
new
self
();
110
}
111
}
Commercetools\Base\DateTimeImmutableCollection
Definition:
DateTimeImmutableCollection.php:21
Commercetools\Base\JsonObjectModel
Definition:
JsonObjectModel.php:15
Commercetools\Base\MapperFactory
Definition:
MapperFactory.php:16
Commercetools\Import\Models\Common\TypedMoneyBuilder
Definition:
TypedMoneyBuilder.php:22
Commercetools\Import\Models\Common\TypedMoneyBuilder\build
build()
Definition:
TypedMoneyBuilder.php:104
Commercetools\Import\Models\Orders\CustomLineItemTaxedPriceBuilder
Definition:
CustomLineItemTaxedPriceBuilder.php:24
Commercetools\Import\Models\Orders\CustomLineItemTaxedPriceBuilder\withTotalGross
withTotalGross(?TypedMoney $totalGross)
Definition:
CustomLineItemTaxedPriceBuilder.php:70
Commercetools\Import\Models\Orders\CustomLineItemTaxedPriceBuilder\withTotalNetBuilder
withTotalNetBuilder(?TypedMoneyBuilder $totalNet)
Definition:
CustomLineItemTaxedPriceBuilder.php:81
Commercetools\Import\Models\Orders\CustomLineItemTaxedPriceBuilder\build
build()
Definition:
CustomLineItemTaxedPriceBuilder.php:99
Commercetools\Import\Models\Orders\CustomLineItemTaxedPriceBuilder\withTotalGrossBuilder
withTotalGrossBuilder(?TypedMoneyBuilder $totalGross)
Definition:
CustomLineItemTaxedPriceBuilder.php:92
Commercetools\Import\Models\Orders\CustomLineItemTaxedPriceBuilder\getTotalNet
getTotalNet()
Definition:
CustomLineItemTaxedPriceBuilder.php:41
Commercetools\Import\Models\Orders\CustomLineItemTaxedPriceBuilder\of
static of()
Definition:
CustomLineItemTaxedPriceBuilder.php:107
Commercetools\Import\Models\Orders\CustomLineItemTaxedPriceBuilder\getTotalGross
getTotalGross()
Definition:
CustomLineItemTaxedPriceBuilder.php:50
Commercetools\Import\Models\Orders\CustomLineItemTaxedPriceBuilder\withTotalNet
withTotalNet(?TypedMoney $totalNet)
Definition:
CustomLineItemTaxedPriceBuilder.php:59
Commercetools\Import\Models\Orders\CustomLineItemTaxedPriceModel
Definition:
CustomLineItemTaxedPriceModel.php:23
Commercetools\Base\Builder
Definition:
Builder.php:16
Commercetools\Base\JsonObject
Definition:
JsonObject.php:15
Commercetools\Import\Models\Common\TypedMoney
Definition:
TypedMoney.php:15
Commercetools\Import\Models\Orders\CustomLineItemTaxedPrice
Definition:
CustomLineItemTaxedPrice.php:16
Commercetools\Import\Models\Orders
Definition:
CartClassificationTier.php:9
Generated by
1.9.1