Sha256: c1c18f051c6e8cee36b0ce3c621dc50ff777f835a7ea21539ef1f714b2b4ad4f

Contents?: true

Size: 618 Bytes

Versions: 41

Compression:

Stored size: 618 Bytes

Contents

class Agilibox::FCM::Notifier < Agilibox::Service
  attr_reader :to, :title, :body, :badge, :sound, :data

  # rubocop:disable Metrics/ParameterLists
  def initialize(to:, title: nil, body:, badge: 0, sound: "default", data: {})
    @to    = to
    @title = title
    @body  = body
    @badge = badge
    @sound = sound
    @data  = data
  end
  # rubocop:enable Metrics/ParameterLists

  def call
    Agilibox::FCM::Request.call(
      :to => to,
      :notification => {
        :title => title,
        :body  => body,
        :badge => badge,
        :sound => sound,
      },
      :data => data,
    )
  end
end

Version data entries

41 entries across 41 versions & 1 rubygems

Version Path
agilibox-1.9.5 app/libs/agilibox/fcm/notifier.rb
agilibox-1.9.4 app/libs/agilibox/fcm/notifier.rb
agilibox-1.9.3 app/libs/agilibox/fcm/notifier.rb
agilibox-1.9.1 app/libs/agilibox/fcm/notifier.rb
agilibox-1.9.0 app/libs/agilibox/fcm/notifier.rb
agilibox-1.8.0 app/libs/agilibox/fcm/notifier.rb
agilibox-1.7.4 app/libs/agilibox/fcm/notifier.rb
agilibox-1.7.3 app/libs/agilibox/fcm/notifier.rb
agilibox-1.7.2 app/libs/agilibox/fcm/notifier.rb
agilibox-1.7.1 app/libs/agilibox/fcm/notifier.rb
agilibox-1.7.0 app/libs/agilibox/fcm/notifier.rb
agilibox-1.6.2 app/libs/agilibox/fcm/notifier.rb
agilibox-1.6.1 app/libs/agilibox/fcm/notifier.rb
agilibox-1.6.0 app/libs/agilibox/fcm/notifier.rb
agilibox-1.5.13 app/libs/agilibox/fcm/notifier.rb
agilibox-1.5.12 app/libs/agilibox/fcm/notifier.rb
agilibox-1.5.11 app/libs/agilibox/fcm/notifier.rb
agilibox-1.5.10 app/libs/agilibox/fcm/notifier.rb
agilibox-1.5.9 app/libs/agilibox/fcm/notifier.rb
agilibox-1.5.8 app/libs/agilibox/fcm/notifier.rb