You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: agreement_summary_report.rb
    path of file: ./repos/identity-idp/app/jobs/reports
    
    the code of the file until where you have to start completion: require 'csv'

module Reports
  class AgreementSummaryReport < BaseReport
    REPORT_NAME = 'agreement-summary-report'.freeze

    def perform(_date)
      csv = build_report

      save_report(REPORT_NAME, csv, extension: 'csv')
    end

    # @return [String]
    def build_report
      CSV.generate do |csv|
        csv << %w[
          gtc_number
          order
    
    def build_report
      CSV.generate do |csv|
        csv << %w[
          gtc_number
          order_number
          issuer
          friendly_name
          start_date
          end_date
        ]

        IaaReportingHelper.iaas.each do |iaa|
          ServiceProvider.where(issuer: iaa.issuers).order(:issuer).each do |service_provider|
            csv << [
              iaa.gtc_number,
              iaa.order_number,
              service_provider.issuer,
              service_provider.friendly_name,
              iaa.start_date,
              iaa.end_date,
            ]
          end
        end
      end
    end