// This method will be called for each input received from the pipeline to this cmdlet; if no input is received, this method is not called protected override void ProcessRecord() { UpdateConsent consent = new UpdateConsent() { Details = Details, ConsentType = ConsentType }; var response = SentralApiClient.Enrolments.CreateConsent(consent); WriteObject(response); }
// This method will be called for each input received from the pipeline to this cmdlet; if no input is received, this method is not called protected override void ProcessRecord() { UpdateConsent consent = GetInitUpdateStudent(); // Populate from student object if object was used. if (_detailsProvided) { consent.Details = _details; } ; if (_consentTypeProvided) { consent.ConsentType = _consentType; } var response = SentralApiClient.Enrolments.UpdateConsent(consent); WriteObject(response); }