POST | /v1/pricingdetails | Creates a detailed pricing of a vehicle |
---|
"use strict";
/** @typedef {number} */
export var Source;
(function (Source) {
Source[Source["OnlineShowroom"] = 1] = "OnlineShowroom"
Source[Source["OneAdmin"] = 2] = "OneAdmin"
})(Source || (Source = {}));
export class Address {
/** @param {{Property?:string,Street?:string,Town?:string,County?:string,Locality?:string,Postcode?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
Property;
/** @type {string} */
Street;
/** @type {string} */
Town;
/** @type {string} */
County;
/** @type {string} */
Locality;
/** @type {string} */
Postcode;
}
/** @typedef {number} */
export var CustomerMode;
(function (CustomerMode) {
CustomerMode[CustomerMode["Private"] = 1] = "Private"
CustomerMode[CustomerMode["Business"] = 2] = "Business"
CustomerMode[CustomerMode["Motability"] = 3] = "Motability"
})(CustomerMode || (CustomerMode = {}));
export class SalesforceCustomer {
/** @param {{CustomerId?:string,IsCiam?:boolean,CompanyName?:string,Title?:string,Firstname?:string,Surname?:string,EmailAddress?:string,Telephone?:string,Address?:Address,Mode?:CustomerMode}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
CustomerId;
/** @type {boolean} */
IsCiam;
/** @type {string} */
CompanyName;
/** @type {string} */
Title;
/** @type {string} */
Firstname;
/** @type {string} */
Surname;
/** @type {string} */
EmailAddress;
/** @type {string} */
Telephone;
/** @type {Address} */
Address;
/** @type {CustomerMode} */
Mode;
}
export class Preferences {
/** @param {{OptinEmail?:boolean,OptinPost?:boolean,OptinSMS?:boolean,OptinTelephone?:boolean}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {boolean} */
OptinEmail;
/** @type {boolean} */
OptinPost;
/** @type {boolean} */
OptinSMS;
/** @type {boolean} */
OptinTelephone;
}
export class Customer extends SalesforceCustomer {
/** @param {{ProfileId?:string,Preferences?:Preferences,CustomerId?:string,IsCiam?:boolean,CompanyName?:string,Title?:string,Firstname?:string,Surname?:string,EmailAddress?:string,Telephone?:string,Address?:Address,Mode?:CustomerMode}} [init] */
constructor(init) { super(init); Object.assign(this, init) }
/** @type {?string} */
ProfileId;
/** @type {?Preferences} */
Preferences;
}
export class Vehicle {
/** @param {{Vin?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {?string} */
Vin;
}
export class Option {
/** @param {{IsDefault?:boolean,Value?:number}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {boolean} */
IsDefault;
/** @type {number} */
Value;
}
export class Term {
/** @param {{Options?:Option[]}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {Option[]} */
Options = [];
}
export class Deposit {
/** @param {{Default?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
Default;
}
export class Mileage {
/** @param {{Options?:Option[]}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {Option[]} */
Options = [];
}
export class AdvanceRentals {
/** @param {{Options?:Option[]}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {Option[]} */
Options = [];
}
/** @typedef {'UNASSIGNED'|'NEW'|'USED'} */
export var VehicleType;
(function (VehicleType) {
VehicleType["UNASSIGNED"] = "UNASSIGNED"
VehicleType["NEW"] = "NEW"
VehicleType["USED"] = "USED"
})(VehicleType || (VehicleType = {}));
export class FinanceCriteria {
/** @param {{Key?:string,Name?:string,Type?:string,IsDefault?:boolean,Term?:Term,Deposit?:Deposit,Mileage?:Mileage,AdvanceRentals?:AdvanceRentals,IsPersonalised?:boolean,RegularPayment?:string,PartExchange?:string,Settlement?:string,CustomerType?:string,VehicleType?:VehicleType}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
Key;
/** @type {string} */
Name;
/** @type {string} */
Type;
/** @type {boolean} */
IsDefault;
/** @type {Term} */
Term;
/** @type {Deposit} */
Deposit;
/** @type {Mileage} */
Mileage;
/** @type {AdvanceRentals} */
AdvanceRentals;
/** @type {boolean} */
IsPersonalised;
/** @type {string} */
RegularPayment;
/** @type {string} */
PartExchange;
/** @type {string} */
Settlement;
/** @type {string} */
CustomerType;
/** @type {VehicleType} */
VehicleType;
}
export class OutrightPurchase {
/** @param {{IsOutrightPurchase?:boolean,Reference?:string,DiscountRate?:number,Bm7NST?:string,IsBackOrder?:boolean,IsCOPConverter?:boolean}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {boolean} */
IsOutrightPurchase;
/** @type {string} */
Reference;
/** @type {number} */
DiscountRate;
/** @type {string} */
Bm7NST;
/** @type {boolean} */
IsBackOrder;
/** @type {boolean} */
IsCOPConverter;
}
/** @typedef {number} */
export var MotabilityType;
(function (MotabilityType) {
MotabilityType[MotabilityType["PIP"] = 1] = "PIP"
MotabilityType[MotabilityType["WPMS"] = 2] = "WPMS"
MotabilityType[MotabilityType["UNASSIGNED"] = 3] = "UNASSIGNED"
})(MotabilityType || (MotabilityType = {}));
export class CreateOrderBase {
/** @param {{Source?:Source,GssnId?:string,AdditionalInformation?:string,Cash?:boolean,Finance?:boolean,Customer?:Customer,Vehicle?:Vehicle,FinanceCriteria?:FinanceCriteria,BackOrderGuid?:string,TagUrl?:string,OutrightPurchase?:OutrightPurchase,Motability?:boolean,MotabilityPricingId?:number,FinanceApplicationReference?:string,Specialist?:boolean,GasId?:string,PersonalisedItemOfferIds?:number[],SuggestedVin?:string,NonOptimumReason?:string,MotabilityType?:MotabilityType,EstimatedHandoverDate?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {Source} */
Source;
/** @type {string} */
GssnId;
/** @type {string} */
AdditionalInformation;
/** @type {boolean} */
Cash;
/** @type {boolean} */
Finance;
/** @type {Customer} */
Customer;
/** @type {Vehicle} */
Vehicle;
/** @type {FinanceCriteria} */
FinanceCriteria;
/** @type {?string} */
BackOrderGuid;
/** @type {?string} */
TagUrl;
/** @type {?OutrightPurchase} */
OutrightPurchase;
/** @type {boolean} */
Motability;
/** @type {?number} */
MotabilityPricingId;
/** @type {string} */
FinanceApplicationReference;
/** @type {boolean} */
Specialist;
/** @type {string} */
GasId;
/** @type {?number[]} */
PersonalisedItemOfferIds;
/** @type {?string} */
SuggestedVin;
/** @type {?string} */
NonOptimumReason;
/** @type {MotabilityType} */
MotabilityType;
/** @type {string} */
EstimatedHandoverDate;
}
/** @typedef {'LIST_PRICE'|'NUMBER_PLATE_FEE'|'DELIVERY_CHARGE'|'FUEL_CHARGE'|'MANUFACTURER_OFFER'|'PERSONALISED_MONEYOFFER'|'PERSONALISED_NONMONEYOFFER'|'PERSONALISED_NONMONEYOFFER_NEG'|'SERVICE'|'SERVICE_NEG'|'GOVERNMENT_GRANT'|'OUTRIGHT_PURCHASE_DISCOUNT'|'VIP_OFFER'|'WALLBOX_OFFER'|'WALLBOX_OFFER_NEG'|'ROAD_FUND_LICENCE'|'FIRST_REGISTRATION_FEE'|'NOT_FOUND'|'ACCESSORY_OFFER'|'ACCESSORY_OFFER_NEG'|'MOTABILITY_DISCOUNT'} */
export var OfferPriceProductType;
(function (OfferPriceProductType) {
OfferPriceProductType["LIST_PRICE"] = "LIST_PRICE"
OfferPriceProductType["NUMBER_PLATE_FEE"] = "NUMBER_PLATE_FEE"
OfferPriceProductType["DELIVERY_CHARGE"] = "DELIVERY_CHARGE"
OfferPriceProductType["FUEL_CHARGE"] = "FUEL_CHARGE"
OfferPriceProductType["MANUFACTURER_OFFER"] = "MANUFACTURER_OFFER"
OfferPriceProductType["PERSONALISED_MONEYOFFER"] = "PERSONALISED_MONEYOFFER"
OfferPriceProductType["PERSONALISED_NONMONEYOFFER"] = "PERSONALISED_NONMONEYOFFER"
OfferPriceProductType["PERSONALISED_NONMONEYOFFER_NEG"] = "PERSONALISED_NONMONEYOFFER_NEG"
OfferPriceProductType["SERVICE"] = "SERVICE"
OfferPriceProductType["SERVICE_NEG"] = "SERVICE_NEG"
OfferPriceProductType["GOVERNMENT_GRANT"] = "GOVERNMENT_GRANT"
OfferPriceProductType["OUTRIGHT_PURCHASE_DISCOUNT"] = "OUTRIGHT_PURCHASE_DISCOUNT"
OfferPriceProductType["VIP_OFFER"] = "VIP_OFFER"
OfferPriceProductType["WALLBOX_OFFER"] = "WALLBOX_OFFER"
OfferPriceProductType["WALLBOX_OFFER_NEG"] = "WALLBOX_OFFER_NEG"
OfferPriceProductType["ROAD_FUND_LICENCE"] = "ROAD_FUND_LICENCE"
OfferPriceProductType["FIRST_REGISTRATION_FEE"] = "FIRST_REGISTRATION_FEE"
OfferPriceProductType["NOT_FOUND"] = "NOT_FOUND"
OfferPriceProductType["ACCESSORY_OFFER"] = "ACCESSORY_OFFER"
OfferPriceProductType["ACCESSORY_OFFER_NEG"] = "ACCESSORY_OFFER_NEG"
OfferPriceProductType["MOTABILITY_DISCOUNT"] = "MOTABILITY_DISCOUNT"
})(OfferPriceProductType || (OfferPriceProductType = {}));
export class Price {
/** @param {{Id?:string,Description?:string,Net?:number,VAT?:number,Gross?:number,Product?:OfferPriceProductType}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
Id;
/** @type {string} */
Description;
/** @type {number} */
Net;
/** @type {number} */
VAT;
/** @type {number} */
Gross;
/** @type {OfferPriceProductType} */
Product;
}
export class GetPricingDetailsResponse {
/** @param {{Price?:Price}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {Price} */
Price;
}
export class GetPricingDetailsRequest extends CreateOrderBase {
/** @param {{Source?:Source,GssnId?:string,AdditionalInformation?:string,Cash?:boolean,Finance?:boolean,Customer?:Customer,Vehicle?:Vehicle,FinanceCriteria?:FinanceCriteria,BackOrderGuid?:string,TagUrl?:string,OutrightPurchase?:OutrightPurchase,Motability?:boolean,MotabilityPricingId?:number,FinanceApplicationReference?:string,Specialist?:boolean,GasId?:string,PersonalisedItemOfferIds?:number[],SuggestedVin?:string,NonOptimumReason?:string,MotabilityType?:MotabilityType,EstimatedHandoverDate?:string}} [init] */
constructor(init) { super(init); Object.assign(this, init) }
}
JavaScript GetPricingDetailsRequest DTOs
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.
POST /v1/pricingdetails HTTP/1.1
Host: prod-api-agency-orch-mb-dhc.rapp-customers.co.uk
Accept: application/json
Content-Type: application/json
Content-Length: length
{"Source":"OnlineShowroom","GssnId":"String","AdditionalInformation":"String","Cash":false,"Finance":false,"Customer":{"ProfileId":"00000000000000000000000000000000","Preferences":{"OptinEmail":false,"OptinPost":false,"OptinSMS":false,"OptinTelephone":false},"CustomerId":"String","IsCiam":false,"CompanyName":"String","Title":"String","Firstname":"String","Surname":"String","EmailAddress":"String","Telephone":"String","Address":{"Property":"String","Street":"String","Town":"String","County":"String","Locality":"String","Postcode":"String"},"Mode":"Private"},"Vehicle":{"Vin":"String"},"FinanceCriteria":{"Key":"String","Name":"String","Type":"String","IsDefault":false,"Term":{"Options":[{"IsDefault":false,"Value":0}]},"Deposit":{"Default":"String"},"Mileage":{"Options":[{"IsDefault":false,"Value":0}]},"AdvanceRentals":{"Options":[{"IsDefault":false,"Value":0}]},"IsPersonalised":false,"RegularPayment":"String","PartExchange":"String","Settlement":"String","CustomerType":"String","VehicleType":"UNASSIGNED"},"BackOrderGuid":"00000000000000000000000000000000","TagUrl":"String","OutrightPurchase":{"IsOutrightPurchase":false,"Reference":"String","DiscountRate":0,"Bm7NST":"String","IsBackOrder":false,"IsCOPConverter":false},"Motability":false,"MotabilityPricingId":0,"FinanceApplicationReference":"String","Specialist":false,"GasId":"String","PersonalisedItemOfferIds":[0],"SuggestedVin":"String","NonOptimumReason":"String","MotabilityType":"PIP","EstimatedHandoverDate":"String"}
HTTP/1.1 200 OK Content-Type: application/json Content-Length: length {"Price":{"Id":"String","Description":"String","Net":0,"VAT":0,"Gross":0,"Product":"LIST_PRICE"}}