BokaMera.API.Host

<back to all web services

GetVossTier

The following routes are available for this service:
GET/voss/tiers/{TierId}gets voss tiers
import java.math.*;
import java.util.*;
import net.servicestack.client.*;
import com.google.gson.annotations.*;
import com.google.gson.reflect.*;

public class dtos
{

    @ApiResponse(Description="You were unauthorized to call this service", StatusCode=401)
    public static class GetVossTier
    {
        /**
        * 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 TierId = null;

        public UUID PackageId = null;
        
        public UUID getTierId() { return TierId; }
        public GetVossTier setTierId(UUID value) { this.TierId = value; return this; }
        public UUID getPackageId() { return PackageId; }
        public GetVossTier setPackageId(UUID value) { this.PackageId = value; return this; }
    }

    @DataContract(Name="TierResult")
    public static class TierResult
    {
        @DataMember(Name="id", IsRequired=true)
        @SerializedName("id")
        public UUID Id = null;

        @DataMember(Name="versionId", IsRequired=true)
        @SerializedName("versionId")
        public UUID VersionId = null;

        @DataMember(Name="name", IsRequired=true)
        @SerializedName("name")
        public String Name = null;

        @DataMember(Name="externalId")
        @SerializedName("externalId")
        public String ExternalId = null;

        @DataMember(Name="rank")
        @SerializedName("rank")
        public Integer Rank = null;

        @DataMember(Name="productGroups", EmitDefaultValue=false)
        @SerializedName("productGroups")
        public ArrayList<TierProductGroupDto> ProductGroups = null;
        
        public UUID getId() { return Id; }
        public TierResult setId(UUID value) { this.Id = value; return this; }
        public UUID getVersionId() { return VersionId; }
        public TierResult setVersionId(UUID value) { this.VersionId = value; return this; }
        public String getName() { return Name; }
        public TierResult setName(String value) { this.Name = value; return this; }
        public String getExternalId() { return ExternalId; }
        public TierResult setExternalId(String value) { this.ExternalId = value; return this; }
        public Integer getRank() { return Rank; }
        public TierResult setRank(Integer value) { this.Rank = value; return this; }
        public ArrayList<TierProductGroupDto> getProductGroups() { return ProductGroups; }
        public TierResult setProductGroups(ArrayList<TierProductGroupDto> value) { this.ProductGroups = value; return this; }
    }

    @DataContract(Name="TierProductGroupDto")
    public static class TierProductGroupDto
    {
        @DataMember(Name="productGroupType", IsRequired=true)
        @SerializedName("productGroupType")
        public ProductGroupTypeEnum ProductGroupType = null;

        @DataMember(Name="id", IsRequired=true)
        @SerializedName("id")
        public UUID Id = null;

        @DataMember(Name="name", IsRequired=true)
        @SerializedName("name")
        public String Name = null;

        @DataMember(Name="externalId")
        @SerializedName("externalId")
        public String ExternalId = null;

        @DataMember(Name="tags", EmitDefaultValue=false)
        @SerializedName("tags")
        public ArrayList<ProductGroupTagDto> Tags = null;

        @DataMember(Name="products", EmitDefaultValue=false)
        @SerializedName("products")
        public ArrayList<TierProductDto> Products = null;
        
        public ProductGroupTypeEnum getProductGroupType() { return ProductGroupType; }
        public TierProductGroupDto setProductGroupType(ProductGroupTypeEnum value) { this.ProductGroupType = value; return this; }
        public UUID getId() { return Id; }
        public TierProductGroupDto setId(UUID value) { this.Id = value; return this; }
        public String getName() { return Name; }
        public TierProductGroupDto setName(String value) { this.Name = value; return this; }
        public String getExternalId() { return ExternalId; }
        public TierProductGroupDto setExternalId(String value) { this.ExternalId = value; return this; }
        public ArrayList<ProductGroupTagDto> getTags() { return Tags; }
        public TierProductGroupDto setTags(ArrayList<ProductGroupTagDto> value) { this.Tags = value; return this; }
        public ArrayList<TierProductDto> getProducts() { return Products; }
        public TierProductGroupDto setProducts(ArrayList<TierProductDto> value) { this.Products = value; return this; }
    }

    public static enum ProductGroupTypeEnum
    {
        Optional,
        Included;
    }

    @DataContract(Name="ProductGroupTagDto")
    public static class ProductGroupTagDto
    {
        @DataMember(Name="type", IsRequired=true)
        @SerializedName("type")
        public TypeEnum Type = null;

        @DataMember(Name="tag", IsRequired=true)
        @SerializedName("tag")
        public String Tag = null;
        
        public TypeEnum getType() { return Type; }
        public ProductGroupTagDto setType(TypeEnum value) { this.Type = value; return this; }
        public String getTag() { return Tag; }
        public ProductGroupTagDto setTag(String value) { this.Tag = value; return this; }
    }

    public static enum TypeEnum
    {
        AtSubscriptionBillingPeriodEnd,
        AtBindingPeriodEnd,
        Immediately;
    }

    @DataContract(Name="TierProductDto")
    public static class TierProductDto
    {
        @DataMember(Name="type", IsRequired=true)
        @SerializedName("type")
        public ProductTypeEnum ProductType = null;

        @DataMember(Name="status", IsRequired=true)
        @SerializedName("status")
        public StatusEnum Status = null;

        @DataMember(Name="id", IsRequired=true)
        @SerializedName("id")
        public UUID Id = null;

        @DataMember(Name="name", IsRequired=true)
        @SerializedName("name")
        public String Name = null;

        @DataMember(Name="externalId")
        @SerializedName("externalId")
        public String ExternalId = null;

        @DataMember(Name="articleNumber", IsRequired=true)
        @SerializedName("articleNumber")
        public String ArticleNumber = null;
        
        public ProductTypeEnum getProductType() { return ProductType; }
        public TierProductDto setProductType(ProductTypeEnum value) { this.ProductType = value; return this; }
        public StatusEnum getStatus() { return Status; }
        public TierProductDto setStatus(StatusEnum value) { this.Status = value; return this; }
        public UUID getId() { return Id; }
        public TierProductDto setId(UUID value) { this.Id = value; return this; }
        public String getName() { return Name; }
        public TierProductDto setName(String value) { this.Name = value; return this; }
        public String getExternalId() { return ExternalId; }
        public TierProductDto setExternalId(String value) { this.ExternalId = value; return this; }
        public String getArticleNumber() { return ArticleNumber; }
        public TierProductDto setArticleNumber(String value) { this.ArticleNumber = value; return this; }
    }

    public static enum ProductTypeEnum
    {
        Main,
        Addon,
        License,
        Usage;
    }

    public static enum StatusEnum
    {
        Active,
        Terminated;
    }

}

Java GetVossTier DTOs

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

To embed the response in a jsonp callback, append ?callback=myCallback

HTTP + JSON

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

GET /voss/tiers/{TierId} HTTP/1.1 
Host: testapi.bokamera.se 
Accept: application/json
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

{"name":"String","externalId":"String","rank":0,"productGroups":[{}]}