Sha256: 12d74406b23859815fadecbffe257c5c54debf26cdd160a7eed243ae059215ef

Contents?: true

Size: 701 Bytes

Versions: 10

Compression:

Stored size: 701 Bytes

Contents

module CreateSend
  module Transactional
    class ClassicEmail < CreateSend
      attr_accessor :options

      def initialize(auth, client_id = nil)
        @auth = auth
        @client_id = client_id
        super
      end

      def send(options)
        response = post "/transactional/classicemail/send", { :body => options.to_json , :query => client_id }
        response.map{|item| Hashie::Mash.new(item)}
      end

      def groups
        response = get "/transactional/classicemail/groups", :query => client_id
        response.map{|item| Hashie::Mash.new(item)}
      end

      private

      def client_id
        {:clientID => @client_id} if @client_id
      end

    end
  end
end


Version data entries

10 entries across 10 versions & 2 rubygems

Version Path
createsend-6.1.1 lib/createsend/transactional_classic_email.rb
createsend-sendowlfork-6.1.0.pre.hashie5 lib/createsend/transactional_classic_email.rb
createsend-6.1.0 lib/createsend/transactional_classic_email.rb
createsend-6.0.0 lib/createsend/transactional_classic_email.rb
createsend-5.1.1 lib/createsend/transactional_classic_email.rb
createsend-5.1.0 lib/createsend/transactional_classic_email.rb
createsend-5.0.0 lib/createsend/transactional_classic_email.rb
createsend-4.1.2 lib/createsend/transactional_classic_email.rb
createsend-4.1.1 lib/createsend/transactional_classic_email.rb
createsend-4.1.0 lib/createsend/transactional_classic_email.rb