Class: GfreshPoint::RequestObjects::UpdateRulePointRequest
- Inherits:
-
RequestObject
- Object
- RequestObject
- GfreshPoint::RequestObjects::UpdateRulePointRequest
- Defined in:
- lib/gfresh_point/request_objects/update_rule_point_request.rb
Instance Attribute Summary collapse
-
#app_id ⇒ Object
Returns the value of attribute app_id.
-
#name ⇒ Object
Returns the value of attribute name.
-
#point ⇒ Object
Returns the value of attribute point.
-
#rule_id ⇒ Object
Returns the value of attribute rule_id.
Instance Method Summary collapse
-
#initialize(app_id, rule_id, point, name) ⇒ UpdateRulePointRequest
constructor
A new instance of UpdateRulePointRequest.
Methods inherited from RequestObject
#add_error, #errors, #has_errors, #success?
Constructor Details
#initialize(app_id, rule_id, point, name) ⇒ UpdateRulePointRequest
Returns a new instance of UpdateRulePointRequest.
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/gfresh_point/request_objects/update_rule_point_request.rb', line 6 def initialize(app_id, rule_id, point, name) @app_id = app_id @rule_id = rule_id @name = name @point = point if app_id.blank? add_error('app_id', "App id can not be blank") end if rule_id.blank? add_error('rule_id', "Rule id can not be blank") end if point.blank? add_error('app_id', "Point can not be blank") end end |
Instance Attribute Details
#app_id ⇒ Object
Returns the value of attribute app_id.
4 5 6 |
# File 'lib/gfresh_point/request_objects/update_rule_point_request.rb', line 4 def app_id @app_id end |
#name ⇒ Object
Returns the value of attribute name.
4 5 6 |
# File 'lib/gfresh_point/request_objects/update_rule_point_request.rb', line 4 def name @name end |
#point ⇒ Object
Returns the value of attribute point.
4 5 6 |
# File 'lib/gfresh_point/request_objects/update_rule_point_request.rb', line 4 def point @point end |
#rule_id ⇒ Object
Returns the value of attribute rule_id.
4 5 6 |
# File 'lib/gfresh_point/request_objects/update_rule_point_request.rb', line 4 def rule_id @rule_id end |