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

Update new version for the client SDK
- Update NuGet libraries to latest version

- Update APIs to reflect new Nexport API specifications in Nexport 6.4.6

Changeset aab02109d0a1

Parent b4006dcc78eb

by Profile picture of Thai NguyenThai Nguyen

Changes to 94 files · Browse files at aab02109d0a1 Showing diff from parent b4006dcc78eb Diff from another changeset...

Change 1 of 1 Show Entire File NexportApi.sln Stacked
 
1
2
3
4
 
 
5
6
7
 
1
2
 
 
3
4
5
6
7
@@ -1,7 +1,7 @@
   Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 15 -VisualStudioVersion = 15.0.28307.329 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30011.22  MinimumVisualStudioVersion = 10.0.40219.1  Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NexportApi", "NexportApi\NexportApi.csproj", "{0EF49E24-0A45-402B-AF46-C39850E46DF1}"  EndProject
Show Entire File NexportApi/​Api/​AdminApi.cs Stacked
This file's diff was not loaded because this changeset is very large. Load changes
 
471
472
473
474
475
476
477
478
479
480
 
481
482
483
484
485
486
487
488
489
490
 
491
492
493
494
495
496
497
498
499
 
500
501
502
 
552
553
554
555
556
557
558
559
560
561
 
562
563
564
565
566
567
568
569
570
571
 
572
573
574
575
576
577
578
579
580
 
581
582
583
 
635
636
637
638
639
640
641
642
643
644
 
645
646
647
648
649
650
651
652
653
654
 
655
656
657
658
659
660
661
662
663
664
665
 
666
667
668
669
670
671
672
673
674
 
675
676
677
 
729
730
731
732
733
734
735
736
737
738
 
739
740
741
742
743
744
745
746
747
748
 
749
750
751
752
753
754
755
756
757
758
759
 
760
761
762
763
764
765
766
767
768
 
769
770
771
 
821
822
823
824
825
826
827
828
829
830
 
831
832
833
834
835
836
837
838
839
840
 
841
842
843
844
845
846
847
848
849
 
850
851
852
 
902
903
904
905
906
907
908
909
910
911
 
912
913
914
915
916
917
918
919
920
921
 
922
923
924
925
926
927
928
929
930
 
931
932
933
 
989
990
991
992
993
994
995
996
997
998
 
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
 
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
 
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
 
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
 
1042
1043
1044
1045
1046
1047
1048
1049
1050
 
1051
1052
1053
 
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
 
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
 
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
 
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
 
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
 
1162
1163
1164
1165
1166
1167
1168
1169
1170
 
1171
1172
1173
 
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
 
1237
1238
1239
1240
1241
1242
1243
1244
 
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
 
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
 
1266
1267
1268
1269
1270
1271
1272
1273
1274
 
1275
1276
1277
 
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
 
1341
1342
1343
1344
1345
1346
1347
1348
 
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
 
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
 
1370
1371
1372
1373
1374
1375
1376
1377
1378
 
1379
1380
1381
 
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
 
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
 
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
 
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
 
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
 
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
 
1506
1507
1508
1509
1510
1511
1512
1513
1514
 
1515
1516
1517
 
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
 
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
 
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
 
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
 
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
 
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
 
1642
1643
1644
1645
1646
1647
1648
1649
1650
 
1651
1652
1653
 
471
472
473
 
 
 
 
 
 
 
474
475
476
477
 
 
 
 
 
 
 
478
479
480
 
 
 
 
 
 
 
481
482
483
484
 
534
535
536
 
 
 
 
 
 
 
537
538
539
540
 
 
 
 
 
 
 
541
542
543
 
 
 
 
 
 
 
544
545
546
547
 
599
600
601
 
 
 
 
 
 
 
602
603
604
605
 
 
 
 
 
 
 
606
607
608
609
610
 
 
 
 
 
 
 
611
612
613
 
 
 
 
 
 
 
614
615
616
617
 
669
670
671
 
 
 
 
 
 
 
672
673
674
675
 
 
 
 
 
 
 
676
677
678
679
680
 
 
 
 
 
 
 
681
682
683
 
 
 
 
 
 
 
684
685
686
687
 
737
738
739
 
 
 
 
 
 
 
740
741
742
743
 
 
 
 
 
 
 
744
745
746
 
 
 
 
 
 
 
747
748
749
750
 
800
801
802
 
 
 
 
 
 
 
803
804
805
806
 
 
 
 
 
 
 
807
808
809
 
 
 
 
 
 
 
810
811
812
813
 
869
870
871
 
 
 
 
 
 
 
872
873
874
875
 
 
 
 
 
 
 
876
877
878
879
880
 
 
 
 
 
 
 
881
882
883
884
885
 
 
 
 
 
 
 
886
887
888
889
890
 
 
 
 
 
 
 
891
892
893
 
 
 
 
 
 
 
894
895
896
897
 
953
954
955
 
 
 
 
 
 
 
956
957
958
959
 
 
 
 
 
 
 
960
961
962
963
964
 
 
 
 
 
 
 
965
966
967
968
969
 
 
 
 
 
 
 
970
971
972
973
974
 
 
 
 
 
 
 
975
976
977
 
 
 
 
 
 
 
978
979
980
981
 
1035
1036
1037
 
 
 
 
 
 
 
1038
1039
 
 
 
 
 
 
 
1040
1041
1042
1043
 
 
 
 
 
 
 
1044
1045
1046
1047
1048
 
 
 
 
 
 
 
1049
1050
1051
 
 
 
 
 
 
 
1052
1053
1054
1055
 
1109
1110
1111
 
 
 
 
 
 
 
1112
1113
 
 
 
 
 
 
 
1114
1115
1116
1117
 
 
 
 
 
 
 
1118
1119
1120
1121
1122
 
 
 
 
 
 
 
1123
1124
1125
 
 
 
 
 
 
 
1126
1127
1128
1129
 
1189
1190
1191
 
 
 
 
 
 
 
1192
1193
1194
1195
1196
 
 
 
 
 
 
 
1197
1198
1199
1200
1201
 
 
 
 
 
 
 
1202
1203
1204
1205
1206
 
 
 
 
 
 
 
1207
1208
1209
1210
1211
 
 
 
 
 
 
 
1212
1213
1214
1215
1216
 
 
 
 
 
 
 
1217
1218
1219
 
 
 
 
 
 
 
1220
1221
1222
1223
 
1283
1284
1285
 
 
 
 
 
 
 
1286
1287
1288
1289
1290
 
 
 
 
 
 
 
1291
1292
1293
1294
1295
 
 
 
 
 
 
 
1296
1297
1298
1299
1300
 
 
 
 
 
 
 
1301
1302
1303
1304
1305
 
 
 
 
 
 
 
1306
1307
1308
1309
1310
 
 
 
 
 
 
 
1311
1312
1313
 
 
 
 
 
 
 
