AIM Web Services

<back to all web services

C2BGetInstrumentInfoRequest

C2BGetInstrumentInfo
Requires active-e Contracts Service.

The following routes are available for this service:
POST, GET/api/C2BGetInstrumentInfo
<?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 C2BGradeGeneric implements JsonSerializable
{
    public function __construct(
        // @DataMember
        /** @var int */
        public int $Level=0,

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

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

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

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

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

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

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

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

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

        // @DataMember
        /** @var float|null */
        public ?float $DownPayTax=null,

        // @DataMember
        /** @var float|null */
        public ?float $DownMaintTax=null,

        // @DataMember
        /** @var float|null */
        public ?float $MoPayTax=null,

        // @DataMember
        /** @var float|null */
        public ?float $MoMaintTax=null,

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

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

        // @DataMember
        /** @var int */
        public int $Months=0
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['Level'])) $this->Level = $o['Level'];
        if (isset($o['Grade'])) $this->Grade = $o['Grade'];
        if (isset($o['DownPay'])) $this->DownPay = $o['DownPay'];
        if (isset($o['DownMaint'])) $this->DownMaint = $o['DownMaint'];
        if (isset($o['MoPay'])) $this->MoPay = $o['MoPay'];
        if (isset($o['MoMaint'])) $this->MoMaint = $o['MoMaint'];
        if (isset($o['Id'])) $this->Id = $o['Id'];
        if (isset($o['OutOfStock'])) $this->OutOfStock = $o['OutOfStock'];
        if (isset($o['RentPrice'])) $this->RentPrice = $o['RentPrice'];
        if (isset($o['CashPrice'])) $this->CashPrice = $o['CashPrice'];
        if (isset($o['DownPayTax'])) $this->DownPayTax = $o['DownPayTax'];
        if (isset($o['DownMaintTax'])) $this->DownMaintTax = $o['DownMaintTax'];
        if (isset($o['MoPayTax'])) $this->MoPayTax = $o['MoPayTax'];
        if (isset($o['MoMaintTax'])) $this->MoMaintTax = $o['MoMaintTax'];
        if (isset($o['RentPricePlusTax'])) $this->RentPricePlusTax = $o['RentPricePlusTax'];
        if (isset($o['RentPricePlusTaxLessDownpay'])) $this->RentPricePlusTaxLessDownpay = $o['RentPricePlusTaxLessDownpay'];
        if (isset($o['Months'])) $this->Months = $o['Months'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->Level)) $o['Level'] = $this->Level;
        if (isset($this->Grade)) $o['Grade'] = $this->Grade;
        if (isset($this->DownPay)) $o['DownPay'] = $this->DownPay;
        if (isset($this->DownMaint)) $o['DownMaint'] = $this->DownMaint;
        if (isset($this->MoPay)) $o['MoPay'] = $this->MoPay;
        if (isset($this->MoMaint)) $o['MoMaint'] = $this->MoMaint;
        if (isset($this->Id)) $o['Id'] = $this->Id;
        if (isset($this->OutOfStock)) $o['OutOfStock'] = $this->OutOfStock;
        if (isset($this->RentPrice)) $o['RentPrice'] = $this->RentPrice;
        if (isset($this->CashPrice)) $o['CashPrice'] = $this->CashPrice;
        if (isset($this->DownPayTax)) $o['DownPayTax'] = $this->DownPayTax;
        if (isset($this->DownMaintTax)) $o['DownMaintTax'] = $this->DownMaintTax;
        if (isset($this->MoPayTax)) $o['MoPayTax'] = $this->MoPayTax;
        if (isset($this->MoMaintTax)) $o['MoMaintTax'] = $this->MoMaintTax;
        if (isset($this->RentPricePlusTax)) $o['RentPricePlusTax'] = $this->RentPricePlusTax;
        if (isset($this->RentPricePlusTaxLessDownpay)) $o['RentPricePlusTaxLessDownpay'] = $this->RentPricePlusTaxLessDownpay;
        if (isset($this->Months)) $o['Months'] = $this->Months;
        return empty($o) ? new class(){} : $o;
    }
}

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

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

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

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

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

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

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

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

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

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

        // @DataMember
        /** @var float|null */
        public ?float $TaxAmount=null,

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

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['AccessoryDesc'])) $this->AccessoryDesc = $o['AccessoryDesc'];
        if (isset($o['Price'])) $this->Price = $o['Price'];
        if (isset($o['Required'])) $this->Required = $o['Required'];
        if (isset($o['Default'])) $this->Default = $o['Default'];
        if (isset($o['RequiresLocation'])) $this->RequiresLocation = $o['RequiresLocation'];
        if (isset($o['Type'])) $this->Type = $o['Type'];
        if (isset($o['Topic'])) $this->Topic = $o['Topic'];
        if (isset($o['Id'])) $this->Id = $o['Id'];
        if (isset($o['DisplayOrder'])) $this->DisplayOrder = $o['DisplayOrder'];
        if (isset($o['Sku'])) $this->Sku = $o['Sku'];
        if (isset($o['TaxAmount'])) $this->TaxAmount = $o['TaxAmount'];
        if (isset($o['CatNum'])) $this->CatNum = $o['CatNum'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->AccessoryDesc)) $o['AccessoryDesc'] = $this->AccessoryDesc;
        if (isset($this->Price)) $o['Price'] = $this->Price;
        if (isset($this->Required)) $o['Required'] = $this->Required;
        if (isset($this->Default)) $o['Default'] = $this->Default;
        if (isset($this->RequiresLocation)) $o['RequiresLocation'] = $this->RequiresLocation;
        if (isset($this->Type)) $o['Type'] = $this->Type;
        if (isset($this->Topic)) $o['Topic'] = $this->Topic;
        if (isset($this->Id)) $o['Id'] = $this->Id;
        if (isset($this->DisplayOrder)) $o['DisplayOrder'] = $this->DisplayOrder;
        if (isset($this->Sku)) $o['Sku'] = $this->Sku;
        if (isset($this->TaxAmount)) $o['TaxAmount'] = $this->TaxAmount;
        if (isset($this->CatNum)) $o['CatNum'] = $this->CatNum;
        return empty($o) ? new class(){} : $o;
    }
}

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

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

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

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

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

        // @DataMember
        /** @var float|null */
        public ?float $RentPrice=null,

        // @DataMember
        /** @var float|null */
        public ?float $CashPrice=null,

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

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

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

        // @DataMember
        /** @var array<C2BGradeGeneric>|null */
        public ?array $GradeList=null,

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

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

        // @DataMember
        /** @var array<C2BAccessoryGeneric>|null */
        public ?array $AccessoryList=null,

        // @DataMember
        /** @var array<C2BAccessoryGeneric>|null */
        public ?array $DeliveryList=null,

        // @DataMember
        /** @var array<C2BAccessoryGeneric>|null */
        public ?array $MaintenanceList=null
    ) {
    }

    /** @throws Exception */
    public function fromMap($o): void {
        if (isset($o['InstrumentName'])) $this->InstrumentName = $o['InstrumentName'];
        if (isset($o['Sku'])) $this->Sku = $o['Sku'];
        if (isset($o['Topic'])) $this->Topic = $o['Topic'];
        if (isset($o['Image'])) $this->Image = $o['Image'];
        if (isset($o['Level'])) $this->Level = $o['Level'];
        if (isset($o['RentPrice'])) $this->RentPrice = $o['RentPrice'];
        if (isset($o['CashPrice'])) $this->CashPrice = $o['CashPrice'];
        if (isset($o['Token'])) $this->Token = $o['Token'];
        if (isset($o['InstrumentId'])) $this->InstrumentId = $o['InstrumentId'];
        if (isset($o['InstrumentTeacherId'])) $this->InstrumentTeacherId = $o['InstrumentTeacherId'];
        if (isset($o['GradeList'])) $this->GradeList = JsonConverters::fromArray('C2BGradeGeneric', $o['GradeList']);
        if (isset($o['HasGrades'])) $this->HasGrades = $o['HasGrades'];
        if (isset($o['DisplayOrder'])) $this->DisplayOrder = $o['DisplayOrder'];
        if (isset($o['AccessoryList'])) $this->AccessoryList = JsonConverters::fromArray('C2BAccessoryGeneric', $o['AccessoryList']);
        if (isset($o['DeliveryList'])) $this->DeliveryList = JsonConverters::fromArray('C2BAccessoryGeneric', $o['DeliveryList']);
        if (isset($o['MaintenanceList'])) $this->MaintenanceList = JsonConverters::fromArray('C2BAccessoryGeneric', $o['MaintenanceList']);
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = [];
        if (isset($this->InstrumentName)) $o['InstrumentName'] = $this->InstrumentName;
        if (isset($this->Sku)) $o['Sku'] = $this->Sku;
        if (isset($this->Topic)) $o['Topic'] = $this->Topic;
        if (isset($this->Image)) $o['Image'] = $this->Image;
        if (isset($this->Level)) $o['Level'] = $this->Level;
        if (isset($this->RentPrice)) $o['RentPrice'] = $this->RentPrice;
        if (isset($this->CashPrice)) $o['CashPrice'] = $this->CashPrice;
        if (isset($this->Token)) $o['Token'] = $this->Token;
        if (isset($this->InstrumentId)) $o['InstrumentId'] = $this->InstrumentId;
        if (isset($this->InstrumentTeacherId)) $o['InstrumentTeacherId'] = $this->InstrumentTeacherId;
        if (isset($this->GradeList)) $o['GradeList'] = JsonConverters::toArray('C2BGradeGeneric', $this->GradeList);
        if (isset($this->HasGrades)) $o['HasGrades'] = $this->HasGrades;
        if (isset($this->DisplayOrder)) $o['DisplayOrder'] = $this->DisplayOrder;
        if (isset($this->AccessoryList)) $o['AccessoryList'] = JsonConverters::toArray('C2BAccessoryGeneric', $this->AccessoryList);
        if (isset($this->DeliveryList)) $o['DeliveryList'] = JsonConverters::toArray('C2BAccessoryGeneric', $this->DeliveryList);
        if (isset($this->MaintenanceList)) $o['MaintenanceList'] = JsonConverters::toArray('C2BAccessoryGeneric', $this->MaintenanceList);
        return empty($o) ? new class(){} : $o;
    }
}

