35 public function update(array $fields = [])
37 if (isset($fields[
"guid"]) && $fields[
"guid"] <>
'')
39 $this->setGuid($fields[
"guid"]);
42 if (isset($fields[
"access_token"]))
44 $this->setAccessToken($fields[
"access_token"]);
47 if (isset($fields[
"refresh_token"]))
49 $this->setRefreshToken($fields[
"refresh_token"]);
52 if (isset($fields[
"client_endpoint"]))
54 $this->setRestEndpoint($fields[
"client_endpoint"]);
57 if (isset($fields[
"member_id"]))
59 $this->setPortalId($fields[
"member_id"]);
62 if (isset($fields[
"expires_in"]) && intval($fields[
"expires_in"]) > 0)
64 $this->setExpires((
new DateTime())->add(intval($fields[
"expires_in"]).
" seconds"));