module Roqua module CoreApi # @api private class SendEmailTo < ActiveInteraction::Base string :person_id hash :attributes do string :subject string :body string :bcc, default: nil 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