Requires any of the roles: | bookingsupplier-administrator-write, superadmin, bookingsupplier-administrator-read |
GET | /trials/company/ | Get all company started trials | Get all trials that have been started for a specific company |
---|
import java.math.*;
import java.util.*;
import net.servicestack.client.*;
public class dtos
{
@ValidateRequest(Validator="IsAuthenticated")
public static class CompanyTrialsQuery implements ICompany
{
/**
* Enter the company and id you want to see the information for a resource, if blank company id and you are an admin, your company id will be used. If blank id, all resources will be shown
*/
@ApiMember(Description="Enter the company and id you want to see the information for a resource, if blank company id and you are an admin, your company id will be used. If blank id, all resources will be shown ", IsRequired=true, ParameterType="query")
public UUID CompanyId = null;
/**
* Trial Id
*/
@ApiMember(Description="Trial Id", IsRequired=true, ParameterType="query")
public Integer Id = null;
public UUID getCompanyId() { return CompanyId; }
public CompanyTrialsQuery setCompanyId(UUID value) { this.CompanyId = value; return this; }
public Integer getId() { return Id; }
public CompanyTrialsQuery setId(Integer value) { this.Id = value; return this; }
}
public static class CompanyTrialQueryResponse
{
public Integer TrialTypeId = null;
public TrialQueryResponse TrialType = null;
public Date Started = null;
public Date Created = null;
public Date ValidTo = null;
public Boolean Active = null;
public Integer getTrialTypeId() { return TrialTypeId; }
public CompanyTrialQueryResponse setTrialTypeId(Integer value) { this.TrialTypeId = value; return this; }
public TrialQueryResponse getTrialType() { return TrialType; }
public CompanyTrialQueryResponse setTrialType(TrialQueryResponse value) { this.TrialType = value; return this; }
public Date getStarted() { return Started; }
public CompanyTrialQueryResponse setStarted(Date value) { this.Started = value; return this; }
public Date getCreated() { return Created; }
public CompanyTrialQueryResponse setCreated(Date value) { this.Created = value; return this; }
public Date getValidTo() { return ValidTo; }
public CompanyTrialQueryResponse setValidTo(Date value) { this.ValidTo = value; return this; }
public Boolean isActive() { return Active; }
public CompanyTrialQueryResponse setActive(Boolean value) { this.Active = value; return this; }
}
public static class TrialQueryResponse
{
public Integer Id = null;
public String Name = null;
public Integer TrialDays = null;
public Integer getId() { return Id; }
public TrialQueryResponse setId(Integer value) { this.Id = value; return this; }
public String getName() { return Name; }
public TrialQueryResponse setName(String value) { this.Name = value; return this; }
public Integer getTrialDays() { return TrialDays; }
public TrialQueryResponse setTrialDays(Integer value) { this.TrialDays = value; return this; }
}
}
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.
GET /trials/company/ HTTP/1.1 Host: api.bokamera.se Accept: text/jsonl
HTTP/1.1 200 OK Content-Type: text/jsonl Content-Length: length {"TrialTypeId":0,"TrialType":{"Id":0,"Name":"String","TrialDays":0},"Started":"0001-01-01T00:00:00","ValidTo":"0001-01-01T00:00:00","Active":false}