1314
1315
1316
1317
@@ -471,32 +471,14 @@
  var localVarAccept = ClientUtils.SelectHeaderAccept(accepts);   if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept);   - foreach (var kvp in ClientUtils.ParameterToMultiMap("", "question_id", questionId)) - { - foreach (var kvpValue in kvp.Value) - { - localVarRequestOptions.QueryParameters.Add(kvp.Key, kvpValue); - } - } + localVarRequestOptions.QueryParameters.Add(ClientUtils.ParameterToMultiMap("", "question_id", questionId));     if (enrollmentId != null)   { - foreach (var kvp in ClientUtils.ParameterToMultiMap("", "enrollment_id", enrollmentId)) - { - foreach (var kvpValue in kvp.Value) - { - localVarRequestOptions.QueryParameters.Add(kvp.Key, kvpValue); - } - } + localVarRequestOptions.QueryParameters.Add(ClientUtils.ParameterToMultiMap("", "enrollment_id", enrollmentId));   }   - foreach (var kvp in ClientUtils.ParameterToMultiMap("", "access_token", accessToken)) - { - foreach (var kvpValue in kvp.Value) - { - localVarRequestOptions.QueryParameters.Add(kvp.Key, kvpValue); - } - } + localVarRequestOptions.QueryParameters.Add(ClientUtils.ParameterToMultiMap("", "access_token", accessToken));     // make the HTTP request   var localVarResponse = Client.Get<QuestionResponse>("/api/v1/AssessmentApi/GetQuestion", localVarRequestOptions, Configuration); @@ -552,32 +534,14 @@
  foreach (var accept in accepts)   localVarRequestOptions.HeaderParameters.Add("Accept", accept);   - foreach (var kvp in ClientUtils.ParameterToMultiMap("", "question_id", questionId)) - { - foreach (var kvpValue in kvp.Value) - { - localVarRequestOptions.QueryParameters.Add(kvp.Key, kvpValue); - } - } + localVarRequestOptions.QueryParameters.Add(ClientUtils.ParameterToMultiMap("", "question_id", questionId));     if (enrollmentId != null)   { - foreach (var kvp in ClientUtils.ParameterToMultiMap("", "enrollment_id", enrollmentId)) - { - foreach (var kvpValue in kvp.Value) - { - localVarRequestOptions.QueryParameters.Add(kvp.Key, kvpValue); - } - } + localVarRequestOptions.QueryParameters.Add(ClientUtils.ParameterToMultiMap("", "enrollment_id", enrollmentId));   }   - foreach (var kvp in ClientUtils.ParameterToMultiMap("", "access_token", accessToken)) - { - foreach (var kvpValue in kvp.Value) - { - localVarRequestOptions.QueryParameters.Add(kvp.Key, kvpValue); - } - } + localVarRequestOptions.QueryParameters.Add(ClientUtils.ParameterToMultiMap("", "access_token", accessToken));     // make the HTTP request   var localVarResponse = await AsynchronousClient.GetAsync<QuestionResponse>("/api/v1/AssessmentApi/GetQuestion", localVarRequestOptions, Configuration); @@ -635,43 +599,19 @@
  var localVarAccept = ClientUtils.SelectHeaderAccept(accepts);   if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept);   - foreach (var kvp in ClientUtils.ParameterToMultiMap("", "assignment_id", assignmentId)) - { - foreach (var kvpValue in kvp.Value) - { - localVarRequestOptions.QueryParameters.Add(kvp.Key, kvpValue); - } - } + localVarRequestOptions.QueryParameters.Add(ClientUtils.ParameterToMultiMap("", "assignment_id", assignmentId));     if (page != null)   { - foreach (var kvp in ClientUtils.ParameterToMultiMap("", "page", page)) - { - foreach (var kvpValue in kvp.Value) - { - localVarRequestOptions.QueryParameters.Add(kvp.Key, kvpValue); - } - } + localVarRequestOptions.QueryParameters.Add(ClientUtils.ParameterToMultiMap("", "page", page));   }     if (perPage != null)   { - foreach (var kvp in ClientUtils.ParameterToMultiMap("", "per_page", perPage)) - { - foreach (var kvpValue in kvp.Value) - { - localVarRequestOptions.QueryParameters.Add(kvp.Key, kvpValue); - } - } + localVarRequestOptions.QueryParameters.Add(ClientUtils.ParameterToMultiMap("", "per_page", perPage));   }   - foreach (var kvp in ClientUtils.ParameterToMultiMap("", "access_token", accessToken)) - { - foreach (var kvpValue in kvp.Value) - { - localVarRequestOptions.QueryParameters.Add(kvp.Key, kvpValue); - } - } + localVarRequestOptions.QueryParameters.Add(ClientUtils.ParameterToMultiMap("", "access_token", accessToken));     // make the HTTP request   var localVarResponse = Client.Get<QuestionIdsResponse>("/api/v1/AssessmentApi/GetQuestionIds", localVarRequestOptions, Configuration); @@ -729,43 +669,19 @@
  foreach (var accept in accepts)   localVarRequestOptions.HeaderParameters.Add("Accept", accept);   - foreach (var kvp in ClientUtils.ParameterToMultiMap("", "assignment_id", assignmentId)) - { - foreach (var kvpValue in kvp.Value) - { - localVarRequestOptions.QueryParameters.Add(kvp.Key, kvpValue); - } - } + localVarRequestOptions.QueryParameters.Add(ClientUtils.ParameterToMultiMap("", "assignment_id", assignmentId));     if (page != null)   { - foreach (var kvp in ClientUtils.ParameterToMultiMap("", "page", page)) - { - foreach (var kvpValue in kvp.Value) - { - localVarRequestOptions.QueryParameters.Add(kvp.Key, kvpValue); - } - } + localVarRequestOptions.QueryParameters.Add(ClientUtils.ParameterToMultiMap("", "page", page));   }     if (perPage != null)   { - foreach (var kvp in ClientUtils.ParameterToMultiMap("", "per_page", perPage)) - { - foreach (var kvpValue in kvp.Value) - { - localVarRequestOptions.QueryParameters.Add(kvp.Key, kvpValue); - } - } + localVarRequestOptions.QueryParameters.Add(ClientUtils.ParameterToMultiMap("", "per_page", perPage));   }   - foreach (var kvp in ClientUtils.ParameterToMultiMap("", "access_token", accessToken)) - { - foreach (var kvpValue in kvp.Value) - { - localVarRequestOptions.QueryParameters.Add(kvp.Key, kvpValue); - } - } + localVarRequestOptions.QueryParameters.Add(ClientUtils.ParameterToMultiMap("", "access_token", accessToken));     // make the HTTP request   var localVarResponse = await AsynchronousClient.GetAsync<QuestionIdsResponse>("/api/v1/AssessmentApi/GetQuestionIds", localVarRequestOptions, Configuration); @@ -821,32 +737,14 @@
  var localVarAccept = ClientUtils.SelectHeaderAccept(accepts);   if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept);   - foreach (var kvp in ClientUtils.ParameterToMultiMap("", "question_option_id", questionOptionId)) - { - foreach (var kvpValue in kvp.Value) - { - localVarRequestOptions.QueryParameters.Add(kvp.Key, kvpValue); - } - } + localVarRequestOptions.QueryParameters.Add(ClientUtils.ParameterToMultiMap("", "question_option_id", questionOptionId));     if (enrollmentId != null)   { - foreach (var kvp in ClientUtils.ParameterToMultiMap("", "enrollment_id", enrollmentId)) - { - foreach (var kvpValue in kvp.Value) - { - localVarRequestOptions.QueryParameters.Add(kvp.Key, kvpValue); - } - } + localVarRequestOptions.QueryParameters.Add(ClientUtils.ParameterToMultiMap("", "enrollment_id", enrollmentId));   }   - foreach (var kvp in ClientUtils.ParameterToMultiMap("", "access_token", accessToken)) - { - foreach (var kvpValue in kvp.Value) - { - localVarRequestOptions.QueryParameters.Add(kvp.Key, kvpValue); - } - } + localVarRequestOptions.QueryParameters.Add(ClientUtils.ParameterToMultiMap("", "access_token", accessToken));     // make the HTTP request   var localVarResponse = Client.Get<QuestionOptionResponse>("/api/v1/AssessmentApi/GetQuestionOption", localVarRequestOptions, Configuration); @@ -902,32 +800,14 @@
  foreach (var accept in accepts)   localVarRequestOptions.HeaderParameters.Add("Accept", accept);   - foreach (var kvp in ClientUtils.ParameterToMultiMap("", "question_option_id", questionOptionId)) - { - foreach (var kvpValue in kvp.Value) - { - localVarRequestOptions.QueryParameters.Add(kvp.Key, kvpValue); - } - } + localVarRequestOptions.QueryParameters.Add(ClientUtils.ParameterToMultiMap("", "question_option_id", questionOptionId));     if (enrollmentId != null)   { - foreach (var kvp in ClientUtils.ParameterToMultiMap("", "enrollment_id", enrollmentId)) - { - foreach (var kvpValue in kvp.Value) - { - localVarRequestOptions.QueryParameters.Add(kvp.Key, kvpValue); - } - } + localVarRequestOptions.QueryParameters.Add(ClientUtils.ParameterToMultiMap("", "enrollment_id", enrollmentId));   }   - foreach (var kvp in ClientUtils.ParameterToMultiMap("", "access_token", accessToken)) - { - foreach (var kvpValue in kvp.Value) - { - localVarRequestOptions.QueryParameters.Add(kvp.Key, kvpValue); - } - } + localVarRequestOptions.QueryParameters.Add(ClientUtils.ParameterToMultiMap("", "access_token", accessToken));     // make the HTTP request   var localVarResponse = await AsynchronousClient.GetAsync<QuestionOptionResponse>("/api/v1/AssessmentApi/GetQuestionOption", localVarRequestOptions, Configuration); @@ -989,65 +869,29 @@
  var localVarAccept = ClientUtils.SelectHeaderAccept(accepts);   if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept);   - foreach (var kvp in ClientUtils.ParameterToMultiMap("", "question_id", questionId)) - { - foreach (var kvpValue in kvp.Value) - { - localVarRequestOptions.QueryParameters.Add(kvp.Key, kvpValue); - } - } + localVarRequestOptions.QueryParameters.Add(ClientUtils.ParameterToMultiMap("", "question_id", questionId));     if (utcStartDate != null)   { - foreach (var kvp in ClientUtils.ParameterToMultiMap("", "utc_start_date", utcStartDate)) - { - foreach (var kvpValue in kvp.Value) - { - localVarRequestOptions.QueryParameters.Add(kvp.Key, kvpValue); - } - } + localVarRequestOptions.QueryParameters.Add(ClientUtils.ParameterToMultiMap("", "utc_start_date", utcStartDate));   }     if (utcFinishDate != null)   { - foreach (var kvp in ClientUtils.ParameterToMultiMap("", "utc_finish_date", utcFinishDate)) - { - foreach (var kvpValue in kvp.Value) - { - localVarRequestOptions.QueryParameters.Add(kvp.Key, kvpValue); - } - } + localVarRequestOptions.QueryParameters.Add(ClientUtils.ParameterToMultiMap("", "utc_finish_date", utcFinishDate));   }     if (page != null)   { - foreach (var kvp in ClientUtils.ParameterToMultiMap("", "page", page)) - { - foreach (var kvpValue in kvp.Value) - { - localVarRequestOptions.QueryParameters.Add(kvp.Key, kvpValue); - } - } + localVarRequestOptions.QueryParameters.Add(ClientUtils.ParameterToMultiMap("", "page", page));   }     if (perPage != null)   { - foreach (var kvp in ClientUtils.ParameterToMultiMap("", "per_page", perPage)) - { - foreach (var kvpValue in kvp.Value) - { - localVarRequestOptions.QueryParameters.Add(kvp.Key, kvpValue); - } - } + localVarRequestOptions.QueryParameters.Add(ClientUtils.ParameterToMultiMap("", "per_page", perPage));   }   - foreach (var kvp in ClientUtils.ParameterToMultiMap("", "access_token", accessToken)) - { - foreach (var kvpValue in kvp.Value) - { - localVarRequestOptions.QueryParameters.Add(kvp.Key, kvpValue); - } - } + localVarRequestOptions.QueryParameters.Add(ClientUtils.ParameterToMultiMap("", "access_token", accessToken));     // make the HTTP request   var localVarResponse = Client.Get<StudentResponses>("/api/v1/AssessmentApi/GetStudentResponses", localVarRequestOptions, Configuration); @@ -1109,65 +953,29 @@
  foreach (var accept in accepts)   localVarRequestOptions.HeaderParameters.Add("Accept", accept);   - foreach (var kvp in ClientUtils.ParameterToMultiMap("", "question_id", questionId)) - { - foreach (var kvpValue in kvp.Value) - { - localVarRequestOptions.QueryParameters.Add(kvp.Key, kvpValue); - } - } + localVarRequestOptions.QueryParameters.Add(ClientUtils.ParameterToMultiMap("", "question_id", questionId));     if (utcStartDate != null)   { - foreach (var kvp in ClientUtils.ParameterToMultiMap("", "utc_start_date", utcStartDate)) - { - foreach (var kvpValue in kvp.Value) - { - localVarRequestOptions.QueryParameters.Add(kvp.Key, kvpValue); - } - } + localVarRequestOptions.QueryParameters.Add(ClientUtils.ParameterToMultiMap("", "utc_start_date", utcStartDate));   }     if (utcFinishDate != null)   { - foreach (var kvp in ClientUtils.ParameterToMultiMap("", "utc_finish_date", utcFinishDate)) - { - foreach (var kvpValue in kvp.Value) - { - localVarRequestOptions.QueryParameters.Add(kvp.Key, kvpValue); - } - } + localVarRequestOptions.QueryParameters.Add(ClientUtils.ParameterToMultiMap("", "utc_finish_date", utcFinishDate));   }     if (page != null)   { - foreach (var kvp in ClientUtils.ParameterToMultiMap("", "page", page)) - { - foreach (var kvpValue in kvp.Value) - { - localVarRequestOptions.QueryParameters.Add(kvp.Key, kvpValue); - } - } + localVarRequestOptions.QueryParameters.Add(ClientUtils.ParameterToMultiMap("", "page", page));   }     if (perPage != null)   { - foreach (var kvp in ClientUtils.ParameterToMultiMap("", "per_page", perPage)) - { - foreach (var kvpValue in kvp.Value) - { - localVarRequestOptions.QueryParameters.Add(kvp.Key, kvpValue); - } - } + localVarRequestOptions.QueryParameters.Add(ClientUtils.ParameterToMultiMap("", "per_page", perPage));   }   - foreach (var kvp in ClientUtils.ParameterToMultiMap("", "access_token", accessToken)) - { - foreach (var kvpValue in kvp.Value) - { - localVarRequestOptions.QueryParameters.Add(kvp.Key, kvpValue); - } - } + localVarRequestOptions.QueryParameters.Add(ClientUtils.ParameterToMultiMap("", "access_token", accessToken));     // make the HTTP request   var localVarResponse = await AsynchronousClient.GetAsync<StudentResponses>("/api/v1/AssessmentApi/GetStudentResponses", localVarRequestOptions, Configuration); @@ -1227,51 +1035,21 @@
  var localVarAccept = ClientUtils.SelectHeaderAccept(accepts);   if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept);   - foreach (var kvp in ClientUtils.ParameterToMultiMap("", "enrollment_id", enrollmentId)) - { - foreach (var kvpValue in kvp.Value) - { - localVarRequestOptions.QueryParameters.Add(kvp.Key, kvpValue); - } - } + localVarRequestOptions.QueryParameters.Add(ClientUtils.ParameterToMultiMap("", "enrollment_id", enrollmentId));   - foreach (var kvp in ClientUtils.ParameterToMultiMap("", "assignment_id", assignmentId)) - { - foreach (var kvpValue in kvp.Value) - { - localVarRequestOptions.QueryParameters.Add(kvp.Key, kvpValue); - } - } + localVarRequestOptions.QueryParameters.Add(ClientUtils.ParameterToMultiMap("", "assignment_id", assignmentId));     if (page != null)   { - foreach (var kvp in ClientUtils.ParameterToMultiMap("", "page", page)) - { - foreach (var kvpValue in kvp.Value) - { - localVarRequestOptions.QueryParameters.Add(kvp.Key, kvpValue); - } - } + localVarRequestOptions.QueryParameters.Add(ClientUtils.ParameterToMultiMap("", "page", page));   }     if (perPage != null)   { - foreach (var kvp in ClientUtils.ParameterToMultiMap("", "per_page", perPage)) - { - foreach (var kvpValue in kvp.Value) - { - localVarRequestOptions.QueryParameters.Add(kvp.Key, kvpValue); - } - } + localVarRequestOptions.QueryParameters.Add(ClientUtils.ParameterToMultiMap("", "per_page", perPage));   }   - foreach (var kvp in ClientUtils.ParameterToMultiMap("", "access_token", accessToken)) - { - foreach (var kvpValue in kvp.Value) - { - localVarRequestOptions.QueryParameters.Add(kvp.Key, kvpValue); - } - } + localVarRequestOptions.QueryParameters.Add(ClientUtils.ParameterToMultiMap("", "access_token", accessToken));     // make the HTTP request   var localVarResponse = Client.Get<List<TestAttemptResponseItem>>("/api/v1/AssessmentApi/GetTestAttempts", localVarRequestOptions, Configuration); @@ -1331,51 +1109,21 @@
  foreach (var accept in accepts)   localVarRequestOptions.HeaderParameters.Add("Accept", accept);   - foreach (var kvp in ClientUtils.ParameterToMultiMap("", "enrollment_id", enrollmentId)) - { - foreach (var kvpValue in kvp.Value) - { - localVarRequestOptions.QueryParameters.Add(kvp.Key, kvpValue); - } - } + localVarRequestOptions.QueryParameters.Add(ClientUtils.ParameterToMultiMap("", "enrollment_id", enrollmentId));   - foreach (var kvp in ClientUtils.ParameterToMultiMap("", "assignment_id", assignmentId)) - { - foreach (var kvpValue in kvp.Value) - { - localVarRequestOptions.QueryParameters.Add(kvp.Key, kvpValue); - } - } + localVarRequestOptions.QueryParameters.Add(ClientUtils.ParameterToMultiMap("", "assignment_id", assignmentId));     if (page != null)   { - foreach (var kvp in ClientUtils.ParameterToMultiMap("", "page", page)) - { - foreach (var kvpValue in kvp.Value) - { - localVarRequestOptions.QueryParameters.Add(kvp.Key, kvpValue); - } - } + localVarRequestOptions.QueryParameters.Add(ClientUtils.ParameterToMultiMap("", "page", page));   }     if (perPage != null)   { - foreach (var kvp in ClientUtils.ParameterToMultiMap("", "per_page", perPage)) - { - foreach (var kvpValue in kvp.Value) - { - localVarRequestOptions.QueryParameters.Add(kvp.Key, kvpValue); - } - } + localVarRequestOptions.QueryParameters.Add(ClientUtils.ParameterToMultiMap("", "per_page", perPage));   }   - foreach (var kvp in ClientUtils.ParameterToMultiMap("", "access_token", accessToken)) - { - foreach (var kvpValue in kvp.Value) - { - localVarRequestOptions.QueryParameters.Add(kvp.Key, kvpValue); - } - } + localVarRequestOptions.QueryParameters.Add(ClientUtils.ParameterToMultiMap("", "access_token", accessToken));     // make the HTTP request   var localVarResponse = await AsynchronousClient.GetAsync<List<TestAttemptResponseItem>>("/api/v1/AssessmentApi/GetTestAttempts", localVarRequestOptions, Configuration); @@ -1441,77 +1189,35 @@
    if (testAttemptId != null)   { - foreach (var kvp in ClientUtils.ParameterToMultiMap("", "test_attempt_id", testAttemptId)) - { - foreach (var kvpValue in kvp.Value) - { - localVarRequestOptions.QueryParameters.Add(kvp.Key, kvpValue); - } - } + localVarRequestOptions.QueryParameters.Add(ClientUtils.ParameterToMultiMap("", "test_attempt_id", testAttemptId));   }     if (assignmentStatusId != null)   { - foreach (var kvp in ClientUtils.ParameterToMultiMap("", "assignment_status_id", assignmentStatusId)) - { - foreach (var kvpValue in kvp.Value) - { - localVarRequestOptions.QueryParameters.Add(kvp.Key, kvpValue); - } - } + localVarRequestOptions.QueryParameters.Add(ClientUtils.ParameterToMultiMap("", "assignment_status_id", assignmentStatusId));   }     if (assignmentId != null)   { - foreach (var kvp in ClientUtils.ParameterToMultiMap("", "assignment_id", assignmentId)) - { - foreach (var kvpValue in kvp.Value) - { - localVarRequestOptions.QueryParameters.Add(kvp.Key, kvpValue); - } - } + localVarRequestOptions.QueryParameters.Add(ClientUtils.ParameterToMultiMap("", "assignment_id", assignmentId));   }     if (enrollmentId != null)   { - foreach (var kvp in ClientUtils.ParameterToMultiMap("", "enrollment_id", enrollmentId)) - { - foreach (var kvpValue in kvp.Value) - { - localVarRequestOptions.QueryParameters.Add(kvp.Key, kvpValue); - } - } + localVarRequestOptions.QueryParameters.Add(ClientUtils.ParameterToMultiMap("", "enrollment_id", enrollmentId));   }     if (page != null)   { - foreach (var kvp in ClientUtils.ParameterToMultiMap("", "page", page)) - { - foreach (var kvpValue in kvp.Value) - { - localVarRequestOptions.QueryParameters.Add(kvp.Key, kvpValue); - } - } + localVarRequestOptions.QueryParameters.Add(ClientUtils.ParameterToMultiMap("", "page", page));   }     if (perPage != null)   { - foreach (var kvp in ClientUtils.ParameterToMultiMap("", "per_page", perPage)) - { - foreach (var kvpValue in kvp.Value) - { - localVarRequestOptions.QueryParameters.Add(kvp.Key, kvpValue); - } - } + localVarRequestOptions.QueryParameters.Add(ClientUtils.ParameterToMultiMap("", "per_page", perPage));   }   - foreach (var kvp in ClientUtils.ParameterToMultiMap("", "access_token", accessToken)) - { - foreach (var kvpValue in kvp.Value) - { - localVarRequestOptions.QueryParameters.Add(kvp.Key, kvpValue); - } - } + localVarRequestOptions.QueryParameters.Add(ClientUtils.ParameterToMultiMap("", "access_token", accessToken));     // make the HTTP request   var localVarResponse = Client.Get<TestSurveyResultsResponse>("/api/v1/AssessmentApi/GetTestSurveyResults", localVarRequestOptions, Configuration); @@ -1577,77 +1283,35 @@
    if (testAttemptId != null)   { - foreach (var kvp in ClientUtils.ParameterToMultiMap("", "test_attempt_id", testAttemptId)) - { - foreach (var kvpValue in kvp.Value) - { - localVarRequestOptions.QueryParameters.Add(kvp.Key, kvpValue); - } - } + localVarRequestOptions.QueryParameters.Add(ClientUtils.ParameterToMultiMap("", "test_attempt_id", testAttemptId));   }     if (assignmentStatusId != null)   { - foreach (var kvp in ClientUtils.ParameterToMultiMap("", "assignment_status_id", assignmentStatusId)) - { - foreach (var kvpValue in kvp.Value) - { - localVarRequestOptions.QueryParameters.Add(kvp.Key, kvpValue); - } - } + localVarRequestOptions.QueryParameters.Add(ClientUtils.ParameterToMultiMap("", "assignment_status_id", assignmentStatusId));   }     if (assignmentId != null)   { - foreach (var kvp in ClientUtils.ParameterToMultiMap("", "assignment_id", assignmentId)) - { - foreach (var kvpValue in kvp.Value) - { - localVarRequestOptions.QueryParameters.Add(kvp.Key, kvpValue); - } - } + localVarRequestOptions.QueryParameters.Add(ClientUtils.ParameterToMultiMap("", "assignment_id", assignmentId));   }     if (enrollmentId != null)   { - foreach (var kvp in ClientUtils.ParameterToMultiMap("", "enrollment_id", enrollmentId)) - { - foreach (var kvpValue in kvp.Value) - { - localVarRequestOptions.QueryParameters.Add(kvp.Key, kvpValue); - } - } + localVarRequestOptions.QueryParameters.Add(ClientUtils.ParameterToMultiMap("", "enrollment_id", enrollmentId));   }     if (page != null)   { - foreach (var kvp in ClientUtils.ParameterToMultiMap("", "page", page)) - { - foreach (var kvpValue in kvp.Value) - { - localVarRequestOptions.QueryParameters.Add(kvp.Key, kvpValue); - } - } + localVarRequestOptions.QueryParameters.Add(ClientUtils.ParameterToMultiMap("", "page", page));   }     if (perPage != null)   { - foreach (var kvp in ClientUtils.ParameterToMultiMap("", "per_page", perPage)) - { - foreach (var kvpValue in kvp.Value) - { - localVarRequestOptions.QueryParameters.Add(kvp.Key, kvpValue); - } - } + localVarRequestOptions.QueryParameters.Add(ClientUtils.ParameterToMultiMap("", "per_page", perPage));   }   - foreach (var kvp in ClientUtils.ParameterToMultiMap("", "access_token", accessToken)) - { - foreach (var kvpValue in kvp.Value) - { - localVarRequestOptions.QueryParameters.Add(kvp.Key, kvpValue); - } - } + localVarRequestOptions.QueryParameters.Add(ClientUtils.ParameterToMultiMap("", "access_token", accessToken));     // make the HTTP request   var localVarResponse = await AsynchronousClient.GetAsync<TestSurveyResultsResponse>("/api/v1/AssessmentApi/GetTestSurveyResults", localVarRequestOptions, Configuration);
