| PUT | /CreateVanOCA/ |
|---|
<?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 CreateVanOCARequestResponse 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 GeneralDetails 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
) {
}
/** @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'];
}
/** @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;
return empty($o) ? new class(){} : $o;
}
}
class FinanceDetails implements JsonSerializable
{
public function __construct(
/** @var string|null */
public ?string $FinancialProduct=null,
/** @var int */
public int $Duration=0,
/** @var float */
public float $PaymentRentalAmount=0.0,
/** @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 $ManufacturerDepositContribution=null,
/** @var float|null */
public ?float $TotalDepositContribution=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 float|null */
public ?float $OptionalPurchasePayment=null,
/** @var float */
public float $AdvancedRentalAmount=0.0,
/** @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
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['FinancialProduct'])) $this->FinancialProduct = $o['FinancialProduct'];
if (isset($o['Duration'])) $this->Duration = $o['Duration'];
if (isset($o['PaymentRentalAmount'])) $this->PaymentRentalAmount = $o['PaymentRentalAmount'];
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['ManufacturerDepositContribution'])) $this->ManufacturerDepositContribution = $o['ManufacturerDepositContribution'];
if (isset($o['TotalDepositContribution'])) $this->TotalDepositContribution = $o['TotalDepositContribution'];
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['OptionalPurchasePayment'])) $this->OptionalPurchasePayment = $o['OptionalPurchasePayment'];
if (isset($o['AdvancedRentalAmount'])) $this->AdvancedRentalAmount = $o['AdvancedRentalAmount'];
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'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->FinancialProduct)) $o['FinancialProduct'] = $this->FinancialProduct;
if (isset($this->Duration)) $o['Duration'] = $this->Duration;
if (isset($this->PaymentRentalAmount)) $o['PaymentRentalAmount'] = $this->PaymentRentalAmount;
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->ManufacturerDepositContribution)) $o['ManufacturerDepositContribution'] = $this->ManufacturerDepositContribution;
if (isset($this->TotalDepositContribution)) $o['TotalDepositContribution'] = $this->TotalDepositContribution;
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->OptionalPurchasePayment)) $o['OptionalPurchasePayment'] = $this->OptionalPurchasePayment;
if (isset($this->AdvancedRentalAmount)) $o['AdvancedRentalAmount'] = $this->AdvancedRentalAmount;
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;
return empty($o) ? new class(){} : $o;
}
}
class ModelOptionDetails implements JsonSerializable
{
public function __construct(
/** @var int */
public int $Seq=0,
/** @var string|null */
public ?string $Code=null,
/** @var string|null */
public ?string $Description=null,
/** @var float */
public float $Price=0.0
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['Seq'])) $this->Seq = $o['Seq'];
if (isset($o['Code'])) $this->Code = $o['Code'];
if (isset($o['Description'])) $this->Description = $o['Description'];
if (isset($o['Price'])) $this->Price = $o['Price'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->Seq)) $o['Seq'] = $this->Seq;
if (isset($this->Code)) $o['Code'] = $this->Code;
if (isset($this->Description)) $o['Description'] = $this->Description;
if (isset($this->Price)) $o['Price'] = $this->Price;
return empty($o) ? new class(){} : $o;
}
}
class VehicleDetails 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 int */
public int $CurrentMileage=0,
/** @var string|null */
public ?string $FirstRegistrationDate=null,
/** @var string|null */
public ?string $NewUsedFlag=null,
/** @var ModelOptionDetails[]|null */
public ?array $NewVehicleModelOptionDetails=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['CurrentMileage'])) $this->CurrentMileage = $o['CurrentMileage'];
if (isset($o['FirstRegistrationDate'])) $this->FirstRegistrationDate = $o['FirstRegistrationDate'];
if (isset($o['NewUsedFlag'])) $this->NewUsedFlag = $o['NewUsedFlag'];
if (isset($o['NewVehicleModelOptionDetails'])) $this->NewVehicleModelOptionDetails = JsonConverters::fromArray('ModelOptionDetails', $o['NewVehicleModelOptionDetails']);
}
/** @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->CurrentMileage)) $o['CurrentMileage'] = $this->CurrentMileage;
if (isset($this->FirstRegistrationDate)) $o['FirstRegistrationDate'] = $this->FirstRegistrationDate;
if (isset($this->NewUsedFlag)) $o['NewUsedFlag'] = $this->NewUsedFlag;
if (isset($this->NewVehicleModelOptionDetails)) $o['NewVehicleModelOptionDetails'] = JsonConverters::toArray('ModelOptionDetails', $this->NewVehicleModelOptionDetails);
return empty($o) ? new class(){} : $o;
}
}
class DeliveryDetails implements JsonSerializable
{
public function __construct(
/** @var string|null */
public ?string $DealerCode=null,
/** @var string|null */
public ?string $DeliveryPreference=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['DealerCode'])) $this->DealerCode = $o['DealerCode'];
if (isset($o['DeliveryPreference'])) $this->DeliveryPreference = $o['DeliveryPreference'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->DealerCode)) $o['DealerCode'] = $this->DealerCode;
if (isset($this->DeliveryPreference)) $o['DeliveryPreference'] = $this->DeliveryPreference;
return empty($o) ? new class(){} : $o;
}
}
class ExistingVehicleDetails implements JsonSerializable
{
public function __construct(
/** @var string|null */
public ?string $TradeInFlag=null,
/** @var float */
public float $TradeInValue=0.0,
/** @var string|null */
public ?string $TradeInRegNo=null,
/** @var string|null */
public ?string $SettlementFlag=null,
/** @var float */
public float $SettlementValue=0.0,
/** @var string|null */
public ?string $SettlementRegNo=null
) {
}
/** @throws Exception */
public function fromMap($o): void {
if (isset($o['TradeInFlag'])) $this->TradeInFlag = $o['TradeInFlag'];
if (isset($o['TradeInValue'])) $this->TradeInValue = $o['TradeInValue'];
if (isset($o['TradeInRegNo'])) $this->TradeInRegNo = $o['TradeInRegNo'];
if (isset($o['SettlementFlag'])) $this->SettlementFlag = $o['SettlementFlag'];
if (isset($o['SettlementValue'])) $this->SettlementValue = $o['SettlementValue'];
if (isset($o['SettlementRegNo'])) $this->SettlementRegNo = $o['SettlementRegNo'];
}
/** @throws Exception */
public function jsonSerialize(): mixed
{
$o = [];
if (isset($this->TradeInFlag)) $o['TradeInFlag'] = $this->TradeInFlag;
if (isset($this->TradeInValue)) $o['TradeInValue'] = $this->TradeInValue;
if (isset($this->TradeInRegNo)) $o['TradeInRegNo'] = $this->TradeInRegNo;
if (isset($this->SettlementFlag)) $o['SettlementFlag'] = $this->SettlementFlag;
if (isset($this->SettlementValue)) $o['SettlementValue'] = $this->SettlementValue;
if (isset($this->SettlementRegNo)) $o['SettlementRegNo'] = $this->SettlementRegNo;
return empty($o) ? new class(){} : $o;
}
}
class AddressWithTimeLine 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
) {
}
/** @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'];
}
/** @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;
return empty($o) ? new class(){} : $o;
}
}
class PreviousAddress implements JsonSerializable
{
public function __construct(
/** @var int */
public int $Seq=0,
/** @var AddressWithTimeLine|null */
public ?AddressWithTimeLine $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('AddressWithTimeLine', $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('AddressWithTimeLine', $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 EmployerDetails 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 AddressWithTimeLine|null */
public ?AddressWithTimeLine $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('AddressWithTimeLine', $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('AddressWithTimeLine', $this->EmployersAddress);
return empty($o) ? new class(){} : $o;
}
}
class CurrentEmploymentDetails implements JsonSerializable
{
public function __construct(
/** @var EmployerDetails|null */
public ?EmployerDetails $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('EmployerDetails', $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('EmployerDetails', $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 PreviousEmployment implements JsonSerializable
{
public function __construct(
/** @var int */
public int $Seq=0,
/** @var EmployerDetails|null */
public ?EmployerDetails $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('EmployerDetails', $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('EmployerDetails', $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 CreditApplicationIndividualVans 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 AddressWithTimeLine|null */
public ?AddressWithTimeLine $CurrentAddress=null,
/** @var PreviousAddress[]|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 $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 $DrivingLicenceNumber=null,
/** @var CurrentEmploymentDetails|null */
public ?CurrentEmploymentDetails $CurrentEmploymentDetails=null,
/** @var PreviousEmployment[]|null */
public ?array $PreviousEmploymentDetails=null,
/** @var MarketingPreference|null */
public ?MarketingPreference $MarketingPreference=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('AddressWithTimeLine', $o['CurrentAddress']);
if (isset($o['PreviousAddresses'])) $this->PreviousAddresses = JsonConverters::fromArray('PreviousAddress', $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['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['DrivingLicenceNumber'])) $this->DrivingLicenceNumber = $o['DrivingLicenceNumber'];
if (isset($o['CurrentEmploymentDetails'])) $this->CurrentEmploymentDetails = JsonConverters::from('CurrentEmploymentDetails', $o['CurrentEmploymentDetails']);
if (isset($o['PreviousEmploymentDetails'])) $this->PreviousEmploymentDetails = JsonConverters::fromArray('PreviousEmployment', $o['PreviousEmploymentDetails']);
if (isset($o['MarketingPreference'])) $this->MarketingPreference = JsonConverters::from('MarketingPreference', $o['MarketingPreference']);
}
/** @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('AddressWithTimeLine', $this->CurrentAddress);
if (isset($this->PreviousAddresses)) $o['PreviousAddresses'] = JsonConverters::toArray('PreviousAddress', $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->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->DrivingLicenceNumber)) $o['DrivingLicenceNumber'] = $this->DrivingLicenceNumber;
if (isset($this->CurrentEmploymentDetails)) $o['CurrentEmploymentDetails'] = JsonConverters::to('CurrentEmploymentDetails', $this->CurrentEmploymentDetails);
if (isset($this->PreviousEmploymentDetails)) $o['PreviousEmploymentDetails'] = JsonConverters::toArray('PreviousEmployment', $this->PreviousEmploymentDetails);
if (isset($this->MarketingPreference)) $o['MarketingPreference'] = JsonConverters::to('MarketingPreference', $this->MarketingPreference);
return empty($o) ? new class(){} : $o;
}
}
class BusinessPartner 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 AddressWithTimeLine|null */
public ?AddressWithTimeLine $CurrentAddress=null,
/** @var PreviousAddress[]|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 CurrentEmploymentDetails|null */
public ?CurrentEmploymentDetails $CurrentEmploymentDetails=null,
/** @var PreviousEmployment[]|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('AddressWithTimeLine', $o['CurrentAddress']);
if (isset($o['PreviousAddresses'])) $this->PreviousAddresses = JsonConverters::fromArray('PreviousAddress', $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('CurrentEmploymentDetails', $o['CurrentEmploymentDetails']);
if (isset($o['PreviousEmploymentDetails'])) $this->PreviousEmploymentDetails = JsonConverters::fromArray('PreviousEmployment', $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('AddressWithTimeLine', $this->CurrentAddress);
if (isset($this->PreviousAddresses)) $o['PreviousAddresses'] = JsonConverters::toArray('PreviousAddress', $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('CurrentEmploymentDetails', $this->CurrentEmploymentDetails);
if (isset($this->PreviousEmploymentDetails)) $o['PreviousEmploymentDetails'] = JsonConverters::toArray('PreviousEmployment', $this->PreviousEmploymentDetails);
if (isset($this->PartnerType)) $o['PartnerType'] = $this->PartnerType;
return empty($o) ? new class(){} : $o;
}
}
class CreditApplicationBusinessVans 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 AddressWithTimeLine|null */
public ?AddressWithTimeLine $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 BusinessPartner[]|null */
public ?array $BusinessPartners=null,
/** @var MarketingPreference|null */
public ?MarketingPreference $MarketingPreference=null,
/** @var PreviousAddress[]|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('AddressWithTimeLine', $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('BusinessPartner', $o['BusinessPartners']);
if (isset($o['MarketingPreference'])) $this->MarketingPreference = JsonConverters::from('MarketingPreference', $o['MarketingPreference']);
if (isset($o['PreviousAddresses'])) $this->PreviousAddresses = JsonConverters::fromArray('PreviousAddress', $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('AddressWithTimeLine', $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('BusinessPartner', $this->BusinessPartners);
if (isset($this->MarketingPreference)) $o['MarketingPreference'] = JsonConverters::to('MarketingPreference', $this->MarketingPreference);
if (isset($this->PreviousAddresses)) $o['PreviousAddresses'] = JsonConverters::toArray('PreviousAddress', $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;
}
}
// @DataContract
class CreateVanOCARequest 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 GeneralDetails|null */
public ?GeneralDetails $GeneralDetails=null,
// @DataMember
/** @var FinanceDetails|null */
public ?FinanceDetails $FinanceDetails=null,
// @DataMember
/** @var VehicleDetails|null */
public ?VehicleDetails $VehicleDetails=null,
// @DataMember
/** @var DeliveryDetails|null */
public ?DeliveryDetails $DeliveryDetails=null,
// @DataMember
/** @var ExistingVehicleDetails|null */
public ?ExistingVehicleDetails $ExistingVehicleDetails=null,
// @DataMember
/** @var CreditApplicationIndividualVans|null */
public ?CreditApplicationIndividualVans $CreditApplicationIndividual=null,
// @DataMember
/** @var CreditApplicationBusinessVans|null */
public ?CreditApplicationBusinessVans $CreditApplicationBusiness=null,
// @DataMember
/** @var PaymentDetails|null */
public ?PaymentDetails $PaymentDetails=null,
// @DataMember
/** @var NoteDetails[]|null */
public ?array $Notes=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('GeneralDetails', $o['GeneralDetails']);
if (isset($o['FinanceDetails'])) $this->FinanceDetails = JsonConverters::from('FinanceDetails', $o['FinanceDetails']);
if (isset($o['VehicleDetails'])) $this->VehicleDetails = JsonConverters::from('VehicleDetails', $o['VehicleDetails']);
if (isset($o['DeliveryDetails'])) $this->DeliveryDetails = JsonConverters::from('DeliveryDetails', $o['DeliveryDetails']);
if (isset($o['ExistingVehicleDetails'])) $this->ExistingVehicleDetails = JsonConverters::from('ExistingVehicleDetails', $o['ExistingVehicleDetails']);
if (isset($o['CreditApplicationIndividual'])) $this->CreditApplicationIndividual = JsonConverters::from('CreditApplicationIndividualVans', $o['CreditApplicationIndividual']);
if (isset($o['CreditApplicationBusiness'])) $this->CreditApplicationBusiness = JsonConverters::from('CreditApplicationBusinessVans', $o['CreditApplicationBusiness']);
if (isset($o['PaymentDetails'])) $this->PaymentDetails = JsonConverters::from('PaymentDetails', $o['PaymentDetails']);
if (isset($o['Notes'])) $this->Notes = JsonConverters::fromArray('NoteDetails', $o['Notes']);
}
/** @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('GeneralDetails', $this->GeneralDetails);
if (isset($this->FinanceDetails)) $o['FinanceDetails'] = JsonConverters::to('FinanceDetails', $this->FinanceDetails);
if (isset($this->VehicleDetails)) $o['VehicleDetails'] = JsonConverters::to('VehicleDetails', $this->VehicleDetails);
if (isset($this->DeliveryDetails)) $o['DeliveryDetails'] = JsonConverters::to('DeliveryDetails', $this->DeliveryDetails);
if (isset($this->ExistingVehicleDetails)) $o['ExistingVehicleDetails'] = JsonConverters::to('ExistingVehicleDetails', $this->ExistingVehicleDetails);
if (isset($this->CreditApplicationIndividual)) $o['CreditApplicationIndividual'] = JsonConverters::to('CreditApplicationIndividualVans', $this->CreditApplicationIndividual);
if (isset($this->CreditApplicationBusiness)) $o['CreditApplicationBusiness'] = JsonConverters::to('CreditApplicationBusinessVans', $this->CreditApplicationBusiness);
if (isset($this->PaymentDetails)) $o['PaymentDetails'] = JsonConverters::to('PaymentDetails', $this->PaymentDetails);
if (isset($this->Notes)) $o['Notes'] = JsonConverters::toArray('NoteDetails', $this->Notes);
return empty($o) ? new class(){} : $o;
}
}
To override the Content-type in your clients, use the HTTP Accept Header, append the .json suffix or ?format=json
To embed the response in a jsonp callback, append ?callback=myCallback
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
PUT /CreateVanOCA/ HTTP/1.1
Host: webservices.mbukdatabase.co.uk
Accept: application/json
Content-Type: application/json
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"},"FinanceDetails":{"FinancialProduct":"String","Duration":0,"PaymentRentalAmount":0,"AnnualMileage":0,"ExcessMileageRate":0,"CustomerDepositContribution":0,"RetailerDepositContribution":0,"ManufacturerDepositContribution":0,"TotalDepositContribution":0,"CostForCredit":0,"PurchaseActivationFee":0,"TotalAmountPayable":0,"FixedInterestRate":0,"RepresentativeAPR":0,"OptionalPurchasePayment":0,"AdvancedRentalAmount":0,"PaymentProfile":"String","RandMIncluded":"String","RandMLevel":"String","ProductType":"String","Frequency":"String","PauseType":"String"},"VehicleDetails":{"OnlineCode":"String","ModelClass":"String","ModelBody":"String","ModelDerivative":"String","TotalPrice":0,"OTRPrice":0,"VIN":"String","RegNo":"String","CurrentMileage":0,"FirstRegistrationDate":"String","NewUsedFlag":"String","NewVehicleModelOptionDetails":[{"Seq":0,"Code":"String","Description":"String","Price":0}]},"DeliveryDetails":{"DealerCode":"String","DeliveryPreference":"String"},"ExistingVehicleDetails":{"TradeInFlag":"String","TradeInValue":0,"TradeInRegNo":"String","SettlementFlag":"String","SettlementValue":0,"SettlementRegNo":"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"},"PreviousAddresses":[{"Seq":0,"Address":{"AddressLine1":"String","AddressLine2":"String","AddressLine3":"String","Town":"String","County":"String","Country":"String","Postcode":"String","Duration":"String","DateStarted":"String"}}],"HomePhone":"String","MobilePhone":"String","WorkPhone":"String","Email":"String","BankSortCode":"String","BankAccountNumber":"String","BankAccountName":"String","BankName":"String","BankAddress":{"AddressLine1":"String","AddressLine2":"String","AddressLine3":"String","AddressLine4":"String","AddressLine5":"String","Postcode":"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"}},"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"}}}],"MarketingPreference":{"OptInMail":"String","OptInTelephone":"String","OptInEmail":"String","OptInSMS":"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"},"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"},"PreviousAddresses":[{"Seq":0,"Address":{"AddressLine1":"String","AddressLine2":"String","AddressLine3":"String","Town":"String","County":"String","Country":"String","Postcode":"String","Duration":"String","DateStarted":"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"}},"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"}}}],"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"}}]},"PaymentDetails":{"paymentDetails":[{"Seq":0,"PaymentType":"String","AmountPaid":0,"PaymentTransactionID":"String","Description":"String","PaymentDateTime":"String"}]},"Notes":[{"Seq":0,"Note":"String"}]}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length
{"Code":"String","Message":"String","URN":0}