関数
State::__construct( string $state, string|null $reasonCode = null, string|null $reasonDescription = null )
Initializes a Charge State
object
パラメータ パラメータ
- $state
(文字列) (必須)
- $reasonCode
(文字列|null) (任意)
- $reasonDescription
(文字列|null) (任意)
ファイル: src/Models/Charge/State.php
public function __construct($state, $reasonCode = null, $reasonDescription = null) { $this->state = $state; $this->reasonCode = $reasonCode; $this->reasonDescription = $reasonDescription; parent::__construct(); $this->populate(); if ($this->reasonCode !== null) { if (isset($this->getErrorCodeMap()[$reasonCode])) { $error = $this->getErrorCodeMap()[$reasonCode]; $this->reasonDescription = is_callable($error->message) ? $this->reasonDescription : $error->message; } } }