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.



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

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:



592
593
594
# File 'lib/google/apis/forms_v1/classes.rb', line 592

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)


597
598
599
# File 'lib/google/apis/forms_v1/classes.rb', line 597

def create_time
  @create_time
end

#form_idString

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

Returns:

  • (String)


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

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)


608
609
610
# File 'lib/google/apis/forms_v1/classes.rb', line 608

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)


613
614
615
# File 'lib/google/apis/forms_v1/classes.rb', line 613

def respondent_email
  @respondent_email
end

#response_idString

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

Returns:

  • (String)


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

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)


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

def total_score
  @total_score
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



633
634
635
636
637
638
639
640
641
# File 'lib/google/apis/forms_v1/classes.rb', line 633

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