Class: UpGuard::NodeGroupUser
- Inherits:
-
BaseObject
- Object
- BaseObject
- UpGuard::NodeGroupUser
- Defined in:
- lib/upguard/NodeGroupUser.rb
Instance Attribute Summary collapse
-
#email ⇒ Object
Returns the value of attribute email.
-
#user_id ⇒ Object
Returns the value of attribute user_id.
Attributes inherited from BaseObject
#appliance_api_key, #appliance_url, #insecure, #sec_key
Instance Method Summary collapse
- #from_hash(h) ⇒ Object
-
#initialize(appliance_url, appliance_api_key, sec_key, insecure = false) ⇒ NodeGroupUser
constructor
A new instance of NodeGroupUser.
- #to_hash ⇒ Object
- #to_json(options = nil) ⇒ Object
Methods inherited from BaseObject
#http_delete, #http_get, #http_post, #http_put, #make_headers
Constructor Details
#initialize(appliance_url, appliance_api_key, sec_key, insecure = false) ⇒ NodeGroupUser
Returns a new instance of NodeGroupUser.
5 6 7 8 9 |
# File 'lib/upguard/NodeGroupUser.rb', line 5 def initialize(appliance_url, appliance_api_key, sec_key, insecure = false) super(appliance_url, appliance_api_key, sec_key, insecure) self.email = nil self.user_id = nil end |
Instance Attribute Details
#email ⇒ Object
Returns the value of attribute email.
3 4 5 |
# File 'lib/upguard/NodeGroupUser.rb', line 3 def email @email end |
#user_id ⇒ Object
Returns the value of attribute user_id.
4 5 6 |
# File 'lib/upguard/NodeGroupUser.rb', line 4 def user_id @user_id end |
Instance Method Details
#from_hash(h) ⇒ Object
11 12 13 14 |
# File 'lib/upguard/NodeGroupUser.rb', line 11 def from_hash(h) self.email = h['email'] if h.include?('email') self.user_id = h['user_id'] if h.include?('user_id') end |
#to_hash ⇒ Object
15 16 17 18 19 20 |
# File 'lib/upguard/NodeGroupUser.rb', line 15 def to_hash h = {} h['email'] = self.email h['user_id'] = self.user_id return h end |
#to_json(options = nil) ⇒ Object
21 22 23 24 |
# File 'lib/upguard/NodeGroupUser.rb', line 21 def to_json( = nil) h = to_hash return h.to_json() end |