Show Entire File NexportApi/​Api/​LearningApi.cs Stacked
This file's diff was not loaded because this changeset is very large. Load changes
 
482
483
484
485
486
487
488
489
490
491
 
492
493
494
 
550
551
552
553
554
555
556
557
558
559
 
560
561
562
 
618
619
620
621
622
623
624
625
626
627
 
628
629
630
 
686
687
688
689
690
691
692
693
694
695
 
696
697
698
 
754
755
756
757
758
759
760
761
762
763
 
764
765
766
 
822
823
824
825
826
827
828
829
830
831
 
832
833
834
 
890
891
892
893
894
895
896
897
898
899
 
900
901
902
 
958
959
960
961
962
963
964
965
966
967
 
968
969
970
 
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
 
1036
1037
1038
 
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
 
1104
1105
1106
 
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
 
1166
1167
1168
1169
1170
1171
1172
1173
 
1174
1175
1176
 
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
 
1234
1235
1236
1237
1238
1239
1240
1241
 
1242
1243
1244
 
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
 
1302
1303
1304
1305
1306
1307
1308
1309
 
1310
1311
1312
 
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
 
1370
1371
1372
1373
1374
1375
1376
1377
 
1378
1379
1380
 
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
 
1444
1445
1446
 
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
 
1512
1513
1514
 
