| Required role: | Business |
| PUT | /admessage/update |
|---|
import java.math.*;
import java.util.*;
import java.io.InputStream;
import net.servicestack.client.*;
public class BusinessApi
{
public static class AdMessageDetailsUnion
{
public AdMessageDetailsPercentageDiscountOnAllMerchandise percentageOnAllMerchandise = null;
public AdMessageDetailsPercentageDiscountRangeOnAllMerchandise percentageRangeOnAllMerchandise = null;
public AdMessageDetailsPercentageDiscountOnSelectedMerchandise percentageOnSelectedMerchandise = null;
public AdMessageDetailsAbsoluteDiscountOnSelectedMerchandise absoluteOnSelectedMerchandise = null;
public AdMessageDetailsAbsoluteDiscountRangeOnAllMerchandise absoluteRangeOnAllMerchandise = null;
public AdMessageDetailsTotalAmountOverXgivesYdiscount totalAmountOverXgivesYdiscount = null;
public AdMessageDetailsXforYdiscount xforY = null;
public AdMessageDetailsNewArrivals newArrivals = null;
public AdMessageDetailsFreetext freetext = null;
public AdMessageDetailsTodaysBreakFastOffer todaysBreakFastOffer = null;
public AdMessageDetailsTodaysLunchOffer todaysLunchOffer = null;
public AdMessageDetailsTodaysDinnerOffer todaysDinnerOffer = null;
public AdMessageDetailsSaveFoodAndMoney saveFoodAndMoney = null;
public AdMessageDetailsPercentageOffYourFoodBill percentageOfYourFoodBill = null;
public AdMessageDetailsHappyHour happyHour = null;
public AdMessageDetailsSomeFreeTablesLeftToday someFreeTablesLeftToday = null;
public AdMessageDetailsTwoDishesForThePriceOfOne twoDishesForThePriceOfOne = null;
public AdMessageDetailsPercentageDiscountOnAllMerchandise getPercentageOnAllMerchandise() { return percentageOnAllMerchandise; }
public AdMessageDetailsUnion setPercentageOnAllMerchandise(AdMessageDetailsPercentageDiscountOnAllMerchandise value) { this.percentageOnAllMerchandise = value; return this; }
public AdMessageDetailsPercentageDiscountRangeOnAllMerchandise getPercentageRangeOnAllMerchandise() { return percentageRangeOnAllMerchandise; }
public AdMessageDetailsUnion setPercentageRangeOnAllMerchandise(AdMessageDetailsPercentageDiscountRangeOnAllMerchandise value) { this.percentageRangeOnAllMerchandise = value; return this; }
public AdMessageDetailsPercentageDiscountOnSelectedMerchandise getPercentageOnSelectedMerchandise() { return percentageOnSelectedMerchandise; }
public AdMessageDetailsUnion setPercentageOnSelectedMerchandise(AdMessageDetailsPercentageDiscountOnSelectedMerchandise value) { this.percentageOnSelectedMerchandise = value; return this; }
public AdMessageDetailsAbsoluteDiscountOnSelectedMerchandise getAbsoluteOnSelectedMerchandise() { return absoluteOnSelectedMerchandise; }
public AdMessageDetailsUnion setAbsoluteOnSelectedMerchandise(AdMessageDetailsAbsoluteDiscountOnSelectedMerchandise value) { this.absoluteOnSelectedMerchandise = value; return this; }
public AdMessageDetailsAbsoluteDiscountRangeOnAllMerchandise getAbsoluteRangeOnAllMerchandise() { return absoluteRangeOnAllMerchandise; }
public AdMessageDetailsUnion setAbsoluteRangeOnAllMerchandise(AdMessageDetailsAbsoluteDiscountRangeOnAllMerchandise value) { this.absoluteRangeOnAllMerchandise = value; return this; }
public AdMessageDetailsTotalAmountOverXgivesYdiscount getTotalAmountOverXgivesYdiscount() { return totalAmountOverXgivesYdiscount; }
public AdMessageDetailsUnion setTotalAmountOverXgivesYdiscount(AdMessageDetailsTotalAmountOverXgivesYdiscount value) { this.totalAmountOverXgivesYdiscount = value; return this; }
public AdMessageDetailsXforYdiscount getXforY() { return xforY; }
public AdMessageDetailsUnion setXforY(AdMessageDetailsXforYdiscount value) { this.xforY = value; return this; }
public AdMessageDetailsNewArrivals getNewArrivals() { return newArrivals; }
public AdMessageDetailsUnion setNewArrivals(AdMessageDetailsNewArrivals value) { this.newArrivals = value; return this; }
public AdMessageDetailsFreetext getFreetext() { return freetext; }
public AdMessageDetailsUnion setFreetext(AdMessageDetailsFreetext value) { this.freetext = value; return this; }
public AdMessageDetailsTodaysBreakFastOffer getTodaysBreakFastOffer() { return todaysBreakFastOffer; }
public AdMessageDetailsUnion setTodaysBreakFastOffer(AdMessageDetailsTodaysBreakFastOffer value) { this.todaysBreakFastOffer = value; return this; }
public AdMessageDetailsTodaysLunchOffer getTodaysLunchOffer() { return todaysLunchOffer; }
public AdMessageDetailsUnion setTodaysLunchOffer(AdMessageDetailsTodaysLunchOffer value) { this.todaysLunchOffer = value; return this; }
public AdMessageDetailsTodaysDinnerOffer getTodaysDinnerOffer() { return todaysDinnerOffer; }
public AdMessageDetailsUnion setTodaysDinnerOffer(AdMessageDetailsTodaysDinnerOffer value) { this.todaysDinnerOffer = value; return this; }
public AdMessageDetailsSaveFoodAndMoney getSaveFoodAndMoney() { return saveFoodAndMoney; }
public AdMessageDetailsUnion setSaveFoodAndMoney(AdMessageDetailsSaveFoodAndMoney value) { this.saveFoodAndMoney = value; return this; }
public AdMessageDetailsPercentageOffYourFoodBill getPercentageOfYourFoodBill() { return percentageOfYourFoodBill; }
public AdMessageDetailsUnion setPercentageOfYourFoodBill(AdMessageDetailsPercentageOffYourFoodBill value) { this.percentageOfYourFoodBill = value; return this; }
public AdMessageDetailsHappyHour getHappyHour() { return happyHour; }
public AdMessageDetailsUnion setHappyHour(AdMessageDetailsHappyHour value) { this.happyHour = value; return this; }
public AdMessageDetailsSomeFreeTablesLeftToday getSomeFreeTablesLeftToday() { return someFreeTablesLeftToday; }
public AdMessageDetailsUnion setSomeFreeTablesLeftToday(AdMessageDetailsSomeFreeTablesLeftToday value) { this.someFreeTablesLeftToday = value; return this; }
public AdMessageDetailsTwoDishesForThePriceOfOne getTwoDishesForThePriceOfOne() { return twoDishesForThePriceOfOne; }
public AdMessageDetailsUnion setTwoDishesForThePriceOfOne(AdMessageDetailsTwoDishesForThePriceOfOne value) { this.twoDishesForThePriceOfOne = value; return this; }
}
public static class AdMessageDetailsPercentageDiscountOnAllMerchandise extends AdMessageDetailsBase
{
public Double value = null;
public Double getValue() { return value; }
public AdMessageDetailsPercentageDiscountOnAllMerchandise setValue(Double value) { this.value = value; return this; }
}
public static class AdMessageDetailsBase
{
public String description = null;
public ArrayList<String> moreInformation = new ArrayList<String>();
public String getDescription() { return description; }
public AdMessageDetailsBase setDescription(String value) { this.description = value; return this; }
public ArrayList<String> getMoreInformation() { return moreInformation; }
public AdMessageDetailsBase setMoreInformation(ArrayList<String> value) { this.moreInformation = value; return this; }
}
public static class AdMessageDetailsPercentageDiscountRangeOnAllMerchandise extends AdMessageDetailsBase
{
public Double start = null;
public Double stop = null;
public Double getStart() { return start; }
public AdMessageDetailsPercentageDiscountRangeOnAllMerchandise setStart(Double value) { this.start = value; return this; }
public Double getStop() { return stop; }
public AdMessageDetailsPercentageDiscountRangeOnAllMerchandise setStop(Double value) { this.stop = value; return this; }
}
public static class AdMessageDetailsPercentageDiscountOnSelectedMerchandise extends AdMessageDetailsBase
{
public Double value = null;
public Double getValue() { return value; }
public AdMessageDetailsPercentageDiscountOnSelectedMerchandise setValue(Double value) { this.value = value; return this; }
}
public static class AdMessageDetailsAbsoluteDiscountOnSelectedMerchandise extends AdMessageDetailsBase
{
public Double value = null;
public Double getValue() { return value; }
public AdMessageDetailsAbsoluteDiscountOnSelectedMerchandise setValue(Double value) { this.value = value; return this; }
}
public static class AdMessageDetailsAbsoluteDiscountRangeOnAllMerchandise extends AdMessageDetailsBase
{
public Double start = null;
public Double stop = null;
public Double getStart() { return start; }
public AdMessageDetailsAbsoluteDiscountRangeOnAllMerchandise setStart(Double value) { this.start = value; return this; }
public Double getStop() { return stop; }
public AdMessageDetailsAbsoluteDiscountRangeOnAllMerchandise setStop(Double value) { this.stop = value; return this; }
}
public static class AdMessageDetailsTotalAmountOverXgivesYdiscount extends AdMessageDetailsBase
{
public Double ifTotalAmountMoreThanX = null;
public Double thenYouGetDiscountPercentageY = null;
public Double getIfTotalAmountMoreThanX() { return ifTotalAmountMoreThanX; }
public AdMessageDetailsTotalAmountOverXgivesYdiscount setIfTotalAmountMoreThanX(Double value) { this.ifTotalAmountMoreThanX = value; return this; }
public Double getThenYouGetDiscountPercentageY() { return thenYouGetDiscountPercentageY; }
public AdMessageDetailsTotalAmountOverXgivesYdiscount setThenYouGetDiscountPercentageY(Double value) { this.thenYouGetDiscountPercentageY = value; return this; }
}
public static class AdMessageDetailsXforYdiscount extends AdMessageDetailsBase
{
public Integer ifYouBuyX = null;
public Integer thenYouGetY = null;
public Integer getIfYouBuyX() { return ifYouBuyX; }
public AdMessageDetailsXforYdiscount setIfYouBuyX(Integer value) { this.ifYouBuyX = value; return this; }
public Integer getThenYouGetY() { return thenYouGetY; }
public AdMessageDetailsXforYdiscount setThenYouGetY(Integer value) { this.thenYouGetY = value; return this; }
}
public static class AdMessageDetailsNewArrivals extends AdMessageDetailsBase
{
}
public static class AdMessageDetailsFreetext extends AdMessageDetailsBase
{
public String title = null;
public String getTitle() { return title; }
public AdMessageDetailsFreetext setTitle(String value) { this.title = value; return this; }
}
public static class AdMessageDetailsTodaysBreakFastOffer extends AdMessageDetailsBase
{
public Double value = null;
public Double getValue() { return value; }
public AdMessageDetailsTodaysBreakFastOffer setValue(Double value) { this.value = value; return this; }
}
public static class AdMessageDetailsTodaysLunchOffer extends AdMessageDetailsBase
{
public Double value = null;
public Double getValue() { return value; }
public AdMessageDetailsTodaysLunchOffer setValue(Double value) { this.value = value; return this; }
}
public static class AdMessageDetailsTodaysDinnerOffer extends AdMessageDetailsBase
{
public Double value = null;
public Double getValue() { return value; }
public AdMessageDetailsTodaysDinnerOffer setValue(Double value) { this.value = value; return this; }
}
public static class AdMessageDetailsSaveFoodAndMoney extends AdMessageDetailsBase
{
public Double value = null;
public Double getValue() { return value; }
public AdMessageDetailsSaveFoodAndMoney setValue(Double value) { this.value = value; return this; }
}
public static class AdMessageDetailsPercentageOffYourFoodBill extends AdMessageDetailsBase
{
public Double percentage = null;
public Double getPercentage() { return percentage; }
public AdMessageDetailsPercentageOffYourFoodBill setPercentage(Double value) { this.percentage = value; return this; }
}
public static class AdMessageDetailsHappyHour extends AdMessageDetailsBase
{
}
public static class AdMessageDetailsSomeFreeTablesLeftToday extends AdMessageDetailsBase
{
}
public static class AdMessageDetailsTwoDishesForThePriceOfOne extends AdMessageDetailsBase
{
}
}
Java UpdateAdMessageRequest 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.
PUT /admessage/update HTTP/1.1
Host: business-api.brovs.com
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<UpdateAdMessageRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/BusinessApi.Dto">
<AdMessageId>0</AdMessageId>
<DetailsUnion xmlns:d2p1="http://schemas.datacontract.org/2004/07/Entities.Common">
<d2p1:AbsoluteOnSelectedMerchandise>
<d2p1:Description>String</d2p1:Description>
<d2p1:MoreInformation xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d4p1:string>String</d4p1:string>
</d2p1:MoreInformation>
<d2p1:Value>0</d2p1:Value>
</d2p1:AbsoluteOnSelectedMerchandise>
<d2p1:AbsoluteRangeOnAllMerchandise>
<d2p1:Description>String</d2p1:Description>
<d2p1:MoreInformation xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d4p1:string>String</d4p1:string>
</d2p1:MoreInformation>
<d2p1:Start>0</d2p1:Start>
<d2p1:Stop>0</d2p1:Stop>
</d2p1:AbsoluteRangeOnAllMerchandise>
<d2p1:Freetext>
<d2p1:Description>String</d2p1:Description>
<d2p1:MoreInformation xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d4p1:string>String</d4p1:string>
</d2p1:MoreInformation>
<d2p1:Title>String</d2p1:Title>
</d2p1:Freetext>
<d2p1:HappyHour>
<d2p1:Description>String</d2p1:Description>
<d2p1:MoreInformation xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d4p1:string>String</d4p1:string>
</d2p1:MoreInformation>
</d2p1:HappyHour>
<d2p1:NewArrivals>
<d2p1:Description>String</d2p1:Description>
<d2p1:MoreInformation xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d4p1:string>String</d4p1:string>
</d2p1:MoreInformation>
</d2p1:NewArrivals>
<d2p1:PercentageOfYourFoodBill>
<d2p1:Description>String</d2p1:Description>
<d2p1:MoreInformation xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d4p1:string>String</d4p1:string>
</d2p1:MoreInformation>
<d2p1:Percentage>0</d2p1:Percentage>
</d2p1:PercentageOfYourFoodBill>
<d2p1:PercentageOnAllMerchandise>
<d2p1:Description>String</d2p1:Description>
<d2p1:MoreInformation xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d4p1:string>String</d4p1:string>
</d2p1:MoreInformation>
<d2p1:Value>0</d2p1:Value>
</d2p1:PercentageOnAllMerchandise>
<d2p1:PercentageOnSelectedMerchandise>
<d2p1:Description>String</d2p1:Description>
<d2p1:MoreInformation xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d4p1:string>String</d4p1:string>
</d2p1:MoreInformation>
<d2p1:Value>0</d2p1:Value>
</d2p1:PercentageOnSelectedMerchandise>
<d2p1:PercentageRangeOnAllMerchandise>
<d2p1:Description>String</d2p1:Description>
<d2p1:MoreInformation xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d4p1:string>String</d4p1:string>
</d2p1:MoreInformation>
<d2p1:Start>0</d2p1:Start>
<d2p1:Stop>0</d2p1:Stop>
</d2p1:PercentageRangeOnAllMerchandise>
<d2p1:SaveFoodAndMoney>
<d2p1:Description>String</d2p1:Description>
<d2p1:MoreInformation xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d4p1:string>String</d4p1:string>
</d2p1:MoreInformation>
<d2p1:Value>0</d2p1:Value>
</d2p1:SaveFoodAndMoney>
<d2p1:SomeFreeTablesLeftToday>
<d2p1:Description>String</d2p1:Description>
<d2p1:MoreInformation xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d4p1:string>String</d4p1:string>
</d2p1:MoreInformation>
</d2p1:SomeFreeTablesLeftToday>
<d2p1:TodaysBreakFastOffer>
<d2p1:Description>String</d2p1:Description>
<d2p1:MoreInformation xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d4p1:string>String</d4p1:string>
</d2p1:MoreInformation>
<d2p1:Value>0</d2p1:Value>
</d2p1:TodaysBreakFastOffer>
<d2p1:TodaysDinnerOffer>
<d2p1:Description>String</d2p1:Description>
<d2p1:MoreInformation xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d4p1:string>String</d4p1:string>
</d2p1:MoreInformation>
<d2p1:Value>0</d2p1:Value>
</d2p1:TodaysDinnerOffer>
<d2p1:TodaysLunchOffer>
<d2p1:Description>String</d2p1:Description>
<d2p1:MoreInformation xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d4p1:string>String</d4p1:string>
</d2p1:MoreInformation>
<d2p1:Value>0</d2p1:Value>
</d2p1:TodaysLunchOffer>
<d2p1:TotalAmountOverXgivesYdiscount>
<d2p1:Description>String</d2p1:Description>
<d2p1:MoreInformation xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d4p1:string>String</d4p1:string>
</d2p1:MoreInformation>
<d2p1:IfTotalAmountMoreThanX>0</d2p1:IfTotalAmountMoreThanX>
<d2p1:ThenYouGetDiscountPercentageY>0</d2p1:ThenYouGetDiscountPercentageY>
</d2p1:TotalAmountOverXgivesYdiscount>
<d2p1:TwoDishesForThePriceOfOne>
<d2p1:Description>String</d2p1:Description>
<d2p1:MoreInformation xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d4p1:string>String</d4p1:string>
</d2p1:MoreInformation>
</d2p1:TwoDishesForThePriceOfOne>
<d2p1:XforY>
<d2p1:Description>String</d2p1:Description>
<d2p1:MoreInformation xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d4p1:string>String</d4p1:string>
</d2p1:MoreInformation>
<d2p1:IfYouBuyX>0</d2p1:IfYouBuyX>
<d2p1:ThenYouGetY>0</d2p1:ThenYouGetY>
</d2p1:XforY>
</DetailsUnion>
<PublishAt>
<Day>0</Day>
<Hour>0</Hour>
<Minute>0</Minute>
<Month>0</Month>
<Second>0</Second>
<Year>0</Year>
</PublishAt>
<StartAt>
<Day>0</Day>
<Hour>0</Hour>
<Minute>0</Minute>
<Month>0</Month>
<Second>0</Second>
<Year>0</Year>
</StartAt>
<StopAt>
<Day>0</Day>
<Hour>0</Hour>
<Minute>0</Minute>
<Month>0</Month>
<Second>0</Second>
<Year>0</Year>
</StopAt>
</UpdateAdMessageRequest>
HTTP/1.1 200 OK Content-Type: application/xml Content-Length: length <UpdateAdMessageResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/BusinessApi.Dto"> <AdMessageId>0</AdMessageId> </UpdateAdMessageResponse>