Requires any of the roles: | bookingsupplier-administrator-write, superadmin |
DELETE | /services/prices/{Id} | Delete a price | Delete a price on a service |
---|
import java.math.*;
import java.util.*;
import net.servicestack.client.*;
public class dtos
{
@ValidateRequest(Validator="IsAuthenticated")
public static class DeleteServicePrice
{
/**
* The company id, if empty will use the company id for the user you are logged in with.
*/
@ApiMember(Description="The company id, if empty will use the company id for the user you are logged in with.")
public UUID CompanyId = null;
/**
* The price id
*/
@ApiMember(Description="The price id")
public Integer Id = null;
public UUID getCompanyId() { return CompanyId; }
public DeleteServicePrice setCompanyId(UUID value) { this.CompanyId = value; return this; }
public Integer getId() { return Id; }
public DeleteServicePrice setId(Integer value) { this.Id = value; return this; }
}
public static class ServicePriceResponse
{
/**
* The company id
*/
@ApiMember(Description="The company id")
public UUID CompanyId = null;
/**
* The price id
*/
@ApiMember(Description="The price id")
public Integer Id = null;
/**
* The service id
*/
@ApiMember(Description="The service id")
public Integer ServiceId = null;
/**
* The price
*/
@ApiMember(Description="The price")
public Double Price = null;
/**
* The price calculation type id, 1 = Normal, price is for the service total duration, 2 = Price is per minute, 3 = Price is per hour, 4= Price is per day
*/
@ApiMember(Description="The price calculation type id, 1 = Normal, price is for the service total duration, 2 = Price is per minute, 3 = Price is per hour, 4= Price is per day")
public Integer CalculationTypeId = null;
/**
* The price currency
*/
@ApiMember(Description="The price currency")
public String CurrencyId = null;
/**
* The price sign
*/
@ApiMember(Description="The price sign")
public String PriceSign = null;
/**
* The price VAT in percent
*/
@ApiMember(Description="The price VAT in percent")
public BigDecimal VAT = null;
/**
* The price category if price has a category
*/
@ApiMember(Description="The price category if price has a category")
public String Category = null;
/**
* The price text to display
*/
@ApiMember(Description="The price text to display")
public String PriceText = null;
/**
* The valid from date for the price.
*/
@ApiMember(Description="The valid from date for the price.")
public Date From = null;
/**
* The valid to date for the price.
*/
@ApiMember(Description="The valid to date for the price.")
public Date To = null;
/**
* If the price is only valid for specific days in week add a comma separated list of which days this day price belongs to, 1 = Monday .. 7 = Sunday. All old days connected will be removed on update.
*/
@ApiMember(Description="If the price is only valid for specific days in week add a comma separated list of which days this day price belongs to, 1 = Monday .. 7 = Sunday. All old days connected will be removed on update.")
public ArrayList<DayOfWeekDto> DaysOfWeek = null;
/**
* If the price is only valid for specific days in week add a comma separated list of which days this day price belongs to, 1 = Monday .. 7 = Sunday. All old days connected will be removed on update.
*/
@ApiMember(Description="If the price is only valid for specific days in week add a comma separated list of which days this day price belongs to, 1 = Monday .. 7 = Sunday. All old days connected will be removed on update.")
public TimeSpan FromTime = null;
/**
* If the price is only valid for a specific time span during a time of day enter the FromTime and ToTime parameters.
*/
@ApiMember(Description="If the price is only valid for a specific time span during a time of day enter the FromTime and ToTime parameters.")
public TimeSpan ToTime = null;
public ServiceInfoResponse Service = null;
/**
* If the price is only valid for a specific time span
*/
@ApiMember(Description="If the price is only valid for a specific time span")
public Boolean IsTimeSpecific = null;
/**
* If the price is only valid for specific days of week
*/
@ApiMember(Description="If the price is only valid for specific days of week")
public Boolean IsDaysOfWeekSpecific = null;
public UUID getCompanyId() { return CompanyId; }
public ServicePriceResponse setCompanyId(UUID value) { this.CompanyId = value; return this; }
public Integer getId() { return Id; }
public ServicePriceResponse setId(Integer value) { this.Id = value; return this; }
public Integer getServiceId() { return ServiceId; }
public ServicePriceResponse setServiceId(Integer value) { this.ServiceId = value; return this; }
public Double getPrice() { return Price; }
public ServicePriceResponse setPrice(Double value) { this.Price = value; return this; }
public Integer getCalculationTypeId() { return CalculationTypeId; }
public ServicePriceResponse setCalculationTypeId(Integer value) { this.CalculationTypeId = value; return this; }
public String getCurrencyId() { return CurrencyId; }
public ServicePriceResponse setCurrencyId(String value) { this.CurrencyId = value; return this; }
public String getPriceSign() { return PriceSign; }
public ServicePriceResponse setPriceSign(String value) { this.PriceSign = value; return this; }
public BigDecimal getVat() { return VAT; }
public ServicePriceResponse setVat(BigDecimal value) { this.VAT = value; return this; }
public String getCategory() { return Category; }
public ServicePriceResponse setCategory(String value) { this.Category = value; return this; }
public String getPriceText() { return PriceText; }
public ServicePriceResponse setPriceText(String value) { this.PriceText = value; return this; }
public Date getFrom() { return From; }
public ServicePriceResponse setFrom(Date value) { this.From = value; return this; }
public Date getTo() { return To; }
public ServicePriceResponse setTo(Date value) { this.To = value; return this; }
public ArrayList<DayOfWeekDto> getDaysOfWeek() { return DaysOfWeek; }
public ServicePriceResponse setDaysOfWeek(ArrayList<DayOfWeekDto> value) { this.DaysOfWeek = value; return this; }
public TimeSpan getFromTime() { return FromTime; }
public ServicePriceResponse setFromTime(TimeSpan value) { this.FromTime = value; return this; }
public TimeSpan getToTime() { return ToTime; }
public ServicePriceResponse setToTime(TimeSpan value) { this.ToTime = value; return this; }
public ServiceInfoResponse getService() { return Service; }
public ServicePriceResponse setService(ServiceInfoResponse value) { this.Service = value; return this; }
public Boolean getIsTimeSpecific() { return IsTimeSpecific; }
public ServicePriceResponse setIsTimeSpecific(Boolean value) { this.IsTimeSpecific = value; return this; }
public Boolean getIsDaysOfWeekSpecific() { return IsDaysOfWeekSpecific; }
public ServicePriceResponse setIsDaysOfWeekSpecific(Boolean value) { this.IsDaysOfWeekSpecific = value; return this; }
}
public static class DayOfWeekDto
{
public Integer DayOfWeekId = null;
public Integer DotNetDayOfWeekId = null;
public String DayOfWeek = null;
public Integer getDayOfWeekId() { return DayOfWeekId; }
public DayOfWeekDto setDayOfWeekId(Integer value) { this.DayOfWeekId = value; return this; }
public Integer getDotNetDayOfWeekId() { return DotNetDayOfWeekId; }
public DayOfWeekDto setDotNetDayOfWeekId(Integer value) { this.DotNetDayOfWeekId = value; return this; }
public String getDayOfWeek() { return DayOfWeek; }
public DayOfWeekDto setDayOfWeek(String value) { this.DayOfWeek = value; return this; }
}
public static class ServiceInfoResponse
{
public Integer Id = null;
public String Name = null;
public String Description = null;
public Uri ImageUrl = null;
public Integer LengthInMinutes = null;
public Integer MaxNumberOfSpotsPerBooking = null;
public Integer MinNumberOfSpotsPerBooking = null;
public GroupBookingSettings GroupBooking = null;
public MultipleResourceSettings MultipleResource = null;
public Boolean IsGroupBooking = null;
public Boolean IsPaymentEnabled = null;
public Integer getId() { return Id; }
public ServiceInfoResponse setId(Integer value) { this.Id = value; return this; }
public String getName() { return Name; }
public ServiceInfoResponse setName(String value) { this.Name = value; return this; }
public String getDescription() { return Description; }
public ServiceInfoResponse setDescription(String value) { this.Description = value; return this; }
public Uri getImageUrl() { return ImageUrl; }
public ServiceInfoResponse setImageUrl(Uri value) { this.ImageUrl = value; return this; }
public Integer getLengthInMinutes() { return LengthInMinutes; }
public ServiceInfoResponse setLengthInMinutes(Integer value) { this.LengthInMinutes = value; return this; }
public Integer getMaxNumberOfSpotsPerBooking() { return MaxNumberOfSpotsPerBooking; }
public ServiceInfoResponse setMaxNumberOfSpotsPerBooking(Integer value) { this.MaxNumberOfSpotsPerBooking = value; return this; }
public Integer getMinNumberOfSpotsPerBooking() { return MinNumberOfSpotsPerBooking; }
public ServiceInfoResponse setMinNumberOfSpotsPerBooking(Integer value) { this.MinNumberOfSpotsPerBooking = value; return this; }
public GroupBookingSettings getGroupBooking() { return GroupBooking; }
public ServiceInfoResponse setGroupBooking(GroupBookingSettings value) { this.GroupBooking = value; return this; }
public MultipleResourceSettings getMultipleResource() { return MultipleResource; }
public ServiceInfoResponse setMultipleResource(MultipleResourceSettings value) { this.MultipleResource = value; return this; }
public Boolean getIsGroupBooking() { return IsGroupBooking; }
public ServiceInfoResponse setIsGroupBooking(Boolean value) { this.IsGroupBooking = value; return this; }
public Boolean getIsPaymentEnabled() { return IsPaymentEnabled; }
public ServiceInfoResponse setIsPaymentEnabled(Boolean value) { this.IsPaymentEnabled = value; return this; }
}
public static class GroupBookingSettings
{
public Boolean Active = null;
public Integer Min = null;
public Integer Max = null;
public Boolean isActive() { return Active; }
public GroupBookingSettings setActive(Boolean value) { this.Active = value; return this; }
public Integer getMin() { return Min; }
public GroupBookingSettings setMin(Integer value) { this.Min = value; return this; }
public Integer getMax() { return Max; }
public GroupBookingSettings setMax(Integer value) { this.Max = value; return this; }
}
public static class MultipleResourceSettings
{
public Boolean Active = null;
public Integer Min = null;
public Integer Max = null;
public Boolean isActive() { return Active; }
public MultipleResourceSettings setActive(Boolean value) { this.Active = value; return this; }
public Integer getMin() { return Min; }
public MultipleResourceSettings setMin(Integer value) { this.Min = value; return this; }
public Integer getMax() { return Max; }
public MultipleResourceSettings setMax(Integer value) { this.Max = value; return this; }
}
}
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.
DELETE /services/prices/{Id} HTTP/1.1 Host: api.bokamera.se Accept: text/jsv
HTTP/1.1 200 OK Content-Type: text/jsv Content-Length: length { Id: 0, ServiceId: 0, Price: 0, CalculationTypeId: 0, CurrencyId: String, PriceSign: String, VAT: 0, Category: String, PriceText: String, DaysOfWeek: [ { DayOfWeekId: 0, DotNetDayOfWeekId: 0, DayOfWeek: String } ], FromTime: PT0S, ToTime: PT0S, Service: { Id: 0, Name: String, Description: String, LengthInMinutes: 0, MaxNumberOfSpotsPerBooking: 0, MinNumberOfSpotsPerBooking: 0, GroupBooking: { Active: False, Min: 0, Max: 0 }, MultipleResource: { Active: False, Min: 0, Max: 0 }, IsGroupBooking: False, IsPaymentEnabled: False }, IsTimeSpecific: False, IsDaysOfWeekSpecific: False }