482
483
484
 
 
 
 
 
 
 
485
486
487
488
 
544
545
546
 
 
 
 
 
 
 
547
548
549
550
 
606
607
608
 
 
 
 
 
 
 
609
610
611
612
 
668
669
670
 
 
 
 
 
 
 
671
672
673
674
 
730
731
732
 
 
 
 
 
 
 
733
734
735
736
 
792
793
794
 
 
 
 
 
 
 
795
796
797
798
 
854
855
856
 
 
 
 
 
 
 
857
858
859
860
 
916
917
918
 
 
 
 
 
 
 
919
920
921
922
 
978
979
980
 
 
 
 
 
 
 
981
982
983
984
 
1040
1041
1042
 
 
 
 
 
 
 
1043
1044
1045
1046
 
1096
1097
1098
 
 
 
 
 
 
 
1099
1100
 
 
 
 
 
 
 
1101
1102
1103
1104
 
1152
1153
1154
 
 
 
 
 
 
 
1155
1156
 
 
 
 
 
 
 
1157
1158
1159
1160
 
1208
1209
1210
 
 
 
 
 
 
 
1211
1212
 
 
 
 
 
 
 
1213
1214
1215
1216
 
1264
1265
1266
 
 
 
 
 
 
 
1267
1268
 
 
 
 
 
 
 
1269
1270
1271
1272
 
1326
1327
1328
 
 
 
 
 
 
 
1329
1330
1331
1332
 
1388
1389
1390
 
 
 
 
 
 
 
1391
1392
1393
1394
@@ -482,13 +482,7 @@
  var localVarAccept = ClientUtils.SelectHeaderAccept(accepts);   if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept);   - foreach (var kvp in ClientUtils.ParameterToMultiMap("", "access_token", accessToken)) - { - foreach (var kvpValue in kvp.Value) - { - localVarRequestOptions.QueryParameters.Add(kvp.Key, kvpValue); - } - } + localVarRequestOptions.QueryParameters.Add(ClientUtils.ParameterToMultiMap("", "access_token", accessToken));     localVarRequestOptions.Data = request;   @@ -550,13 +544,7 @@
  foreach (var accept in accepts)   localVarRequestOptions.HeaderParameters.Add("Accept", accept);   - foreach (var kvp in ClientUtils.ParameterToMultiMap("", "access_token", accessToken)) - { - foreach (var kvpValue in kvp.Value) - { - localVarRequestOptions.QueryParameters.Add(kvp.Key, kvpValue); - } - } + localVarRequestOptions.QueryParameters.Add(ClientUtils.ParameterToMultiMap("", "access_token", accessToken));     localVarRequestOptions.Data = request;   @@ -618,13 +606,7 @@
  var localVarAccept = ClientUtils.SelectHeaderAccept(accepts);   if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept);   - foreach (var kvp in ClientUtils.ParameterToMultiMap("", "access_token", accessToken)) - { - foreach (var kvpValue in kvp.Value) - { - localVarRequestOptions.QueryParameters.Add(kvp.Key, kvpValue); - } - } + localVarRequestOptions.QueryParameters.Add(ClientUtils.ParameterToMultiMap("", "access_token", accessToken));     localVarRequestOptions.Data = request;   @@ -686,13 +668,7 @@
  foreach (var accept in accepts)   localVarRequestOptions.HeaderParameters.Add("Accept", accept);   - foreach (var kvp in ClientUtils.ParameterToMultiMap("", "access_token", accessToken)) - { - foreach (var kvpValue in kvp.Value) - { - localVarRequestOptions.QueryParameters.Add(kvp.Key, kvpValue); - } - } + localVarRequestOptions.QueryParameters.Add(ClientUtils.ParameterToMultiMap("", "access_token", accessToken));     localVarRequestOptions.Data = request;   @@ -754,13 +730,7 @@
  var localVarAccept = ClientUtils.SelectHeaderAccept(accepts);   if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept);   - foreach (var kvp in ClientUtils.ParameterToMultiMap("", "access_token", accessToken)) - { - foreach (var kvpValue in kvp.Value) - { - localVarRequestOptions.QueryParameters.Add(kvp.Key, kvpValue); - } - } + localVarRequestOptions.QueryParameters.Add(ClientUtils.ParameterToMultiMap("", "access_token", accessToken));     localVarRequestOptions.Data = request;   @@ -822,13 +792,7 @@
  foreach (var accept in accepts)   localVarRequestOptions.HeaderParameters.Add("Accept", accept);   - foreach (var kvp in ClientUtils.ParameterToMultiMap("", "access_token", accessToken)) - { - foreach (var kvpValue in kvp.Value) - { - localVarRequestOptions.QueryParameters.Add(kvp.Key, kvpValue); - } - } + localVarRequestOptions.QueryParameters.Add(ClientUtils.ParameterToMultiMap("", "access_token", accessToken));     localVarRequestOptions.Data = request;   @@ -890,13 +854,7 @@
  var localVarAccept = ClientUtils.SelectHeaderAccept(accepts);   if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept);   - foreach (var kvp in ClientUtils.ParameterToMultiMap("", "access_token", accessToken)) - { - foreach (var kvpValue in kvp.Value) - { - localVarRequestOptions.QueryParameters.Add(kvp.Key, kvpValue); - } - } + localVarRequestOptions.QueryParameters.Add(ClientUtils.ParameterToMultiMap("", "access_token", accessToken));     localVarRequestOptions.Data = request;   @@ -958,13 +916,7 @@
  foreach (var accept in accepts)   localVarRequestOptions.HeaderParameters.Add("Accept", accept);   - foreach (var kvp in ClientUtils.ParameterToMultiMap("", "access_token", accessToken)) - { - foreach (var kvpValue in kvp.Value) - { - localVarRequestOptions.QueryParameters.Add(kvp.Key, kvpValue); - } - } + localVarRequestOptions.QueryParameters.Add(ClientUtils.ParameterToMultiMap("", "access_token", accessToken));     localVarRequestOptions.Data = request;   @@ -1026,13 +978,7 @@
  var localVarAccept = ClientUtils.SelectHeaderAccept(accepts);   if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept);   - foreach (var kvp in ClientUtils.ParameterToMultiMap("", "access_token", accessToken)) - { - foreach (var kvpValue in kvp.Value) - { - localVarRequestOptions.QueryParameters.Add(kvp.Key, kvpValue); - } - } + localVarRequestOptions.QueryParameters.Add(ClientUtils.ParameterToMultiMap("", "access_token", accessToken));     localVarRequestOptions.Data = request;   @@ -1094,13 +1040,7 @@
  foreach (var accept in accepts)   localVarRequestOptions.HeaderParameters.Add("Accept", accept);   - foreach (var kvp in ClientUtils.ParameterToMultiMap("", "access_token", accessToken)) - { - foreach (var kvpValue in kvp.Value) - { - localVarRequestOptions.QueryParameters.Add(kvp.Key, kvpValue); - } - } + localVarRequestOptions.QueryParameters.Add(ClientUtils.ParameterToMultiMap("", "access_token", accessToken));     localVarRequestOptions.Data = request;   @@ -1156,21 +1096,9 @@
  var localVarAccept = ClientUtils.SelectHeaderAccept(accepts);   if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept);   - foreach (var kvp in ClientUtils.ParameterToMultiMap("", "invoice_id", invoiceId)) - { - foreach (var kvpValue in kvp.Value) - { - localVarRequestOptions.QueryParameters.Add(kvp.Key, kvpValue); - } - } + localVarRequestOptions.QueryParameters.Add(ClientUtils.ParameterToMultiMap("", "invoice_id", invoiceId));   - foreach (var kvp in ClientUtils.ParameterToMultiMap("", "access_token", accessToken)) - { - foreach (var kvpValue in kvp.Value) - { - localVarRequestOptions.QueryParameters.Add(kvp.Key, kvpValue); - } - } + localVarRequestOptions.QueryParameters.Add(ClientUtils.ParameterToMultiMap("", "access_token", accessToken));     // make the HTTP request   var localVarResponse = Client.Post<GetInvoiceResponse>("/api/v1/PointOfSaleApi/GetInvoice", localVarRequestOptions, Configuration); @@ -1224,21 +1152,9 @@
  foreach (var accept in accepts)   localVarRequestOptions.HeaderParameters.Add("Accept", accept);   - foreach (var kvp in ClientUtils.ParameterToMultiMap("", "invoice_id", invoiceId)) - { - foreach (var kvpValue in kvp.Value) - { - localVarRequestOptions.QueryParameters.Add(kvp.Key, kvpValue); - } - } + localVarRequestOptions.QueryParameters.Add(ClientUtils.ParameterToMultiMap("", "invoice_id", invoiceId));   - foreach (var kvp in ClientUtils.ParameterToMultiMap("", "access_token", accessToken)) - { - foreach (var kvpValue in kvp.Value) - { - localVarRequestOptions.QueryParameters.Add(kvp.Key, kvpValue); - } - } + localVarRequestOptions.QueryParameters.Add(ClientUtils.ParameterToMultiMap("", "access_token", accessToken));     // make the HTTP request   var localVarResponse = await AsynchronousClient.PostAsync<GetInvoiceResponse>("/api/v1/PointOfSaleApi/GetInvoice", localVarRequestOptions, Configuration); @@ -1292,21 +1208,9 @@
  var localVarAccept = ClientUtils.SelectHeaderAccept(accepts);   if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept);   - foreach (var kvp in ClientUtils.ParameterToMultiMap("", "invoice_item_id", invoiceItemId)) - { - foreach (var kvpValue in kvp.Value) - { - localVarRequestOptions.QueryParameters.Add(kvp.Key, kvpValue); - } - } + localVarRequestOptions.QueryParameters.Add(ClientUtils.ParameterToMultiMap("", "invoice_item_id", invoiceItemId));   - foreach (var kvp in ClientUtils.ParameterToMultiMap("", "access_token", accessToken)) - { - foreach (var kvpValue in kvp.Value) - { - localVarRequestOptions.QueryParameters.Add(kvp.Key, kvpValue); - } - } + localVarRequestOptions.QueryParameters.Add(ClientUtils.ParameterToMultiMap("", "access_token", accessToken));     // make the HTTP request   var localVarResponse = Client.Get<InvoiceRedemptionResponse>("/api/v1/PointOfSaleApi/GetInvoiceRedemption", localVarRequestOptions, Configuration); @@ -1360,21 +1264,9 @@
  foreach (var accept in accepts)   localVarRequestOptions.HeaderParameters.Add("Accept", accept);   - foreach (var kvp in ClientUtils.ParameterToMultiMap("", "invoice_item_id", invoiceItemId)) - { - foreach (var kvpValue in kvp.Value) - { - localVarRequestOptions.QueryParameters.Add(kvp.Key, kvpValue); - } - } + localVarRequestOptions.QueryParameters.Add(ClientUtils.ParameterToMultiMap("", "invoice_item_id", invoiceItemId));   - foreach (var kvp in ClientUtils.ParameterToMultiMap("", "access_token", accessToken)) - { - foreach (var kvpValue in kvp.Value) - { - localVarRequestOptions.QueryParameters.Add(kvp.Key, kvpValue); - } - } + localVarRequestOptions.QueryParameters.Add(ClientUtils.ParameterToMultiMap("", "access_token", accessToken));     // make the HTTP request   var localVarResponse = await AsynchronousClient.GetAsync<InvoiceRedemptionResponse>("/api/v1/PointOfSaleApi/GetInvoiceRedemption", localVarRequestOptions, Configuration); @@ -1434,13 +1326,7 @@
  var localVarAccept = ClientUtils.SelectHeaderAccept(accepts);   if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept);   - foreach (var kvp in ClientUtils.ParameterToMultiMap("", "access_token", accessToken)) - { - foreach (var kvpValue in kvp.Value) - { - localVarRequestOptions.QueryParameters.Add(kvp.Key, kvpValue); - } - } + localVarRequestOptions.QueryParameters.Add(ClientUtils.ParameterToMultiMap("", "access_token", accessToken));     localVarRequestOptions.Data = request;   @@ -1502,13 +1388,7 @@
  foreach (var accept in accepts)   localVarRequestOptions.HeaderParameters.Add("Accept", accept);   - foreach (var kvp in ClientUtils.ParameterToMultiMap("", "access_token", accessToken)) - { - foreach (var kvpValue in kvp.Value) - { - localVarRequestOptions.QueryParameters.Add(kvp.Key, kvpValue); - } - } + localVarRequestOptions.QueryParameters.Add(ClientUtils.ParameterToMultiMap("", "access_token", accessToken));     localVarRequestOptions.Data = request;  
 
