Trendsic Platform Service

<back to all web services

TicketTypeSubscriptionRequest

Requires Authentication
Requires any of the roles:Agent, Administrator, Agent, Administrator, Agent, Administrator
The following routes are available for this service:
GET/v1/TicketTypeSubscription/{TicketTypeId}
POST,DELETE,OPTIONS/v1/TicketTypeSubscription
import 'package:servicestack/servicestack.dart';
import 'dart:typed_data';

class TicketTypeSubscription implements IConvertible
{
    int? TicketTypeSubscriptionId;
    int? TicketTypeId;
    int? AgentId;

    TicketTypeSubscription({this.TicketTypeSubscriptionId,this.TicketTypeId,this.AgentId});
    TicketTypeSubscription.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        TicketTypeSubscriptionId = json['TicketTypeSubscriptionId'];
        TicketTypeId = json['TicketTypeId'];
        AgentId = json['AgentId'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'TicketTypeSubscriptionId': TicketTypeSubscriptionId,
        'TicketTypeId': TicketTypeId,
        'AgentId': AgentId
    };

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

class TicketTypeSubscriptionExtended extends TicketTypeSubscription implements IConvertible
{
    String? AgentName;
    String? TicketType;

    TicketTypeSubscriptionExtended({this.AgentName,this.TicketType});
    TicketTypeSubscriptionExtended.fromJson(Map<String, dynamic> json) { fromMap(json); }

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

    Map<String, dynamic> toJson() => super.toJson()..addAll({
        'AgentName': AgentName,
        'TicketType': TicketType
    });

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

class TicketTypeSubscriptionResponse implements IConvertible
{
    ResponseStatus? ResponseStatus;
    List<TicketTypeSubscriptionExtended>? TicketTypeSubscription = [];

    TicketTypeSubscriptionResponse({this.ResponseStatus,this.TicketTypeSubscription});
    TicketTypeSubscriptionResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

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

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

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

class TicketTypeSubscriptionRequest implements IConvertible
{
    List<TicketTypeSubscription>? TicketTypeSubscription = [];
    int? TicketTypeId;

    TicketTypeSubscriptionRequest({this.TicketTypeSubscription,this.TicketTypeId});
    TicketTypeSubscriptionRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }

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

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

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

TypeContext _ctx = TypeContext(library: 'api.dev.dynamics.trendsic.com', types: <String, TypeInfo> {
    'TicketTypeSubscription': TypeInfo(TypeOf.Class, create:() => TicketTypeSubscription()),
    'TicketTypeSubscriptionExtended': TypeInfo(TypeOf.Class, create:() => TicketTypeSubscriptionExtended()),
    'TicketTypeSubscriptionResponse': TypeInfo(TypeOf.Class, create:() => TicketTypeSubscriptionResponse()),
    'List<TicketTypeSubscriptionExtended>': TypeInfo(TypeOf.Class, create:() => <TicketTypeSubscriptionExtended>[]),
    'TicketTypeSubscriptionRequest': TypeInfo(TypeOf.Class, create:() => TicketTypeSubscriptionRequest()),
    'List<TicketTypeSubscription>': TypeInfo(TypeOf.Class, create:() => <TicketTypeSubscription>[]),
});

Dart TicketTypeSubscriptionRequest 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 /v1/TicketTypeSubscription HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length

{"TicketTypeSubscription":[{"TicketTypeSubscriptionId":0,"TicketTypeId":0,"AgentId":0}],"TicketTypeId":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"}},"TicketTypeSubscription":[{"AgentName":"String","TicketType":"String","TicketTypeSubscriptionId":0,"TicketTypeId":0,"AgentId":0}]}