Sha256: c84fc0f29a473e69e9e0579148009ace7c4f646f3cf667f77158e6a706b4a5d6

Contents?: true

Size: 831 Bytes

Versions: 3

Compression:

Stored size: 831 Bytes

Contents

# frozen_string_literal: true

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

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

      def perform
        http.post '/messages/schedule/create', {
          'external_user_ids':          external_user_ids,
          'schedule': {
            'time':                       time,
            'in_local_time':              in_local_time
          },
          'messages':                   messages
        }
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
braze_ruby-0.4.2 lib/braze_ruby/rest/schedule_messages.rb
braze_ruby-0.4.1 lib/braze_ruby/rest/schedule_messages.rb
braze_ruby-0.4.0 lib/braze_ruby/rest/schedule_messages.rb