Sha256: c1b70eaa58751cc64ac69d2d60689a2bc2866906f44e616716e613605d1ee331

Contents?: true

Size: 759 Bytes

Versions: 4

Compression:

Stored size: 759 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

4 entries across 4 versions & 1 rubygems

Version Path
braze_ruby-0.8.0 lib/braze_ruby/rest/schedule_messages.rb
braze_ruby-0.7.0 lib/braze_ruby/rest/schedule_messages.rb
braze_ruby-0.6.0 lib/braze_ruby/rest/schedule_messages.rb
braze_ruby-0.5.0 lib/braze_ruby/rest/schedule_messages.rb