Class: WorkOS::ItContactList
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- WorkOS::ItContactList
- Defined in:
- lib/workos/organizations/it_contact_list.rb
Constant Summary collapse
- HASH_ATTRS =
{ object: :object, data: :data, list_metadata: :list_metadata }.freeze
Instance Attribute Summary collapse
-
#data ⇒ Object
Returns the value of attribute data.
-
#list_metadata ⇒ Object
Returns the value of attribute list_metadata.
-
#object ⇒ Object
Returns the value of attribute object.
Instance Method Summary collapse
-
#initialize(json) ⇒ ItContactList
constructor
A new instance of ItContactList.
Constructor Details
#initialize(json) ⇒ ItContactList
Returns a new instance of ItContactList.
18 19 20 21 22 23 |
# File 'lib/workos/organizations/it_contact_list.rb', line 18 def initialize(json) hash = self.class.normalize(json) @object = hash[:object] @data = (hash[:data] || []).map { |item| item ? WorkOS::ItContact.new(item) : nil } @list_metadata = hash[:list_metadata] ? WorkOS::ItContactListListMetadata.new(hash[:list_metadata]) : nil end |
Instance Attribute Details
#data ⇒ Object
Returns the value of attribute data.
13 14 15 |
# File 'lib/workos/organizations/it_contact_list.rb', line 13 def data @data end |
#list_metadata ⇒ Object
Returns the value of attribute list_metadata.
13 14 15 |
# File 'lib/workos/organizations/it_contact_list.rb', line 13 def @list_metadata end |
#object ⇒ Object
Returns the value of attribute object.
13 14 15 |
# File 'lib/workos/organizations/it_contact_list.rb', line 13 def object @object end |