Class: Google::Apis::FormsV1::FormResponse

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/forms_v1/classes.rb,
lib/google/apis/forms_v1/representations.rb,
lib/google/apis/forms_v1/representations.rb

Overview

A form response.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ FormResponse

Returns a new instance of FormResponse.



637
638
639
# File 'lib/google/apis/forms_v1/classes.rb', line 637

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#answersHash<String,Google::Apis::FormsV1::Answer>

Output only. The actual answers to the questions, keyed by question_id. Corresponds to the JSON property answers

Returns:



601
602
603
# File 'lib/google/apis/forms_v1/classes.rb', line 601

def answers
  @answers
end

#create_timeString

Output only. Timestamp for the first time the response was submitted. Corresponds to the JSON property createTime

Returns:

  • (String)


606
607
608
# File 'lib/google/apis/forms_v1/classes.rb', line 606

def create_time
  @create_time
end

#form_idString

Output only. The form ID. Corresponds to the JSON property formId

Returns:

  • (String)


611
612
613
# File 'lib/google/apis/forms_v1/classes.rb', line 611

def form_id
  @form_id
end

#last_submitted_timeString

Output only. Timestamp for the most recent time the response was submitted. Does not track changes to grades. Corresponds to the JSON property lastSubmittedTime

Returns:

  • (String)


617
618
619
# File 'lib/google/apis/forms_v1/classes.rb', line 617

def 
  @last_submitted_time
end

#respondent_emailString

Output only. The email address (if collected) for the respondent. Corresponds to the JSON property respondentEmail

Returns:

  • (String)


622
623
624
# File 'lib/google/apis/forms_v1/classes.rb', line 622

def respondent_email
  @respondent_email
end

#response_idString

Output only. The response ID. Corresponds to the JSON property responseId

Returns:

  • (String)


627
628
629
# File 'lib/google/apis/forms_v1/classes.rb', line 627

def response_id
  @response_id
end

#total_scoreFloat

Output only. The total number of points the respondent received for their submission Only set if the form was a quiz and the response was graded. This includes points automatically awarded via autograding adjusted by any manual corrections entered by the form owner. Corresponds to the JSON property totalScore

Returns:

  • (Float)


635
636
637
# File 'lib/google/apis/forms_v1/classes.rb', line 635

def total_score
  @total_score
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



642
643
644
645
646
647
648
649
650
# File 'lib/google/apis/forms_v1/classes.rb', line 642

def update!(**args)
  @answers = args[:answers] if args.key?(:answers)
  @create_time = args[:create_time] if args.key?(:create_time)
  @form_id = args[:form_id] if args.key?(:form_id)
  @last_submitted_time = args[:last_submitted_time] if args.key?(:last_submitted_time)
  @respondent_email = args[:respondent_email] if args.key?(:respondent_email)
  @response_id = args[:response_id] if args.key?(:response_id)
  @total_score = args[:total_score] if args.key?(:total_score)
end