Class: Filter

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

Instance Method Summary collapse

Constructor Details

#initialize(clientw) ⇒ Filter

Returns a new instance of Filter.



6
7
8
# File 'lib/filter.rb', line 6

def initialize(clientw)
    @clientw = clientw
end

Instance Method Details

#get(options) ⇒ Object



15
16
17
18
19
20
21
# File 'lib/filter.rb', line 15

def get(options)
    query = {}
    query = ReqUtils.add_if_not_blank(query, 'filter_id', options['filter_id'])
    query = ReqUtils.add_if_not_blank(query, 'filter_reference', options['filter_reference'])
    resp = @clientw.get("filter", query)
    return resp['data']
end

#listObject



10
11
12
13
# File 'lib/filter.rb', line 10

def list()
    resp = @clientw.get("filters")
    return resp['data']
end