220
221
222
223
224
225
226
 
265
266
267
268
269
270
271
 
220
221
222
 
223
224
225
 
264
265
266
 
267
268
269
@@ -220,7 +220,6 @@
  var localVarAccept = ClientUtils.SelectHeaderAccept(accepts);   if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept);   -   // make the HTTP request   var localVarResponse = Client.Get<PostmanCollectionGet>("/api/v1/PostmanApi/GetPostmanCollection", localVarRequestOptions, Configuration);   @@ -265,7 +264,6 @@
  foreach (var accept in accepts)   localVarRequestOptions.HeaderParameters.Add("Accept", accept);   -   // make the HTTP request   var localVarResponse = await AsynchronousClient.GetAsync<PostmanCollectionGet>("/api/v1/PostmanApi/GetPostmanCollection", localVarRequestOptions, Configuration);  
 
275
276
277
278
279
280
281
282
283
284
 
285
286
287
 
343
344
345
346
347
348
349
350
351
352
 
353
354
355
 
417
418
419
420
421
422
423
424
425
426
 
427
428
429
430
431
432
433
434
435
436
437
 
438
439
440
441
442
443
444
445
446
 
447
448
449
 
511
512
513
514
515
516
517
518
519
520
 
521
522
523
524
525
526
527
528
529
530
531
 
532
533
534
535
536
537
538
539
540
 
541
542
543
 
275
276
277
 
 
 
 
 
 
 
278
279
280
281
 
337
338
339
 
 
 
 
 
 
 
340
341
342
343
 
405
406
407
 
 
 
 
 
 
 
408
409
410
411
412
 
 
 
 
 
 
 
413
414
415
 
 
 
 
 
 
 
416
417
418
419
 
481
482
483
 
 
 
 
 
 
 
484
485
486
487
488
 
 
 
 
 
 
 
489
490
491
 
 
 
 
 
 
 
492
493
494
495
@@ -275,13 +275,7 @@
  var localVarAccept = ClientUtils.SelectHeaderAccept(accepts);   if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept);   - foreach (var kvp in ClientUtils.ParameterToMultiMap("", "access_token", accessToken)) - { - foreach (var kvpValue in kvp.Value) - { - localVarRequestOptions.QueryParameters.Add(kvp.Key, kvpValue); - } - } + localVarRequestOptions.QueryParameters.Add(ClientUtils.ParameterToMultiMap("", "access_token", accessToken));     localVarRequestOptions.Data = request;   @@ -343,13 +337,7 @@
  foreach (var accept in accepts)   localVarRequestOptions.HeaderParameters.Add("Accept", accept);   - foreach (var kvp in ClientUtils.ParameterToMultiMap("", "access_token", accessToken)) - { - foreach (var kvpValue in kvp.Value) - { - localVarRequestOptions.QueryParameters.Add(kvp.Key, kvpValue); - } - } + localVarRequestOptions.QueryParameters.Add(ClientUtils.ParameterToMultiMap("", "access_token", accessToken));     localVarRequestOptions.Data = request;   @@ -417,33 +405,15 @@
    if (page != null)   { - foreach (var kvp in ClientUtils.ParameterToMultiMap("", "page", page)) - { - foreach (var kvpValue in kvp.Value) - { - localVarRequestOptions.QueryParameters.Add(kvp.Key, kvpValue); - } - } + localVarRequestOptions.QueryParameters.Add(ClientUtils.ParameterToMultiMap("", "page", page));   }     if (perPage != null)   { - foreach (var kvp in ClientUtils.ParameterToMultiMap("", "per_page", perPage)) - { - foreach (var kvpValue in kvp.Value) - { - localVarRequestOptions.QueryParameters.Add(kvp.Key, kvpValue); - } - } + localVarRequestOptions.QueryParameters.Add(ClientUtils.ParameterToMultiMap("", "per_page", perPage));   }   - foreach (var kvp in ClientUtils.ParameterToMultiMap("", "access_token", accessToken)) - { - foreach (var kvpValue in kvp.Value) - { - localVarRequestOptions.QueryParameters.Add(kvp.Key, kvpValue); - } - } + localVarRequestOptions.QueryParameters.Add(ClientUtils.ParameterToMultiMap("", "access_token", accessToken));     localVarRequestOptions.Data = request;   @@ -511,33 +481,15 @@
    if (page != null)   { - foreach (var kvp in ClientUtils.ParameterToMultiMap("", "page", page)) - { - foreach (var kvpValue in kvp.Value) - { - localVarRequestOptions.QueryParameters.Add(kvp.Key, kvpValue); - } - } + localVarRequestOptions.QueryParameters.Add(ClientUtils.ParameterToMultiMap("", "page", page));   }     if (perPage != null)   { - foreach (var kvp in ClientUtils.ParameterToMultiMap("", "per_page", perPage)) - { - foreach (var kvpValue in kvp.Value) - { - localVarRequestOptions.QueryParameters.Add(kvp.Key, kvpValue); - } - } + localVarRequestOptions.QueryParameters.Add(ClientUtils.ParameterToMultiMap("", "per_page", perPage));   }   - foreach (var kvp in ClientUtils.ParameterToMultiMap("", "access_token", accessToken)) - { - foreach (var kvpValue in kvp.Value) - { - localVarRequestOptions.QueryParameters.Add(kvp.Key, kvpValue); - } - } + localVarRequestOptions.QueryParameters.Add(ClientUtils.ParameterToMultiMap("", "access_token", accessToken));     localVarRequestOptions.Data = request;  
 
218
219
220
221
 
222
223
224
 
231
232
233
234
 
235
236
237
 
266
267
268
269
270
271
272
273
274
275
 
276
277
278
 
286
287
288
289
 
290
291
292
 
299
300
301
302
 
303
304
305
 
334
335
336
337
338
339
340
341
342
343
 
344
345
346
 
354
355
356
357
 
358
359
360
 
367
368
369
370
 
371
372
373
 
402
403
404
405
406
407
408
409
410
411
 
412
413
414
 
422
423
424
425
 
426
427
428
 
435
436
437
438
 
439
440
441
 
470
471
472
473
474
475
476
477
478
479
 
480
481
482
 
218
219
220
 
221
222
223
224
 
231
232
233
 
234
235
236
237
 
266
267
268
 
 
 
 
 
 
 
269
270
271
272
 
280
281
282
 
283
284
285
286
 
293
294
295
 
296
297
298
299
 
328
329
330
 
 
 
 
 
 
 
331
332
333
334
 
342
343
344
 
345
346
347
348
 
355
356
357
 
358
359
360
361
 
390
391
392
 
 
 
 
 
 
 
393
394
395
396
 
404
405
406
 
407
408
409
410
 
417
418
419
 
420
421
422
423
 
452
453
454
 
 
 
 
 
 
 
