POST | /v1/inflightpricing | Inflight Pricing for supplied Order Guids |
---|
import java.math.*;
import java.util.*;
import java.io.InputStream;
import net.servicestack.client.*;
public class dtos
{
@ApiResponse(Description="In Flight pricing generated", StatusCode=200)
public static class InflightPricingRequest extends InflightPricingOrderRequest implements IPost
{
}
public static class InflightPricingOrderRequest
{
public ArrayList<String> InvalidFormatGuids = new ArrayList<String>();
public ArrayList<UUID> OrderNotFoundGuids = new ArrayList<UUID>();
public ArrayList<InflightPricingOrder> InflightPricingOrders = new ArrayList<InflightPricingOrder>();
public Boolean IsMotability = null;
public ArrayList<String> getInvalidFormatGuids() { return InvalidFormatGuids; }
public InflightPricingOrderRequest setInvalidFormatGuids(ArrayList<String> value) { this.InvalidFormatGuids = value; return this; }
public ArrayList<UUID> getOrderNotFoundGuids() { return OrderNotFoundGuids; }
public InflightPricingOrderRequest setOrderNotFoundGuids(ArrayList<UUID> value) { this.OrderNotFoundGuids = value; return this; }
public ArrayList<InflightPricingOrder> getInflightPricingOrders() { return InflightPricingOrders; }
public InflightPricingOrderRequest setInflightPricingOrders(ArrayList<InflightPricingOrder> value) { this.InflightPricingOrders = value; return this; }
public Boolean getIsMotability() { return IsMotability; }
public InflightPricingOrderRequest setIsMotability(Boolean value) { this.IsMotability = value; return this; }
}
public static class InflightPricingOrder
{
public UUID Guid = null;
public String Vin = null;
public Integer AdvanceRentalPaymentType = null;
public ArrayList<OrderOffer> Offer = new ArrayList<OrderOffer>();
public OutrightPurchase OutrightPurchase = null;
public MotabilityAdvancePayment MotabilityAdvancePayment = null;
public UUID getGuid() { return Guid; }
public InflightPricingOrder setGuid(UUID value) { this.Guid = value; return this; }
public String getVin() { return Vin; }
public InflightPricingOrder setVin(String value) { this.Vin = value; return this; }
public Integer getAdvanceRentalPaymentType() { return AdvanceRentalPaymentType; }
public InflightPricingOrder setAdvanceRentalPaymentType(Integer value) { this.AdvanceRentalPaymentType = value; return this; }
public ArrayList<OrderOffer> getOffer() { return Offer; }
public InflightPricingOrder setOffer(ArrayList<OrderOffer> value) { this.Offer = value; return this; }
public OutrightPurchase getOutrightPurchase() { return OutrightPurchase; }
public InflightPricingOrder setOutrightPurchase(OutrightPurchase value) { this.OutrightPurchase = value; return this; }
public MotabilityAdvancePayment getMotabilityAdvancePayment() { return MotabilityAdvancePayment; }
public InflightPricingOrder setMotabilityAdvancePayment(MotabilityAdvancePayment value) { this.MotabilityAdvancePayment = value; return this; }
}
public static class OrderOffer
{
public Integer Id = null;
public Integer OfferTypeId = null;
public String OfferTypeDescription = null;
public String OfferId = null;
public String OfferDescription = null;
public BigDecimal Net = null;
public BigDecimal VAT = null;
public BigDecimal Gross = null;
public Boolean GovernmentGrant = null;
public String PromoCode = null;
public String Expiry = null;
public Boolean AffectsPrice = null;
public Integer Product = null;
public String ParentId = null;
public Date CreationDate = null;
public String ProductTypeDescription = null;
public String ProductTypeNegativeDescription = null;
public Boolean CertificateRequired = null;
public Integer getId() { return Id; }
public OrderOffer setId(Integer value) { this.Id = value; return this; }
public Integer getOfferTypeId() { return OfferTypeId; }
public OrderOffer setOfferTypeId(Integer value) { this.OfferTypeId = value; return this; }
public String getOfferTypeDescription() { return OfferTypeDescription; }
public OrderOffer setOfferTypeDescription(String value) { this.OfferTypeDescription = value; return this; }
public String getOfferId() { return OfferId; }
public OrderOffer setOfferId(String value) { this.OfferId = value; return this; }
public String getOfferDescription() { return OfferDescription; }
public OrderOffer setOfferDescription(String value) { this.OfferDescription = value; return this; }
public BigDecimal getNet() { return Net; }
public OrderOffer setNet(BigDecimal value) { this.Net = value; return this; }
public BigDecimal getVat() { return VAT; }
public OrderOffer setVat(BigDecimal value) { this.VAT = value; return this; }
public BigDecimal getGross() { return Gross; }
public OrderOffer setGross(BigDecimal value) { this.Gross = value; return this; }
public Boolean isGovernmentGrant() { return GovernmentGrant; }
public OrderOffer setGovernmentGrant(Boolean value) { this.GovernmentGrant = value; return this; }
public String getPromoCode() { return PromoCode; }
public OrderOffer setPromoCode(String value) { this.PromoCode = value; return this; }
public String getExpiry() { return Expiry; }
public OrderOffer setExpiry(String value) { this.Expiry = value; return this; }
public Boolean isAffectsPrice() { return AffectsPrice; }
public OrderOffer setAffectsPrice(Boolean value) { this.AffectsPrice = value; return this; }
public Integer getProduct() { return Product; }
public OrderOffer setProduct(Integer value) { this.Product = value; return this; }
public String getParentId() { return ParentId; }
public OrderOffer setParentId(String value) { this.ParentId = value; return this; }
public Date getCreationDate() { return CreationDate; }
public OrderOffer setCreationDate(Date value) { this.CreationDate = value; return this; }
public String getProductTypeDescription() { return ProductTypeDescription; }
public OrderOffer setProductTypeDescription(String value) { this.ProductTypeDescription = value; return this; }
public String getProductTypeNegativeDescription() { return ProductTypeNegativeDescription; }
public OrderOffer setProductTypeNegativeDescription(String value) { this.ProductTypeNegativeDescription = value; return this; }
public Boolean isCertificateRequired() { return CertificateRequired; }
public OrderOffer setCertificateRequired(Boolean value) { this.CertificateRequired = value; return this; }
}
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 class MotabilityAdvancePayment
{
public String AdvancePaymentRentalType = null;
public BigDecimal AdvancePaymentValueGross = null;
public BigDecimal AdvancePaymentValueVAT = null;
public BigDecimal AdvancePaymentValueNet = null;
public String getAdvancePaymentRentalType() { return AdvancePaymentRentalType; }
public MotabilityAdvancePayment setAdvancePaymentRentalType(String value) { this.AdvancePaymentRentalType = value; return this; }
public BigDecimal getAdvancePaymentValueGross() { return AdvancePaymentValueGross; }
public MotabilityAdvancePayment setAdvancePaymentValueGross(BigDecimal value) { this.AdvancePaymentValueGross = value; return this; }
public BigDecimal getAdvancePaymentValueVAT() { return AdvancePaymentValueVAT; }
public MotabilityAdvancePayment setAdvancePaymentValueVAT(BigDecimal value) { this.AdvancePaymentValueVAT = value; return this; }
public BigDecimal getAdvancePaymentValueNet() { return AdvancePaymentValueNet; }
public MotabilityAdvancePayment setAdvancePaymentValueNet(BigDecimal value) { this.AdvancePaymentValueNet = value; return this; }
}
public static class InflightPricingResponse
{
public ArrayList<VehicleInflightPrice> VehiclesInflightPrices = new ArrayList<VehicleInflightPrice>();
public ArrayList<VehicleInflightPrice> getVehiclesInflightPrices() { return VehiclesInflightPrices; }
public InflightPricingResponse setVehiclesInflightPrices(ArrayList<VehicleInflightPrice> value) { this.VehiclesInflightPrices = value; return this; }
}
public static class VehicleInflightPrice
{
public String Guid = null;
public String Status = null;
public Boolean Success = null;
public ArrayList<SalesforcePrice> Prices = new ArrayList<SalesforcePrice>();
public SalesforceTotalPrice TotalOTRFees = null;
public SalesforceTotalPrice TotalOTRPrice = null;
public SalesforceTotalPrice TotalActualPrice = null;
public SalesforceOffers Offers = null;
public SalesforceOutrightPurchase OutrightPurchase = null;
public MotabilityAdvancePayment Motability = null;
public String getGuid() { return Guid; }
public VehicleInflightPrice setGuid(String value) { this.Guid = value; return this; }
public String getStatus() { return Status; }
public VehicleInflightPrice setStatus(String value) { this.Status = value; return this; }
public Boolean isSuccess() { return Success; }
public VehicleInflightPrice setSuccess(Boolean value) { this.Success = value; return this; }
public ArrayList<SalesforcePrice> getPrices() { return Prices; }
public VehicleInflightPrice setPrices(ArrayList<SalesforcePrice> value) { this.Prices = value; return this; }
public SalesforceTotalPrice getTotalOTRFees() { return TotalOTRFees; }
public VehicleInflightPrice setTotalOTRFees(SalesforceTotalPrice value) { this.TotalOTRFees = value; return this; }
public SalesforceTotalPrice getTotalOTRPrice() { return TotalOTRPrice; }
public VehicleInflightPrice setTotalOTRPrice(SalesforceTotalPrice value) { this.TotalOTRPrice = value; return this; }
public SalesforceTotalPrice getTotalActualPrice() { return TotalActualPrice; }
public VehicleInflightPrice setTotalActualPrice(SalesforceTotalPrice value) { this.TotalActualPrice = value; return this; }
public SalesforceOffers getOffers() { return Offers; }
public VehicleInflightPrice setOffers(SalesforceOffers value) { this.Offers = value; return this; }
public SalesforceOutrightPurchase getOutrightPurchase() { return OutrightPurchase; }
public VehicleInflightPrice setOutrightPurchase(SalesforceOutrightPurchase value) { this.OutrightPurchase = value; return this; }
public MotabilityAdvancePayment getMotability() { return Motability; }
public VehicleInflightPrice setMotability(MotabilityAdvancePayment value) { this.Motability = value; return this; }
}
public static class SalesforcePrice
{
public String Id = null;
public String Description = null;
public BigDecimal Net = null;
public BigDecimal VAT = null;
public BigDecimal Gross = null;
public String Product = null;
public String getId() { return Id; }
public SalesforcePrice setId(String value) { this.Id = value; return this; }
public String getDescription() { return Description; }
public SalesforcePrice setDescription(String value) { this.Description = value; return this; }
public BigDecimal getNet() { return Net; }
public SalesforcePrice setNet(BigDecimal value) { this.Net = value; return this; }
public BigDecimal getVat() { return VAT; }
public SalesforcePrice setVat(BigDecimal value) { this.VAT = value; return this; }
public BigDecimal getGross() { return Gross; }
public SalesforcePrice setGross(BigDecimal value) { this.Gross = value; return this; }
public String getProduct() { return Product; }
public SalesforcePrice setProduct(String value) { this.Product = value; return this; }
}
public static class SalesforceTotalPrice
{
public BigDecimal Net = null;
public BigDecimal VAT = null;
public BigDecimal Gross = null;
public BigDecimal getNet() { return Net; }
public SalesforceTotalPrice setNet(BigDecimal value) { this.Net = value; return this; }
public BigDecimal getVat() { return VAT; }
public SalesforceTotalPrice setVat(BigDecimal value) { this.VAT = value; return this; }
public BigDecimal getGross() { return Gross; }
public SalesforceTotalPrice setGross(BigDecimal value) { this.Gross = value; return this; }
}
public static class SalesforceOffers
{
public ArrayList<SalesforceOffer> Personalised = new ArrayList<SalesforceOffer>();
public ArrayList<SalesforceOffer> NonDiscretionary = new ArrayList<SalesforceOffer>();
public ArrayList<SalesforceOffer> NonCampaign = new ArrayList<SalesforceOffer>();
public ArrayList<SalesforceOffer> OutrightPurchaseDiscount = new ArrayList<SalesforceOffer>();
public ArrayList<SalesforceOffer> MotabilityDiscount = new ArrayList<SalesforceOffer>();
public ArrayList<SalesforceOffer> IntegratedProducts = new ArrayList<SalesforceOffer>();
public ArrayList<SalesforceOffer> getPersonalised() { return Personalised; }
public SalesforceOffers setPersonalised(ArrayList<SalesforceOffer> value) { this.Personalised = value; return this; }
public ArrayList<SalesforceOffer> getNonDiscretionary() { return NonDiscretionary; }
public SalesforceOffers setNonDiscretionary(ArrayList<SalesforceOffer> value) { this.NonDiscretionary = value; return this; }
public ArrayList<SalesforceOffer> getNonCampaign() { return NonCampaign; }
public SalesforceOffers setNonCampaign(ArrayList<SalesforceOffer> value) { this.NonCampaign = value; return this; }
public ArrayList<SalesforceOffer> getOutrightPurchaseDiscount() { return OutrightPurchaseDiscount; }
public SalesforceOffers setOutrightPurchaseDiscount(ArrayList<SalesforceOffer> value) { this.OutrightPurchaseDiscount = value; return this; }
public ArrayList<SalesforceOffer> getMotabilityDiscount() { return MotabilityDiscount; }
public SalesforceOffers setMotabilityDiscount(ArrayList<SalesforceOffer> value) { this.MotabilityDiscount = value; return this; }
public ArrayList<SalesforceOffer> getIntegratedProducts() { return IntegratedProducts; }
public SalesforceOffers setIntegratedProducts(ArrayList<SalesforceOffer> value) { this.IntegratedProducts = value; return this; }
}
public static class SalesforceOffer
{
public String Id = null;
public String Description = null;
public BigDecimal Net = null;
public BigDecimal VAT = null;
public BigDecimal Gross = null;
public String Expiry = null;
public String Product = null;
public Boolean RequiresCertification = null;
public String getId() { return Id; }
public SalesforceOffer setId(String value) { this.Id = value; return this; }
public String getDescription() { return Description; }
public SalesforceOffer setDescription(String value) { this.Description = value; return this; }
public BigDecimal getNet() { return Net; }
public SalesforceOffer setNet(BigDecimal value) { this.Net = value; return this; }
public BigDecimal getVat() { return VAT; }
public SalesforceOffer setVat(BigDecimal value) { this.VAT = value; return this; }
public BigDecimal getGross() { return Gross; }
public SalesforceOffer setGross(BigDecimal value) { this.Gross = value; return this; }
public String getExpiry() { return Expiry; }
public SalesforceOffer setExpiry(String value) { this.Expiry = value; return this; }
public String getProduct() { return Product; }
public SalesforceOffer setProduct(String value) { this.Product = value; return this; }
public Boolean isRequiresCertification() { return RequiresCertification; }
public SalesforceOffer setRequiresCertification(Boolean value) { this.RequiresCertification = value; return this; }
}
public static class SalesforceOutrightPurchase
{
public Boolean IsOutrightPurchase = null;
public String Reference = null;
public BigDecimal DiscountPercentage = null;
public String ModelId = null;
public Boolean getIsOutrightPurchase() { return IsOutrightPurchase; }
public SalesforceOutrightPurchase setIsOutrightPurchase(Boolean value) { this.IsOutrightPurchase = value; return this; }
public String getReference() { return Reference; }
public SalesforceOutrightPurchase setReference(String value) { this.Reference = value; return this; }
public BigDecimal getDiscountPercentage() { return DiscountPercentage; }
public SalesforceOutrightPurchase setDiscountPercentage(BigDecimal value) { this.DiscountPercentage = value; return this; }
public String getModelId() { return ModelId; }
public SalesforceOutrightPurchase setModelId(String value) { this.ModelId = value; return this; }
}
}
Java InflightPricingRequest 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/inflightpricing HTTP/1.1
Host: prod-api-agency-orch-mb-dhc.rapp-customers.co.uk
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
InvalidFormatGuids:
[
String
],
OrderNotFoundGuids:
[
00000000000000000000000000000000
],
InflightPricingOrders:
[
{
Guid: 00000000000000000000000000000000,
Vin: String,
AdvanceRentalPaymentType: 0,
Offer:
[
{
Id: 0,
OfferTypeId: 0,
OfferTypeDescription: String,
OfferId: String,
OfferDescription: String,
Net: 0,
VAT: 0,
Gross: 0,
GovernmentGrant: False,
PromoCode: String,
Expiry: String,
AffectsPrice: False,
Product: 0,
ParentId: String,
CreationDate: 0001-01-01,
ProductTypeDescription: String,
ProductTypeNegativeDescription: String,
CertificateRequired: False
}
],
OutrightPurchase:
{
IsOutrightPurchase: False,
Reference: String,
DiscountRate: 0,
Bm7NST: String,
IsBackOrder: False,
IsCOPConverter: False
},
MotabilityAdvancePayment:
{
AdvancePaymentRentalType: String,
AdvancePaymentValueGross: 0,
AdvancePaymentValueVAT: 0,
AdvancePaymentValueNet: 0
}
}
],
IsMotability: False
}
HTTP/1.1 200 OK Content-Type: text/jsv Content-Length: length { VehiclesInflightPrices: [ { Guid: String, Status: String, Success: False, Prices: [ { Id: String, Description: String, Net: 0, VAT: 0, Gross: 0, Product: String } ], TotalOTRFees: { Net: 0, VAT: 0, Gross: 0 }, TotalOTRPrice: { Net: 0, VAT: 0, Gross: 0 }, TotalActualPrice: { Net: 0, VAT: 0, Gross: 0 }, Offers: { Personalised: [ { Id: String, Description: String, Net: 0, VAT: 0, Gross: 0, Expiry: String, Product: String, RequiresCertification: False } ], NonDiscretionary: [ { Id: String, Description: String, Net: 0, VAT: 0, Gross: 0, Expiry: String, Product: String, RequiresCertification: False } ], NonCampaign: [ { Id: String, Description: String, Net: 0, VAT: 0, Gross: 0, Expiry: String, Product: String, RequiresCertification: False } ], OutrightPurchaseDiscount: [ { Id: String, Description: String, Net: 0, VAT: 0, Gross: 0, Expiry: String, Product: String, RequiresCertification: False } ], MotabilityDiscount: [ { Id: String, Description: String, Net: 0, VAT: 0, Gross: 0, Expiry: String, Product: String, RequiresCertification: False } ], IntegratedProducts: [ { Id: String, Description: String, Net: 0, VAT: 0, Gross: 0, Expiry: String, Product: String, RequiresCertification: False } ] }, OutrightPurchase: { IsOutrightPurchase: False, Reference: String, DiscountPercentage: 0, ModelId: String }, Motability: { AdvancePaymentRentalType: String, AdvancePaymentValueGross: 0, AdvancePaymentValueVAT: 0, AdvancePaymentValueNet: 0 } } ] }