commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
PaymentStatusDraftModel.php
1 <?php
2 
3 declare(strict_types=1);
10 
17 use stdClass;
18 
23 {
28  protected $interfaceCode;
29 
34  protected $interfaceText;
35 
40  protected $state;
41 
42 
46  public function __construct(
47  ?string $interfaceCode = null,
48  ?string $interfaceText = null,
50  ) {
51  $this->interfaceCode = $interfaceCode;
52  $this->interfaceText = $interfaceText;
53  $this->state = $state;
54  }
55 
62  public function getInterfaceCode()
63  {
64  if (is_null($this->interfaceCode)) {
66  $data = $this->raw(self::FIELD_INTERFACE_CODE);
67  if (is_null($data)) {
68  return null;
69  }
70  $this->interfaceCode = (string) $data;
71  }
72 
73  return $this->interfaceCode;
74  }
75 
82  public function getInterfaceText()
83  {
84  if (is_null($this->interfaceText)) {
86  $data = $this->raw(self::FIELD_INTERFACE_TEXT);
87  if (is_null($data)) {
88  return null;
89  }
90  $this->interfaceText = (string) $data;
91  }
92 
93  return $this->interfaceText;
94  }
95 
102  public function getState()
103  {
104  if (is_null($this->state)) {
106  $data = $this->raw(self::FIELD_STATE);
107  if (is_null($data)) {
108  return null;
109  }
110 
111  $this->state = StateResourceIdentifierModel::of($data);
112  }
113 
114  return $this->state;
115  }
116 
117 
121  public function setInterfaceCode(?string $interfaceCode): void
122  {
123  $this->interfaceCode = $interfaceCode;
124  }
125 
129  public function setInterfaceText(?string $interfaceText): void
130  {
131  $this->interfaceText = $interfaceText;
132  }
133 
137  public function setState(?StateResourceIdentifier $state): void
138  {
139  $this->state = $state;
140  }
141 }
__construct(?string $interfaceCode=null, ?string $interfaceText=null, ?StateResourceIdentifier $state=null)