MBOnlineCreditApplicationService

<back to all web services

CreateOCARequest

The following routes are available for this service:
PUT/CreateOCA/
<?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 CreateOCARequestResponse 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 CreditApplicationIndividual 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 $DoNotEmail=null,
        /** @var string|null */
        public ?string $DoNotMail=null,
        /** @var string|null */
        public ?string $DoNotPhone=null,
        /** @var string|null */
        public ?string $DoNotSMS=null,
        /** @var string|null */
        public ?string $DrivingLicenceNumber=null,
        /** @var CurrentEmploymentDetails|null */
        public ?CurrentEmploymentDetails $CurrentEmploymentDetails=null,
        /** @var PreviousEmployment[]|null */
        public ?array $PreviousEmploymentDetails=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['DoNotEmail'])) $this->DoNotEmail = $o['DoNotEmail'];
        if (isset($o['DoNotMail'])) $this->DoNotMail = $o['DoNotMail'];
        if (isset($o['DoNotPhone'])) $this->DoNotPhone = $o['DoNotPhone'];
        if (isset($o['DoNotSMS'])) $this->DoNotSMS = $o['DoNotSMS'];
        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']);
    }
    
    /** @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->DoNotEmail)) $o['DoNotEmail'] = $this->DoNotEmail;
        if (isset($this->DoNotMail)) $o['DoNotMail'] = $this->DoNotMail;
        if (isset($this->DoNotPhone)) $o['DoNotPhone'] = $this->DoNotPhone;
        if (isset($this->DoNotSMS)) $o['DoNotSMS'] = $this->DoNotSMS;
        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);
        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 CreditApplicationBusiness 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 $DoNotEmail=null,
        /** @var string|null */
        public ?string $DoNotMail=null,
        /** @var string|null */
        public ?string $DoNotPhone=null,
        /** @var string|null */
        public ?string $DoNotSMS=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
    ) {
    }

    /** @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['DoNotEmail'])) $this->DoNotEmail = $o['DoNotEmail'];
        if (isset($o['DoNotMail'])) $this->DoNotMail = $o['DoNotMail'];
        if (isset($o['DoNotPhone'])) $this->DoNotPhone = $o['DoNotPhone'];
        if (isset($o['DoNotSMS'])) $this->DoNotSMS = $o['DoNotSMS'];
        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']);
    }
    
    /** @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->DoNotEmail)) $o['DoNotEmail'] = $this->DoNotEmail;
        if (isset($this->DoNotMail)) $o['DoNotMail'] = $this->DoNotMail;
        if (isset($this->DoNotPhone)) $o['DoNotPhone'] = $this->DoNotPhone;
        if (isset($this->DoNotSMS)) $o['DoNotSMS'] = $this->DoNotSMS;
        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);
        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 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 CreateOCARequest 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 CreditApplicationIndividual|null */
        public ?CreditApplicationIndividual $CreditApplicationIndividual=null,

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

        // @DataMember
        /** @var PaymentDetails|null */
        public ?PaymentDetails $PaymentDetails=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('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('CreditApplicationIndividual', $o['CreditApplicationIndividual']);
        if (isset($o['CreditApplicationBusiness'])) $this->CreditApplicationBusiness = JsonConverters::from('CreditApplicationBusiness', $o['CreditApplicationBusiness']);
        if (isset($o['PaymentDetails'])) $this->PaymentDetails = JsonConverters::from('PaymentDetails', $o['PaymentDetails']);
        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('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('CreditApplicationIndividual', $this->CreditApplicationIndividual);
        if (isset($this->CreditApplicationBusiness)) $o['CreditApplicationBusiness'] = JsonConverters::to('CreditApplicationBusiness', $this->CreditApplicationBusiness);
        if (isset($this->PaymentDetails)) $o['PaymentDetails'] = JsonConverters::to('PaymentDetails', $this->PaymentDetails);
        if (isset($this->DiPDetails)) $o['DiPDetails'] = JsonConverters::to('DiPDetails', $this->DiPDetails);
        return empty($o) ? new class(){} : $o;
    }
}

PHP CreateOCARequest DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml

HTTP + XML

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

PUT /CreateOCA/ HTTP/1.1 
Host: webservices.mbukdatabase.co.uk 
Accept: application/xml
Content-Type: application/xml
Content-Length: length

<CreateOCARequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.servicestack.net/types">
  <CreditApplicationBusiness xmlns:d2p1="http://schemas.datacontract.org/2004/07/MBOnlineCreditApplicationService.BusinessLib.DomainClasses">
    <d2p1:BankAccountName>String</d2p1:BankAccountName>
    <d2p1:BankAccountNumber>String</d2p1:BankAccountNumber>
    <d2p1:BankAddress>
      <d2p1:AddressLine1>String</d2p1:AddressLine1>
      <d2p1:AddressLine2>String</d2p1:AddressLine2>
      <d2p1:AddressLine3>String</d2p1:AddressLine3>
      <d2p1:AddressLine4>String</d2p1:AddressLine4>
      <d2p1:AddressLine5>String</d2p1:AddressLine5>
      <d2p1:Postcode>String</d2p1:Postcode>
    </d2p1:BankAddress>
    <d2p1:BankName>String</d2p1:BankName>
    <d2p1:BankSortCode>String</d2p1:BankSortCode>
    <d2p1:BusinessActivity>String</d2p1:BusinessActivity>
    <d2p1:BusinessContactPosition>String</d2p1:BusinessContactPosition>
    <d2p1:BusinessPartners>
      <d2p1:BusinessPartner>
        <d2p1:BusinessPhone>String</d2p1:BusinessPhone>
        <d2p1:CurrentAddress>
          <d2p1:AddressLine1>String</d2p1:AddressLine1>
          <d2p1:AddressLine2>String</d2p1:AddressLine2>
          <d2p1:AddressLine3>String</d2p1:AddressLine3>
          <d2p1:Country>String</d2p1:Country>
          <d2p1:County>String</d2p1:County>
          <d2p1:DateStarted>String</d2p1:DateStarted>
          <d2p1:Duration>String</d2p1:Duration>
          <d2p1:Postcode>String</d2p1:Postcode>
          <d2p1:Town>String</d2p1:Town>
        </d2p1:CurrentAddress>
        <d2p1:CurrentEmploymentDetails>
          <d2p1:AnnualIncome>String</d2p1:AnnualIncome>
          <d2p1:DateEmploymentCommenced>String</d2p1:DateEmploymentCommenced>
          <d2p1:EmployerDetails>
            <d2p1:EmployersAddress>
              <d2p1:AddressLine1>String</d2p1:AddressLine1>
              <d2p1:AddressLine2>String</d2p1:AddressLine2>
              <d2p1:AddressLine3>String</d2p1:AddressLine3>
              <d2p1:Country>String</d2p1:Country>
              <d2p1:County>String</d2p1:County>
              <d2p1:DateStarted>String</d2p1:DateStarted>
              <d2p1:Duration>String</d2p1:Duration>
              <d2p1:Postcode>String</d2p1:Postcode>
              <d2p1:Town>String</d2p1:Town>
            </d2p1:EmployersAddress>
            <d2p1:EmployersName>String</d2p1:EmployersName>
            <d2p1:EmploymentType>String</d2p1:EmploymentType>
            <d2p1:Occupation>String</d2p1:Occupation>
          </d2p1:EmployerDetails>
          <d2p1:MonthsAtEmployer>String</d2p1:MonthsAtEmployer>
        </d2p1:CurrentEmploymentDetails>
        <d2p1:DateofBirth>String</d2p1:DateofBirth>
        <d2p1:Email>String</d2p1:Email>
        <d2p1:FirstName>String</d2p1:FirstName>
        <d2p1:Gender>String</d2p1:Gender>
        <d2p1:HomePhone>String</d2p1:HomePhone>
        <d2p1:Initial>String</d2p1:Initial>
        <d2p1:MaritalStatus>String</d2p1:MaritalStatus>
        <d2p1:MobilePhone>String</d2p1:MobilePhone>
        <d2p1:PartnerType>String</d2p1:PartnerType>
        <d2p1:PreviousAddresses>
          <d2p1:PreviousAddress>
            <d2p1:Address>
              <d2p1:AddressLine1>String</d2p1:AddressLine1>
              <d2p1:AddressLine2>String</d2p1:AddressLine2>
              <d2p1:AddressLine3>String</d2p1:AddressLine3>
              <d2p1:Country>String</d2p1:Country>
              <d2p1:County>String</d2p1:County>
              <d2p1:DateStarted>String</d2p1:DateStarted>
              <d2p1:Duration>String</d2p1:Duration>
              <d2p1:Postcode>String</d2p1:Postcode>
              <d2p1:Town>String</d2p1:Town>
            </d2p1:Address>
            <d2p1:Seq>0</d2p1:Seq>
          </d2p1:PreviousAddress>
        </d2p1:PreviousAddresses>
        <d2p1:PreviousEmploymentDetails>
          <d2p1:PreviousEmployment>
            <d2p1:Seq>0</d2p1:Seq>
            <d2p1:previousEmployment>
              <d2p1:EmployersAddress>
                <d2p1:AddressLine1>String</d2p1:AddressLine1>
                <d2p1:AddressLine2>String</d2p1:AddressLine2>
                <d2p1:AddressLine3>String</d2p1:AddressLine3>
                <d2p1:Country>String</d2p1:Country>
                <d2p1:County>String</d2p1:County>
                <d2p1:DateStarted>String</d2p1:DateStarted>
                <d2p1:Duration>String</d2p1:Duration>
                <d2p1:Postcode>String</d2p1:Postcode>
                <d2p1:Town>String</d2p1:Town>
              </d2p1:EmployersAddress>
              <d2p1:EmployersName>String</d2p1:EmployersName>
              <d2p1:EmploymentType>String</d2p1:EmploymentType>
              <d2p1:Occupation>String</d2p1:Occupation>
            </d2p1:previousEmployment>
          </d2p1:PreviousEmployment>
        </d2p1:PreviousEmploymentDetails>
        <d2p1:Relationship>String</d2p1:Relationship>
        <d2p1:ResidentialStatus>String</d2p1:ResidentialStatus>
        <d2p1:Seq>0</d2p1:Seq>
        <d2p1:Surname>String</d2p1:Surname>
        <d2p1:Title>String</d2p1:Title>
      </d2p1:BusinessPartner>
    </d2p1:BusinessPartners>
    <d2p1:CompanyName>String</d2p1:CompanyName>
    <d2p1:CompanyRegistrationNumber>String</d2p1:CompanyRegistrationNumber>
    <d2p1:CurrentHomeAddress>
      <d2p1:AddressLine1>String</d2p1:AddressLine1>
      <d2p1:AddressLine2>String</d2p1:AddressLine2>
      <d2p1:AddressLine3>String</d2p1:AddressLine3>
      <d2p1:Country>String</d2p1:Country>
      <d2p1:County>String</d2p1:County>
      <d2p1:DateStarted>String</d2p1:DateStarted>
      <d2p1:Duration>String</d2p1:Duration>
      <d2p1:Postcode>String</d2p1:Postcode>
      <d2p1:Town>String</d2p1:Town>
    </d2p1:CurrentHomeAddress>
    <d2p1:DoNotEmail>String</d2p1:DoNotEmail>
    <d2p1:DoNotMail>String</d2p1:DoNotMail>
    <d2p1:DoNotPhone>String</d2p1:DoNotPhone>
    <d2p1:DoNotSMS>String</d2p1:DoNotSMS>
    <d2p1:Email>String</d2p1:Email>
    <d2p1:FirstName>String</d2p1:FirstName>
    <d2p1:HomePhone>String</d2p1:HomePhone>
    <d2p1:Initial>String</d2p1:Initial>
    <d2p1:MobilePhone>String</d2p1:MobilePhone>
    <d2p1:NumberOfEmployees>0</d2p1:NumberOfEmployees>
    <d2p1:NumberofPartners>0</d2p1:NumberofPartners>
    <d2p1:Position>String</d2p1:Position>
    <d2p1:Surname>String</d2p1:Surname>
    <d2p1:Title>String</d2p1:Title>
    <d2p1:TradingAs>String</d2p1:TradingAs>
    <d2p1:TypeOfBusiness>String</d2p1:TypeOfBusiness>
    <d2p1:WorkPhone>String</d2p1:WorkPhone>
    <d2p1:YearsTrading>0</d2p1:YearsTrading>
  </CreditApplicationBusiness>
  <CreditApplicationIndividual xmlns:d2p1="http://schemas.datacontract.org/2004/07/MBOnlineCreditApplicationService.BusinessLib.DomainClasses">
    <d2p1:BankAccountName>String</d2p1:BankAccountName>
    <d2p1:BankAccountNumber>String</d2p1:BankAccountNumber>
    <d2p1:BankAddress>
      <d2p1:AddressLine1>String</d2p1:AddressLine1>
      <d2p1:AddressLine2>String</d2p1:AddressLine2>
      <d2p1:AddressLine3>String</d2p1:AddressLine3>
      <d2p1:AddressLine4>String</d2p1:AddressLine4>
      <d2p1:AddressLine5>String</d2p1:AddressLine5>
      <d2p1:Postcode>String</d2p1:Postcode>
    </d2p1:BankAddress>
    <d2p1:BankName>String</d2p1:BankName>
    <d2p1:BankSortCode>String</d2p1:BankSortCode>
    <d2p1:CurrentAddress>
      <d2p1:AddressLine1>String</d2p1:AddressLine1>
      <d2p1:AddressLine2>String</d2p1:AddressLine2>
      <d2p1:AddressLine3>String</d2p1:AddressLine3>
      <d2p1:Country>String</d2p1:Country>
      <d2p1:County>String</d2p1:County>
      <d2p1:DateStarted>String</d2p1:DateStarted>
      <d2p1:Duration>String</d2p1:Duration>
      <d2p1:Postcode>String</d2p1:Postcode>
      <d2p1:Town>String</d2p1:Town>
    </d2p1:CurrentAddress>
    <d2p1:CurrentEmploymentDetails>
      <d2p1:AnnualIncome>String</d2p1:AnnualIncome>
      <d2p1:DateEmploymentCommenced>String</d2p1:DateEmploymentCommenced>
      <d2p1:EmployerDetails>
        <d2p1:EmployersAddress>
          <d2p1:AddressLine1>String</d2p1:AddressLine1>
          <d2p1:AddressLine2>String</d2p1:AddressLine2>
          <d2p1:AddressLine3>String</d2p1:AddressLine3>
          <d2p1:Country>String</d2p1:Country>
          <d2p1:County>String</d2p1:County>
          <d2p1:DateStarted>String</d2p1:DateStarted>
          <d2p1:Duration>String</d2p1:Duration>
          <d2p1:Postcode>String</d2p1:Postcode>
          <d2p1:Town>String</d2p1:Town>
        </d2p1:EmployersAddress>
        <d2p1:EmployersName>String</d2p1:EmployersName>
        <d2p1:EmploymentType>String</d2p1:EmploymentType>
        <d2p1:Occupation>String</d2p1:Occupation>
      </d2p1:EmployerDetails>
      <d2p1:MonthsAtEmployer>String</d2p1:MonthsAtEmployer>
    </d2p1:CurrentEmploymentDetails>
    <d2p1:DateofBirth>String</d2p1:DateofBirth>
    <d2p1:DoNotEmail>String</d2p1:DoNotEmail>
    <d2p1:DoNotMail>String</d2p1:DoNotMail>
    <d2p1:DoNotPhone>String</d2p1:DoNotPhone>
    <d2p1:DoNotSMS>String</d2p1:DoNotSMS>
    <d2p1:DrivingLicenceNumber>String</d2p1:DrivingLicenceNumber>
    <d2p1:Email>String</d2p1:Email>
    <d2p1:FirstName>String</d2p1:FirstName>
    <d2p1:Gender>String</d2p1:Gender>
    <d2p1:HomePhone>String</d2p1:HomePhone>
    <d2p1:Initial>String</d2p1:Initial>
    <d2p1:MaritalStatus>String</d2p1:MaritalStatus>
    <d2p1:MobilePhone>String</d2p1:MobilePhone>
    <d2p1:PreviousAddresses>
      <d2p1:PreviousAddress>
        <d2p1:Address>
          <d2p1:AddressLine1>String</d2p1:AddressLine1>
          <d2p1:AddressLine2>String</d2p1:AddressLine2>
          <d2p1:AddressLine3>String</d2p1:AddressLine3>
          <d2p1:Country>String</d2p1:Country>
          <d2p1:County>String</d2p1:County>
          <d2p1:DateStarted>String</d2p1:DateStarted>
          <d2p1:Duration>String</d2p1:Duration>
          <d2p1:Postcode>String</d2p1:Postcode>
          <d2p1:Town>String</d2p1:Town>
        </d2p1:Address>
        <d2p1:Seq>0</d2p1:Seq>
      </d2p1:PreviousAddress>
    </d2p1:PreviousAddresses>
    <d2p1:PreviousEmploymentDetails>
      <d2p1:PreviousEmployment>
        <d2p1:Seq>0</d2p1:Seq>
        <d2p1:previousEmployment>
          <d2p1:EmployersAddress>
            <d2p1:AddressLine1>String</d2p1:AddressLine1>
            <d2p1:AddressLine2>String</d2p1:AddressLine2>
            <d2p1:AddressLine3>String</d2p1:AddressLine3>
            <d2p1:Country>String</d2p1:Country>
            <d2p1:County>String</d2p1:County>
            <d2p1:DateStarted>String</d2p1:DateStarted>
            <d2p1:Duration>String</d2p1:Duration>
            <d2p1:Postcode>String</d2p1:Postcode>
            <d2p1:Town>String</d2p1:Town>
          </d2p1:EmployersAddress>
          <d2p1:EmployersName>String</d2p1:EmployersName>
          <d2p1:EmploymentType>String</d2p1:EmploymentType>
          <d2p1:Occupation>String</d2p1:Occupation>
        </d2p1:previousEmployment>
      </d2p1:PreviousEmployment>
    </d2p1:PreviousEmploymentDetails>
    <d2p1:ResidentialStatus>String</d2p1:ResidentialStatus>
    <d2p1:Surname>String</d2p1:Surname>
    <d2p1:Title>String</d2p1:Title>
    <d2p1:WorkPhone>String</d2p1:WorkPhone>
  </CreditApplicationIndividual>
  <DeliveryDetails xmlns:d2p1="http://schemas.datacontract.org/2004/07/MBOnlineCreditApplicationService.BusinessLib.DomainClasses">
    <d2p1:DealerCode>String</d2p1:DealerCode>
    <d2p1:DeliveryPreference>String</d2p1:DeliveryPreference>
  </DeliveryDetails>
  <DiPDetails xmlns:d2p1="http://schemas.datacontract.org/2004/07/MBOnlineCreditApplicationService.BusinessLib.DomainClasses">
    <d2p1:DiPCustomerId>String</d2p1:DiPCustomerId>
    <d2p1:DiPDecisionDescription>String</d2p1:DiPDecisionDescription>
    <d2p1:DiPDecisionType>String</d2p1:DiPDecisionType>
    <d2p1:DiPPrimaryDecisionCode>String</d2p1:DiPPrimaryDecisionCode>
    <d2p1:DiPPrimaryDecisionReasonDealerMessage>String</d2p1:DiPPrimaryDecisionReasonDealerMessage>
    <d2p1:DiPRequestID>String</d2p1:DiPRequestID>
    <d2p1:DiPTimestamp>String</d2p1:DiPTimestamp>
    <d2p1:DipDecisionDescriptionCode>String</d2p1:DipDecisionDescriptionCode>
    <d2p1:DipPrimaryDecisionReason>String</d2p1:DipPrimaryDecisionReason>
    <d2p1:diPReasons>
      <d2p1:DiPReasons>
        <d2p1:DiPDealerMessage>String</d2p1:DiPDealerMessage>
        <d2p1:DiPDecisionReason>String</d2p1:DiPDecisionReason>
        <d2p1:DipDecisionCode>String</d2p1:DipDecisionCode>
        <d2p1:DipReasonSeq>0</d2p1:DipReasonSeq>
      </d2p1:DiPReasons>
    </d2p1:diPReasons>
  </DiPDetails>
  <ExistingVehicleDetails xmlns:d2p1="http://schemas.datacontract.org/2004/07/MBOnlineCreditApplicationService.BusinessLib.DomainClasses">
    <d2p1:SettlementFlag>String</d2p1:SettlementFlag>
    <d2p1:SettlementRegNo>String</d2p1:SettlementRegNo>
    <d2p1:SettlementValue>0</d2p1:SettlementValue>
    <d2p1:TradeInFlag>String</d2p1:TradeInFlag>
    <d2p1:TradeInRegNo>String</d2p1:TradeInRegNo>
    <d2p1:TradeInValue>0</d2p1:TradeInValue>
  </ExistingVehicleDetails>
  <FinanceDetails xmlns:d2p1="http://schemas.datacontract.org/2004/07/MBOnlineCreditApplicationService.BusinessLib.DomainClasses">
    <d2p1:AdvancedRentalAmount>0</d2p1:AdvancedRentalAmount>
    <d2p1:AnnualMileage>0</d2p1:AnnualMileage>
    <d2p1:CostForCredit>0</d2p1:CostForCredit>
    <d2p1:CustomerDepositContribution>0</d2p1:CustomerDepositContribution>
    <d2p1:Duration>0</d2p1:Duration>
    <d2p1:ExcessMileageRate>0</d2p1:ExcessMileageRate>
    <d2p1:FinancialProduct>String</d2p1:FinancialProduct>
    <d2p1:FixedInterestRate>0</d2p1:FixedInterestRate>
    <d2p1:Frequency>String</d2p1:Frequency>
    <d2p1:ManufacturerDepositContribution>0</d2p1:ManufacturerDepositContribution>
    <d2p1:OptionalPurchasePayment>0</d2p1:OptionalPurchasePayment>
    <d2p1:PauseType>String</d2p1:PauseType>
    <d2p1:PaymentProfile>String</d2p1:PaymentProfile>
    <d2p1:PaymentRentalAmount>0</d2p1:PaymentRentalAmount>
    <d2p1:ProductType>String</d2p1:ProductType>
    <d2p1:PurchaseActivationFee>0</d2p1:PurchaseActivationFee>
    <d2p1:RandMIncluded>String</d2p1:RandMIncluded>
    <d2p1:RandMLevel>String</d2p1:RandMLevel>
    <d2p1:RepresentativeAPR>0</d2p1:RepresentativeAPR>
    <d2p1:RetailerDepositContribution>0</d2p1:RetailerDepositContribution>
    <d2p1:TotalAmountPayable>0</d2p1:TotalAmountPayable>
    <d2p1:TotalDepositContribution>0</d2p1:TotalDepositContribution>
  </FinanceDetails>
  <GeneralDetails xmlns:d2p1="http://schemas.datacontract.org/2004/07/MBOnlineCreditApplicationService.BusinessLib.DomainClasses">
    <d2p1:Brand>0</d2p1:Brand>
    <d2p1:CustomerReferenceNumber>String</d2p1:CustomerReferenceNumber>
    <d2p1:CustomerType>String</d2p1:CustomerType>
    <d2p1:EnquiryDateTime>String</d2p1:EnquiryDateTime>
    <d2p1:FormID>String</d2p1:FormID>
    <d2p1:OCAApprovalNumber>String</d2p1:OCAApprovalNumber>
    <d2p1:RequestSource>0</d2p1:RequestSource>
    <d2p1:SourceofBusiness>String</d2p1:SourceofBusiness>
    <d2p1:TagURL>String</d2p1:TagURL>
  </GeneralDetails>
  <PaymentDetails xmlns:d2p1="http://schemas.datacontract.org/2004/07/MBOnlineCreditApplicationService.BusinessLib.DomainClasses">
    <d2p1:paymentDetails>
      <d2p1:PaymentDetail>
        <d2p1:AmountPaid>0</d2p1:AmountPaid>
        <d2p1:Description>String</d2p1:Description>
        <d2p1:PaymentDateTime>String</d2p1:PaymentDateTime>
        <d2p1:PaymentTransactionID>String</d2p1:PaymentTransactionID>
        <d2p1:PaymentType>String</d2p1:PaymentType>
        <d2p1:Seq>0</d2p1:Seq>
      </d2p1:PaymentDetail>
    </d2p1:paymentDetails>
  </PaymentDetails>
  <Timestamp>String</Timestamp>
  <Token>String</Token>
  <Username>String</Username>
  <VehicleDetails xmlns:d2p1="http://schemas.datacontract.org/2004/07/MBOnlineCreditApplicationService.BusinessLib.DomainClasses">
    <d2p1:CurrentMileage>0</d2p1:CurrentMileage>
    <d2p1:FirstRegistrationDate>String</d2p1:FirstRegistrationDate>
    <d2p1:ModelBody>String</d2p1:ModelBody>
    <d2p1:ModelClass>String</d2p1:ModelClass>
    <d2p1:ModelDerivative>String</d2p1:ModelDerivative>
    <d2p1:NewUsedFlag>String</d2p1:NewUsedFlag>
    <d2p1:NewVehicleModelOptionDetails>
      <d2p1:ModelOptionDetails>
        <d2p1:Code>String</d2p1:Code>
        <d2p1:Description>String</d2p1:Description>
        <d2p1:Price>0</d2p1:Price>
        <d2p1:Seq>0</d2p1:Seq>
      </d2p1:ModelOptionDetails>
    </d2p1:NewVehicleModelOptionDetails>
    <d2p1:OTRPrice>0</d2p1:OTRPrice>
    <d2p1:OnlineCode>String</d2p1:OnlineCode>
    <d2p1:RegNo>String</d2p1:RegNo>
    <d2p1:TotalPrice>0</d2p1:TotalPrice>
    <d2p1:VIN>String</d2p1:VIN>
  </VehicleDetails>
</CreateOCARequest>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<CreateOCARequestResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.servicestack.net/types">
  <Code>String</Code>
  <Message>String</Message>
  <URN>0</URN>
</CreateOCARequestResponse>