digitaluapi

<back to all web services

GetCampaignActionFiles

Requires Authentication
Requires any of the roles:Client, Admin, Partner
The following routes are available for this service:
GET/campaign/actions/filesGet Campaign Action Files
import 'package:servicestack/servicestack.dart';

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 CampaignActionFile implements IConvertible
{
    String? Name;
    String? FileType;
    String? FileSize;
    String? Extension;
    String? UploadUrl;

    CampaignActionFile({this.Name,this.FileType,this.FileSize,this.Extension,this.UploadUrl});
    CampaignActionFile.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Name = json['Name'];
        FileType = json['FileType'];
        FileSize = json['FileSize'];
        Extension = json['Extension'];
        UploadUrl = json['UploadUrl'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Name': Name,
        'FileType': FileType,
        'FileSize': FileSize,
        'Extension': Extension,
        'UploadUrl': UploadUrl
    };

    getTypeName() => "CampaignActionFile";
    TypeContext? context = _ctx;
}

class CampaignActions implements IConvertible
{
    // @DataMember(Order=1)
    // @Required()
    int? Id;

    // @DataMember(Order=2)
    // @Required()
    // @References(typeof(Campaigns))
    int? CampaignsId;

    // @DataMember(Order=3)
    // @References(typeof(Actions))
    int? ActionsId;

    // @DataMember(Order=4)
    String? ButtonName;

    // @DataMember(Order=5)
    // @References(typeof(ActionTypes))
    int? ActionTypesId;

    // @DataMember(Order=6)
    String? Description;

    // @DataMember(Order=7)
    int? OfferOrder;

    // @DataMember(Order=8)
    bool? StandOut;

    // @DataMember(Order=9)
    // @Required()
    String? PublicAccessGuid;

    // @DataMember(Order=10)
    List<FormField>? FormMeta;

    // @DataMember(Order=11)
    List<CampaignActionFile>? Files;

    // @DataMember(Order=12)
    String? SentToEmailAddress;

    // @DataMember(Order=13)
    String? CcEmailAddress;

    CampaignActions({this.Id,this.CampaignsId,this.ActionsId,this.ButtonName,this.ActionTypesId,this.Description,this.OfferOrder,this.StandOut,this.PublicAccessGuid,this.FormMeta,this.Files,this.SentToEmailAddress,this.CcEmailAddress});
    CampaignActions.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Id = json['Id'];
        CampaignsId = json['CampaignsId'];
        ActionsId = json['ActionsId'];
        ButtonName = json['ButtonName'];
        ActionTypesId = json['ActionTypesId'];
        Description = json['Description'];
        OfferOrder = json['OfferOrder'];
        StandOut = json['StandOut'];
        PublicAccessGuid = json['PublicAccessGuid'];
        FormMeta = JsonConverters.fromJson(json['FormMeta'],'List<FormField>',context!);
        Files = JsonConverters.fromJson(json['Files'],'List<CampaignActionFile>',context!);
        SentToEmailAddress = json['SentToEmailAddress'];
        CcEmailAddress = json['CcEmailAddress'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Id': Id,
        'CampaignsId': CampaignsId,
        'ActionsId': ActionsId,
        'ButtonName': ButtonName,
        'ActionTypesId': ActionTypesId,
        'Description': Description,
        'OfferOrder': OfferOrder,
        'StandOut': StandOut,
        'PublicAccessGuid': PublicAccessGuid,
        'FormMeta': JsonConverters.toJson(FormMeta,'List<FormField>',context!),
        'Files': JsonConverters.toJson(Files,'List<CampaignActionFile>',context!),
        'SentToEmailAddress': SentToEmailAddress,
        'CcEmailAddress': CcEmailAddress
    };

    getTypeName() => "CampaignActions";
    TypeContext? context = _ctx;
}

class GetCampaignActionFiles implements IConvertible
{
    // @DataMember(Order=1)
    // @Validate(Validator="NotNull")
    int? CampaignsId;

    int? CampaignActionsId;

    GetCampaignActionFiles({this.CampaignsId,this.CampaignActionsId});
    GetCampaignActionFiles.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        CampaignsId = json['CampaignsId'];
        CampaignActionsId = json['CampaignActionsId'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'CampaignsId': CampaignsId,
        'CampaignActionsId': CampaignActionsId
    };

    getTypeName() => "GetCampaignActionFiles";
    TypeContext? context = _ctx;
}

TypeContext _ctx = TypeContext(library: 'duengageapi.uat.scadsoftware.com', types: <String, TypeInfo> {
    'FormFieldOption': TypeInfo(TypeOf.Class, create:() => FormFieldOption()),
    'FormField': TypeInfo(TypeOf.Class, create:() => FormField()),
    'List<FormFieldOption>': TypeInfo(TypeOf.Class, create:() => <FormFieldOption>[]),
    'CampaignActionFile': TypeInfo(TypeOf.Class, create:() => CampaignActionFile()),
    'CampaignActions': TypeInfo(TypeOf.Class, create:() => CampaignActions()),
    'List<FormField>': TypeInfo(TypeOf.Class, create:() => <FormField>[]),
    'List<CampaignActionFile>': TypeInfo(TypeOf.Class, create:() => <CampaignActionFile>[]),
    'GetCampaignActionFiles': TypeInfo(TypeOf.Class, create:() => GetCampaignActionFiles()),
});

Dart GetCampaignActionFiles DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv

HTTP + JSV

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

GET /campaign/actions/files HTTP/1.1 
Host: duengageapi.uat.scadsoftware.com 
Accept: text/jsv
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	Id: 0,
	CampaignsId: 0,
	ActionsId: 0,
	ButtonName: String,
	ActionTypesId: 0,
	Description: String,
	OfferOrder: 0,
	StandOut: False,
	PublicAccessGuid: 00000000000000000000000000000000,
	FormMeta: 
	[
		{
			Id: 0,
			ControlType: String,
			Label: String,
			Placeholder: String,
			Help: String,
			Name: String,
			SortOrder: 0,
			Options: 
			[
				{
					Value: String,
					Label: String
				}
			],
			Validation: 
			[
				String
			]
		}
	],
	Files: 
	[
		{
			Name: String,
			FileType: String,
			FileSize: String,
			Extension: String,
			UploadUrl: String
		}
	],
	SentToEmailAddress: String,
	CcEmailAddress: String
}