Sha256: 333291f4db2f5e44292c6380069c4751e180b9a97f68ac69bd339ce1a5be1e38

Contents?: true

Size: 859 Bytes

Versions: 6

Compression:

Stored size: 859 Bytes

Contents

module BrazeRuby
  module REST
    class ScheduleMessages < Base
      attr_reader :api_key, :time, :messages, :in_local_time, :external_user_ids

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

      def perform
        http.post '/messages/schedule/create', {
          'api_key':                    api_key,
          'external_user_ids':          external_user_ids,
          'schedule': {
            'time':                       time,
            'in_local_time':              in_local_time
          },
          'messages':                   messages
        }
      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/schedule_messages.rb
braze_ruby-0.2.1 lib/braze_ruby/rest/schedule_messages.rb
braze_ruby-0.2.0 lib/braze_ruby/rest/schedule_messages.rb
braze_ruby-0.1.0 lib/braze_ruby/rest/schedule_messages.rb
braze_ruby-0.0.2 lib/braze_ruby/rest/schedule_messages.rb
braze_ruby-0.0.1 lib/braze_ruby/rest/schedule_messages.rb