AIM Web Services

<back to all web services

C2BGetUnfinishedContractsRequest

C2BGetUnfinishedContracts
Requires active-e Contracts Service.

The following routes are available for this service:
GET/api/C2BGetUnfinishedContracts
<?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};


// @DataContract
class BaseRequest implements JsonSerializable
{
    public function __construct(
        /** @description This is your AIM API Key provided by Tri-Tech */
        // @DataMember
        // @ApiMember(DataType="string", Description="This is your AIM API Key provided by Tri-Tech", IsRequired=true, Name="ApiKey", ParameterType="header")
        /** @var string */
        public string $ApiKey='',

        // @DataMember
        // @ApiMember(DataType="string", Name="OAuthToken", ParameterType="header")
        /** @var string|null */
        public ?string $OAuthToken=null
    ) {
    }

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

// @DataContract
class BaseSecureRequest extends BaseRequest implements JsonSerializable
{
    /**
     * @param string $ApiKey
     * @param string|null $OAuthToken
     */
    public function __construct(
        string $ApiKey='',
        ?string $OAuthToken=null,
        /** @description  */
        // @DataMember
        // @ApiMember(DataType="string", Description="", Name="Token", ParameterType="Header")
        /** @var string|null */
        public ?string $Token=null,

        /** @description  */
        // @DataMember
        // @ApiMember(DataType="string", Description="", Name="DeviceId", ParameterType="Header")
        /** @var string|null */
        public ?string $DeviceId=null,

        /** @description  */
        // @DataMember
        // @ApiMember(DataType="string", Description="", IsRequired=true, Name="AppId", ParameterType="Header")
        /** @var string */
        public string $AppId=''
    ) {
        parent::__construct($ApiKey,$OAuthToken);
    }

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

// @DataContract
class BaseResponseResult implements JsonSerializable
{
    public function __construct(
        /** @description  */
        // @DataMember
        // @ApiMember(DataType="string", Description="", Name="StatusCode", ParameterType="body")
        /** @var string|null */
        public ?string $StatusCode=null,

        /** @description  */
        // @DataMember
        // @ApiMember(DataType="string", Description="", Name="Login", ParameterType="body")
        /** @var string|null */
        public ?string $Login=null,

        /** @description  */
        // @DataMember
        // @ApiMember(DataType="string", Description="", Name="ErrorCode", ParameterType="body")
        /** @var string|null */
        public ?string $ErrorCode=null,

        /** @description  */
        // @DataMember
        // @ApiMember(DataType="string", Description="", Name="ErrorDisplayText", ParameterType="body")
        /** @var string|null */
        public ?string $ErrorDisplayText=null,

        /** @description  */
        // @DataMember
        // @ApiMember(DataType="string", Description="", Name="ErrorMessage", ParameterType="body")
        /** @var string|null */
        public ?string $ErrorMessage=null,

        /** @description  */
        // @DataMember
        // @ApiMember(DataType="string", Description="", ExcludeInSchema=true, Name="DomainName", ParameterType="body")
        /** @var string|null */
        public ?string $DomainName=null,

        /** @description  */
        // @DataMember
        // @ApiMember(DataType="string", Description="", ExcludeInSchema=true, Name="IPAddress", ParameterType="body")
        /** @var string|null */
        public ?string $IpAddress=null
    ) {
    }

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

// @DataContract
class BaseResponse implements JsonSerializable
{
    public function __construct(
        /** @description  */
        // @DataMember
        // @ApiMember(DataType="BaseResponseResult", Description="", Name="Status", ParameterType="body")
        /** @var BaseResponseResult|null */
        public ?BaseResponseResult $Status=null
    ) {
    }

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

// @DataContract
class LocationInfo implements JsonSerializable
{
    public function __construct(
        // @DataMember
        /** @var int */
        public int $Id=0,

        // @DataMember
        /** @var string|null */
        public ?string $Desc=null,

        // @DataMember
        /** @var string|null */
        public ?string $ShortDesc=null,

        // @DataMember
        /** @var string|null */
        public ?string $Region=null,

        // @DataMember
        /** @var float */
        public float $Latitude=0.0,

        // @DataMember
        /** @var float */
        public float $Longitude=0.0,

        // @DataMember
        /** @var string|null */
        public ?string $InStorePickup=null,

        // @DataMember
        /** @var bool|null */
        public ?bool $Active=null,

        // @DataMember
        /** @var int|null */
        public ?int $CashSaleAcct=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['Id'])) $this->Id = $o['Id'];
        if (isset($o['Desc'])) $this->Desc = $o['Desc'];
        if (isset($o['ShortDesc'])) $this->ShortDesc = $o['ShortDesc'];
        if (isset($o['Region'])) $this->Region = $o['Region'];
        if (isset($o['Latitude'])) $this->Latitude = $o['Latitude'];
        if (isset($o['Longitude'])) $this->Longitude = $o['Longitude'];
        if (isset($o['InStorePickup'])) $this->InStorePickup = $o['InStorePickup'];
        if (isset($o['Active'])) $this->Active = $o['Active'];
        if (isset($o['CashSaleAcct'])) $this->CashSaleAcct = $o['CashSaleAcct'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->Id)) $o['Id'] = $this->Id;
        if (isset($this->Desc)) $o['Desc'] = $this->Desc;
        if (isset($this->ShortDesc)) $o['ShortDesc'] = $this->ShortDesc;
        if (isset($this->Region)) $o['Region'] = $this->Region;
        if (isset($this->Latitude)) $o['Latitude'] = $this->Latitude;
        if (isset($this->Longitude)) $o['Longitude'] = $this->Longitude;
        if (isset($this->InStorePickup)) $o['InStorePickup'] = $this->InStorePickup;
        if (isset($this->Active)) $o['Active'] = $this->Active;
        if (isset($this->CashSaleAcct)) $o['CashSaleAcct'] = $this->CashSaleAcct;
        return empty($o) ? new class(){} : $o;
    }
}

// @DataContract
class C2BAccessory implements JsonSerializable
{
    public function __construct(
        // @DataMember
        /** @var int */
        public int $Id=0,

        // @DataMember
        /** @var string|null */
        public ?string $Description=null,

        // @DataMember
        /** @var float */
        public float $Price=0.0,

        // @DataMember
        /** @var string|null */
        public ?string $Type=null,

        // @DataMember
        /** @var string|null */
        public ?string $Sku=null,

        // @DataMember
        /** @var int|null */
        public ?int $Category=null,

        // @DataMember
        /** @var bool|null */
        public ?bool $Delivered=null
    ) {
    }

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

// @DataContract
class UnfinishedContract implements JsonSerializable
{
    public function __construct(
        // @DataMember
        /** @var string|null */
        public ?string $CustomerName=null,

        // @DataMember
        /** @var int */
        public int $CustomerAcct=0,

        // @DataMember
        /** @var string|null */
        public ?string $StudentName=null,

        // @DataMember
        /** @var string|null */
        public ?string $Ref=null,

        // @DataMember
        /** @var DateTime */
        public DateTime $DateTime=new DateTime(),

        // @DataMember
        /** @var LocationInfo|null */
        public ?LocationInfo $Location=null,

        // @DataMember
        /** @var string|null */
        public ?string $District=null,

        // @DataMember
        /** @var string|null */
        public ?string $School=null,

        // @DataMember
        /** @var string|null */
        public ?string $Teacher=null,

        // @DataMember
        /** @var string|null */
        public ?string $Instrument=null,

        // @DataMember
        /** @var string|null */
        public ?string $Status=null,

        // @DataMember
        /** @var string|null */
        public ?string $Notes=null,

        // @DataMember
        /** @var string|null */
        public ?string $LockedBy=null,

        // @DataMember
        /** @var string|null */
        public ?string $InstrumentGrade=null,

        // @DataMember
        /** @var string|null */
        public ?string $Serial=null,

        // @DataMember
        /** @var string|null */
        public ?string $Salesperson=null,

        // @DataMember
        /** @var string|null */
        public ?string $WebNotes=null,

        // @DataMember
        /** @var string|null */
        public ?string $Email=null,

        // @DataMember
        /** @var string|null */
        public ?string $Phone=null,

        // @DataMember
        /** @var DateTime|null */
        public ?DateTime $DeliveryDate=null,

        // @DataMember
        /** @var DateTime|null */
        public ?DateTime $FirstDue=null,

        // @DataMember
        /** @var array<C2BAccessory>|null */
        public ?array $Accessories=null,

        // @DataMember
        /** @var float */
        public float $DownPay=0.0,

        // @DataMember
        /** @var float */
        public float $MonthlyPay=0.0,

        // @DataMember
        /** @var float */
        public float $DownMaint=0.0,

        // @DataMember
        /** @var float */
        public float $MonthlyMaint=0.0,

        // @DataMember
        /** @var float */
        public float $DownLease=0.0,

        // @DataMember
        /** @var float */
        public float $MonthlyLease=0.0,

        // @DataMember
        /** @var float */
        public float $DownTotal=0.0,

        // @DataMember
        /** @var string|null */
        public ?string $Address=null,

        // @DataMember
        /** @var string|null */
        public ?string $Address2=null,

        // @DataMember
        /** @var string|null */
        public ?string $City=null,

        // @DataMember
        /** @var string|null */
        public ?string $State=null,

        // @DataMember
        /** @var string|null */
        public ?string $Zip=null,

        // @DataMember
        /** @var string|null */
        public ?string $Country=null,

        // @DataMember
        /** @var bool|null */
        public ?bool $InvoiceCreated=null,

        // @DataMember
        /** @var bool|null */
        public ?bool $ContractCreated=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['CustomerName'])) $this->CustomerName = $o['CustomerName'];
        if (isset($o['CustomerAcct'])) $this->CustomerAcct = $o['CustomerAcct'];
        if (isset($o['StudentName'])) $this->StudentName = $o['StudentName'];
        if (isset($o['Ref'])) $this->Ref = $o['Ref'];
        if (isset($o['DateTime'])) $this->DateTime = JsonConverters::from('DateTime', $o['DateTime']);
        if (isset($o['Location'])) $this->Location = JsonConverters::from('LocationInfo', $o['Location']);
        if (isset($o['District'])) $this->District = $o['District'];
        if (isset($o['School'])) $this->School = $o['School'];
        if (isset($o['Teacher'])) $this->Teacher = $o['Teacher'];
        if (isset($o['Instrument'])) $this->Instrument = $o['Instrument'];
        if (isset($o['Status'])) $this->Status = $o['Status'];
        if (isset($o['Notes'])) $this->Notes = $o['Notes'];
        if (isset($o['LockedBy'])) $this->LockedBy = $o['LockedBy'];
        if (isset($o['InstrumentGrade'])) $this->InstrumentGrade = $o['InstrumentGrade'];
        if (isset($o['Serial'])) $this->Serial = $o['Serial'];
        if (isset($o['Salesperson'])) $this->Salesperson = $o['Salesperson'];
        if (isset($o['WebNotes'])) $this->WebNotes = $o['WebNotes'];
        if (isset($o['Email'])) $this->Email = $o['Email'];
        if (isset($o['Phone'])) $this->Phone = $o['Phone'];
        if (isset($o['DeliveryDate'])) $this->DeliveryDate = JsonConverters::from('DateTime', $o['DeliveryDate']);
        if (isset($o['FirstDue'])) $this->FirstDue = JsonConverters::from('DateTime', $o['FirstDue']);
        if (isset($o['Accessories'])) $this->Accessories = JsonConverters::fromArray('C2BAccessory', $o['Accessories']);
        if (isset($o['DownPay'])) $this->DownPay = $o['DownPay'];
        if (isset($o['MonthlyPay'])) $this->MonthlyPay = $o['MonthlyPay'];
        if (isset($o['DownMaint'])) $this->DownMaint = $o['DownMaint'];
        if (isset($o['MonthlyMaint'])) $this->MonthlyMaint = $o['MonthlyMaint'];
        if (isset($o['DownLease'])) $this->DownLease = $o['DownLease'];
        if (isset($o['MonthlyLease'])) $this->MonthlyLease = $o['MonthlyLease'];
        if (isset($o['DownTotal'])) $this->DownTotal = $o['DownTotal'];
        if (isset($o['Address'])) $this->Address = $o['Address'];
        if (isset($o['Address2'])) $this->Address2 = $o['Address2'];
        if (isset($o['City'])) $this->City = $o['City'];
        if (isset($o['State'])) $this->State = $o['State'];
        if (isset($o['Zip'])) $this->Zip = $o['Zip'];
        if (isset($o['Country'])) $this->Country = $o['Country'];
        if (isset($o['InvoiceCreated'])) $this->InvoiceCreated = $o['InvoiceCreated'];
        if (isset($o['ContractCreated'])) $this->ContractCreated = $o['ContractCreated'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->CustomerName)) $o['CustomerName'] = $this->CustomerName;
        if (isset($this->CustomerAcct)) $o['CustomerAcct'] = $this->CustomerAcct;
        if (isset($this->StudentName)) $o['StudentName'] = $this->StudentName;
        if (isset($this->Ref)) $o['Ref'] = $this->Ref;
        if (isset($this->DateTime)) $o['DateTime'] = JsonConverters::to('DateTime', $this->DateTime);
        if (isset($this->Location)) $o['Location'] = JsonConverters::to('LocationInfo', $this->Location);
        if (isset($this->District)) $o['District'] = $this->District;
        if (isset($this->School)) $o['School'] = $this->School;
        if (isset($this->Teacher)) $o['Teacher'] = $this->Teacher;
        if (isset($this->Instrument)) $o['Instrument'] = $this->Instrument;
        if (isset($this->Status)) $o['Status'] = $this->Status;
        if (isset($this->Notes)) $o['Notes'] = $this->Notes;
        if (isset($this->LockedBy)) $o['LockedBy'] = $this->LockedBy;
        if (isset($this->InstrumentGrade)) $o['InstrumentGrade'] = $this->InstrumentGrade;
        if (isset($this->Serial)) $o['Serial'] = $this->Serial;
        if (isset($this->Salesperson)) $o['Salesperson'] = $this->Salesperson;
        if (isset($this->WebNotes)) $o['WebNotes'] = $this->WebNotes;
        if (isset($this->Email)) $o['Email'] = $this->Email;
        if (isset($this->Phone)) $o['Phone'] = $this->Phone;
        if (isset($this->DeliveryDate)) $o['DeliveryDate'] = JsonConverters::to('DateTime', $this->DeliveryDate);
        if (isset($this->FirstDue)) $o['FirstDue'] = JsonConverters::to('DateTime', $this->FirstDue);
        if (isset($this->Accessories)) $o['Accessories'] = JsonConverters::toArray('C2BAccessory', $this->Accessories);
        if (isset($this->DownPay)) $o['DownPay'] = $this->DownPay;
        if (isset($this->MonthlyPay)) $o['MonthlyPay'] = $this->MonthlyPay;
        if (isset($this->DownMaint)) $o['DownMaint'] = $this->DownMaint;
        if (isset($this->MonthlyMaint)) $o['MonthlyMaint'] = $this->MonthlyMaint;
        if (isset($this->DownLease)) $o['DownLease'] = $this->DownLease;
        if (isset($this->MonthlyLease)) $o['MonthlyLease'] = $this->MonthlyLease;
        if (isset($this->DownTotal)) $o['DownTotal'] = $this->DownTotal;
        if (isset($this->Address)) $o['Address'] = $this->Address;
        if (isset($this->Address2)) $o['Address2'] = $this->Address2;
        if (isset($this->City)) $o['City'] = $this->City;
        if (isset($this->State)) $o['State'] = $this->State;
        if (isset($this->Zip)) $o['Zip'] = $this->Zip;
        if (isset($this->Country)) $o['Country'] = $this->Country;
        if (isset($this->InvoiceCreated)) $o['InvoiceCreated'] = $this->InvoiceCreated;
        if (isset($this->ContractCreated)) $o['ContractCreated'] = $this->ContractCreated;
        return empty($o) ? new class(){} : $o;
    }
}

