public async Task UpdateEnrollmentTerm() { var enrollmentTerm = new EnrollmentTerm() { Id = 3, Name = "Test Term Z", StartAt = DateTime.Now, EndAt = DateTime.Now.AddMonths(3) }; var term = await _client.AccountsManager.UpdateEnrollmentTerm(AccountId, enrollmentTerm); Console.Out.WriteLine(term); }
/// <summary> /// Update an enrollment term /// </summary> /// <param name="accountId">The ID of the account</param> /// <param name="term">The term to update</param> /// <returns></returns> public async Task <EnrollmentTerm> UpdateEnrollmentTerm(long accountId, EnrollmentTerm term) { accountId.ThrowIfUnassigned("accountId"); term.ThrowIfNull("term"); var request = new ApiRequest(_config.AccountsEndpointUri, accountId + "/terms/" + term.Id) .Method(RequestMethod.Put); request = PopulateTerm(request, term); return(await GetReponseAsync <EnrollmentTerm>(request).ConfigureAwait(false)); }
public async Task UpdateEnrollmentTerm() { var enrollmentTerm = new EnrollmentTerm() { Id=3, Name = "Test Term Z", StartAt = DateTime.Now, EndAt = DateTime.Now.AddMonths(3) }; var term = await _client.AccountsManager.UpdateEnrollmentTerm(AccountId, enrollmentTerm); Console.Out.WriteLine(term); }