Class: Xiaomi::Push::Message::Android
- Defined in:
- lib/xiaomi/push/services/messages/android.rb
Instance Attribute Summary collapse
-
#badge ⇒ Object
Returns the value of attribute badge.
-
#description ⇒ Object
Returns the value of attribute description.
-
#extras ⇒ Object
Returns the value of attribute extras.
-
#notify_id ⇒ Object
Returns the value of attribute notify_id.
-
#notify_type ⇒ Object
Returns the value of attribute notify_type.
-
#pass_through ⇒ Object
Returns the value of attribute pass_through.
-
#sound ⇒ Object
Returns the value of attribute sound.
-
#title ⇒ Object
Returns the value of attribute title.
Attributes inherited from Base
#alias, #registration_id, #topic, #topic_op, #topics
Instance Method Summary collapse
-
#initialize(**params) ⇒ Android
constructor
A new instance of Android.
Methods inherited from Base
Constructor Details
#initialize(**params) ⇒ Android
Returns a new instance of Android.
6 7 8 9 10 11 12 13 14 15 |
# File 'lib/xiaomi/push/services/messages/android.rb', line 6 def initialize(**params) @title = params[:title] @description = params[:description] @badge = params[:badge] || 1 @sound = params[:sound] || 'default' @pass_through = params[:pass_through] || 0 @notify_type = params[:notify_type] || 'DEFAULT_ALL' @notify_id = params[:notify_id] @extras = params[:extras] || {} end |
Instance Attribute Details
#badge ⇒ Object
Returns the value of attribute badge.
5 6 7 |
# File 'lib/xiaomi/push/services/messages/android.rb', line 5 def badge @badge end |
#description ⇒ Object
Returns the value of attribute description.
5 6 7 |
# File 'lib/xiaomi/push/services/messages/android.rb', line 5 def description @description end |
#extras ⇒ Object
Returns the value of attribute extras.
5 6 7 |
# File 'lib/xiaomi/push/services/messages/android.rb', line 5 def extras @extras end |
#notify_id ⇒ Object
Returns the value of attribute notify_id.
5 6 7 |
# File 'lib/xiaomi/push/services/messages/android.rb', line 5 def notify_id @notify_id end |
#notify_type ⇒ Object
Returns the value of attribute notify_type.
5 6 7 |
# File 'lib/xiaomi/push/services/messages/android.rb', line 5 def notify_type @notify_type end |
#pass_through ⇒ Object
Returns the value of attribute pass_through.
5 6 7 |
# File 'lib/xiaomi/push/services/messages/android.rb', line 5 def pass_through @pass_through end |
#sound ⇒ Object
Returns the value of attribute sound.
5 6 7 |
# File 'lib/xiaomi/push/services/messages/android.rb', line 5 def sound @sound end |
#title ⇒ Object
Returns the value of attribute title.
5 6 7 |
# File 'lib/xiaomi/push/services/messages/android.rb', line 5 def title @title end |