Requires any of the roles: | bookingsupplier-administrator-write, superadmin, bookingsupplier-administrator-read |
GET | /gdpr/customers/{CustomerId} | Get all customer information stored on the customer | Get all information stored on the customer |
---|
import 'package:servicestack/servicestack.dart';
class GDPRCustomerBookingsResponse implements IConvertible
{
String? CompanyId;
int? Id;
String? CustomerId;
int? ServiceId;
int? StatusId;
DateTime? From;
DateTime? To;
DateTime? UnbookedOn;
String? UnbookedComments;
String? BookedComments;
String? BookedBy;
String? Comments;
String? TextField1;
String? TextField2;
String? TextField3;
String? TextField4;
String? TextField5;
String? TextField6;
String? TextField7;
String? TextField8;
String? TextField9;
String? TextField10;
String? TextField11;
String? TextField12;
String? TextField13;
String? TextField14;
String? TextField15;
String? TextField16;
String? TextField17;
String? TextField18;
String? TextField19;
String? TextField20;
DateTime? UpdatedDate;
DateTime? CreatedDate;
String? CommentsToCustomer;
GDPRCustomerBookingsResponse({this.CompanyId,this.Id,this.CustomerId,this.ServiceId,this.StatusId,this.From,this.To,this.UnbookedOn,this.UnbookedComments,this.BookedComments,this.BookedBy,this.Comments,this.TextField1,this.TextField2,this.TextField3,this.TextField4,this.TextField5,this.TextField6,this.TextField7,this.TextField8,this.TextField9,this.TextField10,this.TextField11,this.TextField12,this.TextField13,this.TextField14,this.TextField15,this.TextField16,this.TextField17,this.TextField18,this.TextField19,this.TextField20,this.UpdatedDate,this.CreatedDate,this.CommentsToCustomer});
GDPRCustomerBookingsResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
CompanyId = json['CompanyId'];
Id = json['Id'];
CustomerId = json['CustomerId'];
ServiceId = json['ServiceId'];
StatusId = json['StatusId'];
From = JsonConverters.fromJson(json['From'],'DateTime',context!);
To = JsonConverters.fromJson(json['To'],'DateTime',context!);
UnbookedOn = JsonConverters.fromJson(json['UnbookedOn'],'DateTime',context!);
UnbookedComments = json['UnbookedComments'];
BookedComments = json['BookedComments'];
BookedBy = json['BookedBy'];
Comments = json['Comments'];
TextField1 = json['TextField1'];
TextField2 = json['TextField2'];
TextField3 = json['TextField3'];
TextField4 = json['TextField4'];
TextField5 = json['TextField5'];
TextField6 = json['TextField6'];
TextField7 = json['TextField7'];
TextField8 = json['TextField8'];
TextField9 = json['TextField9'];
TextField10 = json['TextField10'];
TextField11 = json['TextField11'];
TextField12 = json['TextField12'];
TextField13 = json['TextField13'];
TextField14 = json['TextField14'];
TextField15 = json['TextField15'];
TextField16 = json['TextField16'];
TextField17 = json['TextField17'];
TextField18 = json['TextField18'];
TextField19 = json['TextField19'];
TextField20 = json['TextField20'];
UpdatedDate = JsonConverters.fromJson(json['UpdatedDate'],'DateTime',context!);
CreatedDate = JsonConverters.fromJson(json['CreatedDate'],'DateTime',context!);
CommentsToCustomer = json['CommentsToCustomer'];
return this;
}
Map<String, dynamic> toJson() => {
'CompanyId': CompanyId,
'Id': Id,
'CustomerId': CustomerId,
'ServiceId': ServiceId,
'StatusId': StatusId,
'From': JsonConverters.toJson(From,'DateTime',context!),
'To': JsonConverters.toJson(To,'DateTime',context!),
'UnbookedOn': JsonConverters.toJson(UnbookedOn,'DateTime',context!),
'UnbookedComments': UnbookedComments,
'BookedComments': BookedComments,
'BookedBy': BookedBy,
'Comments': Comments,
'TextField1': TextField1,
'TextField2': TextField2,
'TextField3': TextField3,
'TextField4': TextField4,
'TextField5': TextField5,
'TextField6': TextField6,
'TextField7': TextField7,
'TextField8': TextField8,
'TextField9': TextField9,
'TextField10': TextField10,
'TextField11': TextField11,
'TextField12': TextField12,
'TextField13': TextField13,
'TextField14': TextField14,
'TextField15': TextField15,
'TextField16': TextField16,
'TextField17': TextField17,
'TextField18': TextField18,
'TextField19': TextField19,
'TextField20': TextField20,
'UpdatedDate': JsonConverters.toJson(UpdatedDate,'DateTime',context!),
'CreatedDate': JsonConverters.toJson(CreatedDate,'DateTime',context!),
'CommentsToCustomer': CommentsToCustomer
};
getTypeName() => "GDPRCustomerBookingsResponse";
TypeContext? context = _ctx;
}
class GDPRCustomerMessageLogResponse implements IConvertible
{
String? CompanyId;
int? Id;
int? BookingId;
String? Receiver;
String? Sender;
String? MessageTitle;
String? MessageBody;
String? CreatedBy;
DateTime? Created;
bool? Sent;
DateTime? SentDate;
int? SendMethodId;
GDPRCustomerMessageLogResponse({this.CompanyId,this.Id,this.BookingId,this.Receiver,this.Sender,this.MessageTitle,this.MessageBody,this.CreatedBy,this.Created,this.Sent,this.SentDate,this.SendMethodId});
GDPRCustomerMessageLogResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
CompanyId = json['CompanyId'];
Id = json['Id'];
BookingId = json['BookingId'];
Receiver = json['Receiver'];
Sender = json['Sender'];
MessageTitle = json['MessageTitle'];
MessageBody = json['MessageBody'];
CreatedBy = json['CreatedBy'];
Created = JsonConverters.fromJson(json['Created'],'DateTime',context!);
Sent = json['Sent'];
SentDate = JsonConverters.fromJson(json['SentDate'],'DateTime',context!);
SendMethodId = json['SendMethodId'];
return this;
}
Map<String, dynamic> toJson() => {
'CompanyId': CompanyId,
'Id': Id,
'BookingId': BookingId,
'Receiver': Receiver,
'Sender': Sender,
'MessageTitle': MessageTitle,
'MessageBody': MessageBody,
'CreatedBy': CreatedBy,
'Created': JsonConverters.toJson(Created,'DateTime',context!),
'Sent': Sent,
'SentDate': JsonConverters.toJson(SentDate,'DateTime',context!),
'SendMethodId': SendMethodId
};
getTypeName() => "GDPRCustomerMessageLogResponse";
TypeContext? context = _ctx;
}
class UserProfileResponse implements IConvertible
{
String? Id;
String? Firstname;
String? Lastname;
String? Phone;
String? Email;
UserProfileResponse({this.Id,this.Firstname,this.Lastname,this.Phone,this.Email});
UserProfileResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Id = json['Id'];
Firstname = json['Firstname'];
Lastname = json['Lastname'];
Phone = json['Phone'];
Email = json['Email'];
return this;
}
Map<String, dynamic> toJson() => {
'Id': Id,
'Firstname': Firstname,
'Lastname': Lastname,
'Phone': Phone,
'Email': Email
};
getTypeName() => "UserProfileResponse";
TypeContext? context = _ctx;
}
class GDPRCustomerInfoResponse implements IConvertible
{
String? UserId;
String? Firstname;
String? Lastname;
String? Phone;
String? Email;
bool? Active;
String? FacebookUsername;
String? TextField1;
String? TextField2;
String? TextField3;
String? TextField4;
String? TextField5;
String? TextField6;
String? TextField7;
String? TextField8;
String? TextField9;
String? TextField10;
String? TextField11;
String? TextField12;
String? TextField13;
String? TextField14;
String? TextField15;
String? TextField16;
String? TextField17;
String? TextField18;
String? TextField19;
String? TextField20;
DateTime? Updated;
DateTime? Created;
GDPRCustomerInfoResponse({this.UserId,this.Firstname,this.Lastname,this.Phone,this.Email,this.Active,this.FacebookUsername,this.TextField1,this.TextField2,this.TextField3,this.TextField4,this.TextField5,this.TextField6,this.TextField7,this.TextField8,this.TextField9,this.TextField10,this.TextField11,this.TextField12,this.TextField13,this.TextField14,this.TextField15,this.TextField16,this.TextField17,this.TextField18,this.TextField19,this.TextField20,this.Updated,this.Created});
GDPRCustomerInfoResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
UserId = json['UserId'];
Firstname = json['Firstname'];
Lastname = json['Lastname'];
Phone = json['Phone'];
Email = json['Email'];
Active = json['Active'];
FacebookUsername = json['FacebookUsername'];
TextField1 = json['TextField1'];
TextField2 = json['TextField2'];
TextField3 = json['TextField3'];
TextField4 = json['TextField4'];
TextField5 = json['TextField5'];
TextField6 = json['TextField6'];
TextField7 = json['TextField7'];
TextField8 = json['TextField8'];
TextField9 = json['TextField9'];
TextField10 = json['TextField10'];
TextField11 = json['TextField11'];
TextField12 = json['TextField12'];
TextField13 = json['TextField13'];
TextField14 = json['TextField14'];
TextField15 = json['TextField15'];
TextField16 = json['TextField16'];
TextField17 = json['TextField17'];
TextField18 = json['TextField18'];
TextField19 = json['TextField19'];
TextField20 = json['TextField20'];
Updated = JsonConverters.fromJson(json['Updated'],'DateTime',context!);
Created = JsonConverters.fromJson(json['Created'],'DateTime',context!);
return this;
}
Map<String, dynamic> toJson() => {
'UserId': UserId,
'Firstname': Firstname,
'Lastname': Lastname,
'Phone': Phone,
'Email': Email,
'Active': Active,
'FacebookUsername': FacebookUsername,
'TextField1': TextField1,
'TextField2': TextField2,
'TextField3': TextField3,
'TextField4': TextField4,
'TextField5': TextField5,
'TextField6': TextField6,
'TextField7': TextField7,
'TextField8': TextField8,
'TextField9': TextField9,
'TextField10': TextField10,
'TextField11': TextField11,
'TextField12': TextField12,
'TextField13': TextField13,
'TextField14': TextField14,
'TextField15': TextField15,
'TextField16': TextField16,
'TextField17': TextField17,
'TextField18': TextField18,
'TextField19': TextField19,
'TextField20': TextField20,
'Updated': JsonConverters.toJson(Updated,'DateTime',context!),
'Created': JsonConverters.toJson(Created,'DateTime',context!)
};
getTypeName() => "GDPRCustomerInfoResponse";
TypeContext? context = _ctx;
}
class GDPRCustomerCommentsResponse implements IConvertible
{
String? CompanyId;
int? Id;
String? CustomerId;
String? Comments;
DateTime? Updated;
DateTime? Created;
Uri? ImageUrl;
GDPRCustomerCommentsResponse({this.CompanyId,this.Id,this.CustomerId,this.Comments,this.Updated,this.Created,this.ImageUrl});
GDPRCustomerCommentsResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
CompanyId = json['CompanyId'];
Id = json['Id'];
CustomerId = json['CustomerId'];
Comments = json['Comments'];
Updated = JsonConverters.fromJson(json['Updated'],'DateTime',context!);
Created = JsonConverters.fromJson(json['Created'],'DateTime',context!);
ImageUrl = JsonConverters.fromJson(json['ImageUrl'],'Uri',context!);
return this;
}
Map<String, dynamic> toJson() => {
'CompanyId': CompanyId,
'Id': Id,
'CustomerId': CustomerId,
'Comments': Comments,
'Updated': JsonConverters.toJson(Updated,'DateTime',context!),
'Created': JsonConverters.toJson(Created,'DateTime',context!),
'ImageUrl': JsonConverters.toJson(ImageUrl,'Uri',context!)
};
getTypeName() => "GDPRCustomerCommentsResponse";
TypeContext? context = _ctx;
}
class GDPRCustomerNewsletterLogResponse implements IConvertible
{
String? CompanyId;
int? Id;
int? NewslettersId;
String? Receiver;
String? Sender;
String? MessageTitle;
String? MessageBody;
bool? Sent;
DateTime? Created;
GDPRCustomerNewsletterLogResponse({this.CompanyId,this.Id,this.NewslettersId,this.Receiver,this.Sender,this.MessageTitle,this.MessageBody,this.Sent,this.Created});
GDPRCustomerNewsletterLogResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
CompanyId = json['CompanyId'];
Id = json['Id'];
NewslettersId = json['NewslettersId'];
Receiver = json['Receiver'];
Sender = json['Sender'];
MessageTitle = json['MessageTitle'];
MessageBody = json['MessageBody'];
Sent = json['Sent'];
Created = JsonConverters.fromJson(json['Created'],'DateTime',context!);
return this;
}
Map<String, dynamic> toJson() => {
'CompanyId': CompanyId,
'Id': Id,
'NewslettersId': NewslettersId,
'Receiver': Receiver,
'Sender': Sender,
'MessageTitle': MessageTitle,
'MessageBody': MessageBody,
'Sent': Sent,
'Created': JsonConverters.toJson(Created,'DateTime',context!)
};
getTypeName() => "GDPRCustomerNewsletterLogResponse";
TypeContext? context = _ctx;
}
class GDPRCustomerQueryResponse implements IConvertible
{
List<GDPRCustomerBookingsResponse>? Bookings;
List<GDPRCustomerMessageLogResponse>? MessageLog;
UserProfileResponse? UserProfile;
GDPRCustomerInfoResponse? Customer;
List<GDPRCustomerCommentsResponse>? CustomerComment;
List<GDPRCustomerNewsletterLogResponse>? NewsletterLog;
ResponseStatus? ResponseStatus;
GDPRCustomerQueryResponse({this.Bookings,this.MessageLog,this.UserProfile,this.Customer,this.CustomerComment,this.NewsletterLog,this.ResponseStatus});
GDPRCustomerQueryResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Bookings = JsonConverters.fromJson(json['Bookings'],'List<GDPRCustomerBookingsResponse>',context!);
MessageLog = JsonConverters.fromJson(json['MessageLog'],'List<GDPRCustomerMessageLogResponse>',context!);
UserProfile = JsonConverters.fromJson(json['UserProfile'],'UserProfileResponse',context!);
Customer = JsonConverters.fromJson(json['Customer'],'GDPRCustomerInfoResponse',context!);
CustomerComment = JsonConverters.fromJson(json['CustomerComment'],'List<GDPRCustomerCommentsResponse>',context!);
NewsletterLog = JsonConverters.fromJson(json['NewsletterLog'],'List<GDPRCustomerNewsletterLogResponse>',context!);
ResponseStatus = JsonConverters.fromJson(json['ResponseStatus'],'ResponseStatus',context!);
return this;
}
Map<String, dynamic> toJson() => {
'Bookings': JsonConverters.toJson(Bookings,'List<GDPRCustomerBookingsResponse>',context!),
'MessageLog': JsonConverters.toJson(MessageLog,'List<GDPRCustomerMessageLogResponse>',context!),
'UserProfile': JsonConverters.toJson(UserProfile,'UserProfileResponse',context!),
'Customer': JsonConverters.toJson(Customer,'GDPRCustomerInfoResponse',context!),
'CustomerComment': JsonConverters.toJson(CustomerComment,'List<GDPRCustomerCommentsResponse>',context!),
'NewsletterLog': JsonConverters.toJson(NewsletterLog,'List<GDPRCustomerNewsletterLogResponse>',context!),
'ResponseStatus': JsonConverters.toJson(ResponseStatus,'ResponseStatus',context!)
};
getTypeName() => "GDPRCustomerQueryResponse";
TypeContext? context = _ctx;
}
// @ValidateRequest(Validator="IsAuthenticated")
class GDPRCustomerQuery implements ICompany, IConvertible
{
/**
* Enter the company and id you want to see the information for a resource, if blank company id and you are an admin, your company id will be used. If blank id, all resources will be shown
*/
// @ApiMember(Description="Enter the company and id you want to see the information for a resource, if blank company id and you are an admin, your company id will be used. If blank id, all resources will be shown ", IsRequired=true, ParameterType="query")
String? CompanyId;
/**
* Id of the customer
*/
// @ApiMember(Description="Id of the customer", IsRequired=true, ParameterType="path")
String? CustomerId;
GDPRCustomerQuery({this.CompanyId,this.CustomerId});
GDPRCustomerQuery.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
CompanyId = json['CompanyId'];
CustomerId = json['CustomerId'];
return this;
}
Map<String, dynamic> toJson() => {
'CompanyId': CompanyId,
'CustomerId': CustomerId
};
getTypeName() => "GDPRCustomerQuery";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'api.bokamera.se', types: <String, TypeInfo> {
'GDPRCustomerBookingsResponse': TypeInfo(TypeOf.Class, create:() => GDPRCustomerBookingsResponse()),
'GDPRCustomerMessageLogResponse': TypeInfo(TypeOf.Class, create:() => GDPRCustomerMessageLogResponse()),
'UserProfileResponse': TypeInfo(TypeOf.Class, create:() => UserProfileResponse()),
'GDPRCustomerInfoResponse': TypeInfo(TypeOf.Class, create:() => GDPRCustomerInfoResponse()),
'GDPRCustomerCommentsResponse': TypeInfo(TypeOf.Class, create:() => GDPRCustomerCommentsResponse()),
'Uri': TypeInfo(TypeOf.Class, create:() => Uri()),
'GDPRCustomerNewsletterLogResponse': TypeInfo(TypeOf.Class, create:() => GDPRCustomerNewsletterLogResponse()),
'GDPRCustomerQueryResponse': TypeInfo(TypeOf.Class, create:() => GDPRCustomerQueryResponse()),
'List<GDPRCustomerBookingsResponse>': TypeInfo(TypeOf.Class, create:() => <GDPRCustomerBookingsResponse>[]),
'List<GDPRCustomerMessageLogResponse>': TypeInfo(TypeOf.Class, create:() => <GDPRCustomerMessageLogResponse>[]),
'List<GDPRCustomerCommentsResponse>': TypeInfo(TypeOf.Class, create:() => <GDPRCustomerCommentsResponse>[]),
'List<GDPRCustomerNewsletterLogResponse>': TypeInfo(TypeOf.Class, create:() => <GDPRCustomerNewsletterLogResponse>[]),
'GDPRCustomerQuery': TypeInfo(TypeOf.Class, create:() => GDPRCustomerQuery()),
});
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 /gdpr/customers/{CustomerId} HTTP/1.1 Host: api.bokamera.se Accept: text/csv
HTTP/1.1 200 OK Content-Type: text/csv Content-Length: length {"Bookings":[{"Id":0,"ServiceId":0,"StatusId":0,"UnbookedOn":"0001-01-01T00:00:00","UnbookedComments":"String","BookedComments":"String","BookedBy":"String","Comments":"String","TextField1":"String","TextField2":"String","TextField3":"String","TextField4":"String","TextField5":"String","TextField6":"String","TextField7":"String","TextField8":"String","TextField9":"String","TextField10":"String","TextField11":"String","TextField12":"String","TextField13":"String","TextField14":"String","TextField15":"String","TextField16":"String","TextField17":"String","TextField18":"String","TextField19":"String","TextField20":"String","CommentsToCustomer":"String"}],"MessageLog":[{"Id":0,"BookingId":0,"Receiver":"String","Sender":"String","MessageTitle":"String","MessageBody":"String","CreatedBy":"String","Sent":false,"SentDate":"0001-01-01T00:00:00","SendMethodId":0}],"UserProfile":{"Firstname":"String","Lastname":"String","Phone":"String","Email":"String"},"Customer":{"Firstname":"String","Lastname":"String","Phone":"String","Email":"String","Active":false,"FacebookUsername":"String","TextField1":"String","TextField2":"String","TextField3":"String","TextField4":"String","TextField5":"String","TextField6":"String","TextField7":"String","TextField8":"String","TextField9":"String","TextField10":"String","TextField11":"String","TextField12":"String","TextField13":"String","TextField14":"String","TextField15":"String","TextField16":"String","TextField17":"String","TextField18":"String","TextField19":"String","TextField20":"String"},"CustomerComment":[{"Id":0,"Comments":"String"}],"NewsletterLog":[{"Id":0,"NewslettersId":0,"Receiver":"String","Sender":"String","MessageTitle":"String","MessageBody":"String","Sent":false}],"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}}}