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