class Xooa::Request::IdentityRequest
Attributes
access[RW]
attributes[RW]
canManageIdentities[RW]
identityName[RW]
Public Class Methods
new(identityName, access, canManageIdentities, attributes)
click to toggle source
Initialize IdentityRequest
@param identityName name of the identity to be created @param access access privilige to be given to the new identity @param canManageIdentities permission to manage other identities @param attributes attributes related to the entity @return IdentityRequest
# File lib/xooa/request/IdentityRequest.rb, line 37 def initialize(identityName, access, canManageIdentities, attributes) @identityName = identityName @access = access @canManageIdentities = canManageIdentities @attributes = attributes end
Public Instance Methods
toJson()
click to toggle source
convert the request into json form @return identityRequestJson
# File lib/xooa/request/IdentityRequest.rb, line 46 def toJson json = "{\"IdentityName\" : \"" + identityName + "\", \"Access\" : \"" + access.to_s + "\", \"canManageIdentities\" : " + canManageIdentities.to_s + ", \"Attrs\" : ["; if attributes.respond_to?("each") attributes.each do |attribute| json += attribute.toJson + "," end elsif json += attributes.toJson end if json.to_s.end_with?(",") json = json.to_s[0..-2] end json += "]}" json end