POST | /v1/oneAdmin/backorder | Creates a back order with vehicle criteria | Create Back Order (called from One Admin) It calls the v1/backorder in the Agency API, where the order is created The details of the back order are sent to OneAgent Validation checks are performed on the input request. |
---|
import java.math.*;
import java.util.*;
import java.io.InputStream;
import net.servicestack.client.*;
public class dtos
{
public static class CreateOneAdminBackOrderRequest extends CreateBackOrderBase implements IPost
{
}
public static class CreateBackOrderBase
{
public String GssnId = null;
public String AdditionalInformation = null;
public String ConfigCode = null;
public Source Source = null;
public String TagUrl = null;
public Customer Customer = null;
public Criteria CustomerCriteria = null;
public V2Criteria AgentCriteria = null;
public OutrightPurchase OutrightPurchase = null;
public String GasId = null;
public Boolean Motability = null;
public Integer MotabilityPricingId = null;
public Integer AssistanceProviderId = null;
public String AssistanceDetail = null;
public String ConfiguratorCode = null;
public String getGssnId() { return GssnId; }
public CreateBackOrderBase setGssnId(String value) { this.GssnId = value; return this; }
public String getAdditionalInformation() { return AdditionalInformation; }
public CreateBackOrderBase setAdditionalInformation(String value) { this.AdditionalInformation = value; return this; }
public String getConfigCode() { return ConfigCode; }
public CreateBackOrderBase setConfigCode(String value) { this.ConfigCode = value; return this; }
public Source getSource() { return Source; }
public CreateBackOrderBase setSource(Source value) { this.Source = value; return this; }
public String getTagUrl() { return TagUrl; }
public CreateBackOrderBase setTagUrl(String value) { this.TagUrl = value; return this; }
public Customer getCustomer() { return Customer; }
public CreateBackOrderBase setCustomer(Customer value) { this.Customer = value; return this; }
public Criteria getCustomerCriteria() { return CustomerCriteria; }
public CreateBackOrderBase setCustomerCriteria(Criteria value) { this.CustomerCriteria = value; return this; }
public V2Criteria getAgentCriteria() { return AgentCriteria; }
public CreateBackOrderBase setAgentCriteria(V2Criteria value) { this.AgentCriteria = value; return this; }
public OutrightPurchase getOutrightPurchase() { return OutrightPurchase; }
public CreateBackOrderBase setOutrightPurchase(OutrightPurchase value) { this.OutrightPurchase = value; return this; }
public String getGasId() { return GasId; }
public CreateBackOrderBase setGasId(String value) { this.GasId = value; return this; }
public Boolean isMotability() { return Motability; }
public CreateBackOrderBase setMotability(Boolean value) { this.Motability = value; return this; }
public Integer getMotabilityPricingId() { return MotabilityPricingId; }
public CreateBackOrderBase setMotabilityPricingId(Integer value) { this.MotabilityPricingId = value; return this; }
public Integer getAssistanceProviderId() { return AssistanceProviderId; }
public CreateBackOrderBase setAssistanceProviderId(Integer value) { this.AssistanceProviderId = value; return this; }
public String getAssistanceDetail() { return AssistanceDetail; }
public CreateBackOrderBase setAssistanceDetail(String value) { this.AssistanceDetail = value; return this; }
public String getConfiguratorCode() { return ConfiguratorCode; }
public CreateBackOrderBase setConfiguratorCode(String value) { this.ConfiguratorCode = 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 Criteria extends CriteriaBase
{
public ArrayList<String> Engine = new ArrayList<String>();
public ArrayList<String> getEngine() { return Engine; }
public Criteria setEngine(ArrayList<String> value) { this.Engine = value; return this; }
}
public static class CriteriaBase extends JsonVersion
{
public ArrayList<String> Transmission = new ArrayList<String>();
public ArrayList<String> Fuel = new ArrayList<String>();
public ArrayList<String> Upholstery = new ArrayList<String>();
public ArrayList<String> Equipment = new ArrayList<String>();
public ArrayList<String> Line = new ArrayList<String>();
public ArrayList<String> BodyStyle = new ArrayList<String>();
public ArrayList<String> ColourGroup = new ArrayList<String>();
public ArrayList<String> Packages = new ArrayList<String>();
public ArrayList<CriteriaModel> Model = new ArrayList<CriteriaModel>();
public String UrlReferrer = null;
public String PreferredDeliveryDate = null;
@ApiMember(ExcludeInSchema=true)
public Boolean IsNewModel = null;
@ApiMember(ExcludeInSchema=true)
public Boolean IsSmart = null;
@ApiMember(ExcludeInSchema=true)
public Boolean IsSpecialised = null;
@ApiMember(ExcludeInSchema=true)
public CriteriaDifference CriteriaDifference = null;
public ArrayList<String> getTransmission() { return Transmission; }
public CriteriaBase setTransmission(ArrayList<String> value) { this.Transmission = value; return this; }
public ArrayList<String> getFuel() { return Fuel; }
public CriteriaBase setFuel(ArrayList<String> value) { this.Fuel = value; return this; }
public ArrayList<String> getUpholstery() { return Upholstery; }
public CriteriaBase setUpholstery(ArrayList<String> value) { this.Upholstery = value; return this; }
public ArrayList<String> getEquipment() { return Equipment; }
public CriteriaBase setEquipment(ArrayList<String> value) { this.Equipment = value; return this; }
public ArrayList<String> getLine() { return Line; }
public CriteriaBase setLine(ArrayList<String> value) { this.Line = value; return this; }
public ArrayList<String> getBodyStyle() { return BodyStyle; }
public CriteriaBase setBodyStyle(ArrayList<String> value) { this.BodyStyle = value; return this; }
public ArrayList<String> getColourGroup() { return ColourGroup; }
public CriteriaBase setColourGroup(ArrayList<String> value) { this.ColourGroup = value; return this; }
public ArrayList<String> getPackages() { return Packages; }
public CriteriaBase setPackages(ArrayList<String> value) { this.Packages = value; return this; }
public ArrayList<CriteriaModel> getModel() { return Model; }
public CriteriaBase setModel(ArrayList<CriteriaModel> value) { this.Model = value; return this; }
public String getUrlReferrer() { return UrlReferrer; }
public CriteriaBase setUrlReferrer(String value) { this.UrlReferrer = value; return this; }
public String getPreferredDeliveryDate() { return PreferredDeliveryDate; }
public CriteriaBase setPreferredDeliveryDate(String value) { this.PreferredDeliveryDate = value; return this; }
public Boolean getIsNewModel() { return IsNewModel; }
public CriteriaBase setIsNewModel(Boolean value) { this.IsNewModel = value; return this; }
public Boolean getIsSmart() { return IsSmart; }
public CriteriaBase setIsSmart(Boolean value) { this.IsSmart = value; return this; }
public Boolean getIsSpecialised() { return IsSpecialised; }
public CriteriaBase setIsSpecialised(Boolean value) { this.IsSpecialised = value; return this; }
public CriteriaDifference getCriteriaDifference() { return CriteriaDifference; }
public CriteriaBase setCriteriaDifference(CriteriaDifference value) { this.CriteriaDifference = value; return this; }
}
public static class JsonVersion implements IJsonVersion
{
public Integer Version = null;
public Integer getVersion() { return Version; }
public JsonVersion setVersion(Integer value) { this.Version = value; return this; }
}
public static class CriteriaModel
{
public String Description = null;
public Integer Id = null;
public String getDescription() { return Description; }
public CriteriaModel setDescription(String value) { this.Description = value; return this; }
public Integer getId() { return Id; }
public CriteriaModel setId(Integer value) { this.Id = value; return this; }
}
public static class CriteriaDifference
{
public Boolean Model = null;
public Boolean Transmission = null;
public Boolean Fuel = null;
public Boolean Upholstery = null;
public Boolean Equipment = null;
public Boolean Line = null;
public Boolean BodyStyle = null;
public Boolean ColourGroup = null;
public Boolean Packages = null;
public Boolean Engine = null;
public Boolean AdditionalInformation = null;
public Boolean UrlReferrer = null;
public Boolean PreferredDeliveryDate = null;
public Boolean IsSmart = null;
public Boolean IsSpecialised = null;
public Boolean isModel() { return Model; }
public CriteriaDifference setModel(Boolean value) { this.Model = value; return this; }
public Boolean isTransmission() { return Transmission; }
public CriteriaDifference setTransmission(Boolean value) { this.Transmission = value; return this; }
public Boolean isFuel() { return Fuel; }
public CriteriaDifference setFuel(Boolean value) { this.Fuel = value; return this; }
public Boolean isUpholstery() { return Upholstery; }
public CriteriaDifference setUpholstery(Boolean value) { this.Upholstery = value; return this; }
public Boolean isEquipment() { return Equipment; }
public CriteriaDifference setEquipment(Boolean value) { this.Equipment = value; return this; }
public Boolean isLine() { return Line; }
public CriteriaDifference setLine(Boolean value) { this.Line = value; return this; }
public Boolean isBodyStyle() { return BodyStyle; }
public CriteriaDifference setBodyStyle(Boolean value) { this.BodyStyle = value; return this; }
public Boolean isColourGroup() { return ColourGroup; }
public CriteriaDifference setColourGroup(Boolean value) { this.ColourGroup = value; return this; }
public Boolean isPackages() { return Packages; }
public CriteriaDifference setPackages(Boolean value) { this.Packages = value; return this; }
public Boolean isEngine() { return Engine; }
public CriteriaDifference setEngine(Boolean value) { this.Engine = value; return this; }
public Boolean isAdditionalInformation() { return AdditionalInformation; }
public CriteriaDifference setAdditionalInformation(Boolean value) { this.AdditionalInformation = value; return this; }
public Boolean isUrlReferrer() { return UrlReferrer; }
public CriteriaDifference setUrlReferrer(Boolean value) { this.UrlReferrer = value; return this; }
public Boolean isPreferredDeliveryDate() { return PreferredDeliveryDate; }
public CriteriaDifference setPreferredDeliveryDate(Boolean value) { this.PreferredDeliveryDate = value; return this; }
public Boolean getIsSmart() { return IsSmart; }
public CriteriaDifference setIsSmart(Boolean value) { this.IsSmart = value; return this; }
public Boolean getIsSpecialised() { return IsSpecialised; }
public CriteriaDifference setIsSpecialised(Boolean value) { this.IsSpecialised = value; return this; }
}
public static class V2Criteria extends CriteriaBase
{
public ArrayList<V2EngineCriteria> Engine = new ArrayList<V2EngineCriteria>();
public ArrayList<V2EngineCriteria> getEngine() { return Engine; }
public V2Criteria setEngine(ArrayList<V2EngineCriteria> value) { this.Engine = value; return this; }
}
public static class V2EngineCriteria
{
public String Badge = null;
public String Brand = null;
public String getBadge() { return Badge; }
public V2EngineCriteria setBadge(String value) { this.Badge = value; return this; }
public String getBrand() { return Brand; }
public V2EngineCriteria setBrand(String value) { this.Brand = 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 CreateBackOrderResponse
{
public String Guid = null;
public String Reference = null;
public String getGuid() { return Guid; }
public CreateBackOrderResponse setGuid(String value) { this.Guid = value; return this; }
public String getReference() { return Reference; }
public CreateBackOrderResponse setReference(String value) { this.Reference = value; return this; }
}
}
Java CreateOneAdminBackOrderRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .other suffix or ?format=other
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /v1/oneAdmin/backorder HTTP/1.1
Host: prod-api-agency-orch-mb-dhc.rapp-customers.co.uk
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length
{"GssnId":"String","AdditionalInformation":"String","ConfigCode":"String","Source":"OnlineShowroom","TagUrl":"String","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"},"CustomerCriteria":{"Engine":["String"],"Transmission":["String"],"Fuel":["String"],"Upholstery":["String"],"Equipment":["String"],"Line":["String"],"BodyStyle":["String"],"ColourGroup":["String"],"Packages":["String"],"Model":[{"Description":"String","Id":0}],"UrlReferrer":"String","PreferredDeliveryDate":"String","IsNewModel":false,"IsSmart":false,"IsSpecialised":false,"CriteriaDifference":{"Model":false,"Transmission":false,"Fuel":false,"Upholstery":false,"Equipment":false,"Line":false,"BodyStyle":false,"ColourGroup":false,"Packages":false,"Engine":false,"AdditionalInformation":false,"UrlReferrer":false,"PreferredDeliveryDate":false,"IsSmart":false,"IsSpecialised":false},"Version":0},"AgentCriteria":{"Engine":[{"Badge":"String","Brand":"String"}],"Transmission":["String"],"Fuel":["String"],"Upholstery":["String"],"Equipment":["String"],"Line":["String"],"BodyStyle":["String"],"ColourGroup":["String"],"Packages":["String"],"Model":[{"Description":"String","Id":0}],"UrlReferrer":"String","PreferredDeliveryDate":"String","IsNewModel":false,"IsSmart":false,"IsSpecialised":false,"CriteriaDifference":{"Model":false,"Transmission":false,"Fuel":false,"Upholstery":false,"Equipment":false,"Line":false,"BodyStyle":false,"ColourGroup":false,"Packages":false,"Engine":false,"AdditionalInformation":false,"UrlReferrer":false,"PreferredDeliveryDate":false,"IsSmart":false,"IsSpecialised":false},"Version":0},"OutrightPurchase":{"IsOutrightPurchase":false,"Reference":"String","DiscountRate":0,"Bm7NST":"String","IsBackOrder":false,"IsCOPConverter":false},"GasId":"String","Motability":false,"MotabilityPricingId":0,"AssistanceProviderId":0,"AssistanceDetail":"String","ConfiguratorCode":"String"}
HTTP/1.1 200 OK Content-Type: text/jsonl Content-Length: length {"Guid":"String","Reference":"String"}