Class: OneSignal::Icons

Inherits:
Object
  • Object
show all
Defined in:
lib/onesignal/icons.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**params) ⇒ Icons

Returns a new instance of Icons.



8
9
10
11
12
13
14
15
16
17
18
# File 'lib/onesignal/icons.rb', line 8

def initialize **params
  @small_icon = params[:small_icon]
  @huawei_small_icon = params[:huawei_small_icon]
  @large_icon = params[:large_icon]
  @huawei_large_icon = params[:huawei_large_icon]
  @adm_small_icon = params[:adm_small_icon]
  @adm_large_icon = params[:adm_large_icon]
  @chrome_web_icon = params[:chrome_web_icon]
  @firefox_icon = params[:firefox_icon]
  @chrome_icon = params[:chrome_icon]
end

Instance Attribute Details

#adm_large_iconObject (readonly)

Returns the value of attribute adm_large_icon.



5
6
7
# File 'lib/onesignal/icons.rb', line 5

def adm_large_icon
  @adm_large_icon
end

#adm_small_iconObject (readonly)

Returns the value of attribute adm_small_icon.



5
6
7
# File 'lib/onesignal/icons.rb', line 5

def adm_small_icon
  @adm_small_icon
end

#chrome_iconObject (readonly)

Returns the value of attribute chrome_icon.



5
6
7
# File 'lib/onesignal/icons.rb', line 5

def chrome_icon
  @chrome_icon
end

#chrome_web_iconObject (readonly)

Returns the value of attribute chrome_web_icon.



5
6
7
# File 'lib/onesignal/icons.rb', line 5

def chrome_web_icon
  @chrome_web_icon
end

#firefox_iconObject (readonly)

Returns the value of attribute firefox_icon.



5
6
7
# File 'lib/onesignal/icons.rb', line 5

def firefox_icon
  @firefox_icon
end

#huawei_large_iconObject (readonly)

Returns the value of attribute huawei_large_icon.



5
6
7
# File 'lib/onesignal/icons.rb', line 5

def huawei_large_icon
  @huawei_large_icon
end

#huawei_small_iconObject (readonly)

Returns the value of attribute huawei_small_icon.



5
6
7
# File 'lib/onesignal/icons.rb', line 5

def huawei_small_icon
  @huawei_small_icon
end

#large_iconObject (readonly)

Returns the value of attribute large_icon.



5
6
7
# File 'lib/onesignal/icons.rb', line 5

def large_icon
  @large_icon
end

#small_iconObject (readonly)

Returns the value of attribute small_icon.



5
6
7
# File 'lib/onesignal/icons.rb', line 5

def small_icon
  @small_icon
end

Instance Method Details

#as_json(options = nil) ⇒ Object



20
21
22
23
24
25
26
27
28
29
30
31
32
# File 'lib/onesignal/icons.rb', line 20

def as_json options = nil
  {
    'small_icon' => @small_icon,
    'huawei_small_icon' => @huawei_small_icon,
    'large_icon' => @large_icon,
    'huawei_large_icon' => @huawei_large_icon,
    'adm_small_icon' => @adm_small_icon,
    'adm_large_icon' => @adm_large_icon,
    'chrome_web_icon' => @chrome_web_icon,
    'firefox_icon' => @firefox_icon,
    'chrome_icon' => @chrome_icon
  }
end