commercetools-sdk-php-v2
master
The platform, import-api and ml-api PHP sdks generated from our api reference.
lib
commercetools-import
src
Models
Orders
ClassificationShippingRateInputModel.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\LocalizedString
;
16
use
Commercetools\Import\Models\Common\LocalizedStringModel
;
17
use stdClass;
18
22
final
class
ClassificationShippingRateInputModel
extends
JsonObjectModel
implements
ClassificationShippingRateInput
23
{
24
public
const
DISCRIMINATOR_VALUE
=
'Classification'
;
29
protected
$type
;
30
35
protected
$key
;
36
41
protected
$label
;
42
43
47
public
function
__construct
(
48
?
string
$key
=
null
,
49
?
LocalizedString
$label
=
null
,
50
?
string
$type
=
null
51
) {
52
$this->key =
$key
;
53
$this->label =
$label
;
54
$this->type =
$type
??
self::DISCRIMINATOR_VALUE
;
55
}
56
61
public
function
getType
()
62
{
63
if
(is_null($this->type)) {
65
$data = $this->
raw
(self::FIELD_TYPE);
66
if
(is_null($data)) {
67
return
null
;
68
}
69
$this->type = (string) $data;
70
}
71
72
return
$this->type
;
73
}
74
79
public
function
getKey
()
80
{
81
if
(is_null($this->key)) {
83
$data = $this->
raw
(self::FIELD_KEY);
84
if
(is_null($data)) {
85
return
null
;
86
}
87
$this->key = (string) $data;
88
}
89
90
return
$this->key
;
91
}
92
104
public
function
getLabel
()
105
{
106
if
(is_null($this->label)) {
108
$data = $this->
raw
(self::FIELD_LABEL);
109
if
(is_null($data)) {
110
return
null
;
111
}
112
113
$this->label =
LocalizedStringModel::of
($data);
114
}
115
116
return
$this->label
;
117
}
118
119
123
public
function
setKey
(?
string
$key
): void
124
{
125
$this->key =
$key
;
126
}
127
131
public
function
setLabel
(?
LocalizedString
$label
): void
132
{
133
$this->label =
$label
;
134
}
135
}
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\Base\MapperMap\of
static of($data=null)
Definition:
MapperMap.php:45
Commercetools\Import\Models\Common\LocalizedStringModel
Definition:
LocalizedStringModel.php:17
Commercetools\Import\Models\Orders\ClassificationShippingRateInputModel
Definition:
ClassificationShippingRateInputModel.php:23
Commercetools\Import\Models\Orders\ClassificationShippingRateInputModel\$label
$label
Definition:
ClassificationShippingRateInputModel.php:41
Commercetools\Import\Models\Orders\ClassificationShippingRateInputModel\getType
getType()
Definition:
ClassificationShippingRateInputModel.php:61
Commercetools\Import\Models\Orders\ClassificationShippingRateInputModel\$key
$key
Definition:
ClassificationShippingRateInputModel.php:35
Commercetools\Import\Models\Orders\ClassificationShippingRateInputModel\__construct
__construct(?string $key=null, ?LocalizedString $label=null, ?string $type=null)
Definition:
ClassificationShippingRateInputModel.php:47
Commercetools\Import\Models\Orders\ClassificationShippingRateInputModel\DISCRIMINATOR_VALUE
const DISCRIMINATOR_VALUE
Definition:
ClassificationShippingRateInputModel.php:24
Commercetools\Import\Models\Orders\ClassificationShippingRateInputModel\getLabel
getLabel()
Definition:
ClassificationShippingRateInputModel.php:104
Commercetools\Import\Models\Orders\ClassificationShippingRateInputModel\setKey
setKey(?string $key)
Definition:
ClassificationShippingRateInputModel.php:123
Commercetools\Import\Models\Orders\ClassificationShippingRateInputModel\setLabel
setLabel(?LocalizedString $label)
Definition:
ClassificationShippingRateInputModel.php:131
Commercetools\Import\Models\Orders\ClassificationShippingRateInputModel\getKey
getKey()
Definition:
ClassificationShippingRateInputModel.php:79
Commercetools\Import\Models\Orders\ClassificationShippingRateInputModel\$type
$type
Definition:
ClassificationShippingRateInputModel.php:29
Commercetools\Base\JsonObject
Definition:
JsonObject.php:15
Commercetools\Import\Models\Common\LocalizedString
Definition:
LocalizedString.php:14
Commercetools\Import\Models\Orders\ClassificationShippingRateInput
Definition:
ClassificationShippingRateInput.php:16
Commercetools\Import\Models\Orders
Definition:
CartClassificationTier.php:9
Generated by
1.9.1