Class: BrazeRuby::REST::SendMessages
- Defined in:
- lib/braze_ruby/rest/send_messages.rb
Instance Attribute Summary collapse
-
#api_key ⇒ Object
readonly
Returns the value of attribute api_key.
-
#external_user_ids ⇒ Object
readonly
Returns the value of attribute external_user_ids.
-
#messages ⇒ Object
readonly
Returns the value of attribute messages.
Instance Method Summary collapse
-
#initialize(api_key, braze_url, messages: [], external_user_ids: []) ⇒ SendMessages
constructor
A new instance of SendMessages.
- #perform ⇒ Object
Constructor Details
#initialize(api_key, braze_url, messages: [], external_user_ids: []) ⇒ SendMessages
Returns a new instance of SendMessages.
6 7 8 9 10 11 |
# File 'lib/braze_ruby/rest/send_messages.rb', line 6 def initialize(api_key, braze_url, messages: [], external_user_ids: []) @api_key = api_key @messages = @external_user_ids = external_user_ids super braze_url end |
Instance Attribute Details
#api_key ⇒ Object (readonly)
Returns the value of attribute api_key.
4 5 6 |
# File 'lib/braze_ruby/rest/send_messages.rb', line 4 def api_key @api_key end |
#external_user_ids ⇒ Object (readonly)
Returns the value of attribute external_user_ids.
4 5 6 |
# File 'lib/braze_ruby/rest/send_messages.rb', line 4 def external_user_ids @external_user_ids end |
#messages ⇒ Object (readonly)
Returns the value of attribute messages.
4 5 6 |
# File 'lib/braze_ruby/rest/send_messages.rb', line 4 def @messages end |
Instance Method Details
#perform ⇒ Object
13 14 15 16 17 18 19 |
# File 'lib/braze_ruby/rest/send_messages.rb', line 13 def perform http.post '/messages/send', { 'api_key': api_key, 'messages': , 'external_user_ids': external_user_ids } end |