POST | /v1/copinflightpricing | Corporate Outright Pricing Inflight Pricing for supplied Order Guids |
---|
"use strict";
export class OrderOffer {
/** @param {{Id?:number,OfferTypeId?:number,OfferTypeDescription?:string,OfferId?:string,OfferDescription?:string,Net?:number,VAT?:number,Gross?:number,GovernmentGrant?:boolean,PromoCode?:string,Expiry?:string,AffectsPrice?:boolean,Product?:number,ParentId?:string,CreationDate?:string,ProductTypeDescription?:string,ProductTypeNegativeDescription?:string,CertificateRequired?:boolean}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {number} */
Id;
/** @type {number} */
OfferTypeId;
/** @type {string} */
OfferTypeDescription;
/** @type {string} */
OfferId;
/** @type {string} */
OfferDescription;
/** @type {number} */
Net;
/** @type {number} */
VAT;
/** @type {number} */
Gross;
/** @type {boolean} */
GovernmentGrant;
/** @type {?string} */
PromoCode;
/** @type {?string} */
Expiry;
/** @type {boolean} */
AffectsPrice;
/** @type {?number} */
Product;
/** @type {?string} */
ParentId;
/** @type {string} */
CreationDate;
/** @type {?string} */
ProductTypeDescription;
/** @type {?string} */
ProductTypeNegativeDescription;
/** @type {?boolean} */
CertificateRequired;
}
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;
}
export class MotabilityAdvancePayment {
/** @param {{AdvancePaymentRentalType?:string,AdvancePaymentValueGross?:number,AdvancePaymentValueVAT?:number,AdvancePaymentValueNet?:number}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
AdvancePaymentRentalType;
/** @type {number} */
AdvancePaymentValueGross;
/** @type {number} */
AdvancePaymentValueVAT;
/** @type {number} */
AdvancePaymentValueNet;
}
export class InflightPricingOrder {
/** @param {{Guid?:string,Vin?:string,AdvanceRentalPaymentType?:number,Offer?:OrderOffer[],OutrightPurchase?:OutrightPurchase,MotabilityAdvancePayment?:MotabilityAdvancePayment}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
Guid;
/** @type {string} */
Vin;
/** @type {number} */
AdvanceRentalPaymentType;
/** @type {OrderOffer[]} */
Offer = [];
/** @type {?OutrightPurchase} */
OutrightPurchase;
/** @type {?MotabilityAdvancePayment} */
MotabilityAdvancePayment;
}
export class InflightPricingOrderRequest {
/** @param {{InvalidFormatGuids?:string[],OrderNotFoundGuids?:string[],InflightPricingOrders?:InflightPricingOrder[],IsMotability?:boolean}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string[]} */
InvalidFormatGuids = [];
/** @type {string[]} */
OrderNotFoundGuids = [];
/** @type {InflightPricingOrder[]} */
InflightPricingOrders = [];
/** @type {boolean} */
IsMotability;
}
export class CopInflightPricingOrderRequest extends InflightPricingOrderRequest {
/** @param {{NoCustomerContract?:string[],NoVehicleDiscount?:string[],InvalidFormatGuids?:string[],OrderNotFoundGuids?:string[],InflightPricingOrders?:InflightPricingOrder[],IsMotability?:boolean}} [init] */
constructor(init) { super(init); Object.assign(this, init) }
/** @type {string[]} */
NoCustomerContract = [];
/** @type {string[]} */
NoVehicleDiscount = [];
}
export class SalesforcePrice {
/** @param {{Id?:string,Description?:string,Net?:number,VAT?:number,Gross?:number,Product?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
Id;
/** @type {string} */
Description;
/** @type {number} */
Net;
/** @type {number} */
VAT;
/** @type {number} */
Gross;
/** @type {string} */
Product;
}
export class SalesforceTotalPrice {
/** @param {{Net?:number,VAT?:number,Gross?:number}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {number} */
Net;
/** @type {number} */
VAT;
/** @type {number} */
Gross;
}
export class SalesforceOffer {
/** @param {{Id?:string,Description?:string,Net?:number,VAT?:number,Gross?:number,Expiry?:string,Product?:string,RequiresCertification?:boolean}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
Id;
/** @type {string} */
Description;
/** @type {number} */
Net;
/** @type {number} */
VAT;
/** @type {number} */
Gross;
/** @type {?string} */
Expiry;
/** @type {string} */
Product;
/** @type {?boolean} */
RequiresCertification;
}
export class SalesforceOffers {
/** @param {{Personalised?:SalesforceOffer[],NonDiscretionary?:SalesforceOffer[],NonCampaign?:SalesforceOffer[],OutrightPurchaseDiscount?:SalesforceOffer[],MotabilityDiscount?:SalesforceOffer[],IntegratedProducts?:SalesforceOffer[]}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {SalesforceOffer[]} */
Personalised = [];
/** @type {SalesforceOffer[]} */
NonDiscretionary = [];
/** @type {SalesforceOffer[]} */
NonCampaign = [];
/** @type {SalesforceOffer[]} */
OutrightPurchaseDiscount = [];
/** @type {SalesforceOffer[]} */
MotabilityDiscount = [];
/** @type {SalesforceOffer[]} */
IntegratedProducts = [];
}
export class SalesforceOutrightPurchase {
/** @param {{IsOutrightPurchase?:boolean,Reference?:string,DiscountPercentage?:number,ModelId?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {boolean} */
IsOutrightPurchase;
/** @type {string} */
Reference;
/** @type {number} */
DiscountPercentage;
/** @type {string} */
ModelId;
}
export class VehicleInflightPrice {
/** @param {{Guid?:string,Status?:string,Success?:boolean,Prices?:SalesforcePrice[],TotalOTRFees?:SalesforceTotalPrice,TotalOTRPrice?:SalesforceTotalPrice,TotalActualPrice?:SalesforceTotalPrice,Offers?:SalesforceOffers,OutrightPurchase?:SalesforceOutrightPurchase,Motability?:MotabilityAdvancePayment}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {string} */
Guid;
/** @type {string} */
Status;
/** @type {boolean} */
Success;
/** @type {SalesforcePrice[]} */
Prices = [];
/** @type {SalesforceTotalPrice} */
TotalOTRFees;
/** @type {SalesforceTotalPrice} */
TotalOTRPrice;
/** @type {SalesforceTotalPrice} */
TotalActualPrice;
/** @type {SalesforceOffers} */
Offers;
/** @type {?SalesforceOutrightPurchase} */
OutrightPurchase;
/** @type {MotabilityAdvancePayment} */
Motability;
}
export class InflightPricingResponse {
/** @param {{VehiclesInflightPrices?:VehicleInflightPrice[]}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {VehicleInflightPrice[]} */
VehiclesInflightPrices = [];
}
export class CopInflightPricingRequest extends CopInflightPricingOrderRequest {
/** @param {{NoCustomerContract?:string[],NoVehicleDiscount?:string[],InvalidFormatGuids?:string[],OrderNotFoundGuids?:string[],InflightPricingOrders?:InflightPricingOrder[],IsMotability?:boolean}} [init] */
constructor(init) { super(init); Object.assign(this, init) }
}
JavaScript CopInflightPricingRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /v1/copinflightpricing HTTP/1.1
Host: prod-api-agency-orch-mb-dhc.rapp-customers.co.uk
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<CopInflightPricingRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Mercedes.Agency.Orchestration.API.ServiceModel.InflightPricing">
<InflightPricingOrders xmlns="http://schemas.datacontract.org/2004/07/Mercedes.Agency.API.Shared.POCO">
<InflightPricingOrder>
<AdvanceRentalPaymentType>0</AdvanceRentalPaymentType>
<Guid>00000000-0000-0000-0000-000000000000</Guid>
<MotabilityAdvancePayment>
<AdvancePaymentRentalType>String</AdvancePaymentRentalType>
<AdvancePaymentValueGross>0</AdvancePaymentValueGross>
<AdvancePaymentValueNet>0</AdvancePaymentValueNet>
<AdvancePaymentValueVAT>0</AdvancePaymentValueVAT>
</MotabilityAdvancePayment>
<Offer>
<OrderOffer>
<AffectsPrice>false</AffectsPrice>
<CertificateRequired>false</CertificateRequired>
<CreationDate>0001-01-01T00:00:00</CreationDate>
<Expiry>String</Expiry>
<GovernmentGrant>false</GovernmentGrant>
<Gross>0</Gross>
<Id>0</Id>
<Net>0</Net>
<OfferDescription>String</OfferDescription>
<OfferId>String</OfferId>
<OfferTypeDescription>String</OfferTypeDescription>
<OfferTypeId>0</OfferTypeId>
<ParentId>String</ParentId>
<Product>0</Product>
<ProductTypeDescription>String</ProductTypeDescription>
<ProductTypeNegativeDescription>String</ProductTypeNegativeDescription>
<PromoCode>String</PromoCode>
<VAT>0</VAT>
</OrderOffer>
</Offer>
<OutrightPurchase>
<Bm7NST>String</Bm7NST>
<DiscountRate>0</DiscountRate>
<IsBackOrder>false</IsBackOrder>
<IsCOPConverter>false</IsCOPConverter>
<IsOutrightPurchase>false</IsOutrightPurchase>
<Reference>String</Reference>
</OutrightPurchase>
<Vin>String</Vin>
</InflightPricingOrder>
</InflightPricingOrders>
<InvalidFormatGuids xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays" xmlns="http://schemas.datacontract.org/2004/07/Mercedes.Agency.API.Shared.POCO">
<d2p1:string>String</d2p1:string>
</InvalidFormatGuids>
<IsMotability xmlns="http://schemas.datacontract.org/2004/07/Mercedes.Agency.API.Shared.POCO">false</IsMotability>
<OrderNotFoundGuids xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays" xmlns="http://schemas.datacontract.org/2004/07/Mercedes.Agency.API.Shared.POCO">
<d2p1:guid>00000000-0000-0000-0000-000000000000</d2p1:guid>
</OrderNotFoundGuids>
<NoCustomerContract xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays" xmlns="http://schemas.datacontract.org/2004/07/Mercedes.Agency.API.Shared.POCO">
<d2p1:guid>00000000-0000-0000-0000-000000000000</d2p1:guid>
</NoCustomerContract>
<NoVehicleDiscount xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays" xmlns="http://schemas.datacontract.org/2004/07/Mercedes.Agency.API.Shared.POCO">
<d2p1:guid>00000000-0000-0000-0000-000000000000</d2p1:guid>
</NoVehicleDiscount>
</CopInflightPricingRequest>
HTTP/1.1 200 OK Content-Type: application/xml Content-Length: length <InflightPricingResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Mercedes.Agency.API.Shared.POCO"> <VehiclesInflightPrices> <VehicleInflightPrice> <Guid>String</Guid> <Motability> <AdvancePaymentRentalType>String</AdvancePaymentRentalType> <AdvancePaymentValueGross>0</AdvancePaymentValueGross> <AdvancePaymentValueNet>0</AdvancePaymentValueNet> <AdvancePaymentValueVAT>0</AdvancePaymentValueVAT> </Motability> <Offers> <IntegratedProducts> <SalesforceOffer> <Description>String</Description> <Expiry>String</Expiry> <Gross>0</Gross> <Id>String</Id> <Net>0</Net> <Product>String</Product> <RequiresCertification>false</RequiresCertification> <VAT>0</VAT> </SalesforceOffer> </IntegratedProducts> <MotabilityDiscount> <SalesforceOffer> <Description>String</Description> <Expiry>String</Expiry> <Gross>0</Gross> <Id>String</Id> <Net>0</Net> <Product>String</Product> <RequiresCertification>false</RequiresCertification> <VAT>0</VAT> </SalesforceOffer> </MotabilityDiscount> <NonCampaign> <SalesforceOffer> <Description>String</Description> <Expiry>String</Expiry> <Gross>0</Gross> <Id>String</Id> <Net>0</Net> <Product>String</Product> <RequiresCertification>false</RequiresCertification> <VAT>0</VAT> </SalesforceOffer> </NonCampaign> <NonDiscretionary> <SalesforceOffer> <Description>String</Description> <Expiry>String</Expiry> <Gross>0</Gross> <Id>String</Id> <Net>0</Net> <Product>String</Product> <RequiresCertification>false</RequiresCertification> <VAT>0</VAT> </SalesforceOffer> </NonDiscretionary> <OutrightPurchaseDiscount> <SalesforceOffer> <Description>String</Description> <Expiry>String</Expiry> <Gross>0</Gross> <Id>String</Id> <Net>0</Net> <Product>String</Product> <RequiresCertification>false</RequiresCertification> <VAT>0</VAT> </SalesforceOffer> </OutrightPurchaseDiscount> <Personalised> <SalesforceOffer> <Description>String</Description> <Expiry>String</Expiry> <Gross>0</Gross> <Id>String</Id> <Net>0</Net> <Product>String</Product> <RequiresCertification>false</RequiresCertification> <VAT>0</VAT> </SalesforceOffer> </Personalised> </Offers> <OutrightPurchase> <DiscountPercentage>0</DiscountPercentage> <IsOutrightPurchase>false</IsOutrightPurchase> <ModelId>String</ModelId> <Reference>String</Reference> </OutrightPurchase> <Prices> <SalesforcePrice> <Description>String</Description> <Gross>0</Gross> <Id>String</Id> <Net>0</Net> <Product>String</Product> <VAT>0</VAT> </SalesforcePrice> </Prices> <Status>String</Status> <Success>false</Success> <TotalActualPrice> <Gross>0</Gross> <Net>0</Net> <VAT>0</VAT> </TotalActualPrice> <TotalOTRFees> <Gross>0</Gross> <Net>0</Net> <VAT>0</VAT> </TotalOTRFees> <TotalOTRPrice> <Gross>0</Gross> <Net>0</Net> <VAT>0</VAT> </TotalOTRPrice> </VehicleInflightPrice> </VehiclesInflightPrices> </InflightPricingResponse>