Sha256: 40862fea3dc08454bb80877a5bc052d1204fa4f04726134091d777c168578bc2
Contents?: true
Size: 597 Bytes
Versions: 11
Compression:
Stored size: 597 Bytes
Contents
require 'emaildirect' require 'json' module EmailDirect # Represents a relay send custom email class RelaySend::Email attr_reader :category_id def initialize(category_id) @category_id = category_id raise ArgumentError, 'Category ID is required' unless @category_id end # Sends a custom message. See the docs for all the possible options # @see https://docs.emaildirect.com/#RelaySendCustomEmail def send(options) response = EmailDirect.post "/RelaySends/#{category_id}", :body => options.to_json Hashie::Mash.new(response) end end end
Version data entries
11 entries across 11 versions & 1 rubygems