// @DataContract
class C2BGetInstrumentInfoResponse extends BaseResponse implements JsonSerializable
{
    /**
     * @param BaseResponseResult|null $Status
     */
    public function __construct(
        ?BaseResponseResult $Status=null,
        // @DataMember
        /** @var array<C2BInstrumentGeneric>|null */
        public ?array $Instruments=null
    ) {
        parent::__construct($Status);
    }

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

/** @description C2BGetInstrumentInfoRequires active-e Contracts Service. */
// @DataContract
class C2BGetInstrumentInfoRequest 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='',
        /** @description ID of the Teacher/Instrument record. */
        // @DataMember
        // @ApiMember(DataType="integer", Description="ID of the Teacher/Instrument record.", Format="int64", Name="RsiPk", ParameterType="query")
        /** @var int|null */
        public ?int $RsiPk=null,

        /** @description ID of the Teacher record. */
        // @DataMember
        // @ApiMember(DataType="integer", Description="ID of the Teacher record.", Format="int64", Name="TeacherId", ParameterType="query")
        /** @var int|null */
        public ?int $TeacherId=null,

        /** @description Optional Plan Code Override. If not sent, plancode from the school will be used. */
        // @DataMember
        // @ApiMember(DataType="string", Description="Optional Plan Code Override. If not sent, plancode from the school will be used.", Name="PlanCode", ParameterType="query")
        /** @var string|null */
        public ?string $PlanCode=null,

