class OneSignal::Responses::Notification

Example JSON {

"id":           '481a2734-6b7d-11e4-a6ea-4b53294fa671',
"successful":   15,
"failed":       1,
"converted":    3,
"remaining":    0,
"queued_at":    1_415_914_655,
"send_after":   1_415_914_655,
"completed_at": 1_415_914_656,
"url":          'https://yourWebsiteToOpen.com',
"data":         {
  "foo":  'bar',
  "your": 'custom metadata'
},
"canceled":     false,
"headings":     {
  "en": 'English and default language heading',
  "es": 'Spanish language heading'
},
"contents":     {
  "en": 'English language content',
  "es": 'Hola'
}

}

Constants

ATTRIBUTES_WHITELIST

Public Class Methods

from_json(json) click to toggle source
# File lib/onesignal/responses/notification.rb, line 39
def self.from_json json
  body = json.is_a?(String) ? JSON.parse(json) : json
  new(body)
end

Public Instance Methods

canceled?() click to toggle source
# File lib/onesignal/responses/notification.rb, line 35
def canceled?
  canceled
end