BokaMera.API.Host

<back to all web services

GetVossTier

The following routes are available for this service:
GET/voss/tiers/{TierId}gets voss tiers
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;
using ServiceStack;
using ServiceStack.DataAnnotations;
using BokaMera.API.ServiceModel.Dtos;
using VossIntegration.ApiTools.Model;
using VossIntegration.ApiTools.Enums;

namespace BokaMera.API.ServiceModel.Dtos
{
    [ApiResponse(Description="You were unauthorized to call this service", StatusCode=401)]
    public partial class GetVossTier
    {
        ///<summary>
        ///The company id, if empty will use the company id for the user you are logged in with.
        ///</summary>
        [ApiMember(Description="The company id, if empty will use the company id for the user you are logged in with.")]
        public virtual Guid TierId { get; set; }

        public virtual Guid? PackageId { get; set; }
    }

}

namespace VossIntegration.ApiTools.Enums
{
    public enum ProductGroupTypeEnum
    {
        Optional,
        Included,
    }

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

}

namespace VossIntegration.ApiTools.Model
{
    [DataContract(Name="ProductGroupTagDto")]
    public partial class ProductGroupTagDto
    {
        [DataMember(Name="type", IsRequired=true)]
        public virtual TypeEnum Type { get; set; }

        [DataMember(Name="tag", IsRequired=true)]
        public virtual string Tag { get; set; }
        public enum TypeEnum
        {
            AtSubscriptionBillingPeriodEnd,
            AtBindingPeriodEnd,
            Immediately,
        }

    }

    [DataContract(Name="TierProductDto")]
    public partial class TierProductDto
    {
        [DataMember(Name="type", IsRequired=true)]
        public virtual ProductTypeEnum ProductType { get; set; }

        [DataMember(Name="status", IsRequired=true)]
        public virtual StatusEnum Status { get; set; }

        [DataMember(Name="id", IsRequired=true)]
        public virtual Guid Id { get; set; }

        [DataMember(Name="name", IsRequired=true)]
        public virtual string Name { get; set; }

        [DataMember(Name="externalId")]
        public virtual string ExternalId { get; set; }

        [DataMember(Name="articleNumber", IsRequired=true)]
        public virtual string ArticleNumber { get; set; }
        public enum StatusEnum
        {
            Active,
            Terminated,
        }

    }

    [DataContract(Name="TierProductGroupDto")]
    public partial class TierProductGroupDto
    {
        public TierProductGroupDto()
        {
            Tags = new List<ProductGroupTagDto>{};
            Products = new List<TierProductDto>{};
        }

        [DataMember(Name="productGroupType", IsRequired=true)]
        public virtual ProductGroupTypeEnum ProductGroupType { get; set; }

        [DataMember(Name="id", IsRequired=true)]
        public virtual Guid Id { get; set; }

        [DataMember(Name="name", IsRequired=true)]
        public virtual string Name { get; set; }

        [DataMember(Name="externalId")]
        public virtual string ExternalId { get; set; }

        [DataMember(Name="tags", EmitDefaultValue=false)]
        public virtual List<ProductGroupTagDto> Tags { get; set; }

        [DataMember(Name="products", EmitDefaultValue=false)]
        public virtual List<TierProductDto> Products { get; set; }
    }

    [DataContract(Name="TierResult")]
    public partial class TierResult
    {
        public TierResult()
        {
            ProductGroups = new List<TierProductGroupDto>{};
        }

        [DataMember(Name="id", IsRequired=true)]
        public virtual Guid Id { get; set; }

        [DataMember(Name="versionId", IsRequired=true)]
        public virtual Guid VersionId { get; set; }

        [DataMember(Name="name", IsRequired=true)]
        public virtual string Name { get; set; }

        [DataMember(Name="externalId")]
        public virtual string ExternalId { get; set; }

        [DataMember(Name="rank")]
        public virtual int Rank { get; set; }

        [DataMember(Name="productGroups", EmitDefaultValue=false)]
        public virtual List<TierProductGroupDto> ProductGroups { get; set; }
    }

}

C# GetVossTier DTOs

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

HTTP + XML

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/xml
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<TierResult 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>
  <productGroups>
    <TierProductGroupDto i:nil="true" />
  </productGroups>
  <rank>0</rank>
  <versionId>00000000-0000-0000-0000-000000000000</versionId>
</TierResult>