Sha256: f9e78f5b345a0e64e0d3175f7576407fabd7d2ebb78e98e5349c282926b21bfc

Contents?: true

Size: 560 Bytes

Versions: 6

Compression:

Stored size: 560 Bytes

Contents

module BrazeRuby
  module REST
    class SendMessages < Base
      attr_reader :api_key, :messages, :external_user_ids

      def initialize(api_key, braze_url, messages: [], external_user_ids: [])
        @api_key = api_key
        @messages = messages
        @external_user_ids = external_user_ids
        super braze_url
      end

      def perform
        http.post '/messages/send', {
          'api_key':           api_key,
          'messages':          messages,
          'external_user_ids': external_user_ids
        }
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
braze_ruby-0.2.2 lib/braze_ruby/rest/send_messages.rb
braze_ruby-0.2.1 lib/braze_ruby/rest/send_messages.rb
braze_ruby-0.2.0 lib/braze_ruby/rest/send_messages.rb
braze_ruby-0.1.0 lib/braze_ruby/rest/send_messages.rb
braze_ruby-0.0.2 lib/braze_ruby/rest/send_messages.rb
braze_ruby-0.0.1 lib/braze_ruby/rest/send_messages.rb