Class: Zm::Client::Ace

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

Overview

class account ace

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.



7
8
9
# File 'lib/zm/client/ace/ace.rb', line 7

def d
  @d
end

#gtObject

Returns the value of attribute gt.



7
8
9
# File 'lib/zm/client/ace/ace.rb', line 7

def gt
  @gt
end

#rightObject

Returns the value of attribute right.



7
8
9
# File 'lib/zm/client/ace/ace.rb', line 7

def right
  @right
end

#zidObject

Returns the value of attribute zid.



7
8
9
# File 'lib/zm/client/ace/ace.rb', line 7

def zid
  @zid
end

Instance Method Details

#create!Object



9
10
11
12
13
14
15
# File 'lib/zm/client/ace/ace.rb', line 9

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



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

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