class Mailstro::Delivery

Attributes

email_name[R]

Public Class Methods

new(email_name, options) click to toggle source
# File lib/mailstro/delivery.rb, line 5
def initialize(email_name, options)
  @email_name = email_name
  @options    = options
end

Public Instance Methods

data() click to toggle source
# File lib/mailstro/delivery.rb, line 14
def data
  @options.fetch(:data, nil)
end
deliver() click to toggle source
# File lib/mailstro/delivery.rb, line 18
def deliver
  post("deliveries",
       :to         => to,
       :email_name => email_name,
       :data       => data
  )
end
to() click to toggle source
# File lib/mailstro/delivery.rb, line 10
def to
  @options.fetch(:to)
end