success = (bool) $success; $this->status = $status; $this->data = $data; $this->error_category = $error_category; $this->retryable = (bool) $retryable; } public static function success( $status, $data ) { return new self( true, $status, $data, '', false ); } public static function failure( $status, $error_category, $retryable ) { return new self( false, $status, null, $error_category, $retryable ); } }