Trendsic Platform Service

<back to all web services

QcSummaryRequest

Requires Authentication
The following routes are available for this service:
GET,OPTIONS/v1/projects/{ProjectID}/qc-summary
<?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 QcSummary implements JsonSerializable
{
    public function __construct(
        /** @var int */
        public int $TestsThisMonth=0,
        /** @var int */
        public int $TestsTotal=0,
        /** @var int */
        public int $PassCount=0,
        /** @var int */
        public int $FailCount=0,
        /** @var int */
        public int $GradedCount=0,
        /** @var int */
        public int $PassRate=0,
        /** @var int */
        public int $RetestCount=0,
        /** @var int */
        public int $OpenNcrCount=0,
        /** @var int */
        public int $PendingHoldPoints=0
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['TestsThisMonth'])) $this->TestsThisMonth = $o['TestsThisMonth'];
        if (isset($o['TestsTotal'])) $this->TestsTotal = $o['TestsTotal'];
        if (isset($o['PassCount'])) $this->PassCount = $o['PassCount'];
        if (isset($o['FailCount'])) $this->FailCount = $o['FailCount'];
        if (isset($o['GradedCount'])) $this->GradedCount = $o['GradedCount'];
        if (isset($o['PassRate'])) $this->PassRate = $o['PassRate'];
        if (isset($o['RetestCount'])) $this->RetestCount = $o['RetestCount'];
        if (isset($o['OpenNcrCount'])) $this->OpenNcrCount = $o['OpenNcrCount'];
        if (isset($o['PendingHoldPoints'])) $this->PendingHoldPoints = $o['PendingHoldPoints'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->TestsThisMonth)) $o['TestsThisMonth'] = $this->TestsThisMonth;
        if (isset($this->TestsTotal)) $o['TestsTotal'] = $this->TestsTotal;
        if (isset($this->PassCount)) $o['PassCount'] = $this->PassCount;
        if (isset($this->FailCount)) $o['FailCount'] = $this->FailCount;
        if (isset($this->GradedCount)) $o['GradedCount'] = $this->GradedCount;
        if (isset($this->PassRate)) $o['PassRate'] = $this->PassRate;
        if (isset($this->RetestCount)) $o['RetestCount'] = $this->RetestCount;
        if (isset($this->OpenNcrCount)) $o['OpenNcrCount'] = $this->OpenNcrCount;
        if (isset($this->PendingHoldPoints)) $o['PendingHoldPoints'] = $this->PendingHoldPoints;
        return empty($o) ? new class(){} : $o;
    }
}

class QcSummaryResponse implements JsonSerializable
{
    public function __construct(
        /** @var ResponseStatus|null */
        public ?ResponseStatus $ResponseStatus=null,
        /** @var int */
        public int $ProjectID=0,
        /** @var QcSummary|null */
        public ?QcSummary $Summary=null
    ) {
    }

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

class QcSummaryRequest implements JsonSerializable
{
    public function __construct(
        /** @var int */
        public int $ProjectID=0
    ) {
    }

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

PHP QcSummaryRequest 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/projects/{ProjectID}/qc-summary HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<QcSummaryResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
  <ProjectID>0</ProjectID>
  <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>
  <Summary>
    <FailCount>0</FailCount>
    <GradedCount>0</GradedCount>
    <OpenNcrCount>0</OpenNcrCount>
    <PassCount>0</PassCount>
    <PassRate>0</PassRate>
    <PendingHoldPoints>0</PendingHoldPoints>
    <RetestCount>0</RetestCount>
    <TestsThisMonth>0</TestsThisMonth>
    <TestsTotal>0</TestsTotal>
  </Summary>
</QcSummaryResponse>