Sha256: f6d14ec38c3d66749d72aba2c3c2fde1eeb66cb79bd57d3ba60fa7c13a110ed6

Contents?: true

Size: 457 Bytes

Versions: 2

Compression:

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

2 entries across 2 versions & 1 rubygems

Version Path
braze_ruby-0.10.0 lib/braze_ruby/rest/email_status.rb
braze_ruby-0.9.0 lib/braze_ruby/rest/email_status.rb