| PUT | /CreateOCAv2/ |
|---|
<?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 CreateOCAv2RequestResponse implements JsonSerializable
{
public function __construct(
// @DataMember
/** @var string|null */
public ?string $Code=null,
// @DataMember
/** @var string|null */
public ?string $Message=null,
// @DataMember
/** @var int */
public int $URN=0
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['Code'])) $this->Code = $o['Code'];
if (isset($o['Message'])) $this->Message = $o['Message'];
if (isset($o['URN'])) $this->URN = $o['URN'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->Code)) $o['Code'] = $this->Code;
if (isset($this->Message)) $o['Message'] = $this->Message;
if (isset($this->URN)) $o['URN'] = $this->URN;
return empty($o) ? new class(){} : $o;
}
}
class GeneralDetailsv2 implements JsonSerializable
{
public function __construct(
/** @var string|null */
public ?string $OCAApprovalNumber=null,
/** @var string|null */
public ?string $EnquiryDateTime=null,
/** @var int */
public int $Brand=0,
/** @var string|null */
public ?string $CustomerReferenceNumber=null,
/** @var string|null */
public ?string $CustomerType=null,
/** @var string|null */
public ?string $SourceofBusiness=null,
/** @var string|null */
public ?string $TagURL=null,
/** @var int */
public int $RequestSource=0,
/** @var string|null */
public ?string $FormID=null,
/** @var string|null */
public ?string $ProposalCreated=null,
/** @var string|null */
public ?string $LoadFullData=null,
/** @var string|null */
public ?string $ProposalNumber=null,
/** @var string|null */
public ?string $POSSystem=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['OCAApprovalNumber'])) $this->OCAApprovalNumber = $o['OCAApprovalNumber'];
if (isset($o['EnquiryDateTime'])) $this->EnquiryDateTime = $o['EnquiryDateTime'];
if (isset($o['Brand'])) $this->Brand = $o['Brand'];
if (isset($o['CustomerReferenceNumber'])) $this->CustomerReferenceNumber = $o['CustomerReferenceNumber'];
if (isset($o['CustomerType'])) $this->CustomerType = $o['CustomerType'];
if (isset($o['SourceofBusiness'])) $this->SourceofBusiness = $o['SourceofBusiness'];
if (isset($o['TagURL'])) $this->TagURL = $o['TagURL'];
if (isset($o['RequestSource'])) $this->RequestSource = $o['RequestSource'];
if (isset($o['FormID'])) $this->FormID = $o['FormID'];
if (isset($o['ProposalCreated'])) $this->ProposalCreated = $o['ProposalCreated'];
if (isset($o['LoadFullData'])) $this->LoadFullData = $o['LoadFullData'];
if (isset($o['ProposalNumber'])) $this->ProposalNumber = $o['ProposalNumber'];
if (isset($o['POSSystem'])) $this->POSSystem = $o['POSSystem'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->OCAApprovalNumber)) $o['OCAApprovalNumber'] = $this->OCAApprovalNumber;
if (isset($this->EnquiryDateTime)) $o['EnquiryDateTime'] = $this->EnquiryDateTime;
if (isset($this->Brand)) $o['Brand'] = $this->Brand;
if (isset($this->CustomerReferenceNumber)) $o['CustomerReferenceNumber'] = $this->CustomerReferenceNumber;
if (isset($this->CustomerType)) $o['CustomerType'] = $this->CustomerType;
if (isset($this->SourceofBusiness)) $o['SourceofBusiness'] = $this->SourceofBusiness;
if (isset($this->TagURL)) $o['TagURL'] = $this->TagURL;
if (isset($this->RequestSource)) $o['RequestSource'] = $this->RequestSource;
if (isset($this->FormID)) $o['FormID'] = $this->FormID;
if (isset($this->ProposalCreated)) $o['ProposalCreated'] = $this->ProposalCreated;
if (isset($this->LoadFullData)) $o['LoadFullData'] = $this->LoadFullData;
if (isset($this->ProposalNumber)) $o['ProposalNumber'] = $this->ProposalNumber;
if (isset($this->POSSystem)) $o['POSSystem'] = $this->POSSystem;
return empty($o) ? new class(){} : $o;
}
}
class FinanceDetailsv2 implements JsonSerializable
{
public function __construct(
/** @var string|null */
public ?string $FinancialProduct=null,
/** @var string|null */
public ?string $CampaignCode=null,
/** @var string|null */
public ?string $PhoenixFinanceProductCode=null,
/** @var string|null */
public ?string $Fixed=null,
/** @var string|null */
public ?string $FleetNonFleet=null,
/** @var string|null */
public ?string $RFLCover=null,
/** @var int */
public int $Duration=0,
/** @var float */
public float $PaymentRentalAmount=0.0,
/** @var float|null */
public ?float $RentalAmountExcVAT=null,
/** @var string|null */
public ?string $AdvanceArrears=null,
/** @var int */
public int $AnnualMileage=0,
/** @var float */
public float $ExcessMileageRate=0.0,
/** @var float|null */
public ?float $CustomerDepositContribution=null,
/** @var float|null */
public ?float $RetailerDepositContribution=null,
/** @var float|null */
public ?float $RetailerDepositContributionNet=null,
/** @var float|null */
public ?float $ManufacturerDepositContribution=null,
/** @var float|null */
public ?float $ManufacturerDepositContributionNet=null,
/** @var float|null */
public ?float $TotalDepositContribution=null,
/** @var float|null */
public ?float $LumpSum=null,
/** @var float|null */
public ?float $CostForCredit=null,
/** @var float|null */
public ?float $PurchaseActivationFee=null,
/** @var float|null */
public ?float $TotalAmountPayable=null,
/** @var float|null */
public ?float $FixedInterestRate=null,
/** @var float|null */
public ?float $RepresentativeAPR=null,
/** @var string|null */
public ?string $TrueFlatRate=null,
/** @var string|null */
public ?string $RVReferenceNumber=null,
/** @var float|null */
public ?float $OptionalPurchasePayment=null,
/** @var float */
public float $AdvancedRentalAmount=0.0,
/** @var string|null */
public ?string $NumberofAdvanceRentals=null,
/** @var string|null */
public ?string $PaymentProfile=null,
/** @var string|null */
public ?string $RandMIncluded=null,
/** @var string|null */
public ?string $RandMLevel=null,
/** @var string|null */
public ?string $ProductType=null,
/** @var string|null */
public ?string $Frequency=null,
/** @var string|null */
public ?string $PauseType=null,
/** @var float|null */
public ?float $EqualsFinance=null,
/** @var float|null */
public ?float $AcceptanceFee=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['FinancialProduct'])) $this->FinancialProduct = $o['FinancialProduct'];
if (isset($o['CampaignCode'])) $this->CampaignCode = $o['CampaignCode'];
if (isset($o['PhoenixFinanceProductCode'])) $this->PhoenixFinanceProductCode = $o['PhoenixFinanceProductCode'];
if (isset($o['Fixed'])) $this->Fixed = $o['Fixed'];
if (isset($o['FleetNonFleet'])) $this->FleetNonFleet = $o['FleetNonFleet'];
if (isset($o['RFLCover'])) $this->RFLCover = $o['RFLCover'];
if (isset($o['Duration'])) $this->Duration = $o['Duration'];
if (isset($o['PaymentRentalAmount'])) $this->PaymentRentalAmount = $o['PaymentRentalAmount'];
if (isset($o['RentalAmountExcVAT'])) $this->RentalAmountExcVAT = $o['RentalAmountExcVAT'];
if (isset($o['AdvanceArrears'])) $this->AdvanceArrears = $o['AdvanceArrears'];
if (isset($o['AnnualMileage'])) $this->AnnualMileage = $o['AnnualMileage'];
if (isset($o['ExcessMileageRate'])) $this->ExcessMileageRate = $o['ExcessMileageRate'];
if (isset($o['CustomerDepositContribution'])) $this->CustomerDepositContribution = $o['CustomerDepositContribution'];
if (isset($o['RetailerDepositContribution'])) $this->RetailerDepositContribution = $o['RetailerDepositContribution'];
if (isset($o['RetailerDepositContributionNet'])) $this->RetailerDepositContributionNet = $o['RetailerDepositContributionNet'];
if (isset($o['ManufacturerDepositContribution'])) $this->ManufacturerDepositContribution = $o['ManufacturerDepositContribution'];
if (isset($o['ManufacturerDepositContributionNet'])) $this->ManufacturerDepositContributionNet = $o['ManufacturerDepositContributionNet'];
if (isset($o['TotalDepositContribution'])) $this->TotalDepositContribution = $o['TotalDepositContribution'];
if (isset($o['LumpSum'])) $this->LumpSum = $o['LumpSum'];
if (isset($o['CostForCredit'])) $this->CostForCredit = $o['CostForCredit'];
if (isset($o['PurchaseActivationFee'])) $this->PurchaseActivationFee = $o['PurchaseActivationFee'];
if (isset($o['TotalAmountPayable'])) $this->TotalAmountPayable = $o['TotalAmountPayable'];
if (isset($o['FixedInterestRate'])) $this->FixedInterestRate = $o['FixedInterestRate'];
if (isset($o['RepresentativeAPR'])) $this->RepresentativeAPR = $o['RepresentativeAPR'];
if (isset($o['TrueFlatRate'])) $this->TrueFlatRate = $o['TrueFlatRate'];
if (isset($o['RVReferenceNumber'])) $this->RVReferenceNumber = $o['RVReferenceNumber'];
if (isset($o['OptionalPurchasePayment'])) $this->OptionalPurchasePayment = $o['OptionalPurchasePayment'];
if (isset($o['AdvancedRentalAmount'])) $this->AdvancedRentalAmount = $o['AdvancedRentalAmount'];
if (isset($o['NumberofAdvanceRentals'])) $this->NumberofAdvanceRentals = $o['NumberofAdvanceRentals'];
if (isset($o['PaymentProfile'])) $this->PaymentProfile = $o['PaymentProfile'];
if (isset($o['RandMIncluded'])) $this->RandMIncluded = $o['RandMIncluded'];
if (isset($o['RandMLevel'])) $this->RandMLevel = $o['RandMLevel'];
if (isset($o['ProductType'])) $this->ProductType = $o['ProductType'];
if (isset($o['Frequency'])) $this->Frequency = $o['Frequency'];
if (isset($o['PauseType'])) $this->PauseType = $o['PauseType'];
if (isset($o['EqualsFinance'])) $this->EqualsFinance = $o['EqualsFinance'];
if (isset($o['AcceptanceFee'])) $this->AcceptanceFee = $o['AcceptanceFee'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->FinancialProduct)) $o['FinancialProduct'] = $this->FinancialProduct;
if (isset($this->CampaignCode)) $o['CampaignCode'] = $this->CampaignCode;
if (isset($this->PhoenixFinanceProductCode)) $o['PhoenixFinanceProductCode'] = $this->PhoenixFinanceProductCode;
if (isset($this->Fixed)) $o['Fixed'] = $this->Fixed;
if (isset($this->FleetNonFleet)) $o['FleetNonFleet'] = $this->FleetNonFleet;
if (isset($this->RFLCover)) $o['RFLCover'] = $this->RFLCover;
if (isset($this->Duration)) $o['Duration'] = $this->Duration;
if (isset($this->PaymentRentalAmount)) $o['PaymentRentalAmount'] = $this->PaymentRentalAmount;
if (isset($this->RentalAmountExcVAT)) $o['RentalAmountExcVAT'] = $this->RentalAmountExcVAT;
if (isset($this->AdvanceArrears)) $o['AdvanceArrears'] = $this->AdvanceArrears;
if (isset($this->AnnualMileage)) $o['AnnualMileage'] = $this->AnnualMileage;
if (isset($this->ExcessMileageRate)) $o['ExcessMileageRate'] = $this->ExcessMileageRate;
if (isset($this->CustomerDepositContribution)) $o['CustomerDepositContribution'] = $this->CustomerDepositContribution;
if (isset($this->RetailerDepositContribution)) $o['RetailerDepositContribution'] = $this->RetailerDepositContribution;
if (isset($this->RetailerDepositContributionNet)) $o['RetailerDepositContributionNet'] = $this->RetailerDepositContributionNet;
if (isset($this->ManufacturerDepositContribution)) $o['ManufacturerDepositContribution'] = $this->ManufacturerDepositContribution;
if (isset($this->ManufacturerDepositContributionNet)) $o['ManufacturerDepositContributionNet'] = $this->ManufacturerDepositContributionNet;
if (isset($this->TotalDepositContribution)) $o['TotalDepositContribution'] = $this->TotalDepositContribution;
if (isset($this->LumpSum)) $o['LumpSum'] = $this->LumpSum;
if (isset($this->CostForCredit)) $o['CostForCredit'] = $this->CostForCredit;
if (isset($this->PurchaseActivationFee)) $o['PurchaseActivationFee'] = $this->PurchaseActivationFee;
if (isset($this->TotalAmountPayable)) $o['TotalAmountPayable'] = $this->TotalAmountPayable;
if (isset($this->FixedInterestRate)) $o['FixedInterestRate'] = $this->FixedInterestRate;
if (isset($this->RepresentativeAPR)) $o['RepresentativeAPR'] = $this->RepresentativeAPR;
if (isset($this->TrueFlatRate)) $o['TrueFlatRate'] = $this->TrueFlatRate;
if (isset($this->RVReferenceNumber)) $o['RVReferenceNumber'] = $this->RVReferenceNumber;
if (isset($this->OptionalPurchasePayment)) $o['OptionalPurchasePayment'] = $this->OptionalPurchasePayment;
if (isset($this->AdvancedRentalAmount)) $o['AdvancedRentalAmount'] = $this->AdvancedRentalAmount;
if (isset($this->NumberofAdvanceRentals)) $o['NumberofAdvanceRentals'] = $this->NumberofAdvanceRentals;
if (isset($this->PaymentProfile)) $o['PaymentProfile'] = $this->PaymentProfile;
if (isset($this->RandMIncluded)) $o['RandMIncluded'] = $this->RandMIncluded;
if (isset($this->RandMLevel)) $o['RandMLevel'] = $this->RandMLevel;
if (isset($this->ProductType)) $o['ProductType'] = $this->ProductType;
if (isset($this->Frequency)) $o['Frequency'] = $this->Frequency;
if (isset($this->PauseType)) $o['PauseType'] = $this->PauseType;
if (isset($this->EqualsFinance)) $o['EqualsFinance'] = $this->EqualsFinance;
if (isset($this->AcceptanceFee)) $o['AcceptanceFee'] = $this->AcceptanceFee;
return empty($o) ? new class(){} : $o;
}
}
class ModelOptionDetailsv2 implements JsonSerializable
{
public function __construct(
/** @var int */
public int $Seq=0,
/** @var string|null */
public ?string $Type=null,
/** @var string|null */
public ?string $Code=null,
/** @var string|null */
public ?string $Description=null,
/** @var float */
public float $Price=0.0,
/** @var float|null */
public ?float $PriceGross=null,
/** @var string|null */
public ?string $VATCategory=null,
/** @var float|null */
public ?float $VATAmount=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['Seq'])) $this->Seq = $o['Seq'];
if (isset($o['Type'])) $this->Type = $o['Type'];
if (isset($o['Code'])) $this->Code = $o['Code'];
if (isset($o['Description'])) $this->Description = $o['Description'];
if (isset($o['Price'])) $this->Price = $o['Price'];
if (isset($o['PriceGross'])) $this->PriceGross = $o['PriceGross'];
if (isset($o['VATCategory'])) $this->VATCategory = $o['VATCategory'];
if (isset($o['VATAmount'])) $this->VATAmount = $o['VATAmount'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->Seq)) $o['Seq'] = $this->Seq;
if (isset($this->Type)) $o['Type'] = $this->Type;
if (isset($this->Code)) $o['Code'] = $this->Code;
if (isset($this->Description)) $o['Description'] = $this->Description;
if (isset($this->Price)) $o['Price'] = $this->Price;
if (isset($this->PriceGross)) $o['PriceGross'] = $this->PriceGross;
if (isset($this->VATCategory)) $o['VATCategory'] = $this->VATCategory;
if (isset($this->VATAmount)) $o['VATAmount'] = $this->VATAmount;
return empty($o) ? new class(){} : $o;
}
}
class VehicleDetailsv2 implements JsonSerializable
{
public function __construct(
/** @var string|null */
public ?string $OnlineCode=null,
/** @var string|null */
public ?string $ModelClass=null,
/** @var string|null */
public ?string $ModelBody=null,
/** @var string|null */
public ?string $ModelDerivative=null,
/** @var float */
public float $TotalPrice=0.0,
/** @var float */
public float $OTRPrice=0.0,
/** @var string|null */
public ?string $VIN=null,
/** @var string|null */
public ?string $RegNo=null,
/** @var string|null */
public ?string $CommissionNumber=null,
/** @var string|null */
public ?string $EngineNumber=null,
/** @var int */
public int $CurrentMileage=0,
/** @var string|null */
public ?string $MilesKilometers=null,
/** @var string|null */
public ?string $FirstRegistrationDate=null,
/** @var string|null */
public ?string $NewUsedFlag=null,
/** @var ModelOptionDetailsv2[]|null */
public ?array $NewVehicleModelOptionDetails=null,
/** @var string|null */
public ?string $VID=null,
/** @var string|null */
public ?string $Baumuster=null,
/** @var float|null */
public ?float $VehiclePrice=null,
/** @var float|null */
public ?float $TotalVAT=null,
/** @var float|null */
public ?float $OLEVGrant=null,
/** @var float|null */
public ?float $ExtrasTotalExcVAT=null,
/** @var string|null */
public ?string $CombinedCO2=null,
/** @var string|null */
public ?string $VehicleVATTickBox=null,
/** @var string|null */
public ?string $FirstYearRFLIncluded=null,
/** @var float|null */
public ?float $FirstYearRFLAmount=null,
/** @var string|null */
public ?string $FirstRegFeeIncludedFlag=null,
/** @var float|null */
public ?float $FirstRegFeeAmount=null,
/** @var string|null */
public ?string $HighLowVEDSupplementFlag=null,
/** @var string|null */
public ?string $LeaseRFLSubsequentYears=null,
/** @var float|null */
public ?float $LeaseRFLSubsequentYearsAmount=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['OnlineCode'])) $this->OnlineCode = $o['OnlineCode'];
if (isset($o['ModelClass'])) $this->ModelClass = $o['ModelClass'];
if (isset($o['ModelBody'])) $this->ModelBody = $o['ModelBody'];
if (isset($o['ModelDerivative'])) $this->ModelDerivative = $o['ModelDerivative'];
if (isset($o['TotalPrice'])) $this->TotalPrice = $o['TotalPrice'];
if (isset($o['OTRPrice'])) $this->OTRPrice = $o['OTRPrice'];
if (isset($o['VIN'])) $this->VIN = $o['VIN'];
if (isset($o['RegNo'])) $this->RegNo = $o['RegNo'];
if (isset($o['CommissionNumber'])) $this->CommissionNumber = $o['CommissionNumber'];
if (isset($o['EngineNumber'])) $this->EngineNumber = $o['EngineNumber'];
if (isset($o['CurrentMileage'])) $this->CurrentMileage = $o['CurrentMileage'];
if (isset($o['MilesKilometers'])) $this->MilesKilometers = $o['MilesKilometers'];
if (isset($o['FirstRegistrationDate'])) $this->FirstRegistrationDate = $o['FirstRegistrationDate'];
if (isset($o['NewUsedFlag'])) $this->NewUsedFlag = $o['NewUsedFlag'];
if (isset($o['NewVehicleModelOptionDetails'])) $this->NewVehicleModelOptionDetails = JsonConverters::fromArray('ModelOptionDetailsv2', $o['NewVehicleModelOptionDetails']);
if (isset($o['VID'])) $this->VID = $o['VID'];
if (isset($o['Baumuster'])) $this->Baumuster = $o['Baumuster'];
if (isset($o['VehiclePrice'])) $this->VehiclePrice = $o['VehiclePrice'];
if (isset($o['TotalVAT'])) $this->TotalVAT = $o['TotalVAT'];
if (isset($o['OLEVGrant'])) $this->OLEVGrant = $o['OLEVGrant'];
if (isset($o['ExtrasTotalExcVAT'])) $this->ExtrasTotalExcVAT = $o['ExtrasTotalExcVAT'];
if (isset($o['CombinedCO2'])) $this->CombinedCO2 = $o['CombinedCO2'];
if (isset($o['VehicleVATTickBox'])) $this->VehicleVATTickBox = $o['VehicleVATTickBox'];
if (isset($o['FirstYearRFLIncluded'])) $this->FirstYearRFLIncluded = $o['FirstYearRFLIncluded'];
if (isset($o['FirstYearRFLAmount'])) $this->FirstYearRFLAmount = $o['FirstYearRFLAmount'];
if (isset($o['FirstRegFeeIncludedFlag'])) $this->FirstRegFeeIncludedFlag = $o['FirstRegFeeIncludedFlag'];
if (isset($o['FirstRegFeeAmount'])) $this->FirstRegFeeAmount = $o['FirstRegFeeAmount'];
if (isset($o['HighLowVEDSupplementFlag'])) $this->HighLowVEDSupplementFlag = $o['HighLowVEDSupplementFlag'];
if (isset($o['LeaseRFLSubsequentYears'])) $this->LeaseRFLSubsequentYears = $o['LeaseRFLSubsequentYears'];
if (isset($o['LeaseRFLSubsequentYearsAmount'])) $this->LeaseRFLSubsequentYearsAmount = $o['LeaseRFLSubsequentYearsAmount'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->OnlineCode)) $o['OnlineCode'] = $this->OnlineCode;
if (isset($this->ModelClass)) $o['ModelClass'] = $this->ModelClass;
if (isset($this->ModelBody)) $o['ModelBody'] = $this->ModelBody;
if (isset($this->ModelDerivative)) $o['ModelDerivative'] = $this->ModelDerivative;
if (isset($this->TotalPrice)) $o['TotalPrice'] = $this->TotalPrice;
if (isset($this->OTRPrice)) $o['OTRPrice'] = $this->OTRPrice;
if (isset($this->VIN)) $o['VIN'] = $this->VIN;
if (isset($this->RegNo)) $o['RegNo'] = $this->RegNo;
if (isset($this->CommissionNumber)) $o['CommissionNumber'] = $this->CommissionNumber;
if (isset($this->EngineNumber)) $o['EngineNumber'] = $this->EngineNumber;
if (isset($this->CurrentMileage)) $o['CurrentMileage'] = $this->CurrentMileage;
if (isset($this->MilesKilometers)) $o['MilesKilometers'] = $this->MilesKilometers;
if (isset($this->FirstRegistrationDate)) $o['FirstRegistrationDate'] = $this->FirstRegistrationDate;
if (isset($this->NewUsedFlag)) $o['NewUsedFlag'] = $this->NewUsedFlag;
if (isset($this->NewVehicleModelOptionDetails)) $o['NewVehicleModelOptionDetails'] = JsonConverters::toArray('ModelOptionDetailsv2', $this->NewVehicleModelOptionDetails);
if (isset($this->VID)) $o['VID'] = $this->VID;
if (isset($this->Baumuster)) $o['Baumuster'] = $this->Baumuster;
if (isset($this->VehiclePrice)) $o['VehiclePrice'] = $this->VehiclePrice;
if (isset($this->TotalVAT)) $o['TotalVAT'] = $this->TotalVAT;
if (isset($this->OLEVGrant)) $o['OLEVGrant'] = $this->OLEVGrant;
if (isset($this->ExtrasTotalExcVAT)) $o['ExtrasTotalExcVAT'] = $this->ExtrasTotalExcVAT;
if (isset($this->CombinedCO2)) $o['CombinedCO2'] = $this->CombinedCO2;
if (isset($this->VehicleVATTickBox)) $o['VehicleVATTickBox'] = $this->VehicleVATTickBox;
if (isset($this->FirstYearRFLIncluded)) $o['FirstYearRFLIncluded'] = $this->FirstYearRFLIncluded;
if (isset($this->FirstYearRFLAmount)) $o['FirstYearRFLAmount'] = $this->FirstYearRFLAmount;
if (isset($this->FirstRegFeeIncludedFlag)) $o['FirstRegFeeIncludedFlag'] = $this->FirstRegFeeIncludedFlag;
if (isset($this->FirstRegFeeAmount)) $o['FirstRegFeeAmount'] = $this->FirstRegFeeAmount;
if (isset($this->HighLowVEDSupplementFlag)) $o['HighLowVEDSupplementFlag'] = $this->HighLowVEDSupplementFlag;
if (isset($this->LeaseRFLSubsequentYears)) $o['LeaseRFLSubsequentYears'] = $this->LeaseRFLSubsequentYears;
if (isset($this->LeaseRFLSubsequentYearsAmount)) $o['LeaseRFLSubsequentYearsAmount'] = $this->LeaseRFLSubsequentYearsAmount;
return empty($o) ? new class(){} : $o;
}
}
class DeliveryDetailsv2 implements JsonSerializable
{
public function __construct(
/** @var string|null */
public ?string $DealerCode=null,
/** @var string|null */
public ?string $DeliveryPreference=null,
/** @var string|null */
public ?string $DeliveryDate=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['DealerCode'])) $this->DealerCode = $o['DealerCode'];
if (isset($o['DeliveryPreference'])) $this->DeliveryPreference = $o['DeliveryPreference'];
if (isset($o['DeliveryDate'])) $this->DeliveryDate = $o['DeliveryDate'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->DealerCode)) $o['DealerCode'] = $this->DealerCode;
if (isset($this->DeliveryPreference)) $o['DeliveryPreference'] = $this->DeliveryPreference;
if (isset($this->DeliveryDate)) $o['DeliveryDate'] = $this->DeliveryDate;
return empty($o) ? new class(){} : $o;
}
}
class ExistingVehicleDetailsv2 implements JsonSerializable
{
public function __construct(
/** @var string|null */
public ?string $TradeInFlag=null,
/** @var string|null */
public ?string $TradeInIncludedInCalc=null,
/** @var float */
public float $TradeInValue=0.0,
/** @var float|null */
public ?float $TradeInValueNet=null,
/** @var string|null */
public ?string $TradeInRegNo=null,
/** @var string|null */
public ?string $TradeInVIN=null,
/** @var int|null */
public ?int $TradeInMileage=null,
/** @var string|null */
public ?string $TradeInCondition=null,
/** @var string|null */
public ?string $SettlementFlag=null,
/** @var string|null */
public ?string $SettlementIncludedInCalc=null,
/** @var float */
public float $SettlementValue=0.0,
/** @var float */
public float $SettlementValueNet=0.0,
/** @var string|null */
public ?string $SettlementRegNo=null,
/** @var string|null */
public ?string $SettlementVIN=null,
/** @var int|null */
public ?int $SettlementMileage=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['TradeInFlag'])) $this->TradeInFlag = $o['TradeInFlag'];
if (isset($o['TradeInIncludedInCalc'])) $this->TradeInIncludedInCalc = $o['TradeInIncludedInCalc'];
if (isset($o['TradeInValue'])) $this->TradeInValue = $o['TradeInValue'];
if (isset($o['TradeInValueNet'])) $this->TradeInValueNet = $o['TradeInValueNet'];
if (isset($o['TradeInRegNo'])) $this->TradeInRegNo = $o['TradeInRegNo'];
if (isset($o['TradeInVIN'])) $this->TradeInVIN = $o['TradeInVIN'];
if (isset($o['TradeInMileage'])) $this->TradeInMileage = $o['TradeInMileage'];
if (isset($o['TradeInCondition'])) $this->TradeInCondition = $o['TradeInCondition'];
if (isset($o['SettlementFlag'])) $this->SettlementFlag = $o['SettlementFlag'];
if (isset($o['SettlementIncludedInCalc'])) $this->SettlementIncludedInCalc = $o['SettlementIncludedInCalc'];
if (isset($o['SettlementValue'])) $this->SettlementValue = $o['SettlementValue'];
if (isset($o['SettlementValueNet'])) $this->SettlementValueNet = $o['SettlementValueNet'];
if (isset($o['SettlementRegNo'])) $this->SettlementRegNo = $o['SettlementRegNo'];
if (isset($o['SettlementVIN'])) $this->SettlementVIN = $o['SettlementVIN'];
if (isset($o['SettlementMileage'])) $this->SettlementMileage = $o['SettlementMileage'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->TradeInFlag)) $o['TradeInFlag'] = $this->TradeInFlag;
if (isset($this->TradeInIncludedInCalc)) $o['TradeInIncludedInCalc'] = $this->TradeInIncludedInCalc;
if (isset($this->TradeInValue)) $o['TradeInValue'] = $this->TradeInValue;
if (isset($this->TradeInValueNet)) $o['TradeInValueNet'] = $this->TradeInValueNet;
if (isset($this->TradeInRegNo)) $o['TradeInRegNo'] = $this->TradeInRegNo;
if (isset($this->TradeInVIN)) $o['TradeInVIN'] = $this->TradeInVIN;
if (isset($this->TradeInMileage)) $o['TradeInMileage'] = $this->TradeInMileage;
if (isset($this->TradeInCondition)) $o['TradeInCondition'] = $this->TradeInCondition;
if (isset($this->SettlementFlag)) $o['SettlementFlag'] = $this->SettlementFlag;
if (isset($this->SettlementIncludedInCalc)) $o['SettlementIncludedInCalc'] = $this->SettlementIncludedInCalc;
if (isset($this->SettlementValue)) $o['SettlementValue'] = $this->SettlementValue;
if (isset($this->SettlementValueNet)) $o['SettlementValueNet'] = $this->SettlementValueNet;
if (isset($this->SettlementRegNo)) $o['SettlementRegNo'] = $this->SettlementRegNo;
if (isset($this->SettlementVIN)) $o['SettlementVIN'] = $this->SettlementVIN;
if (isset($this->SettlementMileage)) $o['SettlementMileage'] = $this->SettlementMileage;
return empty($o) ? new class(){} : $o;
}
}
class InsuranceDetails implements JsonSerializable
{
public function __construct(
/** @var string|null */
public ?string $InterestedInFirstCoverFlag=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['InterestedInFirstCoverFlag'])) $this->InterestedInFirstCoverFlag = $o['InterestedInFirstCoverFlag'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->InterestedInFirstCoverFlag)) $o['InterestedInFirstCoverFlag'] = $this->InterestedInFirstCoverFlag;
return empty($o) ? new class(){} : $o;
}
}
class AddressWithTimeLinev2 implements JsonSerializable
{
public function __construct(
/** @var string|null */
public ?string $AddressLine1=null,
/** @var string|null */
public ?string $AddressLine2=null,
/** @var string|null */
public ?string $AddressLine3=null,
/** @var string|null */
public ?string $Town=null,
/** @var string|null */
public ?string $County=null,
/** @var string|null */
public ?string $Country=null,
/** @var string|null */
public ?string $Postcode=null,
/** @var string|null */
public ?string $Duration=null,
/** @var string|null */
public ?string $DateStarted=null,
/** @var string|null */
public ?string $TotalNumberOfMonths=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['AddressLine1'])) $this->AddressLine1 = $o['AddressLine1'];
if (isset($o['AddressLine2'])) $this->AddressLine2 = $o['AddressLine2'];
if (isset($o['AddressLine3'])) $this->AddressLine3 = $o['AddressLine3'];
if (isset($o['Town'])) $this->Town = $o['Town'];
if (isset($o['County'])) $this->County = $o['County'];
if (isset($o['Country'])) $this->Country = $o['Country'];
if (isset($o['Postcode'])) $this->Postcode = $o['Postcode'];
if (isset($o['Duration'])) $this->Duration = $o['Duration'];
if (isset($o['DateStarted'])) $this->DateStarted = $o['DateStarted'];
if (isset($o['TotalNumberOfMonths'])) $this->TotalNumberOfMonths = $o['TotalNumberOfMonths'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->AddressLine1)) $o['AddressLine1'] = $this->AddressLine1;
if (isset($this->AddressLine2)) $o['AddressLine2'] = $this->AddressLine2;
if (isset($this->AddressLine3)) $o['AddressLine3'] = $this->AddressLine3;
if (isset($this->Town)) $o['Town'] = $this->Town;
if (isset($this->County)) $o['County'] = $this->County;
if (isset($this->Country)) $o['Country'] = $this->Country;
if (isset($this->Postcode)) $o['Postcode'] = $this->Postcode;
if (isset($this->Duration)) $o['Duration'] = $this->Duration;
if (isset($this->DateStarted)) $o['DateStarted'] = $this->DateStarted;
if (isset($this->TotalNumberOfMonths)) $o['TotalNumberOfMonths'] = $this->TotalNumberOfMonths;
return empty($o) ? new class(){} : $o;
}
}
class PreviousAddressv2 implements JsonSerializable
{
public function __construct(
/** @var int */
public int $Seq=0,
/** @var AddressWithTimeLinev2|null */
public ?AddressWithTimeLinev2 $Address=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['Seq'])) $this->Seq = $o['Seq'];
if (isset($o['Address'])) $this->Address = JsonConverters::from('AddressWithTimeLinev2', $o['Address']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->Seq)) $o['Seq'] = $this->Seq;
if (isset($this->Address)) $o['Address'] = JsonConverters::to('AddressWithTimeLinev2', $this->Address);
return empty($o) ? new class(){} : $o;
}
}
class Address implements JsonSerializable
{
public function __construct(
/** @var string|null */
public ?string $AddressLine1=null,
/** @var string|null */
public ?string $AddressLine2=null,
/** @var string|null */
public ?string $AddressLine3=null,
/** @var string|null */
public ?string $AddressLine4=null,
/** @var string|null */
public ?string $AddressLine5=null,
/** @var string|null */
public ?string $Postcode=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['AddressLine1'])) $this->AddressLine1 = $o['AddressLine1'];
if (isset($o['AddressLine2'])) $this->AddressLine2 = $o['AddressLine2'];
if (isset($o['AddressLine3'])) $this->AddressLine3 = $o['AddressLine3'];
if (isset($o['AddressLine4'])) $this->AddressLine4 = $o['AddressLine4'];
if (isset($o['AddressLine5'])) $this->AddressLine5 = $o['AddressLine5'];
if (isset($o['Postcode'])) $this->Postcode = $o['Postcode'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->AddressLine1)) $o['AddressLine1'] = $this->AddressLine1;
if (isset($this->AddressLine2)) $o['AddressLine2'] = $this->AddressLine2;
if (isset($this->AddressLine3)) $o['AddressLine3'] = $this->AddressLine3;
if (isset($this->AddressLine4)) $o['AddressLine4'] = $this->AddressLine4;
if (isset($this->AddressLine5)) $o['AddressLine5'] = $this->AddressLine5;
if (isset($this->Postcode)) $o['Postcode'] = $this->Postcode;
return empty($o) ? new class(){} : $o;
}
}
class EmployerDetailsv2 implements JsonSerializable
{
public function __construct(
/** @var string|null */
public ?string $EmploymentType=null,
/** @var string|null */
public ?string $EmployersName=null,
/** @var string|null */
public ?string $Occupation=null,
/** @var AddressWithTimeLinev2|null */
public ?AddressWithTimeLinev2 $EmployersAddress=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['EmploymentType'])) $this->EmploymentType = $o['EmploymentType'];
if (isset($o['EmployersName'])) $this->EmployersName = $o['EmployersName'];
if (isset($o['Occupation'])) $this->Occupation = $o['Occupation'];
if (isset($o['EmployersAddress'])) $this->EmployersAddress = JsonConverters::from('AddressWithTimeLinev2', $o['EmployersAddress']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->EmploymentType)) $o['EmploymentType'] = $this->EmploymentType;
if (isset($this->EmployersName)) $o['EmployersName'] = $this->EmployersName;
if (isset($this->Occupation)) $o['Occupation'] = $this->Occupation;
if (isset($this->EmployersAddress)) $o['EmployersAddress'] = JsonConverters::to('AddressWithTimeLinev2', $this->EmployersAddress);
return empty($o) ? new class(){} : $o;
}
}
class CurrentEmploymentDetailsv2 implements JsonSerializable
{
public function __construct(
/** @var EmployerDetailsv2|null */
public ?EmployerDetailsv2 $EmployerDetails=null,
/** @var string|null */
public ?string $MonthsAtEmployer=null,
/** @var string|null */
public ?string $DateEmploymentCommenced=null,
/** @var string|null */
public ?string $AnnualIncome=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['EmployerDetails'])) $this->EmployerDetails = JsonConverters::from('EmployerDetailsv2', $o['EmployerDetails']);
if (isset($o['MonthsAtEmployer'])) $this->MonthsAtEmployer = $o['MonthsAtEmployer'];
if (isset($o['DateEmploymentCommenced'])) $this->DateEmploymentCommenced = $o['DateEmploymentCommenced'];
if (isset($o['AnnualIncome'])) $this->AnnualIncome = $o['AnnualIncome'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->EmployerDetails)) $o['EmployerDetails'] = JsonConverters::to('EmployerDetailsv2', $this->EmployerDetails);
if (isset($this->MonthsAtEmployer)) $o['MonthsAtEmployer'] = $this->MonthsAtEmployer;
if (isset($this->DateEmploymentCommenced)) $o['DateEmploymentCommenced'] = $this->DateEmploymentCommenced;
if (isset($this->AnnualIncome)) $o['AnnualIncome'] = $this->AnnualIncome;
return empty($o) ? new class(){} : $o;
}
}
class PreviousEmploymentv2 implements JsonSerializable
{
public function __construct(
/** @var int */
public int $Seq=0,
/** @var EmployerDetailsv2|null */
public ?EmployerDetailsv2 $previousEmployment=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['Seq'])) $this->Seq = $o['Seq'];
if (isset($o['previousEmployment'])) $this->previousEmployment = JsonConverters::from('EmployerDetailsv2', $o['previousEmployment']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->Seq)) $o['Seq'] = $this->Seq;
if (isset($this->previousEmployment)) $o['previousEmployment'] = JsonConverters::to('EmployerDetailsv2', $this->previousEmployment);
return empty($o) ? new class(){} : $o;
}
}
class MarketingPreference implements JsonSerializable
{
public function __construct(
/** @var string|null */
public ?string $OptInMail=null,
/** @var string|null */
public ?string $OptInTelephone=null,
/** @var string|null */
public ?string $OptInEmail=null,
/** @var string|null */
public ?string $OptInSMS=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['OptInMail'])) $this->OptInMail = $o['OptInMail'];
if (isset($o['OptInTelephone'])) $this->OptInTelephone = $o['OptInTelephone'];
if (isset($o['OptInEmail'])) $this->OptInEmail = $o['OptInEmail'];
if (isset($o['OptInSMS'])) $this->OptInSMS = $o['OptInSMS'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->OptInMail)) $o['OptInMail'] = $this->OptInMail;
if (isset($this->OptInTelephone)) $o['OptInTelephone'] = $this->OptInTelephone;
if (isset($this->OptInEmail)) $o['OptInEmail'] = $this->OptInEmail;
if (isset($this->OptInSMS)) $o['OptInSMS'] = $this->OptInSMS;
return empty($o) ? new class(){} : $o;
}
}
class CreditApplicationIndividualV2 implements JsonSerializable
{
public function __construct(
/** @var string|null */
public ?string $Title=null,
/** @var string|null */
public ?string $Initial=null,
/** @var string|null */
public ?string $FirstName=null,
/** @var string|null */
public ?string $Surname=null,
/** @var string|null */
public ?string $DateofBirth=null,
/** @var string|null */
public ?string $Gender=null,
/** @var string|null */
public ?string $MaritalStatus=null,
/** @var string|null */
public ?string $ResidentialStatus=null,
/** @var AddressWithTimeLinev2|null */
public ?AddressWithTimeLinev2 $CurrentAddress=null,
/** @var PreviousAddressv2[]|null */
public ?array $PreviousAddresses=null,
/** @var string|null */
public ?string $HomePhone=null,
/** @var string|null */
public ?string $MobilePhone=null,
/** @var string|null */
public ?string $WorkPhone=null,
/** @var string|null */
public ?string $ContactAtWork=null,
/** @var string|null */
public ?string $Email=null,
/** @var string|null */
public ?string $BankSortCode=null,
/** @var string|null */
public ?string $BankAccountNumber=null,
/** @var string|null */
public ?string $BankAccountName=null,
/** @var string|null */
public ?string $BankName=null,
/** @var Address|null */
public ?Address $BankAddress=null,
/** @var string|null */
public ?string $BankPaymentType=null,
/** @var string|null */
public ?string $DrivingLicenceNumber=null,
/** @var CurrentEmploymentDetailsv2|null */
public ?CurrentEmploymentDetailsv2 $CurrentEmploymentDetails=null,
/** @var PreviousEmploymentv2[]|null */
public ?array $PreviousEmploymentDetails=null,
/** @var MarketingPreference|null */
public ?MarketingPreference $MarketingPreference=null,
/** @var string|null */
public ?string $CreditCheckConsent=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['Title'])) $this->Title = $o['Title'];
if (isset($o['Initial'])) $this->Initial = $o['Initial'];
if (isset($o['FirstName'])) $this->FirstName = $o['FirstName'];
if (isset($o['Surname'])) $this->Surname = $o['Surname'];
if (isset($o['DateofBirth'])) $this->DateofBirth = $o['DateofBirth'];
if (isset($o['Gender'])) $this->Gender = $o['Gender'];
if (isset($o['MaritalStatus'])) $this->MaritalStatus = $o['MaritalStatus'];
if (isset($o['ResidentialStatus'])) $this->ResidentialStatus = $o['ResidentialStatus'];
if (isset($o['CurrentAddress'])) $this->CurrentAddress = JsonConverters::from('AddressWithTimeLinev2', $o['CurrentAddress']);
if (isset($o['PreviousAddresses'])) $this->PreviousAddresses = JsonConverters::fromArray('PreviousAddressv2', $o['PreviousAddresses']);
if (isset($o['HomePhone'])) $this->HomePhone = $o['HomePhone'];
if (isset($o['MobilePhone'])) $this->MobilePhone = $o['MobilePhone'];
if (isset($o['WorkPhone'])) $this->WorkPhone = $o['WorkPhone'];
if (isset($o['ContactAtWork'])) $this->ContactAtWork = $o['ContactAtWork'];
if (isset($o['Email'])) $this->Email = $o['Email'];
if (isset($o['BankSortCode'])) $this->BankSortCode = $o['BankSortCode'];
if (isset($o['BankAccountNumber'])) $this->BankAccountNumber = $o['BankAccountNumber'];
if (isset($o['BankAccountName'])) $this->BankAccountName = $o['BankAccountName'];
if (isset($o['BankName'])) $this->BankName = $o['BankName'];
if (isset($o['BankAddress'])) $this->BankAddress = JsonConverters::from('Address', $o['BankAddress']);
if (isset($o['BankPaymentType'])) $this->BankPaymentType = $o['BankPaymentType'];
if (isset($o['DrivingLicenceNumber'])) $this->DrivingLicenceNumber = $o['DrivingLicenceNumber'];
if (isset($o['CurrentEmploymentDetails'])) $this->CurrentEmploymentDetails = JsonConverters::from('CurrentEmploymentDetailsv2', $o['CurrentEmploymentDetails']);
if (isset($o['PreviousEmploymentDetails'])) $this->PreviousEmploymentDetails = JsonConverters::fromArray('PreviousEmploymentv2', $o['PreviousEmploymentDetails']);
if (isset($o['MarketingPreference'])) $this->MarketingPreference = JsonConverters::from('MarketingPreference', $o['MarketingPreference']);
if (isset($o['CreditCheckConsent'])) $this->CreditCheckConsent = $o['CreditCheckConsent'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->Title)) $o['Title'] = $this->Title;
if (isset($this->Initial)) $o['Initial'] = $this->Initial;
if (isset($this->FirstName)) $o['FirstName'] = $this->FirstName;
if (isset($this->Surname)) $o['Surname'] = $this->Surname;
if (isset($this->DateofBirth)) $o['DateofBirth'] = $this->DateofBirth;
if (isset($this->Gender)) $o['Gender'] = $this->Gender;
if (isset($this->MaritalStatus)) $o['MaritalStatus'] = $this->MaritalStatus;
if (isset($this->ResidentialStatus)) $o['ResidentialStatus'] = $this->ResidentialStatus;
if (isset($this->CurrentAddress)) $o['CurrentAddress'] = JsonConverters::to('AddressWithTimeLinev2', $this->CurrentAddress);
if (isset($this->PreviousAddresses)) $o['PreviousAddresses'] = JsonConverters::toArray('PreviousAddressv2', $this->PreviousAddresses);
if (isset($this->HomePhone)) $o['HomePhone'] = $this->HomePhone;
if (isset($this->MobilePhone)) $o['MobilePhone'] = $this->MobilePhone;
if (isset($this->WorkPhone)) $o['WorkPhone'] = $this->WorkPhone;
if (isset($this->ContactAtWork)) $o['ContactAtWork'] = $this->ContactAtWork;
if (isset($this->Email)) $o['Email'] = $this->Email;
if (isset($this->BankSortCode)) $o['BankSortCode'] = $this->BankSortCode;
if (isset($this->BankAccountNumber)) $o['BankAccountNumber'] = $this->BankAccountNumber;
if (isset($this->BankAccountName)) $o['BankAccountName'] = $this->BankAccountName;
if (isset($this->BankName)) $o['BankName'] = $this->BankName;
if (isset($this->BankAddress)) $o['BankAddress'] = JsonConverters::to('Address', $this->BankAddress);
if (isset($this->BankPaymentType)) $o['BankPaymentType'] = $this->BankPaymentType;
if (isset($this->DrivingLicenceNumber)) $o['DrivingLicenceNumber'] = $this->DrivingLicenceNumber;
if (isset($this->CurrentEmploymentDetails)) $o['CurrentEmploymentDetails'] = JsonConverters::to('CurrentEmploymentDetailsv2', $this->CurrentEmploymentDetails);
if (isset($this->PreviousEmploymentDetails)) $o['PreviousEmploymentDetails'] = JsonConverters::toArray('PreviousEmploymentv2', $this->PreviousEmploymentDetails);
if (isset($this->MarketingPreference)) $o['MarketingPreference'] = JsonConverters::to('MarketingPreference', $this->MarketingPreference);
if (isset($this->CreditCheckConsent)) $o['CreditCheckConsent'] = $this->CreditCheckConsent;
return empty($o) ? new class(){} : $o;
}
}
class BusinessPartnerv2 implements JsonSerializable
{
public function __construct(
/** @var int */
public int $Seq=0,
/** @var string|null */
public ?string $Title=null,
/** @var string|null */
public ?string $Initial=null,
/** @var string|null */
public ?string $FirstName=null,
/** @var string|null */
public ?string $Surname=null,
/** @var string|null */
public ?string $DateofBirth=null,
/** @var string|null */
public ?string $Gender=null,
/** @var string|null */
public ?string $MaritalStatus=null,
/** @var string|null */
public ?string $ResidentialStatus=null,
/** @var AddressWithTimeLinev2|null */
public ?AddressWithTimeLinev2 $CurrentAddress=null,
/** @var PreviousAddressv2[]|null */
public ?array $PreviousAddresses=null,
/** @var string|null */
public ?string $HomePhone=null,
/** @var string|null */
public ?string $MobilePhone=null,
/** @var string|null */
public ?string $BusinessPhone=null,
/** @var string|null */
public ?string $Relationship=null,
/** @var string|null */
public ?string $Email=null,
/** @var CurrentEmploymentDetailsv2|null */
public ?CurrentEmploymentDetailsv2 $CurrentEmploymentDetails=null,
/** @var PreviousEmploymentv2[]|null */
public ?array $PreviousEmploymentDetails=null,
/** @var string|null */
public ?string $PartnerType=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['Seq'])) $this->Seq = $o['Seq'];
if (isset($o['Title'])) $this->Title = $o['Title'];
if (isset($o['Initial'])) $this->Initial = $o['Initial'];
if (isset($o['FirstName'])) $this->FirstName = $o['FirstName'];
if (isset($o['Surname'])) $this->Surname = $o['Surname'];
if (isset($o['DateofBirth'])) $this->DateofBirth = $o['DateofBirth'];
if (isset($o['Gender'])) $this->Gender = $o['Gender'];
if (isset($o['MaritalStatus'])) $this->MaritalStatus = $o['MaritalStatus'];
if (isset($o['ResidentialStatus'])) $this->ResidentialStatus = $o['ResidentialStatus'];
if (isset($o['CurrentAddress'])) $this->CurrentAddress = JsonConverters::from('AddressWithTimeLinev2', $o['CurrentAddress']);
if (isset($o['PreviousAddresses'])) $this->PreviousAddresses = JsonConverters::fromArray('PreviousAddressv2', $o['PreviousAddresses']);
if (isset($o['HomePhone'])) $this->HomePhone = $o['HomePhone'];
if (isset($o['MobilePhone'])) $this->MobilePhone = $o['MobilePhone'];
if (isset($o['BusinessPhone'])) $this->BusinessPhone = $o['BusinessPhone'];
if (isset($o['Relationship'])) $this->Relationship = $o['Relationship'];
if (isset($o['Email'])) $this->Email = $o['Email'];
if (isset($o['CurrentEmploymentDetails'])) $this->CurrentEmploymentDetails = JsonConverters::from('CurrentEmploymentDetailsv2', $o['CurrentEmploymentDetails']);
if (isset($o['PreviousEmploymentDetails'])) $this->PreviousEmploymentDetails = JsonConverters::fromArray('PreviousEmploymentv2', $o['PreviousEmploymentDetails']);
if (isset($o['PartnerType'])) $this->PartnerType = $o['PartnerType'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->Seq)) $o['Seq'] = $this->Seq;
if (isset($this->Title)) $o['Title'] = $this->Title;
if (isset($this->Initial)) $o['Initial'] = $this->Initial;
if (isset($this->FirstName)) $o['FirstName'] = $this->FirstName;
if (isset($this->Surname)) $o['Surname'] = $this->Surname;
if (isset($this->DateofBirth)) $o['DateofBirth'] = $this->DateofBirth;
if (isset($this->Gender)) $o['Gender'] = $this->Gender;
if (isset($this->MaritalStatus)) $o['MaritalStatus'] = $this->MaritalStatus;
if (isset($this->ResidentialStatus)) $o['ResidentialStatus'] = $this->ResidentialStatus;
if (isset($this->CurrentAddress)) $o['CurrentAddress'] = JsonConverters::to('AddressWithTimeLinev2', $this->CurrentAddress);
if (isset($this->PreviousAddresses)) $o['PreviousAddresses'] = JsonConverters::toArray('PreviousAddressv2', $this->PreviousAddresses);
if (isset($this->HomePhone)) $o['HomePhone'] = $this->HomePhone;
if (isset($this->MobilePhone)) $o['MobilePhone'] = $this->MobilePhone;
if (isset($this->BusinessPhone)) $o['BusinessPhone'] = $this->BusinessPhone;
if (isset($this->Relationship)) $o['Relationship'] = $this->Relationship;
if (isset($this->Email)) $o['Email'] = $this->Email;
if (isset($this->CurrentEmploymentDetails)) $o['CurrentEmploymentDetails'] = JsonConverters::to('CurrentEmploymentDetailsv2', $this->CurrentEmploymentDetails);
if (isset($this->PreviousEmploymentDetails)) $o['PreviousEmploymentDetails'] = JsonConverters::toArray('PreviousEmploymentv2', $this->PreviousEmploymentDetails);
if (isset($this->PartnerType)) $o['PartnerType'] = $this->PartnerType;
return empty($o) ? new class(){} : $o;
}
}
class CreditApplicationBusinessV2 implements JsonSerializable
{
public function __construct(
/** @var string|null */
public ?string $TypeOfBusiness=null,
/** @var string|null */
public ?string $BusinessContactPosition=null,
/** @var string|null */
public ?string $Title=null,
/** @var string|null */
public ?string $Initial=null,
/** @var string|null */
public ?string $FirstName=null,
/** @var string|null */
public ?string $Surname=null,
/** @var AddressWithTimeLinev2|null */
public ?AddressWithTimeLinev2 $CurrentHomeAddress=null,
/** @var string|null */
public ?string $HomePhone=null,
/** @var string|null */
public ?string $WorkPhone=null,
/** @var string|null */
public ?string $MobilePhone=null,
/** @var string|null */
public ?string $Email=null,
/** @var string|null */
public ?string $CompanyName=null,
/** @var string|null */
public ?string $CompanyRegistrationNumber=null,
/** @var string|null */
public ?string $TradingAs=null,
/** @var string|null */
public ?string $BusinessActivity=null,
/** @var int */
public int $NumberOfEmployees=0,
/** @var int */
public int $YearsTrading=0,
/** @var string|null */
public ?string $Position=null,
/** @var string|null */
public ?string $BankSortCode=null,
/** @var string|null */
public ?string $BankAccountNumber=null,
/** @var string|null */
public ?string $BankAccountName=null,
/** @var string|null */
public ?string $BankName=null,
/** @var Address|null */
public ?Address $BankAddress=null,
/** @var int */
public int $NumberofPartners=0,
/** @var BusinessPartnerv2[]|null */
public ?array $BusinessPartners=null,
/** @var MarketingPreference|null */
public ?MarketingPreference $MarketingPreference=null,
/** @var PreviousAddressv2[]|null */
public ?array $PreviousAddresses=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['TypeOfBusiness'])) $this->TypeOfBusiness = $o['TypeOfBusiness'];
if (isset($o['BusinessContactPosition'])) $this->BusinessContactPosition = $o['BusinessContactPosition'];
if (isset($o['Title'])) $this->Title = $o['Title'];
if (isset($o['Initial'])) $this->Initial = $o['Initial'];
if (isset($o['FirstName'])) $this->FirstName = $o['FirstName'];
if (isset($o['Surname'])) $this->Surname = $o['Surname'];
if (isset($o['CurrentHomeAddress'])) $this->CurrentHomeAddress = JsonConverters::from('AddressWithTimeLinev2', $o['CurrentHomeAddress']);
if (isset($o['HomePhone'])) $this->HomePhone = $o['HomePhone'];
if (isset($o['WorkPhone'])) $this->WorkPhone = $o['WorkPhone'];
if (isset($o['MobilePhone'])) $this->MobilePhone = $o['MobilePhone'];
if (isset($o['Email'])) $this->Email = $o['Email'];
if (isset($o['CompanyName'])) $this->CompanyName = $o['CompanyName'];
if (isset($o['CompanyRegistrationNumber'])) $this->CompanyRegistrationNumber = $o['CompanyRegistrationNumber'];
if (isset($o['TradingAs'])) $this->TradingAs = $o['TradingAs'];
if (isset($o['BusinessActivity'])) $this->BusinessActivity = $o['BusinessActivity'];
if (isset($o['NumberOfEmployees'])) $this->NumberOfEmployees = $o['NumberOfEmployees'];
if (isset($o['YearsTrading'])) $this->YearsTrading = $o['YearsTrading'];
if (isset($o['Position'])) $this->Position = $o['Position'];
if (isset($o['BankSortCode'])) $this->BankSortCode = $o['BankSortCode'];
if (isset($o['BankAccountNumber'])) $this->BankAccountNumber = $o['BankAccountNumber'];
if (isset($o['BankAccountName'])) $this->BankAccountName = $o['BankAccountName'];
if (isset($o['BankName'])) $this->BankName = $o['BankName'];
if (isset($o['BankAddress'])) $this->BankAddress = JsonConverters::from('Address', $o['BankAddress']);
if (isset($o['NumberofPartners'])) $this->NumberofPartners = $o['NumberofPartners'];
if (isset($o['BusinessPartners'])) $this->BusinessPartners = JsonConverters::fromArray('BusinessPartnerv2', $o['BusinessPartners']);
if (isset($o['MarketingPreference'])) $this->MarketingPreference = JsonConverters::from('MarketingPreference', $o['MarketingPreference']);
if (isset($o['PreviousAddresses'])) $this->PreviousAddresses = JsonConverters::fromArray('PreviousAddressv2', $o['PreviousAddresses']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->TypeOfBusiness)) $o['TypeOfBusiness'] = $this->TypeOfBusiness;
if (isset($this->BusinessContactPosition)) $o['BusinessContactPosition'] = $this->BusinessContactPosition;
if (isset($this->Title)) $o['Title'] = $this->Title;
if (isset($this->Initial)) $o['Initial'] = $this->Initial;
if (isset($this->FirstName)) $o['FirstName'] = $this->FirstName;
if (isset($this->Surname)) $o['Surname'] = $this->Surname;
if (isset($this->CurrentHomeAddress)) $o['CurrentHomeAddress'] = JsonConverters::to('AddressWithTimeLinev2', $this->CurrentHomeAddress);
if (isset($this->HomePhone)) $o['HomePhone'] = $this->HomePhone;
if (isset($this->WorkPhone)) $o['WorkPhone'] = $this->WorkPhone;
if (isset($this->MobilePhone)) $o['MobilePhone'] = $this->MobilePhone;
if (isset($this->Email)) $o['Email'] = $this->Email;
if (isset($this->CompanyName)) $o['CompanyName'] = $this->CompanyName;
if (isset($this->CompanyRegistrationNumber)) $o['CompanyRegistrationNumber'] = $this->CompanyRegistrationNumber;
if (isset($this->TradingAs)) $o['TradingAs'] = $this->TradingAs;
if (isset($this->BusinessActivity)) $o['BusinessActivity'] = $this->BusinessActivity;
if (isset($this->NumberOfEmployees)) $o['NumberOfEmployees'] = $this->NumberOfEmployees;
if (isset($this->YearsTrading)) $o['YearsTrading'] = $this->YearsTrading;
if (isset($this->Position)) $o['Position'] = $this->Position;
if (isset($this->BankSortCode)) $o['BankSortCode'] = $this->BankSortCode;
if (isset($this->BankAccountNumber)) $o['BankAccountNumber'] = $this->BankAccountNumber;
if (isset($this->BankAccountName)) $o['BankAccountName'] = $this->BankAccountName;
if (isset($this->BankName)) $o['BankName'] = $this->BankName;
if (isset($this->BankAddress)) $o['BankAddress'] = JsonConverters::to('Address', $this->BankAddress);
if (isset($this->NumberofPartners)) $o['NumberofPartners'] = $this->NumberofPartners;
if (isset($this->BusinessPartners)) $o['BusinessPartners'] = JsonConverters::toArray('BusinessPartnerv2', $this->BusinessPartners);
if (isset($this->MarketingPreference)) $o['MarketingPreference'] = JsonConverters::to('MarketingPreference', $this->MarketingPreference);
if (isset($this->PreviousAddresses)) $o['PreviousAddresses'] = JsonConverters::toArray('PreviousAddressv2', $this->PreviousAddresses);
return empty($o) ? new class(){} : $o;
}
}
class PaymentDetail implements JsonSerializable
{
public function __construct(
/** @var int */
public int $Seq=0,
/** @var string|null */
public ?string $PaymentType=null,
/** @var float */
public float $AmountPaid=0.0,
/** @var string|null */
public ?string $PaymentTransactionID=null,
/** @var string|null */
public ?string $Description=null,
/** @var string|null */
public ?string $PaymentDateTime=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['Seq'])) $this->Seq = $o['Seq'];
if (isset($o['PaymentType'])) $this->PaymentType = $o['PaymentType'];
if (isset($o['AmountPaid'])) $this->AmountPaid = $o['AmountPaid'];
if (isset($o['PaymentTransactionID'])) $this->PaymentTransactionID = $o['PaymentTransactionID'];
if (isset($o['Description'])) $this->Description = $o['Description'];
if (isset($o['PaymentDateTime'])) $this->PaymentDateTime = $o['PaymentDateTime'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->Seq)) $o['Seq'] = $this->Seq;
if (isset($this->PaymentType)) $o['PaymentType'] = $this->PaymentType;
if (isset($this->AmountPaid)) $o['AmountPaid'] = $this->AmountPaid;
if (isset($this->PaymentTransactionID)) $o['PaymentTransactionID'] = $this->PaymentTransactionID;
if (isset($this->Description)) $o['Description'] = $this->Description;
if (isset($this->PaymentDateTime)) $o['PaymentDateTime'] = $this->PaymentDateTime;
return empty($o) ? new class(){} : $o;
}
}
class PaymentDetails implements JsonSerializable
{
public function __construct(
/** @var PaymentDetail[]|null */
public ?array $paymentDetails=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['paymentDetails'])) $this->paymentDetails = JsonConverters::fromArray('PaymentDetail', $o['paymentDetails']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->paymentDetails)) $o['paymentDetails'] = JsonConverters::toArray('PaymentDetail', $this->paymentDetails);
return empty($o) ? new class(){} : $o;
}
}
class NoteDetails implements JsonSerializable
{
public function __construct(
/** @var int */
public int $Seq=0,
/** @var string|null */
public ?string $Note=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['Seq'])) $this->Seq = $o['Seq'];
if (isset($o['Note'])) $this->Note = $o['Note'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->Seq)) $o['Seq'] = $this->Seq;
if (isset($this->Note)) $o['Note'] = $this->Note;
return empty($o) ? new class(){} : $o;
}
}
class DiPReasons implements JsonSerializable
{
public function __construct(
/** @var int */
public int $DipReasonSeq=0,
/** @var string|null */
public ?string $DipDecisionCode=null,
/** @var string|null */
public ?string $DiPDecisionReason=null,
/** @var string|null */
public ?string $DiPDealerMessage=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['DipReasonSeq'])) $this->DipReasonSeq = $o['DipReasonSeq'];
if (isset($o['DipDecisionCode'])) $this->DipDecisionCode = $o['DipDecisionCode'];
if (isset($o['DiPDecisionReason'])) $this->DiPDecisionReason = $o['DiPDecisionReason'];
if (isset($o['DiPDealerMessage'])) $this->DiPDealerMessage = $o['DiPDealerMessage'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->DipReasonSeq)) $o['DipReasonSeq'] = $this->DipReasonSeq;
if (isset($this->DipDecisionCode)) $o['DipDecisionCode'] = $this->DipDecisionCode;
if (isset($this->DiPDecisionReason)) $o['DiPDecisionReason'] = $this->DiPDecisionReason;
if (isset($this->DiPDealerMessage)) $o['DiPDealerMessage'] = $this->DiPDealerMessage;
return empty($o) ? new class(){} : $o;
}
}
class DiPDetails implements JsonSerializable
{
public function __construct(
/** @var string|null */
public ?string $DiPCustomerId=null,
/** @var string|null */
public ?string $DiPTimestamp=null,
/** @var string|null */
public ?string $DiPRequestID=null,
/** @var string|null */
public ?string $DiPDecisionType=null,
/** @var string|null */
public ?string $DiPPrimaryDecisionCode=null,
/** @var string|null */
public ?string $DiPDecisionDescription=null,
/** @var string|null */
public ?string $DipDecisionDescriptionCode=null,
/** @var string|null */
public ?string $DipPrimaryDecisionReason=null,
/** @var string|null */
public ?string $DiPPrimaryDecisionReasonDealerMessage=null,
/** @var DiPReasons[]|null */
public ?array $diPReasons=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['DiPCustomerId'])) $this->DiPCustomerId = $o['DiPCustomerId'];
if (isset($o['DiPTimestamp'])) $this->DiPTimestamp = $o['DiPTimestamp'];
if (isset($o['DiPRequestID'])) $this->DiPRequestID = $o['DiPRequestID'];
if (isset($o['DiPDecisionType'])) $this->DiPDecisionType = $o['DiPDecisionType'];
if (isset($o['DiPPrimaryDecisionCode'])) $this->DiPPrimaryDecisionCode = $o['DiPPrimaryDecisionCode'];
if (isset($o['DiPDecisionDescription'])) $this->DiPDecisionDescription = $o['DiPDecisionDescription'];
if (isset($o['DipDecisionDescriptionCode'])) $this->DipDecisionDescriptionCode = $o['DipDecisionDescriptionCode'];
if (isset($o['DipPrimaryDecisionReason'])) $this->DipPrimaryDecisionReason = $o['DipPrimaryDecisionReason'];
if (isset($o['DiPPrimaryDecisionReasonDealerMessage'])) $this->DiPPrimaryDecisionReasonDealerMessage = $o['DiPPrimaryDecisionReasonDealerMessage'];
if (isset($o['diPReasons'])) $this->diPReasons = JsonConverters::fromArray('DiPReasons', $o['diPReasons']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->DiPCustomerId)) $o['DiPCustomerId'] = $this->DiPCustomerId;
if (isset($this->DiPTimestamp)) $o['DiPTimestamp'] = $this->DiPTimestamp;
if (isset($this->DiPRequestID)) $o['DiPRequestID'] = $this->DiPRequestID;
if (isset($this->DiPDecisionType)) $o['DiPDecisionType'] = $this->DiPDecisionType;
if (isset($this->DiPPrimaryDecisionCode)) $o['DiPPrimaryDecisionCode'] = $this->DiPPrimaryDecisionCode;
if (isset($this->DiPDecisionDescription)) $o['DiPDecisionDescription'] = $this->DiPDecisionDescription;
if (isset($this->DipDecisionDescriptionCode)) $o['DipDecisionDescriptionCode'] = $this->DipDecisionDescriptionCode;
if (isset($this->DipPrimaryDecisionReason)) $o['DipPrimaryDecisionReason'] = $this->DipPrimaryDecisionReason;
if (isset($this->DiPPrimaryDecisionReasonDealerMessage)) $o['DiPPrimaryDecisionReasonDealerMessage'] = $this->DiPPrimaryDecisionReasonDealerMessage;
if (isset($this->diPReasons)) $o['diPReasons'] = JsonConverters::toArray('DiPReasons', $this->diPReasons);
return empty($o) ? new class(){} : $o;
}
}
// @DataContract
class CreateOCAv2Request implements JsonSerializable
{
public function __construct(
// @DataMember
/** @var string|null */
public ?string $Username=null,
// @DataMember
/** @var string|null */
public ?string $Timestamp=null,
// @DataMember
/** @var string|null */
public ?string $Token=null,
// @DataMember
/** @var GeneralDetailsv2|null */
public ?GeneralDetailsv2 $GeneralDetails=null,
// @DataMember
/** @var FinanceDetailsv2|null */
public ?FinanceDetailsv2 $FinanceDetails=null,
// @DataMember
/** @var VehicleDetailsv2|null */
public ?VehicleDetailsv2 $VehicleDetails=null,
// @DataMember
/** @var DeliveryDetailsv2|null */
public ?DeliveryDetailsv2 $DeliveryDetails=null,
// @DataMember
/** @var ExistingVehicleDetailsv2|null */
public ?ExistingVehicleDetailsv2 $ExistingVehicleDetails=null,
// @DataMember
/** @var InsuranceDetails|null */
public ?InsuranceDetails $InsuranceDetails=null,
// @DataMember
/** @var CreditApplicationIndividualV2|null */
public ?CreditApplicationIndividualV2 $CreditApplicationIndividual=null,
// @DataMember
/** @var CreditApplicationBusinessV2|null */
public ?CreditApplicationBusinessV2 $CreditApplicationBusiness=null,
// @DataMember
/** @var PaymentDetails|null */
public ?PaymentDetails $PaymentDetails=null,
// @DataMember
/** @var NoteDetails[]|null */
public ?array $Notes=null,
// @DataMember
/** @var DiPDetails|null */
public ?DiPDetails $DiPDetails=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['Username'])) $this->Username = $o['Username'];
if (isset($o['Timestamp'])) $this->Timestamp = $o['Timestamp'];
if (isset($o['Token'])) $this->Token = $o['Token'];
if (isset($o['GeneralDetails'])) $this->GeneralDetails = JsonConverters::from('GeneralDetailsv2', $o['GeneralDetails']);
if (isset($o['FinanceDetails'])) $this->FinanceDetails = JsonConverters::from('FinanceDetailsv2', $o['FinanceDetails']);
if (isset($o['VehicleDetails'])) $this->VehicleDetails = JsonConverters::from('VehicleDetailsv2', $o['VehicleDetails']);
if (isset($o['DeliveryDetails'])) $this->DeliveryDetails = JsonConverters::from('DeliveryDetailsv2', $o['DeliveryDetails']);
if (isset($o['ExistingVehicleDetails'])) $this->ExistingVehicleDetails = JsonConverters::from('ExistingVehicleDetailsv2', $o['ExistingVehicleDetails']);
if (isset($o['InsuranceDetails'])) $this->InsuranceDetails = JsonConverters::from('InsuranceDetails', $o['InsuranceDetails']);
if (isset($o['CreditApplicationIndividual'])) $this->CreditApplicationIndividual = JsonConverters::from('CreditApplicationIndividualV2', $o['CreditApplicationIndividual']);
if (isset($o['CreditApplicationBusiness'])) $this->CreditApplicationBusiness = JsonConverters::from('CreditApplicationBusinessV2', $o['CreditApplicationBusiness']);
if (isset($o['PaymentDetails'])) $this->PaymentDetails = JsonConverters::from('PaymentDetails', $o['PaymentDetails']);
if (isset($o['Notes'])) $this->Notes = JsonConverters::fromArray('NoteDetails', $o['Notes']);
if (isset($o['DiPDetails'])) $this->DiPDetails = JsonConverters::from('DiPDetails', $o['DiPDetails']);
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->Username)) $o['Username'] = $this->Username;
if (isset($this->Timestamp)) $o['Timestamp'] = $this->Timestamp;
if (isset($this->Token)) $o['Token'] = $this->Token;
if (isset($this->GeneralDetails)) $o['GeneralDetails'] = JsonConverters::to('GeneralDetailsv2', $this->GeneralDetails);
if (isset($this->FinanceDetails)) $o['FinanceDetails'] = JsonConverters::to('FinanceDetailsv2', $this->FinanceDetails);
if (isset($this->VehicleDetails)) $o['VehicleDetails'] = JsonConverters::to('VehicleDetailsv2', $this->VehicleDetails);
if (isset($this->DeliveryDetails)) $o['DeliveryDetails'] = JsonConverters::to('DeliveryDetailsv2', $this->DeliveryDetails);
if (isset($this->ExistingVehicleDetails)) $o['ExistingVehicleDetails'] = JsonConverters::to('ExistingVehicleDetailsv2', $this->ExistingVehicleDetails);
if (isset($this->InsuranceDetails)) $o['InsuranceDetails'] = JsonConverters::to('InsuranceDetails', $this->InsuranceDetails);
if (isset($this->CreditApplicationIndividual)) $o['CreditApplicationIndividual'] = JsonConverters::to('CreditApplicationIndividualV2', $this->CreditApplicationIndividual);
if (isset($this->CreditApplicationBusiness)) $o['CreditApplicationBusiness'] = JsonConverters::to('CreditApplicationBusinessV2', $this->CreditApplicationBusiness);
if (isset($this->PaymentDetails)) $o['PaymentDetails'] = JsonConverters::to('PaymentDetails', $this->PaymentDetails);
if (isset($this->Notes)) $o['Notes'] = JsonConverters::toArray('NoteDetails', $this->Notes);
if (isset($this->DiPDetails)) $o['DiPDetails'] = JsonConverters::to('DiPDetails', $this->DiPDetails);
return empty($o) ? new class(){} : $o;
}
}
To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
PUT /CreateOCAv2/ HTTP/1.1
Host: webservices.mbukdatabase.co.uk
Accept: text/csv
Content-Type: text/csv
Content-Length: length
{"Username":"String","Timestamp":"String","Token":"String","GeneralDetails":{"OCAApprovalNumber":"String","EnquiryDateTime":"String","Brand":0,"CustomerReferenceNumber":"String","CustomerType":"String","SourceofBusiness":"String","TagURL":"String","RequestSource":0,"FormID":"String","ProposalCreated":"String","LoadFullData":"String","ProposalNumber":"String","POSSystem":"String"},"FinanceDetails":{"FinancialProduct":"String","CampaignCode":"String","PhoenixFinanceProductCode":"String","Fixed":"String","FleetNonFleet":"String","RFLCover":"String","Duration":0,"PaymentRentalAmount":0,"RentalAmountExcVAT":0,"AdvanceArrears":"String","AnnualMileage":0,"ExcessMileageRate":0,"CustomerDepositContribution":0,"RetailerDepositContribution":0,"RetailerDepositContributionNet":0,"ManufacturerDepositContribution":0,"ManufacturerDepositContributionNet":0,"TotalDepositContribution":0,"LumpSum":0,"CostForCredit":0,"PurchaseActivationFee":0,"TotalAmountPayable":0,"FixedInterestRate":0,"RepresentativeAPR":0,"TrueFlatRate":"String","RVReferenceNumber":"String","OptionalPurchasePayment":0,"AdvancedRentalAmount":0,"NumberofAdvanceRentals":"String","PaymentProfile":"String","RandMIncluded":"String","RandMLevel":"String","ProductType":"String","Frequency":"String","PauseType":"String","EqualsFinance":0,"AcceptanceFee":0},"VehicleDetails":{"OnlineCode":"String","ModelClass":"String","ModelBody":"String","ModelDerivative":"String","TotalPrice":0,"OTRPrice":0,"VIN":"String","RegNo":"String","CommissionNumber":"String","EngineNumber":"String","CurrentMileage":0,"MilesKilometers":"String","FirstRegistrationDate":"String","NewUsedFlag":"String","NewVehicleModelOptionDetails":[{"Seq":0,"Type":"String","Code":"String","Description":"String","Price":0,"PriceGross":0,"VATCategory":"String","VATAmount":0}],"VID":"String","Baumuster":"String","VehiclePrice":0,"TotalVAT":0,"OLEVGrant":0,"ExtrasTotalExcVAT":0,"CombinedCO2":"String","VehicleVATTickBox":"String","FirstYearRFLIncluded":"String","FirstYearRFLAmount":0,"FirstRegFeeIncludedFlag":"String","FirstRegFeeAmount":0,"HighLowVEDSupplementFlag":"String","LeaseRFLSubsequentYears":"String","LeaseRFLSubsequentYearsAmount":0},"DeliveryDetails":{"DealerCode":"String","DeliveryPreference":"String","DeliveryDate":"String"},"ExistingVehicleDetails":{"TradeInFlag":"String","TradeInIncludedInCalc":"String","TradeInValue":0,"TradeInValueNet":0,"TradeInRegNo":"String","TradeInVIN":"String","TradeInMileage":0,"TradeInCondition":"String","SettlementFlag":"String","SettlementIncludedInCalc":"String","SettlementValue":0,"SettlementValueNet":0,"SettlementRegNo":"String","SettlementVIN":"String","SettlementMileage":0},"InsuranceDetails":{"InterestedInFirstCoverFlag":"String"},"CreditApplicationIndividual":{"Title":"String","Initial":"String","FirstName":"String","Surname":"String","DateofBirth":"String","Gender":"String","MaritalStatus":"String","ResidentialStatus":"String","CurrentAddress":{"AddressLine1":"String","AddressLine2":"String","AddressLine3":"String","Town":"String","County":"String","Country":"String","Postcode":"String","Duration":"String","DateStarted":"String","TotalNumberOfMonths":"String"},"PreviousAddresses":[{"Seq":0,"Address":{"AddressLine1":"String","AddressLine2":"String","AddressLine3":"String","Town":"String","County":"String","Country":"String","Postcode":"String","Duration":"String","DateStarted":"String","TotalNumberOfMonths":"String"}}],"HomePhone":"String","MobilePhone":"String","WorkPhone":"String","ContactAtWork":"String","Email":"String","BankSortCode":"String","BankAccountNumber":"String","BankAccountName":"String","BankName":"String","BankAddress":{"AddressLine1":"String","AddressLine2":"String","AddressLine3":"String","AddressLine4":"String","AddressLine5":"String","Postcode":"String"},"BankPaymentType":"String","DrivingLicenceNumber":"String","CurrentEmploymentDetails":{"EmployerDetails":{"EmploymentType":"String","EmployersName":"String","Occupation":"String","EmployersAddress":{"AddressLine1":"String","AddressLine2":"String","AddressLine3":"String","Town":"String","County":"String","Country":"String","Postcode":"String","Duration":"String","DateStarted":"String","TotalNumberOfMonths":"String"}},"MonthsAtEmployer":"String","DateEmploymentCommenced":"String","AnnualIncome":"String"},"PreviousEmploymentDetails":[{"Seq":0,"previousEmployment":{"EmploymentType":"String","EmployersName":"String","Occupation":"String","EmployersAddress":{"AddressLine1":"String","AddressLine2":"String","AddressLine3":"String","Town":"String","County":"String","Country":"String","Postcode":"String","Duration":"String","DateStarted":"String","TotalNumberOfMonths":"String"}}}],"MarketingPreference":{"OptInMail":"String","OptInTelephone":"String","OptInEmail":"String","OptInSMS":"String"},"CreditCheckConsent":"String"},"CreditApplicationBusiness":{"TypeOfBusiness":"String","BusinessContactPosition":"String","Title":"String","Initial":"String","FirstName":"String","Surname":"String","CurrentHomeAddress":{"AddressLine1":"String","AddressLine2":"String","AddressLine3":"String","Town":"String","County":"String","Country":"String","Postcode":"String","Duration":"String","DateStarted":"String","TotalNumberOfMonths":"String"},"HomePhone":"String","WorkPhone":"String","MobilePhone":"String","Email":"String","CompanyName":"String","CompanyRegistrationNumber":"String","TradingAs":"String","BusinessActivity":"String","NumberOfEmployees":0,"YearsTrading":0,"Position":"String","BankSortCode":"String","BankAccountNumber":"String","BankAccountName":"String","BankName":"String","BankAddress":{"AddressLine1":"String","AddressLine2":"String","AddressLine3":"String","AddressLine4":"String","AddressLine5":"String","Postcode":"String"},"NumberofPartners":0,"BusinessPartners":[{"Seq":0,"Title":"String","Initial":"String","FirstName":"String","Surname":"String","DateofBirth":"String","Gender":"String","MaritalStatus":"String","ResidentialStatus":"String","CurrentAddress":{"AddressLine1":"String","AddressLine2":"String","AddressLine3":"String","Town":"String","County":"String","Country":"String","Postcode":"String","Duration":"String","DateStarted":"String","TotalNumberOfMonths":"String"},"PreviousAddresses":[{"Seq":0,"Address":{"AddressLine1":"String","AddressLine2":"String","AddressLine3":"String","Town":"String","County":"String","Country":"String","Postcode":"String","Duration":"String","DateStarted":"String","TotalNumberOfMonths":"String"}}],"HomePhone":"String","MobilePhone":"String","BusinessPhone":"String","Relationship":"String","Email":"String","CurrentEmploymentDetails":{"EmployerDetails":{"EmploymentType":"String","EmployersName":"String","Occupation":"String","EmployersAddress":{"AddressLine1":"String","AddressLine2":"String","AddressLine3":"String","Town":"String","County":"String","Country":"String","Postcode":"String","Duration":"String","DateStarted":"String","TotalNumberOfMonths":"String"}},"MonthsAtEmployer":"String","DateEmploymentCommenced":"String","AnnualIncome":"String"},"PreviousEmploymentDetails":[{"Seq":0,"previousEmployment":{"EmploymentType":"String","EmployersName":"String","Occupation":"String","EmployersAddress":{"AddressLine1":"String","AddressLine2":"String","AddressLine3":"String","Town":"String","County":"String","Country":"String","Postcode":"String","Duration":"String","DateStarted":"String","TotalNumberOfMonths":"String"}}}],"PartnerType":"String"}],"MarketingPreference":{"OptInMail":"String","OptInTelephone":"String","OptInEmail":"String","OptInSMS":"String"},"PreviousAddresses":[{"Seq":0,"Address":{"AddressLine1":"String","AddressLine2":"String","AddressLine3":"String","Town":"String","County":"String","Country":"String","Postcode":"String","Duration":"String","DateStarted":"String","TotalNumberOfMonths":"String"}}]},"PaymentDetails":{"paymentDetails":[{"Seq":0,"PaymentType":"String","AmountPaid":0,"PaymentTransactionID":"String","Description":"String","PaymentDateTime":"String"}]},"Notes":[{"Seq":0,"Note":"String"}],"DiPDetails":{"DiPCustomerId":"String","DiPTimestamp":"String","DiPRequestID":"String","DiPDecisionType":"String","DiPPrimaryDecisionCode":"String","DiPDecisionDescription":"String","DipDecisionDescriptionCode":"String","DipPrimaryDecisionReason":"String","DiPPrimaryDecisionReasonDealerMessage":"String","diPReasons":[{"DipReasonSeq":0,"DipDecisionCode":"String","DiPDecisionReason":"String","DiPDealerMessage":"String"}]}}
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length
{"Code":"String","Message":"String","URN":0}