module Mailstro class Delivery < Resource def self.deliver(template_name, contact_email, data) new(template_name, contact_email, data).deliver end attr_reader :contact_email, :template_name def initialize(template_name, contact_email, data) @template_name = template_name @contact_email = contact_email @data = data end def deliver post("deliveries", :template_name => @template_name, :contact_email => @contact_email, :data => @data) end end end