access_token; } /** * Gets the refresh token, if any. * * @since 2.0.0 * * @return string|null */ public function get_refresh_token() { return $this->refresh_token; } /** * Gets the error message, if any. * * @since 2.0.0 * * @return string|null */ public function get_error_message() { $message = $this->reason; if ( empty( $message ) ) { $message = $this->type; } if ( empty( $message ) ) { $message = 'Unknown error'; } return $message; } /** * Determines if there was an error returned. * * @since 2.0.0 * * @return bool */ public function has_error() { return ! empty( $this->response_data->error ); } }