Class: Seam::Resources::UnmanagedDevice::Properties::Battery

Inherits:
BaseResource
  • Object
show all
Defined in:
lib/seam/resources/unmanaged_device.rb

Instance Attribute Summary collapse

Attributes inherited from BaseResource

#client, #data

Method Summary

Methods inherited from BaseResource

#[], date_accessor, #initialize, #inspect, load_from_response, resource_accessor, resource_accessors, resource_list_accessor, resource_list_accessors, #update_from_response

Constructor Details

This class inherits a constructor from Seam::Resources::BaseResource

Instance Attribute Details

#levelFloat

Battery charge level as a value between 0 and 1, inclusive.

Returns:

  • (Float)


60
61
62
# File 'lib/seam/resources/unmanaged_device.rb', line 60

def level
  @level
end

#statusString

Represents the current status of the battery charge level. Values are critical, which indicates an extremely low level, suggesting imminent shutdown or an urgent need for charging; low, which signifies that the battery is under the preferred threshold and should be charged soon; good, which denotes a satisfactory charge level, adequate for normal use without the immediate need for recharging; and full, which represents a battery that is fully charged, providing the maximum duration of usage.

Returns:

  • (String)


63
64
65
# File 'lib/seam/resources/unmanaged_device.rb', line 63

def status
  @status
end