| Requires any of the roles: | Worker, Agent, Administrator |
| GET, OPTIONS | /v1/Organization/GetSingleBySchoolID/{schoolID} | ||
|---|---|---|---|
| GET, OPTIONS | /v1/Organization/GetSingleByDistrictID/{districtID} |
<?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 Organization implements JsonSerializable
{
public function __construct(
/** @var int */
public int $OrganizationId=0,
/** @var int */
public int $OrganizationTypeId=0,
/** @var int */
public int $StateID=0,
/** @var string|null */
public ?string $StateName=null,
/** @var int */
public int $DistrictID=0,
/** @var string|null */
public ?string $DistrictName=null,
/** @var int */
public int $CountyID=0,
/** @var string|null */
public ?string $CountyName=null,
/** @var int */
public int $SchoolID=0,
/** @var string|null */
public ?string $SchoolName=null,
/** @var string|null */
public ?string $EntityName=null,
/** @var string|null */
public ?string $EntityId=null,
/** @var string|null */
public ?string $Source=null,
/** @var int */
public int $Pera_ListId=0
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['OrganizationId'])) $this->OrganizationId = $o['OrganizationId'];
if (isset($o['OrganizationTypeId'])) $this->OrganizationTypeId = $o['OrganizationTypeId'];
if (isset($o['StateID'])) $this->StateID = $o['StateID'];
if (isset($o['StateName'])) $this->StateName = $o['StateName'];
if (isset($o['DistrictID'])) $this->DistrictID = $o['DistrictID'];
if (isset($o['DistrictName'])) $this->DistrictName = $o['DistrictName'];
if (isset($o['CountyID'])) $this->CountyID = $o['CountyID'];
if (isset($o['CountyName'])) $this->CountyName = $o['CountyName'];
if (isset($o['SchoolID'])) $this->SchoolID = $o['SchoolID'];
if (isset($o['SchoolName'])) $this->SchoolName = $o['SchoolName'];
if (isset($o['EntityName'])) $this->EntityName = $o['EntityName'];
if (isset($o['EntityId'])) $this->EntityId = $o['EntityId'];
if (isset($o['Source'])) $this->Source = $o['Source'];
if (isset($o['Pera_ListId'])) $this->Pera_ListId = $o['Pera_ListId'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->OrganizationId)) $o['OrganizationId'] = $this->OrganizationId;
if (isset($this->OrganizationTypeId)) $o['OrganizationTypeId'] = $this->OrganizationTypeId;
if (isset($this->StateID)) $o['StateID'] = $this->StateID;
if (isset($this->StateName)) $o['StateName'] = $this->StateName;
if (isset($this->DistrictID)) $o['DistrictID'] = $this->DistrictID;
if (isset($this->DistrictName)) $o['DistrictName'] = $this->DistrictName;
if (isset($this->CountyID)) $o['CountyID'] = $this->CountyID;
if (isset($this->CountyName)) $o['CountyName'] = $this->CountyName;
if (isset($this->SchoolID)) $o['SchoolID'] = $this->SchoolID;
if (isset($this->SchoolName)) $o['SchoolName'] = $this->SchoolName;
if (isset($this->EntityName)) $o['EntityName'] = $this->EntityName;
if (isset($this->EntityId)) $o['EntityId'] = $this->EntityId;
if (isset($this->Source)) $o['Source'] = $this->Source;
if (isset($this->Pera_ListId)) $o['Pera_ListId'] = $this->Pera_ListId;
return empty($o) ? new class(){} : $o;
}
}
class orgGetSingleResponse implements JsonSerializable
{
public function __construct(
/** @var ResponseStatus|null */
public ?ResponseStatus $ResponseStatus=null,
/** @var Organization|null */
public ?Organization $org=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['ResponseStatus'])) $this->ResponseStatus = JsonConverters::from('ResponseStatus', $o['ResponseStatus']);
if (isset($o['org'])) $this->org = JsonConverters::from('Organization', $o['org']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->ResponseStatus)) $o['ResponseStatus'] = JsonConverters::to('ResponseStatus', $this->ResponseStatus);
if (isset($this->org)) $o['org'] = JsonConverters::to('Organization', $this->org);
return empty($o) ? new class(){} : $o;
}
}
class orgGetSingleRequest implements JsonSerializable
{
public function __construct(
/** @var int */
public int $schoolID=0,
/** @var int */
public int $districtID=0
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['schoolID'])) $this->schoolID = $o['schoolID'];
if (isset($o['districtID'])) $this->districtID = $o['districtID'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->schoolID)) $o['schoolID'] = $this->schoolID;
if (isset($this->districtID)) $o['districtID'] = $this->districtID;
return empty($o) ? new class(){} : $o;
}
}
To override the Content-type in your clients, use the HTTP Accept Header, append the .json suffix or ?format=json
To embed the response in a jsonp callback, append ?callback=myCallback
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /v1/Organization/GetSingleBySchoolID/{schoolID} HTTP/1.1
Host: api.dev.dynamics.trendsic.com
Accept: application/json
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length
{"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}},"org":{"OrganizationId":0,"OrganizationTypeId":0,"StateID":0,"StateName":"String","DistrictID":0,"DistrictName":"String","CountyID":0,"CountyName":"String","SchoolID":0,"SchoolName":"String","EntityName":"String","EntityId":"String","Source":"String","Pera_ListId":0}}