Evo Voice

<back to all web services

GetPresenceStatusRequest

Requires Authentication
The following routes are available for this service:
All Verbs/presence
import 'package:servicestack/servicestack.dart';

enum PresenceStatuses
{
    Free,
    OnPhone,
}

class GetPresenceStatusResponse implements IConvertible
{
    Map<String,PresenceStatuses?>? statuses;

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

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

    Map<String, dynamic> toJson() => {
        'statuses': JsonConverters.toJson(statuses,'Map<String,PresenceStatuses?>',context!)
    };

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

class GetPresenceStatusRequest implements IConvertible
{
    /**
    * The account to retrieve presence status for
    */
    // @ApiMember(Description="The account to retrieve presence status for")
    String? accountId;

    /**
    * The extensions to retrieve presence status for
    */
    // @ApiMember(Description="The extensions to retrieve presence status for")
    List<String>? extensions;

    GetPresenceStatusRequest({this.accountId,this.extensions});
    GetPresenceStatusRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }

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

    Map<String, dynamic> toJson() => {
        'accountId': accountId,
        'extensions': JsonConverters.toJson(extensions,'List<String>',context!)
    };

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

TypeContext _ctx = TypeContext(library: 'evovoice.io', types: <String, TypeInfo> {
    'PresenceStatuses': TypeInfo(TypeOf.Enum, enumValues:PresenceStatuses.values),
    'GetPresenceStatusResponse': TypeInfo(TypeOf.Class, create:() => GetPresenceStatusResponse()),
    'Map<String,PresenceStatuses?>': TypeInfo(TypeOf.Class, create:() => Map<String,PresenceStatuses?>()),
    'GetPresenceStatusRequest': TypeInfo(TypeOf.Class, create:() => GetPresenceStatusRequest()),
});

Dart GetPresenceStatusRequest 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.

POST /presence HTTP/1.1 
Host: evovoice.io 
Accept: application/json
Content-Type: application/json
Content-Length: length

{"accountId":"String","extensions":["String"]}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

{"statuses":{"String":"Free"}}