| GET | /v1/c/notifications |
|---|
import 'package:servicestack/servicestack.dart';
class NotificationPrefView implements IConvertible
{
String? Key;
String? Label;
String? Sub;
bool? IsOn;
NotificationPrefView({this.Key,this.Label,this.Sub,this.IsOn});
NotificationPrefView.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Key = json['Key'];
Label = json['Label'];
Sub = json['Sub'];
IsOn = json['IsOn'];
return this;
}
Map<String, dynamic> toJson() => {
'Key': Key,
'Label': Label,
'Sub': Sub,
'IsOn': IsOn
};
getTypeName() => "NotificationPrefView";
TypeContext? context = _ctx;
}
class CustomerNotificationsResponse implements IConvertible
{
String? Audience;
List<NotificationPrefView>? Items = [];
int? Devices;
bool? PushConfigured;
ResponseStatus? ResponseStatus;
CustomerNotificationsResponse({this.Audience,this.Items,this.Devices,this.PushConfigured,this.ResponseStatus});
CustomerNotificationsResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Audience = json['Audience'];
Items = JsonConverters.fromJson(json['Items'],'List<NotificationPrefView>',context!);
Devices = json['Devices'];
PushConfigured = json['PushConfigured'];
ResponseStatus = JsonConverters.fromJson(json['ResponseStatus'],'ResponseStatus',context!);
return this;
}
Map<String, dynamic> toJson() => {
'Audience': Audience,
'Items': JsonConverters.toJson(Items,'List<NotificationPrefView>',context!),
'Devices': Devices,
'PushConfigured': PushConfigured,
'ResponseStatus': JsonConverters.toJson(ResponseStatus,'ResponseStatus',context!)
};
getTypeName() => "CustomerNotificationsResponse";
TypeContext? context = _ctx;
}
class CustomerNotificationsRequest implements IConvertible
{
String? Audience;
CustomerNotificationsRequest({this.Audience});
CustomerNotificationsRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Audience = json['Audience'];
return this;
}
Map<String, dynamic> toJson() => {
'Audience': Audience
};
getTypeName() => "CustomerNotificationsRequest";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'api.dev.dynamics.trendsic.com', types: <String, TypeInfo> {
'NotificationPrefView': TypeInfo(TypeOf.Class, create:() => NotificationPrefView()),
'CustomerNotificationsResponse': TypeInfo(TypeOf.Class, create:() => CustomerNotificationsResponse()),
'List<NotificationPrefView>': TypeInfo(TypeOf.Class, create:() => <NotificationPrefView>[]),
'CustomerNotificationsRequest': TypeInfo(TypeOf.Class, create:() => CustomerNotificationsRequest()),
});
Dart CustomerNotificationsRequest DTOs
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/c/notifications HTTP/1.1 Host: api.dev.dynamics.trendsic.com Accept: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length
<CustomerNotificationsResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
<Audience>String</Audience>
<Devices>0</Devices>
<Items>
<NotificationPrefView>
<IsOn>false</IsOn>
<Key>String</Key>
<Label>String</Label>
<Sub>String</Sub>
</NotificationPrefView>
</Items>
<PushConfigured>false</PushConfigured>
<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>
</CustomerNotificationsResponse>