455
456
457
458
@@ -218,7 +218,7 @@
  }     /// <summary> - /// Retrieves url of classroom student view for a particular enrollment. Can also create a redirect entity to attach to the subscription of the enrollment which will cause the subscribed user to be redirected upon logging out, using an expired token, or using an invalid token (if those urls are set). Requires the Use SSO API permission in the enrollment subscription organization or an ancestor. + /// Retrieves url of classroom student view for a particular enrollment. Can also create a redirect entity to attach to the subscription of the enrollment which will cause the subscribed user to be redirected upon logging out, using an expired token, or using an invalid token (if those urls are set). Requires the Use SSO API permission in the enrollment subscription organization or an ancestor.   /// </summary>   /// <exception cref="ApiException">Thrown when fails to make API call</exception>   /// <param name="accessToken">Use the AdminApi Authenticate method to get the access_token</param> @@ -231,7 +231,7 @@
  }     /// <summary> - /// Retrieves url of classroom student view for a particular enrollment. Can also create a redirect entity to attach to the subscription of the enrollment which will cause the subscribed user to be redirected upon logging out, using an expired token, or using an invalid token (if those urls are set). Requires the Use SSO API permission in the enrollment subscription organization or an ancestor. + /// Retrieves url of classroom student view for a particular enrollment. Can also create a redirect entity to attach to the subscription of the enrollment which will cause the subscribed user to be redirected upon logging out, using an expired token, or using an invalid token (if those urls are set). Requires the Use SSO API permission in the enrollment subscription organization or an ancestor.   /// </summary>   /// <exception cref="ApiException">Thrown when fails to make API call</exception>   /// <param name="accessToken">Use the AdminApi Authenticate method to get the access_token</param> @@ -266,13 +266,7 @@
  var localVarAccept = ClientUtils.SelectHeaderAccept(accepts);   if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept);   - foreach (var kvp in ClientUtils.ParameterToMultiMap("", "access_token", accessToken)) - { - foreach (var kvpValue in kvp.Value) - { - localVarRequestOptions.QueryParameters.Add(kvp.Key, kvpValue); - } - } + localVarRequestOptions.QueryParameters.Add(ClientUtils.ParameterToMultiMap("", "access_token", accessToken));     localVarRequestOptions.Data = classroomSsoRequest;   @@ -286,7 +280,7 @@
  }     /// <summary> - /// Retrieves url of classroom student view for a particular enrollment. Can also create a redirect entity to attach to the subscription of the enrollment which will cause the subscribed user to be redirected upon logging out, using an expired token, or using an invalid token (if those urls are set). Requires the Use SSO API permission in the enrollment subscription organization or an ancestor. + /// Retrieves url of classroom student view for a particular enrollment. Can also create a redirect entity to attach to the subscription of the enrollment which will cause the subscribed user to be redirected upon logging out, using an expired token, or using an invalid token (if those urls are set). Requires the Use SSO API permission in the enrollment subscription organization or an ancestor.   /// </summary>   /// <exception cref="ApiException">Thrown when fails to make API call</exception>   /// <param name="accessToken">Use the AdminApi Authenticate method to get the access_token</param> @@ -299,7 +293,7 @@
  }     /// <summary> - /// Retrieves url of classroom student view for a particular enrollment. Can also create a redirect entity to attach to the subscription of the enrollment which will cause the subscribed user to be redirected upon logging out, using an expired token, or using an invalid token (if those urls are set). Requires the Use SSO API permission in the enrollment subscription organization or an ancestor. + /// Retrieves url of classroom student view for a particular enrollment. Can also create a redirect entity to attach to the subscription of the enrollment which will cause the subscribed user to be redirected upon logging out, using an expired token, or using an invalid token (if those urls are set). Requires the Use SSO API permission in the enrollment subscription organization or an ancestor.   /// </summary>   /// <exception cref="ApiException">Thrown when fails to make API call</exception>   /// <param name="accessToken">Use the AdminApi Authenticate method to get the access_token</param> @@ -334,13 +328,7 @@
  foreach (var accept in accepts)   localVarRequestOptions.HeaderParameters.Add("Accept", accept);   - foreach (var kvp in ClientUtils.ParameterToMultiMap("", "access_token", accessToken)) - { - foreach (var kvpValue in kvp.Value) - { - localVarRequestOptions.QueryParameters.Add(kvp.Key, kvpValue); - } - } + localVarRequestOptions.QueryParameters.Add(ClientUtils.ParameterToMultiMap("", "access_token", accessToken));     localVarRequestOptions.Data = classroomSsoRequest;   @@ -354,7 +342,7 @@
  }     /// <summary> - /// Automatically log users into Nexport with out requiring their login credentials. Can also create a redirect entity to attach to the subscription of the user in the organization which will cause them to be redirected upon logging out, using an expired token, or using an invalid token (if those urls are set). Can use either user_id and org_id OR just subscription_id. Requires the Use SSO API permission in the subscription organization or an ancestor. + /// Automatically log users into Nexport with out requiring their login credentials. Can also create a redirect entity to attach to the subscription of the user in the organization which will cause them to be redirected upon logging out, using an expired token, or using an invalid token (if those urls are set). Can use either user_id and org_id OR just subscription_id. Requires the Use SSO API permission in the subscription organization or an ancestor.   /// </summary>   /// <exception cref="ApiException">Thrown when fails to make API call</exception>   /// <param name="accessToken">Use the AdminApi Authenticate method to get the access_token</param> @@ -367,7 +355,7 @@
  }     /// <summary> - /// Automatically log users into Nexport with out requiring their login credentials. Can also create a redirect entity to attach to the subscription of the user in the organization which will cause them to be redirected upon logging out, using an expired token, or using an invalid token (if those urls are set). Can use either user_id and org_id OR just subscription_id. Requires the Use SSO API permission in the subscription organization or an ancestor. + /// Automatically log users into Nexport with out requiring their login credentials. Can also create a redirect entity to attach to the subscription of the user in the organization which will cause them to be redirected upon logging out, using an expired token, or using an invalid token (if those urls are set). Can use either user_id and org_id OR just subscription_id. Requires the Use SSO API permission in the subscription organization or an ancestor.   /// </summary>   /// <exception cref="ApiException">Thrown when fails to make API call</exception>   /// <param name="accessToken">Use the AdminApi Authenticate method to get the access_token</param> @@ -402,13 +390,7 @@
  var localVarAccept = ClientUtils.SelectHeaderAccept(accepts);   if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept);   - foreach (var kvp in ClientUtils.ParameterToMultiMap("", "access_token", accessToken)) - { - foreach (var kvpValue in kvp.Value) - { - localVarRequestOptions.QueryParameters.Add(kvp.Key, kvpValue); - } - } + localVarRequestOptions.QueryParameters.Add(ClientUtils.ParameterToMultiMap("", "access_token", accessToken));     localVarRequestOptions.Data = ssoRequest;   @@ -422,7 +404,7 @@
  }     /// <summary> - /// Automatically log users into Nexport with out requiring their login credentials. Can also create a redirect entity to attach to the subscription of the user in the organization which will cause them to be redirected upon logging out, using an expired token, or using an invalid token (if those urls are set). Can use either user_id and org_id OR just subscription_id. Requires the Use SSO API permission in the subscription organization or an ancestor. + /// Automatically log users into Nexport with out requiring their login credentials. Can also create a redirect entity to attach to the subscription of the user in the organization which will cause them to be redirected upon logging out, using an expired token, or using an invalid token (if those urls are set). Can use either user_id and org_id OR just subscription_id. Requires the Use SSO API permission in the subscription organization or an ancestor.   /// </summary>   /// <exception cref="ApiException">Thrown when fails to make API call</exception>   /// <param name="accessToken">Use the AdminApi Authenticate method to get the access_token</param> @@ -435,7 +417,7 @@
  }     /// <summary> - /// Automatically log users into Nexport with out requiring their login credentials. Can also create a redirect entity to attach to the subscription of the user in the organization which will cause them to be redirected upon logging out, using an expired token, or using an invalid token (if those urls are set). Can use either user_id and org_id OR just subscription_id. Requires the Use SSO API permission in the subscription organization or an ancestor. + /// Automatically log users into Nexport with out requiring their login credentials. Can also create a redirect entity to attach to the subscription of the user in the organization which will cause them to be redirected upon logging out, using an expired token, or using an invalid token (if those urls are set). Can use either user_id and org_id OR just subscription_id. Requires the Use SSO API permission in the subscription organization or an ancestor.   /// </summary>   /// <exception cref="ApiException">Thrown when fails to make API call</exception>   /// <param name="accessToken">Use the AdminApi Authenticate method to get the access_token</param> @@ -470,13 +452,7 @@
  foreach (var accept in accepts)   localVarRequestOptions.HeaderParameters.Add("Accept", accept);   - foreach (var kvp in ClientUtils.ParameterToMultiMap("", "access_token", accessToken)) - { - foreach (var kvpValue in kvp.Value) - { - localVarRequestOptions.QueryParameters.Add(kvp.Key, kvpValue); - } - } + localVarRequestOptions.QueryParameters.Add(ClientUtils.ParameterToMultiMap("", "access_token", accessToken));     localVarRequestOptions.Data = ssoRequest;  
Show Entire File NexportApi/​Client/​ApiClient.cs Stacked
This file's diff was not loaded because this changeset is very large. Load changes
 
27
28
29
30
 
31
32
33
 
50
51
52
53
 
54
55
56
 
27
28
29
 
30
31
32
33
 
50
51
52
 
53
54
55
56
@@ -27,7 +27,7 @@
  /// Gets or sets the error content (body json object)   /// </summary>   /// <value>The error content (Http response body).</value> - public dynamic ErrorContent { get; private set; } + public object ErrorContent { get; private set; }     /// <summary>   /// Initializes a new instance of the <see cref="ApiException"/> class. @@ -50,7 +50,7 @@
  /// <param name="errorCode">HTTP status code.</param>   /// <param name="message">Error message.</param>   /// <param name="errorContent">Error content.</param> - public ApiException(int errorCode, string message, dynamic errorContent = null) : base(message) + public ApiException(int errorCode, string message, object errorContent = null) : base(message)   {   ErrorCode = errorCode;   ErrorContent = errorContent;
 
50
51
52
 
 
 
 
 
53
54
55
 
97
98
99
 
 
 
 
 
100
101
102
 
107
108
109
110
 
 
111
112
113
114
 
 
 
 
 
 
 
 
 
 
 
115
116
117
 
119
120
121
122
 
 
123
124
125
 
 
 
 
 
 
 
 
 
126
127
128
 
50
51
52
53
54
55
56
57
58
59
60
 
102
103
104
105
106
107
108
109
110
111
112
 
117
118
119
 
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
 
141
142
143
 
144
145
146
 
 
147
148
149
150
151
152
153
154
155
156
157
158
@@ -50,6 +50,11 @@
  /// Gets or sets any cookies passed along on the response.   /// </summary>   List<Cookie> Cookies { get; set; } + + /// <summary> + /// The raw content of this response + /// </summary> + string RawContent { get; }   }     /// <summary> @@ -97,6 +102,11 @@
  /// </summary>   public object Content => Data;   + /// <summary> + /// The raw content + /// </summary> + public string RawContent { get; } +   #endregion Properties     #region Constructors @@ -107,11 +117,23 @@
  /// <param name="statusCode">HTTP status code.</param>   /// <param name="headers">HTTP headers.</param>   /// <param name="data">Data (parsed HTTP body)</param> - public ApiResponse(HttpStatusCode statusCode, Multimap<string, string> headers, T data) + /// <param name="rawContent">Raw content.</param> + public ApiResponse(HttpStatusCode statusCode, Multimap<string, string> headers, T data, string rawContent)   {   StatusCode = statusCode;   Headers = headers;   Data = data; + RawContent = rawContent; + } + + /// <summary> + /// Initializes a new instance of the <see cref="ApiResponse{T}" /> class. + /// </summary> + /// <param name="statusCode">HTTP status code.</param> + /// <param name="headers">HTTP headers.</param> + /// <param name="data">Data (parsed HTTP body)</param> + public ApiResponse(HttpStatusCode statusCode, Multimap<string, string> headers, T data) : this(statusCode, headers, data, null) + {   }     /// <summary> @@ -119,10 +141,18 @@
  /// </summary>   /// <param name="statusCode">HTTP status code.</param>   /// <param name="data">Data (parsed HTTP body)</param> - public ApiResponse(HttpStatusCode statusCode, T data) + /// <param name="rawContent">Raw content.</param> + public ApiResponse(HttpStatusCode statusCode, T data, string rawContent) : this(statusCode, null, data, rawContent)   { - StatusCode = statusCode; - Data = data; + } + + /// <summary> + /// Initializes a new instance of the <see cref="ApiResponse{T}" /> class. + /// </summary> + /// <param name="statusCode">HTTP status code.</param> + /// <param name="data">Data (parsed HTTP body)</param> + public ApiResponse(HttpStatusCode statusCode, T data) : this(statusCode, data, null) + {   }     #endregion Constructors
 
