Sha256: bd7bdb03d171a8baaf972e8432a782ed89bc2a913b983f4088728537d1cf69aa

Contents?: true

Size: 541 Bytes

Versions: 5

Compression:

Stored size: 541 Bytes

Contents

module Roqua
  module CoreApi
    # @api private
    class SendEmailTo < ActiveInteraction::Base
      string :person_id
      hash :attributes do
        string :subject
        string :body
        string :content_type, default: 'text/html'
        string :mail_type, default: nil
      end

      # Possible variables in the body are:
      #   %firstname%,
      #   %lastname%,
      #   %initials%
      def execute
        CoreApi.basic_auth_session.post "/emails", email: attributes, person_id: person_id
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
roqua-core-api-0.7.0 lib/roqua/core_api/send_email_to.rb
roqua-core-api-0.6.0 lib/roqua/core_api/send_email_to.rb
roqua-core-api-0.5.0 lib/roqua/core_api/send_email_to.rb
roqua-core-api-0.4.0 lib/roqua/core_api/send_email_to.rb
roqua-core-api-0.3.1 lib/roqua/core_api/send_email_to.rb