Class: OpenPanel::SDK::Group
- Inherits:
-
Object
- Object
- OpenPanel::SDK::Group
- Defined in:
- lib/openpanel/sdk/group.rb
Overview
Group payload class. Use this class to create or update a group in OpenPanel.
Instance Attribute Summary collapse
-
#id ⇒ String
group ID.
-
#name ⇒ String
group name.
-
#properties ⇒ Hash
group properties.
-
#type ⇒ String
group type (e.g. ‘company’, ‘team’).
Instance Method Summary collapse
-
#initialize(id: nil, type: nil, name: nil, properties: {}) ⇒ Group
constructor
A new instance of Group.
- #to_json(*_args) ⇒ Object
Constructor Details
#initialize(id: nil, type: nil, name: nil, properties: {}) ⇒ Group
Returns a new instance of Group.
13 14 15 16 17 18 |
# File 'lib/openpanel/sdk/group.rb', line 13 def initialize(id: nil, type: nil, name: nil, properties: {}) @id = id @type = type @name = name @properties = properties end |
Instance Attribute Details
#id ⇒ String
group ID
10 11 12 |
# File 'lib/openpanel/sdk/group.rb', line 10 def id @id end |
#name ⇒ String
group name
10 11 12 |
# File 'lib/openpanel/sdk/group.rb', line 10 def name @name end |
#properties ⇒ Hash
group properties
10 11 12 |
# File 'lib/openpanel/sdk/group.rb', line 10 def properties @properties end |
#type ⇒ String
group type (e.g. ‘company’, ‘team’)
10 11 12 |
# File 'lib/openpanel/sdk/group.rb', line 10 def type @type end |
Instance Method Details
#to_json(*_args) ⇒ Object
20 21 22 23 24 25 26 27 |
# File 'lib/openpanel/sdk/group.rb', line 20 def to_json(*_args) { id: id, type: type, name: name, properties: properties }.to_json end |