| Requires any of the roles: | bookingsupplier-administrator-write, superadmin |
| POST | /licenses/company/delete | End all licenses | End all licenses on the company for the logged in user. |
|---|
import java.math.*;
import java.util.*;
import java.io.InputStream;
import net.servicestack.client.*;
public class dtos
{
@ApiResponse(Description="You were unauthorized to call this service", StatusCode=401)
@ValidateRequest(Validator="IsAuthenticated")
public static class EndAllLicenses implements ICompany
{
/**
* 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;
/**
* If true, all licenses and the booking system are terminated today. If false (default), the licenses stay active and are billed until the end of the current billing period, and each license's ValidTo is set to that date.
*/
@ApiMember(Description="If true, all licenses and the booking system are terminated today. If false (default), the licenses stay active and are billed until the end of the current billing period, and each license's ValidTo is set to that date.")
public Boolean Deactivate = null;
/**
* Questionaire with answers from customer why ending license.
*/
@ApiMember(Description="Questionaire with answers from customer why ending license.")
public ArrayList<Questionnaire> Questionnaire = new ArrayList<Questionnaire>();
public UUID getCompanyId() { return CompanyId; }
public EndAllLicenses setCompanyId(UUID value) { this.CompanyId = value; return this; }
public Boolean isDeactivate() { return Deactivate; }
public EndAllLicenses setDeactivate(Boolean value) { this.Deactivate = value; return this; }
public ArrayList<Questionnaire> getQuestionnaire() { return Questionnaire; }
public EndAllLicenses setQuestionnaire(ArrayList<Questionnaire> value) { this.Questionnaire = value; return this; }
}
public static class Questionnaire
{
public String Question = null;
public String Value = null;
public String getQuestion() { return Question; }
public Questionnaire setQuestion(String value) { this.Question = value; return this; }
public String getValue() { return Value; }
public Questionnaire setValue(String value) { this.Value = value; return this; }
}
public static class CompanyLicenseQueryResponse
{
public Integer Id = null;
public Integer TypeId = null;
public LicenseTypeQueryResponse Type = null;
public Date ValidFrom = null;
public Date ValidTo = null;
public UUID VossSubscriptionId = null;
public VossSubscriptionResponse VossSubscription = null;
public String MetaData = null;
public Boolean Active = null;
public String LicenseStatus = null;
public Boolean Canceled = null;
public Integer LicensePlanId = null;
public Date Updated = null;
public Date Created = null;
public Integer getId() { return Id; }
public CompanyLicenseQueryResponse setId(Integer value) { this.Id = value; return this; }
public Integer getTypeId() { return TypeId; }
public CompanyLicenseQueryResponse setTypeId(Integer value) { this.TypeId = value; return this; }
public LicenseTypeQueryResponse getType() { return Type; }
public CompanyLicenseQueryResponse setType(LicenseTypeQueryResponse value) { this.Type = value; return this; }
public Date getValidFrom() { return ValidFrom; }
public CompanyLicenseQueryResponse setValidFrom(Date value) { this.ValidFrom = value; return this; }
public Date getValidTo() { return ValidTo; }
public CompanyLicenseQueryResponse setValidTo(Date value) { this.ValidTo = value; return this; }
public UUID getVossSubscriptionId() { return VossSubscriptionId; }
public CompanyLicenseQueryResponse setVossSubscriptionId(UUID value) { this.VossSubscriptionId = value; return this; }
public VossSubscriptionResponse getVossSubscription() { return VossSubscription; }
public CompanyLicenseQueryResponse setVossSubscription(VossSubscriptionResponse value) { this.VossSubscription = value; return this; }
public String getMetaData() { return MetaData; }
public CompanyLicenseQueryResponse setMetaData(String value) { this.MetaData = value; return this; }
public Boolean isActive() { return Active; }
public CompanyLicenseQueryResponse setActive(Boolean value) { this.Active = value; return this; }
public String getLicenseStatus() { return LicenseStatus; }
public CompanyLicenseQueryResponse setLicenseStatus(String value) { this.LicenseStatus = value; return this; }
public Boolean isCanceled() { return Canceled; }
public CompanyLicenseQueryResponse setCanceled(Boolean value) { this.Canceled = value; return this; }
public Integer getLicensePlanId() { return LicensePlanId; }
public CompanyLicenseQueryResponse setLicensePlanId(Integer value) { this.LicensePlanId = value; return this; }
public Date getUpdated() { return Updated; }
public CompanyLicenseQueryResponse setUpdated(Date value) { this.Updated = value; return this; }
public Date getCreated() { return Created; }
public CompanyLicenseQueryResponse setCreated(Date value) { this.Created = value; return this; }
}
public static class LicenseTypeQueryResponse
{
/**
* The license type id
*/
@ApiMember(Description="The license type id")
public Integer Id = null;
/**
* The license type name
*/
@ApiMember(Description="The license type name")
public String Name = null;
/**
* The license type description
*/
@ApiMember(Description="The license type description")
public String Description = null;
/**
* If the license type is not a standard license but instead an extra license option. An example would be sending newsletter license.
*/
@ApiMember(Description="If the license type is not a standard license but instead an extra license option. An example would be sending newsletter license.")
public Boolean IsExtraLicenseOption = null;
/**
* The period of notice for the license in days.
*/
@ApiMember(Description="The period of notice for the license in days.")
public Integer PeriodOfNoticeDays = null;
/**
* The license items for the license type
*/
@ApiMember(Description="The license items for the license type")
public ArrayList<LicenseItemsResponse> Items = new ArrayList<LicenseItemsResponse>();
/**
* The license prices in each country for the license type
*/
@ApiMember(Description="The license prices in each country for the license type")
public ArrayList<LicensePriceResponse> Prices = new ArrayList<LicensePriceResponse>();
public Integer getId() { return Id; }
public LicenseTypeQueryResponse setId(Integer value) { this.Id = value; return this; }
public String getName() { return Name; }
public LicenseTypeQueryResponse setName(String value) { this.Name = value; return this; }
public String getDescription() { return Description; }
public LicenseTypeQueryResponse setDescription(String value) { this.Description = value; return this; }
public Boolean getIsExtraLicenseOption() { return IsExtraLicenseOption; }
public LicenseTypeQueryResponse setIsExtraLicenseOption(Boolean value) { this.IsExtraLicenseOption = value; return this; }
public Integer getPeriodOfNoticeDays() { return PeriodOfNoticeDays; }
public LicenseTypeQueryResponse setPeriodOfNoticeDays(Integer value) { this.PeriodOfNoticeDays = value; return this; }
public ArrayList<LicenseItemsResponse> getItems() { return Items; }
public LicenseTypeQueryResponse setItems(ArrayList<LicenseItemsResponse> value) { this.Items = value; return this; }
public ArrayList<LicensePriceResponse> getPrices() { return Prices; }
public LicenseTypeQueryResponse setPrices(ArrayList<LicensePriceResponse> value) { this.Prices = value; return this; }
}
public static class LicenseItemsResponse
{
public Integer Id = null;
public String Name = null;
public Integer AllowedItems = null;
public Integer getId() { return Id; }
public LicenseItemsResponse setId(Integer value) { this.Id = value; return this; }
public String getName() { return Name; }
public LicenseItemsResponse setName(String value) { this.Name = value; return this; }
public Integer getAllowedItems() { return AllowedItems; }
public LicenseItemsResponse setAllowedItems(Integer value) { this.AllowedItems = value; return this; }
}
public static class LicensePriceResponse
{
public Integer LicenseTypeId = null;
public String CountryId = null;
public Integer Price = null;
public Country Country = null;
public Integer LicensePlanId = null;
public Integer getLicenseTypeId() { return LicenseTypeId; }
public LicensePriceResponse setLicenseTypeId(Integer value) { this.LicenseTypeId = value; return this; }
public String getCountryId() { return CountryId; }
public LicensePriceResponse setCountryId(String value) { this.CountryId = value; return this; }
public Integer getPrice() { return Price; }
public LicensePriceResponse setPrice(Integer value) { this.Price = value; return this; }
public Country getCountry() { return Country; }
public LicensePriceResponse setCountry(Country value) { this.Country = value; return this; }
public Integer getLicensePlanId() { return LicensePlanId; }
public LicensePriceResponse setLicensePlanId(Integer value) { this.LicensePlanId = value; return this; }
}
public static class Country extends BaseModel
{
@References(Type=Currency.class)
public String CurrencyId = null;
public Currency CurrencyInfo = null;
@Required()
public String Name = null;
public String Culture = null;
public String TimeZone = null;
public Date ModifiedDate = null;
@Required()
public String Id = null;
public String getCurrencyId() { return CurrencyId; }
public Country setCurrencyId(String value) { this.CurrencyId = value; return this; }
public Currency getCurrencyInfo() { return CurrencyInfo; }
public Country setCurrencyInfo(Currency value) { this.CurrencyInfo = value; return this; }
public String getName() { return Name; }
public Country setName(String value) { this.Name = value; return this; }
public String getCulture() { return Culture; }
public Country setCulture(String value) { this.Culture = value; return this; }
public String getTimeZone() { return TimeZone; }
public Country setTimeZone(String value) { this.TimeZone = value; return this; }
public Date getModifiedDate() { return ModifiedDate; }
public Country setModifiedDate(Date value) { this.ModifiedDate = value; return this; }
public String getId() { return Id; }
public Country setId(String value) { this.Id = value; return this; }
}
public static class BaseModel
{
}
public static class Currency extends BaseModel
{
@Required()
public String Name = null;
@Required()
public String CurrencySign = null;
@Required()
public Boolean Active = null;
public Date ModifiedDate = null;
@Required()
public String Id = null;
public String getName() { return Name; }
public Currency setName(String value) { this.Name = value; return this; }
public String getCurrencySign() { return CurrencySign; }
public Currency setCurrencySign(String value) { this.CurrencySign = value; return this; }
public Boolean isActive() { return Active; }
public Currency setActive(Boolean value) { this.Active = value; return this; }
public Date getModifiedDate() { return ModifiedDate; }
public Currency setModifiedDate(Date value) { this.ModifiedDate = value; return this; }
public String getId() { return Id; }
public Currency setId(String value) { this.Id = value; return this; }
}
public static class VossSubscriptionResponse
{
public Date SubscriptionBillingPeriodStartDate = null;
public Date SubscriptionBillingPeriodEndDate = null;
public Date BindingPeriodEndDate = null;
public TierResponse Tier = null;
public Date getSubscriptionBillingPeriodStartDate() { return SubscriptionBillingPeriodStartDate; }
public VossSubscriptionResponse setSubscriptionBillingPeriodStartDate(Date value) { this.SubscriptionBillingPeriodStartDate = value; return this; }
public Date getSubscriptionBillingPeriodEndDate() { return SubscriptionBillingPeriodEndDate; }
public VossSubscriptionResponse setSubscriptionBillingPeriodEndDate(Date value) { this.SubscriptionBillingPeriodEndDate = value; return this; }
public Date getBindingPeriodEndDate() { return BindingPeriodEndDate; }
public VossSubscriptionResponse setBindingPeriodEndDate(Date value) { this.BindingPeriodEndDate = value; return this; }
public TierResponse getTier() { return Tier; }
public VossSubscriptionResponse setTier(TierResponse value) { this.Tier = value; return this; }
}
public static class TierResponse
{
public UUID Id = null;
public String Name = null;
public ArrayList<ProductGroupResponse> ProductGroups = new ArrayList<ProductGroupResponse>();
public UUID getId() { return Id; }
public TierResponse setId(UUID value) { this.Id = value; return this; }
public String getName() { return Name; }
public TierResponse setName(String value) { this.Name = value; return this; }
public ArrayList<ProductGroupResponse> getProductGroups() { return ProductGroups; }
public TierResponse setProductGroups(ArrayList<ProductGroupResponse> value) { this.ProductGroups = value; return this; }
}
public static class ProductGroupResponse
{
public UUID Id = null;
public String Name = null;
public UUID TierId = null;
public UUID getId() { return Id; }
public ProductGroupResponse setId(UUID value) { this.Id = value; return this; }
public String getName() { return Name; }
public ProductGroupResponse setName(String value) { this.Name = value; return this; }
public UUID getTierId() { return TierId; }
public ProductGroupResponse setTierId(UUID value) { this.TierId = value; return this; }
}
}
To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /licenses/company/delete HTTP/1.1
Host: testapi.bokamera.se
Accept: text/csv
Content-Type: text/csv
Content-Length: length
{"CompanyId":"00000000-0000-0000-0000-000000000000","Deactivate":false,"Questionnaire":[{"Question":"String","Value":"String"}]}
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length
{"Id":0,"TypeId":0,"Type":{"Id":0,"Name":"String","Description":"String","IsExtraLicenseOption":false,"PeriodOfNoticeDays":0,"Items":[{"Id":0,"Name":"String","AllowedItems":0}],"Prices":[{"LicenseTypeId":0,"CountryId":"String","Price":0,"Country":{"CurrencyId":"String","CurrencyInfo":{"Name":"String","CurrencySign":"String","Active":false,"ModifiedDate":"0001-01-01T00:00:00.0000000+00:00","Id":"String"},"Name":"String","Culture":"String","TimeZone":"String","ModifiedDate":"0001-01-01T00:00:00.0000000+00:00","Id":"String"},"LicensePlanId":0}]},"VossSubscriptionId":"00000000-0000-0000-0000-000000000000","VossSubscription":{"BindingPeriodEndDate":"0001-01-01T00:00:00","Tier":{"Name":"String","ProductGroups":[{"Name":"String"}]}},"MetaData":"String","Active":false,"LicenseStatus":"String","Canceled":false,"LicensePlanId":0}