AIM Web Services

<back to all web services

ServiceStatusRequest

ServiceStatus
Requires active-e Service Tickets Service

The following routes are available for this service:
GET, POST/api/ServiceStatus
import 'package:servicestack/servicestack.dart';

// @DataContract
class BaseRequest implements IConvertible
{
    /**
    * This is your AIM API Key provided by Tri-Tech
    */
    // @DataMember
    // @ApiMember(DataType="string", Description="This is your AIM API Key provided by Tri-Tech", IsRequired=true, Name="ApiKey", ParameterType="header")
    String? ApiKey;

    // @DataMember
    // @ApiMember(DataType="string", Name="OAuthToken", ParameterType="header")
    String? OAuthToken;

    BaseRequest({this.ApiKey,this.OAuthToken});
    BaseRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        ApiKey = json['ApiKey'];
        OAuthToken = json['OAuthToken'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'ApiKey': ApiKey,
        'OAuthToken': OAuthToken
    };

    getTypeName() => "BaseRequest";
    TypeContext? context = _ctx;
}

// @DataContract
class BaseSecureRequest extends BaseRequest implements IConvertible
{
    /**
    * 
    */
    // @DataMember
    // @ApiMember(DataType="string", Description="", Name="Token", ParameterType="Header")
    String? Token;

    /**
    * 
    */
    // @DataMember
    // @ApiMember(DataType="string", Description="", Name="DeviceId", ParameterType="Header")
    String? DeviceId;

    /**
    * 
    */
    // @DataMember
    // @ApiMember(DataType="string", Description="", IsRequired=true, Name="AppId", ParameterType="Header")
    String? AppId;

    BaseSecureRequest({this.Token,this.DeviceId,this.AppId});
    BaseSecureRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        super.fromMap(json);
        Token = json['Token'];
        DeviceId = json['DeviceId'];
        AppId = json['AppId'];
        return this;
    }

    Map<String, dynamic> toJson() => super.toJson()..addAll({
        'Token': Token,
        'DeviceId': DeviceId,
        'AppId': AppId
    });

    getTypeName() => "BaseSecureRequest";
    TypeContext? context = _ctx;
}

// @DataContract
class BaseResponseResult implements IConvertible
{
    /**
    * 
    */
    // @DataMember
    // @ApiMember(DataType="string", Description="", Name="StatusCode", ParameterType="body")
    String? StatusCode;

    /**
    * 
    */
    // @DataMember
    // @ApiMember(DataType="string", Description="", Name="Login", ParameterType="body")
    String? Login;

    /**
    * 
    */
    // @DataMember
    // @ApiMember(DataType="string", Description="", Name="ErrorCode", ParameterType="body")
    String? ErrorCode;

    /**
    * 
    */
    // @DataMember
    // @ApiMember(DataType="string", Description="", Name="ErrorDisplayText", ParameterType="body")
    String? ErrorDisplayText;

    /**
    * 
    */
    // @DataMember
    // @ApiMember(DataType="string", Description="", Name="ErrorMessage", ParameterType="body")
    String? ErrorMessage;

    /**
    * 
    */
    // @DataMember
    // @ApiMember(DataType="string", Description="", ExcludeInSchema=true, Name="DomainName", ParameterType="body")
    String? DomainName;

    /**
    * 
    */
    // @DataMember
    // @ApiMember(DataType="string", Description="", ExcludeInSchema=true, Name="IPAddress", ParameterType="body")
    String? IpAddress;

    BaseResponseResult({this.StatusCode,this.Login,this.ErrorCode,this.ErrorDisplayText,this.ErrorMessage,this.DomainName,this.IpAddress});
    BaseResponseResult.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        StatusCode = json['StatusCode'];
        Login = json['Login'];
        ErrorCode = json['ErrorCode'];
        ErrorDisplayText = json['ErrorDisplayText'];
        ErrorMessage = json['ErrorMessage'];
        DomainName = json['DomainName'];
        IpAddress = json['IpAddress'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'StatusCode': StatusCode,
        'Login': Login,
        'ErrorCode': ErrorCode,
        'ErrorDisplayText': ErrorDisplayText,
        'ErrorMessage': ErrorMessage,
        'DomainName': DomainName,
        'IpAddress': IpAddress
    };

    getTypeName() => "BaseResponseResult";
    TypeContext? context = _ctx;
}

// @DataContract
class BaseResponse implements IConvertible
{
    /**
    * 
    */
    // @DataMember
    // @ApiMember(DataType="BaseResponseResult", Description="", Name="Status", ParameterType="body")
    BaseResponseResult? Status;

    BaseResponse({this.Status});
    BaseResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Status = JsonConverters.fromJson(json['Status'],'BaseResponseResult',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Status': JsonConverters.toJson(Status,'BaseResponseResult',context!)
    };

    getTypeName() => "BaseResponse";
    TypeContext? context = _ctx;
}

// @DataContract
class ServiceStatus implements IConvertible
{
    // @DataMember
    int? Id;

    // @DataMember
    String? Status;

    // @DataMember
    String? Description;

    // @DataMember
    String? Code;

    ServiceStatus({this.Id,this.Status,this.Description,this.Code});
    ServiceStatus.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Id = json['Id'];
        Status = json['Status'];
        Description = json['Description'];
        Code = json['Code'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Id': Id,
        'Status': Status,
        'Description': Description,
        'Code': Code
    };

    getTypeName() => "ServiceStatus";
    TypeContext? context = _ctx;
}