// @DataContract
class C2BGetUnfinishedContractsResponse extends BaseResponse implements JsonSerializable
{
    /**
     * @param BaseResponseResult|null $Status
     */
    public function __construct(
        ?BaseResponseResult $Status=null,
        // @DataMember
        /** @var array<UnfinishedContract>|null */
        public ?array $UnfinishedContracts=null,

        // @DataMember
        /** @var string|null */
        public ?string $Topic=null,

        // @DataMember
        /** @var string|null */
        public ?string $BaseUrl=null
    ) {
        parent::__construct($Status);
    }

    /** @throws Exception */
    public function fromMap($o): void {
        parent::fromMap($o);
        if (isset($o['UnfinishedContracts'])) $this->UnfinishedContracts = JsonConverters::fromArray('UnfinishedContract', $o['UnfinishedContracts']);
        if (isset($o['Topic'])) $this->Topic = $o['Topic'];
        if (isset($o['BaseUrl'])) $this->BaseUrl = $o['BaseUrl'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = parent::jsonSerialize();
        if (isset($this->UnfinishedContracts)) $o['UnfinishedContracts'] = JsonConverters::toArray('UnfinishedContract', $this->UnfinishedContracts);
        if (isset($this->Topic)) $o['Topic'] = $this->Topic;
        if (isset($this->BaseUrl)) $o['BaseUrl'] = $this->BaseUrl;
        return empty($o) ? new class(){} : $o;
    }
}

/** @description C2BGetUnfinishedContractsRequires active-e Contracts Service. */
// @DataContract
class C2BGetUnfinishedContractsRequest extends BaseSecureRequest implements JsonSerializable
{
    /**
     * @param string $ApiKey
     * @param string|null $OAuthToken
     * @param string|null $Token
     * @param string|null $DeviceId
     * @param string $AppId
     */
    public function __construct(
        string $ApiKey='',
        ?string $OAuthToken=null,
        ?string $Token=null,
        ?string $DeviceId=null,
        string $AppId='',
        // @DataMember
        /** @var string|null */
        public ?string $Type=null,

        // @DataMember
        /** @var int|null */
        public ?int $StartOffset=null,

        // @DataMember
        /** @var int|null */
        public ?int $RecordCount=null,

        // @DataMember
        /** @var string|null */
        public ?string $SearchStr=null,

        // @DataMember
        /** @var bool|null */
        public ?bool $IncludeContractsEnteredByOtherUsers=null,

        // @DataMember
        /** @var int|null */
        public ?int $DistrictId=null,

        // @DataMember
        /** @var int|null */
        public ?int $SchoolId=null,

        // @DataMember
        /** @var int|null */
        public ?int $TeacherId=null,

        // @DataMember
        /** @var string|null */
        public ?string $DeliveryDesc=null,

        // @DataMember
        /** @var string|null */
        public ?string $Status=null
    ) {
        parent::__construct($ApiKey,$OAuthToken,$Token,$DeviceId,$AppId);
    }

