Class: Mdm::Enrollment::Devices
Direct Known Subclasses
Sync
Instance Attribute Summary collapse
Class Method Summary
collapse
Instance Method Summary
collapse
#authenticate?, available_services, #params, #params=
Instance Attribute Details
#limit=(value) ⇒ Object
7
8
9
|
# File 'lib/mdm/enrollment/service/devices.rb', line 7
def limit=(value)
@limit = value
end
|
Class Method Details
.accepted_params ⇒ Object
12
13
14
|
# File 'lib/mdm/enrollment/service/devices.rb', line 12
def self.accepted_params
[:limit, :cursor]
end
|
Instance Method Details
#method ⇒ Object
38
39
40
|
# File 'lib/mdm/enrollment/service/devices.rb', line 38
def method
:post
end
|
#path ⇒ Object
16
17
18
|
# File 'lib/mdm/enrollment/service/devices.rb', line 16
def path
'/server/devices'
end
|
#result ⇒ Object
42
43
44
45
46
47
|
# File 'lib/mdm/enrollment/service/devices.rb', line 42
def result
{
devices: devices,
cursor: cursor
}
end
|
#start ⇒ Object
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
# File 'lib/mdm/enrollment/service/devices.rb', line 20
def start
params[:limit] = limit
params[:cursor] = cursor.content
super
cursor.content, device_payloads, more_to_follow = client.(
'cursor',
'devices',
'more_to_follow')
create_or_update_devices(device_payloads)
if cursor.save && more_to_follow
start
end
end
|