class CreateSend::Transactional::Timeline

Attributes

client_id[R]

Public Class Methods

new(auth, client_id = nil) click to toggle source
Calls superclass method
# File lib/createsend/transactional_timeline.rb, line 6
def initialize(auth, client_id = nil)
  @auth      = auth
  @client_id = client_id
  super
end

Public Instance Methods

details(message_id, options = {}) click to toggle source
# File lib/createsend/transactional_timeline.rb, line 24
def details(message_id, options = {})
  options = add_client_id(options)
  response = get "/transactional/messages/#{message_id}", { :query => options }
  Hashie::Mash.new(response)
end
messages(options = {}) click to toggle source
# File lib/createsend/transactional_timeline.rb, line 12
def messages(options = {})
  options = add_client_id(options)
  response = get "/transactional/messages", { :query => options }
  response.map{|item| Hashie::Mash.new(item)}
end
resend(message_id) click to toggle source
# File lib/createsend/transactional_timeline.rb, line 30
def resend(message_id)
  response = post "/transactional/messages/#{message_id}/resend"
  response.map{|item| Hashie::Mash.new(item)}
end
statistics(options = {}) click to toggle source
# File lib/createsend/transactional_timeline.rb, line 18
def statistics(options = {})
  options = add_client_id(options)
  response = get "/transactional/statistics", { :query => options }
  Hashie::Mash.new(response)
end

Private Instance Methods

add_client_id(options) click to toggle source
# File lib/createsend/transactional_timeline.rb, line 37
def add_client_id(options)
  options['clientID'] = @client_id if @client_id
  options
end