Class: Blastengine::Log
- Includes:
- Blastengine
- Defined in:
- lib/blastengine/log.rb
Constant Summary
Constants included from Blastengine
Instance Attribute Summary collapse
-
#attachments ⇒ Object
Returns the value of attribute attachments.
-
#bcc ⇒ Object
Returns the value of attribute bcc.
-
#cc ⇒ Object
Returns the value of attribute cc.
-
#delivery_id ⇒ Object
Returns the value of attribute delivery_id.
-
#encode ⇒ Object
Returns the value of attribute encode.
-
#html_part ⇒ Object
Returns the value of attribute html_part.
-
#job ⇒ Object
Returns the value of attribute job.
-
#subject ⇒ Object
Returns the value of attribute subject.
-
#text_part ⇒ Object
Returns the value of attribute text_part.
Attributes inherited from Base
#created_time, #delivery_time, #delivery_type, #drop_count, #hard_error_count, #open_count, #sent_count, #soft_error_count, #status, #total_count, #updated_time
Class Method Summary collapse
Methods included from Blastengine
Methods inherited from Base
#cancel, #client, client, #delete, #get, #set, #sets, #unsubscribe
Instance Attribute Details
#attachments ⇒ Object
Returns the value of attribute attachments.
6 7 8 |
# File 'lib/blastengine/log.rb', line 6 def end |
#bcc ⇒ Object
Returns the value of attribute bcc.
6 7 8 |
# File 'lib/blastengine/log.rb', line 6 def bcc @bcc end |
#cc ⇒ Object
Returns the value of attribute cc.
6 7 8 |
# File 'lib/blastengine/log.rb', line 6 def cc @cc end |
#delivery_id ⇒ Object
Returns the value of attribute delivery_id.
6 7 8 |
# File 'lib/blastengine/log.rb', line 6 def delivery_id @delivery_id end |
#encode ⇒ Object
Returns the value of attribute encode.
6 7 8 |
# File 'lib/blastengine/log.rb', line 6 def encode @encode end |
#html_part ⇒ Object
Returns the value of attribute html_part.
6 7 8 |
# File 'lib/blastengine/log.rb', line 6 def html_part @html_part end |
#job ⇒ Object
Returns the value of attribute job.
6 7 8 |
# File 'lib/blastengine/log.rb', line 6 def job @job end |
#subject ⇒ Object
Returns the value of attribute subject.
6 7 8 |
# File 'lib/blastengine/log.rb', line 6 def subject @subject end |
#text_part ⇒ Object
Returns the value of attribute text_part.
6 7 8 |
# File 'lib/blastengine/log.rb', line 6 def text_part @text_part end |
Class Method Details
.find(params = {}) ⇒ Object
14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/blastengine/log.rb', line 14 def self.find(params = {}) Hash[ params.map{|k,v| [k.to_sym, v] } ] if params[:delivery_start] != nil params[:delivery_start] = params[:delivery_start].iso8601 end if params[:delivery_end] != nil params[:delivery_end] = params[:delivery_end].iso8601 end query_string = URI.encode_www_form(params) url = "/logs/mails/results?#{query_string}"; res = Mail.client.get url return res['data'].map {|params| Log.from_hash params } end |
.from_hash(params) ⇒ Object
8 9 10 11 12 |
# File 'lib/blastengine/log.rb', line 8 def self.from_hash(params) log = Log.new log.sets(params) log end |