    /** @throws Exception */
    public function fromMap($o): void {
        parent::fromMap($o);
        if (isset($o['Type'])) $this->Type = $o['Type'];
        if (isset($o['StartOffset'])) $this->StartOffset = $o['StartOffset'];
        if (isset($o['RecordCount'])) $this->RecordCount = $o['RecordCount'];
        if (isset($o['SearchStr'])) $this->SearchStr = $o['SearchStr'];
        if (isset($o['IncludeContractsEnteredByOtherUsers'])) $this->IncludeContractsEnteredByOtherUsers = $o['IncludeContractsEnteredByOtherUsers'];
        if (isset($o['DistrictId'])) $this->DistrictId = $o['DistrictId'];
        if (isset($o['SchoolId'])) $this->SchoolId = $o['SchoolId'];
        if (isset($o['TeacherId'])) $this->TeacherId = $o['TeacherId'];
        if (isset($o['DeliveryDesc'])) $this->DeliveryDesc = $o['DeliveryDesc'];
        if (isset($o['Status'])) $this->Status = $o['Status'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = parent::jsonSerialize();
        if (isset($this->Type)) $o['Type'] = $this->Type;
        if (isset($this->StartOffset)) $o['StartOffset'] = $this->StartOffset;
        if (isset($this->RecordCount)) $o['RecordCount'] = $this->RecordCount;
        if (isset($this->SearchStr)) $o['SearchStr'] = $this->SearchStr;
        if (isset($this->IncludeContractsEnteredByOtherUsers)) $o['IncludeContractsEnteredByOtherUsers'] = $this->IncludeContractsEnteredByOtherUsers;
        if (isset($this->DistrictId)) $o['DistrictId'] = $this->DistrictId;
        if (isset($this->SchoolId)) $o['SchoolId'] = $this->SchoolId;
        if (isset($this->TeacherId)) $o['TeacherId'] = $this->TeacherId;
        if (isset($this->DeliveryDesc)) $o['DeliveryDesc'] = $this->DeliveryDesc;
        if (isset($this->Status)) $o['Status'] = $this->Status;
        return empty($o) ? new class(){} : $o;
    }
}

PHP C2BGetUnfinishedContractsRequest 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 /api/C2BGetUnfinishedContracts HTTP/1.1 
Host: active-ewebservice.biz 
Accept: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<C2BGetUnfinishedContractsResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/AIM.WebService">
  <Status>
    <DomainName>String</DomainName>
    <ErrorCode>String</ErrorCode>
    <ErrorDisplayText>String</ErrorDisplayText>
    <ErrorMessage>String</ErrorMessage>
    <IpAddress>String</IpAddress>
    <Login>String</Login>
    <StatusCode>String</StatusCode>
  </Status>
  <BaseUrl>String</BaseUrl>
  <Topic>String</Topic>
  <UnfinishedContracts>
    <C2BGetUnfinishedContractsResponse.UnfinishedContract>
      <Accessories>
        <C2BGetUnfinishedContractsResponse.UnfinishedContract.C2BAccessory>
          <Category>0</Category>
          <Delivered>false</Delivered>
          <Description>String</Description>
          <Id>0</Id>
          <Price>0</Price>
          <Sku>String</Sku>
          <Type>String</Type>
        </C2BGetUnfinishedContractsResponse.UnfinishedContract.C2BAccessory>
      </Accessories>
      <Address>String</Address>
      <Address2>String</Address2>
      <City>String</City>
      <ContractCreated>false</ContractCreated>
      <Country>String</Country>
      <CustomerAcct>0</CustomerAcct>
      <CustomerName>String</CustomerName>
      <DateTime>0001-01-01T00:00:00</DateTime>
      <DeliveryDate>0001-01-01T00:00:00</DeliveryDate>
      <District>String</District>
      <DownLease>0</DownLease>
      <DownMaint>0</DownMaint>
      <DownPay>0</DownPay>
      <DownTotal>0</DownTotal>
      <Email>String</Email>
      <FirstDue>0001-01-01T00:00:00</FirstDue>
      <Instrument>String</Instrument>
      <InstrumentGrade>String</InstrumentGrade>
      <InvoiceCreated>false</InvoiceCreated>
      <Location xmlns:d4p1="http://schemas.datacontract.org/2004/07/AIM">
        <d4p1:Active>false</d4p1:Active>
        <d4p1:CashSaleAcct>0</d4p1:CashSaleAcct>
        <d4p1:Desc>String</d4p1:Desc>
        <d4p1:Id>0</d4p1:Id>
        <d4p1:InStorePickup>String</d4p1:InStorePickup>
        <d4p1:Latitude>0</d4p1:Latitude>
        <d4p1:Longitude>0</d4p1:Longitude>
        <d4p1:Region>String</d4p1:Region>
        <d4p1:ShortDesc>String</d4p1:ShortDesc>
      </Location>
      <LockedBy>String</LockedBy>
      <MonthlyLease>0</MonthlyLease>
      <MonthlyMaint>0</MonthlyMaint>
      <MonthlyPay>0</MonthlyPay>
      <Notes>String</Notes>
      <Phone>String</Phone>
      <Ref>String</Ref>
      <Salesperson>String</Salesperson>
      <School>String</School>
      <Serial>String</Serial>
      <State>String</State>
      <Status>String</Status>
      <StudentName>String</StudentName>
      <Teacher>String</Teacher>
      <WebNotes>String</WebNotes>
      <Zip>String</Zip>
    </C2BGetUnfinishedContractsResponse.UnfinishedContract>
  </UnfinishedContracts>
</C2BGetUnfinishedContractsResponse>