Class: Dyn::Messaging::Bounces

Inherits:
Object
  • Object
show all
Defined in:
lib/dyn/messaging/bounces.rb

Instance Method Summary collapse

Constructor Details

#initialize(dyn) ⇒ Bounces

Returns a new instance of Bounces.



22
23
24
# File 'lib/dyn/messaging/bounces.rb', line 22

def initialize(dyn)
  @dyn = dyn
end

Instance Method Details

#count(starttime, endtime) ⇒ Object



26
27
28
# File 'lib/dyn/messaging/bounces.rb', line 26

def count(starttime, endtime)
  @dyn.get("#{resource_path}/count", {starttime:starttime, endtime:endtime})
end

#list(starttime, endtime, startindex = 0, emailaddress = nil) ⇒ Object



30
31
32
33
34
35
36
# File 'lib/dyn/messaging/bounces.rb', line 30

def list(starttime, endtime, startindex=0, emailaddress=nil)
  if not emailaddress.nil?
    @dyn.get("#{resource_path}", {starttime:starttime, endtime:endtime, startindex:startindex, emailaddress:emailaddress})
  else
    @dyn.get("#{resource_path}", {starttime:starttime, endtime:endtime, startindex:startindex})
  end
end