class Internal::Student::StudentScheduleService < Internal::ApplicationService
  def initialize(school, student)
    @school = school
    @student = student
  end

  def call
    response = RestClient.get("#{base_url}/Student/PdfSchedule/#{@student.id}", headers)
    JSON.parse(response.body)
  rescue RestClient::Exception => e
    return if e.response&.body.blank?

    { error: JSON.parse(e.response.body) }
  end
end
