digitaluapi

<back to all web services

SaveCampaignActionClientForm

The following routes are available for this service:
PUT POST/campaign/inbox/form
import 'package:servicestack/servicestack.dart';

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 CampaignActionFormResults implements IConvertible
{
    String? CustomFormResults;
    String? Comments;
    List<CampaignActionFile>? CampaignActionFiles;

    CampaignActionFormResults({this.CustomFormResults,this.Comments,this.CampaignActionFiles});
    CampaignActionFormResults.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        CustomFormResults = json['CustomFormResults'];
        Comments = json['Comments'];
        CampaignActionFiles = JsonConverters.fromJson(json['CampaignActionFiles'],'List<CampaignActionFile>',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'CustomFormResults': CustomFormResults,
        'Comments': Comments,
        'CampaignActionFiles': JsonConverters.toJson(CampaignActionFiles,'List<CampaignActionFile>',context!)
    };

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

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

    // @DataMember(Order=2)
    // @Required()
    // @References(typeof(CampaignActions))
    int? CampaignActionsId;

    // @DataMember(Order=3)
    // @References(typeof(Customers))
    int? CustomersId;

    // @DataMember(Order=4)
    // @Required()
    // @Computed()
    DateTime? ActionTimestamp;

    // @DataMember(Order=5)
    CampaignActionFormResults? FormMetaResponses;

    // @DataMember(Order=6)
    Map<String,String?>? FormMetaCustomResponses;

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

    // @DataMember(Order=8)
    List<CampaignActionFile>? FormMetaFilesResponses;

    // @DataMember(Order=9)
    String? FormMetaComments;

    // @DataMember(Order=10)
    int? StatusCodesId;

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

    // @DataMember(Order=12)
    int? VersionNumber;

    CampaignActionsFormResponses({this.Id,this.CampaignActionsId,this.CustomersId,this.ActionTimestamp,this.FormMetaResponses,this.FormMetaCustomResponses,this.CampaignInstanceCommsId,this.FormMetaFilesResponses,this.FormMetaComments,this.StatusCodesId,this.SentToEmailAddress,this.VersionNumber});
    CampaignActionsFormResponses.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        Id = json['Id'];
        CampaignActionsId = json['CampaignActionsId'];
        CustomersId = json['CustomersId'];
        ActionTimestamp = JsonConverters.fromJson(json['ActionTimestamp'],'DateTime',context!);
        FormMetaResponses = JsonConverters.fromJson(json['FormMetaResponses'],'CampaignActionFormResults',context!);
        FormMetaCustomResponses = JsonConverters.toStringMap(json['FormMetaCustomResponses']);
        CampaignInstanceCommsId = json['CampaignInstanceCommsId'];
        FormMetaFilesResponses = JsonConverters.fromJson(json['FormMetaFilesResponses'],'List<CampaignActionFile>',context!);
        FormMetaComments = json['FormMetaComments'];
        StatusCodesId = json['StatusCodesId'];
        SentToEmailAddress = json['SentToEmailAddress'];
        VersionNumber = json['VersionNumber'];
        return this;
    }

    Map<String, dynamic> toJson() => {
        'Id': Id,
        'CampaignActionsId': CampaignActionsId,
        'CustomersId': CustomersId,
        'ActionTimestamp': JsonConverters.toJson(ActionTimestamp,'DateTime',context!),
        'FormMetaResponses': JsonConverters.toJson(FormMetaResponses,'CampaignActionFormResults',context!),
        'FormMetaCustomResponses': FormMetaCustomResponses,
        'CampaignInstanceCommsId': CampaignInstanceCommsId,
        'FormMetaFilesResponses': JsonConverters.toJson(FormMetaFilesResponses,'List<CampaignActionFile>',context!),
        'FormMetaComments': FormMetaComments,
        'StatusCodesId': StatusCodesId,
        'SentToEmailAddress': SentToEmailAddress,
        'VersionNumber': VersionNumber
    };

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

class SaveCampaignActionClientFormResponse implements IConvertible
{
    CampaignActionsFormResponses? CampaignActionsFormResponses;
    ResponseStatus? ResponseStatus;

