DigiOffice API Services Services

<back to all web services

OutlookAddinOptions

Requires Authentication
<?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 ConditionalFormatting implements JsonSerializable
{
    public function __construct(
        /** @var string|null */
        public ?string $Color=null,
        /** @var bool|null */
        public ?bool $Bold=null,
        /** @var bool|null */
        public ?bool $Italic=null,
        /** @var bool|null */
        public ?bool $StrikeThrough=null,
        /** @var bool|null */
        public ?bool $Underline=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['Color'])) $this->Color = $o['Color'];
        if (isset($o['Bold'])) $this->Bold = $o['Bold'];
        if (isset($o['Italic'])) $this->Italic = $o['Italic'];
        if (isset($o['StrikeThrough'])) $this->StrikeThrough = $o['StrikeThrough'];
        if (isset($o['Underline'])) $this->Underline = $o['Underline'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->Color)) $o['Color'] = $this->Color;
        if (isset($this->Bold)) $o['Bold'] = $this->Bold;
        if (isset($this->Italic)) $o['Italic'] = $this->Italic;
        if (isset($this->StrikeThrough)) $o['StrikeThrough'] = $this->StrikeThrough;
        if (isset($this->Underline)) $o['Underline'] = $this->Underline;
        return empty($o) ? new class(){} : $o;
    }
}

class OutlookAddinOptions implements JsonSerializable
{
    public function __construct(
        /** @var ConditionalFormatting|null */
        public ?ConditionalFormatting $RegisteredMail=null,
        /** @var ConditionalFormatting|null */
        public ?ConditionalFormatting $ToRegisterMail=null,
        /** @var ConditionalFormatting|null */
        public ?ConditionalFormatting $ErrorMail=null,
        /** @var bool|null */
        public ?bool $ForceerOpmaak=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['RegisteredMail'])) $this->RegisteredMail = JsonConverters::from('ConditionalFormatting', $o['RegisteredMail']);
        if (isset($o['ToRegisterMail'])) $this->ToRegisterMail = JsonConverters::from('ConditionalFormatting', $o['ToRegisterMail']);
        if (isset($o['ErrorMail'])) $this->ErrorMail = JsonConverters::from('ConditionalFormatting', $o['ErrorMail']);
        if (isset($o['ForceerOpmaak'])) $this->ForceerOpmaak = $o['ForceerOpmaak'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->RegisteredMail)) $o['RegisteredMail'] = JsonConverters::to('ConditionalFormatting', $this->RegisteredMail);
        if (isset($this->ToRegisterMail)) $o['ToRegisterMail'] = JsonConverters::to('ConditionalFormatting', $this->ToRegisterMail);
        if (isset($this->ErrorMail)) $o['ErrorMail'] = JsonConverters::to('ConditionalFormatting', $this->ErrorMail);
        if (isset($this->ForceerOpmaak)) $o['ForceerOpmaak'] = $this->ForceerOpmaak;
        return empty($o) ? new class(){} : $o;
    }
}

PHP OutlookAddinOptions 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.

POST /xml/oneway/OutlookAddinOptions HTTP/1.1 
Host: test-do-services.klokgroep.nl 
Accept: application/xml
Content-Type: application/xml
Content-Length: length

<OutlookAddinOptions xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/IDB.API.DMS">
  <ErrorMail>
    <Bold>false</Bold>
    <Color>String</Color>
    <Italic>false</Italic>
    <StrikeThrough>false</StrikeThrough>
    <Underline>false</Underline>
  </ErrorMail>
  <ForceerOpmaak>false</ForceerOpmaak>
  <RegisteredMail>
    <Bold>false</Bold>
    <Color>String</Color>
    <Italic>false</Italic>
    <StrikeThrough>false</StrikeThrough>
    <Underline>false</Underline>
  </RegisteredMail>
  <ToRegisterMail>
    <Bold>false</Bold>
    <Color>String</Color>
    <Italic>false</Italic>
    <StrikeThrough>false</StrikeThrough>
    <Underline>false</Underline>
  </ToRegisterMail>
</OutlookAddinOptions>