Class: CampusIvy::Resources::UserProfile

Inherits:
Object
  • Object
show all
Extended by:
T::Sig
Defined in:
lib/campus_ivy/resources/user_profile.rb

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ UserProfile

Returns a new instance of UserProfile.



9
10
11
# File 'lib/campus_ivy/resources/user_profile.rb', line 9

def initialize(client)
  @client = client
end

Instance Method Details

#list(user_id: nil, start_date: nil, end_date: nil) ⇒ Object



20
21
22
23
24
25
26
27
28
29
30
31
32
33
# File 'lib/campus_ivy/resources/user_profile.rb', line 20

def list(
  user_id: nil,
  start_date: nil,
  end_date: nil
)
  params = {
    'request.userId' => user_id,
    'request.startDate' => start_date,
    'request.endDate' => end_date
  }.compact

  response = @client.connection.get('UserProfile', params)
  CampusIvy::Object.new(response.body)
end