class Ably::Models::DeviceDetails
Contains the properties of a device registered for push notifications.
Public Class Methods
Source
# File lib/ably/models/device_details.rb, line 29 def initialize(hash_object = {}) @raw_hash_object = hash_object || {} @hash_object = IdiomaticRubyWrapper(hash_object) end
@param hash_object [Hash,nil] Device detail attributes
Public Instance Methods
Source
# File lib/ably/models/device_details.rb, line 122 def attributes @hash_object end
Source
# File lib/ably/models/device_details.rb, line 59 def client_id attributes[:client_id] end
The client ID the device is connected to Ably
with.
@spec PCD3
@return [String]
Source
# File lib/ably/models/device_details.rb, line 74 def device_secret attributes[:device_secret] end
Source
# File lib/ably/models/device_details.rb, line 70 def form_factor attributes[:form_factor] end
The DeviceFormFactor object associated with the device. Describes the type of the device, such as phone or tablet.
@spec PCD4
@return [String]
Source
# File lib/ably/models/device_details.rb, line 38 def id attributes[:id] end
A unique ID generated by the device.
@spec PCD2
Source
# File lib/ably/models/device_details.rb, line 93 def metadata attributes[:metadata] || {} end
A JSON object of key-value pairs that contains metadata for the device.
@spec PCD5
@return [Hash, nil]
Source
# File lib/ably/models/device_details.rb, line 97 def metadata=(val) unless val.nil? || val.kind_of?(Hash) raise ArgumentError, "metadata must be nil or a Hash value" end attributes[:metadata] = val end
Source
# File lib/ably/models/device_details.rb, line 49 def platform attributes[:platform] end
The DevicePlatform associated with the device. Describes the platform the device uses, such as android or ios.
@spec PCD6
@return [String]
Source
# File lib/ably/models/device_details.rb, line 111 def push DevicePushDetails(attributes[:push] || {}) end
The {Ably::Models::DevicePushDetails} object associated with the device. Describes the details of the push registration of the device.
@spec PCD7
@return [Ably::Models::DevicePushDetails]
Source
# File lib/ably/models/device_details.rb, line 115 def push=(val) unless val.nil? || val.kind_of?(Hash) || val.kind_of?(Ably::Models::DevicePushDetails) raise ArgumentError, "push must be nil, a Hash value or a DevicePushDetails object" end attributes[:push] = DevicePushDetails(val) end