commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
lib
commercetools-api
src
Models
Cart
MethodExternalTaxRateDraftBuilder.php
1
<?php
2
3
declare(strict_types=1);
9
namespace
Commercetools\Api\Models\Cart
;
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 stdClass;
17
21
final
class
MethodExternalTaxRateDraftBuilder
implements
Builder
22
{
27
private
$shippingMethodKey;
28
33
private
$taxRate;
34
41
public
function
getShippingMethodKey
()
42
{
43
return
$this->shippingMethodKey;
44
}
45
52
public
function
getTaxRate
()
53
{
54
return
$this->taxRate instanceof
ExternalTaxRateDraftBuilder
? $this->taxRate->
build
() : $this->taxRate;
55
}
56
61
public
function
withShippingMethodKey
(?
string
$shippingMethodKey)
62
{
63
$this->shippingMethodKey = $shippingMethodKey;
64
65
return
$this;
66
}
67
72
public
function
withTaxRate
(?
ExternalTaxRateDraft
$taxRate)
73
{
74
$this->taxRate = $taxRate;
75
76
return
$this;
77
}
78
83
public
function
withTaxRateBuilder
(?
ExternalTaxRateDraftBuilder
$taxRate)
84
{
85
$this->taxRate = $taxRate;
86
87
return
$this;
88
}
89
90
public
function
build
():
MethodExternalTaxRateDraft
91
{
92
return
new
MethodExternalTaxRateDraftModel
(
93
$this->shippingMethodKey,
94
$this->taxRate instanceof
ExternalTaxRateDraftBuilder
? $this->taxRate->
build
() : $this->taxRate
95
);
96
}
97
98
public
static
function
of
():
MethodExternalTaxRateDraftBuilder
99
{
100
return
new
self
();
101
}
102
}
Commercetools\Api\Models\Cart\ExternalTaxRateDraftBuilder
Definition:
ExternalTaxRateDraftBuilder.php:23
Commercetools\Api\Models\Cart\ExternalTaxRateDraftBuilder\build
build()
Definition:
ExternalTaxRateDraftBuilder.php:201
Commercetools\Api\Models\Cart\MethodExternalTaxRateDraftBuilder
Definition:
MethodExternalTaxRateDraftBuilder.php:22
Commercetools\Api\Models\Cart\MethodExternalTaxRateDraftBuilder\getTaxRate
getTaxRate()
Definition:
MethodExternalTaxRateDraftBuilder.php:52
Commercetools\Api\Models\Cart\MethodExternalTaxRateDraftBuilder\build
build()
Definition:
MethodExternalTaxRateDraftBuilder.php:90
Commercetools\Api\Models\Cart\MethodExternalTaxRateDraftBuilder\withShippingMethodKey
withShippingMethodKey(?string $shippingMethodKey)
Definition:
MethodExternalTaxRateDraftBuilder.php:61
Commercetools\Api\Models\Cart\MethodExternalTaxRateDraftBuilder\withTaxRate
withTaxRate(?ExternalTaxRateDraft $taxRate)
Definition:
MethodExternalTaxRateDraftBuilder.php:72
Commercetools\Api\Models\Cart\MethodExternalTaxRateDraftBuilder\getShippingMethodKey
getShippingMethodKey()
Definition:
MethodExternalTaxRateDraftBuilder.php:41
Commercetools\Api\Models\Cart\MethodExternalTaxRateDraftBuilder\withTaxRateBuilder
withTaxRateBuilder(?ExternalTaxRateDraftBuilder $taxRate)
Definition:
MethodExternalTaxRateDraftBuilder.php:83
Commercetools\Api\Models\Cart\MethodExternalTaxRateDraftBuilder\of
static of()
Definition:
MethodExternalTaxRateDraftBuilder.php:98
Commercetools\Api\Models\Cart\MethodExternalTaxRateDraftModel
Definition:
MethodExternalTaxRateDraftModel.php:21
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\ExternalTaxRateDraft
Definition:
ExternalTaxRateDraft.php:16
Commercetools\Api\Models\Cart\MethodExternalTaxRateDraft
Definition:
MethodExternalTaxRateDraft.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.1