Class: LockstepSdk::SupportAccessModel
- Inherits:
-
Object
- Object
- LockstepSdk::SupportAccessModel
- Defined in:
- lib/lockstep_sdk/models/support_access_model.rb
Overview
Contains information for Lockstep to support/assist a user.
Instance Attribute Summary collapse
-
#code ⇒ String
The code required to assist the user.
-
#expires_at ⇒ Date-time
The UTC date and time when the support access will expire.
Instance Method Summary collapse
-
#as_json(options = {}) ⇒ object
This object as a JSON key-value structure.
-
#initialize(params = {}) ⇒ SupportAccessModel
constructor
Initialize the SupportAccessModel using the provided prototype.
-
#to_json(*options) ⇒ String
This object converted to a JSON string.
Constructor Details
#initialize(params = {}) ⇒ SupportAccessModel
Initialize the SupportAccessModel using the provided prototype
25 26 27 28 |
# File 'lib/lockstep_sdk/models/support_access_model.rb', line 25 def initialize(params = {}) @code = params.dig(:code) @expires_at = params.dig(:expires_at) end |
Instance Attribute Details
#code ⇒ String
Returns The code required to assist the user.
32 33 34 |
# File 'lib/lockstep_sdk/models/support_access_model.rb', line 32 def code @code end |
#expires_at ⇒ Date-time
Returns The UTC date and time when the support access will expire.
36 37 38 |
# File 'lib/lockstep_sdk/models/support_access_model.rb', line 36 def expires_at @expires_at end |
Instance Method Details
#as_json(options = {}) ⇒ object
Returns This object as a JSON key-value structure.
40 41 42 43 44 45 |
# File 'lib/lockstep_sdk/models/support_access_model.rb', line 40 def as_json(={}) { 'code' => @code, 'expiresAt' => @expires_at, } end |
#to_json(*options) ⇒ String
Returns This object converted to a JSON string.
49 50 51 |
# File 'lib/lockstep_sdk/models/support_access_model.rb', line 49 def to_json(*) "[#{as_json(*).to_json(*)}]" end |