commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
Loading...
Searching...
No Matches
PaymentAddInterfaceInteractionActionModel.php
1<?php
2
3declare(strict_types=1);
10
19use stdClass;
20
25{
26 public const DISCRIMINATOR_VALUE = 'addInterfaceInteraction';
31 protected $action;
32
37 protected $type;
38
43 protected $fields;
44
45
49 public function __construct(
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}
__construct(?TypeResourceIdentifier $type=null, ?FieldContainer $fields=null, ?string $action=null)