| GET | /v1/forms/{FormUID}/invites |
|---|
import 'package:servicestack/servicestack.dart';
import 'dart:typed_data';
class FormFillReceiptLine implements IConvertible
{
String? Channel;
String? To;
String? Outcome;
FormFillReceiptLine({this.Channel,this.To,this.Outcome});
FormFillReceiptLine.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Channel = json['Channel'];
To = json['To'];
Outcome = json['Outcome'];
return this;
}
Map<String, dynamic> toJson() => {
'Channel': Channel,
'To': To,
'Outcome': Outcome
};
getTypeName() => "FormFillReceiptLine";
TypeContext? context = _ctx;
}
class FormInviteView implements IConvertible
{
String? InviteUID;
String? Name;
String? Email;
String? Phone;
String? CreatedBy;
DateTime? CreatedAt;
DateTime? ExpiresAt;
DateTime? SentAt;
DateTime? LastSentAt;
int? SendCount;
DateTime? OpenedAt;
DateTime? RevokedAt;
String? Number;
String? State;
String? Link;
List<FormFillReceiptLine>? Sends = [];
FormInviteView({this.InviteUID,this.Name,this.Email,this.Phone,this.CreatedBy,this.CreatedAt,this.ExpiresAt,this.SentAt,this.LastSentAt,this.SendCount,this.OpenedAt,this.RevokedAt,this.Number,this.State,this.Link,this.Sends});
FormInviteView.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
InviteUID = json['InviteUID'];
Name = json['Name'];
Email = json['Email'];
Phone = json['Phone'];
CreatedBy = json['CreatedBy'];
CreatedAt = JsonConverters.fromJson(json['CreatedAt'],'DateTime',context!);
ExpiresAt = JsonConverters.fromJson(json['ExpiresAt'],'DateTime',context!);
SentAt = JsonConverters.fromJson(json['SentAt'],'DateTime',context!);
LastSentAt = JsonConverters.fromJson(json['LastSentAt'],'DateTime',context!);
SendCount = json['SendCount'];
OpenedAt = JsonConverters.fromJson(json['OpenedAt'],'DateTime',context!);
RevokedAt = JsonConverters.fromJson(json['RevokedAt'],'DateTime',context!);
Number = json['Number'];
State = json['State'];
Link = json['Link'];
Sends = JsonConverters.fromJson(json['Sends'],'List<FormFillReceiptLine>',context!);
return this;
}
Map<String, dynamic> toJson() => {
'InviteUID': InviteUID,
'Name': Name,
'Email': Email,
'Phone': Phone,
'CreatedBy': CreatedBy,
'CreatedAt': JsonConverters.toJson(CreatedAt,'DateTime',context!),
'ExpiresAt': JsonConverters.toJson(ExpiresAt,'DateTime',context!),
'SentAt': JsonConverters.toJson(SentAt,'DateTime',context!),
'LastSentAt': JsonConverters.toJson(LastSentAt,'DateTime',context!),
'SendCount': SendCount,
'OpenedAt': JsonConverters.toJson(OpenedAt,'DateTime',context!),
'RevokedAt': JsonConverters.toJson(RevokedAt,'DateTime',context!),
'Number': Number,
'State': State,
'Link': Link,
'Sends': JsonConverters.toJson(Sends,'List<FormFillReceiptLine>',context!)
};
getTypeName() => "FormInviteView";
TypeContext? context = _ctx;
}
class FormInvitesResponse implements IConvertible
{
List<FormInviteView>? Invites = [];
List<FormInviteView>? Created = [];
int? Emails;
int? Texts;
String? Consequence;
ResponseStatus? ResponseStatus;
FormInvitesResponse({this.Invites,this.Created,this.Emails,this.Texts,this.Consequence,this.ResponseStatus});
FormInvitesResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Invites = JsonConverters.fromJson(json['Invites'],'List<FormInviteView>',context!);
Created = JsonConverters.fromJson(json['Created'],'List<FormInviteView>',context!);
Emails = json['Emails'];
Texts = json['Texts'];
Consequence = json['Consequence'];
ResponseStatus = JsonConverters.fromJson(json['ResponseStatus'],'ResponseStatus',context!);
return this;
}
Map<String, dynamic> toJson() => {
'Invites': JsonConverters.toJson(Invites,'List<FormInviteView>',context!),
'Created': JsonConverters.toJson(Created,'List<FormInviteView>',context!),
'Emails': Emails,
'Texts': Texts,
'Consequence': Consequence,
'ResponseStatus': JsonConverters.toJson(ResponseStatus,'ResponseStatus',context!)
};
getTypeName() => "FormInvitesResponse";
TypeContext? context = _ctx;
}
class FormInvitesRequest implements IConvertible
{
String? FormUID;
FormInvitesRequest({this.FormUID});
FormInvitesRequest.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
FormUID = json['FormUID'];
return this;
}
Map<String, dynamic> toJson() => {
'FormUID': FormUID
};
getTypeName() => "FormInvitesRequest";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'api.dev.dynamics.trendsic.com', types: <String, TypeInfo> {
'FormFillReceiptLine': TypeInfo(TypeOf.Class, create:() => FormFillReceiptLine()),
'FormInviteView': TypeInfo(TypeOf.Class, create:() => FormInviteView()),
'List<FormFillReceiptLine>': TypeInfo(TypeOf.Class, create:() => <FormFillReceiptLine>[]),
'FormInvitesResponse': TypeInfo(TypeOf.Class, create:() => FormInvitesResponse()),
'List<FormInviteView>': TypeInfo(TypeOf.Class, create:() => <FormInviteView>[]),
'FormInvitesRequest': TypeInfo(TypeOf.Class, create:() => FormInvitesRequest()),
});
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /v1/forms/{FormUID}/invites HTTP/1.1
Host: api.dev.dynamics.trendsic.com
Accept: text/jsv
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
Invites:
[
{
InviteUID: 00000000000000000000000000000000,
Name: String,
Email: String,
Phone: String,
CreatedBy: String,
CreatedAt: 0001-01-01,
ExpiresAt: 0001-01-01,
SentAt: 0001-01-01,
LastSentAt: 0001-01-01,
SendCount: 0,
OpenedAt: 0001-01-01,
RevokedAt: 0001-01-01,
Number: String,
State: String,
Link: String,
Sends:
[
{
Channel: String,
To: String,
Outcome: String
}
]
}
],
Created:
[
{
InviteUID: 00000000000000000000000000000000,
Name: String,
Email: String,
Phone: String,
CreatedBy: String,
CreatedAt: 0001-01-01,
ExpiresAt: 0001-01-01,
SentAt: 0001-01-01,
LastSentAt: 0001-01-01,
SendCount: 0,
OpenedAt: 0001-01-01,
RevokedAt: 0001-01-01,
Number: String,
State: String,
Link: String,
Sends:
[
{
Channel: String,
To: String,
Outcome: String
}
]
}
],
Emails: 0,
Texts: 0,
Consequence: String,
ResponseStatus:
{
ErrorCode: String,
Message: String,
StackTrace: String,
Errors:
[
{
ErrorCode: String,
FieldName: String,
Message: String,
Meta:
{
String: String
}
}
],
Meta:
{
String: String
}
}
}