/// <summary> /// Initializes client properties. /// </summary> private void Initialize() { StudentInternshipsExternal = new StudentInternshipsExternal(this); StudentsInternshipAbsenceExternal = new StudentsInternshipAbsenceExternal(this); BaseUri = new System.Uri("https://gateway.kmdlogic.io/studica/school-internships/v1"); SerializationSettings = new JsonSerializerSettings { Formatting = Newtonsoft.Json.Formatting.Indented, DateFormatHandling = Newtonsoft.Json.DateFormatHandling.IsoDateFormat, DateTimeZoneHandling = Newtonsoft.Json.DateTimeZoneHandling.Utc, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore, ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize, ContractResolver = new ReadOnlyJsonContractResolver(), Converters = new List <JsonConverter> { new Iso8601TimeSpanConverter() } }; DeserializationSettings = new JsonSerializerSettings { DateFormatHandling = Newtonsoft.Json.DateFormatHandling.IsoDateFormat, DateTimeZoneHandling = Newtonsoft.Json.DateTimeZoneHandling.Utc, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore, ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Serialize, ContractResolver = new ReadOnlyJsonContractResolver(), Converters = new List <JsonConverter> { new Iso8601TimeSpanConverter() } }; CustomInitialize(); }
/// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='periodFrom'> /// Get all students school internships absence starting on or after this date /// </param> /// <param name='periodTo'> /// Get all students school internships absence ending on or before this date /// </param> /// <param name='schoolCode'> /// The school code for which to get data. /// </param> /// <param name='xSelectedSchoolCode'> /// Selected school code, used when multiple impersonation permissions are /// available on the token /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async Task <IList <StudentsInternshipAbsenceExternalResponse> > GetAsync(this IStudentsInternshipAbsenceExternal operations, System.DateTime periodFrom, System.DateTime periodTo, string schoolCode, string xSelectedSchoolCode = default(string), CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.GetWithHttpMessagesAsync(periodFrom, periodTo, schoolCode, xSelectedSchoolCode, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
/// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='periodFrom'> /// Get all students school internships absence starting on or after this date /// </param> /// <param name='periodTo'> /// Get all students school internships absence ending on or before this date /// </param> /// <param name='schoolCode'> /// The school code for which to get data. /// </param> /// <param name='xSelectedSchoolCode'> /// Selected school code, used when multiple impersonation permissions are /// available on the token /// </param> public static IList <StudentsInternshipAbsenceExternalResponse> Get(this IStudentsInternshipAbsenceExternal operations, System.DateTime periodFrom, System.DateTime periodTo, string schoolCode, string xSelectedSchoolCode = default(string)) { return(operations.GetAsync(periodFrom, periodTo, schoolCode, xSelectedSchoolCode).GetAwaiter().GetResult()); }