Class: ONEAccess::DataObject::ProductGroup

Inherits:
Object
  • Object
show all
Extended by:
Serializable
Defined in:
lib/oneaccess/data_object/product_group.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Serializable

from_json, represented_by

Instance Attribute Details

#contributor_org_idObject

Returns the value of attribute contributor_org_id.



16
17
18
# File 'lib/oneaccess/data_object/product_group.rb', line 16

def contributor_org_id
  @contributor_org_id
end

#descriptionObject

Returns the value of attribute description.



14
15
16
# File 'lib/oneaccess/data_object/product_group.rb', line 14

def description
  @description
end

#idObject

Returns the value of attribute id.



12
13
14
# File 'lib/oneaccess/data_object/product_group.rb', line 12

def id
  @id
end

#is_defaultObject Also known as: is_default?, default?

Returns the value of attribute is_default.



18
19
20
# File 'lib/oneaccess/data_object/product_group.rb', line 18

def is_default
  @is_default
end

#nameObject

Returns the value of attribute name.



13
14
15
# File 'lib/oneaccess/data_object/product_group.rb', line 13

def name
  @name
end

#statusObject

Returns the value of attribute status.



15
16
17
# File 'lib/oneaccess/data_object/product_group.rb', line 15

def status
  @status
end

#typeObject

Returns the value of attribute type.



17
18
19
# File 'lib/oneaccess/data_object/product_group.rb', line 17

def type
  @type
end

Instance Method Details

#active?Boolean

Returns:

  • (Boolean)


23
24
25
# File 'lib/oneaccess/data_object/product_group.rb', line 23

def active?
  status == ProductGroupStatus::ACTIVE
end

#events?Boolean

Returns:

  • (Boolean)


39
40
41
# File 'lib/oneaccess/data_object/product_group.rb', line 39

def events?
  type == ProductType::EVENT
end

#inactive?Boolean

Returns:

  • (Boolean)


27
28
29
# File 'lib/oneaccess/data_object/product_group.rb', line 27

def inactive?
  status == ProductGroupStatus::INACTIVE
end

#models?Boolean

Returns:

  • (Boolean)


43
44
45
# File 'lib/oneaccess/data_object/product_group.rb', line 43

def models?
  type == ProductType::MODEL
end

#private_events?Boolean

Returns:

  • (Boolean)


35
36
37
# File 'lib/oneaccess/data_object/product_group.rb', line 35

def private_events?
  type == ProductType::PRIVATE_EVENT
end

#research?Boolean

Returns:

  • (Boolean)


31
32
33
# File 'lib/oneaccess/data_object/product_group.rb', line 31

def research?
  type == ProductType::RESEARCH
end