| Requires any of the roles: | Client, Admin, Partner |
| PUT | /campaign/actionform | Set Campaign Action Form |
|---|
import 'package:servicestack/servicestack.dart';
class SetCampaignActionFormResponse implements IConvertible
{
bool? Status;
ResponseStatus? ResponseStatus;
SetCampaignActionFormResponse({this.Status,this.ResponseStatus});
SetCampaignActionFormResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Status = json['Status'];
ResponseStatus = JsonConverters.fromJson(json['ResponseStatus'],'ResponseStatus',context!);
return this;
}
Map<String, dynamic> toJson() => {
'Status': Status,
'ResponseStatus': JsonConverters.toJson(ResponseStatus,'ResponseStatus',context!)
};
getTypeName() => "SetCampaignActionFormResponse";
TypeContext? context = _ctx;
}
class FormFieldOption implements IConvertible
{
String? Value;
String? Label;
FormFieldOption({this.Value,this.Label});
FormFieldOption.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Value = json['Value'];
Label = json['Label'];
return this;
}
Map<String, dynamic> toJson() => {
'Value': Value,
'Label': Label
};
getTypeName() => "FormFieldOption";
TypeContext? context = _ctx;
}
class FormField implements IConvertible
{
int? Id;
String? ControlType;
String? Label;
String? Placeholder;
String? Help;
String? Name;
int? SortOrder;
List<FormFieldOption>? Options;
List<String>? Validation;
FormField({this.Id,this.ControlType,this.Label,this.Placeholder,this.Help,this.Name,this.SortOrder,this.Options,this.Validation});
FormField.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
Id = json['Id'];
ControlType = json['ControlType'];
Label = json['Label'];
Placeholder = json['Placeholder'];
Help = json['Help'];
Name = json['Name'];
SortOrder = json['SortOrder'];
Options = JsonConverters.fromJson(json['Options'],'List<FormFieldOption>',context!);
Validation = JsonConverters.fromJson(json['Validation'],'List<String>',context!);
return this;
}
Map<String, dynamic> toJson() => {
'Id': Id,
'ControlType': ControlType,
'Label': Label,
'Placeholder': Placeholder,
'Help': Help,
'Name': Name,
'SortOrder': SortOrder,
'Options': JsonConverters.toJson(Options,'List<FormFieldOption>',context!),
'Validation': JsonConverters.toJson(Validation,'List<String>',context!)
};
getTypeName() => "FormField";
TypeContext? context = _ctx;
}
class SetCampaignActionForm implements IConvertible
{
// @DataMember(Order=1)
// @Validate(Validator="NotNull")
int? CampaignsId;
int? CampaignActionsId;
List<FormField>? FormMeta;
SetCampaignActionForm({this.CampaignsId,this.CampaignActionsId,this.FormMeta});
SetCampaignActionForm.fromJson(Map<String, dynamic> json) { fromMap(json); }
fromMap(Map<String, dynamic> json) {
CampaignsId = json['CampaignsId'];
CampaignActionsId = json['CampaignActionsId'];
FormMeta = JsonConverters.fromJson(json['FormMeta'],'List<FormField>',context!);
return this;
}
Map<String, dynamic> toJson() => {
'CampaignsId': CampaignsId,
'CampaignActionsId': CampaignActionsId,
'FormMeta': JsonConverters.toJson(FormMeta,'List<FormField>',context!)
};
getTypeName() => "SetCampaignActionForm";
TypeContext? context = _ctx;
}
TypeContext _ctx = TypeContext(library: 'duengageapi.uat.scadsoftware.com', types: <String, TypeInfo> {
'SetCampaignActionFormResponse': TypeInfo(TypeOf.Class, create:() => SetCampaignActionFormResponse()),
'FormFieldOption': TypeInfo(TypeOf.Class, create:() => FormFieldOption()),
'FormField': TypeInfo(TypeOf.Class, create:() => FormField()),
'List<FormFieldOption>': TypeInfo(TypeOf.Class, create:() => <FormFieldOption>[]),
'SetCampaignActionForm': TypeInfo(TypeOf.Class, create:() => SetCampaignActionForm()),
'List<FormField>': TypeInfo(TypeOf.Class, create:() => <FormField>[]),
});
Dart SetCampaignActionForm 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.
PUT /campaign/actionform HTTP/1.1
Host: duengageapi.uat.scadsoftware.com
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length
{"CampaignsId":0,"CampaignActionsId":0,"FormMeta":[{"Id":0,"ControlType":"String","Label":"String","Placeholder":"String","Help":"String","Name":"String","SortOrder":0,"Options":[{"Value":"String","Label":"String"}],"Validation":["String"]}]}
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length
{"Status":false,"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}}}