Trendsic Platform Service

<back to all web services

AdditionalServiceListRequest

Requires Authentication
The following routes are available for this service:
GET,OPTIONS/v1/additionalservice
<?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 AdditionalServiceRequestPhoto implements JsonSerializable
{
    public function __construct(
        /** @var int */
        public int $AdditionalServiceRequestPhotoID=0,
        /** @var string|null */
        public ?string $Url=null,
        /** @var string|null */
        public ?string $MimeType=null,
        /** @var DateTime|null */
        public ?DateTime $CreatedAt=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['AdditionalServiceRequestPhotoID'])) $this->AdditionalServiceRequestPhotoID = $o['AdditionalServiceRequestPhotoID'];
        if (isset($o['Url'])) $this->Url = $o['Url'];
        if (isset($o['MimeType'])) $this->MimeType = $o['MimeType'];
        if (isset($o['CreatedAt'])) $this->CreatedAt = JsonConverters::from('DateTime', $o['CreatedAt']);
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->AdditionalServiceRequestPhotoID)) $o['AdditionalServiceRequestPhotoID'] = $this->AdditionalServiceRequestPhotoID;
        if (isset($this->Url)) $o['Url'] = $this->Url;
        if (isset($this->MimeType)) $o['MimeType'] = $this->MimeType;
        if (isset($this->CreatedAt)) $o['CreatedAt'] = JsonConverters::to('DateTime', $this->CreatedAt);
        return empty($o) ? new class(){} : $o;
    }
}

