BokaMera.API.Host

<back to all web services

GetVossTier

Requires Authentication
Requires any of the roles:bookingsupplier-administrator-write, superadmin
The following routes are available for this service:
GET/voss/tiers/{TierId}gets voss tiers
import Foundation
import ServiceStack

// @ApiResponse(Description="You were unauthorized to call this service", StatusCode=401)
public class GetVossTier : Codable
{
    /**
    * 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 var tierId:String

    public var packageId:String?

    required public init(){}
}

// @DataContract(Name="TierResult")
public class TierResult : Codable
{
    // @DataMember(Name="id", IsRequired=true)
    public var id:String

    // @DataMember(Name="versionId", IsRequired=true)
    public var versionId:String

    // @DataMember(Name="name", IsRequired=true)
    public var name:String

    // @DataMember(Name="externalId")
    public var externalId:String

    // @DataMember(Name="rank")
    public var rank:Int

    // @DataMember(Name="productGroups", EmitDefaultValue=false)
    public var productGroups:[TierProductGroupDto] = []

    required public init(){}
}

// @DataContract(Name="TierProductGroupDto")
public class TierProductGroupDto : Codable
{
    // @DataMember(Name="productGroupType", IsRequired=true)
    public var productGroupType:ProductGroupTypeEnum

    // @DataMember(Name="id", IsRequired=true)
    public var id:String

    // @DataMember(Name="name", IsRequired=true)
    public var name:String

    // @DataMember(Name="externalId")
    public var externalId:String

    // @DataMember(Name="tags", EmitDefaultValue=false)
    public var tags:[ProductGroupTagDto] = []

    // @DataMember(Name="products", EmitDefaultValue=false)
    public var products:[TierProductDto] = []

    required public init(){}
}

public enum ProductGroupTypeEnum : String, Codable
{
    case Optional
    case Included
}

// @DataContract(Name="ProductGroupTagDto")
public class ProductGroupTagDto : Codable
{
    // @DataMember(Name="type", IsRequired=true)
    public var type:TypeEnum

    // @DataMember(Name="tag", IsRequired=true)
    public var tag:String

    required public init(){}
}

public enum TypeEnum : String, Codable
{
    case AtSubscriptionBillingPeriodEnd
    case AtBindingPeriodEnd
    case Immediately
}

// @DataContract(Name="TierProductDto")
public class TierProductDto : Codable
{
    // @DataMember(Name="type", IsRequired=true)
    public var type:ProductTypeEnum

    // @DataMember(Name="status", IsRequired=true)
    public var status:StatusEnum

    // @DataMember(Name="id", IsRequired=true)
    public var id:String

    // @DataMember(Name="name", IsRequired=true)
    public var name:String

    // @DataMember(Name="externalId")
    public var externalId:String

    // @DataMember(Name="articleNumber", IsRequired=true)
    public var articleNumber:String

    required public init(){}
}

public enum ProductTypeEnum : String, Codable
{
    case Main
    case Addon
    case License
    case Usage
}

public enum StatusEnum : String, Codable
{
    case Active
    case Terminated
}


Swift 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: api.bokamera.se 
Accept: application/json
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

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