module Postmark

assume activesupport is already loaded

Constants

HEADERS
VERSION

Attributes

api_client[W]
api_key[RW]
api_key=[RW]
api_token[RW]
host[RW]
http_open_timeout[RW]
http_read_timeout[RW]
max_retries[RW]
path_prefix[RW]
port[RW]
proxy_host[RW]
proxy_pass[RW]
proxy_port[RW]
proxy_user[RW]
response_parser_class[W]
secure[RW]

Public Class Methods

const_missing(const_name) click to toggle source
Calls superclass method
# File lib/postmark/deprecations.rb, line 2
def self.const_missing(const_name)
  replacement = Deprecations.deprecated_constants.fetch(const_name, nil) || super
  Deprecations.report("DEPRECATION WARNING: the class #{const_name} is deprecated. Use #{replacement} instead.")
  replacement
end

Public Instance Methods

api_client() click to toggle source
# File lib/postmark.rb, line 55
def api_client
  return @api_client if @api_client

  @@api_client_mutex.synchronize do
    @api_client ||= Postmark::ApiClient.new(
                      self.api_token,
                      :secure => self.secure,
                      :proxy_host => self.proxy_host,
                      :proxy_port => self.proxy_port,
                      :proxy_user => self.proxy_user,
                      :proxy_pass => self.proxy_pass,
                      :host => self.host,
                      :port => self.port,
                      :path_prefix => self.path_prefix,
                      :max_retries => self.max_retries
                    )
  end
end
configure() { |self| ... } click to toggle source
# File lib/postmark.rb, line 51
def configure
  yield self
end
deliver_message(*args) click to toggle source
# File lib/postmark.rb, line 74
def deliver_message(*args)
  api_client.deliver_message(*args)
end
Also aliased as: send_through_postmark
deliver_messages(*args) click to toggle source
# File lib/postmark.rb, line 79
def deliver_messages(*args)
  api_client.deliver_messages(*args)
end
delivery_stats(*args) click to toggle source
# File lib/postmark.rb, line 83
def delivery_stats(*args)
  api_client.delivery_stats(*args)
end
response_parser_class() click to toggle source
# File lib/postmark.rb, line 47
def response_parser_class
  @response_parser_class ||= defined?(ActiveSupport::JSON) ? :ActiveSupport : :Json
end
send_through_postmark(*args)
Alias for: deliver_message