Trendsic Platform Service

<back to all web services

SlotDistrictSearchRequest

Requires Authentication
Requires any of the roles:Agent, Administrator
The following routes are available for this service:
GET,OPTIONS/v1/SlotDistrict/Search
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 SlotDistrictSearchResponse implements IConvertible
{
    ResponseStatus? ResponseStatus;
    List<SlotDistrict>? SlotDistrict = [];

    SlotDistrictSearchResponse({this.ResponseStatus,this.SlotDistrict});
    SlotDistrictSearchResponse.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() => "SlotDistrictSearchResponse";
    TypeContext? context = _ctx;
}

class SlotDistrictSearchRequest implements IConvertible
{
    String? State;
    String? County;
    String? City;
    String? Zip;
    String? Name;
    double? Miles;
    bool? NLG;
    bool? Midland;
    bool? GreatAmerican;
    bool? VOYA;

    SlotDistrictSearchRequest({this.State,this.County,this.City,this.Zip,this.Name,this.Miles,this.NLG,this.Midland,this.GreatAmerican,this.VOYA});
    SlotDistrictSearchRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        State = json['State'];
        County = json['County'];
        City = json['City'];
        Zip = json['Zip'];
        Name = json['Name'];
        Miles = JsonConverters.toDouble(json['Miles']);
        NLG = json['NLG'];
        Midland = json['Midland'];
        GreatAmerican = json['GreatAmerican'];
        VOYA = json['VOYA'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'State': State,
        'County': County,
        'City': City,
        'Zip': Zip,
        'Name': Name,
        'Miles': Miles,
        'NLG': NLG,
        'Midland': Midland,
        'GreatAmerican': GreatAmerican,
        'VOYA': VOYA
    };

    getTypeName() => "SlotDistrictSearchRequest";
    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>[]),
    'SlotDistrictSearchResponse': TypeInfo(TypeOf.Class, create:() => SlotDistrictSearchResponse()),
    'List<SlotDistrict>': TypeInfo(TypeOf.Class, create:() => <SlotDistrict>[]),
    'SlotDistrictSearchRequest': TypeInfo(TypeOf.Class, create:() => SlotDistrictSearchRequest()),
});

Dart SlotDistrictSearchRequest DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .json suffix or ?format=json

To embed the response in a jsonp callback, append ?callback=myCallback

HTTP + JSON

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

GET /v1/SlotDistrict/Search HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: application/json
HTTP/1.1 200 OK
Content-Type: application/json
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}]}