Class: Moromi::Apns::Message::Announce

Inherits:
Base
  • Object
show all
Defined in:
lib/moromi/apns/message/announce.rb

Instance Attribute Summary

Attributes inherited from Base

#parameter

Class Method Summary collapse

Methods inherited from Base

#custom_data, #initialize, #serialize, #to_hash, #type, unserialize

Constructor Details

This class inherits a constructor from Moromi::Apns::Message::Base

Class Method Details

.make(message:, url: nil, badge: 1) ⇒ Object


3
4
5
6
7
8
9
10
11
# File 'lib/moromi/apns/message/announce.rb', line 3

def self.make(message:, url: nil, badge: 1)
  custom_data = {
    params: {
      url: url
    }
  }
  parameter = Moromi::Apns::Parameter.new(alert: message, badge: badge, custom_data: custom_data)
  new(parameter: parameter)
end