class CreditReport::PdfService < CreditReport::ApplicationService
  def call
    resp = RestClient.post(url, {}, headers)
  end

  private
    def headers
      {
        'Authorization' => "Bearer #{token}",
        'Content-Type' => 'application/json',
        'Accept' => 'application/pdf'
      }
    end

    def endpoint
      "experian/credit-profile/custom-credit-report/pdf/#{request_id}/exp-prequal-vantage4"
    end

    def request_id
      @model.credit_report_key
    end
end
