Class: Zm::Client::Ace

Inherits:
Base::Object show all
Defined in:
lib/zm/client/ace/ace.rb

Overview

class account ace

Constant Summary collapse

GT_USER =
'usr'
GT_GROUP =
'grp'
GT_DOMAIN =
'dom'
GT_PUB =
'pub'
GT_KEY =
'key'

Instance Attribute Summary collapse

Attributes inherited from Base::Object

#id, #name, #parent, #token

Instance Method Summary collapse

Methods inherited from Base::Object

#clone, #initialize, #inspect, #instance_variables_map, #logger, #recorded?, #save!, #to_h, #to_s, #update_attribute

Constructor Details

This class inherits a constructor from Zm::Client::Base::Object

Instance Attribute Details

#dObject

Returns the value of attribute d.



13
14
15
# File 'lib/zm/client/ace/ace.rb', line 13

def d
  @d
end

#gtObject

Returns the value of attribute gt.



13
14
15
# File 'lib/zm/client/ace/ace.rb', line 13

def gt
  @gt
end

#rightObject

Returns the value of attribute right.



13
14
15
# File 'lib/zm/client/ace/ace.rb', line 13

def right
  @right
end

#zidObject

Returns the value of attribute zid.



13
14
15
# File 'lib/zm/client/ace/ace.rb', line 13

def zid
  @zid
end

Instance Method Details

#create!Object



15
16
17
18
19
20
21
# File 'lib/zm/client/ace/ace.rb', line 15

def create!
  rep = @parent.sacc.invoke(jsns_builder.to_jsns)

  json = rep[:GrantRightsResponse][:ace].first if rep[:GrantRightsResponse][:ace].is_a?(Array)
  AceJsnsInitializer.update(self, json) unless json.nil?
  true
end

#delete!Object



23
24
25
26
# File 'lib/zm/client/ace/ace.rb', line 23

def delete!
  @parent.sacc.invoke(jsns_builder.to_delete)
  true
end