| Required roles: | Administrator, Administrator | Requires any of the roles: | Agent, Administrator, Agent, Administrator, Agent, Administrator |
| PUT,DELETE,OPTIONS | /v1/SlotDistrict/{ID} | ||
|---|---|---|---|
| POST,OPTIONS | /v1/SlotDistrict |
import 'package:servicestack/servicestack.dart';
import 'dart:typed_data';
class SchoolAgent implements IConvertible
{
int? AgentId;
String? AgentName;
int? SlotDistrictApprovalID;
SchoolAgent({this.AgentId,this.AgentName,this.SlotDistrictApprovalID});
SchoolAgent.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
AgentId = json['AgentId'];
AgentName = json['AgentName'];
SlotDistrictApprovalID = json['SlotDistrictApprovalID'];
return this;
}
Map<String, dynamic> toJson() => {
'AgentId': AgentId,
'AgentName': AgentName,
'SlotDistrictApprovalID': SlotDistrictApprovalID
};
getTypeName() => "SchoolAgent";
TypeContext? context = _ctx;
}
class SlotDistrictSchool implements IConvertible
{
int? SchoolId;
String? SchoolName;
List<SchoolAgent>? AgentList = [];
SlotDistrictSchool({this.SchoolId,this.SchoolName,this.AgentList});
SlotDistrictSchool.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
SchoolId = json['SchoolId'];
SchoolName = json['SchoolName'];
AgentList = JsonConverters.fromJson(json['AgentList'],'List<SchoolAgent>',context!);
return this;
}
Map<String, dynamic> toJson() => {
'SchoolId': SchoolId,
'SchoolName': SchoolName,
'AgentList': JsonConverters.toJson(AgentList,'List<SchoolAgent>',context!)
};
getTypeName() => "SlotDistrictSchool";
TypeContext? context = _ctx;
}
class SlotDistrict implements IConvertible
{
int? ID;
String? Name;
String? County;
int? DistrictId;
String? DistrictName;
String? Address_Physical;
String? Address_Mailing;
String? City;
String? Zip;
String? Zip_4;
int? StateId;
String? State;
String? Phone;
double? NumEmployees;
int? NumSchools;
String? Type;
bool? Status_NLG;
bool? Status_Midland;
bool? Status_Great_American;
bool? Status_VOYA;
int? MVP;
int? RVP;
List<SlotDistrictSchool>? Schools = [];
double? MilesAway;
bool? HasComments;
SlotDistrict({this.ID,this.Name,this.County,this.DistrictId,this.DistrictName,this.Address_Physical,this.Address_Mailing,this.City,this.Zip,this.Zip_4,this.StateId,this.State,this.Phone,this.NumEmployees,this.NumSchools,this.Type,this.Status_NLG,this.Status_Midland,this.Status_Great_American,this.Status_VOYA,this.MVP,this.RVP,this.Schools,this.MilesAway,this.HasComments});
SlotDistrict.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
ID = json['ID'];
Name = json['Name'];
County = json['County'];
DistrictId = json['DistrictId'];
DistrictName = json['DistrictName'];
Address_Physical = json['Address_Physical'];
Address_Mailing = json['Address_Mailing'];
City = json['City'];
Zip = json['Zip'];
Zip_4 = json['Zip_4'];
StateId = json['StateId'];
State = json['State'];
Phone = json['Phone'];
NumEmployees = JsonConverters.toDouble(json['NumEmployees']);
NumSchools = json['NumSchools'];
Type = json['Type'];
Status_NLG = json['Status_NLG'];
Status_Midland = json['Status_Midland'];
Status_Great_American = json['Status_Great_American'];
Status_VOYA = json['Status_VOYA'];
MVP = json['MVP'];
RVP = json['RVP'];
Schools = JsonConverters.fromJson(json['Schools'],'List<SlotDistrictSchool>',context!);
MilesAway = JsonConverters.toDouble(json['MilesAway']);
HasComments = json['HasComments'];
return this;
}
Map<String, dynamic> toJson() => {
'ID': ID,
'Name': Name,
'County': County,
'DistrictId': DistrictId,
'DistrictName': DistrictName,
'Address_Physical': Address_Physical,
'Address_Mailing': Address_Mailing,
'City': City,
'Zip': Zip,
'Zip_4': Zip_4,
'StateId': StateId,
'State': State,
'Phone': Phone,
'NumEmployees': NumEmployees,
'NumSchools': NumSchools,
'Type': Type,
'Status_NLG': Status_NLG,
'Status_Midland': Status_Midland,
'Status_Great_American': Status_Great_American,
'Status_VOYA': Status_VOYA,
'MVP': MVP,
'RVP': RVP,
'Schools': JsonConverters.toJson(Schools,'List<SlotDistrictSchool>',context!),
'MilesAway': MilesAway,
'HasComments': HasComments
};
getTypeName() => "SlotDistrict";
TypeContext? context = _ctx;
}
class SlotDistrictResponse implements IConvertible
{
ResponseStatus? ResponseStatus;
List<SlotDistrict>? SlotDistrict = [];
SlotDistrictResponse({this.ResponseStatus,this.SlotDistrict});
SlotDistrictResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
ResponseStatus = JsonConverters.fromJson(json['ResponseStatus'],'ResponseStatus',context!);
SlotDistrict = JsonConverters.fromJson(json['SlotDistrict'],'List<SlotDistrict>',context!);
return this;
}
Map<String, dynamic> toJson() => {
'ResponseStatus': JsonConverters.toJson(ResponseStatus,'ResponseStatus',context!),
'SlotDistrict': JsonConverters.toJson(SlotDistrict,'List<SlotDistrict>',context!)
};
getTypeName() => "SlotDistrictResponse";
TypeContext? context = _ctx;
}
class SlotDistrictRequest implements IConvertible
{
SlotDistrict? SlotDistrict;
int? ID;
SlotDistrictRequest({this.SlotDistrict,this.ID});
SlotDistrictRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
SlotDistrict = JsonConverters.fromJson(json['SlotDistrict'],'SlotDistrict',context!);
ID = json['ID'];
return this;
}
Map<String, dynamic> toJson() => {
'SlotDistrict': JsonConverters.toJson(SlotDistrict,'SlotDistrict',context!),
'ID': ID
};
getTypeName() => "SlotDistrictRequest";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'api.dev.dynamics.trendsic.com', types: <String, TypeInfo> {
'SchoolAgent': TypeInfo(TypeOf.Class, create:() => SchoolAgent()),
'SlotDistrictSchool': TypeInfo(TypeOf.Class, create:() => SlotDistrictSchool()),
'List<SchoolAgent>': TypeInfo(TypeOf.Class, create:() => <SchoolAgent>[]),
'SlotDistrict': TypeInfo(TypeOf.Class, create:() => SlotDistrict()),
'List<SlotDistrictSchool>': TypeInfo(TypeOf.Class, create:() => <SlotDistrictSchool>[]),
'SlotDistrictResponse': TypeInfo(TypeOf.Class, create:() => SlotDistrictResponse()),
'List<SlotDistrict>': TypeInfo(TypeOf.Class, create:() => <SlotDistrict>[]),
'SlotDistrictRequest': TypeInfo(TypeOf.Class, create:() => SlotDistrictRequest()),
});
To override the Content-type in your clients, use the HTTP Accept Header, append the .other suffix or ?format=other
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /v1/SlotDistrict HTTP/1.1
Host: api.dev.dynamics.trendsic.com
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length
{"SlotDistrict":{"ID":0,"Name":"String","County":"String","DistrictId":0,"DistrictName":"String","Address_Physical":"String","Address_Mailing":"String","City":"String","Zip":"String","Zip_4":"String","StateId":0,"State":"String","Phone":"String","NumEmployees":0,"NumSchools":0,"Type":"String","Status_NLG":false,"Status_Midland":false,"Status_Great_American":false,"Status_VOYA":false,"MVP":0,"RVP":0,"Schools":[{"SchoolId":0,"SchoolName":"String","AgentList":[{"AgentId":0,"AgentName":"String","SlotDistrictApprovalID":0}]}],"MilesAway":0,"HasComments":false},"ID":0}
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length
{"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}},"SlotDistrict":[{"ID":0,"Name":"String","County":"String","DistrictId":0,"DistrictName":"String","Address_Physical":"String","Address_Mailing":"String","City":"String","Zip":"String","Zip_4":"String","StateId":0,"State":"String","Phone":"String","NumEmployees":0,"NumSchools":0,"Type":"String","Status_NLG":false,"Status_Midland":false,"Status_Great_American":false,"Status_VOYA":false,"MVP":0,"RVP":0,"Schools":[{"SchoolId":0,"SchoolName":"String","AgentList":[{"AgentId":0,"AgentName":"String","SlotDistrictApprovalID":0}]}],"MilesAway":0,"HasComments":false}]}