Class: GfreshPoint::RequestObjects::UpdateRulePointRequest

Inherits:
RequestObject
  • Object
show all
Defined in:
lib/gfresh_point/request_objects/update_rule_point_request.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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_idObject

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

#nameObject

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

#pointObject

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_idObject

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