| Requires any of the roles: | Agent, Administrator |
| GET | /v1/TicketTypeSubscription/Agent/{AgentId} |
|---|
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 TicketTypeSubscriptionRequestByAgent implements IConvertible
{
int? AgentId;
TicketTypeSubscriptionRequestByAgent({this.AgentId});
TicketTypeSubscriptionRequestByAgent.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
AgentId = json['AgentId'];
return this;
}
Map<String, dynamic> toJson() => {
'AgentId': AgentId
};
getTypeName() => "TicketTypeSubscriptionRequestByAgent";
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>[]),
'TicketTypeSubscriptionRequestByAgent': TypeInfo(TypeOf.Class, create:() => TicketTypeSubscriptionRequestByAgent()),
});
Dart TicketTypeSubscriptionRequestByAgent DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /v1/TicketTypeSubscription/Agent/{AgentId} HTTP/1.1
Host: api.dev.dynamics.trendsic.com
Accept: text/jsv
HTTP/1.1 200 OK
Content-Type: text/jsv
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
}
]
}