45
46
47
48
 
49
50
 
51
52
53
54
55
 
56
57
58
 
73
74
75
76
 
77
78
79
80
81
82
 
 
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
 
 
 
 
 
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
 
152
153
154
155
 
156
157
158
 
162
163
164
165
166
167
168
169
170
171
172
 
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
 
45
46
47
 
48
49
 
50
51
 
 
 
 
52
53
54
55
 
70
71
72
 
73
74
75
76
77
 
 
78
79
80
81
82
83
 
 
 
 
 
 
 
 
 
 
 
 
84
85
86
87
88
89
90
91
92
93
 
 
 
 
 
 
 
 
 
 
94
95
96
 
132
133
134
 
135
136
137
138
 
142
143
144
 
145
146
 
 
 
 
 
147
148
149
150
151
152
 
 
 
 
 
 
 
 
 
 
 
153
154
155
@@ -45,14 +45,11 @@
  {   var parameters = new Multimap<string, string>();   - if (IsCollection(value) && collectionFormat == "multi") + if (value is ICollection collection && collectionFormat == "multi")   { - if (value is IEnumerable valueCollection) + foreach (var item in collection)   { - foreach (var item in valueCollection) - { - parameters.Add(name, ParameterToString(item)); - } + parameters.Add(name, ParameterToString(item));   }   }   else @@ -73,44 +70,27 @@
  /// <returns>Formatted string.</returns>   public static string ParameterToString(object obj, IReadableConfiguration configuration = null)   { - if (obj is DateTime time) + if (obj is DateTime dateTime)   // Return a formatted date string - Can be customized with Configuration.DateTimeFormat   // Defaults to an ISO 8601, using the known as a Round-trip date/time pattern ("o")   // https://msdn.microsoft.com/en-us/library/az4se3k1(v=vs.110).aspx#Anchor_8   // For example: 2009-06-15T13:45:30.0000000 - return time.ToString((configuration ?? GlobalConfiguration.Instance).DateTimeFormat); - if (obj is DateTimeOffset offset) + return dateTime.ToString((configuration ?? GlobalConfiguration.Instance).DateTimeFormat); + if (obj is DateTimeOffset dateTimeOffset)   // Return a formatted date string - Can be customized with Configuration.DateTimeFormat   // Defaults to an ISO 8601, using the known as a Round-trip date/time pattern ("o")   // https://msdn.microsoft.com/en-us/library/az4se3k1(v=vs.110).aspx#Anchor_8   // For example: 2009-06-15T13:45:30.0000000 - return offset.ToString((configuration ?? GlobalConfiguration.Instance).DateTimeFormat); - if (obj is IList list ) - { - var flattenedString = new StringBuilder(); - foreach (var param in list) - { - if (flattenedString.Length > 0) - flattenedString.Append(","); - flattenedString.Append(param); - } - return flattenedString.ToString(); - } + return dateTimeOffset.ToString((configuration ?? GlobalConfiguration.Instance).DateTimeFormat); + if (obj is bool boolean) + return boolean ? "true" : "false"; + if (obj is ICollection collection) + return string.Join(",", collection.Cast<object>());     return Convert.ToString(obj);   }     /// <summary> - /// Check if generic object is a collection. - /// </summary> - /// <param name="value"></param> - /// <returns>True if object is a collection type</returns> - private static bool IsCollection(object value) - { - return value is IList || value is ICollection; - } - - /// <summary>   /// URL encode a string   /// Credit/Ref: https://github.com/restsharp/RestSharp/blob/master/RestSharp/Extensions/StringExtensions.cs#L50   /// </summary> @@ -152,7 +132,7 @@
  /// <returns>Encoded string.</returns>   public static string Base64Encode(string text)   { - return System.Convert.ToBase64String(System.Text.Encoding.UTF8.GetBytes(text)); + return Convert.ToBase64String(System.Text.Encoding.UTF8.GetBytes(text));   }     /// <summary> @@ -162,30 +142,14 @@
  /// <returns>Byte array</returns>   public static byte[] ReadAsBytes(Stream inputStream)   { - var buf = new byte[16 * 1024];   using (var ms = new MemoryStream())   { - int count; - while ((count = inputStream.Read(buf, 0, buf.Length)) > 0) - { - ms.Write(buf, 0, count); - } + inputStream.CopyTo(ms);   return ms.ToArray();   }   }     /// <summary> - /// Dynamically cast the object into target type. - /// </summary> - /// <param name="fromObject">Object to be casted</param> - /// <param name="toObject">Target type</param> - /// <returns>Casted object</returns> - public static dynamic ConvertType(dynamic fromObject, Type toObject) - { - return Convert.ChangeType(fromObject, toObject); - } - - /// <summary>   /// Select the Content-Type header's value from the given content-type array:   /// if JSON type exists in the given array, use it;   /// otherwise use the first one defined in 'consumes'
 
9
10
11
 
12
13
14
15
16
 
 
17
18
19
 
50
51
52
53
54
 
 
55
56
57
 
61
62
63
64
65
66
67
68
69
70
71
72
 
107
108
109
110
111
112
113
 
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
 
224
225
226
 
 
 
 
 
 
227
228
229
 
332
333
334
335
 
336
337
338
 
9
10
11
12
13
14
15
16
 
17
18
19
20
21
 
52
53
54
 
 
55
56
57
58
59
 
63
64
65
 
 
 
 
 
 
66
67
68
 
103
104
105
 
106
107
108
 
140
141
142
 
 
143
144
145
146
147
148
 
 
 
 
 
 
 
 
149
150
151
 
209
210
211
212
213
214
215
216
217
218
219
220
 
323
324
325
 
326
327
328
329
@@ -9,11 +9,13 @@
  */    using System; +using System.Reflection;  using System.Collections.Concurrent;  using System.Collections.Generic;  using System.IO;  using System.Linq; -using RestSharp; +using System.Security.Cryptography.X509Certificates; +using System.Text;    namespace NexportApi.Client  { @@ -50,8 +52,8 @@
  if (status >= 400)   {   return new ApiException(status, - $"Error calling {methodName}: {response.Content}", - response.Content); + $"Error calling {methodName}: {response.RawContent}", + response.RawContent);   }     return null; @@ -61,12 +63,6 @@
    #region Private Members   - /// <summary> - /// Gets or set the rest client - /// </summary> - /// <value>The rest client</value> - private RestClient _restClient; -   /// <summary>   /// Defines the base path of the target API server.   /// Example: http://localhost:3000/v1/ @@ -107,7 +103,6 @@
    // Setting Timeout has side effects (forces ApiClient creation).   Timeout = 100000; - RestClient = new RestClient(BasePath);   }     /// <summary> @@ -145,22 +140,12 @@
  {   ApiKeyPrefix.Add(keyValuePair);   } - - RestClient = new RestClient(BasePath);   }     #endregion Constructors     #region Properties   - /// <summary> - /// Gets or sets the rest client for API consumption - /// </summary> - public virtual RestClient RestClient { - get => _restClient; - set => _restClient = value; - } -   /// <summary>   /// Gets or sets the base path for API access.   /// </summary> @@ -224,6 +209,12 @@
  }     /// <summary> + /// Gets or sets certificate collection to be sent with requests. + /// </summary> + /// <value>X509 Certificate collection.</value> + public X509CertificateCollection ClientCertificates { get; set; } + + /// <summary>   /// Gets or sets the access token for OAuth2 authentication.   ///   /// This helper property simplifies code generation. @@ -332,7 +323,7 @@
  /// </summary>   public static string ToDebugReport()   { - string report = "C# SDK (NexportApi) Debug Report:\n"; + var report = "C# SDK (NexportApi) Debug Report:\n";   report += " OS: " + System.Runtime.InteropServices.RuntimeInformation.OSDescription + "\n";   report += " Version of the API: v1\n";   report += " SDK Package Version: 1.0.0\n";
 
10
11
12
13
 
14
15
16
 
93
94
95
96
97
98
99
100
101
102
103
104
105
106
 
 
 
 
 
 
107
108
 
10
11
12
 
13
14
15
16
 
