| GET | /campaign/inbox/formmeta |
|---|
<?php namespace dtos;
use DateTime;
use Exception;
use DateInterval;
use JsonSerializable;
use ServiceStack\{IReturn,IReturnVoid,IGet,IPost,IPut,IDelete,IPatch,IMeta,IHasSessionId,IHasBearerToken,IHasVersion};
use ServiceStack\{ICrud,ICreateDb,IUpdateDb,IPatchDb,IDeleteDb,ISaveDb,AuditBase,QueryDb,QueryDb2,QueryData,QueryData2,QueryResponse};
use ServiceStack\{ResponseStatus,ResponseError,EmptyResponse,IdResponse,ArrayList,KeyValuePair2,StringResponse,StringsResponse,Tuple2,Tuple3,ByteArray};
use ServiceStack\{JsonConverters,Returns,TypeContext};
class FormFieldOption implements JsonSerializable
{
public function __construct(
/** @var string|null */
public ?string $Value=null,
/** @var string|null */
public ?string $Label=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['Value'])) $this->Value = $o['Value'];
if (isset($o['Label'])) $this->Label = $o['Label'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->Value)) $o['Value'] = $this->Value;
if (isset($this->Label)) $o['Label'] = $this->Label;
return empty($o) ? new class(){} : $o;
}
}
class FormField implements JsonSerializable
{
public function __construct(
/** @var int */
public int $Id=0,
/** @var string|null */
public ?string $ControlType=null,
/** @var string|null */
public ?string $Label=null,
/** @var string|null */
public ?string $Placeholder=null,
/** @var string|null */
public ?string $Help=null,
/** @var string|null */
public ?string $Name=null,
/** @var int */
public int $SortOrder=0,
/** @var array<FormFieldOption>|null */
public ?array $Options=null,
/** @var array<string>|null */
public ?array $Validation=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['Id'])) $this->Id = $o['Id'];
if (isset($o['ControlType'])) $this->ControlType = $o['ControlType'];
if (isset($o['Label'])) $this->Label = $o['Label'];
if (isset($o['Placeholder'])) $this->Placeholder = $o['Placeholder'];
if (isset($o['Help'])) $this->Help = $o['Help'];
if (isset($o['Name'])) $this->Name = $o['Name'];
if (isset($o['SortOrder'])) $this->SortOrder = $o['SortOrder'];
if (isset($o['Options'])) $this->Options = JsonConverters::fromArray('FormFieldOption', $o['Options']);
if (isset($o['Validation'])) $this->Validation = JsonConverters::fromArray('string', $o['Validation']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->Id)) $o['Id'] = $this->Id;
if (isset($this->ControlType)) $o['ControlType'] = $this->ControlType;
if (isset($this->Label)) $o['Label'] = $this->Label;
if (isset($this->Placeholder)) $o['Placeholder'] = $this->Placeholder;
if (isset($this->Help)) $o['Help'] = $this->Help;
if (isset($this->Name)) $o['Name'] = $this->Name;
if (isset($this->SortOrder)) $o['SortOrder'] = $this->SortOrder;
if (isset($this->Options)) $o['Options'] = JsonConverters::toArray('FormFieldOption', $this->Options);
if (isset($this->Validation)) $o['Validation'] = JsonConverters::toArray('string', $this->Validation);
return empty($o) ? new class(){} : $o;
}
}
class CampaignActionFile implements JsonSerializable
{
public function __construct(
/** @var string|null */
public ?string $Name=null,
/** @var string|null */
public ?string $FileType=null,
/** @var string|null */
public ?string $FileSize=null,
/** @var string|null */
public ?string $Extension=null,
/** @var string|null */
public ?string $UploadUrl=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['Name'])) $this->Name = $o['Name'];
if (isset($o['FileType'])) $this->FileType = $o['FileType'];
if (isset($o['FileSize'])) $this->FileSize = $o['FileSize'];
if (isset($o['Extension'])) $this->Extension = $o['Extension'];
if (isset($o['UploadUrl'])) $this->UploadUrl = $o['UploadUrl'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->Name)) $o['Name'] = $this->Name;
if (isset($this->FileType)) $o['FileType'] = $this->FileType;
if (isset($this->FileSize)) $o['FileSize'] = $this->FileSize;
if (isset($this->Extension)) $o['Extension'] = $this->Extension;
if (isset($this->UploadUrl)) $o['UploadUrl'] = $this->UploadUrl;
return empty($o) ? new class(){} : $o;
}
}
class CampaignActions implements JsonSerializable
{
public function __construct(
// @DataMember(Order=1)
// @Required()
/** @var int */
public int $Id=0,
// @DataMember(Order=2)
// @Required()
// @References("typeof(digitaluapi.ServiceModel.Types.Campaigns)")
/** @var int */
public int $CampaignsId=0,
// @DataMember(Order=3)
// @References("typeof(digitaluapi.ServiceModel.Types.Actions)")
/** @var int|null */
public ?int $ActionsId=null,
// @DataMember(Order=4)
/** @var string|null */
public ?string $ButtonName=null,
// @DataMember(Order=5)
// @References("typeof(digitaluapi.ServiceModel.Types.ActionTypes)")
/** @var int|null */
public ?int $ActionTypesId=null,
// @DataMember(Order=6)
/** @var string|null */
public ?string $Description=null,
// @DataMember(Order=7)
/** @var int|null */
public ?int $OfferOrder=null,
// @DataMember(Order=8)
/** @var bool|null */
public ?bool $StandOut=null,
// @DataMember(Order=9)
// @Required()
/** @var string */
public string $PublicAccessGuid='',
// @DataMember(Order=10)
/** @var array<FormField>|null */
public ?array $FormMeta=null,
// @DataMember(Order=11)
/** @var array<CampaignActionFile>|null */
public ?array $Files=null,
// @DataMember(Order=12)
/** @var string|null */
public ?string $SentToEmailAddress=null,
// @DataMember(Order=13)
/** @var string|null */
public ?string $CcEmailAddress=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['Id'])) $this->Id = $o['Id'];
if (isset($o['CampaignsId'])) $this->CampaignsId = $o['CampaignsId'];
if (isset($o['ActionsId'])) $this->ActionsId = $o['ActionsId'];
if (isset($o['ButtonName'])) $this->ButtonName = $o['ButtonName'];
if (isset($o['ActionTypesId'])) $this->ActionTypesId = $o['ActionTypesId'];
if (isset($o['Description'])) $this->Description = $o['Description'];
if (isset($o['OfferOrder'])) $this->OfferOrder = $o['OfferOrder'];
if (isset($o['StandOut'])) $this->StandOut = $o['StandOut'];
if (isset($o['PublicAccessGuid'])) $this->PublicAccessGuid = $o['PublicAccessGuid'];
if (isset($o['FormMeta'])) $this->FormMeta = JsonConverters::fromArray('FormField', $o['FormMeta']);
if (isset($o['Files'])) $this->Files = JsonConverters::fromArray('CampaignActionFile', $o['Files']);
if (isset($o['SentToEmailAddress'])) $this->SentToEmailAddress = $o['SentToEmailAddress'];
if (isset($o['CcEmailAddress'])) $this->CcEmailAddress = $o['CcEmailAddress'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->Id)) $o['Id'] = $this->Id;
if (isset($this->CampaignsId)) $o['CampaignsId'] = $this->CampaignsId;
if (isset($this->ActionsId)) $o['ActionsId'] = $this->ActionsId;
if (isset($this->ButtonName)) $o['ButtonName'] = $this->ButtonName;
if (isset($this->ActionTypesId)) $o['ActionTypesId'] = $this->ActionTypesId;
if (isset($this->Description)) $o['Description'] = $this->Description;
if (isset($this->OfferOrder)) $o['OfferOrder'] = $this->OfferOrder;
if (isset($this->StandOut)) $o['StandOut'] = $this->StandOut;
if (isset($this->PublicAccessGuid)) $o['PublicAccessGuid'] = $this->PublicAccessGuid;
if (isset($this->FormMeta)) $o['FormMeta'] = JsonConverters::toArray('FormField', $this->FormMeta);
if (isset($this->Files)) $o['Files'] = JsonConverters::toArray('CampaignActionFile', $this->Files);
if (isset($this->SentToEmailAddress)) $o['SentToEmailAddress'] = $this->SentToEmailAddress;
if (isset($this->CcEmailAddress)) $o['CcEmailAddress'] = $this->CcEmailAddress;
return empty($o) ? new class(){} : $o;
}
}
class InboxActionResponse implements JsonSerializable
{
public function __construct(
/** @var CampaignActions|null */
public ?CampaignActions $campaignAction=null,
/** @var ResponseStatus|null */
public ?ResponseStatus $ResponseStatus=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['campaignAction'])) $this->campaignAction = JsonConverters::from('CampaignActions', $o['campaignAction']);
if (isset($o['ResponseStatus'])) $this->ResponseStatus = JsonConverters::from('ResponseStatus', $o['ResponseStatus']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->campaignAction)) $o['campaignAction'] = JsonConverters::to('CampaignActions', $this->campaignAction);
if (isset($this->ResponseStatus)) $o['ResponseStatus'] = JsonConverters::to('ResponseStatus', $this->ResponseStatus);
return empty($o) ? new class(){} : $o;
}
}
class GetCampaignActionClientForm implements JsonSerializable
{
public function __construct(
/** @var string */
public string $CommsGuid='',
/** @var int */
public int $CampaignActionsRequestsId=0
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['CommsGuid'])) $this->CommsGuid = $o['CommsGuid'];
if (isset($o['CampaignActionsRequestsId'])) $this->CampaignActionsRequestsId = $o['CampaignActionsRequestsId'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->CommsGuid)) $o['CommsGuid'] = $this->CommsGuid;
if (isset($this->CampaignActionsRequestsId)) $o['CampaignActionsRequestsId'] = $this->CampaignActionsRequestsId;
return empty($o) ? new class(){} : $o;
}
}
PHP GetCampaignActionClientForm DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /campaign/inbox/formmeta HTTP/1.1 Host: duengageapi.uat.scadsoftware.com Accept: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length
<InboxActionResponse 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>
<campaignAction xmlns:d2p1="http://schemas.datacontract.org/2004/07/digitaluapi.ServiceModel.Types">
<d2p1:ActionTypesId>0</d2p1:ActionTypesId>
<d2p1:ActionsId>0</d2p1:ActionsId>
<d2p1:ButtonName>String</d2p1:ButtonName>
<d2p1:CampaignsId>0</d2p1:CampaignsId>
<d2p1:CcEmailAddress>String</d2p1:CcEmailAddress>
<d2p1:Description>String</d2p1:Description>
<d2p1:Files>
<CampaignActionFile>
<Extension>String</Extension>
<FileSize>String</FileSize>
<FileType>String</FileType>
<Name>String</Name>
<UploadUrl>String</UploadUrl>
</CampaignActionFile>
</d2p1:Files>
<d2p1: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:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d5p1:string>String</d5p1:string>
</Validation>
</FormField>
</d2p1:FormMeta>
<d2p1:Id>0</d2p1:Id>
<d2p1:OfferOrder>0</d2p1:OfferOrder>
<d2p1:PublicAccessGuid>00000000-0000-0000-0000-000000000000</d2p1:PublicAccessGuid>
<d2p1:SentToEmailAddress>String</d2p1:SentToEmailAddress>
<d2p1:StandOut>false</d2p1:StandOut>
</campaignAction>
</InboxActionResponse>