BusinessApi

<back to all web services

UpdateAdRequest

Business
Requires Authentication
Required role:Business
The following routes are available for this service:
PUT/ad/update
import java.math.*
import java.util.*
import java.io.InputStream
import net.servicestack.client.*


open class AdDetailsUnion
{
    open var percentageOnAllMerchandise:AdDetailsPercentageDiscountOnAllMerchandise? = null
    open var percentageRangeOnAllMerchandise:AdDetailsPercentageDiscountRangeOnAllMerchandise? = null
    open var percentageOnSelectedMerchandise:AdDetailsPercentageDiscountOnSelectedMerchandise? = null
    open var absoluteOnSelectedMerchandise:AdDetailsAbsoluteDiscountOnSelectedMerchandise? = null
    open var absoluteRangeOnAllMerchandise:AdDetailsAbsoluteDiscountRangeOnAllMerchandise? = null
    open var totalAmountOverXgivesYdiscount:AdDetailsTotalAmountOverXgivesYdiscount? = null
    open var xforY:AdDetailsXforYdiscount? = null
    open var newArrivals:AdDetailsNewArrivals? = null
    open var freetext:AdDetailsFreetext? = null
    open var todaysBreakFastOffer:AdDetailsTodaysBreakFastOffer? = null
    open var todaysLunchOffer:AdDetailsTodaysLunchOffer? = null
    open var todaysDinnerOffer:AdDetailsTodaysDinnerOffer? = null
    open var saveFoodAndMoney:AdDetailsSaveFoodAndMoney? = null
    open var percentageOfYourFoodBill:AdDetailsPercentageOffYourFoodBill? = null
    open var happyHour:AdDetailsHappyHour? = null
    open var someFreeTablesLeftToday:AdDetailsSomeFreeTablesLeftToday? = null
    open var twoDishesForThePriceOfOne:AdDetailsTwoDishesForThePriceOfOne? = null
}

open class AdDetailsPercentageDiscountOnAllMerchandise : AdDetailsBase()
{
    open var value:Double? = null
}

open class AdDetailsBase
{
    open var description:String? = null
    open var moreInformation:ArrayList<String> = ArrayList<String>()
}

open class AdDetailsPercentageDiscountRangeOnAllMerchandise : AdDetailsBase()
{
    open var start:Double? = null
    open var stop:Double? = null
}

open class AdDetailsPercentageDiscountOnSelectedMerchandise : AdDetailsBase()
{
    open var value:Double? = null
}

open class AdDetailsAbsoluteDiscountOnSelectedMerchandise : AdDetailsBase()
{
    open var value:Double? = null
}

open class AdDetailsAbsoluteDiscountRangeOnAllMerchandise : AdDetailsBase()
{
    open var start:Double? = null
    open var stop:Double? = null
}

open class AdDetailsTotalAmountOverXgivesYdiscount : AdDetailsBase()
{
    open var ifTotalAmountMoreThanX:Double? = null
    open var thenYouGetDiscountPercentageY:Double? = null
}

open class AdDetailsXforYdiscount : AdDetailsBase()
{
    open var ifYouBuyX:Int? = null
    open var thenYouGetY:Int? = null
}

open class AdDetailsNewArrivals : AdDetailsBase()
{
}

open class AdDetailsFreetext : AdDetailsBase()
{
    open var title:String? = null
}

open class AdDetailsTodaysBreakFastOffer : AdDetailsBase()
{
    open var value:Double? = null
}

open class AdDetailsTodaysLunchOffer : AdDetailsBase()
{
    open var value:Double? = null
}

open class AdDetailsTodaysDinnerOffer : AdDetailsBase()
{
    open var value:Double? = null
}

open class AdDetailsSaveFoodAndMoney : AdDetailsBase()
{
    open var value:Double? = null
}

open class AdDetailsPercentageOffYourFoodBill : AdDetailsBase()
{
    open var percentage:Double? = null
}

open class AdDetailsHappyHour : AdDetailsBase()
{
}

open class AdDetailsSomeFreeTablesLeftToday : AdDetailsBase()
{
}

open class AdDetailsTwoDishesForThePriceOfOne : AdDetailsBase()
{
}

Kotlin UpdateAdRequest DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv

HTTP + JSV

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

PUT /ad/update HTTP/1.1 
Host: qa-business-api.brovs.com 
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	adId: 0,
	startAt: 
	{
		year: 0,
		month: 0,
		day: 0,
		hour: 0,
		minute: 0,
		second: 0
	},
	stopAt: 
	{
		year: 0,
		month: 0,
		day: 0,
		hour: 0,
		minute: 0,
		second: 0
	},
	publishAt: 
	{
		year: 0,
		month: 0,
		day: 0,
		hour: 0,
		minute: 0,
		second: 0
	},
	detailsUnion: 
	{
		percentageOnAllMerchandise: 
		{
			value: 0,
			description: String,
			moreInformation: 
			[
				String
			]
		},
		percentageRangeOnAllMerchandise: 
		{
			start: 0,
			stop: 0,
			description: String,
			moreInformation: 
			[
				String
			]
		},
		percentageOnSelectedMerchandise: 
		{
			value: 0,
			description: String,
			moreInformation: 
			[
				String
			]
		},
		absoluteOnSelectedMerchandise: 
		{
			value: 0,
			description: String,
			moreInformation: 
			[
				String
			]
		},
		absoluteRangeOnAllMerchandise: 
		{
			start: 0,
			stop: 0,
			description: String,
			moreInformation: 
			[
				String
			]
		},
		totalAmountOverXgivesYdiscount: 
		{
			ifTotalAmountMoreThanX: 0,
			thenYouGetDiscountPercentageY: 0,
			description: String,
			moreInformation: 
			[
				String
			]
		},
		xforY: 
		{
			ifYouBuyX: 0,
			thenYouGetY: 0,
			description: String,
			moreInformation: 
			[
				String
			]
		},
		newArrivals: 
		{
			description: String,
			moreInformation: 
			[
				String
			]
		},
		freetext: 
		{
			title: String,
			description: String,
			moreInformation: 
			[
				String
			]
		},
		todaysBreakFastOffer: 
		{
			value: 0,
			description: String,
			moreInformation: 
			[
				String
			]
		},
		todaysLunchOffer: 
		{
			value: 0,
			description: String,
			moreInformation: 
			[
				String
			]
		},
		todaysDinnerOffer: 
		{
			value: 0,
			description: String,
			moreInformation: 
			[
				String
			]
		},
		saveFoodAndMoney: 
		{
			value: 0,
			description: String,
			moreInformation: 
			[
				String
			]
		},
		percentageOfYourFoodBill: 
		{
			percentage: 0,
			description: String,
			moreInformation: 
			[
				String
			]
		},
		happyHour: 
		{
			description: String,
			moreInformation: 
			[
				String
			]
		},
		someFreeTablesLeftToday: 
		{
			description: String,
			moreInformation: 
			[
				String
			]
		},
		twoDishesForThePriceOfOne: 
		{
			description: String,
			moreInformation: 
			[
				String
			]
		}
	}
}
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length

{
	adId: 0
}