        /** @description If set to false, less details will be sent. Defaults to True. */
        // @DataMember
        // @ApiMember(DataType="boolean", Description="If set to false, less details will be sent. Defaults to True.", Name="GetDetails", ParameterType="query")
        /** @var bool|null */
        public ?bool $GetDetails=null,

        /** @description If set to true, Out of Stock items will be included. */
        // @DataMember
        // @ApiMember(DataType="boolean", Description="If set to true, Out of Stock items will be included.", Name="IncludeOutOfStockItems", ParameterType="query")
        /** @var bool|null */
        public ?bool $IncludeOutOfStockItems=null,

        /** @description If set to true, each instrument will include a list of accessory options. Defaults to False. */
        // @DataMember
        // @ApiMember(DataType="boolean", Description="If set to true, each instrument will include a list of accessory options. Defaults to False.", Name="IncludeAccessoryOptions", ParameterType="query")
        /** @var bool|null */
        public ?bool $IncludeAccessoryOptions=null,

        /** @description If set to true, each instrument will include a list of delivery options. Defaults to False. */
        // @DataMember
        // @ApiMember(DataType="boolean", Description="If set to true, each instrument will include a list of delivery options. Defaults to False.", Name="IncludeDeliveryOptions", ParameterType="query")
        /** @var bool|null */
        public ?bool $IncludeDeliveryOptions=null,

