Class: CampusIvy::Resources::StudentNote
- Inherits:
-
Object
- Object
- CampusIvy::Resources::StudentNote
- Extended by:
- T::Sig
- Defined in:
- lib/campus_ivy/resources/student_note.rb
Instance Method Summary collapse
- #create(student_id:, note_type_id:, note:, subject:) ⇒ Object
-
#initialize(client) ⇒ StudentNote
constructor
A new instance of StudentNote.
- #list(institution_student_id: nil, student_id_list: nil, student_note_id: nil, note_type_id: nil, start_date: nil, end_date: nil) ⇒ Object
Constructor Details
#initialize(client) ⇒ StudentNote
Returns a new instance of StudentNote.
9 10 11 |
# File 'lib/campus_ivy/resources/student_note.rb', line 9 def initialize(client) @client = client end |
Instance Method Details
#create(student_id:, note_type_id:, note:, subject:) ⇒ Object
52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 |
# File 'lib/campus_ivy/resources/student_note.rb', line 52 def create( student_id:, note_type_id:, note:, subject: ) payload = { StudentId: student_id, NoteTypeId: note_type_id, Note: note, Subject: subject } response = @client.connection.post('StudentNote') do |req| req.body = payload end CampusIvy::Object.new(response.body) end |
#list(institution_student_id: nil, student_id_list: nil, student_note_id: nil, note_type_id: nil, start_date: nil, end_date: nil) ⇒ Object
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
# File 'lib/campus_ivy/resources/student_note.rb', line 23 def list( institution_student_id: nil, student_id_list: nil, student_note_id: nil, note_type_id: nil, start_date: nil, end_date: nil ) params = { 'request.institutionStudentId' => institution_student_id, 'request.studentIdList' => student_id_list, 'request.studentNoteId' => student_note_id, 'request.noteTypeId' => note_type_id, 'request.startDate' => start_date, 'request.endDate' => end_date }.compact response = @client.connection.get('StudentNote', params) CampusIvy::Object.new(response.body) end |