Class: GetStream::Generated::Models::DeviceResponse
- Defined in:
- lib/getstream_ruby/generated/models/device_response.rb
Overview
Response for Device
Instance Attribute Summary collapse
-
#created_at ⇒ DateTime
Date/time of creation.
-
#disabled ⇒ Boolean
Whether device is disabled or not.
-
#disabled_reason ⇒ String
Reason explaining why device had been disabled.
-
#id ⇒ String
Device ID.
-
#push_provider ⇒ String
Push provider.
-
#push_provider_name ⇒ String
Push provider name.
-
#user_id ⇒ String
User ID.
-
#voip ⇒ Boolean
When true the token is for Apple VoIP push notifications.
Class Method Summary collapse
-
.json_field_mappings ⇒ Object
Override field mappings for JSON serialization.
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ DeviceResponse
constructor
Initialize with attributes.
Methods inherited from BaseModel
#==, #inspect, omit_empty_fields, #to_h, #to_json
Constructor Details
#initialize(attributes = {}) ⇒ DeviceResponse
Initialize with attributes
38 39 40 41 42 43 44 45 46 47 48 |
# File 'lib/getstream_ruby/generated/models/device_response.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_response.rb', line 14 def created_at @created_at end |
#disabled ⇒ Boolean
26 27 28 |
# File 'lib/getstream_ruby/generated/models/device_response.rb', line 26 def disabled @disabled end |
#disabled_reason ⇒ String
29 30 31 |
# File 'lib/getstream_ruby/generated/models/device_response.rb', line 29 def disabled_reason @disabled_reason end |
#id ⇒ String
17 18 19 |
# File 'lib/getstream_ruby/generated/models/device_response.rb', line 17 def id @id end |
#push_provider ⇒ String
20 21 22 |
# File 'lib/getstream_ruby/generated/models/device_response.rb', line 20 def push_provider @push_provider end |
#push_provider_name ⇒ String
32 33 34 |
# File 'lib/getstream_ruby/generated/models/device_response.rb', line 32 def push_provider_name @push_provider_name end |
#user_id ⇒ String
23 24 25 |
# File 'lib/getstream_ruby/generated/models/device_response.rb', line 23 def user_id @user_id end |
#voip ⇒ Boolean
35 36 37 |
# File 'lib/getstream_ruby/generated/models/device_response.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_response.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 |