Class: WorkOS::AuthorizationResource
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- WorkOS::AuthorizationResource
- Defined in:
- lib/workos/authorization/authorization_resource.rb
Constant Summary collapse
- HASH_ATTRS =
{ object: :object, name: :name, description: :description, organization_id: :organization_id, parent_resource_id: :parent_resource_id, id: :id, external_id: :external_id, resource_type_slug: :resource_type_slug, created_at: :created_at, updated_at: :updated_at }.freeze
Instance Attribute Summary collapse
-
#created_at ⇒ Object
Returns the value of attribute created_at.
-
#description ⇒ Object
Returns the value of attribute description.
-
#external_id ⇒ Object
Returns the value of attribute external_id.
-
#id ⇒ Object
Returns the value of attribute id.
-
#name ⇒ Object
Returns the value of attribute name.
-
#object ⇒ Object
Returns the value of attribute object.
-
#organization_id ⇒ Object
Returns the value of attribute organization_id.
-
#parent_resource_id ⇒ Object
Returns the value of attribute parent_resource_id.
-
#resource_type_slug ⇒ Object
Returns the value of attribute resource_type_slug.
-
#updated_at ⇒ Object
Returns the value of attribute updated_at.
Attributes inherited from Types::BaseModel
Instance Method Summary collapse
-
#initialize(json) ⇒ AuthorizationResource
constructor
A new instance of AuthorizationResource.
Methods inherited from Types::BaseModel
Methods included from HashProvider
Constructor Details
#initialize(json) ⇒ AuthorizationResource
Returns a new instance of AuthorizationResource.
32 33 34 35 36 37 38 39 40 41 42 43 44 |
# File 'lib/workos/authorization/authorization_resource.rb', line 32 def initialize(json) hash = self.class.normalize(json) @object = hash[:object] @name = hash[:name] @description = hash[:description] @organization_id = hash[:organization_id] @parent_resource_id = hash[:parent_resource_id] @id = hash[:id] @external_id = hash[:external_id] @resource_type_slug = hash[:resource_type_slug] @created_at = hash[:created_at] @updated_at = hash[:updated_at] end |
Instance Attribute Details
#created_at ⇒ Object
Returns the value of attribute created_at.
20 21 22 |
# File 'lib/workos/authorization/authorization_resource.rb', line 20 def created_at @created_at end |
#description ⇒ Object
Returns the value of attribute description.
20 21 22 |
# File 'lib/workos/authorization/authorization_resource.rb', line 20 def description @description end |
#external_id ⇒ Object
Returns the value of attribute external_id.
20 21 22 |
# File 'lib/workos/authorization/authorization_resource.rb', line 20 def external_id @external_id end |
#id ⇒ Object
Returns the value of attribute id.
20 21 22 |
# File 'lib/workos/authorization/authorization_resource.rb', line 20 def id @id end |
#name ⇒ Object
Returns the value of attribute name.
20 21 22 |
# File 'lib/workos/authorization/authorization_resource.rb', line 20 def name @name end |
#object ⇒ Object
Returns the value of attribute object.
20 21 22 |
# File 'lib/workos/authorization/authorization_resource.rb', line 20 def object @object end |
#organization_id ⇒ Object
Returns the value of attribute organization_id.
20 21 22 |
# File 'lib/workos/authorization/authorization_resource.rb', line 20 def organization_id @organization_id end |
#parent_resource_id ⇒ Object
Returns the value of attribute parent_resource_id.
20 21 22 |
# File 'lib/workos/authorization/authorization_resource.rb', line 20 def parent_resource_id @parent_resource_id end |
#resource_type_slug ⇒ Object
Returns the value of attribute resource_type_slug.
20 21 22 |
# File 'lib/workos/authorization/authorization_resource.rb', line 20 def resource_type_slug @resource_type_slug end |
#updated_at ⇒ Object
Returns the value of attribute updated_at.
20 21 22 |
# File 'lib/workos/authorization/authorization_resource.rb', line 20 def updated_at @updated_at end |