Class: WorkOS::Team

Inherits:
WorkOS::Types::BaseModel
  • Object
show all
Defined in:
lib/workos/platform_teams/team.rb

Constant Summary collapse

HASH_ATTRS =
{
  object: :object,
  id: :id,
  name: :name,
  production_state: :production_state,
  production_enabled_at: :production_enabled_at,
  created_at: :created_at,
  updated_at: :updated_at
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(json) ⇒ Team

Returns a new instance of Team.



26
27
28
29
30
31
32
33
34
35
# File 'lib/workos/platform_teams/team.rb', line 26

def initialize(json)
  hash = self.class.normalize(json)
  @object = hash[:object]
  @id = hash[:id]
  @name = hash[:name]
  @production_state = hash[:production_state]
  @production_enabled_at = hash[:production_enabled_at]
  @created_at = hash[:created_at]
  @updated_at = hash[:updated_at]
end

Instance Attribute Details

#created_atObject

Returns the value of attribute created_at.



17
18
19
# File 'lib/workos/platform_teams/team.rb', line 17

def created_at
  @created_at
end

#idObject

Returns the value of attribute id.



17
18
19
# File 'lib/workos/platform_teams/team.rb', line 17

def id
  @id
end

#nameObject

Returns the value of attribute name.



17
18
19
# File 'lib/workos/platform_teams/team.rb', line 17

def name
  @name
end

#objectObject

Returns the value of attribute object.



17
18
19
# File 'lib/workos/platform_teams/team.rb', line 17

def object
  @object
end

#production_enabled_atObject

Returns the value of attribute production_enabled_at.



17
18
19
# File 'lib/workos/platform_teams/team.rb', line 17

def production_enabled_at
  @production_enabled_at
end

#production_stateObject

Returns the value of attribute production_state.



17
18
19
# File 'lib/workos/platform_teams/team.rb', line 17

def production_state
  @production_state
end

#updated_atObject

Returns the value of attribute updated_at.



17
18
19
# File 'lib/workos/platform_teams/team.rb', line 17

def updated_at
  @updated_at
end