Class: WorkOS::WidgetSessionToken
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- WorkOS::WidgetSessionToken
- Defined in:
- lib/workos/widgets/widget_session_token.rb
Constant Summary collapse
- HASH_ATTRS =
{ organization_id: :organization_id, user_id: :user_id, scopes: :scopes }.freeze
Instance Attribute Summary collapse
-
#organization_id ⇒ Object
Returns the value of attribute organization_id.
-
#scopes ⇒ Object
Returns the value of attribute scopes.
-
#user_id ⇒ Object
Returns the value of attribute user_id.
Attributes inherited from Types::BaseModel
Instance Method Summary collapse
-
#initialize(json) ⇒ WidgetSessionToken
constructor
A new instance of WidgetSessionToken.
Methods inherited from Types::BaseModel
Methods included from HashProvider
Constructor Details
#initialize(json) ⇒ WidgetSessionToken
Returns a new instance of WidgetSessionToken.
18 19 20 21 22 23 |
# File 'lib/workos/widgets/widget_session_token.rb', line 18 def initialize(json) hash = self.class.normalize(json) @organization_id = hash[:organization_id] @user_id = hash[:user_id] @scopes = hash[:scopes] || [] end |
Instance Attribute Details
#organization_id ⇒ Object
Returns the value of attribute organization_id.
13 14 15 |
# File 'lib/workos/widgets/widget_session_token.rb', line 13 def organization_id @organization_id end |
#scopes ⇒ Object
Returns the value of attribute scopes.
13 14 15 |
# File 'lib/workos/widgets/widget_session_token.rb', line 13 def scopes @scopes end |
#user_id ⇒ Object
Returns the value of attribute user_id.
13 14 15 |
# File 'lib/workos/widgets/widget_session_token.rb', line 13 def user_id @user_id end |