Class: Rafflesia::OrganizationSummary

Inherits:
Types::BaseModel
  • Object
show all
Defined in:
lib/rafflesia/auth/organization_summary.rb

Constant Summary collapse

HASH_ATTRS =
{
  id: :id,
  name: :name,
  role: :role
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ OrganizationSummary

Returns a new instance of OrganizationSummary.



19
20
21
22
23
24
25
# File 'lib/rafflesia/auth/organization_summary.rb', line 19

def initialize(json)
  super()
  hash = self.class.normalize(json)
  @id = hash[:id]
  @name = hash[:name]
  @role = hash[:role]
end

Instance Attribute Details

#idObject

Returns the value of attribute id.



14
15
16
# File 'lib/rafflesia/auth/organization_summary.rb', line 14

def id
  @id
end

#nameObject

Returns the value of attribute name.



14
15
16
# File 'lib/rafflesia/auth/organization_summary.rb', line 14

def name
  @name
end

#roleObject

Returns the value of attribute role.



14
15
16
# File 'lib/rafflesia/auth/organization_summary.rb', line 14

def role
  @role
end