commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
lib
commercetools-import
src
Models
OrderPatches
OrderPatchImportModel.php
1
<?php
2
3
declare(strict_types=1);
9
namespace
Commercetools\Import\Models\OrderPatches
;
10
11
use
Commercetools\Base\DateTimeImmutableCollection
;
12
use
Commercetools\Base\JsonObject
;
13
use
Commercetools\Base\JsonObjectModel
;
14
use
Commercetools\Base\MapperFactory
;
15
use stdClass;
16
20
final
class
OrderPatchImportModel
extends
JsonObjectModel
implements
OrderPatchImport
21
{
26
protected
$orderNumber
;
27
32
protected
$fields
;
33
34
38
public
function
__construct
(
39
?
string
$orderNumber
=
null
,
40
?
OrderField
$fields
=
null
41
) {
42
$this->orderNumber =
$orderNumber
;
43
$this->fields =
$fields
;
44
}
45
52
public
function
getOrderNumber
()
53
{
54
if
(is_null($this->orderNumber)) {
56
$data = $this->
raw
(self::FIELD_ORDER_NUMBER);
57
if
(is_null($data)) {
58
return
null
;
59
}
60
$this->orderNumber = (string) $data;
61
}
62
63
return
$this->orderNumber
;
64
}
65
72
public
function
getFields
()
73
{
74
if
(is_null($this->fields)) {
76
$data = $this->
raw
(self::FIELD_FIELDS);
77
if
(is_null($data)) {
78
return
null
;
79
}
80
81
$this->fields =
OrderFieldModel::of
($data);
82
}
83
84
return
$this->fields
;
85
}
86
87
91
public
function
setOrderNumber
(?
string
$orderNumber
): void
92
{
93
$this->orderNumber =
$orderNumber
;
94
}
95
99
public
function
setFields
(?
OrderField
$fields
): void
100
{
101
$this->fields =
$fields
;
102
}
103
}
Commercetools\Base\BaseJsonObject\raw
raw(string $field)
Definition:
BaseJsonObject.php:57
Commercetools\Base\BaseJsonObject\of
static of($data=null)
Definition:
BaseJsonObject.php:26
Commercetools\Base\DateTimeImmutableCollection
Definition:
DateTimeImmutableCollection.php:21
Commercetools\Base\JsonObjectModel
Definition:
JsonObjectModel.php:15
Commercetools\Base\MapperFactory
Definition:
MapperFactory.php:16
Commercetools\Import\Models\OrderPatches\OrderPatchImportModel
Definition:
OrderPatchImportModel.php:21
Commercetools\Import\Models\OrderPatches\OrderPatchImportModel\$fields
$fields
Definition:
OrderPatchImportModel.php:32
Commercetools\Import\Models\OrderPatches\OrderPatchImportModel\getFields
getFields()
Definition:
OrderPatchImportModel.php:72
Commercetools\Import\Models\OrderPatches\OrderPatchImportModel\$orderNumber
$orderNumber
Definition:
OrderPatchImportModel.php:26
Commercetools\Import\Models\OrderPatches\OrderPatchImportModel\getOrderNumber
getOrderNumber()
Definition:
OrderPatchImportModel.php:52
Commercetools\Import\Models\OrderPatches\OrderPatchImportModel\setOrderNumber
setOrderNumber(?string $orderNumber)
Definition:
OrderPatchImportModel.php:91
Commercetools\Import\Models\OrderPatches\OrderPatchImportModel\setFields
setFields(?OrderField $fields)
Definition:
OrderPatchImportModel.php:99
Commercetools\Import\Models\OrderPatches\OrderPatchImportModel\__construct
__construct(?string $orderNumber=null, ?OrderField $fields=null)
Definition:
OrderPatchImportModel.php:38
Commercetools\Base\JsonObject
Definition:
JsonObject.php:15
Commercetools\Import\Models\OrderPatches\OrderField
Definition:
OrderField.php:15
Commercetools\Import\Models\OrderPatches\OrderPatchImport
Definition:
OrderPatchImport.php:15
Commercetools\Import\Models\OrderPatches
Definition:
DeliveryAddressDraft.php:9
Generated by
1.9.1