GET | /voss/productGroups/{ProductGroupId} | gets voss product group |
---|
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 GetVossProductGroup
{
/**
* Passed if we have multilpe packages
*/
@ApiMember(Description="Passed if we have multilpe packages")
public UUID PackageId = null;
/**
* Procut Group id to get
*/
@ApiMember(Description="Procut Group id to get", IsRequired=true)
public UUID ProductGroupId = null;
/**
* Tier id required because it is used it voss url
*/
@ApiMember(Description="Tier id required because it is used it voss url", IsRequired=true)
public UUID TierId = null;
public UUID getPackageId() { return PackageId; }
public GetVossProductGroup setPackageId(UUID value) { this.PackageId = value; return this; }
public UUID getProductGroupId() { return ProductGroupId; }
public GetVossProductGroup setProductGroupId(UUID value) { this.ProductGroupId = value; return this; }
public UUID getTierId() { return TierId; }
public GetVossProductGroup setTierId(UUID value) { this.TierId = value; return this; }
}
@DataContract(Name="ProductGroupResult")
public static class ProductGroupResult
{
@DataMember(Name="productGroupType", IsRequired=true)
@SerializedName("productGroupType")
public ProductGroupTypeEnum ProductGroupType = null;
@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="products", EmitDefaultValue=false)
@SerializedName("products")
public ArrayList<ProductGroupProductDto> Products = null;
@DataMember(Name="tags", EmitDefaultValue=false)
@SerializedName("tags")
public ArrayList<ProductGroupTagDto> Tags = null;
public ProductGroupTypeEnum getProductGroupType() { return ProductGroupType; }
public ProductGroupResult setProductGroupType(ProductGroupTypeEnum value) { this.ProductGroupType = value; return this; }
public UUID getId() { return Id; }
public ProductGroupResult setId(UUID value) { this.Id = value; return this; }
public UUID getVersionId() { return VersionId; }
public ProductGroupResult setVersionId(UUID value) { this.VersionId = value; return this; }
public String getName() { return Name; }
public ProductGroupResult setName(String value) { this.Name = value; return this; }
public String getExternalId() { return ExternalId; }
public ProductGroupResult setExternalId(String value) { this.ExternalId = value; return this; }
public ArrayList<ProductGroupProductDto> getProducts() { return Products; }
public ProductGroupResult setProducts(ArrayList<ProductGroupProductDto> value) { this.Products = value; return this; }
public ArrayList<ProductGroupTagDto> getTags() { return Tags; }
public ProductGroupResult setTags(ArrayList<ProductGroupTagDto> value) { this.Tags = value; return this; }
}
public static enum ProductGroupTypeEnum
{
Optional,
Included;
}
@DataContract(Name="ProductGroupProductDto")
public static class ProductGroupProductDto
{
@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 ProductGroupProductDto setProductType(ProductTypeEnum value) { this.ProductType = value; return this; }
public StatusEnum getStatus() { return Status; }
public ProductGroupProductDto setStatus(StatusEnum value) { this.Status = value; return this; }
public UUID getId() { return Id; }
public ProductGroupProductDto setId(UUID value) { this.Id = value; return this; }
public String getName() { return Name; }
public ProductGroupProductDto setName(String value) { this.Name = value; return this; }
public String getExternalId() { return ExternalId; }
public ProductGroupProductDto setExternalId(String value) { this.ExternalId = value; return this; }
public String getArticleNumber() { return ArticleNumber; }
public ProductGroupProductDto setArticleNumber(String value) { this.ArticleNumber = value; return this; }
}
public static enum ProductTypeEnum
{
Main,
Addon,
License,
Usage;
}
public static enum StatusEnum
{
Active,
Terminated;
}
@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;
}
}
To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /voss/productGroups/{ProductGroupId} HTTP/1.1 Host: testapi.bokamera.se Accept: application/xml
HTTP/1.1 200 OK Content-Type: application/xml Content-Length: length <ProductGroupResult xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/VossIntegration.ApiTools.Model"> <externalId>String</externalId> <id>00000000-0000-0000-0000-000000000000</id> <name>String</name> <productGroupType>Optional</productGroupType> <products> <ProductGroupProductDto i:nil="true" /> </products> <tags> <ProductGroupTagDto i:nil="true" /> </tags> <versionId>00000000-0000-0000-0000-000000000000</versionId> </ProductGroupResult>