    SaveCampaignActionClientFormResponse({this.CampaignActionsFormResponses,this.ResponseStatus});
    SaveCampaignActionClientFormResponse.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        CampaignActionsFormResponses = JsonConverters.fromJson(json['CampaignActionsFormResponses'],'CampaignActionsFormResponses',context!);
        ResponseStatus = JsonConverters.fromJson(json['ResponseStatus'],'ResponseStatus',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'CampaignActionsFormResponses': JsonConverters.toJson(CampaignActionsFormResponses,'CampaignActionsFormResponses',context!),
        'ResponseStatus': JsonConverters.toJson(ResponseStatus,'ResponseStatus',context!)
    };

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

class SaveCampaignActionClientForm implements IConvertible
{
    String? CommsGuid;
    int? CampaignActionsRequestsId;
    String? Comments;
    List<CampaignActionFile>? CampaignActionFiles;

    SaveCampaignActionClientForm({this.CommsGuid,this.CampaignActionsRequestsId,this.Comments,this.CampaignActionFiles});
    SaveCampaignActionClientForm.fromJson(Map<String, dynamic> json) { fromMap(json); }

    fromMap(Map<String, dynamic> json) {
        CommsGuid = json['CommsGuid'];
        CampaignActionsRequestsId = json['CampaignActionsRequestsId'];
        Comments = json['Comments'];
        CampaignActionFiles = JsonConverters.fromJson(json['CampaignActionFiles'],'List<CampaignActionFile>',context!);
        return this;
    }

    Map<String, dynamic> toJson() => {
        'CommsGuid': CommsGuid,
        'CampaignActionsRequestsId': CampaignActionsRequestsId,
        'Comments': Comments,
        'CampaignActionFiles': JsonConverters.toJson(CampaignActionFiles,'List<CampaignActionFile>',context!)
    };

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

TypeContext _ctx = TypeContext(library: 'duengageapi.uat.scadsoftware.com', types: <String, TypeInfo> {
    'CampaignActionFile': TypeInfo(TypeOf.Class, create:() => CampaignActionFile()),
    'CampaignActionFormResults': TypeInfo(TypeOf.Class, create:() => CampaignActionFormResults()),
    'List<CampaignActionFile>': TypeInfo(TypeOf.Class, create:() => <CampaignActionFile>[]),
    'CampaignActionsFormResponses': TypeInfo(TypeOf.Class, create:() => CampaignActionsFormResponses()),
    'SaveCampaignActionClientFormResponse': TypeInfo(TypeOf.Class, create:() => SaveCampaignActionClientFormResponse()),
    'SaveCampaignActionClientForm': TypeInfo(TypeOf.Class, create:() => SaveCampaignActionClientForm()),
});

Dart SaveCampaignActionClientForm 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.

POST /campaign/inbox/form HTTP/1.1 
Host: duengageapi.uat.scadsoftware.com 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	CommsGuid: 00000000000000000000000000000000,
	CampaignActionsRequestsId: 0,
	Comments: String,
	CampaignActionFiles: 
	[
		{
			Name: String,
			FileType: String,
			FileSize: String,
			Extension: String,
			UploadUrl: String
		}
	]
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	CampaignActionsFormResponses: 
	{
		Id: 0,
		CampaignActionsId: 0,
		CustomersId: 0,
		ActionTimestamp: 0001-01-01T00:00:00.0000000+00:00,
		FormMetaResponses: 
		{
			CustomFormResults: String,
			Comments: String,
			CampaignActionFiles: 
			[
				{
					Name: String,
					FileType: String,
					FileSize: String,
					Extension: String,
					UploadUrl: String
				}
			]
		},
		FormMetaCustomResponses: 
		{
			String: String
		},
		CampaignInstanceCommsId: 0,
		FormMetaFilesResponses: 
		[
			{
				Name: String,
				FileType: String,
				FileSize: String,
				Extension: String,
				UploadUrl: String
			}
		],
		FormMetaComments: String,
		StatusCodesId: 0,
		SentToEmailAddress: String,
		VersionNumber: 0
	},
	ResponseStatus: 
	{
		ErrorCode: String,
		Message: String,
		StackTrace: String,
		Errors: 
		[
			{
				ErrorCode: String,
				FieldName: String,
				Message: String,
				Meta: 
				{
					String: String
				}
			}
		],
		Meta: 
		{
			String: String
		}
	}
}