Class: GetStream::Generated::Models::CreateDeviceRequest

Inherits:
BaseModel
  • Object
show all
Defined in:
lib/getstream_ruby/generated/models/create_device_request.rb

Overview

Create device request

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 = {}) ⇒ CreateDeviceRequest

Initialize with attributes



35
36
37
38
39
40
41
42
43
44
# File 'lib/getstream_ruby/generated/models/create_device_request.rb', line 35

def initialize(attributes = {})
  super(attributes)
  @id = attributes[:id] || attributes['id']
  @push_provider = attributes[:push_provider] || attributes['push_provider']
  @hardware_id = attributes[:hardware_id] || attributes['hardware_id'] || nil
  @push_provider_name = attributes[:push_provider_name] || attributes['push_provider_name'] || nil
  @user_id = attributes[:user_id] || attributes['user_id'] || nil
  @voip_token = attributes[:voip_token] || attributes['voip_token'] || nil
  @user = attributes[:user] || attributes['user'] || nil
end

Instance Attribute Details

#hardware_idString

Returns Stable physical device identifier used to deduplicate pushes across push providers (e.g. APNs VoIP and Firebase on the same iOS device). Distinct from ‘id’, which is the push token.

Returns:

  • (String)

    Stable physical device identifier used to deduplicate pushes across push providers (e.g. APNs VoIP and Firebase on the same iOS device). Distinct from ‘id’, which is the push token.



20
21
22
# File 'lib/getstream_ruby/generated/models/create_device_request.rb', line 20

def hardware_id
  @hardware_id
end

#idString

Returns Device ID.

Returns:

  • (String)

    Device ID



14
15
16
# File 'lib/getstream_ruby/generated/models/create_device_request.rb', line 14

def id
  @id
end

#push_providerString

Returns Push provider.

Returns:

  • (String)

    Push provider



17
18
19
# File 'lib/getstream_ruby/generated/models/create_device_request.rb', line 17

def push_provider
  @push_provider
end

#push_provider_nameString

Returns Push provider name.

Returns:

  • (String)

    Push provider name



23
24
25
# File 'lib/getstream_ruby/generated/models/create_device_request.rb', line 23

def push_provider_name
  @push_provider_name
end

#userUserRequest

Returns:



32
33
34
# File 'lib/getstream_ruby/generated/models/create_device_request.rb', line 32

def user
  @user
end

#user_idString

Returns **Server-side only**. User ID which server acts upon.

Returns:

  • (String)

    **Server-side only**. User ID which server acts upon



26
27
28
# File 'lib/getstream_ruby/generated/models/create_device_request.rb', line 26

def user_id
  @user_id
end

#voip_tokenBoolean

Returns When true the token is for Apple VoIP push notifications.

Returns:

  • (Boolean)

    When true the token is for Apple VoIP push notifications



29
30
31
# File 'lib/getstream_ruby/generated/models/create_device_request.rb', line 29

def voip_token
  @voip_token
end

Class Method Details

.json_field_mappingsObject

Override field mappings for JSON serialization



47
48
49
50
51
52
53
54
55
56
57
# File 'lib/getstream_ruby/generated/models/create_device_request.rb', line 47

def self.json_field_mappings
  {
    id: 'id',
    push_provider: 'push_provider',
    hardware_id: 'hardware_id',
    push_provider_name: 'push_provider_name',
    user_id: 'user_id',
    voip_token: 'voip_token',
    user: 'user'
  }
end