commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
lib
commercetools-api
src
Models
Payment
PaymentAddInterfaceInteractionActionModel.php
1
<?php
2
3
declare(strict_types=1);
9
namespace
Commercetools\Api\Models\Payment
;
10
11
use
Commercetools\Api\Models\Type\FieldContainer
;
12
use
Commercetools\Api\Models\Type\FieldContainerModel
;
13
use
Commercetools\Api\Models\Type\TypeResourceIdentifier
;
14
use
Commercetools\Api\Models\Type\TypeResourceIdentifierModel
;
15
use
Commercetools\Base\DateTimeImmutableCollection
;
16
use
Commercetools\Base\JsonObject
;
17
use
Commercetools\Base\JsonObjectModel
;
18
use
Commercetools\Base\MapperFactory
;
19
use stdClass;
20
24
final
class
PaymentAddInterfaceInteractionActionModel
extends
JsonObjectModel
implements
PaymentAddInterfaceInteractionAction
25
{
26
public
const
DISCRIMINATOR_VALUE
=
'addInterfaceInteraction'
;
31
protected
$action
;
32
37
protected
$type
;
38
43
protected
$fields
;
44
45
49
public
function
__construct
(
50
?
TypeResourceIdentifier
$type
=
null
,
51
?
FieldContainer
$fields
=
null
,
52
?
string
$action
=
null
53
) {
54
$this->type =
$type
;
55
$this->fields =
$fields
;
56
$this->action =
$action
??
self::DISCRIMINATOR_VALUE
;
57
}
58
63
public
function
getAction
()
64
{
65
if
(is_null($this->action)) {
67
$data = $this->
raw
(self::FIELD_ACTION);
68
if
(is_null($data)) {
69
return
null
;
70
}
71
$this->action = (string) $data;
72
}
73
74
return
$this->action
;
75
}
76
83
public
function
getType
()
84
{
85
if
(is_null($this->type)) {
87
$data = $this->
raw
(self::FIELD_TYPE);
88
if
(is_null($data)) {
89
return
null
;
90
}
91
92
$this->type =
TypeResourceIdentifierModel::of
($data);
93
}
94
95
return
$this->type
;
96
}
97
104
public
function
getFields
()
105
{
106
if
(is_null($this->fields)) {
108
$data = $this->
raw
(self::FIELD_FIELDS);
109
if
(is_null($data)) {
110
return
null
;
111
}
112
113
$this->fields =
FieldContainerModel::of
($data);
114
}
115
116
return
$this->fields
;
117
}
118
119
123
public
function
setType
(?
TypeResourceIdentifier
$type
): void
124
{
125
$this->type =
$type
;
126
}
127
131
public
function
setFields
(?
FieldContainer
$fields
): void
132
{
133
$this->fields =
$fields
;
134
}
135
}
Commercetools\Api\Models\Payment\PaymentAddInterfaceInteractionActionModel
Definition:
PaymentAddInterfaceInteractionActionModel.php:25
Commercetools\Api\Models\Payment\PaymentAddInterfaceInteractionActionModel\setFields
setFields(?FieldContainer $fields)
Definition:
PaymentAddInterfaceInteractionActionModel.php:131
Commercetools\Api\Models\Payment\PaymentAddInterfaceInteractionActionModel\$action
$action
Definition:
PaymentAddInterfaceInteractionActionModel.php:31
Commercetools\Api\Models\Payment\PaymentAddInterfaceInteractionActionModel\getAction
getAction()
Definition:
PaymentAddInterfaceInteractionActionModel.php:63
Commercetools\Api\Models\Payment\PaymentAddInterfaceInteractionActionModel\DISCRIMINATOR_VALUE
const DISCRIMINATOR_VALUE
Definition:
PaymentAddInterfaceInteractionActionModel.php:26
Commercetools\Api\Models\Payment\PaymentAddInterfaceInteractionActionModel\setType
setType(?TypeResourceIdentifier $type)
Definition:
PaymentAddInterfaceInteractionActionModel.php:123
Commercetools\Api\Models\Payment\PaymentAddInterfaceInteractionActionModel\$type
$type
Definition:
PaymentAddInterfaceInteractionActionModel.php:37
Commercetools\Api\Models\Payment\PaymentAddInterfaceInteractionActionModel\getFields
getFields()
Definition:
PaymentAddInterfaceInteractionActionModel.php:104
Commercetools\Api\Models\Payment\PaymentAddInterfaceInteractionActionModel\__construct
__construct(?TypeResourceIdentifier $type=null, ?FieldContainer $fields=null, ?string $action=null)
Definition:
PaymentAddInterfaceInteractionActionModel.php:49
Commercetools\Api\Models\Payment\PaymentAddInterfaceInteractionActionModel\$fields
$fields
Definition:
PaymentAddInterfaceInteractionActionModel.php:43
Commercetools\Api\Models\Payment\PaymentAddInterfaceInteractionActionModel\getType
getType()
Definition:
PaymentAddInterfaceInteractionActionModel.php:83
Commercetools\Api\Models\Type\FieldContainerModel
Definition:
FieldContainerModel.php:17
Commercetools\Api\Models\Type\TypeResourceIdentifierModel
Definition:
TypeResourceIdentifierModel.php:23
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\Base\MapperMap\of
static of($data=null)
Definition:
MapperMap.php:45
Commercetools\Api\Models\Payment\PaymentAddInterfaceInteractionAction
Definition:
PaymentAddInterfaceInteractionAction.php:17
Commercetools\Api\Models\Type\FieldContainer
Definition:
FieldContainer.php:14
Commercetools\Api\Models\Type\TypeResourceIdentifier
Definition:
TypeResourceIdentifier.php:16
Commercetools\Base\JsonObject
Definition:
JsonObject.php:15
Commercetools\Api\Models\Payment
Definition:
Payment.php:9
Generated by
1.9.1