digitaluapi

<back to all web services

SetCampaignActionForm

Requires Authentication
Requires any of the roles:Client, Admin, Partner
The following routes are available for this service:
PUT/campaign/actionformSet Campaign Action Form
import 'package:servicestack/servicestack.dart';
import 'dart:collection';

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 .xml suffix or ?format=xml

HTTP + XML

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: application/xml
Content-Type: application/xml
Content-Length: length

<SetCampaignActionForm xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/digitaluapi.ServiceModel">
  <CampaignActionsId>0</CampaignActionsId>
  <CampaignsId>0</CampaignsId>
  <FormMeta>
    <FormField>
      <ControlType>String</ControlType>
      <Help>String</Help>
      <Id>0</Id>
      <Label>String</Label>
      <Name>String</Name>
      <Options>
        <FormFieldOption>
          <Label>String</Label>
          <Value>String</Value>
        </FormFieldOption>
      </Options>
      <Placeholder>String</Placeholder>
      <SortOrder>0</SortOrder>
      <Validation xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
        <d4p1:string>String</d4p1:string>
      </Validation>
    </FormField>
  </FormMeta>
</SetCampaignActionForm>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<SetCampaignActionFormResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/digitaluapi.ServiceModel">
  <ResponseStatus xmlns:d2p1="http://schemas.servicestack.net/types">
    <d2p1:ErrorCode>String</d2p1:ErrorCode>
    <d2p1:Message>String</d2p1:Message>
    <d2p1:StackTrace>String</d2p1:StackTrace>
    <d2p1:Errors>
      <d2p1:ResponseError>
        <d2p1:ErrorCode>String</d2p1:ErrorCode>
        <d2p1:FieldName>String</d2p1:FieldName>
        <d2p1:Message>String</d2p1:Message>
        <d2p1:Meta xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
          <d5p1:KeyValueOfstringstring>
            <d5p1:Key>String</d5p1:Key>
            <d5p1:Value>String</d5p1:Value>
          </d5p1:KeyValueOfstringstring>
        </d2p1:Meta>
      </d2p1:ResponseError>
    </d2p1:Errors>
    <d2p1:Meta xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
      <d3p1:KeyValueOfstringstring>
        <d3p1:Key>String</d3p1:Key>
        <d3p1:Value>String</d3p1:Value>
      </d3p1:KeyValueOfstringstring>
    </d2p1:Meta>
  </ResponseStatus>
  <Status>false</Status>
</SetCampaignActionFormResponse>