Class: BrazeRuby::REST::EmailStatus

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_key, braze_url, options, email: nil, status: nil) ⇒ EmailStatus

Returns a new instance of EmailStatus.



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

def initialize(api_key, braze_url, options, email: nil, status: nil)
  @email = email
  @status = status
  super(api_key, braze_url, options)
end

Instance Attribute Details

#emailObject (readonly)

Returns the value of attribute email.



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

def email
  @email
end

#statusObject (readonly)

Returns the value of attribute status.



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

def status
  @status
end

Instance Method Details

#performObject



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

def perform
  http.post "/email/status", {
    email: email,
    subscription_state: status
  }
end