Sha256: 0a5a734fd7c4e0d92e45807760092e2eee37c308ffd9ec77a2e948c2f16413af

Contents?: true

Size: 456 Bytes

Versions: 4

Compression:

Stored size: 456 Bytes

Contents

# frozen_string_literal: true

module BrazeRuby
  module REST
    class EmailStatus < Base
      attr_reader :email, :status

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

      def perform
        http.post "/email/status", {
          email: email,
          subscription_state: status
        }
      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/email_status.rb
braze_ruby-0.7.0 lib/braze_ruby/rest/email_status.rb
braze_ruby-0.6.0 lib/braze_ruby/rest/email_status.rb
braze_ruby-0.5.0 lib/braze_ruby/rest/email_status.rb