POST | /v1/pricingdetails | Creates a detailed pricing of a vehicle |
---|
import java.math.*;
import java.util.*;
import java.io.InputStream;
import net.servicestack.client.*;
public class dtos
{
public static class GetPricingDetailsRequest extends CreateOrderBase implements IPost
{
}
public static class CreateOrderBase
{
public Source Source = null;
public String GssnId = null;
public String AdditionalInformation = null;
public Boolean Cash = null;
public Boolean Finance = null;
public Customer Customer = null;
public Vehicle Vehicle = null;
public FinanceCriteria FinanceCriteria = null;
public UUID BackOrderGuid = null;
public String TagUrl = null;
public OutrightPurchase OutrightPurchase = null;
public Boolean Motability = null;
public Integer MotabilityPricingId = null;
public String FinanceApplicationReference = null;
public Boolean Specialist = null;
public String GasId = null;
public ArrayList<Integer> PersonalisedItemOfferIds = null;
public String SuggestedVin = null;
public String NonOptimumReason = null;
public MotabilityType MotabilityType = null;
public String EstimatedHandoverDate = null;
public Source getSource() { return Source; }
public CreateOrderBase setSource(Source value) { this.Source = value; return this; }
public String getGssnId() { return GssnId; }
public CreateOrderBase setGssnId(String value) { this.GssnId = value; return this; }
public String getAdditionalInformation() { return AdditionalInformation; }
public CreateOrderBase setAdditionalInformation(String value) { this.AdditionalInformation = value; return this; }
public Boolean isCash() { return Cash; }
public CreateOrderBase setCash(Boolean value) { this.Cash = value; return this; }
public Boolean isFinance() { return Finance; }
public CreateOrderBase setFinance(Boolean value) { this.Finance = value; return this; }
public Customer getCustomer() { return Customer; }
public CreateOrderBase setCustomer(Customer value) { this.Customer = value; return this; }
public Vehicle getVehicle() { return Vehicle; }
public CreateOrderBase setVehicle(Vehicle value) { this.Vehicle = value; return this; }
public FinanceCriteria getFinanceCriteria() { return FinanceCriteria; }
public CreateOrderBase setFinanceCriteria(FinanceCriteria value) { this.FinanceCriteria = value; return this; }
public UUID getBackOrderGuid() { return BackOrderGuid; }
public CreateOrderBase setBackOrderGuid(UUID value) { this.BackOrderGuid = value; return this; }
public String getTagUrl() { return TagUrl; }
public CreateOrderBase setTagUrl(String value) { this.TagUrl = value; return this; }
public OutrightPurchase getOutrightPurchase() { return OutrightPurchase; }
public CreateOrderBase setOutrightPurchase(OutrightPurchase value) { this.OutrightPurchase = value; return this; }
public Boolean isMotability() { return Motability; }
public CreateOrderBase setMotability(Boolean value) { this.Motability = value; return this; }
public Integer getMotabilityPricingId() { return MotabilityPricingId; }
public CreateOrderBase setMotabilityPricingId(Integer value) { this.MotabilityPricingId = value; return this; }
public String getFinanceApplicationReference() { return FinanceApplicationReference; }
public CreateOrderBase setFinanceApplicationReference(String value) { this.FinanceApplicationReference = value; return this; }
public Boolean isSpecialist() { return Specialist; }
public CreateOrderBase setSpecialist(Boolean value) { this.Specialist = value; return this; }
public String getGasId() { return GasId; }
public CreateOrderBase setGasId(String value) { this.GasId = value; return this; }
public ArrayList<Integer> getPersonalisedItemOfferIds() { return PersonalisedItemOfferIds; }
public CreateOrderBase setPersonalisedItemOfferIds(ArrayList<Integer> value) { this.PersonalisedItemOfferIds = value; return this; }
public String getSuggestedVin() { return SuggestedVin; }
public CreateOrderBase setSuggestedVin(String value) { this.SuggestedVin = value; return this; }
public String getNonOptimumReason() { return NonOptimumReason; }
public CreateOrderBase setNonOptimumReason(String value) { this.NonOptimumReason = value; return this; }
public MotabilityType getMotabilityType() { return MotabilityType; }
public CreateOrderBase setMotabilityType(MotabilityType value) { this.MotabilityType = value; return this; }
public String getEstimatedHandoverDate() { return EstimatedHandoverDate; }
public CreateOrderBase setEstimatedHandoverDate(String value) { this.EstimatedHandoverDate = value; return this; }
}
public static enum Source
{
OnlineShowroom(1),
OneAdmin(2);
private final int value;
Source(final int intValue) { value = intValue; }
public int getValue() { return value; }
}
public static class Customer extends SalesforceCustomer
{
public UUID ProfileId = null;
public Preferences Preferences = null;
public UUID getProfileId() { return ProfileId; }
public Customer setProfileId(UUID value) { this.ProfileId = value; return this; }
public Preferences getPreferences() { return Preferences; }
public Customer setPreferences(Preferences value) { this.Preferences = value; return this; }
}
public static class SalesforceCustomer implements ICustomer
{
public String CustomerId = null;
public Boolean IsCiam = null;
public String CompanyName = null;
public String Title = null;
public String Firstname = null;
public String Surname = null;
public String EmailAddress = null;
public String Telephone = null;
public Address Address = null;
public CustomerMode Mode = null;
public String getCustomerId() { return CustomerId; }
public SalesforceCustomer setCustomerId(String value) { this.CustomerId = value; return this; }
public Boolean getIsCiam() { return IsCiam; }
public SalesforceCustomer setIsCiam(Boolean value) { this.IsCiam = value; return this; }
public String getCompanyName() { return CompanyName; }
public SalesforceCustomer setCompanyName(String value) { this.CompanyName = value; return this; }
public String getTitle() { return Title; }
public SalesforceCustomer setTitle(String value) { this.Title = value; return this; }
public String getFirstname() { return Firstname; }
public SalesforceCustomer setFirstname(String value) { this.Firstname = value; return this; }
public String getSurname() { return Surname; }
public SalesforceCustomer setSurname(String value) { this.Surname = value; return this; }
public String getEmailAddress() { return EmailAddress; }
public SalesforceCustomer setEmailAddress(String value) { this.EmailAddress = value; return this; }
public String getTelephone() { return Telephone; }
public SalesforceCustomer setTelephone(String value) { this.Telephone = value; return this; }
public Address getAddress() { return Address; }
public SalesforceCustomer setAddress(Address value) { this.Address = value; return this; }
public CustomerMode getMode() { return Mode; }
public SalesforceCustomer setMode(CustomerMode value) { this.Mode = value; return this; }
}
public static class Address
{
public String Property = null;
public String Street = null;
public String Town = null;
public String County = null;
public String Locality = null;
public String Postcode = null;
public String getProperty() { return Property; }
public Address setProperty(String value) { this.Property = value; return this; }
public String getStreet() { return Street; }
public Address setStreet(String value) { this.Street = value; return this; }
public String getTown() { return Town; }
public Address setTown(String value) { this.Town = value; return this; }
public String getCounty() { return County; }
public Address setCounty(String value) { this.County = value; return this; }
public String getLocality() { return Locality; }
public Address setLocality(String value) { this.Locality = value; return this; }
public String getPostcode() { return Postcode; }
public Address setPostcode(String value) { this.Postcode = value; return this; }
}
public static enum CustomerMode
{
Private(1),
Business(2),
Motability(3);
private final int value;
CustomerMode(final int intValue) { value = intValue; }
public int getValue() { return value; }
}
public static class Preferences
{
public Boolean OptinEmail = null;
public Boolean OptinPost = null;
public Boolean OptinSMS = null;
public Boolean OptinTelephone = null;
public Boolean isOptinEmail() { return OptinEmail; }
public Preferences setOptinEmail(Boolean value) { this.OptinEmail = value; return this; }
public Boolean isOptinPost() { return OptinPost; }
public Preferences setOptinPost(Boolean value) { this.OptinPost = value; return this; }
public Boolean isOptinSMS() { return OptinSMS; }
public Preferences setOptinSMS(Boolean value) { this.OptinSMS = value; return this; }
public Boolean isOptinTelephone() { return OptinTelephone; }
public Preferences setOptinTelephone(Boolean value) { this.OptinTelephone = value; return this; }
}
public static class Vehicle
{
public String Vin = null;
public String getVin() { return Vin; }
public Vehicle setVin(String value) { this.Vin = value; return this; }
}
public static class FinanceCriteria
{
public String Key = null;
public String Name = null;
public String Type = null;
public Boolean IsDefault = null;
public Term Term = null;
public Deposit Deposit = null;
public Mileage Mileage = null;
public AdvanceRentals AdvanceRentals = null;
public Boolean IsPersonalised = null;
public String RegularPayment = null;
public String PartExchange = null;
public String Settlement = null;
public String CustomerType = null;
public VehicleType VehicleType = null;
public String getKey() { return Key; }
public FinanceCriteria setKey(String value) { this.Key = value; return this; }
public String getName() { return Name; }
public FinanceCriteria setName(String value) { this.Name = value; return this; }
public String getType() { return Type; }
public FinanceCriteria setType(String value) { this.Type = value; return this; }
public Boolean getIsDefault() { return IsDefault; }
public FinanceCriteria setIsDefault(Boolean value) { this.IsDefault = value; return this; }
public Term getTerm() { return Term; }
public FinanceCriteria setTerm(Term value) { this.Term = value; return this; }
public Deposit getDeposit() { return Deposit; }
public FinanceCriteria setDeposit(Deposit value) { this.Deposit = value; return this; }
public Mileage getMileage() { return Mileage; }
public FinanceCriteria setMileage(Mileage value) { this.Mileage = value; return this; }
public AdvanceRentals getAdvanceRentals() { return AdvanceRentals; }
public FinanceCriteria setAdvanceRentals(AdvanceRentals value) { this.AdvanceRentals = value; return this; }
public Boolean getIsPersonalised() { return IsPersonalised; }
public FinanceCriteria setIsPersonalised(Boolean value) { this.IsPersonalised = value; return this; }
public String getRegularPayment() { return RegularPayment; }
public FinanceCriteria setRegularPayment(String value) { this.RegularPayment = value; return this; }
public String getPartExchange() { return PartExchange; }
public FinanceCriteria setPartExchange(String value) { this.PartExchange = value; return this; }
public String getSettlement() { return Settlement; }
public FinanceCriteria setSettlement(String value) { this.Settlement = value; return this; }
public String getCustomerType() { return CustomerType; }
public FinanceCriteria setCustomerType(String value) { this.CustomerType = value; return this; }
public VehicleType getVehicleType() { return VehicleType; }
public FinanceCriteria setVehicleType(VehicleType value) { this.VehicleType = value; return this; }
}
public static class Term
{
public ArrayList<Option> Options = new ArrayList<Option>();
public ArrayList<Option> getOptions() { return Options; }
public Term setOptions(ArrayList<Option> value) { this.Options = value; return this; }
}
public static class Option
{
public Boolean IsDefault = null;
public Integer Value = null;
public Boolean getIsDefault() { return IsDefault; }
public Option setIsDefault(Boolean value) { this.IsDefault = value; return this; }
public Integer getValue() { return Value; }
public Option setValue(Integer value) { this.Value = value; return this; }
}
public static class Deposit
{
public String Default = null;
public String getDefault() { return Default; }
public Deposit setDefault(String value) { this.Default = value; return this; }
}
public static class Mileage
{
public ArrayList<Option> Options = new ArrayList<Option>();
public ArrayList<Option> getOptions() { return Options; }
public Mileage setOptions(ArrayList<Option> value) { this.Options = value; return this; }
}
public static class AdvanceRentals
{
public ArrayList<Option> Options = new ArrayList<Option>();
public ArrayList<Option> getOptions() { return Options; }
public AdvanceRentals setOptions(ArrayList<Option> value) { this.Options = value; return this; }
}
public static enum VehicleType
{
Unassigned,
New,
Used;
}
public static class OutrightPurchase
{
public Boolean IsOutrightPurchase = null;
public String Reference = null;
public BigDecimal DiscountRate = null;
public String Bm7NST = null;
public Boolean IsBackOrder = null;
public Boolean IsCOPConverter = null;
public Boolean getIsOutrightPurchase() { return IsOutrightPurchase; }
public OutrightPurchase setIsOutrightPurchase(Boolean value) { this.IsOutrightPurchase = value; return this; }
public String getReference() { return Reference; }
public OutrightPurchase setReference(String value) { this.Reference = value; return this; }
public BigDecimal getDiscountRate() { return DiscountRate; }
public OutrightPurchase setDiscountRate(BigDecimal value) { this.DiscountRate = value; return this; }
public String getBm7NST() { return Bm7NST; }
public OutrightPurchase setBm7NST(String value) { this.Bm7NST = value; return this; }
public Boolean getIsBackOrder() { return IsBackOrder; }
public OutrightPurchase setIsBackOrder(Boolean value) { this.IsBackOrder = value; return this; }
public Boolean getIsCOPConverter() { return IsCOPConverter; }
public OutrightPurchase setIsCOPConverter(Boolean value) { this.IsCOPConverter = value; return this; }
}
public static enum MotabilityType
{
Pip(1),
Wpms(2),
Unassigned(3);
private final int value;
MotabilityType(final int intValue) { value = intValue; }
public int getValue() { return value; }
}
public static class GetPricingDetailsResponse
{
public Price Price = null;
public Price getPrice() { return Price; }
public GetPricingDetailsResponse setPrice(Price value) { this.Price = value; return this; }
}
public static class Price
{
public String Id = null;
public String Description = null;
public BigDecimal Net = null;
public BigDecimal VAT = null;
public BigDecimal Gross = null;
public OfferPriceProductType Product = null;
public String getId() { return Id; }
public Price setId(String value) { this.Id = value; return this; }
public String getDescription() { return Description; }
public Price setDescription(String value) { this.Description = value; return this; }
public BigDecimal getNet() { return Net; }
public Price setNet(BigDecimal value) { this.Net = value; return this; }
public BigDecimal getVat() { return VAT; }
public Price setVat(BigDecimal value) { this.VAT = value; return this; }
public BigDecimal getGross() { return Gross; }
public Price setGross(BigDecimal value) { this.Gross = value; return this; }
public OfferPriceProductType getProduct() { return Product; }
public Price setProduct(OfferPriceProductType value) { this.Product = value; return this; }
}
public static enum OfferPriceProductType
{
ListPrice,
NumberPlateFee,
DeliveryCharge,
FuelCharge,
ManufacturerOffer,
PersonalisedMoneyoffer,
PersonalisedNonmoneyoffer,
PersonalisedNonmoneyofferNeg,
Service,
ServiceNeg,
GovernmentGrant,
OutrightPurchaseDiscount,
VipOffer,
WallboxOffer,
WallboxOfferNeg,
RoadFundLicence,
FirstRegistrationFee,
NotFound,
AccessoryOffer,
AccessoryOfferNeg,
MotabilityDiscount;
}
}
Java GetPricingDetailsRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
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: text/jsv
Content-Type: text/jsv
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: text/jsv Content-Length: length { Price: { Id: String, Description: String, Net: 0, VAT: 0, Gross: 0, Product: LIST_PRICE } }