commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
lib
commercetools-import
src
Models
Orders
CustomLineItemTaxedPriceModel.php
1
<?php
2
3
declare(strict_types=1);
9
namespace
Commercetools\Import\Models\Orders
;
10
11
use
Commercetools\Base\DateTimeImmutableCollection
;
12
use
Commercetools\Base\JsonObject
;
13
use
Commercetools\Base\JsonObjectModel
;
14
use
Commercetools\Base\MapperFactory
;
15
use
Commercetools\Import\Models\Common\TypedMoney
;
16
use
Commercetools\Import\Models\Common\TypedMoneyModel
;
17
use stdClass;
18
22
final
class
CustomLineItemTaxedPriceModel
extends
JsonObjectModel
implements
CustomLineItemTaxedPrice
23
{
28
protected
$totalNet
;
29
34
protected
$totalGross
;
35
36
40
public
function
__construct
(
41
?
TypedMoney
$totalNet
=
null
,
42
?
TypedMoney
$totalGross
=
null
43
) {
44
$this->totalNet =
$totalNet
;
45
$this->totalGross =
$totalGross
;
46
}
47
52
public
function
getTotalNet
()
53
{
54
if
(is_null($this->totalNet)) {
56
$data = $this->
raw
(self::FIELD_TOTAL_NET);
57
if
(is_null($data)) {
58
return
null
;
59
}
60
$className =
TypedMoneyModel::resolveDiscriminatorClass
($data);
61
$this->totalNet = $className::of($data);
62
}
63
64
return
$this->totalNet
;
65
}
66
71
public
function
getTotalGross
()
72
{
73
if
(is_null($this->totalGross)) {
75
$data = $this->
raw
(self::FIELD_TOTAL_GROSS);
76
if
(is_null($data)) {
77
return
null
;
78
}
79
$className =
TypedMoneyModel::resolveDiscriminatorClass
($data);
80
$this->totalGross = $className::of($data);
81
}
82
83
return
$this->totalGross
;
84
}
85
86
90
public
function
setTotalNet
(?
TypedMoney
$totalNet
): void
91
{
92
$this->totalNet =
$totalNet
;
93
}
94
98
public
function
setTotalGross
(?
TypedMoney
$totalGross
): void
99
{
100
$this->totalGross =
$totalGross
;
101
}
102
}
Commercetools\Base\BaseJsonObject\raw
raw(string $field)
Definition:
BaseJsonObject.php:57
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\TypedMoneyModel
Definition:
TypedMoneyModel.php:21
Commercetools\Import\Models\Common\TypedMoneyModel\resolveDiscriminatorClass
static resolveDiscriminatorClass($value)
Definition:
TypedMoneyModel.php:176
Commercetools\Import\Models\Orders\CustomLineItemTaxedPriceModel
Definition:
CustomLineItemTaxedPriceModel.php:23
Commercetools\Import\Models\Orders\CustomLineItemTaxedPriceModel\getTotalNet
getTotalNet()
Definition:
CustomLineItemTaxedPriceModel.php:52
Commercetools\Import\Models\Orders\CustomLineItemTaxedPriceModel\$totalGross
$totalGross
Definition:
CustomLineItemTaxedPriceModel.php:34
Commercetools\Import\Models\Orders\CustomLineItemTaxedPriceModel\getTotalGross
getTotalGross()
Definition:
CustomLineItemTaxedPriceModel.php:71
Commercetools\Import\Models\Orders\CustomLineItemTaxedPriceModel\$totalNet
$totalNet
Definition:
CustomLineItemTaxedPriceModel.php:28
Commercetools\Import\Models\Orders\CustomLineItemTaxedPriceModel\setTotalNet
setTotalNet(?TypedMoney $totalNet)
Definition:
CustomLineItemTaxedPriceModel.php:90
Commercetools\Import\Models\Orders\CustomLineItemTaxedPriceModel\setTotalGross
setTotalGross(?TypedMoney $totalGross)
Definition:
CustomLineItemTaxedPriceModel.php:98
Commercetools\Import\Models\Orders\CustomLineItemTaxedPriceModel\__construct
__construct(?TypedMoney $totalNet=null, ?TypedMoney $totalGross=null)
Definition:
CustomLineItemTaxedPriceModel.php:40
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