class MokiRuby::DeviceIOSProfile
Attributes
content[RW]
description[RW]
display_name[RW]
identifier[RW]
organization[RW]
removal_disallowed[RW]
version[RW]
Public Class Methods
from_hash(input_hash)
click to toggle source
# File lib/moki_ruby/device_iosprofile.rb, line 6 def self.from_hash(input_hash) new_profile = self.new new_profile.display_name = input_hash["PayloadDisplayName"] new_profile.version = input_hash["PayloadVersion"] new_profile.organization = input_hash["PayloadOrganization"] new_profile.removal_disallowed = input_hash["PayloadRemovalDisallowed"] new_profile.description = input_hash["PayloadDescription"] new_profile.identifier = input_hash["PayloadIdentifier"] new_profile.content = input_hash["PayloadContent"] new_profile end
Public Instance Methods
install_hash()
click to toggle source
# File lib/moki_ruby/device_iosprofile.rb, line 32 def install_hash raise "under construction" actionable_hash.merge({ "action" => "installprofile", "payload" => "#{ self.id }" }) end
removal_hash()
click to toggle source
# File lib/moki_ruby/device_iosprofile.rb, line 38 def removal_hash actionable_hash.merge({ "action" => "removeprofile", "payload" => "#{ self.identifier }" }) end
to_hash()
click to toggle source
# File lib/moki_ruby/device_iosprofile.rb, line 20 def to_hash { "PayloadDisplayName" => self.display_name, "PayloadVersion" => self.version, "PayloadOrganization" => self.organization, "PayloadRemovalDisallowed" => self.removal_disallowed, "PayloadDescription" => self.description, "PayloadIdentifier" => self.identifier, "PayloadContent" => self.content } end
Private Instance Methods
actionable_hash()
click to toggle source
# File lib/moki_ruby/device_iosprofile.rb, line 44 def actionable_hash { "thirdPartyUser" => "moki_ruby", "clientName" => "MokiRuby", "itemName" => self.display_name, "notify" => true } end