Trendsic Platform Service

<back to all web services

SlotDistrictRequest

Requires Authentication
Required roles:Administrator, AdministratorRequires any of the roles:Agent, Administrator, Agent, Administrator, Agent, Administrator
The following routes are available for this service:
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()),
});

Dart SlotDistrictRequest DTOs

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

HTTP + XML

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: application/xml
Content-Type: application/xml
Content-Length: length

<SlotDistrictRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
  <ID>0</ID>
  <SlotDistrict>
    <Address_Mailing>String</Address_Mailing>
    <Address_Physical>String</Address_Physical>
    <City>String</City>
    <County>String</County>
    <DistrictId>0</DistrictId>
    <DistrictName>String</DistrictName>
    <HasComments>false</HasComments>
    <ID>0</ID>
    <MVP>0</MVP>
    <MilesAway>0</MilesAway>
    <Name>String</Name>
    <NumEmployees>0</NumEmployees>
    <NumSchools>0</NumSchools>
    <Phone>String</Phone>
    <RVP>0</RVP>
    <Schools>
      <SlotDistrictSchool>
        <AgentList>
          <SchoolAgent>
            <AgentId>0</AgentId>
            <AgentName>String</AgentName>
            <SlotDistrictApprovalID>0</SlotDistrictApprovalID>
          </SchoolAgent>
        </AgentList>
        <SchoolId>0</SchoolId>
        <SchoolName>String</SchoolName>
      </SlotDistrictSchool>
    </Schools>
    <State>String</State>
    <StateId>0</StateId>
    <Status_Great_American>false</Status_Great_American>
    <Status_Midland>false</Status_Midland>
    <Status_NLG>false</Status_NLG>
    <Status_VOYA>false</Status_VOYA>
    <Type>String</Type>
    <Zip>String</Zip>
    <Zip_4>String</Zip_4>
  </SlotDistrict>
</SlotDistrictRequest>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<SlotDistrictResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
  <ResponseStatus xmlns:d2p1="http://schemas.servicestack.net/types">
    <d2p1:ErrorCode>String</d2p1:ErrorCode>
    <d2p1:Message>String</d2p1:Message>
    <d2p1:StackTrace>String</d2p1:StackTrace>
    <d2p1:Errors>
      <d2p1:ResponseError>
        <d2p1:ErrorCode>String</d2p1:ErrorCode>
        <d2p1:FieldName>String</d2p1:FieldName>
        <d2p1:Message>String</d2p1:Message>
        <d2p1:Meta xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
          <d5p1:KeyValueOfstringstring>
            <d5p1:Key>String</d5p1:Key>
            <d5p1:Value>String</d5p1:Value>
          </d5p1:KeyValueOfstringstring>
        </d2p1:Meta>
      </d2p1:ResponseError>
    </d2p1:Errors>
    <d2p1:Meta xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
      <d3p1:KeyValueOfstringstring>
        <d3p1:Key>String</d3p1:Key>
        <d3p1:Value>String</d3p1:Value>
      </d3p1:KeyValueOfstringstring>
    </d2p1:Meta>
  </ResponseStatus>
  <SlotDistrict>
    <SlotDistrict>
      <Address_Mailing>String</Address_Mailing>
      <Address_Physical>String</Address_Physical>
      <City>String</City>
      <County>String</County>
      <DistrictId>0</DistrictId>
      <DistrictName>String</DistrictName>
      <HasComments>false</HasComments>
      <ID>0</ID>
      <MVP>0</MVP>
      <MilesAway>0</MilesAway>
      <Name>String</Name>
      <NumEmployees>0</NumEmployees>
      <NumSchools>0</NumSchools>
      <Phone>String</Phone>
      <RVP>0</RVP>
      <Schools>
        <SlotDistrictSchool>
          <AgentList>
            <SchoolAgent>
              <AgentId>0</AgentId>
              <AgentName>String</AgentName>
              <SlotDistrictApprovalID>0</SlotDistrictApprovalID>
            </SchoolAgent>
          </AgentList>
          <SchoolId>0</SchoolId>
          <SchoolName>String</SchoolName>
        </SlotDistrictSchool>
      </Schools>
      <State>String</State>
      <StateId>0</StateId>
      <Status_Great_American>false</Status_Great_American>
      <Status_Midland>false</Status_Midland>
      <Status_NLG>false</Status_NLG>
      <Status_VOYA>false</Status_VOYA>
      <Type>String</Type>
      <Zip>String</Zip>
      <Zip_4>String</Zip_4>
    </SlotDistrict>
  </SlotDistrict>
</SlotDistrictResponse>