| Requires any of the roles: | Agent, Administrator |
| POST,OPTIONS | /v1/MassCommunicationContact |
|---|
import 'package:servicestack/servicestack.dart';
import 'dart:typed_data';
class MassCommunicationResponse implements IConvertible
{
ResponseStatus? ResponseStatus;
bool? Success;
int? Recipients;
MassCommunicationResponse({this.ResponseStatus,this.Success,this.Recipients});
MassCommunicationResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
ResponseStatus = JsonConverters.fromJson(json['ResponseStatus'],'ResponseStatus',context!);
Success = json['Success'];
Recipients = json['Recipients'];
return this;
}
Map<String, dynamic> toJson() => {
'ResponseStatus': JsonConverters.toJson(ResponseStatus,'ResponseStatus',context!),
'Success': Success,
'Recipients': Recipients
};
getTypeName() => "MassCommunicationResponse";
TypeContext? context = _ctx;
}
class MassCommunicationContactRequest implements IConvertible
{
String? Subject;
String? Message;
List<String>? Recipients = [];
List<String>? Locations = [];
bool? EmailMissingNumbers;
bool? EmailAll;
bool? SMSAll;
String? ContactCategories;
MassCommunicationContactRequest({this.Subject,this.Message,this.Recipients,this.Locations,this.EmailMissingNumbers,this.EmailAll,this.SMSAll,this.ContactCategories});
MassCommunicationContactRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Subject = json['Subject'];
Message = json['Message'];
Recipients = JsonConverters.fromJson(json['Recipients'],'List<String>',context!);
Locations = JsonConverters.fromJson(json['Locations'],'List<String>',context!);
EmailMissingNumbers = json['EmailMissingNumbers'];
EmailAll = json['EmailAll'];
SMSAll = json['SMSAll'];
ContactCategories = json['ContactCategories'];
return this;
}
Map<String, dynamic> toJson() => {
'Subject': Subject,
'Message': Message,
'Recipients': JsonConverters.toJson(Recipients,'List<String>',context!),
'Locations': JsonConverters.toJson(Locations,'List<String>',context!),
'EmailMissingNumbers': EmailMissingNumbers,
'EmailAll': EmailAll,
'SMSAll': SMSAll,
'ContactCategories': ContactCategories
};
getTypeName() => "MassCommunicationContactRequest";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'api.dev.dynamics.trendsic.com', types: <String, TypeInfo> {
'MassCommunicationResponse': TypeInfo(TypeOf.Class, create:() => MassCommunicationResponse()),
'MassCommunicationContactRequest': TypeInfo(TypeOf.Class, create:() => MassCommunicationContactRequest()),
});
Dart MassCommunicationContactRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .other suffix or ?format=other
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /v1/MassCommunicationContact HTTP/1.1
Host: api.dev.dynamics.trendsic.com
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length
{"Subject":"String","Message":"String","Recipients":["String"],"Locations":["String"],"EmailMissingNumbers":false,"EmailAll":false,"SMSAll":false,"ContactCategories":"String"}
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length
{"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}},"Success":false,"Recipients":0}