| All Verbs | /api/timezones |
|---|
import 'package:servicestack/servicestack.dart';
class DataListItemModel implements IConvertible
{
/**
* Guid of the list item PKID.
*/
// @ApiMember(DataType="Guid", Description="Guid of the list item PKID.", IsRequired=true, Name="ListItemId", ParameterType="query")
String? ListItemId;
/**
* Name of the list item.
*/
// @ApiMember(DataType="string", Description="Name of the list item.", Name="Name", ParameterType="query")
String? Name;
/**
* Short Version Name of the list item.
*/
// @ApiMember(DataType="string", Description="Short Version Name of the list item.", Name="ShortName", ParameterType="query")
String? ShortName;
/**
* The primary image url
*/
// @ApiMember(DataType="string", Description="The primary image url", Name="PrimaryImagePath", ParameterType="query")
String? PrimaryImagePath;
/**
* Record Status of the List Item (A=Active, I=Inactive, D=Deleted).
*/
// @ApiMember(DataType="string", Description="Record Status of the List Item (A=Active, I=Inactive, D=Deleted).", Name="RecordStatus", ParameterType="query")
String? RecordStatus;
/**
* The order (if any) of this item in the list.
*/
// @ApiMember(DataType="int", Description="The order (if any) of this item in the list.", Name="Order", ParameterType="query")
int? Order;
/**
* The owner of this item.
*/
// @ApiMember(DataType="Guid", Description="The owner of this item.", Name="OwnerContactId", ParameterType="query")
String? OwnerContactId;
List<dynamic>? ExtraValues;
DataListItemModel({this.ListItemId,this.Name,this.ShortName,this.PrimaryImagePath,this.RecordStatus,this.Order,this.OwnerContactId,this.ExtraValues});
DataListItemModel.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
ListItemId = json['ListItemId'];
Name = json['Name'];
ShortName = json['ShortName'];
PrimaryImagePath = json['PrimaryImagePath'];
RecordStatus = json['RecordStatus'];
Order = json['Order'];
OwnerContactId = json['OwnerContactId'];
ExtraValues = JsonConverters.fromJson(json['ExtraValues'],'List<dynamic>',context!);
return this;
}
Map<String, dynamic> toJson() => {
'ListItemId': ListItemId,
'Name': Name,
'ShortName': ShortName,
'PrimaryImagePath': PrimaryImagePath,
'RecordStatus': RecordStatus,
'Order': Order,
'OwnerContactId': OwnerContactId,
'ExtraValues': JsonConverters.toJson(ExtraValues,'List<dynamic>',context!)
};
getTypeName() => "DataListItemModel";
TypeContext? context = _ctx;
}
class DataListModel implements IConvertible
{
/**
* Guid of the List PKID.
*/
// @ApiMember(DataType="Guid", Description="Guid of the List PKID.", IsRequired=true, Name="ListId", ParameterType="query")
String? ListId;
/**
* Name of the list.
*/
// @ApiMember(DataType="String", Description="Name of the list.", Name="Name", ParameterType="query")
String? Name;
/**
* The owner of this item.
*/
// @ApiMember(DataType="Guid", Description="The owner of this item.", Name="OwnerContactId", ParameterType="query")
String? OwnerContactId;
/**
* List Items in the list.
*/
// @ApiMember(DataType="List<DataListItemModel>", Description="List Items in the list.", Name="ListItems", ParameterType="query")
List<DataListItemModel>? DataListItems;
DataListModel({this.ListId,this.Name,this.OwnerContactId,this.DataListItems});
DataListModel.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
ListId = json['ListId'];
Name = json['Name'];
OwnerContactId = json['OwnerContactId'];
DataListItems = JsonConverters.fromJson(json['DataListItems'],'List<DataListItemModel>',context!);
return this;
}
Map<String, dynamic> toJson() => {
'ListId': ListId,
'Name': Name,
'OwnerContactId': OwnerContactId,
'DataListItems': JsonConverters.toJson(DataListItems,'List<DataListItemModel>',context!)
};
getTypeName() => "DataListModel";
TypeContext? context = _ctx;
}
// @ApiResponse(Description="List of timezones matching the criteria")
class GetTimezonesResponse implements IConvertible
{
DataListModel? Timezones;
ResponseStatus? ResponseStatus;
GetTimezonesResponse({this.Timezones,this.ResponseStatus});
GetTimezonesResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Timezones = JsonConverters.fromJson(json['Timezones'],'DataListModel',context!);
ResponseStatus = JsonConverters.fromJson(json['ResponseStatus'],'ResponseStatus',context!);
return this;
}
Map<String, dynamic> toJson() => {
'Timezones': JsonConverters.toJson(Timezones,'DataListModel',context!),
'ResponseStatus': JsonConverters.toJson(ResponseStatus,'ResponseStatus',context!)
};
getTypeName() => "GetTimezonesResponse";
TypeContext? context = _ctx;
}
/**
* Get a list of timezones
*/
// @Api(Description="Get a list of timezones")
class GetTimezones implements IConvertible
{
GetTimezones();
GetTimezones.fromJson(Map<String, dynamic> json) : super();
fromMap(Map<String, dynamic> json) {
return this;
}
Map<String, dynamic> toJson() => {};
getTypeName() => "GetTimezones";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'pfapi.pstpf.com.au', types: <String, TypeInfo> {
'DataListItemModel': TypeInfo(TypeOf.Class, create:() => DataListItemModel()),
'List<dynamic>': TypeInfo(TypeOf.Class, create:() => <dynamic>[]),
'DataListModel': TypeInfo(TypeOf.Class, create:() => DataListModel()),
'List<DataListItemModel>': TypeInfo(TypeOf.Class, create:() => <DataListItemModel>[]),
'GetTimezonesResponse': TypeInfo(TypeOf.Class, create:() => GetTimezonesResponse()),
'GetTimezones': TypeInfo(TypeOf.Class, create:() => GetTimezones()),
});
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.
POST /api/timezones HTTP/1.1
Host: pfapi.pstpf.com.au
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<GetTimezones xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Eros.Subtle.Canvara.WebAPIModel.ServiceModel" />
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length
<GetTimezonesResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Eros.Subtle.Canvara.WebAPIModel.ServiceModel">
<ResponseStatus xmlns:d2p1="http://schemas.servicestack.net/types">
<d2p1:ErrorCode>String</d2p1:ErrorCode>
<d2p1:Message>String</d2p1:Message>
<d2p1:StackTrace>String</d2p1:StackTrace>
<d2p1:Errors>
<d2p1:ResponseError>
<d2p1:ErrorCode>String</d2p1:ErrorCode>
<d2p1:FieldName>String</d2p1:FieldName>
<d2p1:Message>String</d2p1:Message>
<d2p1:Meta xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d5p1:KeyValueOfstringstring>
<d5p1:Key>String</d5p1:Key>
<d5p1:Value>String</d5p1:Value>
</d5p1:KeyValueOfstringstring>
</d2p1:Meta>
</d2p1:ResponseError>
</d2p1:Errors>
<d2p1:Meta xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d3p1:KeyValueOfstringstring>
<d3p1:Key>String</d3p1:Key>
<d3p1:Value>String</d3p1:Value>
</d3p1:KeyValueOfstringstring>
</d2p1:Meta>
</ResponseStatus>
<Timezones xmlns:d2p1="http://schemas.datacontract.org/2004/07/Eros.Saguna.Common.WebAPI.ServiceModel">
<d2p1:DataListItems>
<d2p1:DataListItemModel>
<d2p1:_x003C_ExtraValues_x003E_k__BackingField xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d5p1:anyType />
</d2p1:_x003C_ExtraValues_x003E_k__BackingField>
<d2p1:_x003C_ListItemId_x003E_k__BackingField>00000000-0000-0000-0000-000000000000</d2p1:_x003C_ListItemId_x003E_k__BackingField>
<d2p1:_x003C_Name_x003E_k__BackingField>String</d2p1:_x003C_Name_x003E_k__BackingField>
<d2p1:_x003C_Order_x003E_k__BackingField>0</d2p1:_x003C_Order_x003E_k__BackingField>
<d2p1:_x003C_OwnerContactId_x003E_k__BackingField>00000000-0000-0000-0000-000000000000</d2p1:_x003C_OwnerContactId_x003E_k__BackingField>
<d2p1:_x003C_PrimaryImagePath_x003E_k__BackingField>String</d2p1:_x003C_PrimaryImagePath_x003E_k__BackingField>
<d2p1:_x003C_RecordStatus_x003E_k__BackingField>String</d2p1:_x003C_RecordStatus_x003E_k__BackingField>
<d2p1:_x003C_ShortName_x003E_k__BackingField>String</d2p1:_x003C_ShortName_x003E_k__BackingField>
</d2p1:DataListItemModel>
</d2p1:DataListItems>
<d2p1:ListId>00000000-0000-0000-0000-000000000000</d2p1:ListId>
<d2p1:Name>String</d2p1:Name>
<d2p1:OwnerContactId>00000000-0000-0000-0000-000000000000</d2p1:OwnerContactId>
</Timezones>
</GetTimezonesResponse>