Class: GetStream::Generated::Models::Device
- Inherits:
-
BaseModel
- Object
- BaseModel
- GetStream::Generated::Models::Device
show all
- Defined in:
- lib/getstream_ruby/generated/models/device.rb
Instance Attribute Summary collapse
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from BaseModel
#==, #inspect, omit_empty_fields, #to_h, #to_json
Constructor Details
#initialize(attributes = {}) ⇒ Device
Initialize with attributes
38
39
40
41
42
43
44
45
46
47
48
|
# File 'lib/getstream_ruby/generated/models/device.rb', line 38
def initialize(attributes = {})
super(attributes)
@created_at = attributes[:created_at] || attributes['created_at']
@id = attributes[:id] || attributes['id']
@push_provider = attributes[:push_provider] || attributes['push_provider']
@user_id = attributes[:user_id] || attributes['user_id']
@disabled = attributes[:disabled] || attributes['disabled'] || nil
@disabled_reason = attributes[:disabled_reason] || attributes['disabled_reason'] || nil
@push_provider_name = attributes[:push_provider_name] || attributes['push_provider_name'] || nil
@voip = attributes[:voip] || attributes['voip'] || nil
end
|
Instance Attribute Details
#created_at ⇒ DateTime
14
15
16
|
# File 'lib/getstream_ruby/generated/models/device.rb', line 14
def created_at
@created_at
end
|
#disabled ⇒ Boolean
26
27
28
|
# File 'lib/getstream_ruby/generated/models/device.rb', line 26
def disabled
@disabled
end
|
#disabled_reason ⇒ String
29
30
31
|
# File 'lib/getstream_ruby/generated/models/device.rb', line 29
def disabled_reason
@disabled_reason
end
|
#id ⇒ String
17
18
19
|
# File 'lib/getstream_ruby/generated/models/device.rb', line 17
def id
@id
end
|
#push_provider ⇒ String
20
21
22
|
# File 'lib/getstream_ruby/generated/models/device.rb', line 20
def push_provider
@push_provider
end
|
#push_provider_name ⇒ String
32
33
34
|
# File 'lib/getstream_ruby/generated/models/device.rb', line 32
def push_provider_name
@push_provider_name
end
|
#user_id ⇒ String
23
24
25
|
# File 'lib/getstream_ruby/generated/models/device.rb', line 23
def user_id
@user_id
end
|
#voip ⇒ Boolean
35
36
37
|
# File 'lib/getstream_ruby/generated/models/device.rb', line 35
def voip
@voip
end
|
Class Method Details
.json_field_mappings ⇒ Object
Override field mappings for JSON serialization
51
52
53
54
55
56
57
58
59
60
61
62
|
# File 'lib/getstream_ruby/generated/models/device.rb', line 51
def self.json_field_mappings
{
created_at: 'created_at',
id: 'id',
push_provider: 'push_provider',
user_id: 'user_id',
disabled: 'disabled',
disabled_reason: 'disabled_reason',
push_provider_name: 'push_provider_name',
voip: 'voip'
}
end
|