class Tep::SchoolService < Tep::ApplicationService
  def call
    rest_client_request(:post, url, @school, :school, body: body)
  end

  private
    def endpoint
      :school
    end

    def body
      {
        message_id: SecureRandom.uuid,
        school_id: @school.id.to_s,
        grade_levels: @school.grades_hash.to_json,
        email: @school.admin_email,
        address: @school.decorate.address_line
      }
    end
end
