OpenSource » SampleCode » NexPortWebApiClient
Clone URL:  
Pushed to one repository · View In Graph Contained in tip

tip Update new version for the client SDK
- Update APIs to reflect new Nexport API specifications in Nexport 6.6

Changeset f66436c36857

Parent b70e0d30bef1

by Profile picture of Thai NguyenThai Nguyen

Changes to 3 files · Browse files at f66436c36857 Showing diff from parent b70e0d30bef1 Diff from another changeset...

 
54
55
56
57
 
58
59
60
 
61
62
63
 
64
65
66
 
67
68
69
70
71
 
72
73
74
 
77
78
79
80
 
81
82
83
 
139
140
141
142
 
143
144
145
146
147
148
149
 
150
151
152
153
154
155
156
 
157
158
159
160
161
162
163
 
164
165
166
167
168
169
170
 
171
172
173
174
175
176
177
 
178
179
180
 
187
188
189
190
191
 
 
192
193
194
 
230
231
232
233
 
234
235
236
 
340
341
342
343
344
 
345
346
347
348
349
 
350
351
352
353
354
 
355
356
357
358
359
 
360
361
362
363
364
 
365
366
367
368
369
 
370
371
372
 
400
401
402
403
404
 
405
406
407
 
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
 
 
 
 
 
 
450
451
452
 
456
457
458
459
460
 
461
462
463
 
54
55
56
 
57
58
59
 
60
61
62
 
63
64
65
 
66
67
68
69
70
 
71
72
73
74
 
77
78
79
 
80
81
82
83
 
139
140
141
 
142
143
144
145
146
147
148
 
149
150
151
152
153
154
155
 
156
157
158
159
160
161
162
 
163
164
165
166
167
168
169
 
170
171
172
173
174
175
176
 
177
178
179
180
 
187
188
189
 
 
190
191
192
193
194
 
230
231
232
 
233
234
235
236
 
340
341
342
 
 
343
344
345
346
 
 
347
348
349
350
 
 
351
352
353
354
 
 
355
356
357
358
 
 
359
360
361
362
 
 
363
364
365
366
 
394
395
396
 
 
397
398
399
400
 
428
429
430
 
 
 
 
 
 
 
 
 
 
 
 
431
432
433
434
435
436
437
438
439
 
