Class: EmailDirect::Filter

Inherits:
Object
  • Object
show all
Defined in:
lib/emaildirect/filter.rb

Overview

Represents a filter and associated functionality

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(filter_id) ⇒ Filter

Returns a new instance of Filter.



16
17
18
# File 'lib/emaildirect/filter.rb', line 16

def initialize(filter_id)
  @filter_id = filter_id
end

Instance Attribute Details

#filter_idObject (readonly)

Returns the value of attribute filter_id.



14
15
16
# File 'lib/emaildirect/filter.rb', line 14

def filter_id
  @filter_id
end

Class Method Details

.allObject



8
9
10
11
# File 'lib/emaildirect/filter.rb', line 8

def all
  response = EmailDirect.get '/Filters'
  Hashie::Mash.new(response)
end

Instance Method Details

#detailsObject



20
21
22
23
# File 'lib/emaildirect/filter.rb', line 20

def details
  response = get
  Hashie::Mash.new(response)
end

#members(options = {}) ⇒ Object



25
26
27
28
# File 'lib/emaildirect/filter.rb', line 25

def members(options = {})
  response = get 'Members', options
  Hashie::Mash.new(response)
end