Required role: | REGISUserRole |
POST | /DynamicsCRM/Email | ||
---|---|---|---|
POST | /DynamicsCRM/Email/{guid} |
import 'package:servicestack/servicestack.dart';
import 'dart:typed_data';
class CRMEmailResponse implements IConvertible
{
String? guid;
String? gmail_thread_index;
String? subject;
DateTime? changed_date;
CRMEmailResponse({this.guid,this.gmail_thread_index,this.subject,this.changed_date});
CRMEmailResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
guid = json['guid'];
gmail_thread_index = json['gmail_thread_index'];
subject = json['subject'];
changed_date = JsonConverters.fromJson(json['changed_date'],'DateTime',context!);
return this;
}
Map<String, dynamic> toJson() => {
'guid': guid,
'gmail_thread_index': gmail_thread_index,
'subject': subject,
'changed_date': JsonConverters.toJson(changed_date,'DateTime',context!)
};
getTypeName() => "CRMEmailResponse";
TypeContext? context = _ctx;
}
class CRMEmailRequest implements IConvertible
{
String? guid;
String? gmail_thread_index;
CRMEmailRequest({this.guid,this.gmail_thread_index});
CRMEmailRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
guid = json['guid'];
gmail_thread_index = json['gmail_thread_index'];
return this;
}
Map<String, dynamic> toJson() => {
'guid': guid,
'gmail_thread_index': gmail_thread_index
};
getTypeName() => "CRMEmailRequest";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'data.regent_college.edu', types: <String, TypeInfo> {
'CRMEmailResponse': TypeInfo(TypeOf.Class, create:() => CRMEmailResponse()),
'CRMEmailRequest': TypeInfo(TypeOf.Class, create:() => CRMEmailRequest()),
});
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 /DynamicsCRM/Email HTTP/1.1
Host: data.regent-college.edu
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length
{"guid":"String","gmail_thread_index":"String"}
HTTP/1.1 200 OK Content-Type: text/jsonl Content-Length: length {"guid":"String","gmail_thread_index":"String","subject":"String","changed_date":"0001-01-01T00:00:00.0000000"}