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
105 public function getFields()
106 {
107 if (is_null($this->fields)) {
109 $data = $this->raw(self::FIELD_FIELDS);
110 if (is_null($data)) {
111 return null;
112 }
113
114 $this->fields = FieldContainerModel::of($data);
115 }
116
117 return $this->fields;
118 }
119
120
124 public function setType(?TypeResourceIdentifier $type): void
125 {
126 $this->type = $type;
127 }
128
132 public function setFields(?FieldContainer $fields): void
133 {
134 $this->fields = $fields;
135 }
136}
__construct(?TypeResourceIdentifier $type=null, ?FieldContainer $fields=null, ?string $action=null)