443
444
445
 
 
446
447
448
449
@@ -54,21 +54,21 @@
  /// <param name="disableManualEnrollment">This controls whether or not the student can enroll themselves from the catalog view. Administrators should still be able to enroll a student AND the student should still be able to purchase in the Marketplace if it&#39;s available for enrollment Don&#39;t use this in the model..</param>   /// <param name="creditHours">How many credit hours this syllabus is worth..</param>   /// <param name="apiErrorEntity">apiErrorEntity (required).</param> - public SectionResponse(string sectionNumber = default, string sectionCeus = default, string sectionDuration = default, Guid syllabusId = default, string title = default, string uniqueName = default, DateTime? utcDateCreated = default, DateTime? utcDateLastModified = default, bool? hidden = default, bool? disableCertificatesForStudent = default, bool? allowDrops = default, bool? autoEnrollNewMembers = default, bool? endAfterPeriodFromEnrollmentStart = default, int enrollmentDuration = default, DateTime? enrollmentStart = default, DateTime? enrollmentEnd = default, DateTime? finalDropDate = default, DateTime? trainingStart = default, DateTime trainingEnd = default, bool? disableManualEnrollment = default, decimal? creditHours = default, ApiErrorEntity apiErrorEntity = default) + public SectionResponse(string sectionNumber = default, string sectionCeus = default, string sectionDuration = default, Guid syllabusId = default, string title = default, string uniqueName = default, DateTime utcDateCreated = default, DateTime utcDateLastModified = default, bool hidden = default, bool disableCertificatesForStudent = default, bool allowDrops = default, bool autoEnrollNewMembers = default, bool? endAfterPeriodFromEnrollmentStart = default, int? enrollmentDuration = default, DateTime? enrollmentStart = default, DateTime? enrollmentEnd = default, DateTime? finalDropDate = default, DateTime? trainingStart = default, DateTime trainingEnd = default, bool disableManualEnrollment = default, decimal? creditHours = default, ApiErrorEntity apiErrorEntity = default)   {   // to ensure "sectionNumber" is required (not null) - SectionNumber = sectionNumber ?? throw new ArgumentNullException(nameof(SectionNumber), "sectionNumber is a required property for SectionResponse and cannot be null"); + SectionNumber = sectionNumber ?? throw new ArgumentNullException(nameof(sectionNumber), "sectionNumber is a required property for SectionResponse and cannot be null");     // to ensure "sectionCeus" is required (not null) - SectionCeus = sectionCeus ?? throw new ArgumentNullException(nameof(SectionCeus), "sectionCeus is a required property for SectionResponse and cannot be null"); + SectionCeus = sectionCeus ?? throw new ArgumentNullException(nameof(sectionCeus), "sectionCeus is a required property for SectionResponse and cannot be null");     // to ensure "sectionDuration" is required (not null) - SectionDuration = sectionDuration ?? throw new ArgumentNullException(nameof(SectionDuration), "sectionDuration is a required property for SectionResponse and cannot be null"); + SectionDuration = sectionDuration ?? throw new ArgumentNullException(nameof(sectionDuration), "sectionDuration is a required property for SectionResponse and cannot be null");     SyllabusId = syllabusId;     // to ensure "title" is required (not null) - Title = title ?? throw new ArgumentNullException(nameof(Title), "title is a required property for SectionResponse and cannot be null"); + Title = title ?? throw new ArgumentNullException(nameof(title), "title is a required property for SectionResponse and cannot be null");     EnrollmentDuration = enrollmentDuration;   EnrollmentStart = enrollmentStart; @@ -77,7 +77,7 @@
  TrainingEnd = trainingEnd;     // to ensure "apiErrorEntity" is required (not null) - ApiErrorEntity = apiErrorEntity ?? throw new ArgumentNullException(nameof(ApiErrorEntity), "apiErrorEntity is a required property for SectionResponse and cannot be null"); + ApiErrorEntity = apiErrorEntity ?? throw new ArgumentNullException(nameof(apiErrorEntity), "apiErrorEntity is a required property for SectionResponse and cannot be null");     UniqueName = uniqueName;   UtcDateCreated = utcDateCreated; @@ -139,42 +139,42 @@
  /// </summary>   /// <value>When this syllabus was created</value>   [DataMember(Name = "utc_date_created", EmitDefaultValue = true)] - public DateTime? UtcDateCreated { get; set; } + public DateTime UtcDateCreated { get; set; }     /// <summary>   /// When this syllabus was last modified   /// </summary>   /// <value>When this syllabus was last modified</value>   [DataMember(Name = "utc_date_last_modified", EmitDefaultValue = true)] - public DateTime? UtcDateLastModified { get; set; } + public DateTime UtcDateLastModified { get; set; }     /// <summary>   /// Does the section show up on the enrollment list?   /// </summary>   /// <value>Does the section show up on the enrollment list?</value>   [DataMember(Name = "hidden", EmitDefaultValue = true)] - public bool? Hidden { get; set; } + public bool Hidden { get; set; }     /// <summary>   /// Can the student print their own certificate   /// </summary>   /// <value>Can the student print their own certificate</value>   [DataMember(Name = "disable_certificates_for_student", EmitDefaultValue = true)] - public bool? DisableCertificatesForStudent { get; set; } + public bool DisableCertificatesForStudent { get; set; }     /// <summary>   /// Are students allowed to drop the section on their own?   /// </summary>   /// <value>Are students allowed to drop the section on their own?</value>   [DataMember(Name = "allow_drops", EmitDefaultValue = true)] - public bool? AllowDrops { get; set; } + public bool AllowDrops { get; set; }     /// <summary>   /// Should groups auto-enroll new members into this section?   /// </summary>   /// <value>Should groups auto-enroll new members into this section?</value>   [DataMember(Name = "auto_enroll_new_members", EmitDefaultValue = true)] - public bool? AutoEnrollNewMembers { get; set; } + public bool AutoEnrollNewMembers { get; set; }     /// <summary>   /// Use EnrollmentDuration in calculating course end date @@ -187,8 +187,8 @@
  /// Duration of enrollment from enrollmentDate   /// </summary>   /// <value>Duration of enrollment from enrollmentDate</value> - [DataMember(Name = "enrollment_duration", EmitDefaultValue = false)] - public int EnrollmentDuration { get; set; } + [DataMember(Name = "enrollment_duration", EmitDefaultValue = true)] + public int? EnrollmentDuration { get; set; }     /// <summary>   /// The first day that the student can be enrolled into this section @@ -230,7 +230,7 @@
  /// </summary>   /// <value>This controls whether or not the student can enroll themselves from the catalog view. Administrators should still be able to enroll a student AND the student should still be able to purchase in the Marketplace if it&#39;s available for enrollment Don&#39;t use this in the model.</value>   [DataMember(Name = "disable_manual_enrollment", EmitDefaultValue = true)] - public bool? DisableManualEnrollment { get; set; } + public bool DisableManualEnrollment { get; set; }     /// <summary>   /// How many credit hours this syllabus is worth. @@ -340,33 +340,27 @@
  ) &&   (   UtcDateCreated == input.UtcDateCreated || - (UtcDateCreated != null && - UtcDateCreated.Equals(input.UtcDateCreated)) + (UtcDateCreated.Equals(input.UtcDateCreated))   ) &&   (   UtcDateLastModified == input.UtcDateLastModified || - (UtcDateLastModified != null && - UtcDateLastModified.Equals(input.UtcDateLastModified)) + (UtcDateLastModified.Equals(input.UtcDateLastModified))   ) &&   (   Hidden == input.Hidden || - (Hidden != null && - Hidden.Equals(input.Hidden)) + (Hidden.Equals(input.Hidden))   ) &&   (   DisableCertificatesForStudent == input.DisableCertificatesForStudent || - (DisableCertificatesForStudent != null && - DisableCertificatesForStudent.Equals(input.DisableCertificatesForStudent)) + (DisableCertificatesForStudent.Equals(input.DisableCertificatesForStudent))   ) &&   (   AllowDrops == input.AllowDrops || - (AllowDrops != null && - AllowDrops.Equals(input.AllowDrops)) + (AllowDrops.Equals(input.AllowDrops))   ) &&   (   AutoEnrollNewMembers == input.AutoEnrollNewMembers || - (AutoEnrollNewMembers != null && - AutoEnrollNewMembers.Equals(input.AutoEnrollNewMembers)) + (AutoEnrollNewMembers.Equals(input.AutoEnrollNewMembers))   ) &&   (   EndAfterPeriodFromEnrollmentStart == input.EndAfterPeriodFromEnrollmentStart || @@ -400,8 +394,7 @@
  ) &&   (   DisableManualEnrollment == input.DisableManualEnrollment || - (DisableManualEnrollment != null && - DisableManualEnrollment.Equals(input.DisableManualEnrollment)) + (DisableManualEnrollment.Equals(input.DisableManualEnrollment))   ) &&   (   CreditHours == input.CreditHours || @@ -435,18 +428,12 @@
  hashCode = hashCode * 59 + Title.GetHashCode();   if (UniqueName != null)   hashCode = hashCode * 59 + UniqueName.GetHashCode(); - if (UtcDateCreated != null) - hashCode = hashCode * 59 + UtcDateCreated.GetHashCode(); - if (UtcDateLastModified != null) - hashCode = hashCode * 59 + UtcDateLastModified.GetHashCode(); - if (Hidden != null) - hashCode = hashCode * 59 + Hidden.GetHashCode(); - if (DisableCertificatesForStudent != null) - hashCode = hashCode * 59 + DisableCertificatesForStudent.GetHashCode(); - if (AllowDrops != null) - hashCode = hashCode * 59 + AllowDrops.GetHashCode(); - if (AutoEnrollNewMembers != null) - hashCode = hashCode * 59 + AutoEnrollNewMembers.GetHashCode(); + hashCode = hashCode * 59 + UtcDateCreated.GetHashCode(); + hashCode = hashCode * 59 + UtcDateLastModified.GetHashCode(); + hashCode = hashCode * 59 + Hidden.GetHashCode(); + hashCode = hashCode * 59 + DisableCertificatesForStudent.GetHashCode(); + hashCode = hashCode * 59 + AllowDrops.GetHashCode(); + hashCode = hashCode * 59 + AutoEnrollNewMembers.GetHashCode();   if (EndAfterPeriodFromEnrollmentStart != null)   hashCode = hashCode * 59 + EndAfterPeriodFromEnrollmentStart.GetHashCode();   hashCode = hashCode * 59 + EnrollmentDuration.GetHashCode(); @@ -456,8 +443,7 @@
  if (TrainingStart != null)   hashCode = hashCode * 59 + TrainingStart.GetHashCode();   hashCode = hashCode * 59 + TrainingEnd.GetHashCode(); - if (DisableManualEnrollment != null) - hashCode = hashCode * 59 + DisableManualEnrollment.GetHashCode(); + hashCode = hashCode * 59 + DisableManualEnrollment.GetHashCode();   if (CreditHours != null)   hashCode = hashCode * 59 + CreditHours.GetHashCode();   if (ApiErrorEntity != null)
 
54
55
56
57
 
58
59
60
61
62
 
63
64
65
 
68
69
70
71
 
72
73
74
 
181
182
183
184
185
 
 
186
187
188
 
54
55
56
 
57
58
59
60
61
 
62
63
64
65
 
68
69
70
 
71
72
73
74
 
181
182
183
 
 
184
185
186
187
188
@@ -54,12 +54,12 @@
  /// <param name="disableManualEnrollment">This controls whether or not the student can enroll themselves from the catalog view. Administrators should still be able to enroll a student AND the student should still be able to purchase in the Marketplace if it's available for enrollment Don't use this in the model..</param>   /// <param name="creditHours">How many credit hours this syllabus is worth..</param>   /// <param name="apiErrorEntity">apiErrorEntity (required).</param> - public TrainingPlanResponse(Guid orgId = default, string name = default, Guid rootRequirementId = default, Guid syllabusId = default, string title = default, string uniqueName = default, DateTime utcDateCreated = default, DateTime utcDateLastModified = default, bool hidden = default, bool disableCertificatesForStudent = default, bool allowDrops = default, bool autoEnrollNewMembers = default, bool? endAfterPeriodFromEnrollmentStart = default, int enrollmentDuration = default, DateTime? enrollmentStart = default, DateTime? enrollmentEnd = default, DateTime? finalDropDate = default, DateTime? trainingStart = default, DateTime? trainingEnd = default, bool disableManualEnrollment = default, decimal? creditHours = default, ApiErrorEntity apiErrorEntity = default) + public TrainingPlanResponse(Guid orgId = default, string name = default, Guid rootRequirementId = default, Guid syllabusId = default, string title = default, string uniqueName = default, DateTime utcDateCreated = default, DateTime utcDateLastModified = default, bool hidden = default, bool disableCertificatesForStudent = default, bool allowDrops = default, bool autoEnrollNewMembers = default, bool? endAfterPeriodFromEnrollmentStart = default, int? enrollmentDuration = default, DateTime? enrollmentStart = default, DateTime? enrollmentEnd = default, DateTime? finalDropDate = default, DateTime? trainingStart = default, DateTime? trainingEnd = default, bool disableManualEnrollment = default, decimal? creditHours = default, ApiErrorEntity apiErrorEntity = default)   {   SyllabusId = syllabusId;     // to ensure "title" is required (not null) - Title = title ?? throw new ArgumentNullException(nameof(Title), "title is a required property for TrainingPlanResponse and cannot be null"); + Title = title ?? throw new ArgumentNullException(nameof(title), "title is a required property for TrainingPlanResponse and cannot be null");     EnrollmentDuration = enrollmentDuration;   EnrollmentStart = enrollmentStart; @@ -68,7 +68,7 @@
  TrainingEnd = trainingEnd;     // to ensure "apiErrorEntity" is required (not null) - ApiErrorEntity = apiErrorEntity ?? throw new ArgumentNullException(nameof(ApiErrorEntity), "apiErrorEntity is a required property for TrainingPlanResponse and cannot be null"); + ApiErrorEntity = apiErrorEntity ?? throw new ArgumentNullException(nameof(apiErrorEntity), "apiErrorEntity is a required property for TrainingPlanResponse and cannot be null");     OrgId = orgId;   Name = name; @@ -181,8 +181,8 @@
  /// Duration of enrollment from enrollmentDate   /// </summary>   /// <value>Duration of enrollment from enrollmentDate</value> - [DataMember(Name = "enrollment_duration", EmitDefaultValue = false)] - public int EnrollmentDuration { get; set; } + [DataMember(Name = "enrollment_duration", EmitDefaultValue = true)] + public int? EnrollmentDuration { get; set; }     /// <summary>   /// The first day that the student can be enrolled into this section
 
6
7
8
9
10
11
 
 
 
12
13
14
 
6
7
8
 
 
 
9
10
11
12
13
14
@@ -6,9 +6,9 @@
  <Authors>Nexport Solutions</Authors>   <Company>Darwin Global, LLC</Company>   <GeneratePackageOnBuild>true</GeneratePackageOnBuild> - <AssemblyVersion>1.0.26.0000</AssemblyVersion> - <FileVersion>1.0.26.0000</FileVersion> - <Version>1.0.26</Version> + <AssemblyVersion>1.0.27.0000</AssemblyVersion> + <FileVersion>1.0.27.0000</FileVersion> + <Version>1.0.27</Version>   <PackageTags>nexport, nexport api, nexport sdk</PackageTags>   <Description>Client SDK for integration with Nexport v6.4.6 and newer</Description>   </PropertyGroup>