class AdditionalServiceRequest implements JsonSerializable
{
    public function __construct(
        /** @var int */
        public int $AdditionalServiceRequestID=0,
        /** @var string */
        public string $AdditionalServiceRequestUID='',
        /** @var string */
        public string $TenantId='',
        /** @var string|null */
        public ?string $BranchId=null,
        /** @var string|null */
        public ?string $BranchName=null,
        /** @var int */
        public int $ProjectID=0,
        /** @var string|null */
        public ?string $ProjectName=null,
        /** @var string|null */
        public ?string $ProjectUID=null,
        /** @var int|null */
        public ?int $JobID=null,
        /** @var int|null */
        public ?int $AgreementJobID=null,
        /** @var int|null */
        public ?int $RequestedByContactID=null,
        /** @var string|null */
        public ?string $RequestedByName=null,
        /** @var int|null */
        public ?int $CustomerContactID=null,
        /** @var string|null */
        public ?string $CustomerName=null,
        /** @var string|null */
        public ?string $CustomerEmail=null,
        /** @var string|null */
        public ?string $CustomerPhone=null,
        /** @var bool|null */
        public ?bool $CustomerSmsOptIn=null,
        /** @var string|null */
        public ?string $Description=null,
        /** @var string|null */
        public ?string $Status=null,
        /** @var int|null */
        public ?int $QuoteID=null,
        /** @var string|null */
        public ?string $QuoteUID=null,
        /** @var string|null */
        public ?string $QuoteStatus=null,
        /** @var float|null */
        public ?float $QuoteTotal=null,
        /** @var bool|null */
        public ?bool $FinalPriceAfterCompletion=null,
        /** @var string|null */
        public ?string $QuoteApprovedByName=null,
        /** @var DateTime|null */
        public ?DateTime $QuoteApprovedAt=null,
        /** @var int|null */
        public ?int $ConvertedJobID=null,
        /** @var int */
        public int $PhotoCount=0,
        /** @var string|null */
        public ?string $CreatedBy=null,
        /** @var DateTime|null */
        public ?DateTime $CreatedAt=null,
        /** @var string|null */
        public ?string $UpdatedBy=null,
        /** @var DateTime|null */
        public ?DateTime $UpdatedAt=null,
        /** @var array<AdditionalServiceRequestPhoto>|null */
        public ?array $Photos=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['AdditionalServiceRequestID'])) $this->AdditionalServiceRequestID = $o['AdditionalServiceRequestID'];
        if (isset($o['AdditionalServiceRequestUID'])) $this->AdditionalServiceRequestUID = $o['AdditionalServiceRequestUID'];
        if (isset($o['TenantId'])) $this->TenantId = $o['TenantId'];
        if (isset($o['BranchId'])) $this->BranchId = $o['BranchId'];
        if (isset($o['BranchName'])) $this->BranchName = $o['BranchName'];
        if (isset($o['ProjectID'])) $this->ProjectID = $o['ProjectID'];
        if (isset($o['ProjectName'])) $this->ProjectName = $o['ProjectName'];
        if (isset($o['ProjectUID'])) $this->ProjectUID = $o['ProjectUID'];
        if (isset($o['JobID'])) $this->JobID = $o['JobID'];
        if (isset($o['AgreementJobID'])) $this->AgreementJobID = $o['AgreementJobID'];
        if (isset($o['RequestedByContactID'])) $this->RequestedByContactID = $o['RequestedByContactID'];
        if (isset($o['RequestedByName'])) $this->RequestedByName = $o['RequestedByName'];
        if (isset($o['CustomerContactID'])) $this->CustomerContactID = $o['CustomerContactID'];
        if (isset($o['CustomerName'])) $this->CustomerName = $o['CustomerName'];
        if (isset($o['CustomerEmail'])) $this->CustomerEmail = $o['CustomerEmail'];
        if (isset($o['CustomerPhone'])) $this->CustomerPhone = $o['CustomerPhone'];
        if (isset($o['CustomerSmsOptIn'])) $this->CustomerSmsOptIn = $o['CustomerSmsOptIn'];
        if (isset($o['Description'])) $this->Description = $o['Description'];
        if (isset($o['Status'])) $this->Status = $o['Status'];
        if (isset($o['QuoteID'])) $this->QuoteID = $o['QuoteID'];
        if (isset($o['QuoteUID'])) $this->QuoteUID = $o['QuoteUID'];
        if (isset($o['QuoteStatus'])) $this->QuoteStatus = $o['QuoteStatus'];
        if (isset($o['QuoteTotal'])) $this->QuoteTotal = $o['QuoteTotal'];
        if (isset($o['FinalPriceAfterCompletion'])) $this->FinalPriceAfterCompletion = $o['FinalPriceAfterCompletion'];
        if (isset($o['QuoteApprovedByName'])) $this->QuoteApprovedByName = $o['QuoteApprovedByName'];
        if (isset($o['QuoteApprovedAt'])) $this->QuoteApprovedAt = JsonConverters::from('DateTime', $o['QuoteApprovedAt']);
        if (isset($o['ConvertedJobID'])) $this->ConvertedJobID = $o['ConvertedJobID'];
        if (isset($o['PhotoCount'])) $this->PhotoCount = $o['PhotoCount'];
        if (isset($o['CreatedBy'])) $this->CreatedBy = $o['CreatedBy'];
        if (isset($o['CreatedAt'])) $this->CreatedAt = JsonConverters::from('DateTime', $o['CreatedAt']);
        if (isset($o['UpdatedBy'])) $this->UpdatedBy = $o['UpdatedBy'];
        if (isset($o['UpdatedAt'])) $this->UpdatedAt = JsonConverters::from('DateTime', $o['UpdatedAt']);
        if (isset($o['Photos'])) $this->Photos = JsonConverters::fromArray('AdditionalServiceRequestPhoto', $o['Photos']);
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->AdditionalServiceRequestID)) $o['AdditionalServiceRequestID'] = $this->AdditionalServiceRequestID;
        if (isset($this->AdditionalServiceRequestUID)) $o['AdditionalServiceRequestUID'] = $this->AdditionalServiceRequestUID;
        if (isset($this->TenantId)) $o['TenantId'] = $this->TenantId;
        if (isset($this->BranchId)) $o['BranchId'] = $this->BranchId;
        if (isset($this->BranchName)) $o['BranchName'] = $this->BranchName;
        if (isset($this->ProjectID)) $o['ProjectID'] = $this->ProjectID;
        if (isset($this->ProjectName)) $o['ProjectName'] = $this->ProjectName;
        if (isset($this->ProjectUID)) $o['ProjectUID'] = $this->ProjectUID;
        if (isset($this->JobID)) $o['JobID'] = $this->JobID;
        if (isset($this->AgreementJobID)) $o['AgreementJobID'] = $this->AgreementJobID;
        if (isset($this->RequestedByContactID)) $o['RequestedByContactID'] = $this->RequestedByContactID;
        if (isset($this->RequestedByName)) $o['RequestedByName'] = $this->RequestedByName;
        if (isset($this->CustomerContactID)) $o['CustomerContactID'] = $this->CustomerContactID;
        if (isset($this->CustomerName)) $o['CustomerName'] = $this->CustomerName;
        if (isset($this->CustomerEmail)) $o['CustomerEmail'] = $this->CustomerEmail;
        if (isset($this->CustomerPhone)) $o['CustomerPhone'] = $this->CustomerPhone;
        if (isset($this->CustomerSmsOptIn)) $o['CustomerSmsOptIn'] = $this->CustomerSmsOptIn;
        if (isset($this->Description)) $o['Description'] = $this->Description;
        if (isset($this->Status)) $o['Status'] = $this->Status;
        if (isset($this->QuoteID)) $o['QuoteID'] = $this->QuoteID;
        if (isset($this->QuoteUID)) $o['QuoteUID'] = $this->QuoteUID;
        if (isset($this->QuoteStatus)) $o['QuoteStatus'] = $this->QuoteStatus;
        if (isset($this->QuoteTotal)) $o['QuoteTotal'] = $this->QuoteTotal;
        if (isset($this->FinalPriceAfterCompletion)) $o['FinalPriceAfterCompletion'] = $this->FinalPriceAfterCompletion;
        if (isset($this->QuoteApprovedByName)) $o['QuoteApprovedByName'] = $this->QuoteApprovedByName;
        if (isset($this->QuoteApprovedAt)) $o['QuoteApprovedAt'] = JsonConverters::to('DateTime', $this->QuoteApprovedAt);
        if (isset($this->ConvertedJobID)) $o['ConvertedJobID'] = $this->ConvertedJobID;
        if (isset($this->PhotoCount)) $o['PhotoCount'] = $this->PhotoCount;
        if (isset($this->CreatedBy)) $o['CreatedBy'] = $this->CreatedBy;
        if (isset($this->CreatedAt)) $o['CreatedAt'] = JsonConverters::to('DateTime', $this->CreatedAt);
        if (isset($this->UpdatedBy)) $o['UpdatedBy'] = $this->UpdatedBy;
        if (isset($this->UpdatedAt)) $o['UpdatedAt'] = JsonConverters::to('DateTime', $this->UpdatedAt);
        if (isset($this->Photos)) $o['Photos'] = JsonConverters::toArray('AdditionalServiceRequestPhoto', $this->Photos);
        return empty($o) ? new class(){} : $o;
    }
}

