Class: KhipuChaski::Device

Inherits:
BaseObject show all
Defined in:
lib/khipu-chaski-api-client/models/device.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseObject

#_deserialize, #_to_hash, #build_from_hash, #to_body, #to_hash, #to_s

Constructor Details

#initialize(attributes = {}) ⇒ Device

Returns a new instance of Device.



31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# File 'lib/khipu-chaski-api-client/models/device.rb', line 31

def initialize(attributes = {})
  return if !attributes.is_a?(Hash) || attributes.empty?

  # convert string to symbol for hash key
  attributes = attributes.inject({}){|memo,(k,v)| memo[k.to_sym] = v; memo}

  
  if attributes[:'tokenId']
    self.token_id = attributes[:'tokenId']
  end
  
  if attributes[:'recipients']
    if (value = attributes[:'recipients']).is_a?(Array)
      self.recipients = value
    end
  end
  
  if attributes[:'extraData']
    self.extra_data = attributes[:'extraData']
  end
  
end

Instance Attribute Details

#extra_dataObject

Returns the value of attribute extra_data.



4
5
6
# File 'lib/khipu-chaski-api-client/models/device.rb', line 4

def extra_data
  @extra_data
end

#recipientsObject

Returns the value of attribute recipients.



4
5
6
# File 'lib/khipu-chaski-api-client/models/device.rb', line 4

def recipients
  @recipients
end

#token_idObject

Returns the value of attribute token_id.



4
5
6
# File 'lib/khipu-chaski-api-client/models/device.rb', line 4

def token_id
  @token_id
end

Class Method Details

.attribute_mapObject

attribute mapping from ruby-style variable name to JSON key



6
7
8
9
10
11
12
13
14
15
16
17
18
19
# File 'lib/khipu-chaski-api-client/models/device.rb', line 6

def self.attribute_map
  {
    
    # token para notificaciones asociado al dispositivo. Tiene la forma <platform>:<registryId>, donde platform puede tomar los valores \"and\" o \"ios\".
    :'token_id' => :'tokenId',
    
    # Lista de receptores asociados al dispositivo
    :'recipients' => :'recipients',
    
    # informacion adicional del dispositivo
    :'extra_data' => :'extraData'
    
  }
end

.swagger_typesObject

attribute type



22
23
24
25
26
27
28
29
# File 'lib/khipu-chaski-api-client/models/device.rb', line 22

def self.swagger_types
  {
    :'token_id' => :'String',
    :'recipients' => :'Array<String>',
    :'extra_data' => :'String'
    
  }
end