93
94
95
 
 
 
 
 
 
96
97
98
99
100
101
102
103
104
105
106
107
108
@@ -10,7 +10,7 @@
   using System;  using System.Collections.Generic; -using RestSharp; +using System.Security.Cryptography.X509Certificates;    namespace NexportApi.Client  { @@ -93,16 +93,16 @@
  string Password { get; }     /// <summary> - /// Gets the rest client. - /// </summary> - /// <value>RestClient.</value> - RestClient RestClient{ get; } - - /// <summary>   /// Gets the API key with prefix.   /// </summary>   /// <param name="apiKeyIdentifier">API key identifier (authentication scheme).</param>   /// <returns>API key with prefix.</returns>   string GetApiKeyWithPrefix(string apiKeyIdentifier); + + /// <summary> + /// Gets certificate collection to be sent with requests. + /// </summary> + /// <value>X509 Certificate collection.</value> + X509CertificateCollection ClientCertificates { get; }   }  }
Show Entire File NexportApi/​Client/​Multimap.cs Stacked
This file's diff was not loaded because this changeset is very large. Load changes
 
9
10
11
12
13
14
15
 
40
41
42
43
 
44
45
46
 
9
10
11
 
12
13
14
 
39
40
41
 
42
43
44
45
@@ -9,7 +9,6 @@
  */    using System; -using System.IO;  using System.Text;  using System.Collections.Generic;  using System.Runtime.Serialization; @@ -40,7 +39,7 @@
  InvoiceItemId = invoiceItemId;     // to ensure "apiErrorEntity" is required (not null) - ApiErrorEntity = apiErrorEntity ?? throw new InvalidDataException("apiErrorEntity is a required property for AddInvoiceItemResponse and cannot be null"); + ApiErrorEntity = apiErrorEntity ?? throw new ArgumentNullException(nameof(ApiErrorEntity), "apiErrorEntity is a required property for AddInvoiceItemResponse and cannot be null");   }     /// <summary>
 
9
10
11
12
13
14
15
 
40
41
42
43
 
44
45
46
 
9
10
11
 
12
13
14
 
39
40
41
 
42
43
44
45
@@ -9,7 +9,6 @@
  */    using System; -using System.IO;  using System.Text;  using System.Collections.Generic;  using System.Runtime.Serialization; @@ -40,7 +39,7 @@
  InvoicePaymentId = invoicePaymentId;     // to ensure "apiErrorEntity" is required (not null) - ApiErrorEntity = apiErrorEntity ?? throw new InvalidDataException("apiErrorEntity is a required property for AddInvoicePaymentResponse and cannot be null"); + ApiErrorEntity = apiErrorEntity ?? throw new ArgumentNullException(nameof(ApiErrorEntity), "apiErrorEntity is a required property for AddInvoicePaymentResponse and cannot be null");   }     /// <summary>
 
9
10
11
12
13
14
15
 
40
41
42
43
 
44
45
46
 
9
10
11
 
12
13
14
 
39
40
41
 
42
43
44
45
@@ -9,7 +9,6 @@
  */    using System; -using System.IO;  using System.Text;  using System.Collections.Generic;  using System.Runtime.Serialization; @@ -40,7 +39,7 @@
  InvoiceScheduledPaymentId = invoiceScheduledPaymentId;     // to ensure "apiErrorEntity" is required (not null) - ApiErrorEntity = apiErrorEntity ?? throw new InvalidDataException("apiErrorEntity is a required property for AddInvoiceScheduledPaymentResponse and cannot be null"); + ApiErrorEntity = apiErrorEntity ?? throw new ArgumentNullException(nameof(ApiErrorEntity), "apiErrorEntity is a required property for AddInvoiceScheduledPaymentResponse and cannot be null");   }     /// <summary>
 
26
27
28
29
 
30
31
32
33
 
34
35
36
 
68
69
70
71
 
 
 
 
 
 
 
72
73
74
 
90
91
92
93
 
94
95
96
 
26
27
28
 
29
30
31
32
 
33
34
35
36
 
68
69
70
 
71
72
73
74
75
76
77
78
79
80
 
96
97
98
 
99
100
101
102
@@ -26,11 +26,11 @@
  {   /// <summary>   /// Used to denote the kind of error that occurred, if any. - /// 0 = No Error, 1 = Unknown Error, 2 = Validation Error, 3 = Item Not Found, 4 = Authentication Error, 5 = Authorization Error + /// 0 = No Error, 1 = Unknown Error, 2 = Validation Error, 3 = Item Not Found, 4 = Authentication Error, 5 = Authorization Error, 6 = Subscription Not Found   /// </summary>   /// <value>   /// Used to denote the kind of error that occurred, if any. - /// 0 = No Error, 1 = Unknown Error, 2 = Validation Error, 3 = Item Not Found, 4 = Authentication Error, 5 = Authorization Error + /// 0 = No Error, 1 = Unknown Error, 2 = Validation Error, 3 = Item Not Found, 4 = Authentication Error, 5 = Authorization Error, 6 = Subscription Not Found   /// </value>   public enum ErrorCodeEnum   { @@ -68,7 +68,13 @@
  /// Enum AuthorizationError for value: 5   /// </summary>   [Display(Name = "Authorization Error")] - AuthorizationError = 5 + AuthorizationError = 5, + + /// <summary> + /// Enum SubscriptionNotFound for value: 6 + /// </summary> + [Display(Name = "Subscription Not Found")] + SubscriptionNotFound = 6   }     /// <summary> @@ -90,7 +96,7 @@
  /// <summary>   /// Initializes a new instance of the <see cref="ApiErrorEntity" /> class.   /// </summary> - /// <param name="errorCode">Used to denote the kind of error that occurred, if any. 0 = No Error, 1 = Unknown Error, 2 = Validation Error, 3 = Item Not Found, 4 = Authentication Error, 5 = Authorization Error (required).</param> + /// <param name="errorCode">Used to denote the kind of error that occurred, if any. 0 = No Error, 1 = Unknown Error, 2 = Validation Error, 3 = Item Not Found, 4 = Authentication Error, 5 = Authorization Error, 6 = Subscription Not Found (required).</param>   /// <param name="errorMessage">Message describing what caused the error to occur.</param>   public ApiErrorEntity(ErrorCodeEnum errorCode = default, string errorMessage = default)   {
 
9
10
11
12
13
14
15
 
37
38
39
40
 
41
42
43
 
9
10
11
 
12
13
14
 
36
37
38
 
39
40
41
42
@@ -9,7 +9,6 @@
  */    using System; -using System.IO;  using System.Text;  using System.Collections.Generic;  using System.Runtime.Serialization; @@ -37,7 +36,7 @@
  public ApiResponseBase(ApiErrorEntity apiErrorEntity = default)   {   // to ensure "apiErrorEntity" is required (not null) - ApiErrorEntity = apiErrorEntity ?? throw new InvalidDataException("apiErrorEntity is a required property for ApiResponseBase and cannot be null"); + ApiErrorEntity = apiErrorEntity ?? throw new ArgumentNullException(nameof(ApiErrorEntity), "apiErrorEntity is a required property for ApiResponseBase and cannot be null");   }     /// <summary>
This file's diff was not loaded because this changeset is very large. Load changes
 
10
11
12
13
14
15
16
 
47
48
49
50
 
 
51
52
53
 
10
11
12
 
13
14
15
 
46
47
48
 
49
50
51
52
53
@@ -10,7 +10,6 @@
   using System;  using System.Linq; -using System.IO;  using System.Text;  using System.Collections.Generic;  using System.Runtime.Serialization; @@ -47,7 +46,8 @@
  TotalCount = totalCount;     // to ensure "apiErrorEntity" is required (not null) - ApiErrorEntity = apiErrorEntity ?? throw new InvalidDataException("apiErrorEntity is a required property for AssignmentSessionsResponse and cannot be null"); + ApiErrorEntity = apiErrorEntity ?? throw new ArgumentNullException(nameof(ApiErrorEntity), "apiErrorEntity is a required property for AssignmentSessionsResponse and cannot be null"); + Sessions = sessions;   }     /// <summary>
This file's diff was not loaded because this changeset is very large. Load changes
This file's diff was not loaded because this changeset is very large. Load changes
This file's diff was not loaded because this changeset is very large. Load changes
This file's diff was not loaded because this changeset is very large. Load changes
This file's diff was not loaded because this changeset is very large. Load changes
This file's diff was not loaded because this changeset is very large. Load changes
This file's diff was not loaded because this changeset is very large. Load changes
Show Entire File NexportApi/​Model/​CmiField.cs Stacked
This file's diff was not loaded because this changeset is very large. Load changes
This file's diff was not loaded because this changeset is very large. Load changes
This file's diff was not loaded because this changeset is very large. Load changes
This file's diff was not loaded because this changeset is very large. Load changes
This file's diff was not loaded because this changeset is very large. Load changes
This file's diff was not loaded because this changeset is very large. Load changes
This file's diff was not loaded because this changeset is very large. Load changes
This file's diff was not loaded because this changeset is very large. Load changes
This file's diff was not loaded because this changeset is very large. Load changes
This file's diff was not loaded because this changeset is very large. Load changes
This file's diff was not loaded because this changeset is very large. Load changes
This file's diff was not loaded because this changeset is very large. Load changes
This file's diff was not loaded because this changeset is very large. Load changes
This file's diff was not loaded because this changeset is very large. Load changes
This file's diff was not loaded because this changeset is very large. Load changes
This file's diff was not loaded because this changeset is very large. Load changes
This file's diff was not loaded because this changeset is very large. Load changes
This file's diff was not loaded because this changeset is very large. Load changes
This file's diff was not loaded because this changeset is very large. Load changes
This file's diff was not loaded because this changeset is very large. Load changes
This file's diff was not loaded because this changeset is very large. Load changes
This file's diff was not loaded because this changeset is very large. Load changes
This file's diff was not loaded because this changeset is very large. Load changes
This file's diff was not loaded because this changeset is very large. Load changes
This file's diff was not loaded because this changeset is very large. Load changes
This file's diff was not loaded because this changeset is very large. Load changes
This file's diff was not loaded because this changeset is very large. Load changes
This file's diff was not loaded because this changeset is very large. Load changes
This file's diff was not loaded because this changeset is very large. Load changes
This file's diff was not loaded because this changeset is very large. Load changes
This file's diff was not loaded because this changeset is very large. Load changes
 
9
10
11
12
13
14
15
 
9
10
11
 
12
13
14
@@ -9,7 +9,6 @@
  */    using System; -using System.IO;  using System.Text;  using System.Collections.Generic;  using System.Runtime.Serialization;
This file's diff was not loaded because this changeset is very large. Load changes
This file's diff was not loaded because this changeset is very large. Load changes
This file's diff was not loaded because this changeset is very large. Load changes
This file's diff was not loaded because this changeset is very large. Load changes
This file's diff was not loaded because this changeset is very large. Load changes
This file's diff was not loaded because this changeset is very large. Load changes
This file's diff was not loaded because this changeset is very large. Load changes
 
9
10
11
12
13
14
15
 
9
10
11
 
12
13
14
@@ -9,7 +9,6 @@
  */    using System; -using System.IO;  using System.Text;  using System.Collections.Generic;  using System.Runtime.Serialization;
This file's diff was not loaded because this changeset is very large. Load changes
This file's diff was not loaded because this changeset is very large. Load changes
This file's diff was not loaded because this changeset is very large. Load changes
This file's diff was not loaded because this changeset is very large. Load changes
This file's diff was not loaded because this changeset is very large. Load changes
This file's diff was not loaded because this changeset is very large. Load changes
This file's diff was not loaded because this changeset is very large. Load changes
This file's diff was not loaded because this changeset is very large. Load changes
This file's diff was not loaded because this changeset is very large. Load changes
This file's diff was not loaded because this changeset is very large. Load changes
This file's diff was not loaded because this changeset is very large. Load changes
Show Entire File NexportApi/​Model/​SsoResponse.cs Stacked
This file's diff was not loaded because this changeset is very large. Load changes
This file's diff was not loaded because this changeset is very large. Load changes
This file's diff was not loaded because this changeset is very large. Load changes
This file's diff was not loaded because this changeset is very large. Load changes
This file's diff was not loaded because this changeset is very large. Load changes
This file's diff was not loaded because this changeset is very large. Load changes
This file's diff was not loaded because this changeset is very large. Load changes
This file's diff was not loaded because this changeset is very large. Load changes
This file's diff was not loaded because this changeset is very large. Load changes
This file's diff was not loaded because this changeset is very large. Load changes
This file's diff was not loaded because this changeset is very large. Load changes
This file's diff was not loaded because this changeset is very large. Load changes
This file's diff was not loaded because this changeset is very large. Load changes
Show Entire File NexportApi/​NexportApi.csproj Stacked
This file's diff was not loaded because this changeset is very large. Load changes