commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
lib
commercetools-api
src
Models
Order
TaxedItemPriceDraftModel.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\MoneyModel
;
13
use
Commercetools\Base\DateTimeImmutableCollection
;
14
use
Commercetools\Base\JsonObject
;
15
use
Commercetools\Base\JsonObjectModel
;
16
use
Commercetools\Base\MapperFactory
;
17
use stdClass;
18
22
final
class
TaxedItemPriceDraftModel
extends
JsonObjectModel
implements
TaxedItemPriceDraft
23
{
28
protected
$totalNet
;
29
34
protected
$totalGross
;
35
36
40
public
function
__construct
(
41
?
Money
$totalNet
=
null
,
42
?
Money
$totalGross
=
null
43
) {
44
$this->totalNet =
$totalNet
;
45
$this->totalGross =
$totalGross
;
46
}
47
54
public
function
getTotalNet
()
55
{
56
if
(is_null($this->totalNet)) {
58
$data = $this->
raw
(self::FIELD_TOTAL_NET);
59
if
(is_null($data)) {
60
return
null
;
61
}
62
63
$this->totalNet =
MoneyModel::of
($data);
64
}
65
66
return
$this->totalNet
;
67
}
68
75
public
function
getTotalGross
()
76
{
77
if
(is_null($this->totalGross)) {
79
$data = $this->
raw
(self::FIELD_TOTAL_GROSS);
80
if
(is_null($data)) {
81
return
null
;
82
}
83
84
$this->totalGross =
MoneyModel::of
($data);
85
}
86
87
return
$this->totalGross
;
88
}
89
90
94
public
function
setTotalNet
(?
Money
$totalNet
): void
95
{
96
$this->totalNet =
$totalNet
;
97
}
98
102
public
function
setTotalGross
(?
Money
$totalGross
): void
103
{
104
$this->totalGross =
$totalGross
;
105
}
106
}
Commercetools\Api\Models\Common\MoneyModel
Definition:
MoneyModel.php:21
Commercetools\Api\Models\Order\TaxedItemPriceDraftModel
Definition:
TaxedItemPriceDraftModel.php:23
Commercetools\Api\Models\Order\TaxedItemPriceDraftModel\getTotalGross
getTotalGross()
Definition:
TaxedItemPriceDraftModel.php:75
Commercetools\Api\Models\Order\TaxedItemPriceDraftModel\setTotalNet
setTotalNet(?Money $totalNet)
Definition:
TaxedItemPriceDraftModel.php:94
Commercetools\Api\Models\Order\TaxedItemPriceDraftModel\setTotalGross
setTotalGross(?Money $totalGross)
Definition:
TaxedItemPriceDraftModel.php:102
Commercetools\Api\Models\Order\TaxedItemPriceDraftModel\getTotalNet
getTotalNet()
Definition:
TaxedItemPriceDraftModel.php:54
Commercetools\Api\Models\Order\TaxedItemPriceDraftModel\$totalGross
$totalGross
Definition:
TaxedItemPriceDraftModel.php:34
Commercetools\Api\Models\Order\TaxedItemPriceDraftModel\__construct
__construct(?Money $totalNet=null, ?Money $totalGross=null)
Definition:
TaxedItemPriceDraftModel.php:40
Commercetools\Api\Models\Order\TaxedItemPriceDraftModel\$totalNet
$totalNet
Definition:
TaxedItemPriceDraftModel.php:28
Commercetools\Base\BaseJsonObject\raw
raw(string $field)
Definition:
BaseJsonObject.php:57
Commercetools\Base\BaseJsonObject\of
static of($data=null)
Definition:
BaseJsonObject.php:26
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\JsonObject
Definition:
JsonObject.php:15
Commercetools\Api\Models\Order
Definition:
CustomLineItemImportDraft.php:9
Generated by
1.9.1