Sha256: 23fa8d093b2c20a2b507ee0a8ffd492f5c4c34516d354e3b7c26cc779828ec37

Contents?: true

Size: 480 Bytes

Versions: 2

Compression:

Stored size: 480 Bytes

Contents

require 'json'

module Moromi
  module Aws
    module Sns
      module Message
        class Parameter
          def initialize(apns: nil, gcm: nil)
            @apns = apns
            @gcm = gcm
          end

          def to_json
            {
              'default': '',
              'APNS_SANDBOX': @apns&.to_json,
              'APNS': @apns&.to_json,
              'GCM': @gcm&.to_json
            }.compact.to_json
          end
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
moromi-aws-sns-0.6.0 lib/moromi/aws/sns/message/parameter.rb
moromi-aws-sns-0.5.0 lib/moromi/aws/sns/message/parameter.rb