<back to all web services

GetCurrentAccountSettingsMessage

The following routes are available for this service:
All Verbs/RestApi/Sitefinity/Analytics/GetCurrentAccountSettings
<?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 GetCurrentAccountSettingsMessage implements JsonSerializable
{
    public function __construct(
        /** @var string|null */
        public ?string $ClientId=null,
        /** @var string|null */
        public ?string $ClientSecret=null,
        /** @var string|null */
        public ?string $SelectedProfile=null,
        /** @var string|null */
        public ?string $TrackedDomain=null,
        /** @var string */
        public string $SiteId=''
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['ClientId'])) $this->ClientId = $o['ClientId'];
        if (isset($o['ClientSecret'])) $this->ClientSecret = $o['ClientSecret'];
        if (isset($o['SelectedProfile'])) $this->SelectedProfile = $o['SelectedProfile'];
        if (isset($o['TrackedDomain'])) $this->TrackedDomain = $o['TrackedDomain'];
        if (isset($o['SiteId'])) $this->SiteId = $o['SiteId'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->ClientId)) $o['ClientId'] = $this->ClientId;
        if (isset($this->ClientSecret)) $o['ClientSecret'] = $this->ClientSecret;
        if (isset($this->SelectedProfile)) $o['SelectedProfile'] = $this->SelectedProfile;
        if (isset($this->TrackedDomain)) $o['TrackedDomain'] = $this->TrackedDomain;
        if (isset($this->SiteId)) $o['SiteId'] = $this->SiteId;
        return empty($o) ? new class(){} : $o;
    }
}

class GetCurrentAccountSettingsData implements JsonSerializable
{
    public function __construct(
        /** @var string|null */
        public ?string $ClientId=null,
        /** @var string|null */
        public ?string $ClientSecret=null,
        /** @var string|null */
        public ?string $TrackingCode=null,
        /** @var string|null */
        public ?string $TrackedDomain=null,
        /** @var string|null */
        public ?string $SelectedAccount=null,
        /** @var string|null */
        public ?string $SelectedProfile=null,
        /** @var string|null */
        public ?string $SelectedWebPropertyId=null,
        /** @var bool|null */
        public ?bool $UseEquals=null,
        /** @var bool|null */
        public ?bool $PrependHost=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['ClientId'])) $this->ClientId = $o['ClientId'];
        if (isset($o['ClientSecret'])) $this->ClientSecret = $o['ClientSecret'];
        if (isset($o['TrackingCode'])) $this->TrackingCode = $o['TrackingCode'];
        if (isset($o['TrackedDomain'])) $this->TrackedDomain = $o['TrackedDomain'];
        if (isset($o['SelectedAccount'])) $this->SelectedAccount = $o['SelectedAccount'];
        if (isset($o['SelectedProfile'])) $this->SelectedProfile = $o['SelectedProfile'];
        if (isset($o['SelectedWebPropertyId'])) $this->SelectedWebPropertyId = $o['SelectedWebPropertyId'];
        if (isset($o['UseEquals'])) $this->UseEquals = $o['UseEquals'];
        if (isset($o['PrependHost'])) $this->PrependHost = $o['PrependHost'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->ClientId)) $o['ClientId'] = $this->ClientId;
        if (isset($this->ClientSecret)) $o['ClientSecret'] = $this->ClientSecret;
        if (isset($this->TrackingCode)) $o['TrackingCode'] = $this->TrackingCode;
        if (isset($this->TrackedDomain)) $o['TrackedDomain'] = $this->TrackedDomain;
        if (isset($this->SelectedAccount)) $o['SelectedAccount'] = $this->SelectedAccount;
        if (isset($this->SelectedProfile)) $o['SelectedProfile'] = $this->SelectedProfile;
        if (isset($this->SelectedWebPropertyId)) $o['SelectedWebPropertyId'] = $this->SelectedWebPropertyId;
        if (isset($this->UseEquals)) $o['UseEquals'] = $this->UseEquals;
        if (isset($this->PrependHost)) $o['PrependHost'] = $this->PrependHost;
        return empty($o) ? new class(){} : $o;
    }
}

PHP GetCurrentAccountSettingsMessage DTOs

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

HTTP + OTHER

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

POST /RestApi/Sitefinity/Analytics/GetCurrentAccountSettings HTTP/1.1 
Host: www.asg.com.au 
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length

{"ClientId":"String","ClientSecret":"String","SelectedProfile":"String","TrackedDomain":"String"}
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length

{"ClientId":"String","ClientSecret":"String","TrackingCode":"String","TrackedDomain":"String","SelectedAccount":"String","SelectedProfile":"String","SelectedWebPropertyId":"String","UseEquals":false,"PrependHost":false}