| GET,OPTIONS | /v1/pm/agents |
|---|
import 'package:servicestack/servicestack.dart';
import 'dart:typed_data';
class PmAgentItem implements IConvertible
{
String? UserId;
String? Name;
PmAgentItem({this.UserId,this.Name});
PmAgentItem.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
UserId = json['UserId'];
Name = json['Name'];
return this;
}
Map<String, dynamic> toJson() => {
'UserId': UserId,
'Name': Name
};
getTypeName() => "PmAgentItem";
TypeContext? context = _ctx;
}
class PmAgentListResponse implements IConvertible
{
List<PmAgentItem>? Agents = [];
PmAgentListResponse({this.Agents});
PmAgentListResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Agents = JsonConverters.fromJson(json['Agents'],'List<PmAgentItem>',context!);
return this;
}
Map<String, dynamic> toJson() => {
'Agents': JsonConverters.toJson(Agents,'List<PmAgentItem>',context!)
};
getTypeName() => "PmAgentListResponse";
TypeContext? context = _ctx;
}
class PmAgentListRequest implements IConvertible
{
PmAgentListRequest();
PmAgentListRequest.fromJson(Map<String, dynamic> json) : super();
fromMap(Map<String, dynamic> json) {
return this;
}
Map<String, dynamic> toJson() => {};
getTypeName() => "PmAgentListRequest";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'api.dev.dynamics.trendsic.com', types: <String, TypeInfo> {
'PmAgentItem': TypeInfo(TypeOf.Class, create:() => PmAgentItem()),
'PmAgentListResponse': TypeInfo(TypeOf.Class, create:() => PmAgentListResponse()),
'List<PmAgentItem>': TypeInfo(TypeOf.Class, create:() => <PmAgentItem>[]),
'PmAgentListRequest': TypeInfo(TypeOf.Class, create:() => PmAgentListRequest()),
});
To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /v1/pm/agents HTTP/1.1 Host: api.dev.dynamics.trendsic.com Accept: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length
<PmAgentListResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
<Agents>
<PmAgentItem>
<Name>String</Name>
<UserId>String</UserId>
</PmAgentItem>
</Agents>
</PmAgentListResponse>