module AppleDEPClient::Profile
Constants
- ASSIGN_PATH
- DEFINE_PATH
- FETCH_PATH
- PROFILE_KEYS
- REMOVE_PATH
Public Class Methods
assign(profile_uuid, devices)
click to toggle source
# File lib/apple_dep_client/profile.rb, line 23 def self.assign(profile_uuid, devices) body = { "profile_uuid" => profile_uuid, "devices" => devices } body = JSON.dump body AppleDEPClient::Request.make_request(AppleDEPClient::Request.make_url(ASSIGN_PATH), :put, body) end
define(profile_data)
click to toggle source
# File lib/apple_dep_client/profile.rb, line 17 def self.define(profile_data) profile_data.select! { |key, _value| PROFILE_KEYS.include? key.to_sym } profile_data = JSON.dump profile_data AppleDEPClient::Request.make_request(AppleDEPClient::Request.make_url(DEFINE_PATH), :post, profile_data) end
fetch(profile_uuid)
click to toggle source
# File lib/apple_dep_client/profile.rb, line 29 def self.fetch(profile_uuid) params = { "profile_uuid" => profile_uuid } AppleDEPClient::Request.make_request(AppleDEPClient::Request.make_url(FETCH_PATH), :get, nil, params: params) end
remove(devices)
click to toggle source
# File lib/apple_dep_client/profile.rb, line 34 def self.remove(devices) body = { "devices" => devices } body = JSON.dump body AppleDEPClient::Request.make_request(AppleDEPClient::Request.make_url(REMOVE_PATH), :delete, body) end