Class: Browserbeam::SessionEnvelope
- Inherits:
-
Struct
- Object
- Struct
- Browserbeam::SessionEnvelope
- Defined in:
- lib/browserbeam/types.rb
Instance Attribute Summary collapse
-
#blockers_dismissed ⇒ Object
Returns the value of attribute blockers_dismissed.
-
#completed ⇒ Object
Returns the value of attribute completed.
-
#error ⇒ Object
Returns the value of attribute error.
-
#expires_at ⇒ Object
Returns the value of attribute expires_at.
-
#extraction ⇒ Object
Returns the value of attribute extraction.
-
#media ⇒ Object
Returns the value of attribute media.
-
#page ⇒ Object
Returns the value of attribute page.
-
#request_id ⇒ Object
Returns the value of attribute request_id.
-
#session_id ⇒ Object
Returns the value of attribute session_id.
Class Method Summary collapse
Instance Attribute Details
#blockers_dismissed ⇒ Object
Returns the value of attribute blockers_dismissed
82 83 84 |
# File 'lib/browserbeam/types.rb', line 82 def blockers_dismissed @blockers_dismissed end |
#completed ⇒ Object
Returns the value of attribute completed
82 83 84 |
# File 'lib/browserbeam/types.rb', line 82 def completed @completed end |
#error ⇒ Object
Returns the value of attribute error
82 83 84 |
# File 'lib/browserbeam/types.rb', line 82 def error @error end |
#expires_at ⇒ Object
Returns the value of attribute expires_at
82 83 84 |
# File 'lib/browserbeam/types.rb', line 82 def expires_at @expires_at end |
#extraction ⇒ Object
Returns the value of attribute extraction
82 83 84 |
# File 'lib/browserbeam/types.rb', line 82 def extraction @extraction end |
#media ⇒ Object
Returns the value of attribute media
82 83 84 |
# File 'lib/browserbeam/types.rb', line 82 def media @media end |
#page ⇒ Object
Returns the value of attribute page
82 83 84 |
# File 'lib/browserbeam/types.rb', line 82 def page @page end |
#request_id ⇒ Object
Returns the value of attribute request_id
82 83 84 |
# File 'lib/browserbeam/types.rb', line 82 def request_id @request_id end |
#session_id ⇒ Object
Returns the value of attribute session_id
82 83 84 |
# File 'lib/browserbeam/types.rb', line 82 def session_id @session_id end |
Class Method Details
.from_hash(data) ⇒ Object
83 84 85 86 87 88 89 90 91 92 93 94 95 |
# File 'lib/browserbeam/types.rb', line 83 def self.from_hash(data) new( session_id: data["session_id"] || "", expires_at: data["expires_at"] || "", request_id: data["request_id"] || "", completed: data["completed"] || 0, page: PageState.from_hash(data["page"]), media: (data["media"] || []).map { |m| MediaItem.from_hash(m) }, extraction: data["extraction"], blockers_dismissed: data["blockers_dismissed"] || [], error: StepError.from_hash(data["error"]), ) end |