Class: BrazeRuby::REST::SendMessages

Inherits:
Base
  • Object
show all
Defined in:
lib/braze_ruby/rest/send_messages.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_key, braze_url, options, messages: [], external_user_ids: []) ⇒ SendMessages

Returns a new instance of SendMessages.



8
9
10
11
12
# File 'lib/braze_ruby/rest/send_messages.rb', line 8

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

Instance Attribute Details

#external_user_idsObject (readonly)

Returns the value of attribute external_user_ids.



6
7
8
# File 'lib/braze_ruby/rest/send_messages.rb', line 6

def external_user_ids
  @external_user_ids
end

#messagesObject (readonly)

Returns the value of attribute messages.



6
7
8
# File 'lib/braze_ruby/rest/send_messages.rb', line 6

def messages
  @messages
end

Instance Method Details

#performObject



14
15
16
17
18
19
# File 'lib/braze_ruby/rest/send_messages.rb', line 14

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