Sha256: 97358c28675de3f32943c76a5d150d45e9370a189048524aae2563a0372ce2ce

Contents?: true

Size: 578 Bytes

Versions: 1

Compression:

Stored size: 578 Bytes

Contents

module Mailstro
  class ListDelivery < Resource
    def self.deliver(template_name, list_name, data)
      new(template_name, list_name, data).deliver
    end

    attr_reader :list_name, :template_name

    def initialize(template_name, list_name, data)
      @template_name = template_name
      @list_name     = list_name
      @data          = data
    end

    def deliver
      post("lists/deliveries", :template_name => @template_name,
                               :list_name     => @list_name,
                               :data          => @data)
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
mailstro-0.0.6 lib/mailstro/list_delivery.rb