commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
lib
commercetools-api
src
Models
ShippingMethod
ZoneRateDraftBuilder.php
1
<?php
2
3
declare(strict_types=1);
9
namespace
Commercetools\Api\Models\ShippingMethod
;
10
11
use
Commercetools\Api\Models\Zone\ZoneResourceIdentifier
;
12
use
Commercetools\Api\Models\Zone\ZoneResourceIdentifierBuilder
;
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
ZoneRateDraftBuilder
implements
Builder
24
{
29
private
$zone;
30
35
private
$shippingRates;
36
43
public
function
getZone
()
44
{
45
return
$this->zone instanceof
ZoneResourceIdentifierBuilder
? $this->zone->
build
() : $this->zone;
46
}
47
54
public
function
getShippingRates
()
55
{
56
return
$this->shippingRates;
57
}
58
63
public
function
withZone
(?
ZoneResourceIdentifier
$zone)
64
{
65
$this->zone = $zone;
66
67
return
$this;
68
}
69
74
public
function
withShippingRates
(?
ShippingRateDraftCollection
$shippingRates)
75
{
76
$this->shippingRates = $shippingRates;
77
78
return
$this;
79
}
80
85
public
function
withZoneBuilder
(?
ZoneResourceIdentifierBuilder
$zone)
86
{
87
$this->zone = $zone;
88
89
return
$this;
90
}
91
92
public
function
build
():
ZoneRateDraft
93
{
94
return
new
ZoneRateDraftModel
(
95
$this->zone instanceof
ZoneResourceIdentifierBuilder
? $this->zone->
build
() : $this->zone,
96
$this->shippingRates
97
);
98
}
99
100
public
static
function
of
():
ZoneRateDraftBuilder
101
{
102
return
new
self
();
103
}
104
}
Commercetools\Api\Models\ShippingMethod\ShippingRateDraftCollection
Definition:
ShippingRateDraftCollection.php:22
Commercetools\Api\Models\ShippingMethod\ZoneRateDraftBuilder
Definition:
ZoneRateDraftBuilder.php:24
Commercetools\Api\Models\ShippingMethod\ZoneRateDraftBuilder\withZoneBuilder
withZoneBuilder(?ZoneResourceIdentifierBuilder $zone)
Definition:
ZoneRateDraftBuilder.php:85
Commercetools\Api\Models\ShippingMethod\ZoneRateDraftBuilder\withShippingRates
withShippingRates(?ShippingRateDraftCollection $shippingRates)
Definition:
ZoneRateDraftBuilder.php:74
Commercetools\Api\Models\ShippingMethod\ZoneRateDraftBuilder\getShippingRates
getShippingRates()
Definition:
ZoneRateDraftBuilder.php:54
Commercetools\Api\Models\ShippingMethod\ZoneRateDraftBuilder\getZone
getZone()
Definition:
ZoneRateDraftBuilder.php:43
Commercetools\Api\Models\ShippingMethod\ZoneRateDraftBuilder\withZone
withZone(?ZoneResourceIdentifier $zone)
Definition:
ZoneRateDraftBuilder.php:63
Commercetools\Api\Models\ShippingMethod\ZoneRateDraftBuilder\build
build()
Definition:
ZoneRateDraftBuilder.php:92
Commercetools\Api\Models\ShippingMethod\ZoneRateDraftBuilder\of
static of()
Definition:
ZoneRateDraftBuilder.php:100
Commercetools\Api\Models\ShippingMethod\ZoneRateDraftModel
Definition:
ZoneRateDraftModel.php:23
Commercetools\Api\Models\Zone\ZoneResourceIdentifierBuilder
Definition:
ZoneResourceIdentifierBuilder.php:24
Commercetools\Api\Models\Zone\ZoneResourceIdentifierBuilder\build
build()
Definition:
ZoneResourceIdentifierBuilder.php:82
Commercetools\Base\DateTimeImmutableCollection
Definition:
DateTimeImmutableCollection.php:21
Commercetools\Base\JsonObjectModel
Definition:
JsonObjectModel.php:15
Commercetools\Base\MapperFactory
Definition:
MapperFactory.php:16
Commercetools\Api\Models\ShippingMethod\ZoneRateDraft
Definition:
ZoneRateDraft.php:16
Commercetools\Api\Models\Zone\ZoneResourceIdentifier
Definition:
ZoneResourceIdentifier.php:16
Commercetools\Base\Builder
Definition:
Builder.php:16
Commercetools\Base\JsonObject
Definition:
JsonObject.php:15
Commercetools\Api\Models\ShippingMethod
Definition:
CartClassificationTier.php:9
Generated by
1.9.1