// @DataContract
class ServiceStatusResponse extends BaseResponse implements IConvertible
{
    // @DataMember
    List<ServiceStatus>? Statuses;

    ServiceStatusResponse({this.Statuses});
    ServiceStatusResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        super.fromMap(json);
        Statuses = JsonConverters.fromJson(json['Statuses'],'List<ServiceStatus>',context!);
        return this;
    }

    Map<String, dynamic> toJson() => super.toJson()..addAll({
        'Statuses': JsonConverters.toJson(Statuses,'List<ServiceStatus>',context!)
    });

    getTypeName() => "ServiceStatusResponse";
    TypeContext? context = _ctx;
}

/**
* ServiceStatusRequires active-e Service Tickets Service
*/
// @DataContract
class ServiceStatusRequest extends BaseSecureRequest implements IConvertible
{
    /**
    * List of Tickets to be updated. Only used for a POST request.
    */
    // @DataMember
    // @ApiMember(Description="List of Tickets to be updated. Only used for a POST request.", Name="Tickets", ParameterType="query")
    List<String>? Tickets;

    /**
    * New Status Id to be set to the tickets. Only used for a POST request. Send this or NewStatus.
    */
    // @DataMember
    // @ApiMember(Description="New Status Id to be set to the tickets. Only used for a POST request. Send this or NewStatus.", Name="NewStatusId", ParameterType="query")
    int? NewStatusId;

    /**
    * New Status to be set to the tickets. Only used for a POST request. Send this or NewStatus.
    */
    // @DataMember
    // @ApiMember(Description="New Status to be set to the tickets. Only used for a POST request. Send this or NewStatus.", Name="NewStatus", ParameterType="query")
    String? NewStatus;

    /**
    * New Locator Id to be set to the tickets. Only used for a POST request. Send this or NewLocator.
    */
    // @DataMember
    // @ApiMember(Description="New Locator Id to be set to the tickets. Only used for a POST request. Send this or NewLocator.", Name="NewLocatorId", ParameterType="query")
    int? NewLocatorId;

    /**
    * New Locator to be set to the tickets. Only used for a POST request. Send this or NewLocatorId.
    */
    // @DataMember
    // @ApiMember(Description="New Locator to be set to the tickets. Only used for a POST request. Send this or NewLocatorId.", Name="NewLocator", ParameterType="query")
    String? NewLocator;

    /**
    * New Master Ticket # to be set to the tickets. Only used for a POST request.
    */
    // @DataMember
    // @ApiMember(Description="New Master Ticket # to be set to the tickets. Only used for a POST request.", Name="NewMasterTicket", ParameterType="query")
    String? NewMasterTicket;

    ServiceStatusRequest({this.Tickets,this.NewStatusId,this.NewStatus,this.NewLocatorId,this.NewLocator,this.NewMasterTicket});
    ServiceStatusRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        super.fromMap(json);
        Tickets = JsonConverters.fromJson(json['Tickets'],'List<String>',context!);
        NewStatusId = json['NewStatusId'];
        NewStatus = json['NewStatus'];
        NewLocatorId = json['NewLocatorId'];
        NewLocator = json['NewLocator'];
        NewMasterTicket = json['NewMasterTicket'];
        return this;
    }

    Map<String, dynamic> toJson() => super.toJson()..addAll({
        'Tickets': JsonConverters.toJson(Tickets,'List<String>',context!),
        'NewStatusId': NewStatusId,
        'NewStatus': NewStatus,
        'NewLocatorId': NewLocatorId,
        'NewLocator': NewLocator,
        'NewMasterTicket': NewMasterTicket
    });

    getTypeName() => "ServiceStatusRequest";
    TypeContext? context = _ctx;
}

TypeContext _ctx = TypeContext(library: 'active_ewebservice.biz', types: <String, TypeInfo> {
    'BaseRequest': TypeInfo(TypeOf.Class, create:() => BaseRequest()),
    'BaseSecureRequest': TypeInfo(TypeOf.Class, create:() => BaseSecureRequest()),
    'BaseResponseResult': TypeInfo(TypeOf.Class, create:() => BaseResponseResult()),
    'BaseResponse': TypeInfo(TypeOf.Class, create:() => BaseResponse()),
    'ServiceStatus': TypeInfo(TypeOf.Class, create:() => ServiceStatus()),
    'ServiceStatusResponse': TypeInfo(TypeOf.Class, create:() => ServiceStatusResponse()),
    'List<ServiceStatus>': TypeInfo(TypeOf.Class, create:() => <ServiceStatus>[]),
    'ServiceStatusRequest': TypeInfo(TypeOf.Class, create:() => ServiceStatusRequest()),
});

Dart ServiceStatusRequest DTOs

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

HTTP + OTHER

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

POST /api/ServiceStatus HTTP/1.1 
Host: active-ewebservice.biz 
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length

{"Tickets":["String"],"NewStatusId":0,"NewStatus":"String","NewLocatorId":0,"NewLocator":"String","NewMasterTicket":"String","Token":"String","DeviceId":"String","AppId":"String","ApiKey":"String","OAuthToken":"String"}
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length

{"Statuses":[{"Id":0,"Status":"String","Description":"String","Code":"String"}],"Status":{"StatusCode":"String","Login":"String","ErrorCode":"String","ErrorDisplayText":"String","ErrorMessage":"String","DomainName":"String","IpAddress":"String"}}