Class: CFC::PermissionGroup
- Defined in:
- lib/cfc/objects/permission_group.rb
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from APIObject
#initialize, #inspect, #method_missing, opts, relationship, #respond_to_missing?, #to_h
Constructor Details
This class inherits a constructor from CFC::APIObject
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class CFC::APIObject
Class Method Details
.list ⇒ Object
8 9 10 |
# File 'lib/cfc/objects/permission_group.rb', line 8 def self.list @api.get_json('user/tokens/permission_groups')['result'].map { |pg| new(pg) } end |
Instance Method Details
#to_json(*_args) ⇒ Object
12 13 14 |
# File 'lib/cfc/objects/permission_group.rb', line 12 def to_json(*_args) JSON.dump({ id: id, name: name }) end |