| All Verbs | /api/customcontentviews |
|---|
import 'package:servicestack/servicestack.dart';
class CustomContentViewModel implements IConvertible
{
/**
* Id of the Custom Content View.
*/
// @ApiMember(DataType="Guid", Description="Id of the Custom Content View.", Name="ContentViewId", ParameterType="query")
String? ContentViewId;
/**
* Name of the Custom Content View.
*/
// @ApiMember(DataType="string", Description="Name of the Custom Content View.", Name="Name", ParameterType="query")
String? Name;
CustomContentViewModel({this.ContentViewId,this.Name});
CustomContentViewModel.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
ContentViewId = json['ContentViewId'];
Name = json['Name'];
return this;
}
Map<String, dynamic> toJson() => {
'ContentViewId': ContentViewId,
'Name': Name
};
getTypeName() => "CustomContentViewModel";
TypeContext? context = _ctx;
}
// @ApiResponse(Description="Returns the Views matching the specified type.")
class GetCustomContentViewsResponse implements IConvertible
{
List<CustomContentViewModel>? Views;
ResponseStatus? ResponseStatus;
GetCustomContentViewsResponse({this.Views,this.ResponseStatus});
GetCustomContentViewsResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Views = JsonConverters.fromJson(json['Views'],'List<CustomContentViewModel>',context!);
ResponseStatus = JsonConverters.fromJson(json['ResponseStatus'],'ResponseStatus',context!);
return this;
}
Map<String, dynamic> toJson() => {
'Views': JsonConverters.toJson(Views,'List<CustomContentViewModel>',context!),
'ResponseStatus': JsonConverters.toJson(ResponseStatus,'ResponseStatus',context!)
};
getTypeName() => "GetCustomContentViewsResponse";
TypeContext? context = _ctx;
}
/**
* Request a list of Custom Content Views for the current licensee of the specified type.
*/
// @Api(Description="Request a list of Custom Content Views for the current licensee of the specified type.")
class GetCustomContentViews implements IConvertible
{
/**
* The RmsTableCtxId representing the type of views we are retrieving.
*/
// @ApiMember(DataType="Guid", Description="The RmsTableCtxId representing the type of views we are retrieving.", IsRequired=true, Name="RmsTableCtxId", ParameterType="query")
String? RmsTableCtxId;
GetCustomContentViews({this.RmsTableCtxId});
GetCustomContentViews.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
RmsTableCtxId = json['RmsTableCtxId'];
return this;
}
Map<String, dynamic> toJson() => {
'RmsTableCtxId': RmsTableCtxId
};
getTypeName() => "GetCustomContentViews";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'pfapi.pstpf.com.au', types: <String, TypeInfo> {
'CustomContentViewModel': TypeInfo(TypeOf.Class, create:() => CustomContentViewModel()),
'GetCustomContentViewsResponse': TypeInfo(TypeOf.Class, create:() => GetCustomContentViewsResponse()),
'List<CustomContentViewModel>': TypeInfo(TypeOf.Class, create:() => <CustomContentViewModel>[]),
'GetCustomContentViews': TypeInfo(TypeOf.Class, create:() => GetCustomContentViews()),
});
Dart GetCustomContentViews 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.
POST /api/customcontentviews HTTP/1.1
Host: pfapi.pstpf.com.au
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
Views:
[
{
Name: String
}
],
ResponseStatus:
{
ErrorCode: String,
Message: String,
StackTrace: String,
Errors:
[
{
ErrorCode: String,
FieldName: String,
Message: String,
Meta:
{
String: String
}
}
],
Meta:
{
String: String
}
}
}