| All Verbs | /api/updateobjectsubscriptionstatus |
|---|
import 'package:servicestack/servicestack.dart';
class ListItemFilter implements IConvertible
{
String? ListItemFilterId;
String? FilterName;
String? ListId;
String? ListItemId;
bool? ListItemIsInFilter;
ListItemFilter({this.ListItemFilterId,this.FilterName,this.ListId,this.ListItemId,this.ListItemIsInFilter});
ListItemFilter.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
ListItemFilterId = json['ListItemFilterId'];
FilterName = json['FilterName'];
ListId = json['ListId'];
ListItemId = json['ListItemId'];
ListItemIsInFilter = json['ListItemIsInFilter'];
return this;
}
Map<String, dynamic> toJson() => {
'ListItemFilterId': ListItemFilterId,
'FilterName': FilterName,
'ListId': ListId,
'ListItemId': ListItemId,
'ListItemIsInFilter': ListItemIsInFilter
};
getTypeName() => "ListItemFilter";
TypeContext? context = _ctx;
}
class ListDataItem implements IConvertible
{
String? Id;
String? Name;
String? Description;
String? ShortName;
String? DefaultName;
bool? IsDefault;
int? Order;
String? ListItemTrafficLightId;
String? PrimaryListItemImageId;
String? PrimaryListItemImageUrl;
String? PrimaryImageThumbnailUrl;
String? OwnerContactId;
String? RecordStatus;
String? Tags;
String? ListId;
bool? MarkAsChecked;
String? RelatedObjectId;
bool? CanEdit;
bool? IsOwner;
List<dynamic>? ExtraValues;
List<ListItemFilter>? ListItemFilters;
ListDataItem({this.Id,this.Name,this.Description,this.ShortName,this.DefaultName,this.IsDefault,this.Order,this.ListItemTrafficLightId,this.PrimaryListItemImageId,this.PrimaryListItemImageUrl,this.PrimaryImageThumbnailUrl,this.OwnerContactId,this.RecordStatus,this.Tags,this.ListId,this.MarkAsChecked,this.RelatedObjectId,this.CanEdit,this.IsOwner,this.ExtraValues,this.ListItemFilters});
ListDataItem.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Id = json['Id'];
Name = json['Name'];
Description = json['Description'];
ShortName = json['ShortName'];
DefaultName = json['DefaultName'];
IsDefault = json['IsDefault'];
Order = json['Order'];
ListItemTrafficLightId = json['ListItemTrafficLightId'];
PrimaryListItemImageId = json['PrimaryListItemImageId'];
PrimaryListItemImageUrl = json['PrimaryListItemImageUrl'];
PrimaryImageThumbnailUrl = json['PrimaryImageThumbnailUrl'];
OwnerContactId = json['OwnerContactId'];
RecordStatus = json['RecordStatus'];
Tags = json['Tags'];
ListId = json['ListId'];
MarkAsChecked = json['MarkAsChecked'];
RelatedObjectId = json['RelatedObjectId'];
CanEdit = json['CanEdit'];
IsOwner = json['IsOwner'];
ExtraValues = JsonConverters.fromJson(json['ExtraValues'],'List<dynamic>',context!);
ListItemFilters = JsonConverters.fromJson(json['ListItemFilters'],'List<ListItemFilter>',context!);
return this;
}
Map<String, dynamic> toJson() => {
'Id': Id,
'Name': Name,
'Description': Description,
'ShortName': ShortName,
'DefaultName': DefaultName,
'IsDefault': IsDefault,
'Order': Order,
'ListItemTrafficLightId': ListItemTrafficLightId,
'PrimaryListItemImageId': PrimaryListItemImageId,
'PrimaryListItemImageUrl': PrimaryListItemImageUrl,
'PrimaryImageThumbnailUrl': PrimaryImageThumbnailUrl,
'OwnerContactId': OwnerContactId,
'RecordStatus': RecordStatus,
'Tags': Tags,
'ListId': ListId,
'MarkAsChecked': MarkAsChecked,
'RelatedObjectId': RelatedObjectId,
'CanEdit': CanEdit,
'IsOwner': IsOwner,
'ExtraValues': JsonConverters.toJson(ExtraValues,'List<dynamic>',context!),
'ListItemFilters': JsonConverters.toJson(ListItemFilters,'List<ListItemFilter>',context!)
};
getTypeName() => "ListDataItem";
TypeContext? context = _ctx;
}
class GetDataSourcesResponse implements IConvertible
{
List<ListDataItem>? DataSources;
ResponseStatus? ResponseStatus;
GetDataSourcesResponse({this.DataSources,this.ResponseStatus});
GetDataSourcesResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
DataSources = JsonConverters.fromJson(json['DataSources'],'List<ListDataItem>',context!);
ResponseStatus = JsonConverters.fromJson(json['ResponseStatus'],'ResponseStatus',context!);
return this;
}
Map<String, dynamic> toJson() => {
'DataSources': JsonConverters.toJson(DataSources,'List<ListDataItem>',context!),
'ResponseStatus': JsonConverters.toJson(ResponseStatus,'ResponseStatus',context!)
};
getTypeName() => "GetDataSourcesResponse";
TypeContext? context = _ctx;
}
/**
* Updates an object subscription status
*/
// @Api(Description="Updates an object subscription status")
class UpdateObjectSubscrptionStatus implements IConvertible
{
String? ObjectSubscriptionId;
String? RecordStatus;
String? SubscriptionKey;
UpdateObjectSubscrptionStatus({this.ObjectSubscriptionId,this.RecordStatus,this.SubscriptionKey});
UpdateObjectSubscrptionStatus.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
ObjectSubscriptionId = json['ObjectSubscriptionId'];
RecordStatus = json['RecordStatus'];
SubscriptionKey = json['SubscriptionKey'];
return this;
}
Map<String, dynamic> toJson() => {
'ObjectSubscriptionId': ObjectSubscriptionId,
'RecordStatus': RecordStatus,
'SubscriptionKey': SubscriptionKey
};
getTypeName() => "UpdateObjectSubscrptionStatus";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'pfapi.pstpf.com.au', types: <String, TypeInfo> {
'ListItemFilter': TypeInfo(TypeOf.Class, create:() => ListItemFilter()),
'ListDataItem': TypeInfo(TypeOf.Class, create:() => ListDataItem()),
'List<dynamic>': TypeInfo(TypeOf.Class, create:() => <dynamic>[]),
'List<ListItemFilter>': TypeInfo(TypeOf.Class, create:() => <ListItemFilter>[]),
'GetDataSourcesResponse': TypeInfo(TypeOf.Class, create:() => GetDataSourcesResponse()),
'List<ListDataItem>': TypeInfo(TypeOf.Class, create:() => <ListDataItem>[]),
'UpdateObjectSubscrptionStatus': TypeInfo(TypeOf.Class, create:() => UpdateObjectSubscrptionStatus()),
});
Dart UpdateObjectSubscrptionStatus 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/updateobjectsubscriptionstatus HTTP/1.1
Host: pfapi.pstpf.com.au
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
RecordStatus: ,
SubscriptionKey: String
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
DataSources:
[
{
Name: String,
Description: String,
ShortName: String,
DefaultName: String,
IsDefault: False,
Order: 0,
PrimaryListItemImageUrl: String,
PrimaryImageThumbnailUrl: String,
RecordStatus: String,
Tags: String,
MarkAsChecked: False,
CanEdit: False,
IsOwner: False,
ExtraValues:
[
{
}
],
ListItemFilters:
[
{
FilterName: String,
ListItemIsInFilter: False
}
]
}
],
ResponseStatus:
{
ErrorCode: String,
Message: String,
StackTrace: String,
Errors:
[
{
ErrorCode: String,
FieldName: String,
Message: String,
Meta:
{
String: String
}
}
],
Meta:
{
String: String
}
}
}