| GET | /Chats/Single |
|---|
import 'package:servicestack/servicestack.dart';
import 'dart:typed_data';
class EnquiryChatSingle implements IConvertible
{
String? EnquiryGuid;
String? ChatGuid;
EnquiryChatSingle({this.EnquiryGuid,this.ChatGuid});
EnquiryChatSingle.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
EnquiryGuid = json['EnquiryGuid'];
ChatGuid = json['ChatGuid'];
return this;
}
Map<String, dynamic> toJson() => {
'EnquiryGuid': EnquiryGuid,
'ChatGuid': ChatGuid
};
getTypeName() => "EnquiryChatSingle";
TypeContext? context = _ctx;
}
class GetEnquiryChatListForContactIdViewModel implements IConvertible
{
int? Id;
String? Guid;
String? ChatGuid;
int? EntityId;
String? EntityName;
int? EntityContactId;
String? EntityContactFirstName;
String? EntityContactLastName;
String? EntityContactName;
String? EntityContactRoleInChat;
int? ChattingWithEntityId;
String? ChattingWithEntityName;
int? ChattingWithEntityContactId;
String? ChattingWithEntityContactFirstName;
String? ChattingWithEntityContactLastName;
String? ChattingWithEntityContactName;
String? ChattingWithEntityContactNameAndEntity;
String? ChattingWithEntityContactRoleInChat;
int? UnreadMessagesForEntityContact;
String? LastMessageDateTime;
String? LastMessageText;
int? ChatId;
bool? LastMessageWasFromMe;
bool? LastMessageDelivered;
bool? LastMessageRead;
String? ChattingWithEntityContactGuid;
int? DealRecapCode;
String? BannerText;
String? ChattingWithEntityContactImageGuid;
GetEnquiryChatListForContactIdViewModel({this.Id,this.Guid,this.ChatGuid,this.EntityId,this.EntityName,this.EntityContactId,this.EntityContactFirstName,this.EntityContactLastName,this.EntityContactName,this.EntityContactRoleInChat,this.ChattingWithEntityId,this.ChattingWithEntityName,this.ChattingWithEntityContactId,this.ChattingWithEntityContactFirstName,this.ChattingWithEntityContactLastName,this.ChattingWithEntityContactName,this.ChattingWithEntityContactNameAndEntity,this.ChattingWithEntityContactRoleInChat,this.UnreadMessagesForEntityContact,this.LastMessageDateTime,this.LastMessageText,this.ChatId,this.LastMessageWasFromMe,this.LastMessageDelivered,this.LastMessageRead,this.ChattingWithEntityContactGuid,this.DealRecapCode,this.BannerText,this.ChattingWithEntityContactImageGuid});
GetEnquiryChatListForContactIdViewModel.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Id = json['Id'];
Guid = json['Guid'];
ChatGuid = json['ChatGuid'];
EntityId = json['EntityId'];
EntityName = json['EntityName'];
EntityContactId = json['EntityContactId'];
EntityContactFirstName = json['EntityContactFirstName'];
EntityContactLastName = json['EntityContactLastName'];
EntityContactName = json['EntityContactName'];
EntityContactRoleInChat = json['EntityContactRoleInChat'];
ChattingWithEntityId = json['ChattingWithEntityId'];
ChattingWithEntityName = json['ChattingWithEntityName'];
ChattingWithEntityContactId = json['ChattingWithEntityContactId'];
ChattingWithEntityContactFirstName = json['ChattingWithEntityContactFirstName'];
ChattingWithEntityContactLastName = json['ChattingWithEntityContactLastName'];
ChattingWithEntityContactName = json['ChattingWithEntityContactName'];
ChattingWithEntityContactNameAndEntity = json['ChattingWithEntityContactNameAndEntity'];
ChattingWithEntityContactRoleInChat = json['ChattingWithEntityContactRoleInChat'];
UnreadMessagesForEntityContact = json['UnreadMessagesForEntityContact'];
LastMessageDateTime = json['LastMessageDateTime'];
LastMessageText = json['LastMessageText'];
ChatId = json['ChatId'];
LastMessageWasFromMe = json['LastMessageWasFromMe'];
LastMessageDelivered = json['LastMessageDelivered'];
LastMessageRead = json['LastMessageRead'];
ChattingWithEntityContactGuid = json['ChattingWithEntityContactGuid'];
DealRecapCode = json['DealRecapCode'];
BannerText = json['BannerText'];
ChattingWithEntityContactImageGuid = json['ChattingWithEntityContactImageGuid'];
return this;
}
Map<String, dynamic> toJson() => {
'Id': Id,
'Guid': Guid,
'ChatGuid': ChatGuid,
'EntityId': EntityId,
'EntityName': EntityName,
'EntityContactId': EntityContactId,
'EntityContactFirstName': EntityContactFirstName,
'EntityContactLastName': EntityContactLastName,
'EntityContactName': EntityContactName,
'EntityContactRoleInChat': EntityContactRoleInChat,
'ChattingWithEntityId': ChattingWithEntityId,
'ChattingWithEntityName': ChattingWithEntityName,
'ChattingWithEntityContactId': ChattingWithEntityContactId,
'ChattingWithEntityContactFirstName': ChattingWithEntityContactFirstName,
'ChattingWithEntityContactLastName': ChattingWithEntityContactLastName,
'ChattingWithEntityContactName': ChattingWithEntityContactName,
'ChattingWithEntityContactNameAndEntity': ChattingWithEntityContactNameAndEntity,
'ChattingWithEntityContactRoleInChat': ChattingWithEntityContactRoleInChat,
'UnreadMessagesForEntityContact': UnreadMessagesForEntityContact,
'LastMessageDateTime': LastMessageDateTime,
'LastMessageText': LastMessageText,
'ChatId': ChatId,
'LastMessageWasFromMe': LastMessageWasFromMe,
'LastMessageDelivered': LastMessageDelivered,
'LastMessageRead': LastMessageRead,
'ChattingWithEntityContactGuid': ChattingWithEntityContactGuid,
'DealRecapCode': DealRecapCode,
'BannerText': BannerText,
'ChattingWithEntityContactImageGuid': ChattingWithEntityContactImageGuid
};
getTypeName() => "GetEnquiryChatListForContactIdViewModel";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'internal.thebunkerbridge.com', types: <String, TypeInfo> {
'EnquiryChatSingle': TypeInfo(TypeOf.Class, create:() => EnquiryChatSingle()),
'GetEnquiryChatListForContactIdViewModel': TypeInfo(TypeOf.Class, create:() => GetEnquiryChatListForContactIdViewModel()),
});
To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /Chats/Single HTTP/1.1 Host: internal.thebunkerbridge.com Accept: text/csv
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length
{"Id":0,"Guid":"00000000000000000000000000000000","ChatGuid":"00000000000000000000000000000000","EntityId":0,"EntityName":"String","EntityContactId":0,"EntityContactFirstName":"String","EntityContactLastName":"String","EntityContactName":"String","EntityContactRoleInChat":"String","ChattingWithEntityId":0,"ChattingWithEntityName":"String","ChattingWithEntityContactId":0,"ChattingWithEntityContactFirstName":"String","ChattingWithEntityContactLastName":"String","ChattingWithEntityContactName":"String","ChattingWithEntityContactNameAndEntity":"String","ChattingWithEntityContactRoleInChat":"String","UnreadMessagesForEntityContact":0,"LastMessageDateTime":"String","LastMessageText":"String","ChatId":0,"LastMessageWasFromMe":false,"LastMessageDelivered":false,"LastMessageRead":false,"ChattingWithEntityContactGuid":"00000000000000000000000000000000","DealRecapCode":0,"BannerText":"String","ChattingWithEntityContactImageGuid":"00000000000000000000000000000000"}