class AdditionalServiceListResponse implements JsonSerializable
{
    public function __construct(
        /** @var ResponseStatus|null */
        public ?ResponseStatus $ResponseStatus=null,
        /** @var array<AdditionalServiceRequest>|null */
        public ?array $Requests=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['ResponseStatus'])) $this->ResponseStatus = JsonConverters::from('ResponseStatus', $o['ResponseStatus']);
        if (isset($o['Requests'])) $this->Requests = JsonConverters::fromArray('AdditionalServiceRequest', $o['Requests']);
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->ResponseStatus)) $o['ResponseStatus'] = JsonConverters::to('ResponseStatus', $this->ResponseStatus);
        if (isset($this->Requests)) $o['Requests'] = JsonConverters::toArray('AdditionalServiceRequest', $this->Requests);
        return empty($o) ? new class(){} : $o;
    }
}

class AdditionalServiceListRequest implements JsonSerializable
{
    public function __construct(
        /** @var string|null */
        public ?string $Status=null
    ) {
    }

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

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

GET /v1/additionalservice HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<AdditionalServiceListResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
  <Requests>
    <AdditionalServiceRequest>
      <AdditionalServiceRequestID>0</AdditionalServiceRequestID>
      <AdditionalServiceRequestUID>00000000-0000-0000-0000-000000000000</AdditionalServiceRequestUID>
      <AgreementJobID>0</AgreementJobID>
      <BranchId>00000000-0000-0000-0000-000000000000</BranchId>
      <BranchName>String</BranchName>
      <ConvertedJobID>0</ConvertedJobID>
      <CreatedAt>0001-01-01T00:00:00</CreatedAt>
      <CreatedBy>String</CreatedBy>
      <CustomerContactID>0</CustomerContactID>
      <CustomerEmail>String</CustomerEmail>
      <CustomerName>String</CustomerName>
      <CustomerPhone>String</CustomerPhone>
      <CustomerSmsOptIn>false</CustomerSmsOptIn>
      <Description>String</Description>
      <FinalPriceAfterCompletion>false</FinalPriceAfterCompletion>
      <JobID>0</JobID>
      <PhotoCount>0</PhotoCount>
      <Photos>
        <AdditionalServiceRequestPhoto>
          <AdditionalServiceRequestPhotoID>0</AdditionalServiceRequestPhotoID>
          <CreatedAt>0001-01-01T00:00:00</CreatedAt>
          <MimeType>String</MimeType>
          <Url>String</Url>
        </AdditionalServiceRequestPhoto>
      </Photos>
      <ProjectID>0</ProjectID>
      <ProjectName>String</ProjectName>
      <ProjectUID>00000000-0000-0000-0000-000000000000</ProjectUID>
      <QuoteApprovedAt>0001-01-01T00:00:00</QuoteApprovedAt>
      <QuoteApprovedByName>String</QuoteApprovedByName>
      <QuoteID>0</QuoteID>
      <QuoteStatus>String</QuoteStatus>
      <QuoteTotal>0</QuoteTotal>
      <QuoteUID>00000000-0000-0000-0000-000000000000</QuoteUID>
      <RequestedByContactID>0</RequestedByContactID>
      <RequestedByName>String</RequestedByName>
      <Status>String</Status>
      <TenantId>00000000-0000-0000-0000-000000000000</TenantId>
      <UpdatedAt>0001-01-01T00:00:00</UpdatedAt>
      <UpdatedBy>String</UpdatedBy>
    </AdditionalServiceRequest>
  </Requests>
  <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>
</AdditionalServiceListResponse>