        /** @description If set to true, each instrument will include a list of maintenance options. Defaults to False. */
        // @DataMember
        // @ApiMember(DataType="boolean", Description="If set to true, each instrument will include a list of maintenance options. Defaults to False.", Name="IncludeMaintenanceOptions", ParameterType="query")
        /** @var bool|null */
        public ?bool $IncludeMaintenanceOptions=null
    ) {
        parent::__construct($ApiKey,$OAuthToken,$Token,$DeviceId,$AppId);
    }

    /** @throws Exception */
    public function fromMap($o): void {
        parent::fromMap($o);
        if (isset($o['RsiPk'])) $this->RsiPk = $o['RsiPk'];
        if (isset($o['TeacherId'])) $this->TeacherId = $o['TeacherId'];
        if (isset($o['PlanCode'])) $this->PlanCode = $o['PlanCode'];
        if (isset($o['GetDetails'])) $this->GetDetails = $o['GetDetails'];
        if (isset($o['IncludeOutOfStockItems'])) $this->IncludeOutOfStockItems = $o['IncludeOutOfStockItems'];
        if (isset($o['IncludeAccessoryOptions'])) $this->IncludeAccessoryOptions = $o['IncludeAccessoryOptions'];
        if (isset($o['IncludeDeliveryOptions'])) $this->IncludeDeliveryOptions = $o['IncludeDeliveryOptions'];
        if (isset($o['IncludeMaintenanceOptions'])) $this->IncludeMaintenanceOptions = $o['IncludeMaintenanceOptions'];
    }
    
    /** @throws Exception */
    public function jsonSerialize(): mixed
    {
        $o = parent::jsonSerialize();
        if (isset($this->RsiPk)) $o['RsiPk'] = $this->RsiPk;
        if (isset($this->TeacherId)) $o['TeacherId'] = $this->TeacherId;
        if (isset($this->PlanCode)) $o['PlanCode'] = $this->PlanCode;
        if (isset($this->GetDetails)) $o['GetDetails'] = $this->GetDetails;
        if (isset($this->IncludeOutOfStockItems)) $o['IncludeOutOfStockItems'] = $this->IncludeOutOfStockItems;
        if (isset($this->IncludeAccessoryOptions)) $o['IncludeAccessoryOptions'] = $this->IncludeAccessoryOptions;
        if (isset($this->IncludeDeliveryOptions)) $o['IncludeDeliveryOptions'] = $this->IncludeDeliveryOptions;
        if (isset($this->IncludeMaintenanceOptions)) $o['IncludeMaintenanceOptions'] = $this->IncludeMaintenanceOptions;
        return empty($o) ? new class(){} : $o;
    }
}

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

POST /api/C2BGetInstrumentInfo HTTP/1.1 
Host: active-ewebservice.biz 
Accept: application/xml
Content-Type: application/xml
Content-Length: length

<C2BGetInstrumentInfoRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/AIM.WebService">
  <ApiKey>String</ApiKey>
  <OAuthToken>String</OAuthToken>
  <AppId>String</AppId>
  <DeviceId>String</DeviceId>
  <Token>String</Token>
  <GetDetails>false</GetDetails>
  <IncludeAccessoryOptions>false</IncludeAccessoryOptions>
  <IncludeDeliveryOptions>false</IncludeDeliveryOptions>
  <IncludeMaintenanceOptions>false</IncludeMaintenanceOptions>
  <IncludeOutOfStockItems>false</IncludeOutOfStockItems>
  <PlanCode>String</PlanCode>
  <RsiPk>0</RsiPk>
  <TeacherId>0</TeacherId>
</C2BGetInstrumentInfoRequest>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<C2BGetInstrumentInfoResponse 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>
  <Instruments xmlns:d2p1="http://schemas.datacontract.org/2004/07/AIM">
    <d2p1:C2BInstrumentGeneric i:nil="true" />
  </Instruments>
</C2BGetInstrumentInfoResponse>