Class: Browserbeam::SessionInfo

Inherits:
Struct
  • Object
show all
Defined in:
lib/browserbeam/types.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#duration_secondsObject

Returns the value of attribute duration_seconds

Returns:

  • (Object)

    the current value of duration_seconds



98
99
100
# File 'lib/browserbeam/types.rb', line 98

def duration_seconds
  @duration_seconds
end

#ended_atObject

Returns the value of attribute ended_at

Returns:

  • (Object)

    the current value of ended_at



98
99
100
# File 'lib/browserbeam/types.rb', line 98

def ended_at
  @ended_at
end

#expires_atObject

Returns the value of attribute expires_at

Returns:

  • (Object)

    the current value of expires_at



98
99
100
# File 'lib/browserbeam/types.rb', line 98

def expires_at
  @expires_at
end

#session_idObject

Returns the value of attribute session_id

Returns:

  • (Object)

    the current value of session_id



98
99
100
# File 'lib/browserbeam/types.rb', line 98

def session_id
  @session_id
end

#started_atObject

Returns the value of attribute started_at

Returns:

  • (Object)

    the current value of started_at



98
99
100
# File 'lib/browserbeam/types.rb', line 98

def started_at
  @started_at
end

#statusObject

Returns the value of attribute status

Returns:

  • (Object)

    the current value of status



98
99
100
# File 'lib/browserbeam/types.rb', line 98

def status
  @status
end

Class Method Details

.from_hash(data) ⇒ Object



99
100
101
102
103
104
105
106
107
108
# File 'lib/browserbeam/types.rb', line 99

def self.from_hash(data)
  new(
    session_id: data["session_id"] || "",
    status: data["status"] || "",
    started_at: data["started_at"] || "",
    ended_at: data["ended_at"],
    duration_seconds: data["duration_seconds"],
    expires_at: data["expires_at"] || "",
  )
end