Class: GfreshPoint::RequestObjects::ListUserPointsRequest

Inherits:
RequestObject
  • Object
show all
Defined in:
lib/gfresh_point/request_objects/list_user_points_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, user_id, event_name, origin_id) ⇒ ListUserPointsRequest

Returns a new instance of ListUserPointsRequest.



6
7
8
9
10
11
12
13
14
15
16
17
18
# File 'lib/gfresh_point/request_objects/list_user_points_request.rb', line 6

def initialize(app_id, user_id, event_name, origin_id)
  @app_id = app_id
  @user_id = user_id
  @event_name = event_name
  @origin_id = origin_id

  if user_id.blank?
    add_error('user_id', "User id can not be blank")
  end
  if app_id.blank?
    add_error('app_id', "App id can not be blank")
  end
end

Instance Attribute Details

#app_idObject (readonly)

Returns the value of attribute app_id.



4
5
6
# File 'lib/gfresh_point/request_objects/list_user_points_request.rb', line 4

def app_id
  @app_id
end

#event_nameObject (readonly)

Returns the value of attribute event_name.



4
5
6
# File 'lib/gfresh_point/request_objects/list_user_points_request.rb', line 4

def event_name
  @event_name
end

#origin_idObject (readonly)

Returns the value of attribute origin_id.



4
5
6
# File 'lib/gfresh_point/request_objects/list_user_points_request.rb', line 4

def origin_id
  @origin_id
end

#user_idObject (readonly)

Returns the value of attribute user_id.



4
5
6
# File 'lib/gfresh_point/request_objects/list_user_points_request.rb', line 4

def user_id
  @user_id
end