Sha256: d78353f17422bec7f1288ad7f00e3679abc31b78990818b4508817218e5da64e
Contents?: true
Size: 721 Bytes
Versions: 11
Compression:
Stored size: 721 Bytes
Contents
require 'emaildirect' require 'json' module EmailDirect # Represents a relay send receipt and associated functionality class RelaySend::Receipt attr_reader :receipt_id def initialize(receipt_id) @receipt_id = receipt_id end def details response = get Hashie::Mash.new(response) end def message response = get 'Message' Hashie::Mash.new(response) end def clicks response = get 'Clicks' Hashie::Mash.new(response) end private def get(action = nil) EmailDirect.get uri_for(action) end def uri_for(action) action = "/#{action}" if action "/RelaySends/Receipt/#{receipt_id}#{action}" end end end
Version data entries
11 entries across 11 versions & 1 rubygems