Class: Google::Apis::ClassroomV1::Invitation

Inherits:
Object
  • Object
show all
Includes:
Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
Defined in:
generated/google/apis/classroom_v1/classes.rb,
generated/google/apis/classroom_v1/representations.rb,
generated/google/apis/classroom_v1/representations.rb

Overview

An invitation to join a course.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Google::Apis::Core::JsonObjectSupport

#to_json

Methods included from Google::Apis::Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ Invitation

Returns a new instance of Invitation.



1126
1127
1128
# File 'generated/google/apis/classroom_v1/classes.rb', line 1126

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

Instance Attribute Details

#course_idString

Identifier of the course to invite the user to. Corresponds to the JSON property courseId

Returns:

  • (String)


1102
1103
1104
# File 'generated/google/apis/classroom_v1/classes.rb', line 1102

def course_id
  @course_id
end

#idString

Identifier assigned by Classroom. Read-only. Corresponds to the JSON property id

Returns:

  • (String)


1108
1109
1110
# File 'generated/google/apis/classroom_v1/classes.rb', line 1108

def id
  @id
end

#roleString

Role to invite the user to have. Must not be COURSE_ROLE_UNSPECIFIED. Corresponds to the JSON property role

Returns:

  • (String)


1114
1115
1116
# File 'generated/google/apis/classroom_v1/classes.rb', line 1114

def role
  @role
end

#user_idString

Identifier of the invited user. When specified as a parameter of a request, this identifier can be set to one of the following:

  • the numeric identifier for the user
  • the email address of the user
  • the string literal "me", indicating the requesting user Corresponds to the JSON property userId

Returns:

  • (String)


1124
1125
1126
# File 'generated/google/apis/classroom_v1/classes.rb', line 1124

def user_id
  @user_id
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1131
1132
1133
1134
1135
1136
# File 'generated/google/apis/classroom_v1/classes.rb', line 1131

def update!(**args)
  @course_id = args[:course_id] if args.key?(:course_id)
  @id = args[:id] if args.key?(:id)
  @role = args[:role] if args.key?(:role)
  @user_id = args[:user_id] if args.key?(:user_id)
end