Class: RubyPushNotifications::FCM::FCMCanonicalIDResult

Inherits:
FCMResult
  • Object
show all
Defined in:
lib/ruby-push-notifications/fcm/fcm_result.rb

Overview

Indicates that the notification was successfully sent to the corresponding registration ID but FCM sent a canonical ID for it, so the received canonical ID should be used as registration ID ASAP.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(canonical_id) ⇒ FCMCanonicalIDResult

Returns a new instance of FCMCanonicalIDResult.



28
29
30
# File 'lib/ruby-push-notifications/fcm/fcm_result.rb', line 28

def initialize(canonical_id)
  @canonical_id = canonical_id
end

Instance Attribute Details

#canonical_idString (readonly)

Returns . The suggested canonical ID from FCM.

Returns:

  • (String)

    . The suggested canonical ID from FCM



26
27
28
# File 'lib/ruby-push-notifications/fcm/fcm_result.rb', line 26

def canonical_id
  @canonical_id
end

Instance Method Details

#==(other) ⇒ Object



32
33
34
35
# File 'lib/ruby-push-notifications/fcm/fcm_result.rb', line 32

def ==(other)
  (other.is_a?(FCMCanonicalIDResult) && @canonical_id == other.canonical_id) ||
    super(other)
end