module Mailstro class Delivery < Resource def initialize(options) @options = options end def contact_email @options.fetch(:to) end def template_name @options.fetch(:template_name) end def template_data @options.fetch(:template_data, nil) end def deliver post("deliveries", :contact_email => contact_email, :template_name => template_name, :template_data => template_data ) end end end