def download(args)
      if args.length != 1
        puts "missing report id for 'download' subcommand"
        return false
      end

      report_id = args[0].to_i
      report    = @common_args.account.reports.find { |r| r.id == report_id }
      if report.nil?
        puts "report '#{report_id}' not found"
        return false
      end

      if report.status != 'Completed'
        puts "cannot download report with status '#{report.status}'"
        return false
      end

      path_name = "test_report.xml"
      puts "Download report #{report.id} in #{path_name}"
      report.download(path_name)
      true
    end
def download(args)
      if args.length != 1
        puts "missing report id for 'download' subcommand"
        return false
      end

      report_id = args[0].to_i
      report    = @common_args.account.reports.find { |r| r.id == report_id }
      if report.nil?
        puts "report '#{report_id}' not found"
        return false
      end

      if report.status != 'Completed'
        puts "cannot download report with status '#{report.status}'"
        return false
      end

      path_name = "test_report.xml"
      puts "Download report #{report.id} in #{path_name}"
      report.download(path_name)
      true
    end
download a v13 report