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 .csv suffix or ?format=csv

HTTP + CSV

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: text/csv
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length

{"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}},"ProjectID":0,"Summary":{"TestsThisMonth":0,"TestsTotal":0,"PassCount":0,"FailCount":0,"GradedCount":0,"PassRate":0,"RetestCount":0,"OpenNcrCount":0,"PendingHoldPoints":0}}