Thinkific.Api.Enrollments (Thinkific API SDK v0.1.3)
API calls for all endpoints tagged Enrollments
.
Link to this section Summary
Functions
createEnrollment Creates a new Enrollment for specified student in specified course
getEnrollments Returns a list of enrollments
getEnrollmentsByID Returns the Enrollment identified by the provided id.
updateEnrollment Updates a Enrollment for specified student in specified course
Link to this section Functions
create_enrollment(connection, body, opts \\ [])
Specs
create_enrollment( Tesla.Env.client(), Thinkific.Model.CreateEnrollmentRequest.t(), keyword() ) :: {:ok, Thinkific.Model.EnrollmentResponse.t()} | {:error, Tesla.Env.t()}
createEnrollment Creates a new Enrollment for specified student in specified course
Parameters
- connection (Thinkific.Connection): Connection to server
- body (CreateEnrollmentRequest): New enrollment attributes
- opts (KeywordList): [optional] Optional parameters
Returns
} on success {:error, info} on failure
get_enrollments(connection, opts \\ [])
Specs
get_enrollments(Tesla.Env.client(), keyword()) :: {:ok, Thinkific.Model.GetEnrollmentsResponse.t()} | {:error, Tesla.Env.t()}
getEnrollments Returns a list of enrollments
Parameters
- connection (Thinkific.Connection): Connection to server
- opts (KeywordList): [optional] Optional parameters
- :page (float()): The page within the collection to fetch.
- :limit (float()): The number of items to be returned.
- :query[user_id] (float()): Search Enrollments by User ID.
- :query[course_id] (float()): Search Enrollments by Course ID.
- :query[email] (String.t): Search Enrollments by User email.
- :query[free_trial] (boolean()): Filter for only Free Trial Enrollments when set to true.
- :query[full] (boolean()): Filter for only full Enrollments when set to true.
- :query[completed] (boolean()): Filter for only completed Enrollments when set to true.
- :query[expired] (boolean()): Filter for only expired Enrollments when set to true.
- :query[created_on] (DateTime.t): Filter for only Enrollments created on the date specified.
- :query[created_before] (DateTime.t): Filter for only Enrollments created before the date specified.
- :query[created_on_or_before] (DateTime.t): Filter for only Enrollments created on or before the date specified.
- :query[created_after] (DateTime.t): Filter for only Enrollments created after the date specified.
- :query[created_on_or_after] (DateTime.t): Filter for only Enrollments created on or after the date specified.
- :query[updated_on] (DateTime.t): Filter for only Enrollments updated on the date specified.
- :query[updated_before] (DateTime.t): Filter for only Enrollments updated before the date specified.
- :query[updated_on_or_before] (DateTime.t): Filter for only Enrollments updated on or before the date specified.
- :query[updated_after] (DateTime.t): Filter for only Enrollments updated after the date specified.
Returns
} on success {:error, info} on failure
get_enrollments_by_id(connection, id, opts \\ [])
Specs
get_enrollments_by_id(Tesla.Env.client(), float(), keyword()) :: {:ok, Thinkific.Model.EnrollmentResponse.t()} | {:error, Tesla.Env.t()}
getEnrollmentsByID Returns the Enrollment identified by the provided id.
Parameters
- connection (Thinkific.Connection): Connection to server
- id (float()): ID of the Enrollment in the form of an integer.
- opts (KeywordList): [optional] Optional parameters
Returns
} on success {:error, info} on failure
update_enrollment(connection, id, body, opts \\ [])
Specs
update_enrollment( Tesla.Env.client(), float(), Thinkific.Model.UpdateEnrollmentRequest.t(), keyword() ) :: {:ok, Thinkific.Model.EnrollmentResponse.t()} | {:error, Tesla.Env.t()}
updateEnrollment Updates a Enrollment for specified student in specified course
Parameters
- connection (Thinkific.Connection): Connection to server
- id (float()): ID of the Enrollment in the form of an integer.
- body (UpdateEnrollmentRequest): New enrollment attributes
- opts (KeywordList): [optional] Optional parameters
Returns
} on success {:error, info} on failure