Class: GfreshPoint::RequestObjects::RuleListRequest
- Inherits:
-
RequestObject
- Object
- RequestObject
- GfreshPoint::RequestObjects::RuleListRequest
- Defined in:
- lib/gfresh_point/request_objects/rule_list_request.rb
Constant Summary collapse
- ACCEPTED_FILTERS =
['app_id']
Instance Attribute Summary collapse
-
#filters ⇒ Object
Returns the value of attribute filters.
Instance Method Summary collapse
-
#initialize(params = {}) ⇒ RuleListRequest
constructor
A new instance of RuleListRequest.
Methods inherited from RequestObject
#add_error, #errors, #has_errors, #success?
Constructor Details
#initialize(params = {}) ⇒ RuleListRequest
Returns a new instance of RuleListRequest.
8 9 10 11 12 13 14 15 |
# File 'lib/gfresh_point/request_objects/rule_list_request.rb', line 8 def initialize(params = {}) @filters = params[:filters] || {} @filters.keys.each do |filter| unless ACCEPTED_FILTERS.include?(filter.to_s) add_error('filters', "Key #{filter} can not be used") end end end |
Instance Attribute Details
#filters ⇒ Object
Returns the value of attribute filters.
4 5 6 |
# File 'lib/gfresh_point/request_objects/rule_list_request.rb', line 4 def filters @filters end |