Class: LMSGraphQL::Mutations::Canvas::CreateAppointmentGroup

Inherits:
BaseMutation
  • Object
show all
Defined in:
lib/lms_graphql/mutations/canvas/create_appointment_group.rb

Instance Method Summary collapse

Instance Method Details

#resolve(appointment_group_context_codes:, appointment_group_sub_context_codes: nil, appointment_group_title:, appointment_group_description: nil, appointment_group_location_name: nil, appointment_group_location_address: nil, appointment_group_publish: nil, appointment_group_participants_per_appointment: nil, appointment_group_min_appointments_per_participant: nil, appointment_group_max_appointments_per_participant: nil, appointment_group_new_appointments_X: nil, appointment_group_participant_visibility: nil) ⇒ Object



23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# File 'lib/lms_graphql/mutations/canvas/create_appointment_group.rb', line 23

def resolve(appointment_group_context_codes:, appointment_group_sub_context_codes: nil, appointment_group_title:, appointment_group_description: nil, appointment_group_location_name: nil, appointment_group_location_address: nil, appointment_group_publish: nil, appointment_group_participants_per_appointment: nil, appointment_group_min_appointments_per_participant: nil, appointment_group_max_appointments_per_participant: nil, appointment_group_new_appointments_X: nil, appointment_group_participant_visibility: nil)
  context[:canvas_api].call("CREATE_APPOINTMENT_GROUP").proxy(
    "CREATE_APPOINTMENT_GROUP",
    {},
    {
      "appointment_group[context_codes]": appointment_group_context_codes,
      "appointment_group[sub_context_codes]": appointment_group_sub_context_codes,
      "appointment_group[title]": appointment_group_title,
      "appointment_group[description]": appointment_group_description,
      "appointment_group[location_name]": appointment_group_location_name,
      "appointment_group[location_address]": appointment_group_location_address,
      "appointment_group[publish]": appointment_group_publish,
      "appointment_group[participants_per_appointment]": appointment_group_participants_per_appointment,
      "appointment_group[min_appointments_per_participant]": appointment_group_min_appointments_per_participant,
      "appointment_group[max_appointments_per_participant]": appointment_group_max_appointments_per_participant,
      "appointment_group[new_appointments][X]": appointment_group_new_appointments_X,
      "appointment_group[participant_visibility]": appointment_group_participant_visibility
    },
  ).parsed_response
end